javascriptbotsslackgiphy

Invoke giphy search in slack nestor bot reply


The giphy plugin is in use in a Slack channel, would it be possible for the nestor bot reply to have a giphy search invoked by something like msg.reply('/giphy ' + text, done);


Solution

  • I found out they are not allowed here. I made a way around by using the superagent npm for ajax and the giphy api in my slackbot file like this:

      var url = 'https://api.giphy.com/v1/gifs/search?q=' + 'searchString' + '&api_key=dc6zaTOxFJmzC&rating=r';
      request.get(url).end( function(err, res) {
        // console.log(res.body.data)
        bot.reply(message, 'giphy for you ' +  searchString + giph);
    });
    

    Hope this helps