diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 2b995d9..f910438 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -99,7 +99,7 @@ class Mybot(commands.Cog): @commands.command() async def leave(self, ctx): - if ctx.voice_client.is_connected(): + if ctx.voice_client and ctx.voice_client.is_connected(): await ctx.guild.voice_client.disconnect() @commands.command(help="Interrogation issues \n Args: list, search[mot clé] et add[nom de l'issue]")