I was trying to make a bot that if a message had certain keywords in it, it would say "why would you say",themessage,"?" but it recognises it's own messages so i tried to fix that but it still does. Here is my code:
import discord
from discord import user
client = discord.Client()
keywords = ["help", "william", "William", "Monkey", "monkey", "Monkaee", "monkaee", "monkae","Monkae"]
@client.event
async def on_message(message):
for i in range(len(keywords)):
if keywords[i] in message.content:
message2 = "Why would you say", message.content, "?"
if message.author.id == "750809710739062804":
await message.channel.send("shut it botty", delete_after=5)
else:
await message.channel.send(message2, delete_after=5)
then my token but i'm not gonna put that in. the id is the bot's id so it shouldnt recognise its own message but it does