An open API service indexing awesome lists of open source software.

https://github.com/mujz/slack-giphy-node

A simple node library that posts a random GIF to slack
https://github.com/mujz/slack-giphy-node

Last synced: 3 months ago
JSON representation

A simple node library that posts a random GIF to slack

Awesome Lists containing this project

README

        

# slack-giphy-node

A tiny library that does one thing; post a GIF to slack. Some example use cases include:
- Posting a notification to a deployment channel every time your app restarts,
- or posting a make it rain GIF every time you receive money through your app.

# Install

```bash
npm i slack-giphy-node
```

# Usage

Simply require the library in your app and pass your Giphy API key and Slack webhook URL to it:
```js
require('slack-giphy-node')({
giphyAPIKey: 'dc6zaTOxFJmzC',
webhookUrl: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'
});
```
You can also pass the following optional properties for extra control:

- `tag`: The GIF tag to limit randomness by.
- `rating`: Limit results to those rated (y,g, pg, pg-13 or r). Default is pg.
- `text`: Add a text to the slack message in addition to the GIF.