Update joining logic when the bot is already running
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user