i want to make a bot that say bruh when your mesage is equal to the word in bruh.txt
my code:
bruh_file = open("bruh.txt", "r")
bruh_mo = [(line.strip()).split() for line in bruh_file]
bruh_file.close()
@client.event
async def on_message(message):
msg = message.content
if message.author == client.user:
return
if any(word in msg for word in bruh_mo):
await message.channel.send("bruh")
but when i try it , it did'nt responed and i get this:
Ignoring exception in on_message Traceback (most recent call last): File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event await coro(*args, **kwargs) File "main.py", line 53, in on_message if any(word in msg for word in bruh_mo): File "main.py", line 53, in if any(word in msg for word in bruh_mo): TypeError: 'in ' requires string as left operand, not list Ignoring exception in on_message Traceback (most recent call last): File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event await coro(*args, **kwargs) File "main.py", line 53, in on_message if any(word in msg for word in bruh_mo): File "main.py", line 53, in if any(word in msg for word in bruh_mo): TypeError: 'in ' requires string as left operand, not list 172.18.0.1 - - [30/Dec/2021 09:27:25] "HEAD / HTTP/1.1" 200 -
can someone help me