From 8efd8d23542e2630c74f583de9ded9742bca0118 Mon Sep 17 00:00:00 2001 From: Milka64 Date: Thu, 13 Aug 2020 20:00:28 +0000 Subject: [PATCH] tryx to fix #35 --- kabot/kabot/kabot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 0551924..fcde97b 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -21,7 +21,7 @@ from giphy_client.rest import ApiException from logging.handlers import RotatingFileHandler from pathlib import Path from subprocess import * -from sys import argv +from sys import argv,exit here = os.path.dirname(os.path.abspath(__file__)) @@ -135,7 +135,8 @@ class Mybot(commands.Cog): @commands.command(help='Restart Bot') async def restart(self, ctx): - await self.bot.logout() + await self.bot.close() + sys.exit() @commands.command(help='Update local repo') async def update(self, message): @@ -536,7 +537,7 @@ def main(): async def on_ready(): print('yeah baby!') if test: - await bot.logout() + await bot.close() for channel in bot.get_all_channels(): if channel.name == "général": current_chan = channel