From b7565115c36f26711becc31c120558b01e476940 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sun, 19 Nov 2023 22:43:17 +0500 Subject: [PATCH] some clean up --- commands/General/avatar.c.js | 2 +- commands/Moderation/warn.c.js | 2 +- commands/Tickets/createticketembed.js | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/commands/General/avatar.c.js b/commands/General/avatar.c.js index 142538f2..00764a56 100644 --- a/commands/General/avatar.c.js +++ b/commands/General/avatar.c.js @@ -9,7 +9,7 @@ class AvatarContext extends BaseCommand { constructor() { super({ command: new ContextMenuCommandBuilder() - .setName("Avatar") + .setName("Get Avatar") .setType(ApplicationCommandType.User) .setDMPermission(false), aliases: [], diff --git a/commands/Moderation/warn.c.js b/commands/Moderation/warn.c.js index 98096835..30680c83 100644 --- a/commands/Moderation/warn.c.js +++ b/commands/Moderation/warn.c.js @@ -9,7 +9,7 @@ class WarnContext extends BaseCommand { constructor() { super({ command: new ContextMenuCommandBuilder() - .setName("Warn") + .setName("Give Warn") .setType(ApplicationCommandType.User) .setDMPermission(false) .setDefaultMemberPermissions(PermissionsBitField.Flags.ManageMessages), diff --git a/commands/Tickets/createticketembed.js b/commands/Tickets/createticketembed.js index 2157092c..1f8d1a49 100644 --- a/commands/Tickets/createticketembed.js +++ b/commands/Tickets/createticketembed.js @@ -99,9 +99,7 @@ class CreateTicketEmbed extends BaseCommand { const row = new ActionRowBuilder().addComponents(closeButton, transcriptButton); await channel.send({ embeds: [embed], components: [row] }); - } - - if (button.customId === "close_ticket") { + } else if (button.customId === "close_ticket") { const embed = new EmbedBuilder() .setTitle(interaction.translate("tickets/closeticket:CLOSING_TITLE")) .setDescription(interaction.translate("tickets/closeticket:CLOSING_DESC")) @@ -174,9 +172,7 @@ class CreateTicketEmbed extends BaseCommand { await interaction.channel.setName(`${interaction.channel.name}-closed`); } }); - } - - if (button.customId === "transcript_ticket") { + } else if (button.customId === "transcript_ticket") { await interaction.deferUpdate(); const reversedMessages = (await interaction.channel.messages.fetch()).filter(m => !m.author.bot);