From 7bcc441d380fadd6862e925aa567e6e90b0c4c77 Mon Sep 17 00:00:00 2001 From: nex Date: Mon, 20 Mar 2023 14:49:45 +0000 Subject: [PATCH] Fix voice --- cogs/other.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cogs/other.py b/cogs/other.py index 4a35ceb..5c3996e 100644 --- a/cogs/other.py +++ b/cogs/other.py @@ -831,11 +831,13 @@ class OtherCog(commands.Cog): voice: discord.Option( str, "The voice to use. Some may cause timeout.", - choices=VOICES, + autocomplete=discord.utils.basic_autocomplete(VOICES), default="default" ) ): """Converts text to MP3. 5 uses per 10 minutes.""" + if voice not in VOICES: + return await ctx.respond("Invalid voice.") speed = min(300, max(50, speed)) _self = self _bot = self.bot