Hello I was creating a bot with a method in which it reads a list from a text file and if a user messages that word the bot would just ban or kick said user without needing a command to be typed out. It works with deletion so I made it similar with the ban or kick methods and there seems to be no error but the event doesn’t run, here is what I have and yes I put the read txt file in the code so it is reading the txt file but not kicking or banning.
@client.event
async def kick(member : discord.member,message):
for kickable_word in kickable_words:
if kickable_word in message.content:
await member.kick()
i also tried running it on the on_message(message) method but it sadly wont work