Merge branch 'dev'

This commit is contained in:
2023-11-20 17:56:42 +01:00
13 changed files with 150 additions and 168 deletions

View File

@@ -1,9 +1,4 @@
const { SlashCommandBuilder, PermissionFlagsBits, userMention, EmbedBuilder, ChannelType } = require('discord.js'); const { SlashCommandBuilder, PermissionFlagsBits, userMention, EmbedBuilder, ChannelType } = require('discord.js');
const { hypixelGuildID, color } = require('../config/options.json');
const { muted } = require('../config/roles.json');
const verify = require('../schemas/verifySchema.js');
const dev = process.env.DEV;
const fetch = require('axios');
module.exports = { module.exports = {
name: 'admin', name: 'admin',
@@ -37,10 +32,6 @@ module.exports = {
async execute(interaction) { async execute(interaction) {
const subcommand = interaction.options.getSubcommand(); const subcommand = interaction.options.getSubcommand();
const user = interaction.user;
const userMentioned = userMention(user.id);
const guild = interaction.guild;
const embedColor = Number(color.replace("#", "0x"));
if (subcommand === 'reload') { if (subcommand === 'reload') {
@@ -54,55 +45,5 @@ module.exports = {
}) })
} }
if (subcommand === 'listallverified') {
const verifiedUsers = await verify.find()
const mojang = "https://api.mojang.com/user/profile/"
let embed = new EmbedBuilder()
.setTitle(guild.name)
.setColor(embedColor)
.setDescription('List of all verified users')
for (let i = 0; i < verifiedUsers.length; i++) {
const user = verifiedUsers[i];
const userCheck = await fetch(mojang + user.uuid);
const ign = userCheck.data.name;
const mentionedUser = userMention(user.userID);
embed.addFields({
name: "**IGN:** " + ign,
value: "**Discord:** " + mentionedUser
})
}
await interaction.reply({
embeds: [embed]
})
}
if (subcommand === 'purgereactions') {
const count = interaction.options.getInteger('count');
await interaction.deferReply({})
if (user.id !== dev) {
interaction.editReply({ content: 'Due to you not screwing something up this command is restricted to only ' + userMentioned, ephemeral: true })
return
}
const messages = await interaction.channel.messages.fetch({ limit: count });
messages.forEach(async (message) => {
await message.reactions.removeAll();
})
await interaction.editReply(`Purged reactions from ${count} message(s).`)
}
} }
}; };

View File

