Python 类型为'的参数;文本频道';这是不可容忍的

Python 类型为'的参数;文本频道';这是不可容忍的,python,discord,discord.py,discord.py-rewrite,Python,Discord,Discord.py,Discord.py Rewrite,因此,我试图在消息上做一个事件,当有人在特定频道说了什么,机器人会对该消息做出类似和不喜欢的表情反应,但我一直在标题中看到错误 async def on_message(message): await client.process_commands(message) channel = client.get_channel(738118906475970640) if message.content in channel: await message.add_reaction

因此,我试图在消息上做一个
事件,当有人在特定频道说了什么,机器人会对该消息做出类似和不喜欢的表情反应,但我一直在标题中看到错误

async def on_message(message):
  await client.process_commands(message)
  channel = client.get_channel(738118906475970640)
  if message.content in channel:
    await message.add_reaction("Your problem is, that u try to check if a string (message.content) is in a discord.TextChannel object (channel).

I think you are searching for something like

async def on_message(message):
    if message.channel.id == 738118906475970640:
       # react to these emojis
async def on_消息(消息):
等待客户端处理命令(消息)
通道=客户端获取通道(738118906475970640)
如果频道中有message.content:

wait message.add_reaction(“您的问题是,您试图检查discord.TextChannel对象(通道)中是否有字符串(message.content)

我想你正在寻找类似的东西