Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add role array support #1098

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

AppIe314
Copy link

@AppIe314 AppIe314 commented Mar 17, 2025

Minor change to make it a little better to handle lots of Discord permissions in the local.json file.
Previously we would have to define roles like this:

    "aliases": [
      {
        "role": "123",
        "name": "supporter-bronze"
      },
      {
        "role": "456",
        "name": "supporter-silver"
      },
      {
        "role": "789",
        "name": "supporter-gold"
      }

Now we can use an array to define a group of roles like this:

    "aliases": [
     {
       "role": ["123", "456", "789"],
       "name": "supporter"
}

This makes permissions easier to read and handle, especially with many roles across different servers:

"perms": {
      "iv": {
        "enabled": true,
        "trialPeriodEligible": false,
        "roles": ["supporter"]
      }

Tested on my own production instance.

Use ternary operator
@Mygod
Copy link
Collaborator

Mygod commented Mar 18, 2025

fix checks plz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants