Updated embed props + more

This commit is contained in:
2024-01-07 17:04:37 +01:00
parent c18a5f703f
commit 199e5e6955
19 changed files with 157 additions and 588 deletions

View File

@@ -89,9 +89,8 @@ export = {
if (guildID === hypixelGuildID) {
const GuildMembers = guild!.members
const guildRank = GuildMembers.find(
member => member.uuid === verifyData.uuid,
)!.rank
const guildRank = GuildMembers.find( member => member.uuid === verifyData.uuid)!.rank
let replyRank: string | null = null
await user.roles.add(roleManage("default").rolesToAdd, "User used the update command")
@@ -99,175 +98,59 @@ export = {
const roles = roleManage("gm")
await user.roles.remove(roles.rolesToRemove, "User used the update command")
await user.roles.add(roles.rolesToAdd, "User used the update command")
await interaction.editReply({
embeds: [
{
description:
"Your rank has been updated to `Guild Master`",
color: embedColor,
thumbnail: {
url: head!,
},
footer: {
text:
interaction.guild!.name +
" | " +
devMessage,
icon_url: interaction.guild!.iconURL({
forceStatic: false,
})!,
},
},
],
})
return
replyRank = "Guild Master"
}
if (guildRank === "Manager") {
const roles = roleManage("manager")
await user.roles.remove(roles.rolesToRemove, "User used the update command")
await user.roles.add(roles.rolesToAdd, "User used the update command")
await interaction.editReply({
embeds: [
{
description:
"Your rank has been updated to `Manager`",
color: embedColor,
thumbnail: {
url: head!,
},
footer: {
text:
interaction.guild!.name +
" | " +
devMessage,
icon_url: interaction.guild!.iconURL({
forceStatic: false,
})!,
},
},
],
})
return
replyRank = "Manager"
}
if (guildRank === "Moderator") {
const roles = roleManage("moderator")
await user.roles.remove(roles.rolesToRemove, "User used the update command")
await user.roles.add(roles.rolesToAdd, "User used the update command")
await interaction.editReply({
embeds: [
{
description:
"Your rank has been updated to `Moderator`",
color: embedColor,
thumbnail: {
url: head!,
},
footer: {
text:
interaction.guild!.name +
" | " +
devMessage,
icon_url: interaction.guild!.iconURL({
forceStatic: false,
})!,
},
},
],
})
return
replyRank = "Moderator"
}
if (guildRank === "Beast") {
const roles = roleManage("beast")
await user.roles.remove(roles.rolesToRemove, "User used the update command")
await user.roles.add(roles.rolesToAdd, "User used the update command")
await interaction.editReply({
embeds: [
{
description:
"Your rank has been updated to `Beast`.",
color: embedColor,
thumbnail: {
url: head!,
},
footer: {
text:
interaction.guild!.name +
" | " +
devMessage,
icon_url: interaction.guild!.iconURL({
forceStatic: false,
})!,
},
},
],
})
return
replyRank = "Beast"
}
if (guildRank === "Elite") {
const roles = roleManage("elite")
await user.roles.remove(roles.rolesToRemove, "User used the update command")
await user.roles.add(roles.rolesToAdd, "User used the update command")
await interaction.editReply({
embeds: [
{
description:
"Your rank has been updated to `Elite`.",
color: embedColor,
thumbnail: {
url: head!,
},
footer: {
text:
interaction.guild!.name +
" | " +
devMessage,
icon_url: interaction.guild!.iconURL({
forceStatic: false,
})!,
},
},
],
})
return
replyRank = "Elite"
}
if (guildRank === "Member") {
const roles = roleManage("member")
await user.roles.remove(roles.rolesToRemove, "User used the update command")
await user.roles.add(roles.rolesToAdd, "User used the update command")
await interaction.editReply({
embeds: [
{
description:
"Your rank has been updated to `Member`.",
color: embedColor,
thumbnail: {
url: head!,
},
footer: {
text:
interaction.guild!.name +
" | " +
devMessage,
icon_url: interaction.guild!.iconURL({
forceStatic: false,
})!,
},
},
],
})
return
replyRank = "Member"
}
await interaction.editReply({
embeds: [
{
description: "Updated your roles to `" + replyRank + "`",
color: embedColor,
thumbnail: {
url: head!,
},
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
},
},
],
})
}
},
} as Command