So I was trying to make a shutdown command for my discord bot. I want to do this in case the token is released (I'm very careless) and the bot is hijacked by someone else and I am unavailable. The code I have written is below:
@commands.has_permissions(view_audit_log = True)
async def shutdown(ctx):
print('Bot is shutting down')
await ctx.send('@PercyJackson and @Berekyah the bot is being shut down')
exit()
I initially tried quit() but then tried exit(). The bot didn't work. Everything up to the last line is executed but the last line isn't.