botyo-command-showme
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

ShowMe Command for Botyo

npm npm npm

The ShowMe Command for Botyo returns the first few images found in Google Images matching a query.

Requirements

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.

Usage

#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.

Install

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();

Configuration

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

Package Sidebar

Install

npm i botyo-command-showme

Weekly Downloads

6

Version

2.0.0

License

Apache-2.0

Unpacked Size

23.6 kB

Total Files

10

Last publish

Collaborators

  • ivkos