cordlr-plugin

0.0.6 • Public • Published

Cordlr Plugin

Installation

npm i cordlr-plugin --save

Usage

Reply to a message

const CordlrPlugin = require('cordlr-plugin')
 
class MyPlugin extends CordlrPlugin {
  constructor (bot, config) {
    super(bot, config)
 
    // Bot meta data
  }
 
  myFunction (message, args, flags) {
    this.sendReply(message, 'My reply')
  }
}

Reply to a message via private message

const CordlrPlugin = require('cordlr-plugin')
 
class MyPlugin extends CordlrPlugin {
  constructor (bot, config) {
    super(bot, config)
 
    // Bot meta data
  }
 
  sendMeAPrivateMessage (message, args, flags) {
    this.sendPrivateReply(message, 'My private reply')
  }
}

More examples in the documentation

Readme

Keywords

Package Sidebar

Install

npm i cordlr-plugin

Weekly Downloads

8

Version

0.0.6

License

MIT

Last publish

Collaborators

  • d2k