Open b-ncMN opened 5 years ago
Yeah, CommandBuilder#setRequiredRoles(String...)
or CommandBuilder#setRequiredRoles(Role...)
sounds like a good idea. Why not considering making a PR for that? It is kinda a breaking change so better wait for jag or somebody to confirm that tho.
The concept of a required role is a very basic one; if you need more fine-tuned permissions, I would recommend writing your specifically-needed permissions checks into a Category.
Yeah it's what I have done, I even started to write that in the API, I can pull request you if you want.
I don't really think it would be good to replace the base system we have now because it would be confusing whether a user was required to have all of the required roles or any of the required roles.
Oh yeah, I did not thinked about that, well, personally it's more convenient to check if the user have any of the roles. And why not just creating both of them and commenting them to describe to avoid that to happen ?
might as well just throw in an enum CommandBuilder#setRequiredRoles(RequiredRole role, String...)
where options are RequiredRole.ANY RequiredRole.ALL
Suggestion
Add a way to set multiple requiredRole when creating a command.