微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何使用 Slack API 删除特定频道中的任何消息?

如何解决如何使用 Slack API 删除特定频道中的任何消息?

当我运行 chat.delete 方法时,

const result = await slackClient.chat.delete({
      channel: channelId,ts: eventTs,as_user: true
    });

我收到 (node:82291) UnhandledPromiseRejectionWarning: Error: An API error occurred: cant_delete_message 错误

{
  code: "slack_webapi_platform_error",data: {
    ok: false,error: "cant_delete_message",response_Metadata: {
      scopes: ["identify","channels:write","chat:write"],acceptedScopes: ["chat:write"]
    }
  }
}

知道出了什么问题吗?

我的另一个选择是除非满足某些条件,否则防止将任何消息发送到特定频道...

这是我的范围:

enter image description here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。