1.0.5 • Published 2 years ago

@gcommands/plugin-blacklist v1.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Installation

Install with npm / yarn / pnpm:

npm install @gcommands/plugin-blacklist
yarn add @gcommands/plugin-blacklist
pnpm add @gcommands/plugin-blacklist

Informations

// index.js / LruCache Provider (recommended)
const { Plugins, GClient } = require('gcommands');
const { MongoDBProvider } = require('gcommands/dist/providers/MongoDBProvider');

const client = new GClient({
    database: new MongoDBProvider(process.env.mongodb_uri);
})

Plugins.search(__dirname);
const { BlacklistManager } = require('@gcommands/plugin-blacklist');

BlacklistManager.setBlacklist(client, userId, true); // blacklisted
BlacklistManager.setBlacklist(client, userId, false); // unblacklisted

If you have inhibitors in command, you need add new BlacklistInhibitor();