mirror of
https://github.com/kaaninchen/Gleiswechsel.git
synced 2026-09-17 16:52:47 +00:00
only run voice_announcements if there's someone in the vc
This commit is contained in:
@@ -139,6 +139,7 @@ async def _update_next_loop(voice_channel: discord.VoiceChannel):
|
|||||||
await voice_channel.set_status(status_text, reason="Next stop status")
|
await voice_channel.set_status(status_text, reason="Next stop status")
|
||||||
|
|
||||||
if config.announcements.voice_announcements:
|
if config.announcements.voice_announcements:
|
||||||
|
if len(voice_channel.members) > 0:
|
||||||
await voice_announcer(next_stop_str, voice_channel)
|
await voice_announcer(next_stop_str, voice_channel)
|
||||||
|
|
||||||
wait_seconds = (next_stop["arrival"] - datetime.now(LOCAL_TZ)).total_seconds()
|
wait_seconds = (next_stop["arrival"] - datetime.now(LOCAL_TZ)).total_seconds()
|
||||||
|
|||||||
Reference in New Issue
Block a user