Updated guild application accept
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
waitingListMessage,
|
||||
hypixelGuildID,
|
||||
} from "../../../config/options.json"
|
||||
import colorLog from "../../utils/functions/colors"
|
||||
import mongoose from "mongoose"
|
||||
import guildapp from "../../schemas/guildAppSchema"
|
||||
import waitingList from "../../schemas/waitinglistSchema"
|
||||
@@ -88,7 +89,26 @@ export = {
|
||||
await applicant.roles.add(waitingListRole)
|
||||
await guildapp.findOneAndDelete({ userID: applicantId })
|
||||
|
||||
// update waiting list
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
title: applicantUsername + " - Guild Application",
|
||||
description:
|
||||
"Application has been accepted by <@" + user.id + ">.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: applicant.avatarURL() || "",
|
||||
},
|
||||
footer: {
|
||||
icon_url: guild.iconURL() || undefined,
|
||||
text: "ID: " + applicant.id,
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
if (process.env.NODE_ENV === "dev") return
|
||||
try {
|
||||
const channel = guild.channels.cache.get(
|
||||
waitingListChannel,
|
||||
) as TextChannel
|
||||
@@ -134,23 +154,8 @@ export = {
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
title: applicantUsername + " - Guild Application",
|
||||
description:
|
||||
"Application has been accepted by <@" + user.id + ">.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: applicant.avatarURL() || "",
|
||||
},
|
||||
footer: {
|
||||
icon_url: guild.iconURL() || undefined,
|
||||
text: "ID: " + applicant.id,
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
} catch (err) {
|
||||
console.log(colorLog("Error while trying to update waiting list.", "red"))
|
||||
}
|
||||
},
|
||||
} as Button
|
||||
|
||||
Reference in New Issue
Block a user