V1.1.6 - properly fix the formatting issue
This commit is contained in:
parent
6d2ba277b9
commit
15d77efa1b
|
@ -27,7 +27,7 @@ export const alternateEventBtnStr = 'Join as Alternate';
|
||||||
export const noDescProvided = 'No description provided.';
|
export const noDescProvided = 'No description provided.';
|
||||||
|
|
||||||
// Member List generators
|
// Member List generators
|
||||||
const escapeMemberNameForDisplay = (memberName: string): string => memberName.replace(/[_*]/g, '\\$&');
|
const escapeMemberNameForDisplay = (memberName: string): string => memberName.replaceAll('\\', '').replaceAll('_', '\\_');
|
||||||
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}`;
|
||||||
export const generateMemberList = (memberList: Array<LFGMember>): string =>
|
export const generateMemberList = (memberList: Array<LFGMember>): string =>
|
||||||
memberList.length ? memberList.map((member) => `${escapeMemberNameForDisplay(member.name)} - <@${member.id}>`).join('\n') : noMembersStr;
|
memberList.length ? memberList.map((member) => `${escapeMemberNameForDisplay(member.name)} - <@${member.id}>`).join('\n') : noMembersStr;
|
||||||
|
|
Loading…
Reference in New Issue