Skip to content

feat: add role array support #1098

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

Merged
merged 2 commits into from
Mar 23, 2025
Merged

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

@AppIe314
Copy link
Author

yessir, just fixed the lint check

@Mygod Mygod merged commit e6886bf into WatWowMap:develop Mar 23, 2025
2 checks passed
Copy link

🎉 This PR is included in version 1.36.0-develop.15 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants