Skip to content

ivkos/botyo-command-showme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published