Added Shutdown-Command with cleanup
This commit is contained in:
@@ -105,10 +105,11 @@ else:
|
|||||||
@bot.command(name="Shutdown")
|
@bot.command(name="Shutdown")
|
||||||
async def _shutdown(ctx):
|
async def _shutdown(ctx):
|
||||||
files = os.listdir(cache_dir)
|
files = os.listdir(cache_dir)
|
||||||
for file in files:
|
async with ctx.channel.typing():
|
||||||
os.remove(f"{cache_dir}/{file}")
|
for file in files:
|
||||||
await ctx.send(f"{success}Cleaned up {len(files)}...\nShutting down...")
|
os.remove(f"{cache_dir}/{file}")
|
||||||
#await bot.close
|
await ctx.send(f"{warning}Cleaned up {len(files)} Files...\n\n{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")
|
||||||
|
|||||||
Reference in New Issue
Block a user