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:
parent
331e0e10a7
commit
778778c622
2
main.py
2
main.py
@ -205,7 +205,7 @@ async def on_message(message: discord.Message) -> None:
|
|||||||
if message.author == bot.user:
|
if message.author == bot.user:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Check if the message is in a guild (server)
|
# Ignore messages in DMs
|
||||||
if message.guild is None:
|
if message.guild is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user