Answers for "discord py check if message is sent from bot"

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

python discord know message from bot

def on_message(self, message):
    if (message.author.bot):
        return #if this is true: then it is by a bot.
Posted by: Guest on January-24-2021

Code answers related to "discord py check if message is sent from bot"

Python Answers by Framework

Browse Popular Code Answers by Language