在 slack nestor 机器人回复中调用 giphy 搜索
Invoke giphy search in slack nestor bot reply
giphy 插件正在 Slack 频道中使用,内斯特机器人回复是否有可能通过 msg.reply('/giphy' + text, done) 之类的东西调用 giphy 搜索;
我发现他们不被允许here。
我通过在我的 slackbot 文件中使用 superagent npm for ajax and the giphy api 来解决这个问题:
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);
});
希望对您有所帮助
giphy 插件正在 Slack 频道中使用,内斯特机器人回复是否有可能通过 msg.reply('/giphy' + text, done) 之类的东西调用 giphy 搜索;
我发现他们不被允许here。 我通过在我的 slackbot 文件中使用 superagent npm for ajax and the giphy api 来解决这个问题:
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);
});
希望对您有所帮助