Fixed 'change nickname' button now showing
diff --git a/src/reflex/scanners.ts b/src/reflex/scanners.ts
index 2b68a34..eae3cb3 100644
--- a/src/reflex/scanners.ts
+++ b/src/reflex/scanners.ts
@@ -282,17 +282,19 @@
new ButtonBuilder().setCustomId(`mod:kick:${member.user.id}`).setLabel("Kick").setStyle(ButtonStyle.Danger),
new ButtonBuilder().setCustomId(`mod:ban:${member.user.id}`).setLabel("Ban").setStyle(ButtonStyle.Danger)
];
- if (nameCheck !== null)
- buttons.concat([
+ if (nameCheck !== null) {
+ buttons.push(
new ButtonBuilder()
.setCustomId(`mod:nickname:${member.user.id}`)
.setLabel("Change Name")
.setStyle(ButtonStyle.Primary)
- ]);
- if (avatarCheck || avatarTextCheck !== null)
- buttons.concat([
+ );
+ }
+ if (avatarCheck || avatarTextCheck !== null) {
+ buttons.push(
new ButtonBuilder().setURL(member.displayAvatarURL()).setLabel("View Avatar").setStyle(ButtonStyle.Link)
- ]);
+ );
+ }
const components: ActionRowBuilder<ButtonBuilder>[] = [];
for (let i = 0; i < buttons.length; i += 5) {