【问题标题】:Cannot delete message in IM channel as Slack bot无法将 IM 频道中的消息作为 Slack 机器人删除
【发布时间】:2019-05-06 02:08:38
【问题描述】:

我正在尝试在“用户”频道上使用 chat.delete,就像您使用 chat.postMessage 一样,但是我不断收到 channel_not_found 错误。

slack.api_call(
        "chat.delete",
        channel=userID, # Exact same value as used with chat.postMessage
        ts=ts
    )

这是他们 API 的限制吗?有没有办法做到这一点?

【问题讨论】:

    标签: slack slack-api


    【解决方案1】:

    原来chat.postMessage 在寻址单个用户时将使用 SlackBot 频道。通过 IM 与用户通信的正确方法是使用conversations.open。当我使用它时,一切都按预期工作。

    【讨论】:

    猜你喜欢
    • 2017-09-02
    • 2018-01-08
    • 2018-05-16
    • 2017-04-27
    • 1970-01-01
    • 1970-01-01
    • 2018-06-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多