Relevant conversation in BeepBoopHQ Slack channel:
kingofzeal [8:57 AM] so I'm trying to get my (Slapp-based) bot to trigger another slash command (in this case, Giphy), and it looks like I can do that using an undocumented slack.chat.command, but it doesn't look like I have access to the slack object... Is there any way of accomplishing this with Slapp?
brad.harris [1:12 PM] hmm, haven’t heard of that api, have been told you can’t trigger a slash command from a bot. Slapp uses this slack client internally, and exposes it via slapp.client: https://github.com/smallwins/slack
It doesn’t surface that api though. You’d probably have to make a custom http request to that endpoint. If you get it to work would love to hear.
or use the intenal exec fn that client has by requiring it explicitly - let exec = require('slack/src/_exec')https://github.com/smallwins/slack/blob/master/src/_exec.js
For some added fun, see if we can make the bot automatically call
/giphy [color] [value]
after each play.Should be toggleable.
Initial tests aren't successful, but might have a way via
http://stackoverflow.com/questions/40919745/how-do-you-invoke-the-poll-command-using-the-slack-api
Relevant conversation in BeepBoopHQ Slack channel:
kingofzeal [8:57 AM] so I'm trying to get my (Slapp-based) bot to trigger another slash command (in this case, Giphy), and it looks like I can do that using an undocumented
slack.chat.command
, but it doesn't look like I have access to theslack
object... Is there any way of accomplishing this with Slapp?brad.harris [1:12 PM] hmm, haven’t heard of that api, have been told you can’t trigger a slash command from a bot. Slapp uses this slack client internally, and exposes it via
slapp.client
: https://github.com/smallwins/slack It doesn’t surface that api though. You’d probably have to make a custom http request to that endpoint. If you get it to work would love to hear. or use the intenalexec
fn that client has by requiring it explicitly -let exec = require('slack/src/_exec')
https://github.com/smallwins/slack/blob/master/src/_exec.jskingofzeal [2:04 PM] I'm getting it from here - http://stackoverflow.com/questions/40919745/how-do-you-invoke-the-poll-command-using-the-slack-api (and from other places) that you can. Like I said, it just uses an undocumented API call (https://github.com/ErikKalkoken/slackApiDoc/blob/master/chat.command.md) stackoverflow.com