Finalizing staff applicaiotns

This commit is contained in:
2023-03-28 00:11:24 +02:00
parent bad91ae786
commit 000a45b4db
4 changed files with 55 additions and 34 deletions

View File

@@ -1,5 +1,7 @@
const { InteractionType, EmbedBuilder } = require('discord.js');
const { InteractionType, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
const { color } = require('../../config/options.json');
const mongoose = require('mongoose');
const staffapp = require('../../schemas/staffAppSchema.js');
const fs = require('fs');
const path = require('path');
@@ -25,6 +27,23 @@ module.exports = {
const applicantId = embed.footer.text.split(" ")[1]
const applicant = await guild.members.fetch(applicantId)
await message.edit({
components: [
new ActionRowBuilder().addComponents(
new ButtonBuilder()
.setCustomId("staffapplicationaccept")
.setLabel("Accept")
.setStyle(ButtonStyle.Primary)
.setDisabled(true),
new ButtonBuilder()
.setCustomId("staffapplicationdeny")
.setLabel("Deny")
.setStyle(ButtonStyle.Danger)
.setDisabled(true),
)
]
});
const dmMessage = new EmbedBuilder()
.setDescription("Your application for the Illegitimate guild staff has been denied\n" +
"**Reason:** `" + reason + "`")
@@ -32,6 +51,8 @@ module.exports = {
await applicant.send({ embeds: [dmMessage] });
await staffapp.findOneAndDelete({ userID: applicantId });
await interaction.editReply({
embeds: [{
title: "Application Denied",