How can I make it so that slack bots can use Giphy?

后端 未结 2 1516
执笔经年
执笔经年 2021-02-19 01:41

For some reason, the existing Giphy app for slack does not allow bots to call a GIF from giphy.com

If I type \"/Giphy sad\", the Giphy app will automatically load a sad

2条回答
  •  生来不讨喜
    2021-02-19 02:11

    I'm assuming this is because giphy intentionally excluded bots from being able to call the command? Or is it that bots can't call commands in general?

    Bot users cannot invoke Slash commands. This is a restriction by Slack and not Giphy or any other integration. :(

    So if you want to get gifs from Giphy, you will have to implement that yourself using the Giphy API. Thankfully, the Giphy API is super easy to use. Giphy API

    In a recent hackathon project I built this for Slack, which you may find useful. It get's a random gif that is tagged "fail" from Giphy and then posts it as a message in Slack.

提交回复
热议问题