feat: conditionally load dev_tools cog when not in prod
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9257852c3e
commit
c683e36daf
@ -131,6 +131,14 @@ async def main():
|
||||
logger.error(f"Failed to load cog: {c}")
|
||||
logger.error(f"{e}")
|
||||
|
||||
# Load dev-only cogs when not in production
|
||||
if "prod" not in os.getenv("DATABASE", "dev").lower():
|
||||
try:
|
||||
await bot.load_extension("cogs.dev_tools")
|
||||
logger.info("Loaded dev-only cog: dev_tools")
|
||||
except Exception as e:
|
||||
logger.warning(f"Failed to load dev_tools cog: {e}")
|
||||
|
||||
# Start health server and bot concurrently
|
||||
async with bot:
|
||||
# Create health server task
|
||||
|
||||
Loading…
Reference in New Issue
Block a user