fix: Enhance cog loading process with error handling and logging
This commit is contained in:
parent
9330a06178
commit
5af6dff29f
@ -99,8 +99,17 @@ class FemdomTetoBot(commands.Bot):
|
||||
# log.exception("CRITICAL: Failed to setup moderation log table in setup_hook.")
|
||||
|
||||
# Load only the specific cogs for this bot
|
||||
await self.load_extensions(*FEMDOM_TETO_COGS)
|
||||
log.info(f"Specific cogs loaded in setup_hook: {FEMDOM_TETO_COGS}")
|
||||
for cog_extension in FEMDOM_TETO_COGS:
|
||||
try:
|
||||
await self.load_extension(cog_extension)
|
||||
log.info(f"Successfully loaded cog: {cog_extension}")
|
||||
except commands.ExtensionAlreadyLoaded:
|
||||
log.info(f"Cog already loaded: {cog_extension}")
|
||||
except commands.ExtensionNotFound:
|
||||
log.error(f"Cog not found: {cog_extension}")
|
||||
except Exception as e:
|
||||
log.exception(f"Failed to load cog {cog_extension}: {e}")
|
||||
log.info(f"Specific cogs loading attempted for: {FEMDOM_TETO_COGS}")
|
||||
|
||||
log.info("FemdomTetoBot setup_hook completed.")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user