aboutsummaryrefslogtreecommitdiffstats
path: root/bot/bot.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-08-23 20:46:14 +0100
committerGravatar Chris Lovering <[email protected]>2022-09-21 23:02:55 +0100
commitcc2dcdcdbf9e6057053bdb72bba848f4c2e19cbd (patch)
tree75c87793362d786bb2c45fea8fb235435e44c315 /bot/bot.py
parentMove startup checks and logs to their own cog (diff)
Use extension utils from bot-core
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)