Made OP25 logic optional when joining discord

This commit is contained in:
Logan Cusano
2025-05-25 23:35:54 -04:00
parent 076134ad91
commit b4068a83bc

View File

@@ -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