aboutsummaryrefslogtreecommitdiffstats
path: root/bot/bot.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/bot.py')
-rw-r--r--bot/bot.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bot/bot.py b/bot/bot.py
index 226f9890..9309f50c 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -60,3 +60,11 @@ class Bot(BotBase):
# This is not awaited to avoid a deadlock with any cogs that have
# wait_until_guild_available in their cog_load method.
scheduling.create_task(self.load_extensions(exts))
+
+ async def invoke_help_command(self, ctx: commands.Context) -> None:
+ """Invoke the help command or default help command if help extensions is not loaded."""
+ if "bot.exts.core.help" in ctx.bot.extensions:
+ help_command = ctx.bot.get_command("help")
+ await ctx.invoke(help_command, ctx.command.qualified_name)
+ return
+ await ctx.send_help(ctx.command)