node.js - Slack slash commands - show user-entered text? -


i'm working slack slash commands api, , works swimmingly bot (https://github.com/jesseditson/slashbot) far, except 1 thing:

in other slash integrations (for instance giphy), when user types slash command, command output public chat, response posted:

giphy integration http://oi.pxfx.io/image/0h0n0l1q2e0e/screen%20recording%202015-07-23%20at%2001.47%20pm.gif

however when use custom slash command, original command not output @ all:

no message http://oi.pxfx.io/image/061t2v402x10/screen%20recording%202015-07-23%20at%2001.49%20pm.gif

i'm using incoming webhooks api post messages channel, works ok, responses disembodied , lacking context without original request.

what i'd do:

  1. a user types /command
  2. that command echoed out chat room message can see (preferably if return 2xx url slash command hits)
  3. the response posted either inline, or via incoming webhook (either works me, having both option preferable)

this appears possible via whatever giphy uses integrate, leaves me questions:

  • is giphy using private api, or have missed correct api emulate behavior?

  • is there setting missed allow this?

i'm using node.js, i'm more interested in if possible @ all, language aside.


as side note, realize use bot api or real time messaging api achieve similar, without slash - however, documentation options , autocomplete comes slash commands, that's i'm after question.

unfortunately slack doesn't offer option echo /command channel @ moment, /giphy unique in-house integration.

the option create slack api app , have users individually auth. following use of /command post original /command message channel chat.postmessage, post incoming webhook message.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -