Answers for "discord.py how to detect if message contains"

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
1

discord.py check if message has certain reaction

emoji = "" # some emoji as a string
if any(reaction.emoji == emoji for reaction in message.reactions):
	# there is at least one reaction of the specified emoji
Posted by: Guest on May-30-2021

Code answers related to "discord.py how to detect if message contains"

Python Answers by Framework

Browse Popular Code Answers by Language