Extending
This page will cover how to extend the library to fit your needs
Overview
Until a proper plugin system can be written there is only one way to do this. And there is only one method worth changing.
This is the async FilterCommand.byPermission(commands, message)
function.
This takes in the message object to get detail about the author, and the array of commands, and returns a Promise containing the filtered list of commands.
Here is the original function
Overwrite
You can overwrite the above function by assigning an asynchronous function taking the commands
and message
arguments to client.djsCommandControl.FilterCommands.byPermission
where client
is your discord.js Client object
Last updated