From bfcb993b03d05d491bfbfc09a3f882d438501fef Mon Sep 17 00:00:00 2001 From: "Ean Milligan (Bastion)" Date: Sat, 8 Apr 2023 04:29:03 -0400 Subject: [PATCH] Move leave button text to common spot --- src/buttons/event-creation/utils.ts | 4 ++-- src/buttons/eventUtils.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/buttons/event-creation/utils.ts b/src/buttons/event-creation/utils.ts index 5300afb..2c3f483 100644 --- a/src/buttons/event-creation/utils.ts +++ b/src/buttons/event-creation/utils.ts @@ -13,7 +13,7 @@ import { import config from '../../../config.ts'; import utils from '../../utils.ts'; import { Activity } from './activities.ts'; -import { generateAlternateList, generateMemberList, generateMemberTitle, idSeparator, lfgStartTimeName } from '../eventUtils.ts'; +import { generateAlternateList, generateMemberList, generateMemberTitle, idSeparator, leaveEventBtnStr, lfgStartTimeName } from '../eventUtils.ts'; import { successColor } from '../../commandUtils.ts'; import { LFGMember } from '../../types/commandTypes.ts'; import { customId as gameSelCustomId } from './step1-gameSelection.ts'; @@ -117,7 +117,7 @@ export const generateLFGButtons = (whitelist: boolean): [ButtonComponent, Button customId: `${joinEventCustomId}${whitelist ? idSeparator : ''}`, }, { type: MessageComponentTypes.Button, - label: 'Leave', + label: leaveEventBtnStr, style: ButtonStyles.Danger, customId: leaveEventCustomId, }, { diff --git a/src/buttons/eventUtils.ts b/src/buttons/eventUtils.ts index 72f9951..032d8aa 100644 --- a/src/buttons/eventUtils.ts +++ b/src/buttons/eventUtils.ts @@ -14,6 +14,7 @@ export enum LfgEmbedIndexes { export const lfgStartTimeName = 'Start Time:'; export const idSeparator = '@'; export const noMembersStr = 'None'; +export const leaveEventBtnStr = 'Leave'; // Member List generators export const generateMemberTitle = (memberList: Array, maxMembers: number): string => `Members Joined: ${memberList.length}/${maxMembers}`;