@gve/bot-commands
v0.5.4
Published
Create responsive bot commands with ease
Downloads
7
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 👋");
}
}