interactive bots: Create xkcd bot.
This commit is contained in:
parent
2a8c57d77a
commit
db39b52d3f
8 changed files with 171 additions and 0 deletions
40
contrib_bots/lib/xkcd/docs.md
Normal file
40
contrib_bots/lib/xkcd/docs.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# 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.
|
||||

|
BIN
contrib_bots/lib/xkcd/xkcd-help.png
Normal file
BIN
contrib_bots/lib/xkcd/xkcd-help.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
contrib_bots/lib/xkcd/xkcd-latest.png
Normal file
BIN
contrib_bots/lib/xkcd/xkcd-latest.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
BIN
contrib_bots/lib/xkcd/xkcd-random.png
Normal file
BIN
contrib_bots/lib/xkcd/xkcd-random.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
BIN
contrib_bots/lib/xkcd/xkcd-specific-id.png
Normal file
BIN
contrib_bots/lib/xkcd/xkcd-specific-id.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
BIN
contrib_bots/lib/xkcd/xkcd-wrong-command.png
Normal file
BIN
contrib_bots/lib/xkcd/xkcd-wrong-command.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
BIN
contrib_bots/lib/xkcd/xkcd-wrong-id.png
Normal file
BIN
contrib_bots/lib/xkcd/xkcd-wrong-id.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Loading…
Add table
Add a link
Reference in a new issue