1.0.0 • Published 2 years ago
betterdiscord-plugin-notices v1.0.0
BetterDiscord Plugin Notices Library
Library to assist in displaying notices in various locations for BetterDiscord plugins.
Installation
npm install betterdiscord-plugin-notices
Usage
This plugin should be compatible with both ESM and CJS.
To display a notice, use the createNotice
method. This method returns a number containing the internal ID of the notice.
Example
CJS
const { Notices } = require('betterdiscord-plugin-notices');
class Plugin {
load() {
this.notices = new Notices();
}
start() {
this.notices.createNotice({
type: 'default',
position: 'bottom-right',
text: 'This is a test notice',
});
}
}
module.exports = Plugin;
ESM
import { Notices } from 'betterdiscord-plugin-notices';
class Plugin {
load() {
this.notices = new Notices();
}
start() {
this.notices.createNotice({
type: 'default',
position: 'bottom-right',
text: 'This is a test notice',
});
}
};
export default Plugin;
1.0.0
2 years ago