After adding an on_message, the rest of my commands stop working. I've seen this question be asked before, I tried adding await client.process_commands(message)
, that fixed it, but after changing a few things around, it stopped working. This is supposed to detect blacklisted words, delete them, then delete the message after.
@client.event
async def on_message(message):
if message.author.bot: return
message.content = message.content.lower().replace(' ', '')
if "example1" in message.content or "example2" in message.content or "example3" in message.content or "example4" in message.content:
await message.delete()
await message.channel.send(f"{message.author.mention} That word is not allowed!", delete_after=1.5)
await message.delete()
await client.process_commands(message)
question from:https://stackoverflow.com/questions/65854694/discord-py-on-message-breaking-rest-of-commands