how to check if a message includes a word discord.py

@bot.event
async def on_message(msg):
    if 'word' in msg.content:
        print('Keyword found')
        # Do stuff here

Here is what the above code is Doing:
1. When the bot sees a message that contains the word ‘word’, it will print ‘Keyword found’ to the console.
2. You can replace the word ‘word’ with any word you want.
3. You can also add more conditions to the if statement. For example, you can check if the message is from a specific user.
4. You can also add more actions to the if statement. For example, you can make the bot reply to the message.

Here’s an example of how you can make the bot reply to the message:

@bot.event
async def on_message(msg):
if ‘word’ in msg.content:
print(‘Keyword found’)
await bot.send_message(msg.channel, ‘I found the keyword!’)