From b156f90ea05cdece39db52f07d7dcc567ea540db Mon Sep 17 00:00:00 2001 From: stijndcl Date: Thu, 31 Mar 2022 20:03:00 +0200 Subject: [PATCH] fixes #109 --- cogs/help.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cogs/help.py b/cogs/help.py index 598a8de..5f32786 100644 --- a/cogs/help.py +++ b/cogs/help.py @@ -50,7 +50,16 @@ class HelpCommand(commands.MinimalHelpCommand): return await self.send_bot_help(self.get_bot_mapping()) # Turn dic to lowercase to allow proper name searching - all_commands = dict((k.lower(), v) for k, v in bot.all_commands.items() if not isinstance(v, SlashCommand)) + all_commands = {} + + for k, v in bot.all_commands.items(): + if k is None or v is None: + continue + + if isinstance(v, SlashCommand): + continue + + all_commands[k.lower()] = v if spl[0].lower() not in all_commands: return await self.send_error_message(await self.command_not_found(spl[0]))