Only try to update presence and transmit when the bot is online

This commit is contained in:
Logan Cusano
2026-01-04 01:18:11 -05:00
parent 19ac4b48be
commit 00f4ebea2d

View File

@@ -334,6 +334,7 @@ async def mqtt_lifecycle_manager():
await stop_recording()
# Stop Discord Transmission
if discord_bot.is_ready():
discord_bot.stop_transmission()
audio_url = None
@@ -355,6 +356,7 @@ async def mqtt_lifecycle_manager():
LOGGER.debug(f"Call Start: TGID {current_tgid} ({current_meta.get('alpha_tag')})")
# Trigger Discord Transmission
if discord_bot.is_ready():
discord_bot.start_transmission()
discord_bot.update_system_presence(current_meta.get('sysname', 'Scanning'))
@@ -396,6 +398,7 @@ async def mqtt_lifecycle_manager():
await stop_recording()
# Stop Discord Transmission
if discord_bot.is_ready():
discord_bot.stop_transmission()
audio_url = None