Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hubot commands as /slash commands in slack #223

Closed
bhoomit opened this issue Aug 28, 2015 · 7 comments
Closed

Hubot commands as /slash commands in slack #223

bhoomit opened this issue Aug 28, 2015 · 7 comments

Comments

@bhoomit
Copy link

bhoomit commented Aug 28, 2015

Can we add selective hubot commands as /slash commands so we can use autocomplete?

@technicalpickles
Copy link
Contributor

Slash commands are manually configured from the Team settings 😓 Another problem is that the output of Slash commands is only visible to the user using it, which might not always be what you want.

Hubot includes expressjs so you could make a http listener for receiving a Slash command, and configure it yourself.

@bhoomit
Copy link
Author

bhoomit commented Sep 10, 2015

Look at the implementation of "Room" integration. They are able to add
/room without user's intervention.

On Thu, Sep 10, 2015 at 12:52 AM, Josh Nichols notifications@github.com
wrote:

Slash commands are manually configured from the Team settings [image:
😓] Another problem is that the output of Slash commands is only
visible to the user using it, which might not always be what you want.

Hubot includes expressjs http://expressjs.com/ so you could make a http
listener https://hubot.github.com/docs/scripting/#http-listener for
receiving a Slash command, and configure it yourself.


Reply to this email directly or view it on GitHub
#223 (comment)
.

Thanks & Regards,
Bhoomit Vasani | SE @ Mygola
Just launched "Perfect Day"
https://itunes.apple.com/us/app/perfect-day-in-singapore-better/id905943013
91-8892949849

@technicalpickles
Copy link
Contributor

There is /giphy too which posts publicly. But you can't do that for your own integrations or slash commands as far as I can tell.

On Sep 10, 2015, at 2:21 AM, Bhoomit notifications@github.com wrote:

Look at the implementation of "Room" integration. They are able to add
/room without user's intervention.

On Thu, Sep 10, 2015 at 12:52 AM, Josh Nichols notifications@github.com
wrote:

Slash commands are manually configured from the Team settings [image:
😓] Another problem is that the output of Slash commands is only
visible to the user using it, which might not always be what you want.

Hubot includes expressjs http://expressjs.com/ so you could make a http
listener https://hubot.github.com/docs/scripting/#http-listener for
receiving a Slash command, and configure it yourself.


Reply to this email directly or view it on GitHub
#223 (comment)
.

Thanks & Regards,
Bhoomit Vasani | SE @ Mygola
Just launched "Perfect Day"
https://itunes.apple.com/us/app/perfect-day-in-singapore-better/id905943013
91-8892949849

Reply to this email directly or view it on GitHub.

@technicalpickles
Copy link
Contributor

I'm pretty sure official integrations can do more than just Slash commands. Basically, Slack would need to support more options for Slash commands before this could be done 😓

@farski
Copy link

farski commented Nov 6, 2015

Slash commands have been updated:

"In Channel" vs "Ephemeral" responses
By default, the responses sent to commands will only be visible to the user that issued the command (we call these "ephemeral" messages). However, if you would like the response to be visible to all members of the channel in which the user typed the command, you can add a response_type of in_channel to the JSON response

(Not that that necessarily makes OP's request any easier)

@technicalpickles
Copy link
Contributor

I actually had an idea: just register a single Hubot slash command, and then pass the arguments. That combined with In Channel should get the desired effect.

Although, then it gets complicated, because does sending a message back from a slash command have parody with using chat.postMessage? Would scripts need to be developed for one or the other? Should hubot commands be able to specify they are ephemeral?

@DEGoodmanWilson
Copy link

Slash commands are such different beasts from bots (and Hubot is definitely, in Slack terminology, a bot), that I'm tempted to call this out of scope for this project. Slash commands could be implemented using Express in parallel with the rest of Hubot, and I believe this would be the right way to do this, rather than torturing Hubot to accommodate the very different mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants