From 84b09f421748175487979246d065ff68e0236ace Mon Sep 17 00:00:00 2001 From: Milka64 Date: Sun, 13 Dec 2020 18:33:37 +0100 Subject: [PATCH] try to fix restart cmd again --- kabot/kabot/kabot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]")