From 283a3919f0891b6c7f1d2227efbd85920df88535 Mon Sep 17 00:00:00 2001 From: Milka64 Date: Sun, 13 Dec 2020 16:25:37 +0100 Subject: [PATCH] wait for leave vocal before restart #41 --- kabot/kabot/kabot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 4be50ef..3af50eb 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -91,7 +91,7 @@ class Mybot(commands.Cog): os.remove("/tmp/" + fichier) @commands.command() - async def disconnect(self, ctx): + async def leave(self, ctx): if ctx.voice_client.is_connected(): await ctx.guild.voice_client.disconnect() @@ -154,8 +154,8 @@ class Mybot(commands.Cog): @commands.command(help='Restart Bot') async def restart(self, ctx): - cmd = self.bot.get_command('disconnect') - await cmd.invoke(ctx) + cmd = self.bot.get_command('leave') + cmd.invoke(ctx) await self.bot.close() exit()