所以,我正在制作一个机器人,我想知道是否有一种方法可以使用如下命令重新启动它:我确实
p!restart
喜欢一个命令:
p!shutdown
但对于那些来这里寻找关闭命令的人来说,不知道如何重新启动:
async def shutdown(ctx):
id = str(ctx.author.id)
if id == 'your_id_here':
await ctx.send('Shutting down the bot!')
await ctx.bot.logout()
else:
await ctx.send("You dont have sufficient permmisions to perform this action!")```
Run Code Online (Sandbox Code Playgroud)