slack-machine icon indicating copy to clipboard operation
slack-machine copied to clipboard

feature request: slack commands

Open Tahvok opened this issue 6 years ago • 6 comments

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.

Tahvok avatar Feb 27 '18 12:02 Tahvok

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.

DonDebonair avatar Mar 01 '18 15:03 DonDebonair

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.

Tahvok avatar Mar 02 '18 00:03 Tahvok

You can use dialogs and buttons without slash commands. Then the only advantage of slash commands would be discoverability.

DonDebonair avatar Mar 02 '18 08:03 DonDebonair

How can I use buttons? Could you give an example? The only way I found is if the bot was a slack app.

Tahvok avatar Jun 24 '18 11:06 Tahvok

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.

DonDebonair avatar Jun 24 '18 16:06 DonDebonair

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

davidolrik avatar Mar 25 '20 16:03 davidolrik

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

DonDebonair avatar Nov 27 '22 13:11 DonDebonair

This was implemented today. I will release a new version to pypi in the coming week

DonDebonair avatar May 14 '23 22:05 DonDebonair

v0.33.0 was released

DonDebonair avatar May 15 '23 21:05 DonDebonair