Fix manager token name

This commit is contained in:
Logan Cusano
2025-08-01 23:38:56 -04:00
parent 991cd95a0f
commit 62357fb920

View File

@@ -158,7 +158,7 @@ class VoiceCog(commands.Cog):
# --- Discord Bot Manager Class ---
class DiscordBotManager:
def __init__(self, device_id: int = 0, ng_threshold: int = 50):
self.client_id = None
self.token = None
self.device_id = device_id
self.ng_threshold = ng_threshold
self.bot = None
@@ -182,12 +182,12 @@ class DiscordBotManager:
# Set initial presence when the bot is ready
await self.set_presence("Broadcasting...", discord.Game)
async def start_bot(self, client_id: str):
async def start_bot(self, token: str):
if self.bot and self.bot.is_ready():
print("Bot is already running.")
return
self.client_id = client_id
self.token = token
if not load_opus():
print("Failed to load Opus library. Bot cannot start voice features.")
@@ -198,7 +198,7 @@ class DiscordBotManager:
print("Starting bot...")
try:
# Run the bot in a separate task so we can control it
self._bot_task = asyncio.create_task(self.bot.start(self.client_id))
self._bot_task = asyncio.create_task(self.bot.start(self.token))
# Wait for the bot to connect (optional, useful for ensuring it's ready)
await self.bot.wait_until_ready()
print("Bot started and is ready.")