在 Slack 中,应用程序是否可以通过显示选择器弹出窗口来响应斜杠命令?

In Slack, is it possible for an app to respond to a slash command by displaying a picker popup?

例如,假设我想编写一个应用程序,当用户在频道中输入 /movie 时,会显示一个热门电影列表,用户选择一个,结果 link IMDB 中的那部电影作为文本插入到频道中。这样的事情可能吗?

非常感谢。

这是可能的!斜杠命令是进一步交互的容器。您可以让斜杠命令触发模式(https://api.slack.com/surfaces/modals).Your modal would offer a list of options and once the user submits, your app will be notified with a view_submission payload. You can test modal payloads using the Block Kit Builder,其中包括列出项目的选项。