I'm making a python Discord Bot and now i'm trying to make him respond to a certain message within a list, but there are some issues, because he only respond when the message starts the text (not in the middle or end). So i want to figure out how to make him compare all the text and match with the messages list, sending a text answer.
Python 3.8.2
Code:
import discord
from discord.ext import commands
from discord.ext.commands import Bot
import asyncio
bot = commands.Bot(command_prefix = "$")
phrases = ["QWACK","KWAK","AARK","KWAAAK"]
@bot.event
async def on_ready():
print ("I'm ready!")
@bot.event
async def on_message(message):
if str(phrases) in message.content:
await message.channel.send("dhbang")