slack-machine
slack-machine copied to clipboard
feature request: slack commands
It might be part of your plans already, but it's actually continuation of the previous request. After adding the build in webserver, it might be possible to support slash commands with this bot as well. https://api.slack.com/slash-commands Please consider adding it.
I think it would be great to support this in the future. But in order to do this, Slack Machine must become a Slack app. Currently, Slack Machine is used as a Bot User, which is a legacy Custom Integration.
I want to convert Slack Machine to work as a proper Slack App, but I first want the core of Slack Machine to be battle tested, and provide a great experience :)
As a sidenote, it's interesting to think about what added value Slack commands offer over adding "commands" to your bot itself (which Slack Machine fully supports). So for example, what is the advantage of
/deploy myapp server1
over
@mybot deploy myapp server1
This is just an open question to which I don't know the answer yet.
To be clear, I want to support Slack Machine as a fully fledged Slack app regardless if Slack commands are a good idea or not, because then we can also support Dialogs, Buttons, Menus, etc.
Your last sentence is the main reason I want this. For my use case, finding the commands just by hitting slash, and then supporting dialogs and buttons of these commands.
You can use dialogs and buttons without slash commands. Then the only advantage of slash commands would be discoverability.
How can I use buttons? Could you give an example? The only way I found is if the bot was a slack app.
That is indeed the only way. To be honest, I haven't tested Slack Machine with a Slack App token instead of a custom bot token.
If Slack Machine does work as a Slack App, using buttons should be relatively straight forward. You can use Slack Machine's built-in webserver to receive the call-backs that are required for buttons to function.
We're deprecating legacy test tokens and will disallow the creation of new test tokens beginning May 5th, 2020.
Source: https://api.slack.com/changelog/2020-02-legacy-test-token-creation-to-retire
Update on this: since Slack Machine now fully supports being used as a Slack App (in fact, it's now the only way to use Slack Machine), I'm going to revisit this soon
This was implemented today. I will release a new version to pypi in the coming week
v0.33.0 was released