convert the guild ID strings to ints to check in bot response
This commit is contained in:
@@ -59,7 +59,7 @@ async def join_server(system_id, guild_id, channel_id):
|
|||||||
# Run the bot if not
|
# Run the bot if not
|
||||||
await drb_api.start_bot(bot_token['token'])
|
await drb_api.start_bot(bot_token['token'])
|
||||||
# Check if the bot is connected to the guild, if not join
|
# 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
|
# Join the server
|
||||||
await drb_api.join_voice_channel(guild_id, channel_id)
|
await drb_api.join_voice_channel(guild_id, channel_id)
|
||||||
# Update status
|
# Update status
|
||||||
@@ -108,7 +108,7 @@ async def leave_server(guild_id):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Check if the bot is in the guild
|
# 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
|
return
|
||||||
|
|
||||||
# Leave the server specified
|
# Leave the server specified
|
||||||
|
|||||||
Reference in New Issue
Block a user