|
1 | 1 | # xkcd bot
|
2 | 2 |
|
3 |
| -xkcd bot is a Zulip bot that can fetch a comic strip from xkcd. To use xkcd |
4 |
| -bot you can simply call it with `@xkcd` followed by a command. Like this: |
| 3 | +xkcd bot is a Zulip bot that can fetch a comic strip from xkcd. To use |
| 4 | +the xkcd bot, you can simply call it with `@xkcd` followed by a command, |
| 5 | +like so: |
5 | 6 |
|
6 | 7 | ```
|
7 | 8 | @xkcd <command>
|
8 | 9 | ```
|
9 | 10 |
|
10 |
| -xkcd bot has four commands: |
11 |
| - |
12 |
| -1. `help` |
13 |
| -This command is used to list all commands that can be used with this bot. |
14 |
| -You can use this command by typing `@xkcd help` in a stream. |
15 |
| - |
16 |
| - |
17 |
| -2. `latest` |
18 |
| -This command is used to fetch the latest comic strip from xkcd. You can use |
19 |
| -this command by typing `@xkcd latest` in a stream. |
20 |
| - |
21 |
| - |
22 |
| -3. `random` |
23 |
| -This command is used to fetch a random comic strip from xkcd. You can use |
24 |
| -this command by typing `@xkcd random` in a stream, xkcd bot will post a |
25 |
| -random xkcd comic strip. |
26 |
| - |
27 |
| - |
28 |
| -4. `<comic_id>` |
29 |
| -To fetch a comic strip based on id, you can directly use `@xkcd <comic_id>`, |
30 |
| -for example if you want to fetch a comic strip with id 1234, you can type |
31 |
| -`@xkcd 1234`, xkcd bot will post a comic strip with id 1234. |
32 |
| - |
33 |
| - |
34 |
| -If you type a wrong command to xkcd bot, xkcd bot will post information |
35 |
| -you'd get from `@xkcd help`. |
36 |
| - |
37 |
| - |
38 |
| -And if you type a wrong id, xkcd bot will post a message that an xkcd comic |
39 |
| -strip with that id is not available. |
40 |
| - |
| 11 | +{!running-a-bot.md!} |
| 12 | + |
| 13 | +## Usage |
| 14 | + |
| 15 | +The xkcd bot has four commands: |
| 16 | + |
| 17 | +1. `help` - This command is used to list all commands that can be used |
| 18 | + with this bot. Example usage: `@xkcd help`: |
| 19 | +  |
| 20 | + |
| 21 | +2. `latest` - This command is used to fetch the latest comic strip from |
| 22 | + xkcd. Example usage: `@xkcd latest`: |
| 23 | +  |
| 24 | + |
| 25 | +3. `random`- This command is used to fetch a random comic strip from xkcd. |
| 26 | + Example usage: `@xkcd random`: |
| 27 | +  |
| 28 | + |
| 29 | +4. `<comic_id>` - To fetch a comic strip based on ID, you can supply the |
| 30 | + ID to the bot as a parameter (`@xkcd <comic_id>`). For example, if you |
| 31 | + want to fetch a comic strip with ID 1234, type `@xkcd 1234`: |
| 32 | +  |
| 33 | + If the ID requested doesn't exist, the bot will post a message that |
| 34 | + the comic strip associated with that ID is not available, like so: |
| 35 | +  |
| 36 | + |
| 37 | +5. If you type a command that isn't recognized by the bot, it will respond |
| 38 | + the information printed by the `@xkcd help` command: |
| 39 | +  |
0 commit comments