From 1a4b100618f063ecaa5bbbcbdb3aeb14b774f358 Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Sun, 5 May 2024 22:59:07 +1000 Subject: [PATCH] Fix regex pattern for certain role permissions --- src/commands/roleinfo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/roleinfo.ts b/src/commands/roleinfo.ts index b121cee..430b25f 100644 --- a/src/commands/roleinfo.ts +++ b/src/commands/roleinfo.ts @@ -9,7 +9,7 @@ export default class RoleInfo { {name: '🔹 Color', value: `\`${role.hexColor}\``, inline: true}, {name: '🔹 Creation Date', value: `\n`, inline: true}, {name: '🔹 Misc', value: `Hoist: \`${role.hoist}\`\nMentionable: \`${role.mentionable}\`\nPosition: \`${role.position}\` from bottom\nMembers: \`${role.members.size}\`\n${role.members.size < 21 ? role.members.map((e:Discord.GuildMember)=>`**${e.user.username}**`).join('\n') || '' : ''}`, inline: true}, - {name: '🔹 Permissions', value: `${permissions.includes('Administrator') ? ['Administrator'] : permissions.join(', ').replace(/([a-z])([A-Z])/g, '$1 $2') || 'No permissions'}`, inline: true} + {name: '🔹 Permissions', value: `${permissions.includes('Administrator') ? ['Administrator'] : permissions.join(', ').replace(/([a-z])([A-Z])|([A-Z])([A-Z][a-z])/g, '$1$3 $2$4') || 'No permissions'}`, inline: true} )]}) } static data = new Discord.SlashCommandBuilder()