Slack有触发命令的方法吗?

发布于 2025-01-26 12:46:18 字数 333 浏览 1 评论 0 原文

我为我的创业公司建造了一个Slackbot。我想触发/poll 之类的东西。使用 client.chat_postmessage 帖子,而无需触发命令即可作为纯文本。我试图关注的poll命令,但由于该方法不再存在,因此无用。

I built a slackbot for my startup. I would like to trigger things like /poll. Using client.chat_postMessage posts rather as plain text without triggering the command. I tried to follow How do you invoke the /poll command using the Slack API?, but of no use since that method doesn't exist anymore.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无人接听 2025-02-02 12:46:18

Slack提供了某些类型的互动触发器:

  1. 时间表
  2. 外部服务事件发起的
  3. 交互作用API推动
  4. 用户调用

https://api.slack.com/interactivitivity#triggers

由于您已经提到了 chat.postmessage
您可能想研究 Block套件中的交互性(用户调用)

https://api.slack.com/block-kit/interactivity

There are certain types of interaction triggers provided by slack:

  1. Interactions that happen on a schedule
  2. Interactions initiated by external services
  3. Events API pushes
  4. User invocation

https://api.slack.com/interactivity#triggers

Since you have mentioned about chat.PostMessage,
you might want to look into Interactivity in Block Kit (User Invokation)

https://api.slack.com/block-kit/interactivity

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文