我正在制作一个 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")