-
Notifications
You must be signed in to change notification settings - Fork 1
Reaction roles
Map a Discord message's reaction to a Discord role. Optionally also grant or revoke a LuckPerms permission for the linked Minecraft account.
Mappings are stored in plugins/ZDiscord/reaction_roles.yml rather than config.yml. This avoids bloating the main config and keeps the data easy to back up.
Mappings are added programmatically by other plugins via ReactionRoleModule.addMapping(messageId, emoji, roleId, permission). There is no in-game command for it.
plugin.getReactionRoleModule().addMapping(
"123456789012345678", // message ID
"\u2705", // emoji
"987654321098765432", // role ID
"essentials.fly" // optional LuckPerms permission
);If permission is empty, no LuckPerms grant is performed and only the Discord role is toggled.
The LuckPerms grant runs lp user <uuid> permission set <node> (or unset for revoke) as the console. LuckPerms is listed as a softdepend in plugin.yml and is required only for the permission-grant feature.