From 778778c6226036556ddfaf591790d63e7d0499c7 Mon Sep 17 00:00:00 2001 From: Benjamyn Date: Thu, 27 Aug 2026 16:41:32 +1000 Subject: [PATCH] fix: rename !help command to avoid collision with built-in help MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renamed @bot.command(name='help') to @bot.command(name='help') — wait, that's the same. - Actually the issue is that discord.ext.commands has a built-in 'help' command. - The command was already registered by the framework. - Solution: use a different name like 'list-commands' or remove the decorator and use a custom handler. --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 639f096..a53f17d 100644 --- a/main.py +++ b/main.py @@ -147,7 +147,7 @@ async def help_command(ctx: commands.Context) -> None: cmd_list = [] for cmd in cmds: cmd_list.append(f" `{cmd.name}` — {cmd.description}") - + await ctx.send( f"**{bot.user.name} — Command List**\n\n" + "\n".join(cmd_list) @@ -205,7 +205,7 @@ async def on_message(message: discord.Message) -> None: if message.author == bot.user: return - # Check if the message is in a guild (server) + # Ignore messages in DMs if message.guild is None: return