Made OP25 logic optional when joining discord
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user