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

查看:143
本文介绍了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.

但是有2种选择:

对话框是模态的,最多允许您使用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天全站免登陆