Giter Club home page Giter Club logo

Comments (6)

HazirBot avatar HazirBot commented on June 10, 2024 2

might as well just throw in an enum
CommandBuilder#setRequiredRoles(RequiredRole role, String...)

where options are
RequiredRole.ANY
RequiredRole.ALL

from jda-utilities.

DManstrator avatar DManstrator commented on June 10, 2024

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.

from jda-utilities.

jagrosh avatar jagrosh commented on June 10, 2024

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.

from jda-utilities.

InfRandomness avatar InfRandomness commented on June 10, 2024

Yeah it's what I have done, I even started to write that in the API, I can pull request you if you want.

from jda-utilities.

jagrosh avatar jagrosh commented on June 10, 2024

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.

from jda-utilities.

InfRandomness avatar InfRandomness commented on June 10, 2024

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 ?

from jda-utilities.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.