how to use check on a on_message discord.py code example
Example 1: 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
Example 2: on message discord py
@bot.event
async def on_message(message):
if message.content == "pong":
await message.channel.send('ping')