Raise CommandNotFound when error on subgroup command name
This commit is contained in:
parent
a917c8a29f
commit
9e4cd64950
1 changed files with 3 additions and 1 deletions
|
@ -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 !")
|
||||
|
|
Reference in a new issue