@cisco/bot-commands
v0.6.6
Published
Create responsive bot commands with ease
Downloads
29
Keywords
Readme
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 👋");
}
}