This commit is contained in:
tema5002
2026-05-17 16:17:31 +03:00
parent b5033ca34e
commit c414699d6c

10
main.py
View File

@@ -439,11 +439,6 @@ async def delete(args: list[str], message: discord.Message) -> tuple[str, bool]:
return f"successfully deleted tracked message {int(args[0])}", True
@register("kill yourself", 0)
async def kill_yourself(args: list[str], message: discord.Message):
raise Exception("ok")
@register("add this server to emoji storage", 0)
async def add_this_server_to_emoji_storage(args: list[str], message: discord.Message) -> tuple[str, bool]:
if message.author.id not in CONFIG.trusted:
@@ -553,7 +548,7 @@ async def handle_command(msg: str, message: discord.Message) -> tuple[str | disc
message
)
return "i dont know this command", True
return "", True
@bot.event
@@ -565,6 +560,9 @@ async def on_message(message: discord.Message):
result, d = await handle_command(msg.removeprefix(CONFIG.prefix), message)
if not result:
return
if isinstance(result, str):
if d:
await message.reply(result, delete_after=60)