Updated embed props + more
This commit is contained in:
@@ -115,7 +115,7 @@ export = {
|
||||
embeds: [{
|
||||
author: {
|
||||
name: mod.user.username,
|
||||
icon_url: mod.user.avatarURL({ forceStatic: false })!,
|
||||
icon_url: mod.user.avatarURL({ forceStatic: false }) || undefined,
|
||||
},
|
||||
title: "Member Banned",
|
||||
description: `
|
||||
@@ -126,7 +126,7 @@ export = {
|
||||
`,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.user.avatarURL({ forceStatic: false })!,
|
||||
url: mod.user.avatarURL({ forceStatic: false }) || "",
|
||||
},
|
||||
footer: {
|
||||
text: "ID: " + member.user.id,
|
||||
@@ -151,7 +151,7 @@ export = {
|
||||
url: member.user.avatarURL({ forceStatic: false }) || "",
|
||||
},
|
||||
footer: {
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, })!,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -306,9 +306,7 @@ export = {
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: true,
|
||||
})!,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: true, }) || undefined,
|
||||
},
|
||||
fields: statsFields,
|
||||
},
|
||||
|
||||
@@ -87,9 +87,7 @@ export = {
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -114,9 +114,8 @@ export = {
|
||||
|
||||
if (responseGuildID === 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 was force updated.")
|
||||
|
||||
@@ -124,181 +123,60 @@ export = {
|
||||
const roles = roleManage("gm")
|
||||
await user.roles.remove(roles.rolesToRemove, "User was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description:
|
||||
usermentioned +
|
||||
"'s 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 was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description:
|
||||
usermentioned +
|
||||
"'s 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 was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description:
|
||||
usermentioned +
|
||||
"'s 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 was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description:
|
||||
usermentioned +
|
||||
"'s 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 was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description:
|
||||
usermentioned +
|
||||
"'s 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 was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description:
|
||||
usermentioned +
|
||||
"'s 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:
|
||||
usermentioned + " was given the the " + replyRank + " role.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!,
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
}
|
||||
},
|
||||
} as Command
|
||||
|
||||
@@ -186,7 +186,7 @@ export = {
|
||||
embeds: [{
|
||||
author: {
|
||||
name: modName,
|
||||
icon_url: mod.avatarURL({ forceStatic: false })!,
|
||||
icon_url: mod.avatarURL({ forceStatic: false }) || undefined,
|
||||
},
|
||||
title: "Force Verified",
|
||||
description: `
|
||||
@@ -197,7 +197,7 @@ export = {
|
||||
`,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.avatarURL({ forceStatic: false })!,
|
||||
url: mod.avatarURL({ forceStatic: false }) || "",
|
||||
},
|
||||
footer: {
|
||||
icon_url: user.user.avatarURL({ forceStatic: false }) || undefined,
|
||||
@@ -222,10 +222,7 @@ export = {
|
||||
url: head!,
|
||||
},
|
||||
footer: {
|
||||
icon_url:
|
||||
interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
}) || undefined,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -66,12 +66,10 @@ export = {
|
||||
fields: commandList,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: interaction.guild!.iconURL({ forceStatic: true })!,
|
||||
url: interaction.guild!.iconURL({ forceStatic: true }) || "",
|
||||
},
|
||||
footer: {
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -32,9 +32,7 @@ export = {
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
},
|
||||
image: {
|
||||
url: instructionsgif,
|
||||
|
||||
@@ -82,7 +82,7 @@ export = {
|
||||
embeds: [{
|
||||
author: {
|
||||
name: mod.user.username,
|
||||
icon_url: mod.user.avatarURL({ forceStatic: false })!,
|
||||
icon_url: mod.user.avatarURL({ forceStatic: false }) || undefined,
|
||||
},
|
||||
title: "Member Kicked",
|
||||
description: `
|
||||
@@ -92,7 +92,7 @@ export = {
|
||||
`,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.user.avatarURL({ forceStatic: false })!,
|
||||
url: mod.user.avatarURL({ forceStatic: false }) || "",
|
||||
},
|
||||
footer: {
|
||||
text: "ID: " + member.user.id,
|
||||
@@ -111,10 +111,10 @@ export = {
|
||||
"**Moderator:** " + mod.user.username,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: member.user.avatarURL({ forceStatic: false }) || interaction.guild!.iconURL({ forceStatic: false, })!,
|
||||
url: member.user.avatarURL({ forceStatic: false }) || "",
|
||||
},
|
||||
footer: {
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, })!,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -94,7 +94,7 @@ export = {
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false }) || "",
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined,
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
@@ -35,9 +35,7 @@ export = {
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url:
|
||||
interaction?.guild?.iconURL({
|
||||
forceStatic: false,
|
||||
}) || "",
|
||||
interaction.guild!.iconURL({ forceStatic: false, }) || "",
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
@@ -72,10 +70,7 @@ export = {
|
||||
],
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url:
|
||||
interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
}) || undefined,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -46,15 +46,11 @@ export = {
|
||||
description: message,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
url: interaction.guild!.iconURL({ forceStatic: false, }) || "",
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.id + " | " + devMessage,
|
||||
icon_url:
|
||||
interaction.guild!.iconURL({ forceStatic: true }) ||
|
||||
undefined,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: true }) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
@@ -67,10 +63,7 @@ export = {
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url:
|
||||
interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
}) || undefined,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -96,206 +96,81 @@ export = {
|
||||
|
||||
async execute(interaction) {
|
||||
const subcommand = interaction.options.getSubcommand()
|
||||
const channel = interaction.options.getChannel("channel") as TextChannel
|
||||
const embedColor = Number(color.replace("#", "0x"))
|
||||
let title: string = ""
|
||||
let description: string = ""
|
||||
let customId: string = ""
|
||||
let label: string = ""
|
||||
let emoji: string = ""
|
||||
|
||||
if (subcommand === "sendguildapplication") {
|
||||
const channel = interaction.options.getChannel("channel") as TextChannel
|
||||
|
||||
await channel.send({
|
||||
embeds: [
|
||||
{
|
||||
title: "Guild Application",
|
||||
description:
|
||||
"You can apply for the guild by clicking the button below.",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url:
|
||||
interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
}) || undefined,
|
||||
},
|
||||
thumbnail: {
|
||||
url:
|
||||
interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
}) || "",
|
||||
},
|
||||
},
|
||||
],
|
||||
components: [
|
||||
new ActionRowBuilder<ButtonBuilder>().addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId("guildapply")
|
||||
.setLabel("Apply")
|
||||
.setStyle(ButtonStyle.Primary)
|
||||
.setEmoji({ name: "✅" }),
|
||||
),
|
||||
],
|
||||
})
|
||||
await interaction.reply({
|
||||
content: "Message sent",
|
||||
ephemeral: true,
|
||||
})
|
||||
title = "Guild Application"
|
||||
description = "You can apply for the guild by clicking the button below."
|
||||
customId = "guildapply"
|
||||
label = "Apply"
|
||||
emoji = "✅"
|
||||
}
|
||||
|
||||
if (subcommand === "sendstaffapplication") {
|
||||
const channel = interaction.options.getChannel("channel") as TextChannel
|
||||
|
||||
await channel.send({
|
||||
embeds: [
|
||||
{
|
||||
title: "Staff Application",
|
||||
description:
|
||||
"You can apply for the staff team by clicking the button below.",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
},
|
||||
thumbnail: {
|
||||
url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
},
|
||||
},
|
||||
],
|
||||
components: [
|
||||
new ActionRowBuilder<ButtonBuilder>().addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId("staffapply")
|
||||
.setLabel("Apply")
|
||||
.setStyle(ButtonStyle.Primary)
|
||||
.setEmoji({ name: "✅" }),
|
||||
),
|
||||
],
|
||||
})
|
||||
|
||||
await interaction.reply({
|
||||
content: "Message sent",
|
||||
ephemeral: true,
|
||||
})
|
||||
title = "Staff Application"
|
||||
description = "You can apply for the staff team by clicking the button below."
|
||||
customId = "staffapply"
|
||||
label = "Apply"
|
||||
emoji = "✅"
|
||||
}
|
||||
|
||||
if (subcommand === "sendinactivityapplication") {
|
||||
const channel = interaction.options.getChannel("channel") as TextChannel
|
||||
|
||||
await channel.send({
|
||||
embeds: [
|
||||
{
|
||||
title: "Inactivity Log",
|
||||
description:
|
||||
"You can send an inactivity log by clicking the button below.",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
},
|
||||
thumbnail: {
|
||||
url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
},
|
||||
},
|
||||
],
|
||||
components: [
|
||||
new ActionRowBuilder<ButtonBuilder>().addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId("guildinactivitylog")
|
||||
.setLabel("Submit")
|
||||
.setStyle(ButtonStyle.Primary)
|
||||
.setEmoji({ name: "✅" }),
|
||||
),
|
||||
],
|
||||
})
|
||||
|
||||
await interaction.reply({
|
||||
content: "Message sent",
|
||||
ephemeral: true,
|
||||
})
|
||||
title = "Inactivity Log"
|
||||
description = "You can send an inactivity log by clicking the button below."
|
||||
customId = "guildinactivitylog"
|
||||
label = "Submit"
|
||||
emoji = "✅"
|
||||
}
|
||||
|
||||
if (subcommand === "sendverfiymessage") {
|
||||
const channel = interaction.options.getChannel("channel") as TextChannel
|
||||
|
||||
await channel.send({
|
||||
embeds: [
|
||||
{
|
||||
title: "Verification",
|
||||
description:
|
||||
"You can verify by clicking the button below.",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
},
|
||||
thumbnail: {
|
||||
url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
},
|
||||
},
|
||||
],
|
||||
components: [
|
||||
new ActionRowBuilder<ButtonBuilder>().addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId("verify")
|
||||
.setLabel("Verify")
|
||||
.setStyle(ButtonStyle.Primary)
|
||||
.setEmoji({ name: "✅" }),
|
||||
),
|
||||
],
|
||||
})
|
||||
await interaction.reply({
|
||||
content: "Message sent",
|
||||
ephemeral: true,
|
||||
})
|
||||
title = "Verification"
|
||||
description = "You can verify by clicking the button below."
|
||||
customId = "verify"
|
||||
label = "Verify"
|
||||
emoji = "✅"
|
||||
}
|
||||
|
||||
if (subcommand === "sendwaitinglistmessage") {
|
||||
const channel = interaction.options.getChannel("channel") as TextChannel
|
||||
|
||||
await channel.send({
|
||||
embeds: [
|
||||
{
|
||||
title: "Waiting List",
|
||||
description:
|
||||
"The people below were accepted into the guild\n" +
|
||||
"Try to invite them in order.",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
},
|
||||
thumbnail: {
|
||||
url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
},
|
||||
},
|
||||
],
|
||||
components: [
|
||||
new ActionRowBuilder<ButtonBuilder>().addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId("waitinglistupdate")
|
||||
.setLabel("Update")
|
||||
.setStyle(ButtonStyle.Primary)
|
||||
.setEmoji({ name: "🔄" }),
|
||||
),
|
||||
],
|
||||
})
|
||||
await interaction.reply({
|
||||
content: "Message sent",
|
||||
ephemeral: true,
|
||||
})
|
||||
title = "Waiting List"
|
||||
description = "The people below were accepted into the guild\n" + "Try to invite them in order.",
|
||||
customId = "waitinglistupdate"
|
||||
label = "Update"
|
||||
emoji = "🔄"
|
||||
}
|
||||
|
||||
await channel.send({
|
||||
embeds: [{
|
||||
title: title,
|
||||
description: description,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: interaction.guild!.iconURL({ forceStatic: false }) || "",
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined,
|
||||
}
|
||||
}],
|
||||
components: [
|
||||
new ActionRowBuilder<ButtonBuilder>().addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId(customId)
|
||||
.setLabel(label)
|
||||
.setStyle(ButtonStyle.Primary)
|
||||
.setEmoji({ name: emoji })
|
||||
)
|
||||
]
|
||||
})
|
||||
|
||||
await interaction.reply({
|
||||
content: "Message sent",
|
||||
ephemeral: true,
|
||||
})
|
||||
},
|
||||
} as Command
|
||||
|
||||
@@ -61,21 +61,14 @@ export = {
|
||||
return
|
||||
}
|
||||
|
||||
const footerText = interaction.guild
|
||||
? interaction.guild.name
|
||||
: interaction.user.username
|
||||
const footerIcon = interaction.guild
|
||||
? interaction.guild.iconURL({ forceStatic: false })
|
||||
: interaction.user.avatarURL({ forceStatic: false })
|
||||
|
||||
await interaction.reply({
|
||||
embeds: [
|
||||
{
|
||||
description: "This command is currently under development",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: footerText + " | " + devMessage,
|
||||
icon_url: footerIcon!,
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false }) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -118,53 +118,26 @@ const command: Command = {
|
||||
return
|
||||
}
|
||||
|
||||
let title: string = ""
|
||||
let description: string = ""
|
||||
let timeouttime: number | null = 0
|
||||
if (target.isCommunicationDisabled()) {
|
||||
if (time === 0) {
|
||||
await target.timeout(null, reason)
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description:
|
||||
"Removed timeout of " +
|
||||
userMention(target.id) +
|
||||
" for " +
|
||||
reason,
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: "ID: " + target.id,
|
||||
icon_url: target.avatarURL() || undefined,
|
||||
},
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
],
|
||||
})
|
||||
return
|
||||
title = "Timeout Removed"
|
||||
description = "Removed timeout of " + userMention(target.id) + " for " + reason,
|
||||
timeouttime = null
|
||||
} else {
|
||||
title = "Timeout Updated"
|
||||
description = "Updated timeout of " + userMention(target.id) + " to " + prettyTime + " for " + reason,
|
||||
timeouttime = time
|
||||
}
|
||||
|
||||
await target.timeout(time, reason)
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description:
|
||||
"Updated timeout of " +
|
||||
userMention(target.id) +
|
||||
" to " +
|
||||
prettyTime +
|
||||
" for " +
|
||||
reason,
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: "ID: " + target.id,
|
||||
icon_url: target.avatarURL() || undefined,
|
||||
},
|
||||
timestamp: new Date().toISOString(),
|
||||
},
|
||||
],
|
||||
})
|
||||
return
|
||||
} else {
|
||||
title = "Member Timed Out"
|
||||
description = "Timed out " + userMention(target.id) + " for " + prettyTime + " for " + reason,
|
||||
timeouttime = time
|
||||
}
|
||||
|
||||
await target.timeout(time, reason)
|
||||
await target.timeout(timeouttime, reason)
|
||||
|
||||
await logToChannel("mod", {
|
||||
embeds: [{
|
||||
@@ -172,11 +145,11 @@ const command: Command = {
|
||||
name: mod.user.username,
|
||||
icon_url: mod.user.avatarURL({ forceStatic: false }) || undefined,
|
||||
},
|
||||
title: "Member Timed Out",
|
||||
title: title,
|
||||
description: `
|
||||
**User:** ${userMention(target.id)}
|
||||
**Time:** ${prettyTime}
|
||||
**Reason:** ${reason}
|
||||
${timeouttime === null ? "**Time:** `None`" : "**Time:** `" + prettyTime + "`"}
|
||||
**Reason:** \`${reason}\`
|
||||
**Mod:** ${userMention(mod.id)}
|
||||
`,
|
||||
color: embedColor,
|
||||
@@ -194,10 +167,7 @@ const command: Command = {
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description:
|
||||
"Timed out " + userMention(target.id) +
|
||||
" for " + prettyTime +
|
||||
" for " + reason,
|
||||
description: description,
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
|
||||
@@ -76,7 +76,7 @@ export = {
|
||||
{
|
||||
author: {
|
||||
name: mod.username,
|
||||
icon_url: mod.avatarURL({ forceStatic: false })!,
|
||||
icon_url: mod.avatarURL({ forceStatic: false }) || undefined,
|
||||
},
|
||||
title: "Member Unbanned",
|
||||
description: `
|
||||
@@ -86,7 +86,7 @@ export = {
|
||||
`,
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: mod.avatarURL({ forceStatic: false })!,
|
||||
url: mod.avatarURL({ forceStatic: false }) || "",
|
||||
},
|
||||
footer: {
|
||||
text: "ID: " + user!.id,
|
||||
@@ -110,9 +110,7 @@ export = {
|
||||
url: user!.avatarURL({ forceStatic: false }) || "",
|
||||
},
|
||||
footer: {
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: false,
|
||||
})!,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -60,10 +60,7 @@ export = {
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url:
|
||||
interaction.guild?.iconURL({
|
||||
forceStatic: false,
|
||||
}) || undefined,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: false, }) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -233,7 +233,7 @@ export = {
|
||||
"`.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head || "",
|
||||
url: head!,
|
||||
},
|
||||
footer: {
|
||||
icon_url: interaction.guild!.iconURL() || undefined,
|
||||
|
||||
@@ -54,9 +54,7 @@ export = {
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL({
|
||||
forceStatic: true,
|
||||
})!,
|
||||
icon_url: interaction.guild!.iconURL({ forceStatic: true, }) || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user