LuckPerms Contexts
Allows permissions/groups/prefixes/etc to be assigned easily based on certain DiscordSRV states.
More information about contexts can be found here: https://luckperms.net/wiki/Context
Available contexts:
discordsrv:linked- whether the player has linked a Discord account (true/false)discordsrv:boosting- whether the player is boosting the Discord guild (true/false)discordsrv:role- the role the user has in Discorddiscordsrv:role_id- the role id the user has in Discorddiscordsrv:server_id- whether the user is a member of the server with the given id (which the bot is also a part of)
Is a user fulfilling the LP context in /lp user <user> info but not actually receiving the group?
If a user seems to be fulfilling the LuckPerms context in /lp user <user> info but they don't get their primary group set when adding a higher weighted parent with the relevant context then set primary-group-calculation to all-parents-by-weight in the LuckPerms config.
Examples
- discordsrv:linked
- discordsrv:boosting
- discordsrv:role
- discordsrv:role_id
- discordsrv:server_id
| Command | Explanation |
|---|---|
/lp group default permission set essentials.fly true discordsrv:linked=true | will give all users access to /fly if they have their account linked to Discord |
| Command | Explanation |
|---|---|
/lp group default meta addsuffix 100 &d[Boost] discordsrv:boosting=true | will give a pink [Boost] suffix to all users boosting the Discord guild |
| Command | Explanation |
|---|---|
/lp group default permission set chat.use false discordsrv:role=muted | will negate the chat.use permission for anyone with the muted role in Discord |
| Command | Explanation |
|---|---|
/lp group default permission set chat.use false discordsrv:role_id=000000000000 | will negate the chat.use permission for anyone with the role that has the 000000000000 ID in Discord |
| Command | Explanation |
|---|---|
/lp group default permission set essentials.back true discordsrv:server_id=000000000000 | will give all users access to /back for anyone in the server that has the 000000000000 ID in Discord |
These can be disabled using a LuckPerms-Contexts entry in the DisabledPluginHooks config section.
Original implementation: https://github.com/DiscordSRV/DiscordSRV/pull/728