moved maintainer_id to .env
This commit is contained in:
parent
343eecb4d8
commit
b836d3fceb
11
fouras.py
11
fouras.py
@ -21,7 +21,8 @@ API_URL = "".join(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
MAINTAINER_ID = 151626081458192384
|
AUTHOR_ID = 151626081458192384
|
||||||
|
MAINTAINER_ID = os.getenv("MAINTAINER_ID", AUTHOR_ID)
|
||||||
|
|
||||||
ABOUT = """
|
ABOUT = """
|
||||||
Ce bot a été développé par {user}
|
Ce bot a été développé par {user}
|
||||||
@ -145,12 +146,6 @@ async def handle_debug_commands(message, client: discord.Client) -> bool:
|
|||||||
"""Handle debug commands (debug, save, load, broadcast). Returns True if handled."""
|
"""Handle debug commands (debug, save, load, broadcast). Returns True if handled."""
|
||||||
message_content = message.content.lower()
|
message_content = message.content.lower()
|
||||||
|
|
||||||
if message_content == "load fouras":
|
|
||||||
if message.author.id == MAINTAINER_ID:
|
|
||||||
load_riddles()
|
|
||||||
await message.author.send("Réponses et énigmes rechargées")
|
|
||||||
return True
|
|
||||||
|
|
||||||
if message_content == "debug fouras":
|
if message_content == "debug fouras":
|
||||||
if message.author.id == MAINTAINER_ID:
|
if message.author.id == MAINTAINER_ID:
|
||||||
# Récupération depuis la DB au lieu d'une variable globale
|
# Récupération depuis la DB au lieu d'une variable globale
|
||||||
@ -414,7 +409,7 @@ def setup_commands(client: discord.Client, tree) -> None:
|
|||||||
async def about(
|
async def about(
|
||||||
interaction: discord.Interaction,
|
interaction: discord.Interaction,
|
||||||
):
|
):
|
||||||
author_user = await client.fetch_user(MAINTAINER_ID)
|
author_user = await client.fetch_user(AUTHOR_ID)
|
||||||
await interaction.response.send_message(ABOUT.format(user=author_user.mention, url=API_URL), ephemeral=True)
|
await interaction.response.send_message(ABOUT.format(user=author_user.mention, url=API_URL), ephemeral=True)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user