The ShowMe Command for Botyo returns the first few images found in Google Images matching a query.
You need to set up a Google Custom Search Engine to use this module. To do so, please refer to the instructions provided for the google-images module. Make a note of the CSE ID and the API key as you will need these for the module configuration.
#showme [number of images] <query>
For example:
#showme cat
- Shows you a picture of a cat.#showme 3 cats
- Shows you three pictures of cats.#showme "3 cats
" - Shows you a picture of three cats.
Step 1. Install the module from npm.
npm install --save botyo-command-showme
Step 2. Register the module.
import Botyo from "botyo";
import ShowMeCommand from "botyo-command-showme"
Botyo.builder()
...
.registerModule(ShowMeCommand)
...
.build()
.start();
modules:
ShowMeCommand:
defaultImageCount: 1 # how many images to return if not specified
maxImageCount: 9 # max number of images to return
cseId: YOUR_CSE_ID
cseApiKey: YOUR_CSE_API_KEY