Python 如何生成一个注销bot的命令,以及一个登录bot的命令?

Python 如何生成一个注销bot的命令,以及一个登录bot的命令?,python,Python,我正在尝试编写一个命令来注销bot,也可以让它登录。运行bot时,会弹出此错误:discord.ext.commands.errors.CommandNotFound:未找到命令“stop” 我在想这样的事情会管用的: @bot.command() async def stop(ctx): await ctx.channel.send("stati pe cur si bagati un reading pana ma intorc") #the message wh

我正在尝试编写一个命令来注销bot,也可以让它登录。运行bot时,会弹出此错误:discord.ext.commands.errors.CommandNotFound:未找到命令“stop”

我在想这样的事情会管用的:

@bot.command()
async def stop(ctx):
    await ctx.channel.send("stati pe cur si bagati un reading pana ma intorc") #the message when the bot leaves
    await bot.logout()