From b4068a83bc28ebdbd9589ba903f9fb542911a65d Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 25 May 2025 23:35:54 -0400 Subject: [PATCH] Made OP25 logic optional when joining discord --- app/client.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/client.py b/app/client.py index 976bf5d..265dcea 100644 --- a/app/client.py +++ b/app/client.py @@ -57,7 +57,7 @@ def command(func): # Join server @command async def join_server(websocket, system_id, guild_id, channel_id): - # Takes system ID, guild ID, channel ID + # Takes guild ID, channel ID, and optionally system_id. If system ID is not included then it will skip OP25 logic bot_status = await drb_api.get_bot_status() print("Bot status:", bot_status) # Check if the bot is running @@ -75,6 +75,12 @@ async def join_server(websocket, system_id, guild_id, channel_id): await drb_api.join_voice_channel(guild_id, channel_id) # Update status client_status['discord_status'] = DiscordStatusValues.INVOICE + + print("Join server completed") + + # If there is no system ID, skip the OP25 starting / setting logic + if not system_id: + return op25_status = await drb_api.get_op25_status() print("OP25 status:", op25_status) @@ -106,7 +112,7 @@ async def join_server(websocket, system_id, guild_id, channel_id): client_status['op25_status'] = OP25StatusValues.LISTENING - print("Join server completed") + print("OP25 Startup Complete") # Leave server @command