@gcommands/plugin-blacklist
v1.0.5
Published
Easy to use blacklist system
Downloads
47
Maintainers
Readme
GCommands Plugin Blacklist
Official plugin for GCommands
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();