0.5.4 • Published 2 years ago

@gve/bot-commands v0.5.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 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.5.4

2 years ago

0.4.7

2 years ago

0.4.4

2 years ago

0.4.0

2 years ago

0.3.0

2 years ago