From 6bf0b1e84bc75873337d583d50f1fb2bb5f8a09b Mon Sep 17 00:00:00 2001 From: SpagettiFisch Date: Thu, 20 Jun 2024 00:10:59 +0200 Subject: [PATCH] changed bot stop/shutdown command Signed-off-by: SpagettiFisch --- main.py | 2 -- modules/functions.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index ea5d9d0..3600b48 100644 --- a/main.py +++ b/main.py @@ -46,6 +46,4 @@ async def allow(ctx:slash.Context, user:slash.Option(description="der zu whiteli if await functions.isMod(ctx, bot): await functions.cmdallow(ctx, user.strip(), bot) - - bot.run(token) \ No newline at end of file diff --git a/modules/functions.py b/modules/functions.py index a2de05b..a3b2dd8 100644 --- a/modules/functions.py +++ b/modules/functions.py @@ -3,6 +3,7 @@ import json import requests import urllib import random +import asyncio from os import path from shutil import copyfile @@ -67,6 +68,7 @@ async def cmdshutdown(ctx:slash.Context, bot): print('Start logging out') await bot.logout() bot.clear() + asyncio.run(bot.close()) print('Log Out succesful\nExiting') exit() else: