【发布时间】:2020-07-30 19:29:29
【问题描述】:
所以,我正在制作一个机器人,我想知道是否有办法使用以下命令重新启动它:
p!restart
我确实喜欢一个命令:
p!shutdown
但不知道如何重启,对于那些来这里寻找关机cmd的人:
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!")```
【问题讨论】:
标签: python discord.py restart shutdown