Whenever i add an event, it disables all my commands, why does it do this? This is my code that i have so far. Is it because i have ctx AND message written and they just dont work together or what? This is not all of my code, this is only the part where im having trouble. Any help would be appreciated. Thanks!
@bot.event
async def on_message(message):
if message.author.id == bot.user.id:
return
msg_content = message.content.lower()
curseWord = ['badword', 'badword2']
if any(word in msg_content for word in curseWord):
await message.delete()
embed=discord.Embed(title="No No Word", description="Hey! Those words arent allowed here!", color=0x00FFFF)
await message.channel.send(embed=embed)
keep_alive()
bot.run(os.getenv('TOKEN'))