// Let's assume you already have you djs-command-control instanciated
// and saved in a variable called `commands`.
// Let's also assume you have your mongoDB URI in a variable called `mongoURI`
// So now we need to fetch the plugin builder
const { MongoosePermissions } = require("djs-command-mongo");
// Now let's get the plugin to import
const permissionsPlugin = MongoosePermissions(mongoURI, // Passing our Mongo URI of type String
// The ID of the root user, this person can use any
// command on any server regardless of their permission level
rootAccount: process.env.ROOT_ACCOUNT_ID,
// Next is an array of all the custom permissions you want
permissions: ["DEV", "ADMIN", "MOD"],
// Next is optional mongo options of `MongoClientOptions` Type
// Finally we need to add the plugin to the command handler
commands.addPlugin(permissionsPlugin);