From 45315f4f79a5ded584a519a39d876c32bd13a61e Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Tue, 7 Mar 2023 14:25:28 +0000 Subject: 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. --- arthur/bot.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'arthur/bot.py') 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 {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 jishaku") await self.load_extension("jishaku") -- cgit v1.2.3