Merge branch 'dev' into 'main'
Bug fix See merge request illegitimate/illegitimate-bot!30
This commit is contained in:
@@ -23,7 +23,11 @@ module.exports = {
|
||||
const embed = message.embeds[0];
|
||||
const applicantId = embed.footer.text.split(" ")[1];
|
||||
|
||||
const applicant = await guild.members.fetch(applicantId);
|
||||
try {
|
||||
var applicant = await guild.members.fetch(applicantId);
|
||||
} catch (error) {
|
||||
var applicant = null;
|
||||
}
|
||||
const reason = interaction.fields.fields.get('denyreason').value || "No reason provided";
|
||||
const embedColor = Number(color.replace("#", "0x"));
|
||||
|
||||
@@ -71,11 +75,11 @@ module.exports = {
|
||||
text: "ID: " + applicant.id
|
||||
})
|
||||
|
||||
if (applicant) {
|
||||
if (applicant !== null) {
|
||||
await applicant.send({ embeds: [dmMessage] });
|
||||
}
|
||||
|
||||
if (!applicant) {
|
||||
if (applicant === null) {
|
||||
var responseEmbeds = [responseEmbed, missingUser];
|
||||
} else {
|
||||
var responseEmbeds = [responseEmbed];
|
||||
|
||||
Reference in New Issue
Block a user