convert the guild ID strings to ints to check in bot response

This commit is contained in:
Logan Cusano
2025-05-24 23:12:30 -04:00
parent 9df1d77d6a
commit 607f0b4594

View File

@@ -59,7 +59,7 @@ async def join_server(system_id, guild_id, channel_id):
# 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']:
if 'connected_guilds' not in bot_status or int(guild_id) not in bot_status['connected_guilds']:
# Join the server
await drb_api.join_voice_channel(guild_id, channel_id)
# Update status
@@ -108,7 +108,7 @@ async def leave_server(guild_id):
return
# Check if the bot is in the guild
if not "connected_guilds" in bot_status or guild_id not in bot_status['connected_guilds']:
if not "connected_guilds" in bot_status or int(guild_id) not in bot_status['connected_guilds']:
return
# Leave the server specified