diff --git a/README.md b/README.md index da5f930..42fdcca 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ python api_service/api_server.py - Default prefix: `!` (same as main bot) - Uses global command syncing instead of per-guild - All commands work in DMs and private channels -- Identical functionality to main bot but with different command registration +- Loads only a limited set of cogs (settings, help, message, webdrivertorso, owoify, safebooru, rule34, starboard, wordle) ## 🧩 Project Structure diff --git a/neru_bot.py b/neru_bot.py index 0c067ef..c578be8 100644 --- a/neru_bot.py +++ b/neru_bot.py @@ -7,7 +7,6 @@ import asyncio import logging import asyncpg import redis.asyncio as aioredis -from commands import load_all_cogs from error_handler import handle_error import settings_manager from global_bot_accessor import set_bot_instance @@ -84,12 +83,31 @@ class NeruBot(commands.Bot): else: log.error("CRITICAL: pg_pool or redis_client not initialized in setup_hook. Cannot proceed with settings_manager setup.") - # Load all cogs + # Load only specific cogs try: - await load_all_cogs(self) - log.info("All cogs loaded successfully") + # Define the hardcoded list of cogs to load + hardcoded_cogs = [ + "cogs.settings_cog", + "cogs.help_cog", + "cogs.message_cog", + "cogs.owoify_cog", + "cogs.safebooru_cog", + "cogs.caption_cog", + "cogs.games_cog", + "cogs.ping_cog", + ] + + # Load each cog individually + for cog in hardcoded_cogs: + try: + await self.load_extension(cog) + log.info(f"Successfully loaded {cog}") + except Exception as e: + log.exception(f"Error loading cog {cog}: {e}") + + log.info(f"Loaded {len(hardcoded_cogs)} hardcoded cogs") except Exception as e: - log.exception(f"Error loading cogs: {e}") + log.exception(f"Error during cog loading process: {e}") # Apply global allowed_installs and allowed_contexts to all commands try: