From 668e738e75b6657a19378c78c7dfa7d579fe2668 Mon Sep 17 00:00:00 2001 From: Taken Date: Thu, 16 Mar 2023 19:36:46 +0100 Subject: [PATCH] Minor changes --- events/buttons/guildapplicationdeny.js | 1 + events/modals/denyreasonbox.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/events/buttons/guildapplicationdeny.js b/events/buttons/guildapplicationdeny.js index a35d465..285b37a 100644 --- a/events/buttons/guildapplicationdeny.js +++ b/events/buttons/guildapplicationdeny.js @@ -27,6 +27,7 @@ module.exports = { .setCustomId('denyreason') .setStyle(TextInputStyle.Paragraph) .setPlaceholder('Enter a reason for denying the application') + .setRequired(false) ) ) await interaction.showModal(modal); diff --git a/events/modals/denyreasonbox.js b/events/modals/denyreasonbox.js index 1abc593..7fba509 100644 --- a/events/modals/denyreasonbox.js +++ b/events/modals/denyreasonbox.js @@ -17,7 +17,7 @@ module.exports = { const applicantId = channel.topic; const guild = interaction.guild; const applicant = await guild.members.fetch(applicantId); - const reason = interaction.fields.fields.get('denyreason').value ?? "No reason provided"; + const reason = interaction.fields.fields.get('denyreason').value || "No reason provided"; const embedColor = Number(color.replace("#", "0x")); const filePath = path.join(__dirname, `../../applications/${applicantId}`); @@ -32,6 +32,7 @@ module.exports = { embeds: [{ description: "Application denied\n" + "Channel will be deleted in 5 seconds...", + color: embedColor }], });