Fix fuckass double load

This commit is contained in:
AI Coding Agent Cog 2025-06-04 14:58:33 -06:00
parent 051e342553
commit 31410c6d7b

12
main.py
View File

@ -130,12 +130,12 @@ class MyBot(commands.Bot):
await load_all_cogs(self, skip_cogs=self.ai_cogs_to_skip) await load_all_cogs(self, skip_cogs=self.ai_cogs_to_skip)
log.info(f"Cogs loaded in setup_hook. Skipped: {self.ai_cogs_to_skip or 'None'}") log.info(f"Cogs loaded in setup_hook. Skipped: {self.ai_cogs_to_skip or 'None'}")
# Load the lockdown cog
try: # Load the lockdown cog separately if needed
await self.load_extension("cogs.lockdown_cog") # Note: load_all_cogs already loads all cogs in the directory. The
log.info("Lockdown cog loaded successfully.") # manual load below caused the cog to be loaded twice resulting in an
except Exception as e: # ExtensionAlreadyLoaded error.
log.exception(f"Failed to load lockdown cog: {e}") # await self.load_extension("cogs.lockdown_cog")
# --- Share GurtCog, ModLogCog, and bot instance with the sync API --- # --- Share GurtCog, ModLogCog, and bot instance with the sync API ---
try: try: