Fixed more formatting
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
ContextMenuCommandBuilder,
|
||||
ApplicationCommandType,
|
||||
PermissionFlagsBits,
|
||||
userMention,
|
||||
} from "discord.js"
|
||||
import { ContextMenuCommandBuilder, ApplicationCommandType, PermissionFlagsBits, userMention } from "discord.js"
|
||||
import { ContextMenu } from "interfaces"
|
||||
|
||||
export = {
|
||||
@@ -23,25 +18,23 @@ export = {
|
||||
if (!message) {
|
||||
return interaction.reply({
|
||||
content: "That user does not exist.",
|
||||
ephemeral: true,
|
||||
ephemeral: true
|
||||
})
|
||||
}
|
||||
|
||||
const target = message.author
|
||||
|
||||
await message.reply({
|
||||
embeds: [
|
||||
{
|
||||
title: "Congratulations!",
|
||||
description: `GG to ${userMention(target.id)}!`,
|
||||
},
|
||||
],
|
||||
embeds: [{
|
||||
title: "Congratulations!",
|
||||
description: `GG to ${userMention(target.id)}!`
|
||||
}]
|
||||
})
|
||||
await message.react("🎉")
|
||||
|
||||
await interaction.reply({
|
||||
content: "Sent a congrats message",
|
||||
ephemeral: true,
|
||||
ephemeral: true
|
||||
})
|
||||
},
|
||||
}
|
||||
} as ContextMenu
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
ContextMenuCommandBuilder,
|
||||
ApplicationCommandType,
|
||||
PermissionFlagsBits,
|
||||
} from "discord.js"
|
||||
import { ContextMenuCommandBuilder, ApplicationCommandType, PermissionFlagsBits } from "discord.js"
|
||||
import { ContextMenu } from "interfaces"
|
||||
|
||||
export = {
|
||||
@@ -22,7 +18,7 @@ export = {
|
||||
if (!target) {
|
||||
interaction.reply({
|
||||
content: "That user does not exist.",
|
||||
ephemeral: true,
|
||||
ephemeral: true
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -30,7 +26,7 @@ export = {
|
||||
if (target.id === interaction.user.id) {
|
||||
interaction.reply({
|
||||
content: "You can't reset your own nickname.",
|
||||
ephemeral: true,
|
||||
ephemeral: true
|
||||
})
|
||||
return
|
||||
}
|
||||
@@ -38,21 +34,18 @@ export = {
|
||||
if (!target.manageable) {
|
||||
interaction.reply({
|
||||
content: "I cannot reset that user's nickname.",
|
||||
ephemeral: true,
|
||||
ephemeral: true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
await target.setNickname(
|
||||
target.user.username,
|
||||
"Reset by " +
|
||||
interaction.user.username +
|
||||
"#" +
|
||||
interaction.user.discriminator,
|
||||
"Reset by " + interaction.user.username + "#" + interaction.user.discriminator
|
||||
)
|
||||
interaction.reply({
|
||||
content: `Reset ${target.user.username}'s nickname.`,
|
||||
ephemeral: true,
|
||||
ephemeral: true
|
||||
})
|
||||
},
|
||||
}
|
||||
} as ContextMenu
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import {
|
||||
ApplicationCommandType,
|
||||
ContextMenuCommandBuilder,
|
||||
PermissionFlagsBits,
|
||||
userMention,
|
||||
} from "discord.js"
|
||||
import { ApplicationCommandType, ContextMenuCommandBuilder, PermissionFlagsBits, userMention } from "discord.js"
|
||||
import { color, devMessage, hypixelGuildID } from "config/options.json"
|
||||
import { ContextMenu } from "interfaces"
|
||||
import verifySchema from "schemas/verifySchema"
|
||||
@@ -32,39 +27,33 @@ export = {
|
||||
|
||||
if (!verifyData) {
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description: "User is not verified.",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL() || undefined,
|
||||
},
|
||||
},
|
||||
],
|
||||
embeds: [{
|
||||
description: "User is not verified.",
|
||||
color: embedColor,
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL() || undefined
|
||||
}
|
||||
}]
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description: "Fetching ign...",
|
||||
color: embedColor,
|
||||
},
|
||||
],
|
||||
embeds: [{
|
||||
description: "Fetching ign...",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
const ign = (await getIGN(verifyData.uuid)) as string
|
||||
const head = await getHeadURL(ign)
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description: "Fetching guild data...",
|
||||
color: embedColor,
|
||||
},
|
||||
],
|
||||
embeds: [{
|
||||
description: "Fetching guild data...",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
const guild = await getGuild(verifyData.uuid)
|
||||
@@ -78,141 +67,87 @@ export = {
|
||||
|
||||
if (responseGuildID !== hypixelGuildID) {
|
||||
const roles = roleManage("default")
|
||||
await user.roles.remove(
|
||||
roles.rolesToRemove,
|
||||
"User was force updated.",
|
||||
)
|
||||
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 +
|
||||
" was given the the Default Member role.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!,
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL() || undefined,
|
||||
},
|
||||
embeds: [{
|
||||
description: usermentioned + " was given the the Default Member role.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!
|
||||
},
|
||||
],
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL() || undefined
|
||||
}
|
||||
}]
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
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.",
|
||||
)
|
||||
await user.roles.add(roleManage("default").rolesToAdd, "User was force updated.")
|
||||
|
||||
if (guildRank === "Guild Master") {
|
||||
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 user.roles.remove(roles.rolesToRemove, "User was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
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 user.roles.remove(roles.rolesToRemove, "User was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
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 user.roles.remove(roles.rolesToRemove, "User was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
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 user.roles.remove(roles.rolesToRemove, "User was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
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 user.roles.remove(roles.rolesToRemove, "User was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
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 user.roles.remove(roles.rolesToRemove, "User was force updated.")
|
||||
await user.roles.add(roles.rolesToAdd, "User was force updated.")
|
||||
replyRank = "Member"
|
||||
}
|
||||
|
||||
await interaction.editReply({
|
||||
embeds: [
|
||||
{
|
||||
description:
|
||||
usermentioned +
|
||||
" was given the " +
|
||||
replyRank +
|
||||
" role.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!,
|
||||
},
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL() || undefined,
|
||||
},
|
||||
embeds: [{
|
||||
description: usermentioned + " was given the " + replyRank + " role.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!
|
||||
},
|
||||
],
|
||||
footer: {
|
||||
text: interaction.guild!.name + " | " + devMessage,
|
||||
icon_url: interaction.guild!.iconURL() || undefined
|
||||
}
|
||||
}]
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
} as ContextMenu
|
||||
|
||||
Reference in New Issue
Block a user