忽略命令 None 中的异常:discord.ext.commands.errors.CommandNotFound:未找到命令“test”

时间:2021-07-14 10:10:10

标签: python discord.py

我正在制作一个 discord.py 机器人,但我刚刚进入了齿轮。当我按照说明运行它时,机器人在线但当我测试“测试”命令时,它只给我Ignoring exception in command None: discord.ext.commands.errors.CommandNotFound: Command "test" is not found

代码如下:

from discord.ext import commands
bot = commands.Bot(command_prefix="cool!")

class itsumi(commands.Cog):
  """sure"""
  def __init__(self, bot: commands.Bot):
    self.bot = bot
  

 
@commands.command(name="test")
async def test(self, ctx: commands.Context):
  await ctx.send("your skin is freezing")
  
bot.add_cog(itsumi(bot))

bot.run("TOKEN")

0 个答案:

没有答案