diff options
author | 2022-08-23 20:46:14 +0100 | |
---|---|---|
committer | 2022-09-21 23:02:55 +0100 | |
commit | cc2dcdcdbf9e6057053bdb72bba848f4c2e19cbd (patch) | |
tree | 75c87793362d786bb2c45fea8fb235435e44c315 /bot/bot.py | |
parent | Move 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.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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) |