fix: rename !help command to avoid collision with built-in help

- 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.
This commit is contained in:
Benjamyn 2026-08-27 16:41:32 +10:00
parent 331e0e10a7
commit 778778c622

View File

@ -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