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
- Host: GitHub
- URL: https://github.com/mujz/slack-giphy-node
- Owner: mujz
- License: mit
- Created: 2016-08-24T22:32:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-10T06:06:52.000Z (almost 9 years ago)
- Last Synced: 2024-04-23T20:54:33.456Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://npmjs.com/package/slack-giphy-node
- Size: 5.86 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.