https://github.com/bdbch/cordlr-plugin
Cordlr plugin core to extend new plugins from.
https://github.com/bdbch/cordlr-plugin
Last synced: 9 days ago
JSON representation
Cordlr plugin core to extend new plugins from.
- Host: GitHub
- URL: https://github.com/bdbch/cordlr-plugin
- Owner: bdbch
- Created: 2017-03-10T22:34:18.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-18T09:57:09.000Z (almost 9 years ago)
- Last Synced: 2025-09-26T06:24:52.736Z (9 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cordlr Plugin
[](https://gitter.im/Devcord/cordlr-plugin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
## Installation
```js
npm i cordlr-plugin --save
```
## Usage
Reply to a message
```js
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
```js
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](docs/)