Answers for "python if message contains then reply in discord"

1

python if message contains then reply in discord

@client.event
async def on_message(message):
  if message.author == client.user:
    return
  
  #MSG
  msg = message.content
  
  if any(word in msg for word in keyword):
    #reply
    await message.channel.send("ABC")

#keywords
keyword = ["1", "2", "3"]
Posted by: Guest on September-18-2021

Code answers related to "python if message contains then reply in discord"

Python Answers by Framework

Browse Popular Code Answers by Language