diff options
author | 2023-03-07 14:25:28 +0000 | |
---|---|---|
committer | 2023-03-07 14:28:23 +0000 | |
commit | 45315f4f79a5ded584a519a39d876c32bd13a61e (patch) | |
tree | db496191b201748d6a71e6e0b18ced9f46fe4b85 /arthur/bot.py | |
parent | build(deps): bump pydis-core from 9.5.0 to 9.5.1 (diff) |
Directly await load_extensions when loading the bot
This is now called within a task internally in bot-core, so we no longer need to do it in the bot too.
Diffstat (limited to 'arthur/bot.py')
-rw-r--r-- | arthur/bot.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arthur/bot.py b/arthur/bot.py index d7ccd8e..33aecf5 100644 --- a/arthur/bot.py +++ b/arthur/bot.py @@ -6,7 +6,6 @@ from discord import Interaction, Member, User from discord.ext import commands from kubernetes_asyncio import config from pydis_core import BotBase -from pydis_core.utils import scheduling from arthur import exts, logger from arthur.config import CONFIG @@ -48,9 +47,7 @@ class KingArthur(BotBase): config.load_incluster_config() logger.info(f"Logged in <red>{self.user}</>") - # 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)) + await self.load_extensions(exts, sync_app_commands=False) logger.info("Loading <red>jishaku</red>") await self.load_extension("jishaku") |