Skip to content

Reaction roles

Cyrusbye720 edited this page Jun 6, 2026 · 3 revisions

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.

Storage

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.

Adding a mapping

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.

LuckPerms dependency

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.


ZDiscord v1.1.0 · Home · Issues · Source

Clone this wiki locally