Slack Interactive 消息菜单选择多个 [英] Slack Interactive message menu select multiple

查看:21
本文介绍了Slack Interactive 消息菜单选择多个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个功能,让用户可以从消息菜单中选择多个选项.是否可以同时从交互式菜单中选择多个选项??

I want to develop a feature such a way that user can select multiple options from message menu. Is it possible to select multiple options from the interactive menu at the same time ??

推荐答案

您目前只能选择一个选项.Slack 不支持在消息中选择多个选项.

You can currently only select one option. Slack does not support choosing more than one option in a message.

但是有两种选择:

对话框是模态的,允许您使用最多 10 个元素,每个元素包括选择菜单.他们有一个提交"和取消"按钮.

Dialogs are modal and allow you to use up to 10 elements each including select menus. And they have a "submit" and "cancel" button.

这允许您准确地实现您的要求,但您的选择将显示在单独的对话框窗口中,而不是直接作为消息的一部分.您还需要一些额外的功能来将对话框与您的消息连接起来,例如通过在打开对话框的消息中有一个按钮.

This allows you to implement exactly what you are asking, but your selects would be shown in a separate Dialog window and not directly as part of your message. You also need some extra functionality to connect the Dialog with your message, e.g. by having a button in the message that opens the Dialog.

查看这个答案 关于如何组合斜杠命令、按钮和对话框.

Check out this answer on how to combine slash commands, buttons and dialogs.

另一种选择是在多个消息中为用户一个接一个地链接选择.这可以通过在每次用户交互后用新消息替换原始发布的消息来实现.

Another alternative is to chain selects in multiple messages one after the other for the user. This can be done by replacing the original posted message with a new message after each user interactions.

因此,在用户选择第一个下拉菜单后,您的应用会向他显示第二个菜单,依此类推.最后,您将向用户显示提交或取消按钮.您当然也可以向工作流程添加一些功能,例如每一步都有一个取消按钮.

So after the user selected the first drop down your app shows him the 2nd menu and so on. Finally you would show the user a submit or cancel button. You can of course also add some functionality to the workflow, e.g. have a cancel button for every step.

查看这篇文章关于如何在用户点击选择后替换当前消息.

Check out this post on how to replace the current message after the user clicked on a select.

这篇关于Slack Interactive 消息菜单选择多个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