'TextChannel' 类型的参数不可迭代

argument of type 'TextChannel' is not iterable

所以我正在尝试制作一个 on_message 事件,当有人在特定频道中说某事时,机器人会对该消息做出喜欢和不喜欢的表情符号的反应,但我一直在标题中收到错误消息.

async def on_message(message):
  await client.process_commands(message)
  channel = client.get_channel(738118906475970640)
  if message.content in channel:
    await message.add_reaction("")
    await message.add_reaction("")

您的问题是,您尝试检查字符串 (message.content) 是否在 discord.TextChannel 对象(通道)中。

我认为您正在搜索类似

的内容
async def on_message(message):
    if message.channel.id == 738118906475970640:
       # react to these emojis