mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 02:41:06 -05:00
Created /core module with specialized files:
base.py: Main cog class and initialization logic cleanup.py: Resource cleanup functionality commands.py: Command handlers events.py: Event listeners guild.py: Guild component management init.py: Module exports Improved code organization by: Separating concerns into focused modules Maintaining clear dependencies between modules Keeping related functionality together Making the codebase more maintainable Preserved all existing functionality while making the code more modular and easier to maintain.
This commit is contained in:
@@ -13,7 +13,7 @@ class MessageHandler:
|
||||
|
||||
def __init__(self, bot, config_manager, queue_manager):
|
||||
self.bot = bot
|
||||
self.config = config_manager
|
||||
self.config_manager = config_manager
|
||||
self.queue_manager = queue_manager
|
||||
|
||||
async def process_message(self, message: discord.Message) -> None:
|
||||
@@ -25,7 +25,7 @@ class MessageHandler:
|
||||
return
|
||||
|
||||
# Get guild settings
|
||||
settings = await self.config.get_guild_settings(message.guild.id)
|
||||
settings = await self.config_manager.get_guild_settings(message.guild.id)
|
||||
if not settings:
|
||||
logger.warning(f"No settings found for guild {message.guild.id}")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user