Slash Commands - Allow a root or default command when using subcommands
I created a bunch of slash commands, using subcommands for my server
- /wallet help
- /wallet register
- /wallet unregister
- /wallet balance
They all work great, but the users are having a hard time with it.
In the chat I constantly see people just sending
Which of course, returns nothing.
My proposal would be to allow developers to make a "root" command on `/wallet`, or mark one of the subcommands as the default, in this case `/wallet help`
I think this would help the user experience a lot.
You can achieve this yourself. When checking which subcommand the user has sent, also check if they haven't used a subcommand. (i.e. if subcommand isn't provided OR 'help' subcommand is provided, send help information).
EDIT: Oopsie, must've skipped over the part in the docs which literally says this isn't possible.. Sorry!-1
Hi @Paul, sorry but this is not the case, when you register subcommands, the parent command its not registered.
Can you please provide an example if you have managed to achieve it somehow?2
Paul, please see the docs which clearly states this,
In order to get Slash Commands up and running with your app, you'll have to create the command itself, then prepare your app to be able to handle the interaction flow. We'll describe that flow in more detail in the steps below, but the basic pattern is:
- A user in Slack types in the message box with the command, and submits it.
- A payload is sent via an HTTP POST request to your app.
- Your app responds in some way.
That's all pretty orderly, so let's look at the recipe for making a great Slash Command.-1
Justin, thanks but I'm not looking for support on how to use slash commands. I'm requesting a new feature... That slash commands can have a root or default command as per the original message1
Please sign in to leave a comment.