only run voice_announcements if there's someone in the vc

This commit is contained in:
Kaaninchen
2026-08-18 20:33:31 +02:00
parent 881d2e865b
commit 6006a561b2
+2 -1
View File
@@ -139,7 +139,8 @@ 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:
await voice_announcer(next_stop_str, voice_channel) if len(voice_channel.members) > 0:
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()
if wait_seconds > 0: if wait_seconds > 0: