1.0.0 • Published 2 years ago

betterdiscord-plugin-notices v1.0.0

Weekly downloads
-
License
LICENSE.txt
Repository
github
Last release
2 years ago

BetterDiscord Plugin Notices Library

Library to assist in displaying notices in various locations for BetterDiscord plugins.

NPM

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;