From 17964a23fb5e7d417629a8acc4736106337b54d4 Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Thu, 3 Feb 2022 01:52:26 +0100 Subject: [PATCH] Fix bug in help pages because of slash commands --- cogs/help.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cogs/help.py b/cogs/help.py index c4b944b..598a8de 100644 --- a/cogs/help.py +++ b/cogs/help.py @@ -1,5 +1,6 @@ from data import constants import discord +from discord.commands import SlashCommand from discord.ext import commands from enums.help_categories import categories, getCategory, Category import json @@ -49,7 +50,7 @@ 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()) + all_commands = dict((k.lower(), v) for k, v in bot.all_commands.items() if not isinstance(v, SlashCommand)) if spl[0].lower() not in all_commands: return await self.send_error_message(await self.command_not_found(spl[0]))