I am trying to add a feature to my bot which would send messages if it detects a keyword. Such as, keyword = ["Hello There"] User: Hello There \Bot: Hi!
client = commands.Bot(command_prefix=".")
.
.
.
@client.event
async def on_message(ctx):
if ctx.author == client.user:
return
keywords = ["Hey","","Hi","Hello"]
channel = ctx.channel
for keyword in keywords:
if keyword.lower() in ctx.content.lower():
response = ("Hello sir!")
await channel.send(response)
I am using this code for that but whenever I add this part to my code, other commands fail to proccess however this and other events are totally working fine