Permissions Plugin
This plugin is included in the library, and adds a whole custom permission system to the above commands handler. This plugin is called `Mongoose Permissions` since it uses mongoose internally
Requirements
djs-command-control:
^1.5.2
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.
Usage
Setup
Assuming you already have mongoose set up
Assuming you do not already have a mongoose instance
Thats it!
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!
Limitations:
This can not work with any other plugin that overwrites
client.djsCommandControl.FilterCommands.byPermission
Useful to know
The mongoose model can by required like this:
Last updated