Skip to Content
Haven Documentation is the shared home for product guides, plugin setup, and release docs.

Configuration

Reaction Roles uses one config file/interface named reactionroles. It contains two top-level blocks:

  • config for behavior and panel definitions
  • lang for user-facing messages

Plugin Settings

OptionTypeDefaultDescription
config.enabledbooleantrueMaster switch for the reaction role system.
config.auto_remove_user_reactionsbooleantrueRemoves a user’s reaction after assigning a role for reaction-based panels.
config.log_role_changesbooleanfalseSends role add/remove logs to log_channel.
config.log_channelstring""Channel ID for role-change logs.
config.max_roles_per_usernumber0Maximum role count a user can have from a panel. 0 means unlimited.
config.role_hierarchy_checkbooleantruePrevents assigning roles at or above the bot’s highest role.
config.permission_bypass_rolesstring[][]Role IDs that bypass role limits and hierarchy restrictions.
config.panelsobject{}Named panel definitions.

Panel Object

Each key under config.panels is a panel name:

panels: { notifications: { type: "MIXED", channel_id: "123456789012345678", placeholder: "Choose your roles...", show_check_button: true, embed: {}, selectOptions: [], buttons: [], reactionEmojis: [], subPanels: {} } }
FieldTypeDescription
typestringPanel type: MIXED, SELECT, BUTTON, REACT, or CATEGORY.
channel_idstringDiscord channel ID where the panel is sent.
placeholderstringPlaceholder for dropdown/select menus.
reset_reactsbooleanLegacy reaction reset setting.
show_check_buttonbooleanShows the “Check My Current Roles” button when supported.
embedobjectDiscord embed displayed above the components.
reactionsarrayLegacy entry array used by SELECT, BUTTON, REACT, and CATEGORY.
selectOptionsarrayMIXED select-menu entries.
buttonsarrayMIXED button entries.
reactionEmojisarrayMIXED emoji reaction entries.
subPanelsobjectEphemeral child panels opened from buttons/select options.
categoriesarrayLegacy category panel definitions.

Embed Object

FieldTypeDescription
embed.titlestringEmbed title. Discord markdown is supported.
embed.descriptionstring or string[]Main embed body. Arrays are joined with new lines.
embed.colorstringHex embed color, such as #1769FF.
embed.imagestringLarge image URL.
embed.thumbnailstringThumbnail URL.
embed.footer.textstringFooter text.
embed.footer.iconstringFooter icon URL.
embed.author.textstringAuthor name.
embed.author.iconstringAuthor icon URL.

Role Entry Object

Role entries are used in reactions, selectOptions, buttons, and reactionEmojis.

FieldTypeDescription
enabledbooleanIf false, the entry is ignored. Defaults to enabled.
typestringrole for role toggles, or sub_panel to open a sub-panel.
namestringLabel shown in buttons/selects and used in responses.
emojistringEmoji shown in the UI or used as the reaction trigger.
stylestringButton style: Primary, Secondary, Success, or Danger.
descriptionstringSelect-menu description or internal description.
role_idstringDiscord role ID to add/remove. Required for role entries.
sub_panel_idstringSub-panel key to open. Required for sub_panel entries.

Sub-Panel Object

Sub-panels are temporary, private panels shown ephemerally when a user clicks a linked button or select option.

subPanels: { games: { name: "Game Roles", prompt: "Pick your game roles below:", placeholder: "Choose games...", embed: { title: "Game Roles", description: ["Choose the games you play."], color: "#5865F2" }, buttons: [], selectOptions: [] } }
FieldTypeDescription
namestringInternal/display name for the sub-panel.
promptstringText shown above the sub-panel components.
placeholderstringSelect-menu placeholder.
embedobjectOptional embed shown inside the ephemeral response.
buttonsarrayButton role entries or links to deeper sub-panels.
selectOptionsarraySelect-menu role entries or links to deeper sub-panels.

Language Settings

KeyDescription
role_addedMessage after adding one role. Uses {role_name}.
role_removedMessage after removing one role. Uses {role_name}.
roles_updatedHeader after select-menu changes.
roles_addedAdded roles line. Uses {role_names}.
roles_removedRemoved roles line. Uses {role_names}.
no_changesResponse when a selection did not change roles.
member_not_foundError when member data cannot be found.
role_not_foundError when a configured role no longer exists.
panel_not_foundError when a panel key cannot be found.
category_not_foundError for missing category/sub-panel targets.
permission_deniedError when the user cannot self-assign a role.
role_hierarchy_errorError when the bot cannot assign a role due to hierarchy.
max_roles_reachedError when max role limit is reached. Uses {max_roles}.
bot_permission_errorGeneric bot role-permission failure.
interaction_errorGeneric interaction failure.
log_titleRole-change log embed title.
log_user_fieldRole-change log user field label.
log_role_fieldRole-change log role field label.
log_action_fieldRole-change log action field label.
log_action_addedRole-change log value for add actions.
log_action_removedRole-change log value for remove actions.
plugin_disabledStartup/command disabled message.
plugin_loadedStartup loaded message.
panel_existsStartup message when a valid panel already exists.
panel_sentStartup message when a panel is sent.
channel_not_foundStartup error for missing channel IDs.
current_roles_titleHeader for the check-current-roles response.
current_roles_from_panelCurrent roles line. Uses {roles}.
current_roles_noneText when the user has none of the panel roles.
check_roles_tipTip under the current roles response.
select_tipTip after select-menu updates.
default_placeholderFallback select placeholder.
no_descriptionFallback description text.
subpanel_promptFallback prompt for sub-panels.
subpanel_closedMessage when a sub-panel is closed.

Example Mixed Panel

notifications: { type: "MIXED", channel_id: "123456789012345678", placeholder: "Choose notification roles...", show_check_button: true, embed: { title: "Choose Your Roles!", description: [ "> Server Updates - Get notified about server updates.", "> Giveaways - Get pinged for giveaways." ], color: "#1769FF" }, selectOptions: [ { enabled: true, type: "role", name: "Server Updates", emoji: "📢", description: "Get notified about updates.", role_id: "123456789012345678" } ], buttons: [], reactionEmojis: [], subPanels: {} }