Process of format fixing

This commit is contained in:
2024-01-19 21:36:01 +01:00
parent ee217d5f64
commit 3eed20e788
77 changed files with 1079 additions and 1086 deletions

View File

@@ -4,7 +4,7 @@ import {
ActionRowBuilder,
EmbedBuilder,
GuildMember,
TextChannel,
TextChannel
} from "discord.js"
import { color, staffApplicationsChannel } from "config/options.json"
import { largeM, ignM } from "config/limitmessages.json"
@@ -44,7 +44,7 @@ export = {
if (user.user.id !== env.prod.dev) {
if (status === "0") {
await interaction.editReply(
"Staff applications are currently closed.",
"Staff applications are currently closed."
)
return
}
@@ -52,7 +52,7 @@ export = {
if (!userRoles.has(guildRole)) {
await interaction.editReply(
"You must be a member of the guild to apply for staff.",
"You must be a member of the guild to apply for staff."
)
return
}
@@ -66,7 +66,7 @@ export = {
if (application) {
await interaction.editReply(
"You already have an application in progress.",
"You already have an application in progress."
)
return
}
@@ -79,7 +79,7 @@ export = {
.setColor(embedColor)
const attachments = new EmbedBuilder()
.setDescription(
"You have uploaded an attachment. Please do not upload images, videos, or GIFS.",
"You have uploaded an attachment. Please do not upload images, videos, or GIFS."
)
.setColor(embedColor)
@@ -92,9 +92,9 @@ export = {
"If you wish to proceed with your application, please type `yes` otherwise type `cancel`.\n\n" +
"**Do not upload images, videos, or GIFS.**\n" +
"You have a minute to respond to this message.",
color: embedColor,
},
],
color: embedColor
}
]
})
} catch (error) {
await interaction.editReply("Please enable your DMs.")
@@ -106,7 +106,7 @@ export = {
const input = await user.dmChannel!.awaitMessages({
filter: m => m.author.id === user.user.id,
max: 1,
time: 1000 * 60,
time: 1000 * 60
})
if (input.size === 0) {
await user.send({ embeds: [tooLong] })
@@ -133,15 +133,15 @@ export = {
"`",
color: embedColor,
footer: {
text: "You have 5 minutes to respond to this message.",
},
},
],
text: "You have 5 minutes to respond to this message."
}
}
]
})
const answer1 = await user.dmChannel!.awaitMessages({
filter: m => m.author.id === user.user.id,
max: 1,
time: 1000 * 60 * 5,
time: 1000 * 60 * 5
})
if (answer1.size === 0) {
await user.send({ embeds: [tooLong] })
@@ -160,9 +160,9 @@ export = {
embeds: [
{
description: "Max character limit is 16.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -174,9 +174,9 @@ export = {
description:
"That is not a valid Minecraft username.\n" +
"Application cancelled.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -193,15 +193,15 @@ export = {
"`(64 characters max)`",
color: embedColor,
footer: {
text: "You have 15 minutes to respond to this message.",
},
},
],
text: "You have 15 minutes to respond to this message."
}
}
]
})
const answer2 = await user.dmChannel!.awaitMessages({
filter: m => m.author.id === user.user.id,
max: 1,
time: 1000 * 60 * 15,
time: 1000 * 60 * 15
})
if (answer2.size === 0) {
await user.send({ embeds: [tooLong] })
@@ -220,9 +220,9 @@ export = {
embeds: [
{
description: "Max character limit is 64.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -240,15 +240,15 @@ export = {
"`",
color: embedColor,
footer: {
text: "You have 15 minutes to respond to this message.",
},
},
],
text: "You have 15 minutes to respond to this message."
}
}
]
})
const answer3 = await user.dmChannel!.awaitMessages({
filter: m => m.author.id === user.user.id,
max: 1,
time: 1000 * 60 * 15,
time: 1000 * 60 * 15
})
if (answer3.size === 0) {
await user.send({ embeds: [tooLong] })
@@ -267,9 +267,9 @@ export = {
embeds: [
{
description: "Max character limit is 256.",
color: embedColor,
},
],
color: embedColor
}
]
})
}
const answer3_1 = answer3.first()!.content
@@ -286,15 +286,15 @@ export = {
"`",
color: embedColor,
footer: {
text: "You have 15 minutes to respond to this message.",
},
},
],
text: "You have 15 minutes to respond to this message."
}
}
]
})
const answer4 = await user.dmChannel!.awaitMessages({
filter: m => m.author.id === user.user.id,
max: 1,
time: 1000 * 60 * 15,
time: 1000 * 60 * 15
})
if (answer4.size === 0) {
await user.send({ embeds: [tooLong] })
@@ -313,9 +313,9 @@ export = {
embeds: [
{
description: "Max character limit is 256.",
color: embedColor,
},
],
color: embedColor
}
]
})
}
const answer4_1 = answer4.first()!.content
@@ -332,15 +332,15 @@ export = {
"`",
color: embedColor,
footer: {
text: "You have 15 minutes to respond to this message.",
},
},
],
text: "You have 15 minutes to respond to this message."
}
}
]
})
const answer5 = await user.dmChannel!.awaitMessages({
filter: m => m.author.id === user.user.id,
max: 1,
time: 1000 * 60 * 15,
time: 1000 * 60 * 15
})
if (answer5.size === 0) {
await user.send({ embeds: [tooLong] })
@@ -359,9 +359,9 @@ export = {
embeds: [
{
description: "Max character limit is 256.",
color: embedColor,
},
],
color: embedColor
}
]
})
}
const answer5_1 = answer5.first()!.content
@@ -379,15 +379,15 @@ export = {
"`",
color: embedColor,
footer: {
text: "You have 15 minutes to respond to this message.",
},
},
],
text: "You have 15 minutes to respond to this message."
}
}
]
})
const answer6 = await user.dmChannel!.awaitMessages({
filter: m => m.author.id === user.user.id,
max: 1,
time: 1000 * 60 * 15,
time: 1000 * 60 * 15
})
if (answer6.size === 0) {
await user.send({ embeds: [tooLong] })
@@ -406,9 +406,9 @@ export = {
embeds: [
{
description: "Max character limit is 256.",
color: embedColor,
},
],
color: embedColor
}
]
})
}
const answer6_1 = answer6.first()!.content
@@ -418,15 +418,15 @@ export = {
{
description:
"If you want to submit your application, type `yes` if not, type `no`",
color: embedColor,
},
],
color: embedColor
}
]
})
const final = await user.dmChannel!.awaitMessages({
filter: m => m.author.id === user.user.id,
max: 1,
time: 1000 * 60 * 5,
time: 1000 * 60 * 5
})
if (final.size === 0) {
await user.send({ embeds: [tooLong] })
@@ -445,22 +445,22 @@ export = {
embeds: [
{
description: "Your application has been submitted!",
color: embedColor,
},
],
color: embedColor
}
]
})
const newStaffApp = new staffapp({
_id: new mongoose.Types.ObjectId(),
userID: user.user.id,
uuid: uuid,
uuid: uuid
})
await newStaffApp.save()
await user.deleteDM()
const channel = guild.channels.cache.get(
staffApplicationsChannel,
staffApplicationsChannel
) as TextChannel
await channel.send({
@@ -473,39 +473,39 @@ export = {
" - Staff Application",
color: embedColor,
thumbnail: {
url: user.avatarURL() || "",
url: user.avatarURL() || ""
},
fields: [
{
name: rq(1),
value: "```" + answer1_1 + "```",
value: "```" + answer1_1 + "```"
},
{
name: rq(2),
value: "```" + answer2_1 + "```",
value: "```" + answer2_1 + "```"
},
{
name: rq(3),
value: "```" + answer3_1 + "```",
value: "```" + answer3_1 + "```"
},
{
name: rq(4),
value: "```" + answer4_1 + "```",
value: "```" + answer4_1 + "```"
},
{
name: rq(5),
value: "```" + answer5_1 + "```",
value: "```" + answer5_1 + "```"
},
{
name: rq(6),
value: "```" + answer6_1 + "```",
},
value: "```" + answer6_1 + "```"
}
],
footer: {
icon_url: guild.iconURL() || undefined,
text: "ID: " + user.user.id,
},
},
text: "ID: " + user.user.id
}
}
],
components: [
new ActionRowBuilder<ButtonBuilder>().addComponents(
@@ -516,10 +516,10 @@ export = {
new ButtonBuilder()
.setCustomId("staffapplicationdeny")
.setLabel("Deny")
.setStyle(ButtonStyle.Danger),
),
],
.setStyle(ButtonStyle.Danger)
)
]
})
}
},
}
} as Button