Finalizing staff applicaiotns
This commit is contained in:
@@ -16,15 +16,15 @@
|
||||
"rq7": "How did you find about us?",
|
||||
"rq8": "What is your time zone?",
|
||||
"sq1": "What is your IGN?",
|
||||
"sq2": "",
|
||||
"sq3": "",
|
||||
"sq4": "",
|
||||
"sq5": "",
|
||||
"sq6": "",
|
||||
"rsq1": "",
|
||||
"rsq2": "",
|
||||
"rsq3": "",
|
||||
"rsq4": "",
|
||||
"rsq5": "",
|
||||
"rsq6": ""
|
||||
"sq2": "How long have you been in the guild for?",
|
||||
"sq3": "Have you been guild muted for any reason? (This includes mutes for staff disrespect, arguing with guild members, toxicity...)",
|
||||
"sq4": "Are you an active guild member? (Keep in mind we will surely check your GEXP)",
|
||||
"sq5": "Do you have any experience as a staff member (guild moderator) at all?",
|
||||
"sq6": "Why should we choose you as a Guild Moderator? (Tell us what would you do for the guild, how are you gonna help us grow the community, how many hours per day are you willing to spend doing the stuff as moderator for the guild etc..",
|
||||
"rsq1": "What is your IGN?",
|
||||
"rsq2": "How long have you been in the guild for?",
|
||||
"rsq3": "Have you been guild muted for any reason?",
|
||||
"rsq4": "Are you an active guild member?",
|
||||
"rsq5": "Do you have any experience as a staff member (guild moderator) at all?",
|
||||
"rsq6": "Why should we choose you as a Guild Moderator?"
|
||||
}
|
||||
@@ -20,6 +20,7 @@ module.exports = {
|
||||
const applicantId = embed.footer.text.split(" ")[1]
|
||||
|
||||
const applicant = await guild.members.fetch(applicantId)
|
||||
const applicantUsername = applicant.user.username + "#" + applicant.user.discriminator;
|
||||
|
||||
await applicant.send({
|
||||
embeds: [{
|
||||
@@ -35,9 +36,7 @@ module.exports = {
|
||||
.setCustomId("staffapplicationaccept")
|
||||
.setLabel("Accept")
|
||||
.setStyle(ButtonStyle.Primary)
|
||||
.setDisabled(true)
|
||||
),
|
||||
new ActionRowBuilder().addComponents(
|
||||
.setDisabled(true),
|
||||
new ButtonBuilder()
|
||||
.setCustomId("staffapplicationdeny")
|
||||
.setLabel("Deny")
|
||||
@@ -52,9 +51,7 @@ module.exports = {
|
||||
await interaction.reply({
|
||||
embeds: [{
|
||||
title: applicantUsername + " - Staff Application.",
|
||||
description: "Application accepted by <@" + user.id + ">.\n\n" +
|
||||
"Press the button below to delete this channel.\n" +
|
||||
"**When the user was given their role**",
|
||||
description: "Application accepted by <@" + user.id + ">.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: applicant.avatarURL()
|
||||
|
||||
@@ -144,7 +144,7 @@ module.exports = {
|
||||
const question2 = await user.send({
|
||||
embeds: [{
|
||||
title : "**Question 2**",
|
||||
description: sq2 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n" + "`(8 characters max)`",
|
||||
description: sq2 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n" + "`(64 characters max)`",
|
||||
color: embedColor,
|
||||
footer:{
|
||||
text: "You have 15 minutes to respond to this message."
|
||||
@@ -160,10 +160,10 @@ module.exports = {
|
||||
await user.send({ embeds: [attachments] });
|
||||
return
|
||||
}
|
||||
if (answer2.first().content > 8) {
|
||||
if (answer2.first().content > 64) {
|
||||
await user.send({
|
||||
embeds: [{
|
||||
description: "Max character limit is 8.",
|
||||
description: "Max character limit is 64.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -183,7 +183,7 @@ module.exports = {
|
||||
const question3 = await user.send({
|
||||
embeds: [{
|
||||
title : "**Question 3**",
|
||||
description: sq3 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + smallM + "`",
|
||||
description: sq3 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`",
|
||||
color: embedColor,
|
||||
footer:{
|
||||
text: "You have 15 minutes to respond to this message."
|
||||
@@ -199,10 +199,10 @@ module.exports = {
|
||||
await user.send({ embeds: [attachments] });
|
||||
return
|
||||
}
|
||||
if (answer3.first().content > 128) {
|
||||
if (answer3.first().content > 256) {
|
||||
await user.send({
|
||||
embeds: [{
|
||||
description: "Max character limit is 128.",
|
||||
description: "Max character limit is 256.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -221,8 +221,7 @@ module.exports = {
|
||||
const question4 = await user.send({
|
||||
embeds: [{
|
||||
title : "**Question 4**",
|
||||
description: sq4 + "\n\nPlease type your answer below or type `cancel` to cancel your application." +
|
||||
" `(We expect a longer answer.)`\n`" + largeM + "`",
|
||||
description: sq4 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`",
|
||||
color: embedColor,
|
||||
footer:{
|
||||
text: "You have 15 minutes to respond to this message."
|
||||
@@ -260,7 +259,7 @@ module.exports = {
|
||||
const question5 = await user.send({
|
||||
embeds: [{
|
||||
title : "**Question 5**",
|
||||
description: sq5 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + smallM + "`",
|
||||
description: sq5 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`",
|
||||
color: embedColor,
|
||||
footer:{
|
||||
text: "You have 15 minutes to respond to this message."
|
||||
@@ -276,10 +275,10 @@ module.exports = {
|
||||
await user.send({ embeds: [attachments] });
|
||||
return
|
||||
}
|
||||
if (answer5.first().content > 128) {
|
||||
if (answer5.first().content > 256) {
|
||||
await user.send({
|
||||
embeds: [{
|
||||
description: "Max character limit is 128.",
|
||||
description: "Max character limit is 256.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -298,7 +297,8 @@ module.exports = {
|
||||
const question6 = await user.send({
|
||||
embeds: [{
|
||||
title : "**Question 6**",
|
||||
description: sq6 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`",
|
||||
description: sq6 + "\n\nPlease type your answer below or type `cancel` to cancel your application." +
|
||||
"`(We expect a longer answer here)`\n`" + largeM + "`",
|
||||
color: embedColor,
|
||||
footer:{
|
||||
text: "You have 15 minutes to respond to this message."
|
||||
@@ -364,11 +364,16 @@ module.exports = {
|
||||
}]
|
||||
})
|
||||
|
||||
const userCheck = await fetch(mojangAPI + answer1_1)
|
||||
const uuid = userCheck.data.id
|
||||
|
||||
const newStaffApp = new staffapp({
|
||||
_id: new mongoose.Types.ObjectId(),
|
||||
userID: user.id,
|
||||
uuid: uuid,
|
||||
})
|
||||
newStaffApp.save()
|
||||
|
||||
await newStaffApp.save()
|
||||
await user.deleteDM();
|
||||
|
||||
const channel = guild.channels.cache.get(staffApplicationsChannel);
|
||||
@@ -417,9 +422,7 @@ module.exports = {
|
||||
new ButtonBuilder()
|
||||
.setCustomId("staffapplicationaccept")
|
||||
.setLabel("Accept")
|
||||
.setStyle(ButtonStyle.Primary)
|
||||
),
|
||||
new ActionRowBuilder().addComponents(
|
||||
.setStyle(ButtonStyle.Primary),
|
||||
new ButtonBuilder()
|
||||
.setCustomId("staffapplicationdeny")
|
||||
.setLabel("Deny")
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user