Added attachemnt proofing
This commit is contained in:
@@ -113,6 +113,13 @@ module.exports = {
|
|||||||
title: interaction.guild.name,
|
title: interaction.guild.name,
|
||||||
description: "You have successfully verified `" + fullUsername + "` with the account `" + hypixelCheck.data.username + "`.",
|
description: "You have successfully verified `" + fullUsername + "` with the account `" + hypixelCheck.data.username + "`.",
|
||||||
color: embedColor,
|
color: embedColor,
|
||||||
|
thumbnail: {
|
||||||
|
url: head
|
||||||
|
},
|
||||||
|
footer: {
|
||||||
|
icon_url: interaction.guild.iconURL(),
|
||||||
|
text: interaction.guild.name + " | Developed by Taken#0002"
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ module.exports = {
|
|||||||
const cancelled = new EmbedBuilder()
|
const cancelled = new EmbedBuilder()
|
||||||
.setDescription("You have cancelled your application.")
|
.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)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await user.send({
|
await user.send({
|
||||||
@@ -48,6 +51,7 @@ module.exports = {
|
|||||||
description: "Please answer the following questions to apply for the guild.\n" +
|
description: "Please answer the following questions to apply for the guild.\n" +
|
||||||
"If you wish to cancel your application, please press type `cancel` at any time.\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" +
|
"If you wish to proceed with your application, please type `yes`.\n\n" +
|
||||||
|
"**Do not upload images, videos, or GIFS.**\n" +
|
||||||
"You have a minute to respond to this message.",
|
"You have a minute to respond to this message.",
|
||||||
color: embedColor,
|
color: embedColor,
|
||||||
}]
|
}]
|
||||||
@@ -65,6 +69,10 @@ module.exports = {
|
|||||||
max: 1,
|
max: 1,
|
||||||
time: 1000 * 60
|
time: 1000 * 60
|
||||||
});
|
});
|
||||||
|
if (input.first().attachments.size > 0) {
|
||||||
|
await user.send({ embeds: [attachments] });
|
||||||
|
return
|
||||||
|
}
|
||||||
if (input.size === 0) {
|
if (input.size === 0) {
|
||||||
await user.send({ embeds: [tooLong] });
|
await user.send({ embeds: [tooLong] });
|
||||||
return
|
return
|
||||||
@@ -77,17 +85,23 @@ module.exports = {
|
|||||||
// first question
|
// first question
|
||||||
const question1 = await user.send({
|
const question1 = await user.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: "**1. " + qu1 + "**\n\n" +
|
title : "**1. " + qu1 + "**",
|
||||||
"Please type your answer below.\n" +
|
description: "Please type your answer below or type `cancel` to cancel your application.",
|
||||||
"You have 5 minutes to respond to this message.",
|
color: embedColor,
|
||||||
color: embedColor
|
footer:{
|
||||||
|
text: "You have 5 minutes to respond to this message."
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
const answer1 = await user.dmChannel.awaitMessages({
|
const answer1 = await user.dmChannel.awaitMessages({
|
||||||
filter: m => m.author.id === user.id,
|
filter: m => m.author.id === user.id,
|
||||||
max: 1,
|
max: 1,
|
||||||
time: 1000 * 60 * 5
|
time: 1000 * 60 * 5,
|
||||||
});
|
});
|
||||||
|
if (answer1.first().attachments.size > 0) {
|
||||||
|
await user.send({ embeds: [attachments] });
|
||||||
|
return
|
||||||
|
}
|
||||||
if (answer1.size === 0) {
|
if (answer1.size === 0) {
|
||||||
await user.send({ embeds: [tooLong] })
|
await user.send({ embeds: [tooLong] })
|
||||||
return
|
return
|
||||||
@@ -101,10 +115,12 @@ module.exports = {
|
|||||||
// second question
|
// second question
|
||||||
const question2 = await user.send({
|
const question2 = await user.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: "**2. " + qu2 + "**\n\n" +
|
title : "**2. " + qu2 + "**",
|
||||||
"Please type your answer below.\n" +
|
description: "Please type your answer below or type `cancel` to cancel your application.",
|
||||||
"You have 15 minutes to respond to this message.",
|
color: embedColor,
|
||||||
color: embedColor
|
footer:{
|
||||||
|
text: "You have 15 minutes to respond to this message."
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
const answer2 = await user.dmChannel.awaitMessages({
|
const answer2 = await user.dmChannel.awaitMessages({
|
||||||
@@ -112,6 +128,10 @@ module.exports = {
|
|||||||
max: 1,
|
max: 1,
|
||||||
time: 1000 * 60 * 15
|
time: 1000 * 60 * 15
|
||||||
});
|
});
|
||||||
|
if (answer2.first().attachments.size > 0) {
|
||||||
|
await user.send({ embeds: [attachments] });
|
||||||
|
return
|
||||||
|
}
|
||||||
if (answer2.size === 0) {
|
if (answer2.size === 0) {
|
||||||
await user.send({ embeds: [tooLong] })
|
await user.send({ embeds: [tooLong] })
|
||||||
return
|
return
|
||||||
@@ -125,10 +145,12 @@ module.exports = {
|
|||||||
// third question
|
// third question
|
||||||
const question3 = await user.send({
|
const question3 = await user.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: "**3. " + qu3 + "**\n\n" +
|
title : "**3. " + qu3 + "**",
|
||||||
"Please type your answer below.\n" +
|
description: "Please type your answer below or type `cancel` to cancel your application.",
|
||||||
"You have 15 minutes to respond to this message.",
|
color: embedColor,
|
||||||
color: embedColor
|
footer:{
|
||||||
|
text: "You have 15 minutes to respond to this message."
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
const answer3 = await user.dmChannel.awaitMessages({
|
const answer3 = await user.dmChannel.awaitMessages({
|
||||||
@@ -136,6 +158,10 @@ module.exports = {
|
|||||||
max: 1,
|
max: 1,
|
||||||
time: 1000 * 60 * 15
|
time: 1000 * 60 * 15
|
||||||
});
|
});
|
||||||
|
if (answer3.first().attachments.size > 0) {
|
||||||
|
await user.send({ embeds: [attachments] });
|
||||||
|
return
|
||||||
|
}
|
||||||
if (answer3.size === 0) {
|
if (answer3.size === 0) {
|
||||||
await user.send({ embeds: [tooLong] })
|
await user.send({ embeds: [tooLong] })
|
||||||
return
|
return
|
||||||
@@ -149,10 +175,12 @@ module.exports = {
|
|||||||
// fourth question
|
// fourth question
|
||||||
const question4 = await user.send({
|
const question4 = await user.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: "**4. " + qu4 + "**\n\n" +
|
title : "**4. " + qu4 + "**",
|
||||||
"Please type your answer below.\n" +
|
description: "Please type your answer below or type `cancel` to cancel your application.",
|
||||||
"You have 15 minutes to respond to this message.",
|
color: embedColor,
|
||||||
color: embedColor
|
footer:{
|
||||||
|
text: "You have 15 minutes to respond to this message."
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
const answer4 = await user.dmChannel.awaitMessages({
|
const answer4 = await user.dmChannel.awaitMessages({
|
||||||
@@ -160,6 +188,10 @@ module.exports = {
|
|||||||
max: 1,
|
max: 1,
|
||||||
time: 1000 * 60 * 15
|
time: 1000 * 60 * 15
|
||||||
});
|
});
|
||||||
|
if (answer4.first().attachments.size > 0) {
|
||||||
|
await user.send({ embeds: [attachments] });
|
||||||
|
return
|
||||||
|
}
|
||||||
if (answer4.size === 0) {
|
if (answer4.size === 0) {
|
||||||
await user.send({ embeds: [tooLong] })
|
await user.send({ embeds: [tooLong] })
|
||||||
return
|
return
|
||||||
@@ -173,10 +205,12 @@ module.exports = {
|
|||||||
// fifth question
|
// fifth question
|
||||||
const question5 = await user.send({
|
const question5 = await user.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: "**5. " + qu5 + "**\n\n" +
|
title : "**5. " + qu5 + "**",
|
||||||
"Please type your answer below.\n" +
|
description: "Please type your answer below or type `cancel` to cancel your application.",
|
||||||
"You have 15 minutes to respond to this message.",
|
color: embedColor,
|
||||||
color: embedColor
|
footer:{
|
||||||
|
text: "You have 15 minutes to respond to this message."
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
const answer5 = await user.dmChannel.awaitMessages({
|
const answer5 = await user.dmChannel.awaitMessages({
|
||||||
@@ -184,6 +218,10 @@ module.exports = {
|
|||||||
max: 1,
|
max: 1,
|
||||||
time: 1000 * 60 * 15
|
time: 1000 * 60 * 15
|
||||||
});
|
});
|
||||||
|
if (answer5.first().attachments.size > 0) {
|
||||||
|
await user.send({ embeds: [attachments] });
|
||||||
|
return
|
||||||
|
}
|
||||||
if (answer5.size === 0) {
|
if (answer5.size === 0) {
|
||||||
await user.send({ embeds: [tooLong] })
|
await user.send({ embeds: [tooLong] })
|
||||||
return
|
return
|
||||||
@@ -197,10 +235,12 @@ module.exports = {
|
|||||||
// sixth question
|
// sixth question
|
||||||
const question6 = await user.send({
|
const question6 = await user.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: "**6. " + qu6 + "**\n\n" +
|
title : "**6. " + qu6 + "**",
|
||||||
"Please type your answer below.\n" +
|
description: "Please type your answer below or type `cancel` to cancel your application.",
|
||||||
"You have 15 minutes to respond to this message.",
|
color: embedColor,
|
||||||
color: embedColor
|
footer:{
|
||||||
|
text: "You have 15 minutes to respond to this message."
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
const answer6 = await user.dmChannel.awaitMessages({
|
const answer6 = await user.dmChannel.awaitMessages({
|
||||||
@@ -208,6 +248,10 @@ module.exports = {
|
|||||||
max: 1,
|
max: 1,
|
||||||
time: 1000 * 60 * 15
|
time: 1000 * 60 * 15
|
||||||
});
|
});
|
||||||
|
if (answer6.first().attachments.size > 0) {
|
||||||
|
await user.send({ embeds: [attachments] });
|
||||||
|
return
|
||||||
|
}
|
||||||
if (answer6.size === 0) {
|
if (answer6.size === 0) {
|
||||||
await user.send({ embeds: [tooLong] })
|
await user.send({ embeds: [tooLong] })
|
||||||
return
|
return
|
||||||
@@ -221,10 +265,12 @@ module.exports = {
|
|||||||
// seventh question
|
// seventh question
|
||||||
const question7 = await user.send({
|
const question7 = await user.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: "**7. " + qu7 + "**\n\n" +
|
title : "**7. " + qu7 + "**",
|
||||||
"Please type your answer below.\n" +
|
description: "Please type your answer below or type `cancel` to cancel your application.",
|
||||||
"You have 15 minutes to respond to this message.",
|
color: embedColor,
|
||||||
color: embedColor
|
footer:{
|
||||||
|
text: "You have 15 minutes to respond to this message."
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
const answer7 = await user.dmChannel.awaitMessages({
|
const answer7 = await user.dmChannel.awaitMessages({
|
||||||
@@ -232,6 +278,10 @@ module.exports = {
|
|||||||
max: 1,
|
max: 1,
|
||||||
time: 1000 * 60 * 15
|
time: 1000 * 60 * 15
|
||||||
});
|
});
|
||||||
|
if (answer7.first().attachments.size > 0) {
|
||||||
|
await user.send({ embeds: [attachments] });
|
||||||
|
return
|
||||||
|
}
|
||||||
if (answer7.size === 0) {
|
if (answer7.size === 0) {
|
||||||
await user.send({ embeds: [tooLong] })
|
await user.send({ embeds: [tooLong] })
|
||||||
return
|
return
|
||||||
@@ -245,10 +295,12 @@ module.exports = {
|
|||||||
// eighth question
|
// eighth question
|
||||||
const question8 = await user.send({
|
const question8 = await user.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
description: "**8. " + qu8 + "**\n\n" +
|
title : "**8. " + qu8 + "**",
|
||||||
"Please type your answer below.\n" +
|
description: "Please type your answer below or type `cancel` to cancel your application.",
|
||||||
"You have 15 minutes to respond to this message.",
|
color: embedColor,
|
||||||
color: embedColor
|
footer:{
|
||||||
|
text: "You have 15 minutes to respond to this message."
|
||||||
|
}
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
const answer8 = await user.dmChannel.awaitMessages({
|
const answer8 = await user.dmChannel.awaitMessages({
|
||||||
@@ -256,6 +308,10 @@ module.exports = {
|
|||||||
max: 1,
|
max: 1,
|
||||||
time: 1000 * 60 * 15
|
time: 1000 * 60 * 15
|
||||||
});
|
});
|
||||||
|
if (answer8.first().attachments.size > 0) {
|
||||||
|
await user.send({ embeds: [attachments] });
|
||||||
|
return
|
||||||
|
}
|
||||||
if (answer8.size === 0) {
|
if (answer8.size === 0) {
|
||||||
await user.send({ embeds: [tooLong] })
|
await user.send({ embeds: [tooLong] })
|
||||||
return
|
return
|
||||||
@@ -278,6 +334,10 @@ module.exports = {
|
|||||||
max: 1,
|
max: 1,
|
||||||
time: 1000 * 60 * 5
|
time: 1000 * 60 * 5
|
||||||
});
|
});
|
||||||
|
if (final.first().attachments.size > 0) {
|
||||||
|
await user.send({ embeds: [attachments] });
|
||||||
|
return
|
||||||
|
}
|
||||||
if (final.size === 0) {
|
if (final.size === 0) {
|
||||||
await user.send({ embeds: [tooLong] });
|
await user.send({ embeds: [tooLong] });
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user