How I can add a self argument here?
This is a function for a discord bot, it counts bad words in the BadWords
variable, but the console shows me "TypeError: on_message() takes 0 positional arguments but 1 was given". Here is the code:
@bot.event
async def on_message(self):
BadWords = ["*Bad words string*"]
if message.content == BadWords:
await ctx.send("Uh Oh, wacth your vocabulary")
Solution 1:
You should add an argument to your method:
async def on_message(self, message):