ignore unknown commands

This commit is contained in:
Mylloon 2021-07-29 01:04:59 +02:00
parent 8ee38cd4f9
commit 6da7a3cc36

View file

@ -21,6 +21,11 @@ class Bot(commands.Bot):
await self.handle_commands(message) # Let the bot know we want to handle and invoke our commands
async def event_command_error(self, _, error):
if isinstance(error, commands.errors.CommandNotFound): # Ignore unknown commands (useful because custom commands arent known)
return
raise error
client = Bot()
for file in listdir("modules"):