From 82ee620ea47889edfcbe73f98025f460ed98474d Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 27 Apr 2025 01:06:21 -0400 Subject: [PATCH] Fix awaits --- app/client.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/client.py b/app/client.py index a021792..50f0d4c 100644 --- a/app/client.py +++ b/app/client.py @@ -42,18 +42,18 @@ def command(func): @command async def join_server(system_id, guild_id, channel_id): # Takes system ID, guild ID, channel ID - bot_status = drb_api.get_bot_status() + bot_status = await drb_api.get_bot_status() # Check if the bot is running if 'bot_running' not in bot_status or not bot_status['bot_running']: # Run the bot if not - drb_api.start_bot() + await drb_api.start_bot() # Update status client_status = StatusValues.LISTENING - op25_status = drb_api.get_op25_status() + op25_status = await drb_api.get_op25_status() # Check if OP25 is stopped, if so set the selected channel, otherwise if op25_status == "stopped": - chn_details = srv_api.get_channel_details(channel_id) + chn_details = await srv_api.get_channel_details(channel_id) if not chn_details: # TODO - handle not having channel details pass @@ -76,7 +76,7 @@ async def join_server(system_id, guild_id, channel_id): @command async def leave_server(guild_id): # Takes guild ID - bot_status = drb_api.get_bot_status() + bot_status = await drb_api.get_bot_status() # Check if the bot is running if 'bot_running' not in bot_status or not bot_status['bot_running']: @@ -88,7 +88,7 @@ async def leave_server(guild_id): return # Leave the server specified - drb_api.leave_voice_channel(guild_id) + await drb_api.leave_voice_channel(guild_id) # Update status client_status = StatusValues.ONLINE