Added eslintrc config and updated all files to it
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
const { color } = require('../../config/options.json');
|
||||
const guildapp = require('../../schemas/guildAppSchema.js');
|
||||
const { bwfkdr, bwstars, bwwins, swstars, duelswins, duelswlr } = require('../../config/reqs.json');
|
||||
const { hypixelLevel, bedwarsLevel, skywarsLevel, getPlayer, getGuild, getHeadURL } = require("../../utils/utils.js");
|
||||
const { color } = require("../../config/options.json")
|
||||
const guildapp = require("../../schemas/guildAppSchema.js")
|
||||
const { bwfkdr, bwstars, bwwins, swstars, duelswins, duelswlr } = require("../../config/reqs.json")
|
||||
const { hypixelLevel, bedwarsLevel, skywarsLevel, getPlayer, getGuild, getHeadURL } = require("../../utils/utils.js")
|
||||
|
||||
module.exports = {
|
||||
name: 'checkstats',
|
||||
description: 'Check your stats.',
|
||||
type: 'button',
|
||||
name: "checkstats",
|
||||
description: "Check your stats.",
|
||||
type: "button",
|
||||
|
||||
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
await interaction.deferReply();
|
||||
await interaction.deferReply()
|
||||
|
||||
const message = interaction.message;
|
||||
const embed = message.embeds[0];
|
||||
const message = interaction.message
|
||||
const embed = message.embeds[0]
|
||||
const applicantId = embed.footer.text.split(" ")[1]
|
||||
const guildappdata = await guildapp.findOne({ userID: applicantId })
|
||||
const uuid = guildappdata.uuid;
|
||||
const embedColor = Number(color.replace("#", "0x"));
|
||||
const uuid = guildappdata.uuid
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const player = await getPlayer(uuid)
|
||||
if (!player) {
|
||||
@@ -28,34 +28,34 @@ module.exports = {
|
||||
description: "That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
});
|
||||
return;
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const ign = player.playername
|
||||
const head = await getHeadURL(ign)
|
||||
const rank2 = player.newPackageRank;
|
||||
const monthlyRank = player.monthlyPackageRank;
|
||||
const rank2 = player.newPackageRank
|
||||
const monthlyRank = player.monthlyPackageRank
|
||||
|
||||
let rank = ""
|
||||
if (rank2 === 'VIP') {
|
||||
if (rank2 === "VIP") {
|
||||
rank = "[VIP] "
|
||||
} else if (rank2 === 'VIP_PLUS') {
|
||||
} else if (rank2 === "VIP_PLUS") {
|
||||
rank = "[VIP+] "
|
||||
} else if (rank2 === 'MVP') {
|
||||
} else if (rank2 === "MVP") {
|
||||
rank = "[MVP] "
|
||||
} else if (rank2 === 'MVP_PLUS' && monthlyRank === 'NONE') {
|
||||
} else if (rank2 === "MVP_PLUS" && monthlyRank === "NONE") {
|
||||
rank = "[MVP+] "
|
||||
} else if (rank2 === 'MVP_PLUS' && monthlyRank === 'SUPERSTAR') {
|
||||
} else if (rank2 === "MVP_PLUS" && monthlyRank === "SUPERSTAR") {
|
||||
rank = "[MVP++] "
|
||||
}
|
||||
|
||||
const guild = await getGuild(uuid)
|
||||
let guildName = ""
|
||||
if (!guild) {
|
||||
guildName = "None";
|
||||
guildName = "None"
|
||||
} else {
|
||||
guildName = guild.name;
|
||||
guildName = guild.name
|
||||
}
|
||||
|
||||
let guildTag = ""
|
||||
@@ -68,35 +68,35 @@ module.exports = {
|
||||
}
|
||||
|
||||
//bedwars level
|
||||
const hsbwexp = player.stats.Bedwars.Experience;
|
||||
const hsbwstars = bedwarsLevel(hsbwexp);
|
||||
const hsbwexp = player.stats.Bedwars.Experience
|
||||
const hsbwstars = bedwarsLevel(hsbwexp)
|
||||
// bedwars fkdr
|
||||
const hsbwfk = player.stats.Bedwars.final_kills_bedwars;
|
||||
const hsbwfd = player.stats.Bedwars.final_deaths_bedwars;
|
||||
const hsbwfkdr = hsbwfk / hsbwfd;
|
||||
const hsbwfk = player.stats.Bedwars.final_kills_bedwars
|
||||
const hsbwfd = player.stats.Bedwars.final_deaths_bedwars
|
||||
const hsbwfkdr = hsbwfk / hsbwfd
|
||||
// bedwars wins
|
||||
const hsbwwins = player.stats.Bedwars.wins_bedwars;
|
||||
const hsbwwins = player.stats.Bedwars.wins_bedwars
|
||||
// skywars level
|
||||
const hsswexp = player.stats.SkyWars.skywars_experience;
|
||||
const hsswstars = skywarsLevel(hsswexp);
|
||||
const hsswexp = player.stats.SkyWars.skywars_experience
|
||||
const hsswstars = skywarsLevel(hsswexp)
|
||||
// skywars kdr
|
||||
const hsswkills = player.stats.SkyWars.kills;
|
||||
const hsswdeaths = player.stats.SkyWars.deaths;
|
||||
const hsswkd = hsswkills / hsswdeaths;
|
||||
const hsswkills = player.stats.SkyWars.kills
|
||||
const hsswdeaths = player.stats.SkyWars.deaths
|
||||
const hsswkd = hsswkills / hsswdeaths
|
||||
//skywars wins
|
||||
const hsswwins = player.stats.SkyWars.wins;
|
||||
const hsswwins = player.stats.SkyWars.wins
|
||||
// dueks kdr
|
||||
const hsduelskills = player.stats.Duels.kills
|
||||
const hsduelsdeaths = player.stats.Duels.deaths
|
||||
const hsduelskd = hsduelskills / hsduelsdeaths
|
||||
// duels wins
|
||||
const hsduelswins = player.stats.Duels.wins;
|
||||
const hsduelswins = player.stats.Duels.wins
|
||||
// duels wlr
|
||||
const hsduelslosses = player.stats.Duels.losses;
|
||||
const hsduelswlr = hsduelswins / hsduelslosses;
|
||||
const hsduelslosses = player.stats.Duels.losses
|
||||
const hsduelswlr = hsduelswins / hsduelslosses
|
||||
// network level
|
||||
const hypixelExp = player.networkExp;
|
||||
const level = hypixelLevel(hypixelExp);
|
||||
const hypixelExp = player.networkExp
|
||||
const level = hypixelLevel(hypixelExp)
|
||||
|
||||
let bwtitle = ""
|
||||
let swtitle = ""
|
||||
@@ -168,6 +168,6 @@ module.exports = {
|
||||
}
|
||||
]
|
||||
}]
|
||||
});
|
||||
})
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
const { ActionRowBuilder, ButtonStyle, ButtonBuilder } = require('discord.js');
|
||||
const { color } = require('../../config/options.json');
|
||||
const mongoose = require("mongoose");
|
||||
const guildapp = require('../../schemas/guildAppSchema.js');
|
||||
const waitingList = require('../../schemas/waitinglistSchema.js');
|
||||
const { waitingListRole } = require('../../config/roles.json');
|
||||
const { ActionRowBuilder, ButtonStyle, ButtonBuilder } = require("discord.js")
|
||||
const { color } = require("../../config/options.json")
|
||||
const mongoose = require("mongoose")
|
||||
const guildapp = require("../../schemas/guildAppSchema.js")
|
||||
const waitingList = require("../../schemas/waitinglistSchema.js")
|
||||
const { waitingListRole } = require("../../config/roles.json")
|
||||
|
||||
module.exports = {
|
||||
name: 'guildapplicationaccept',
|
||||
description: 'Accept a guild application.',
|
||||
type: 'button',
|
||||
name: "guildapplicationaccept",
|
||||
description: "Accept a guild application.",
|
||||
type: "button",
|
||||
|
||||
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
await interaction.deferReply();
|
||||
await interaction.deferReply()
|
||||
|
||||
const user = interaction.user;
|
||||
const guild = interaction.guild;
|
||||
const embedColor = Number(color.replace("#", "0x"));
|
||||
const user = interaction.user
|
||||
const guild = interaction.guild
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const message = interaction.message;
|
||||
const embed = message.embeds[0];
|
||||
const message = interaction.message
|
||||
const embed = message.embeds[0]
|
||||
const applicantId = embed.footer.text.split(" ")[1]
|
||||
|
||||
const applicantIGN1 = embed.fields[0].value;
|
||||
const applicantIGN = applicantIGN1.replaceAll("`", "");
|
||||
const applicantIGN1 = embed.fields[0].value
|
||||
const applicantIGN = applicantIGN1.replaceAll("`", "")
|
||||
|
||||
const applicant = await guild.members.fetch(applicantId)
|
||||
const applicantUsername = applicant.user.username + "#" + applicant.user.discriminator;
|
||||
const applicantUsername = applicant.user.username + "#" + applicant.user.discriminator
|
||||
|
||||
await message.edit({
|
||||
components: [
|
||||
@@ -50,18 +50,18 @@ module.exports = {
|
||||
.setDisabled(true)
|
||||
)
|
||||
]
|
||||
});
|
||||
})
|
||||
|
||||
await applicant.send({
|
||||
embeds: [{
|
||||
description: `Your application for the Illegitimate guild has been accepted.`,
|
||||
description: "Your application for the Illegitimate guild has been accepted.",
|
||||
color: embedColor
|
||||
}]
|
||||
});
|
||||
})
|
||||
|
||||
const applicantEntry = await guildapp.findOne({ userID: applicantId })
|
||||
const applicantUUID = applicantEntry.uuid;
|
||||
const time = Date.now();
|
||||
const applicantUUID = applicantEntry.uuid
|
||||
const time = Date.now()
|
||||
|
||||
const waitingListAdd = new waitingList({
|
||||
_id: new mongoose.Types.ObjectId(),
|
||||
@@ -69,12 +69,12 @@ module.exports = {
|
||||
uuid: applicantUUID,
|
||||
IGN: applicantIGN,
|
||||
timestamp: time
|
||||
});
|
||||
})
|
||||
|
||||
await waitingListAdd.save();
|
||||
await waitingListAdd.save()
|
||||
|
||||
await applicant.roles.add(waitingListRole);
|
||||
await guildapp.findOneAndDelete({ userID: applicantId });
|
||||
await applicant.roles.add(waitingListRole)
|
||||
await guildapp.findOneAndDelete({ userID: applicantId })
|
||||
|
||||
|
||||
await interaction.editReply({
|
||||
@@ -90,6 +90,6 @@ module.exports = {
|
||||
text: "ID: " + applicant.id
|
||||
}
|
||||
}]
|
||||
});
|
||||
})
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require('discord.js');
|
||||
const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require("discord.js")
|
||||
|
||||
module.exports = {
|
||||
name: 'guildapplicationdeny',
|
||||
description: 'Deny a guild application.',
|
||||
type: 'button',
|
||||
name: "guildapplicationdeny",
|
||||
description: "Deny a guild application.",
|
||||
type: "button",
|
||||
|
||||
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle('Deny Reason')
|
||||
.setCustomId('denyreasonbox')
|
||||
.setTitle("Deny Reason")
|
||||
.setCustomId("denyreasonbox")
|
||||
.setComponents(
|
||||
new ActionRowBuilder().setComponents(
|
||||
new TextInputBuilder()
|
||||
.setLabel('Deny Reason')
|
||||
.setCustomId('denyreason')
|
||||
.setLabel("Deny Reason")
|
||||
.setCustomId("denyreason")
|
||||
.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)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
const { ButtonBuilder, ButtonStyle, ActionRowBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { color } = require('../../config/options.json');
|
||||
const { largeM, smallM, ignM } = require('../../config/limitmessages.json')
|
||||
const { applicationsChannel } = require('../../config/options.json');
|
||||
const questions = require('../../config/questions.json');
|
||||
const { guildRole } = require('../../config/roles.json')
|
||||
const { getUUID } = require('../../utils/utils.js')
|
||||
const mongoose = require('mongoose');
|
||||
const guildapp = require('../../schemas/guildAppSchema.js');
|
||||
const { ButtonBuilder, ButtonStyle, ActionRowBuilder, EmbedBuilder } = require("discord.js")
|
||||
const { color } = require("../../config/options.json")
|
||||
const { largeM, smallM, ignM } = require("../../config/limitmessages.json")
|
||||
const { applicationsChannel } = require("../../config/options.json")
|
||||
const questions = require("../../config/questions.json")
|
||||
const { guildRole } = require("../../config/roles.json")
|
||||
const { getUUID } = require("../../utils/utils.js")
|
||||
const mongoose = require("mongoose")
|
||||
const guildapp = require("../../schemas/guildAppSchema.js")
|
||||
|
||||
module.exports = {
|
||||
name: 'guildapply',
|
||||
description: 'Guild application button.',
|
||||
type: 'button',
|
||||
name: "guildapply",
|
||||
description: "Guild application button.",
|
||||
type: "button",
|
||||
|
||||
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
const user = interaction.user;
|
||||
const guild = interaction.guild;
|
||||
const embedColor = Number(color.replace("#", "0x"));
|
||||
const userRoles = guild.members.cache.get(user.id).roles.cache.map(role => role.id);
|
||||
const user = interaction.user
|
||||
const guild = interaction.guild
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const userRoles = guild.members.cache.get(user.id).roles.cache.map(role => role.id)
|
||||
const guildQuestions = questions.guild
|
||||
|
||||
function qu(n) {
|
||||
@@ -31,19 +31,19 @@ module.exports = {
|
||||
return guildQuestions[n - 1].r
|
||||
}
|
||||
|
||||
if (interaction.customId === 'guildapply') {
|
||||
if (interaction.customId === "guildapply") {
|
||||
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
|
||||
if (userRoles.includes(guildRole)) {
|
||||
await interaction.editReply({ content: "You are already a member of the guild.", ephemeral: true });
|
||||
await interaction.editReply({ content: "You are already a member of the guild.", ephemeral: true })
|
||||
return
|
||||
}
|
||||
|
||||
const application = await guildapp.findOne({ userID: user.id });
|
||||
const application = await guildapp.findOne({ userID: user.id })
|
||||
|
||||
if (application) {
|
||||
await interaction.editReply({ content: "You already have an application in progress.", ephemeral: true });
|
||||
await interaction.editReply({ content: "You already have an application in progress.", ephemeral: true })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ module.exports = {
|
||||
try {
|
||||
await user.send({
|
||||
embeds: [{
|
||||
title: 'Guild Application',
|
||||
title: "Guild Application",
|
||||
description: "Please answer the following questions to apply for the guild.\n" +
|
||||
"If you wish to cancel your application, please type `cancel` at any time.\n" +
|
||||
"If you wish to proceed with your application, please type `yes`.\n\n" +
|
||||
@@ -70,7 +70,7 @@ module.exports = {
|
||||
}]
|
||||
})
|
||||
} catch (error) {
|
||||
await interaction.editReply({ content: "Please enable your DMs.", ephemeral: true });
|
||||
await interaction.editReply({ content: "Please enable your DMs.", ephemeral: true })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -81,17 +81,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60
|
||||
});
|
||||
})
|
||||
if (input.size === 0) {
|
||||
await user.send({ embeds: [tooLong] });
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (input.first().content.toLowerCase() !== 'yes') {
|
||||
await user.send({ embeds: [cancelled] });
|
||||
if (input.first().content.toLowerCase() !== "yes") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (input.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -110,17 +110,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 5,
|
||||
});
|
||||
})
|
||||
if (answer1.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer1.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer1.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer1.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer1.first().content > 16) {
|
||||
@@ -160,17 +160,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer2.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer2.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer2.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer2.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer2.first().content.size > 8) {
|
||||
@@ -199,17 +199,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer3.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer3.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer3.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer3.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer3.first().content > 128) {
|
||||
@@ -238,17 +238,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer4.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer4.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer4.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer4.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer4.first().content > 256) {
|
||||
@@ -276,17 +276,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer5.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer5.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer5.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer5.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer5.first().content > 128) {
|
||||
@@ -314,17 +314,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer6.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer6.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer6.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer6.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer6.first().content > 256) {
|
||||
@@ -352,17 +352,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer7.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer7.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer7.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer7.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer7.first().content > 128) {
|
||||
@@ -390,17 +390,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer8.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer8.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer8.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer8.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer8.first().content > 64) {
|
||||
@@ -424,17 +424,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 5
|
||||
});
|
||||
})
|
||||
if (final.size === 0) {
|
||||
await user.send({ embeds: [tooLong] });
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (final.first().content.toLowerCase() !== 'yes') {
|
||||
await user.send({ embeds: [cancelled] });
|
||||
if (final.first().content.toLowerCase() !== "yes") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (final.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ module.exports = {
|
||||
|
||||
await newGuildApp.save()
|
||||
|
||||
const channel = guild.channels.cache.get(applicationsChannel);
|
||||
const channel = guild.channels.cache.get(applicationsChannel)
|
||||
await channel.send({
|
||||
embeds: [{
|
||||
title: user.username + "#" + user.discriminator + " - Guild Application",
|
||||
@@ -516,7 +516,7 @@ module.exports = {
|
||||
.setStyle(ButtonStyle.Secondary)
|
||||
)
|
||||
]
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
const { ButtonBuilder, ActionRowBuilder, ButtonStyle, EmbedBuilder } = require("discord.js");
|
||||
const { gm, manager, moderator, beast, member, trialmember, guildStaff, guildRole } = require("../../config/roles.json");
|
||||
const { ignM, smallM, largeM } = require("../../config/limitmessages.json");
|
||||
const { ia1, ia2, ia3, ria1, ria2, ria3 } = require("../../config/questions.json");
|
||||
const { color, inactivityLogChannel } = require("../../config/options.json");
|
||||
const guildRoles = [gm, manager, moderator, beast, member, trialmember, guildStaff, guildRole];
|
||||
const { ButtonBuilder, ActionRowBuilder, ButtonStyle, EmbedBuilder } = require("discord.js")
|
||||
const { gm, manager, moderator, beast, member, trialmember, guildStaff, guildRole } = require("../../config/roles.json")
|
||||
const { ignM, smallM, largeM } = require("../../config/limitmessages.json")
|
||||
const { ia1, ia2, ia3, ria1, ria2, ria3 } = require("../../config/questions.json")
|
||||
const { color, inactivityLogChannel } = require("../../config/options.json")
|
||||
const guildRoles = [gm, manager, moderator, beast, member, trialmember, guildStaff, guildRole]
|
||||
|
||||
module.exports = {
|
||||
name: "guildinactivitylog",
|
||||
@@ -13,28 +13,28 @@ module.exports = {
|
||||
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||
|
||||
async execute(interaction) {
|
||||
const guild = interaction.guild;
|
||||
const user = interaction.user;
|
||||
const embedColor = Number(color.replace("#", "0x"));
|
||||
const userRoles = guild.members.cache.get(user.id).roles.cache;
|
||||
const mojangAPI = "https://api.mojang.com/users/profiles/minecraft/";
|
||||
const guild = interaction.guild
|
||||
const user = interaction.user
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const userRoles = guild.members.cache.get(user.id).roles.cache
|
||||
const mojangAPI = "https://api.mojang.com/users/profiles/minecraft/"
|
||||
|
||||
if (!userRoles.some((role) => guildRoles.includes(role.id))) {
|
||||
return await interaction.reply({
|
||||
content: "Only guild members can use this button.",
|
||||
ephemeral: true
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
const tooLong = new EmbedBuilder()
|
||||
.setDescription("You took too long to respond.")
|
||||
.setColor(embedColor);
|
||||
.setColor(embedColor)
|
||||
const cancelled = new EmbedBuilder()
|
||||
.setDescription("You have cancelled your application.")
|
||||
.setColor(embedColor);
|
||||
.setColor(embedColor)
|
||||
const attachments = new EmbedBuilder()
|
||||
.setDescription("You have uploaded an attachment. Please do not upload images, videos, or GIFS.")
|
||||
.setColor(embedColor);
|
||||
.setColor(embedColor)
|
||||
|
||||
try {
|
||||
await user.send({
|
||||
@@ -46,29 +46,29 @@ module.exports = {
|
||||
"You have a minute to respond to this message.",
|
||||
color: embedColor
|
||||
}]
|
||||
});
|
||||
})
|
||||
} catch (error) {
|
||||
return await interaction.reply({ content: "Please enable your DMs.", ephemeral: true });
|
||||
return await interaction.reply({ content: "Please enable your DMs.", ephemeral: true })
|
||||
}
|
||||
|
||||
await interaction.reply({ content: "Please check your DMs.", ephemeral: true });
|
||||
await interaction.reply({ content: "Please check your DMs.", ephemeral: true })
|
||||
|
||||
const input = await user.dmChannel.awaitMessages({
|
||||
filter: (m) => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60
|
||||
});
|
||||
})
|
||||
if (input.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
return;
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (input.size === 0) {
|
||||
await user.send({ embeds: [tooLong] });
|
||||
return;
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (input.first().content.toLowerCase() !== "yes") {
|
||||
await user.send({ embeds: [cancelled] });
|
||||
return;
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
|
||||
await user.send({
|
||||
@@ -80,16 +80,16 @@ module.exports = {
|
||||
text: "You have 5 minutes to respond to this message."
|
||||
}
|
||||
}]
|
||||
});
|
||||
})
|
||||
|
||||
const answer1 = await user.dmChannel.awaitMessages({
|
||||
filter: (m) => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 5
|
||||
});
|
||||
})
|
||||
if (answer1.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
return;
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer1.first().content > 16) {
|
||||
await user.send({
|
||||
@@ -97,29 +97,29 @@ module.exports = {
|
||||
description: "Max character limit is 16.",
|
||||
color: embedColor
|
||||
}]
|
||||
});
|
||||
return;
|
||||
})
|
||||
return
|
||||
}
|
||||
try {
|
||||
await fetch(mojangAPI + answer1.first().content);
|
||||
await fetch(mojangAPI + answer1.first().content)
|
||||
} catch (error) {
|
||||
await user.send({
|
||||
embeds: [{
|
||||
description: "That is not a valid Minecraft username.\n" + "Application cancelled.",
|
||||
color: embedColor
|
||||
}]
|
||||
});
|
||||
return;
|
||||
})
|
||||
return
|
||||
}
|
||||
if (answer1.size === 0) {
|
||||
await user.send({ embeds: [tooLong] });
|
||||
return;
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer1.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] });
|
||||
return;
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
const answer1_1 = answer1.first().content;
|
||||
const answer1_1 = answer1.first().content
|
||||
|
||||
await user.send({
|
||||
embeds: [{
|
||||
@@ -130,15 +130,15 @@ module.exports = {
|
||||
text: "You have 5 minutes to respond to this message."
|
||||
}
|
||||
}]
|
||||
});
|
||||
})
|
||||
const answer2 = await user.dmChannel.awaitMessages({
|
||||
filter: (m) => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 5
|
||||
});
|
||||
})
|
||||
if (answer2.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
return;
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer2.first().content > 128) {
|
||||
await user.send({
|
||||
@@ -146,18 +146,18 @@ module.exports = {
|
||||
description: "Max character limit is 128.",
|
||||
color: embedColor
|
||||
}]
|
||||
});
|
||||
return;
|
||||
})
|
||||
return
|
||||
}
|
||||
if (answer1.size === 0) {
|
||||
await user.send({ embeds: [tooLong] });
|
||||
return;
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer1.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] });
|
||||
return;
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
const answer2_1 = answer1.first().content;
|
||||
const answer2_1 = answer1.first().content
|
||||
|
||||
await user.send({
|
||||
embeds: [{
|
||||
@@ -168,15 +168,15 @@ module.exports = {
|
||||
text: "You have 15 minutes to respond to this message."
|
||||
}
|
||||
}]
|
||||
});
|
||||
})
|
||||
const answer3 = await user.dmChannel.awaitMessages({
|
||||
filter: (m) => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer3.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
return;
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer3.first().content > 256) {
|
||||
await user.send({
|
||||
@@ -184,18 +184,18 @@ module.exports = {
|
||||
description: "Max character limit is 256",
|
||||
color: embedColor
|
||||
}]
|
||||
});
|
||||
return;
|
||||
})
|
||||
return
|
||||
}
|
||||
if (answer1.size === 0) {
|
||||
await user.send({ embeds: [tooLong] });
|
||||
return;
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer1.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] });
|
||||
return;
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
const answer3_1 = answer1.first().content;
|
||||
const answer3_1 = answer1.first().content
|
||||
|
||||
await user.send({
|
||||
embeds: [{
|
||||
@@ -207,17 +207,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 5
|
||||
});
|
||||
})
|
||||
if (final.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (final.size === 0) {
|
||||
await user.send({ embeds: [tooLong] });
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (final.first().content.toLowerCase() !== 'yes') {
|
||||
await user.send({ embeds: [cancelled] });
|
||||
if (final.first().content.toLowerCase() !== "yes") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ module.exports = {
|
||||
}]
|
||||
})
|
||||
|
||||
const appChannel = await guild.channels.cache.get(inactivityLogChannel);
|
||||
const appChannel = await guild.channels.cache.get(inactivityLogChannel)
|
||||
|
||||
await appChannel.send({
|
||||
embeds: [{
|
||||
@@ -268,6 +268,6 @@ module.exports = {
|
||||
.setStyle(ButtonStyle.Danger),
|
||||
)
|
||||
]
|
||||
});
|
||||
})
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = {
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
await interaction.reply({ content: "This button is currently disabled.", ephemeral: true });
|
||||
await interaction.reply({ content: "This button is currently disabled.", ephemeral: true })
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = {
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
await interaction.reply({ content: "This button is currently disabled.", ephemeral: true });
|
||||
await interaction.reply({ content: "This button is currently disabled.", ephemeral: true })
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,33 @@
|
||||
const { ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js');
|
||||
const { color } = require('../../config/options.json');
|
||||
const staffapp = require('../../schemas/staffAppSchema.js');
|
||||
const { ActionRowBuilder, ButtonBuilder, ButtonStyle } = require("discord.js")
|
||||
const { color } = require("../../config/options.json")
|
||||
const staffapp = require("../../schemas/staffAppSchema.js")
|
||||
|
||||
module.exports = {
|
||||
name: 'staffapplicationaccept',
|
||||
description: 'Accept a staff application.',
|
||||
type: 'button',
|
||||
name: "staffapplicationaccept",
|
||||
description: "Accept a staff application.",
|
||||
type: "button",
|
||||
|
||||
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
const user = interaction.user;
|
||||
const guild = interaction.guild;
|
||||
const embedColor = Number(color.replace("#", "0x"));
|
||||
const user = interaction.user
|
||||
const guild = interaction.guild
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
|
||||
const message = interaction.message;
|
||||
const embed = message.embeds[0];
|
||||
const message = interaction.message
|
||||
const embed = message.embeds[0]
|
||||
const applicantId = embed.footer.text.split(" ")[1]
|
||||
|
||||
const applicant = await guild.members.fetch(applicantId)
|
||||
const applicantUsername = applicant.user.username + "#" + applicant.user.discriminator;
|
||||
const applicantUsername = applicant.user.username + "#" + applicant.user.discriminator
|
||||
|
||||
await applicant.send({
|
||||
embeds: [{
|
||||
description: `Your application for the Illegitimate staff team has been accepted.`,
|
||||
description: "Your application for the Illegitimate staff team has been accepted.",
|
||||
color: embedColor
|
||||
}]
|
||||
});
|
||||
})
|
||||
|
||||
await message.edit({
|
||||
components: [
|
||||
@@ -44,9 +44,9 @@ module.exports = {
|
||||
.setDisabled(true)
|
||||
)
|
||||
]
|
||||
});
|
||||
})
|
||||
|
||||
await staffapp.findOneAndDelete({ userId: applicantId });
|
||||
await staffapp.findOneAndDelete({ userId: applicantId })
|
||||
|
||||
await interaction.reply({
|
||||
embeds: [{
|
||||
@@ -61,7 +61,7 @@ module.exports = {
|
||||
text: "ID: " + applicantId
|
||||
}
|
||||
}]
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require('discord.js');
|
||||
const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require("discord.js")
|
||||
|
||||
module.exports = {
|
||||
name: 'staffapplicationdeny',
|
||||
description: 'Deny a guild application.',
|
||||
type: 'button',
|
||||
name: "staffapplicationdeny",
|
||||
description: "Deny a guild application.",
|
||||
type: "button",
|
||||
|
||||
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
const modal = new ModalBuilder()
|
||||
.setTitle('Deny Reason')
|
||||
.setCustomId('staffdenyreasonbox')
|
||||
.setTitle("Deny Reason")
|
||||
.setCustomId("staffdenyreasonbox")
|
||||
.setComponents(
|
||||
new ActionRowBuilder().setComponents(
|
||||
new TextInputBuilder()
|
||||
.setLabel('Deny Reason')
|
||||
.setCustomId('staffdenyreason')
|
||||
.setLabel("Deny Reason")
|
||||
.setCustomId("staffdenyreason")
|
||||
.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)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
const { ButtonBuilder, ButtonStyle, ActionRowBuilder, EmbedBuilder } = require('discord.js');
|
||||
const { color } = require('../../config/options.json');
|
||||
const { largeM, ignM } = require('../../config/limitmessages.json')
|
||||
const { staffApplicationsChannel } = require('../../config/options.json');
|
||||
const questions = require('../../config/questions.json');
|
||||
const { guildRole, guildStaff } = require('../../config/roles.json')
|
||||
const mongoose = require('mongoose');
|
||||
const staffapp = require('../../schemas/staffAppSchema.js');
|
||||
const settings = require("../../schemas/settingsSchema.js");
|
||||
const { getUUID } = require('../../utils/utils.js')
|
||||
const { ButtonBuilder, ButtonStyle, ActionRowBuilder, EmbedBuilder } = require("discord.js")
|
||||
const { color } = require("../../config/options.json")
|
||||
const { largeM, ignM } = require("../../config/limitmessages.json")
|
||||
const { staffApplicationsChannel } = require("../../config/options.json")
|
||||
const questions = require("../../config/questions.json")
|
||||
const { guildRole, guildStaff } = require("../../config/roles.json")
|
||||
const mongoose = require("mongoose")
|
||||
const staffapp = require("../../schemas/staffAppSchema.js")
|
||||
const settings = require("../../schemas/settingsSchema.js")
|
||||
const { getUUID } = require("../../utils/utils.js")
|
||||
const dev = process.env.DEV
|
||||
|
||||
module.exports = {
|
||||
name: 'staffapply',
|
||||
description: 'Apply for the staff team.',
|
||||
type: 'button',
|
||||
name: "staffapply",
|
||||
description: "Apply for the staff team.",
|
||||
type: "button",
|
||||
|
||||
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
const user = interaction.user;
|
||||
const guild = interaction.guild;
|
||||
const embedColor = Number(color.replace("#", "0x"));
|
||||
const userRoles = interaction.member.roles.cache;
|
||||
const user = interaction.user
|
||||
const guild = interaction.guild
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
const userRoles = interaction.member.roles.cache
|
||||
const setting = await settings.findOne({ name: "staffAppStatus" })
|
||||
const status = setting.value;
|
||||
const status = setting.value
|
||||
const staffQuestions = questions.staff
|
||||
|
||||
function sq(n) {
|
||||
@@ -37,29 +37,29 @@ module.exports = {
|
||||
|
||||
if (interaction.customId === "staffapply") {
|
||||
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
|
||||
if (user.id !== dev) {
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
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 })
|
||||
return
|
||||
}
|
||||
|
||||
if (userRoles.has(guildStaff)) {
|
||||
await interaction.editReply({ content: "You are already a staff member.", ephemeral: true });
|
||||
await interaction.editReply({ content: "You are already a staff member.", ephemeral: true })
|
||||
return
|
||||
}
|
||||
|
||||
const application = await staffapp.findOne({ userID: user.id });
|
||||
const application = await staffapp.findOne({ userID: user.id })
|
||||
|
||||
if (application) {
|
||||
await interaction.editReply({ content: "You already have an application in progress.", ephemeral: true });
|
||||
await interaction.editReply({ content: "You already have an application in progress.", ephemeral: true })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ module.exports = {
|
||||
try {
|
||||
await user.send({
|
||||
embeds: [{
|
||||
title: 'Staff Application',
|
||||
title: "Staff Application",
|
||||
description: "Please answer the following questions to apply for staff.\n" +
|
||||
"If you wish to cancel your application, please press type `cancel` at any time.\n" +
|
||||
"If you wish to proceed with your application, please type `yes`.\n\n" +
|
||||
@@ -86,7 +86,7 @@ module.exports = {
|
||||
}]
|
||||
})
|
||||
} catch (error) {
|
||||
await interaction.editReply({ content: "Please enable your DMs.", ephemeral: true });
|
||||
await interaction.editReply({ content: "Please enable your DMs.", ephemeral: true })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -96,17 +96,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60
|
||||
});
|
||||
})
|
||||
if (input.size === 0) {
|
||||
await user.send({ embeds: [tooLong] });
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (input.first().content.toLowerCase() !== 'yes') {
|
||||
await user.send({ embeds: [cancelled] });
|
||||
if (input.first().content.toLowerCase() !== "yes") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (input.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -125,17 +125,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 5,
|
||||
});
|
||||
})
|
||||
if (answer1.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer1.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer1.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer1.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer1.first().content > 16) {
|
||||
@@ -175,17 +175,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer2.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer2.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer2.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer2.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer2.first().content > 64) {
|
||||
@@ -214,17 +214,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer3.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer3.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer3.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer3.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer3.first().content > 256) {
|
||||
@@ -252,17 +252,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer4.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer4.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer4.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer4.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer4.first().content > 256) {
|
||||
@@ -290,17 +290,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer5.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer5.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer5.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer5.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer5.first().content > 256) {
|
||||
@@ -329,17 +329,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 15
|
||||
});
|
||||
})
|
||||
if (answer6.size === 0) {
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (answer6.first().content.toLowerCase() === 'cancel') {
|
||||
if (answer6.first().content.toLowerCase() === "cancel") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (answer6.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
if (answer6.first().content > 256) {
|
||||
@@ -363,17 +363,17 @@ module.exports = {
|
||||
filter: m => m.author.id === user.id,
|
||||
max: 1,
|
||||
time: 1000 * 60 * 5
|
||||
});
|
||||
})
|
||||
if (final.size === 0) {
|
||||
await user.send({ embeds: [tooLong] });
|
||||
await user.send({ embeds: [tooLong] })
|
||||
return
|
||||
}
|
||||
if (final.first().content.toLowerCase() !== 'yes') {
|
||||
await user.send({ embeds: [cancelled] });
|
||||
if (final.first().content.toLowerCase() !== "yes") {
|
||||
await user.send({ embeds: [cancelled] })
|
||||
return
|
||||
}
|
||||
if (final.first().attachments.size > 0) {
|
||||
await user.send({ embeds: [attachments] });
|
||||
await user.send({ embeds: [attachments] })
|
||||
return
|
||||
}
|
||||
|
||||
@@ -391,9 +391,9 @@ module.exports = {
|
||||
})
|
||||
|
||||
await newStaffApp.save()
|
||||
await user.deleteDM();
|
||||
await user.deleteDM()
|
||||
|
||||
const channel = guild.channels.cache.get(staffApplicationsChannel);
|
||||
const channel = guild.channels.cache.get(staffApplicationsChannel)
|
||||
|
||||
await channel.send({
|
||||
embeds: [{
|
||||
@@ -446,7 +446,7 @@ module.exports = {
|
||||
.setStyle(ButtonStyle.Danger)
|
||||
)
|
||||
]
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require('discord.js')
|
||||
const { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } = require("discord.js")
|
||||
|
||||
module.exports = {
|
||||
name: 'verify',
|
||||
description: 'Configure the bot.',
|
||||
type: 'button',
|
||||
name: "verify",
|
||||
description: "Configure the bot.",
|
||||
type: "button",
|
||||
|
||||
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
const waitinglist = require('../../schemas/waitinglistSchema.js');
|
||||
const { getGuild } = require('../../utils/utils.js');
|
||||
const waitinglist = require("../../schemas/waitinglistSchema.js")
|
||||
const { getGuild } = require("../../utils/utils.js")
|
||||
const { hypixelGuildID } = require("../../config/options.json")
|
||||
|
||||
module.exports = {
|
||||
name: 'waitinglistupdate',
|
||||
description: 'Update the waiting list.',
|
||||
type: 'button',
|
||||
name: "waitinglistupdate",
|
||||
description: "Update the waiting list.",
|
||||
type: "button",
|
||||
|
||||
/** @param {import('discord.js').ButtonInteraction} interaction */
|
||||
|
||||
async execute(interaction) {
|
||||
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
await interaction.deferReply({ ephemeral: true })
|
||||
|
||||
const user = interaction.user;
|
||||
const message = interaction.message;
|
||||
const embed = message.embeds[0];
|
||||
const user = interaction.user
|
||||
const message = interaction.message
|
||||
const embed = message.embeds[0]
|
||||
const accepted = await waitinglist.find()
|
||||
|
||||
for (let i = 0; i < accepted.length; i++) {
|
||||
@@ -30,7 +30,7 @@ module.exports = {
|
||||
|
||||
}
|
||||
|
||||
let fields = [];
|
||||
let fields = []
|
||||
|
||||
for (let i = 0; i < accepted.length; i++) {
|
||||
|
||||
@@ -40,7 +40,7 @@ module.exports = {
|
||||
fields.push({
|
||||
name: `${i + 1}. ${accepted[i].IGN}`,
|
||||
value: `TS: <t:${timestamp}:R>`
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
await message.edit({
|
||||
@@ -56,8 +56,8 @@ module.exports = {
|
||||
fields: fields,
|
||||
timestamp: new Date(),
|
||||
}],
|
||||
});
|
||||
})
|
||||
|
||||
await interaction.editReply({ content: 'Updated the waiting list', ephemeral: true });
|
||||
await interaction.editReply({ content: "Updated the waiting list", ephemeral: true })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user