@@ -8,6 +8,7 @@ module.exports = {
name: "forceunverify", name: "forceunverify",
description: "Force unverify a user", description: "Force unverify a user",
type: 'slash', type: 'slash',
dev: true,
data: new SlashCommandBuilder() data: new SlashCommandBuilder()
.setName('forceunverify') .setName('forceunverify')

View File

@@ -28,15 +28,18 @@ module.exports = {
/** @param { import('discord.js').ChatInputCommandInteraction } interaction */ /** @param { import('discord.js').ChatInputCommandInteraction } interaction */
async execute(interaction) { async execute(interaction) {
interaction.deferReply()
const user = interaction.options.getUser('user'); const user = interaction.options.getUser('user');
const reason = interaction.options.getString('reason') || "No reason provided." const reason = interaction.options.getString('reason') ?? "No reason provided."
const mod = interaction.user const mod = interaction.user
const color = Number(color.replace('#', '0x')) const embedColor = Number(color.replace('#', '0x'))
const waitinglist = await waitinglistSchema.findOne({ UserID: user.id }) const waitinglist = await waitinglistSchema.findOne({ UserID: user.id })
if (!waitinglist) { if (!waitinglist) {
await interaction.reply({ await interaction.editReply({
embeds: [{ embeds: [{
description: userMention(user.id) + " is not on the waiting list.", description: userMention(user.id) + " is not on the waiting list.",
color: color color: color
@@ -47,10 +50,12 @@ module.exports = {
await waitinglistSchema.findOneAndDelete({ UserID: user.id }) await waitinglistSchema.findOneAndDelete({ UserID: user.id })
await interaction.reply({ await interaction.editReply({
embeds: [{ embeds: [{
description: userMention(user.id) + " has been removed from the waiting list.", description: userMention(user.id) + " has been removed from the waiting list.\n" +
color: color "**Reason:** `" + reason + "`\n" +
"**Moderator:** " + userMention(mod.id),
color: embedColor,
}] }]
}) })
} }

View File

@@ -1,36 +1,76 @@
{ {
"qu1": "What is your IGN?", "guild": [
"qu2": "What is your hypixel Network Level?", {
"qu3": "What stats are you submitting? (ex. BW lv 135 or SW lv 12 etc..)? Please provide us your best stats of the gamemode you main the most.", "q": "What is your IGN?",
"qu4": "Which talents make you a good member for Illegitimate? Tell us about your accomplishments, hobbies and ambitions both on Hypixel and in real life.", "r": "What is your IGN?"
"qu5": "Will you be able to make from 100k to 150k gexp x week?", },
"qu6": "Tell us about: your age, what you expect to gain from Illegitimate, whether you play on other accounts; if you often will be inactive; your punishment history; etc… This section is all yours and we expect a longer answer.", {
"qu7": "How did you find about us? (Yt, advertisement in lobbies, friend..)", "q": "What is your hypixel Network Level?",
"qu8": "What is your time zone? (Example: GMT+1)", "r": "What is your hypixel Network Level?"
"rq1": "What is your IGN?", },
"rq2": "What is your hypixel Network Level?", {
"rq3": "What stats are you submitting?", "q": "What stats are you submitting? (ex. BW lv 135 or SW lv 12 etc..)? Please provide us your best stats of the gamemode you main the most.",
"rq4": "Which talents make you a good member for Illegitimate?", "r": "What stats are you submitting?"
"rq5": "Will you be able to make from 100k to 150k gexp x week?", },
"rq6": "Tell us about yourself.", {
"rq7": "How did you find about us?", "q": "Which talents make you a good member for Illegitimate? Tell us about your accomplishments, hobbies and ambitions both on Hypixel and in real life.",
"rq8": "What is your time zone?", "r": "Which talents make you a good member for Illegitimate?"
"sq1": "What is your IGN?", },
"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...)", "q": "Will you be able to make from 100k to 150k gexp x week?",
"sq4": "Are you an active guild member? (Keep in mind we will surely check your GEXP)", "r": "Will you be able to make from 100k to 150k gexp x week?"
"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?", "q": "Tell us about: your age, what you expect to gain from Illegitimate, whether you play on other accounts; if you often will be inactive; your punishment history; etc… This section is all yours and we expect a longer answer.",
"rsq2": "How long have you been in the guild for?", "r": "Tell us about yourself."
"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?", "q": "How did you find about us? (Yt, advertisement in lobbies, friend..)",
"rsq6": "Why should we choose you as a Guild Moderator?", "r": "How did you find about us?"
"ia1": "What is your IGN?", },
"ia2": "Duration of the absence?", {
"ia3": "Reason of the absence?", "q": "What is your time zone? (Example: GMT+1)",
"ria1": "What is your IGN?", "r": "What is your time zone?"
"ria2": "Duration of the absence?", }
"ria3": "Reason of the absence?" ],
"staff": [
{
"q": "What is your IGN?",
"r": "What is your IGN?"
},
{
"q": "How long have you been in the guild for?",
"r": "How long have you been in the guild for?"
},
{
"q": "Have you been guild muted for any reason? (This includes mutes for staff disrespect, arguing with guild members, toxicity...)",
"r": "Have you been guild muted for any reason?"
},
{
"q": "Are you an active guild member? (Keep in mind we will surely check your GEXP)",
"r": "Are you an active guild member?"
},
{
"q": "Do you have any experience as a staff member (guild moderator) at all?",
"r": "Do you have any experience as a staff member (guild moderator) at all?"
},
{
"q": "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..",
"r": "Why should we choose you as a Guild Moderator?"
}
],
"inactivity": [
{
"q": "What is your IGN?",
"r": "What is your IGN?"
},
{
"q": "Duration of the absence?",
"r": "Duration of the absence?"
},
{
"q": "Reason of the absence?",
"r": "Reason of the absence?"
}
]
} }

View File

@@ -1,5 +1,4 @@
const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require('discord.js'); const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require('discord.js');
const { color } = require('../../config/options.json');
module.exports = { module.exports = {
name: 'guildapplicationdeny', name: 'guildapplicationdeny',

View File

@@ -2,12 +2,11 @@ const { ButtonBuilder, ButtonStyle, ActionRowBuilder, EmbedBuilder } = require('
const { color } = require('../../config/options.json'); const { color } = require('../../config/options.json');
const { largeM, smallM, ignM } = require('../../config/limitmessages.json') const { largeM, smallM, ignM } = require('../../config/limitmessages.json')
const { applicationsChannel } = require('../../config/options.json'); const { applicationsChannel } = require('../../config/options.json');
const { qu1, qu2, qu3, qu4, qu5, qu6, qu7, qu8 } = require('../../config/questions.json'); const questions = require('../../config/questions.json');
const { rq1, rq2, rq3, rq4, rq5, rq6, rq7, rq8 } = require('../../config/questions.json');
const { guildRole } = require('../../config/roles.json') const { guildRole } = require('../../config/roles.json')
const { getUUID } = require('../../utils/utils.js')
const mongoose = require('mongoose'); const mongoose = require('mongoose');
const guildapp = require('../../schemas/guildAppSchema.js'); const guildapp = require('../../schemas/guildAppSchema.js');
const fetch = require('axios');
module.exports = { module.exports = {
name: 'guildapply', name: 'guildapply',
@@ -21,10 +20,16 @@ module.exports = {
const user = interaction.user; const user = interaction.user;
const guild = interaction.guild; const guild = interaction.guild;
const embedColor = Number(color.replace("#", "0x")); const embedColor = Number(color.replace("#", "0x"));
const mojangAPI = "https://api.mojang.com/users/profiles/minecraft/"
const userRoles = guild.members.cache.get(user.id).roles.cache.map(role => role.id); const userRoles = guild.members.cache.get(user.id).roles.cache.map(role => role.id);
const guildQuestions = questions.guild
function qu(n) {
return guildQuestions[n - 1].q
}
function rq(n) {
return guildQuestions[n - 1].r
}
if (interaction.customId === 'guildapply') { if (interaction.customId === 'guildapply') {
@@ -94,7 +99,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 1**", title: "**Question 1**",
description: qu1 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + ignM + "`", description: qu(1) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + ignM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 5 minutes to respond to this message." text: "You have 5 minutes to respond to this message."
@@ -127,9 +132,8 @@ module.exports = {
}) })
return return
} }
try { const uuid = await getUUID(answer1.first().content)
var userCheck = await fetch(mojangAPI + answer1.first().content); if (!uuid) {
} catch (error) {
await user.send({ await user.send({
embeds: [{ embeds: [{
description: "That is not a valid Minecraft username.\n" + description: "That is not a valid Minecraft username.\n" +
@@ -145,7 +149,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 2**", title: "**Question 2**",
description: qu2 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n" + "`(8 characters max)`", description: qu(2) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n" + "`(8 characters max)`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 15 minutes to respond to this message." text: "You have 15 minutes to respond to this message."
@@ -184,7 +188,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 3**", title: "**Question 3**",
description: qu3 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + smallM + "`", description: qu(3) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + smallM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 15 minutes to respond to this message." text: "You have 15 minutes to respond to this message."
@@ -222,7 +226,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 4**", title: "**Question 4**",
description: qu4 + "\n\nPlease type your answer below or type `cancel` to cancel your application." + description: qu(4) + "\n\nPlease type your answer below or type `cancel` to cancel your application." +
" `(We expect a longer answer.)`\n`" + largeM + "`", " `(We expect a longer answer.)`\n`" + largeM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
@@ -261,7 +265,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 5**", title: "**Question 5**",
description: qu5 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + smallM + "`", description: qu(5) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + smallM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 15 minutes to respond to this message." text: "You have 15 minutes to respond to this message."
@@ -299,7 +303,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 6**", title: "**Question 6**",
description: qu6 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`", description: qu(6) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 15 minutes to respond to this message." text: "You have 15 minutes to respond to this message."
@@ -337,7 +341,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 7**", title: "**Question 7**",
description: qu7 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + smallM + "`", description: qu(7) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + smallM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 15 minutes to respond to this message." text: "You have 15 minutes to respond to this message."
@@ -375,7 +379,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 8**", title: "**Question 8**",
description: qu8 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n" + "`(64 characters max)`", description: qu(8) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n" + "`(64 characters max)`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 15 minutes to respond to this message." text: "You have 15 minutes to respond to this message."
@@ -441,8 +445,6 @@ module.exports = {
}] }]
}) })
const uuid = userCheck.data.id
const newGuildApp = new guildapp({ const newGuildApp = new guildapp({
_id: new mongoose.Types.ObjectId(), _id: new mongoose.Types.ObjectId(),
userID: user.id, userID: user.id,
@@ -461,35 +463,35 @@ module.exports = {
}, },
fields: [ fields: [
{ {
name: rq1, name: rq(1),
value: "```" + answer1_1 + "```" value: "```" + answer1_1 + "```"
}, },
{ {
name: rq2, name: rq(2),
value: "```" + answer2_1 + "```" value: "```" + answer2_1 + "```"
}, },
{ {
name: rq3, name: rq(3),
value: "```" + answer3_1 + "```" value: "```" + answer3_1 + "```"
}, },
{ {
name: rq4, name: rq(4),
value: "```" + answer4_1 + "```" value: "```" + answer4_1 + "```"
}, },
{ {
name: rq5, name: rq(5),
value: "```" + answer5_1 + "```" value: "```" + answer5_1 + "```"
}, },
{ {
name: rq6, name: rq(6),
value: "```" + answer6_1 + "```" value: "```" + answer6_1 + "```"
}, },
{ {
name: rq7, name: rq(7),
value: "```" + answer7_1 + "```" value: "```" + answer7_1 + "```"
}, },
{ {
name: rq8, name: rq(8),
value: "```" + answer8_1 + "```" value: "```" + answer8_1 + "```"
} }
], ],

View File

@@ -1,14 +1,14 @@
const { ButtonBuilder, ButtonStyle, ActionRowBuilder, EmbedBuilder } = require('discord.js'); const { ButtonBuilder, ButtonStyle, ActionRowBuilder, EmbedBuilder } = require('discord.js');
const { color } = require('../../config/options.json'); const { color } = require('../../config/options.json');
const { largeM, smallM, ignM } = require('../../config/limitmessages.json') const { largeM, ignM } = require('../../config/limitmessages.json')
const { staffApplicationsChannel } = require('../../config/options.json'); const { staffApplicationsChannel } = require('../../config/options.json');
const { sq1, sq2, sq3, sq4, sq5, sq6 } = require('../../config/questions.json'); const questions = require('../../config/questions.json');
const { rsq1, rsq2, rsq3, rsq4, rsq5, rsq6 } = require('../../config/questions.json');
const { guildRole, guildStaff } = require('../../config/roles.json') const { guildRole, guildStaff } = require('../../config/roles.json')
const mongoose = require('mongoose'); const mongoose = require('mongoose');
const staffapp = require('../../schemas/staffAppSchema.js'); const staffapp = require('../../schemas/staffAppSchema.js');
const settings = require("../../schemas/settingsSchema.js"); const settings = require("../../schemas/settingsSchema.js");
const fetch = require('axios'); const { getUUID } = require('../../utils/utils.js')
const dev = process.env.DEV
module.exports = { module.exports = {
name: 'staffapply', name: 'staffapply',
@@ -23,18 +23,28 @@ module.exports = {
const guild = interaction.guild; const guild = interaction.guild;
const embedColor = Number(color.replace("#", "0x")); const embedColor = Number(color.replace("#", "0x"));
const userRoles = interaction.member.roles.cache; const userRoles = interaction.member.roles.cache;
const mojangAPI = "https://api.mojang.com/users/profiles/minecraft/"
const setting = await settings.findOne({ name: "staffAppStatus" }) const setting = await settings.findOne({ name: "staffAppStatus" })
const status = setting.value; const status = setting.value;
const staffQuestions = questions.staff
function sq(n) {
return staffQuestions[n - 1].q
}
function rq(n) {
return staffQuestions[n - 1].r
}
if (interaction.customId === "staffapply") { if (interaction.customId === "staffapply") {
await interaction.deferReply({ ephemeral: true }); await interaction.deferReply({ ephemeral: true });
if (user.id !== dev) {
if (status === "0") { if (status === "0") {
await interaction.editReply({ content: "Staff applications are currently closed.", ephemeral: true }); await interaction.editReply({ content: "Staff applications are currently closed.", ephemeral: true });
return return
} }
}
if (!userRoles.has(guildRole)) { if (!userRoles.has(guildRole)) {
await interaction.editReply({ content: "You must be a member of the guild to apply for staff.", ephemeral: true }); await interaction.editReply({ content: "You must be a member of the guild to apply for staff.", ephemeral: true });
@@ -104,7 +114,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 1**", title: "**Question 1**",
description: sq1 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + ignM + "`", description: sq(1) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + ignM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 5 minutes to respond to this message." text: "You have 5 minutes to respond to this message."
@@ -137,9 +147,8 @@ module.exports = {
}) })
return return
} }
try { const uuid = await getUUID(answer1.first().content)
await fetch(mojangAPI + answer1.first().content) if (!uuid) {
} catch (error) {
await user.send({ await user.send({
embeds: [{ embeds: [{
description: "That is not a valid Minecraft username.\n" + description: "That is not a valid Minecraft username.\n" +
@@ -155,7 +164,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 2**", title: "**Question 2**",
description: sq2 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n" + "`(64 characters max)`", description: sq(2) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n" + "`(64 characters max)`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 15 minutes to respond to this message." text: "You have 15 minutes to respond to this message."
@@ -194,7 +203,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 3**", title: "**Question 3**",
description: sq3 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`", description: sq(3) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 15 minutes to respond to this message." text: "You have 15 minutes to respond to this message."
@@ -232,7 +241,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 4**", title: "**Question 4**",
description: sq4 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`", description: sq(4) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 15 minutes to respond to this message." text: "You have 15 minutes to respond to this message."
@@ -270,7 +279,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 5**", title: "**Question 5**",
description: sq5 + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`", description: sq(5) + "\n\nPlease type your answer below or type `cancel` to cancel your application.\n`" + largeM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
text: "You have 15 minutes to respond to this message." text: "You have 15 minutes to respond to this message."
@@ -308,7 +317,7 @@ module.exports = {
await user.send({ await user.send({
embeds: [{ embeds: [{
title: "**Question 6**", title: "**Question 6**",
description: sq6 + "\n\nPlease type your answer below or type `cancel` to cancel your application." + description: sq(6) + "\n\nPlease type your answer below or type `cancel` to cancel your application." +
"`(We expect a longer answer here)`\n`" + largeM + "`", "`(We expect a longer answer here)`\n`" + largeM + "`",
color: embedColor, color: embedColor,
footer: { footer: {
@@ -375,9 +384,6 @@ module.exports = {
}] }]
}) })
const userCheck = await fetch(mojangAPI + answer1_1)
const uuid = userCheck.data.id
const newStaffApp = new staffapp({ const newStaffApp = new staffapp({
_id: new mongoose.Types.ObjectId(), _id: new mongoose.Types.ObjectId(),
userID: user.id, userID: user.id,
@@ -398,27 +404,27 @@ module.exports = {
}, },
fields: [ fields: [
{ {
name: rsq1, name: rq(1),
value: "```" + answer1_1 + "```" value: "```" + answer1_1 + "```"
}, },
{ {
name: rsq2, name: rq(2),
value: "```" + answer2_1 + "```" value: "```" + answer2_1 + "```"
}, },
{ {
name: rsq3, name: rq(3),
value: "```" + answer3_1 + "```" value: "```" + answer3_1 + "```"
}, },
{ {
name: rsq4, name: rq(4),
value: "```" + answer4_1 + "```" value: "```" + answer4_1 + "```"
}, },
{ {
name: rsq5, name: rq(5),
value: "```" + answer5_1 + "```" value: "```" + answer5_1 + "```"
}, },
{ {
name: rsq6, name: rq(6),
value: "```" + answer6_1 + "```" value: "```" + answer6_1 + "```"
} }

View File

@@ -1,5 +1,4 @@
const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require('discord.js') const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require('discord.js')
const { color } = require('../../config/options.json')
module.exports = { module.exports = {
name: 'verify', name: 'verify',

View File

@@ -1,8 +1,6 @@
const mongoose = require('mongoose');
const waitinglist = require('../../schemas/waitinglistSchema.js'); const waitinglist = require('../../schemas/waitinglistSchema.js');
const key = process.env.HYPIXELAPIKEY; const { getGuild } = require('../../utils/utils.js');
const { hypixelGuildID } = require("../../config/options.json") const { hypixelGuildID } = require("../../config/options.json")
const fetch = require("axios");
module.exports = { module.exports = {
name: 'waitinglistupdate', name: 'waitinglistupdate',
@@ -19,15 +17,13 @@ module.exports = {
const message = interaction.message; const message = interaction.message;
const embed = message.embeds[0]; const embed = message.embeds[0];
const accepted = await waitinglist.find() const accepted = await waitinglist.find()
const guildAPI = "https://api.hypixel.net/guild"
const guild = guildAPI + "?key=" + key + "&player="
for (let i = 0; i < accepted.length; i++) { for (let i = 0; i < accepted.length; i++) {
const uuid = accepted[i].uuid const uuid = accepted[i].uuid
const check = await fetch(guild + uuid) const guild = await getGuild(uuid)
if (check.data.guild && check.data.guild._id === hypixelGuildID) { if (guild && guild._id === hypixelGuildID) {
await waitinglist.findOneAndDelete({ uuid: uuid }) await waitinglist.findOneAndDelete({ uuid: uuid })
continue continue
} }

View File

@@ -1,9 +1,6 @@
const { InteractionType, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js'); const { InteractionType, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
const { color } = require('../../config/options.json'); const { color } = require('../../config/options.json');
const mongoose = require('mongoose');
const guildapp = require('../../schemas/guildAppSchema.js'); const guildapp = require('../../schemas/guildAppSchema.js');
const fs = require('fs');
const path = require('path');
module.exports = { module.exports = {
name: 'denyreasonbox', name: 'denyreasonbox',

View File

@@ -1,9 +1,6 @@
const { InteractionType, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js'); const { InteractionType, EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
const { color } = require('../../config/options.json'); const { color } = require('../../config/options.json');
const mongoose = require('mongoose');
const staffapp = require('../../schemas/staffAppSchema.js'); const staffapp = require('../../schemas/staffAppSchema.js');
const fs = require('fs');
const path = require('path');
module.exports = { module.exports = {
name: 'staffdenyreasonbox', name: 'staffdenyreasonbox',

View File

@@ -1,4 +1,3 @@
const { Events } = require('discord.js');
const { botLogChannel, color } = require('../../config/options.json'); const { botLogChannel, color } = require('../../config/options.json');
module.exports = { module.exports = {