@cisco/bot-commands

0.6.6 • Public • Published

Bot commands

Create responsive bot commands with ease.

Installation

Install with npm.

npm i @gve/bot-commands

Usage

const { Command } = require("@gve/bot-commands");

const phrases = ["hello", "hi", "hey"];

class Hello extends Command {
  constructor(intent = "hello", config = { phrases }) {
    super(intent, config);
    this.handleText = this.sayHello.bind(this);
  }

  async sayHello(bot, message) {
    await bot.say("Hello 👋");
  }
}

License

Apache 2.0

Readme

Keywords

none

Package Sidebar

Install

npm i @cisco/bot-commands

Weekly Downloads

2

Version

0.6.6

License

Apache-2.0

Unpacked Size

28.5 kB

Total Files

17

Last publish

Collaborators

  • cisco-service
  • detiber
  • gveappsupport
  • mattnorris