Move leave button text to common spot
This commit is contained in:
parent
374d2547d9
commit
bfcb993b03
|
@ -13,7 +13,7 @@ import {
|
||||||
import config from '../../../config.ts';
|
import config from '../../../config.ts';
|
||||||
import utils from '../../utils.ts';
|
import utils from '../../utils.ts';
|
||||||
import { Activity } from './activities.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 { successColor } from '../../commandUtils.ts';
|
||||||
import { LFGMember } from '../../types/commandTypes.ts';
|
import { LFGMember } from '../../types/commandTypes.ts';
|
||||||
import { customId as gameSelCustomId } from './step1-gameSelection.ts';
|
import { customId as gameSelCustomId } from './step1-gameSelection.ts';
|
||||||
|
@ -117,7 +117,7 @@ export const generateLFGButtons = (whitelist: boolean): [ButtonComponent, Button
|
||||||
customId: `${joinEventCustomId}${whitelist ? idSeparator : ''}`,
|
customId: `${joinEventCustomId}${whitelist ? idSeparator : ''}`,
|
||||||
}, {
|
}, {
|
||||||
type: MessageComponentTypes.Button,
|
type: MessageComponentTypes.Button,
|
||||||
label: 'Leave',
|
label: leaveEventBtnStr,
|
||||||
style: ButtonStyles.Danger,
|
style: ButtonStyles.Danger,
|
||||||
customId: leaveEventCustomId,
|
customId: leaveEventCustomId,
|
||||||
}, {
|
}, {
|
||||||
|
|
|
@ -14,6 +14,7 @@ export enum LfgEmbedIndexes {
|
||||||
export const lfgStartTimeName = 'Start Time:';
|
export const lfgStartTimeName = 'Start Time:';
|
||||||
export const idSeparator = '@';
|
export const idSeparator = '@';
|
||||||
export const noMembersStr = 'None';
|
export const noMembersStr = 'None';
|
||||||
|
export const leaveEventBtnStr = 'Leave';
|
||||||
|
|
||||||
// Member List generators
|
// Member List generators
|
||||||
export const generateMemberTitle = (memberList: Array<LFGMember>, maxMembers: number): string => `Members Joined: ${memberList.length}/${maxMembers}`;
|
export const generateMemberTitle = (memberList: Array<LFGMember>, maxMembers: number): string => `Members Joined: ${memberList.length}/${maxMembers}`;
|
||||||
|
|
Loading…
Reference in New Issue