当 post 设为频道的根目录时,Slack 机器人会弹出对话框并请求用户输入
Slack bot to popup dialog and request user input when post is made to channel's root
当 Slack 用户转到 post 频道根目录中的评论(不是作为对现有 post、a.k.a“线程”的回复)时,我想要 Slack弹出一个带有复选框列表的对话框,其中包含用户在允许接受 post 之前必须同意的项目列表。只有在他们核对完所有项目后,post 才会被 post 编辑。这样做是为了确保用户在 posting 之前了解频道的规则。这可能使用 Slack 的 API?
我认为 Slack 不支持这种方式。如果我没理解错的话,你要开一个modal when a user posts a message on a channel. In order to open a modal, Slack requires a parameter called trigger_id
. You receive a trigger_id
when you use any of the interactive components.
遗憾的是,发布消息本身不会生成 trigger_id
。 (这将被应用程序接收为 message event,其中不包含 trigger_id
)
另一种方法是当用户在频道上发布消息时使用 ephemeral message 或 DM 进行回复。此临时消息或 DM 可以包含一个交互式组件,如按钮,单击该按钮将打开一个模式。
此外,identify a threaded message 与直接在频道上发布消息相反,在消息事件中查找 thread_ts
参数。
当 Slack 用户转到 post 频道根目录中的评论(不是作为对现有 post、a.k.a“线程”的回复)时,我想要 Slack弹出一个带有复选框列表的对话框,其中包含用户在允许接受 post 之前必须同意的项目列表。只有在他们核对完所有项目后,post 才会被 post 编辑。这样做是为了确保用户在 posting 之前了解频道的规则。这可能使用 Slack 的 API?
我认为 Slack 不支持这种方式。如果我没理解错的话,你要开一个modal when a user posts a message on a channel. In order to open a modal, Slack requires a parameter called trigger_id
. You receive a trigger_id
when you use any of the interactive components.
遗憾的是,发布消息本身不会生成 trigger_id
。 (这将被应用程序接收为 message event,其中不包含 trigger_id
)
另一种方法是当用户在频道上发布消息时使用 ephemeral message 或 DM 进行回复。此临时消息或 DM 可以包含一个交互式组件,如按钮,单击该按钮将打开一个模式。
此外,identify a threaded message 与直接在频道上发布消息相反,在消息事件中查找 thread_ts
参数。