0.6.6 • Published 3 years ago

@cisco/bot-commands v0.6.6

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

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

0.6.6

3 years ago

0.6.5

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.4

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago