Skip to content

bdbch/cordlr-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordlr Plugin

Join the chat at https://gitter.im/Devcord/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

About

Cordlr plugin core to extend new plugins from.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •