From 9e4cd64950ee4a5b671ad4620a7eb638b2193f1a Mon Sep 17 00:00:00 2001 From: flifloo Date: Thu, 9 Apr 2020 13:51:52 +0200 Subject: [PATCH] Raise CommandNotFound when error on subgroup command name --- extensions/speak.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/speak.py b/extensions/speak.py index 6731eed..fe0018f 100644 --- a/extensions/speak.py +++ b/extensions/speak.py @@ -23,7 +23,9 @@ class Speak(commands.Cog): @commands.guild_only() async def speak(self, ctx: commands.Context): if ctx.invoked_subcommand is None: - if ctx.author.voice is None or ctx.author.voice.channel is None: + if ctx.args: + raise CommandNotFound + elif ctx.author.voice is None or ctx.author.voice.channel is None: await ctx.send("Your not in a voice channel !") elif self.voice_chan is None: await ctx.send("Voice channel not set !")