bots/giphy: Document the bot.

This commit is contained in:
Eeshan Garg 2017-10-09 15:57:12 -02:30 committed by showell
parent a8b858d78f
commit bd7db69bac
5 changed files with 42 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -0,0 +1,42 @@
# GIPHY bot
The GIPHY bot is a Zulip bot that can fetch a GIF associated with
a given keyword from [GIPHY](https://giphy.com/).
To use the GIPHY bot, you can simply call it with `@Giphy` followed
by a keyword, like so:
```
@Giphy hello
```
## Setup
Before you can proceed further, you'll need to go to the
[GIPHY Developers](https://developers.giphy.com/), and get a
GIPHY API key.
1. Click on the **Create an App** button on the top right corner.
2. Click on **Create an App** under the **Your Apps** section.
3. Enter a name and a description for your app and click on
**Create New App**.
4. And you're done! You should now have a GIPHY API key.
5. Open up `zulip_bots/bots/giphy/giphy.conf` in an editor and
and change the value of the `key` attribute to the API key
you generated above.
{!running-a-bot.md!}
## Usage
1. `@Giphy <keyword` - This command will fetch a GIF associated
with the given keyword. Example usage: `@Giphy hello`:
![](/static/generated/bots/giphy/assets/giphy-gif-found.png)
2. If a GIF can't be found for a given keyword, the bot will
respond with an error message:
![](/static/generated/bots/giphy/assets/giphy-gif-not-found.png)
3. If there's a connection error, the bot will respond with an
error message:
![](/static/generated/bots/giphy/assets/giphy-connection-error.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB