From b2b15d3b7cc1c31f2a8915ff73020b56f5de48a2 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Fri, 1 Aug 2025 23:32:17 -0400 Subject: [PATCH] Fix client when client ID is passed --- app/internal/bot_manager.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/internal/bot_manager.py b/app/internal/bot_manager.py index 71affca..81c13fb 100644 --- a/app/internal/bot_manager.py +++ b/app/internal/bot_manager.py @@ -157,8 +157,8 @@ class VoiceCog(commands.Cog): # --- Discord Bot Manager Class --- class DiscordBotManager: - def __init__(self, client_id: str, device_id: int = 0, ng_threshold: int = 50): - self.client_id = client_id + def __init__(self, device_id: int = 0, ng_threshold: int = 50): + self.client_id = None self.device_id = device_id self.ng_threshold = ng_threshold self.bot = None @@ -182,10 +182,12 @@ class DiscordBotManager: # Set initial presence when the bot is ready await self.set_presence("Broadcasting...", discord.Game) - async def start_bot(self): + async def start_bot(self, client_id: str): if self.bot and self.bot.is_ready(): print("Bot is already running.") return + + self.client_id = client_id if not load_opus(): print("Failed to load Opus library. Bot cannot start voice features.")