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