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.
This commit is contained in:
+1
-1
@@ -2574,7 +2574,7 @@ class TtsToy(Cog):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Play in VC only if user is in a voice channel
|
# 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 = self._get_or_create_tts_queue(ctx.guild.id)
|
||||||
queue_position = queue.qsize() + 1
|
queue_position = queue.qsize() + 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user