Added eslintrc config and updated all files to it
This commit is contained in:
@@ -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
|
||||
}
|
||||
}]
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user