zulip/contrib_bots/bots/xkcd
neiljp ac7c5f51e2 contrib_bots: Add tests for xkcd bot. 2017-05-28 17:59:54 -07:00
..
assets contrib_bots: Restructure bots to follow a consistent structure. 2017-02-10 06:44:03 -08:00
__init__.py bots: Add __init__.py so bot modules can be imported. 2017-05-25 15:00:51 -07:00
readme.md contrib_bots: Restructure bots to follow a consistent structure. 2017-02-10 06:44:03 -08:00
test_xkcd.py contrib_bots: Add tests for xkcd bot. 2017-05-28 17:59:54 -07:00
xkcd.py contrib_bots: Update xkcd bot to use send_reply. 2017-05-23 18:43:43 -07:00

readme.md

xkcd bot

xkcd bot is a Zulip bot that can fetch a comic strip from xkcd. To use xkcd bot you can simply call it with @xkcd followed by a command. Like this:

@xkcd <command>

xkcd bot has four commands:

  1. help
    This command is used to list all commands that can be used with this bot. You can use this command by typing @xkcd help in a stream.

  2. latest
    This command is used to fetch the latest comic strip from xkcd. You can use this command by typing @xkcd latest in a stream.

  3. random
    This command is used to fetch a random comic strip from xkcd. You can use this command by typing @xkcd random in a stream, xkcd bot will post a random xkcd comic strip.

  4. <comic_id>
    To fetch a comic strip based on id, you can directly use @xkcd <comic_id>, for example if you want to fetch a comic strip with id 1234, you can type @xkcd 1234, xkcd bot will post a comic strip with id 1234.

If you type a wrong command to xkcd bot, xkcd bot will post information you'd get from @xkcd help.

And if you type a wrong id, xkcd bot will post a message that an xkcd comic strip with that id is not available.