vendredi 30 juillet 2021

why my discord.py bot is sending messages to wrong messages?

when I send a message like f then it should send message as f instead of that it sends me hello emoji idk why. Can anyone explain me why is that happening? Here is that faulty piece of code:-

@client.event
async def on_message(message):
  msg = message.content

  if message.author.id == 860161020681388093:
    pass
    
  elif "hello" or "hi" == msg:
    await message.channel.send("<a:hello:869245119780491275>")

  elif "f" == msg:
    await message.channel.send("f")

  elif "pog" in msg:
    await message.channel.send("<:NN_Poggers:852865363926450177>")

  else:
    pass

I don't know how to explain it clearly.

Here is the output in discord

Aucun commentaire:

Enregistrer un commentaire