Minor changes

This commit is contained in:
2023-03-16 19:36:46 +01:00
parent 091d36c67f
commit 668e738e75
2 changed files with 3 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ module.exports = {
.setCustomId('denyreason') .setCustomId('denyreason')
.setStyle(TextInputStyle.Paragraph) .setStyle(TextInputStyle.Paragraph)
.setPlaceholder('Enter a reason for denying the application') .setPlaceholder('Enter a reason for denying the application')
.setRequired(false)
) )
) )
await interaction.showModal(modal); await interaction.showModal(modal);

View File

@@ -17,7 +17,7 @@ module.exports = {
const applicantId = channel.topic; const applicantId = channel.topic;
const guild = interaction.guild; const guild = interaction.guild;
const applicant = await guild.members.fetch(applicantId); 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 embedColor = Number(color.replace("#", "0x"));
const filePath = path.join(__dirname, `../../applications/${applicantId}`); const filePath = path.join(__dirname, `../../applications/${applicantId}`);
@@ -32,6 +32,7 @@ module.exports = {
embeds: [{ embeds: [{
description: "Application denied\n" + description: "Application denied\n" +
"Channel will be deleted in 5 seconds...", "Channel will be deleted in 5 seconds...",
color: embedColor
}], }],
}); });