From 241197b05bcb1bebc0cfa6c6c8afc47ee0614c53 Mon Sep 17 00:00:00 2001 From: kingston Date: Sun, 18 Oct 2026 22:27:41 -0500 Subject: [PATCH] ttstoy: fix NameError in tts (audio -> audio_path) The VC-playback guard referenced an undefined variable 'audio', crashing every [p]tts invocation with NameError. Use audio_path, which is the generated mp3 path set just above. --- ttstoy/ttstoy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ttstoy/ttstoy.py b/ttstoy/ttstoy.py index 01d938b..c14d4c1 100644 --- a/ttstoy/ttstoy.py +++ b/ttstoy/ttstoy.py @@ -2574,7 +2574,7 @@ class TtsToy(Cog): ) # Play in VC only if user is in a voice channel - if user_in_vc and audio and ctx.guild.me.voice: + if user_in_vc and audio_path and ctx.guild.me.voice: queue = self._get_or_create_tts_queue(ctx.guild.id) queue_position = queue.qsize() + 1