diff --git a/Music-Bot.py b/Music-Bot.py index 52b29b4..f4896fe 100644 --- a/Music-Bot.py +++ b/Music-Bot.py @@ -101,6 +101,13 @@ else: print("------") + @bot.command(name="Shutdown") + async def _shutdown(ctx): + os.remove("cache/*") + await ctx.send(f"{success}Shutting down...") + #await bot.close + + @bot.slash_command(name="join", description="Summon the bot into your channel") async def join(ctx: commands.Context): try: @@ -224,7 +231,6 @@ else: bot.loop.run_until_complete(bot.start(token=args.token, reconnect=True)) except KeyboardInterrupt: bot.loop.run_until_complete(bot.close()) - os.remove("cache/*") finally: bot.loop.close()