A Working mongoDB database, and the connection URI
What does this plugin do:
This plugin changes the default method that filters commands by permission and replaces it with a method that also checks a mongoDB collection named djs-cc-permissions which will automatically be created the first time you assign a permission to someone. The plugin also adds a category called permissions to the command handler that contains two commands addperm and removeperm which allows you to give and remove permissions to and from a user by their ID, so they do not need to share a guild with you.
Assuming you already have mongoose set up
// Let's assume you already have you djs-command-control instanciated
// and saved in a variable called `commands`.
// Let's also assume you have mongoose instantiated and connected
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
// Next is an array of all the custom permissions you want
// Next is optional mongo options of `MongoClientOptions` Type
// Finally we need to add the plugin to the command handler
Now you should see a category called "Permission Management" in your help command, and you should be able to assign any of the custom permissions you passed to the creater to any person, and any command!
This can not work with any other plugin that overwrites client.djsCommandControl.FilterCommands.byPermission