PermissionLevels

Permission Levels (aka PermStructure or Permission Structure)

Permission levels allow you to tailor your bot to only run commands for whomever you want. This structure is always ran when checking for commands, and is also ran when checking for things like: "Should this command that the user can't use be displayed
in the help menu?". Permission levels can do almost anything you want as long as you follow the structure correctly.

Permission Level 9 is a very special one. The difference between 9 and 10 is that we break on 9. Basically, breaking means that if you don't have the required permission level, Komada should respond back to you telling you that you can't use the command.
This allows you to have special interactions when certain people use the commands, such as silent admin commands.

Completely new Permission structure

If you want to completely get rid of the default permStructure and create your own, you will do this in the file that you declare a new Komada client. Here's a starting point that you can use.

And now that you've created your new permStructure with your new levels, all you need to do is let Komada know you want to use this one instead, and we do this by simply passing it as a configuration option, like so:

Please note that you will not be able to edit already existing permLevels in the default structure, so if you're looking to overwrite a default permission level you should check the other portion of this guide instead.

Final Words

That about sums up permission levels. If you're having issues with this or don't quite understand whats happening, I encourage you to read the documentation on PermissionLevels. If you still don't understand after reading the documentation, then hop on our Discord server and we'll be more than happy to explain to you what you don't understand.