Skip to main content

Variable: Buttons

const Buttons: object;

Button component IDs used in interactive messages.

Each button ID is prefixed with the namespace to ensure uniqueness across all plugins and prevent conflicts with other components.

Type declaration

AddAssigneeMapping

readonly AddAssigneeMapping: object;

Button to open an ephemeral message with selects for adding a new assignee mapping.

When clicked, this button shows an ephemeral message with both a Jira assignee select and Discord user select. The mapping is created automatically when both are selected.

AddAssigneeMapping.id

readonly id: string;

AddColumnMapping

readonly AddColumnMapping: object;

Button to open an ephemeral message with selects for adding a new column mapping.

When clicked, this button shows an ephemeral message with both a provider status select and column select. The mapping is created automatically when both are selected.

AddColumnMapping.id

readonly id: string;

CancelSync

readonly CancelSync: object;

Base ID for the cancel sync button.

The full custom ID is constructed as ${id}-${syncId} so each active sync can be uniquely identified. Clicking this button aborts the sync loop and shows partial results. Only administrators or the user who started the sync may cancel.

CancelSync.id

readonly id: string;

ManageAuthorizedRoles

readonly ManageAuthorizedRoles: object;

Button to open an ephemeral message with role select for managing authorized creator roles.

When clicked, this button shows an ephemeral message with a role select menu. Selecting roles updates the authorized creator roles and refreshes the setup message.

ManageAuthorizedRoles.id

readonly id: string;

RemoveAssigneeMapping

readonly RemoveAssigneeMapping: object;

Base ID for the remove assignee mapping button.

The full custom ID is constructed as ${id}:${jiraName} so each mapping can be uniquely identified. Clicking this button removes the mapping between a Jira assignee and Discord user. Only administrators can remove mappings.

RemoveAssigneeMapping.id

readonly id: string;

RemoveColumnMapping

readonly RemoveColumnMapping: object;

Base ID for the remove column mapping button.

The full custom ID is constructed as ${id}:${status} so each mapping can be uniquely identified. Clicking this button removes the mapping between a provider status and a column. Only administrators can remove mappings.

RemoveColumnMapping.id

readonly id: string;

SetupBackOverview

readonly SetupBackOverview: object;

Button to navigate back to the overview page from provider settings.

When clicked, this button morphs the setup message back to the overview view.

SetupBackOverview.id

readonly id: string;

SetupProviderSettings

readonly SetupProviderSettings: object;

Button to navigate to the provider settings page from the overview.

When clicked, this button morphs the setup message to show provider-specific settings (assignee and column mappings).

SetupProviderSettings.id

readonly id: string;

TogglePublic

readonly TogglePublic: object;

Button to toggle between public (read-only) and private (admin/mod only) forum access.

When clicked, this button triggers permission updates on the forum channel:

  • Private mode: Only administrators and moderators can view the forum
  • Public mode: Everyone can view and read, but only admins/mods can post

TogglePublic.id

readonly id: string;

ViewAllMappings

readonly ViewAllMappings: object;

Base ID for the view all mappings button.

The full custom ID is constructed as ${id}:${type} where type is either 'assignee' or 'column'. Clicking this button shows an ephemeral message with the complete list of mappings.

ViewAllMappings.id

readonly id: string;

ViewSyncErrors

readonly ViewSyncErrors: object;

Base ID for the view sync errors button.

The full custom ID is constructed as ${id}-${syncId} so each sync's errors can be uniquely identified. Clicking this button shows an ephemeral message with a browsable list of errors that occurred during synchronization.

ViewSyncErrors.id

readonly id: string;

Example

import { ButtonBuilder, ButtonStyle } from 'discord.js';
import { Buttons } from './constants.js';

// Create a toggle public button
const button = new ButtonBuilder()
.setCustomId(Buttons.TogglePublic.id)
.setLabel('Toggle Public Access')
.setStyle(ButtonStyle.Primary);