Update joining logic when the bot is already running

This commit is contained in:
Logan Cusano
2025-05-02 23:52:55 -04:00
parent 56d7d8e8fe
commit 52965f2a30

View File

@@ -54,6 +54,8 @@ async def join_server(system_id, guild_id, channel_id):
raise Exception("No bot token received") # TODO - Handle this better
# Run the bot if not
await drb_api.start_bot(bot_token['token'])
# Check if the bot is connected to the guild, if not join
if 'connected_guilds' not in bot_status or guild_id not in bot_status['connected_guilds']:
# Join the server
await drb_api.join_voice_channel(guild_id, channel_id)
# Update status