为什么我的 discord.py 机器人向错误消息发送消息?

时间:2021-07-30 11:19:43

标签: python python-3.x if-statement discord.py

当我发送类似 f 的消息时,它应该以 f 的形式发送消息,而不是向我发送 hello emoji idk 为什么。 谁能解释我为什么会这样? 这是那段错误的代码:-

@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

我不知道如何解释清楚。

Here is the output in discord

0 个答案:

没有答案