Added Shutdown-Command
This commit is contained in:
@@ -101,6 +101,13 @@ else:
|
|||||||
print("------")
|
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")
|
@bot.slash_command(name="join", description="Summon the bot into your channel")
|
||||||
async def join(ctx: commands.Context):
|
async def join(ctx: commands.Context):
|
||||||
try:
|
try:
|
||||||
@@ -224,7 +231,6 @@ else:
|
|||||||
bot.loop.run_until_complete(bot.start(token=args.token, reconnect=True))
|
bot.loop.run_until_complete(bot.start(token=args.token, reconnect=True))
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
bot.loop.run_until_complete(bot.close())
|
bot.loop.run_until_complete(bot.close())
|
||||||
os.remove("cache/*")
|
|
||||||
finally:
|
finally:
|
||||||
bot.loop.close()
|
bot.loop.close()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user