Answers for "python discord module how to detect if a particular person sent a message"

2

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
Posted by: Guest on January-25-2021
0

Detect Word Then Send Message (discord.py)

#New Event, prints oh wow if someone says wow
@client.event
async def on_message(message):

    if "wow" in message.content:
        await channel.send("oh wow")

#End of Event
Posted by: Guest on June-03-2021

Code answers related to "python discord module how to detect if a particular person sent a message"

Python Answers by Framework

Browse Popular Code Answers by Language