This commit is contained in:
@@ -75,10 +75,10 @@ class DiscordBotManager:
|
||||
LOGGER.info("Bot is ready, start_bot returning.")
|
||||
return
|
||||
except asyncio.TimeoutError:
|
||||
LOGGER.error("Timeout waiting for bot to become ready. Bot might have failed to start.")
|
||||
if self.bot_task and not self.bot_task.done():
|
||||
self.bot_task.cancel()
|
||||
raise RuntimeError("Bot failed to become ready within timeout.")
|
||||
LOGGER.error("Timeout waiting for bot to become ready. Bot might have failed to start.")
|
||||
if self.bot_task and not self.bot_task.done():
|
||||
self.bot_task.cancel()
|
||||
raise RuntimeError("Bot failed to become ready within timeout.")
|
||||
|
||||
async def stop_bot(self):
|
||||
async with self.lock:
|
||||
@@ -130,8 +130,8 @@ class DiscordBotManager:
|
||||
LOGGER.info("Bot joined voice, returning.")
|
||||
return
|
||||
except asyncio.TimeoutError:
|
||||
LOGGER.error("Timeout waiting for bot to join voice.")
|
||||
raise RuntimeError("Bot failed to join voice within timeout.")
|
||||
LOGGER.error("Timeout waiting for bot to join voice.")
|
||||
raise RuntimeError("Bot failed to join voice within timeout.")
|
||||
|
||||
async def leave_voice_channel(self, guild_id: int):
|
||||
if not self.bot:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import csv
|
||||
import json
|
||||
from models import ConfigGenerator, DecodeMode, ChannelConfig, DeviceConfig, TrunkingConfig, TrunkingChannelConfig, AudioConfig, TerminalConfig, TalkgroupTag
|
||||
from models import TalkgroupTag
|
||||
from typing import List
|
||||
from internal.logger import create_logger
|
||||
|
||||
@@ -67,4 +67,4 @@ def get_current_system_from_config() -> str:
|
||||
first_channel = data["channels"][0]
|
||||
if "name" in first_channel:
|
||||
return first_channel["name"]
|
||||
return None
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user