Only try to update presence and transmit when the bot is online
This commit is contained in:
@@ -334,6 +334,7 @@ async def mqtt_lifecycle_manager():
|
|||||||
await stop_recording()
|
await stop_recording()
|
||||||
|
|
||||||
# Stop Discord Transmission
|
# Stop Discord Transmission
|
||||||
|
if discord_bot.is_ready():
|
||||||
discord_bot.stop_transmission()
|
discord_bot.stop_transmission()
|
||||||
|
|
||||||
audio_url = None
|
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')})")
|
LOGGER.debug(f"Call Start: TGID {current_tgid} ({current_meta.get('alpha_tag')})")
|
||||||
|
|
||||||
# Trigger Discord Transmission
|
# Trigger Discord Transmission
|
||||||
|
if discord_bot.is_ready():
|
||||||
discord_bot.start_transmission()
|
discord_bot.start_transmission()
|
||||||
discord_bot.update_system_presence(current_meta.get('sysname', 'Scanning'))
|
discord_bot.update_system_presence(current_meta.get('sysname', 'Scanning'))
|
||||||
|
|
||||||
@@ -396,6 +398,7 @@ async def mqtt_lifecycle_manager():
|
|||||||
await stop_recording()
|
await stop_recording()
|
||||||
|
|
||||||
# Stop Discord Transmission
|
# Stop Discord Transmission
|
||||||
|
if discord_bot.is_ready():
|
||||||
discord_bot.stop_transmission()
|
discord_bot.stop_transmission()
|
||||||
|
|
||||||
audio_url = None
|
audio_url = None
|
||||||
|
|||||||
Reference in New Issue
Block a user