I am currently getting a CommandNotFound error when trying to call the command inside of this class. The message listener function is also not responding.
ERROR discord.ext.commands.bot Ignoring exception in command None
discord.ext.commands.errors.CommandNotFound: Command "black" is not found
I can't seem to see what I am doing wrong here...
class MyCog(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.Cog.listener()
async def on_message(self, message):
if message.content == "hello":
await message.channel.send("HI!")
@commands.command()
async def black(self, ctx):
await ctx.send("White!")
bot.add_cog(MyCog(bot))
bot.run(BOT_TOKEN)