Added Shutdown-Command
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user