Process of format fixing

This commit is contained in:
2024-01-19 21:36:01 +01:00
parent ee217d5f64
commit 3eed20e788
77 changed files with 1079 additions and 1086 deletions

View File

@@ -23,8 +23,8 @@ export = {
option
.setName("ign")
.setDescription("The IGN of the player.")
.setRequired(true),
),
.setRequired(true)
)
)
.addSubcommand(subcommand =>
subcommand
@@ -34,9 +34,9 @@ export = {
option
.setName("query")
.setDescription(
"The query to search for. [Default: player]",
"The query to search for. [Default: player]"
)
.setRequired(true),
.setRequired(true)
)
.addStringOption(option =>
option
@@ -45,9 +45,9 @@ export = {
.addChoices(
{ name: "Guild Member", value: "ign" },
{ name: "Guild Name", value: "name" },
{ name: "Guild Id", value: "id" },
),
),
{ name: "Guild Id", value: "id" }
)
)
)
.addSubcommand(subcommand =>
subcommand
@@ -57,9 +57,9 @@ export = {
option
.setName("query")
.setDescription(
"The query to search for. [Default: player]",
"The query to search for. [Default: player]"
)
.setRequired(true),
.setRequired(true)
)
.addStringOption(option =>
option
@@ -68,16 +68,16 @@ export = {
.addChoices(
{ name: "Guild Member", value: "ign" },
{ name: "Guild Name", value: "name" },
{ name: "Guild Id", value: "id" },
),
{ name: "Guild Id", value: "id" }
)
)
.addNumberOption(option =>
option
.setName("amount")
.setDescription(
"The amount of guild members to show. [Default: 10]",
),
),
"The amount of guild members to show. [Default: 10]"
)
)
)
.setDMPermission(false),
@@ -107,10 +107,10 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
},
}
} as Command

View File

@@ -4,7 +4,7 @@ import { ChatInputCommandInteraction } from "discord.js"
import { GuildData } from "interfaces"
export default async function guildInfo(
interaction: ChatInputCommandInteraction,
interaction: ChatInputCommandInteraction
): Promise<void> {
await interaction.deferReply()
@@ -18,9 +18,9 @@ export default async function guildInfo(
embeds: [
{
description: "Fetching your uuid...",
color: embedColor,
},
],
color: embedColor
}
]
})
const uuid = await getUUID(query)
@@ -29,9 +29,9 @@ export default async function guildInfo(
embeds: [
{
description: "That player doen't exist!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -40,9 +40,9 @@ export default async function guildInfo(
embeds: [
{
description: "Fetching your player data...",
color: embedColor,
},
],
color: embedColor
}
]
})
const player = await getPlayer(uuid)
@@ -51,9 +51,9 @@ export default async function guildInfo(
embeds: [
{
description: "That player has never joined the server!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -62,9 +62,9 @@ export default async function guildInfo(
embeds: [
{
description: "Fetching your guild data...",
color: embedColor,
},
],
color: embedColor
}
]
})
guild = await getGuild(uuid, "player")
@@ -73,9 +73,9 @@ export default async function guildInfo(
embeds: [
{
description: "That player is not in a guild!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -84,9 +84,9 @@ export default async function guildInfo(
embeds: [
{
description: "Fetching your guild data...",
color: embedColor,
},
],
color: embedColor
}
]
})
guild = await getGuild(query, "name")
@@ -95,9 +95,9 @@ export default async function guildInfo(
embeds: [
{
description: "That guild doesn't exist!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -106,9 +106,9 @@ export default async function guildInfo(
embeds: [
{
description: "Fetching your guild data...",
color: embedColor,
},
],
color: embedColor
}
]
})
guild = await getGuild(query, "id")
@@ -117,9 +117,9 @@ export default async function guildInfo(
embeds: [
{
description: "That guild doesn't exist!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -157,14 +157,14 @@ export default async function guildInfo(
const guildOwner = guildMembers.find(m => m.rank === "Guild Master")!.uuid
const guildOwnerName = await getIGN(guildOwner)
const guildRanksUnsorted = guild!.ranks.sort(
(a, b) => b.priority - a.priority,
(a, b) => b.priority - a.priority
)
const guildRanks = guildRanksUnsorted
.map(r => "**➺ " + r.name + "** `[" + r.tag + "]`")
.join("\n")
const allGuildMembersWeeklyXP = guildMembers.map(
member => member.expHistory,
member => member.expHistory
)
const guildMembersWeeklyXP = allGuildMembersWeeklyXP.map(member => {
return Object.values(member).reduce((a, b) => a + b, 0)
@@ -172,17 +172,17 @@ export default async function guildInfo(
const totalGuildMembersWeeklyXPUnformatted = guildMembersWeeklyXP.reduce(
(a, b) => a + b,
0,
0
)
const totalGuildMembersWeeklyXP = new Intl.NumberFormat("en-US").format(
totalGuildMembersWeeklyXPUnformatted,
totalGuildMembersWeeklyXPUnformatted
)
const averageGuildMembersWeeklyXPUnformatted = Math.round(
totalGuildMembersWeeklyXPUnformatted / 7,
totalGuildMembersWeeklyXPUnformatted / 7
)
const averageGuildMembersWeeklyXP = new Intl.NumberFormat("en-US").format(
averageGuildMembersWeeklyXPUnformatted,
averageGuildMembersWeeklyXPUnformatted
)
await interaction.editReply({
@@ -205,7 +205,7 @@ export default async function guildInfo(
fields: [
{
name: "**Guild Ranks**",
value: guildRanks,
value: guildRanks
},
{
name: "**GEXP**",
@@ -218,19 +218,19 @@ export default async function guildInfo(
"`\n" +
"**➺ Total GEXP:** `" +
guildExp +
"`",
"`"
},
{
name: "**Guild Created**",
value: "**➺ **`" + guildCreatedTime + "`",
},
value: "**➺ **`" + guildCreatedTime + "`"
}
],
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
}

View File

@@ -3,7 +3,7 @@ import { color, devMessage } from "config/options.json"
import { ChatInputCommandInteraction } from "discord.js"
export default async function guildMember(
interaction: ChatInputCommandInteraction,
interaction: ChatInputCommandInteraction
): Promise<void> {
await interaction.deferReply()
@@ -14,9 +14,9 @@ export default async function guildMember(
embeds: [
{
description: "Fetching your uuid...",
color: embedColor,
},
],
color: embedColor
}
]
})
const uuid = await getUUID(ign)
@@ -25,9 +25,9 @@ export default async function guildMember(
embeds: [
{
description: "This user does not exist",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -36,9 +36,9 @@ export default async function guildMember(
embeds: [
{
description: "Fetching your player data...",
color: embedColor,
},
],
color: embedColor
}
]
})
const head = await getHeadURL(ign)
@@ -50,14 +50,14 @@ export default async function guildMember(
description: "This user never logged on to hypixel",
color: embedColor,
thumbnail: {
url: head!,
url: head!
},
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
return
}
@@ -83,9 +83,9 @@ export default async function guildMember(
embeds: [
{
description: "Fetching your guild data...",
color: embedColor,
},
],
color: embedColor
}
]
})
const guild = await getGuild(uuid)
@@ -96,14 +96,14 @@ export default async function guildMember(
description: "This user is not in a guild",
color: embedColor,
thumbnail: {
url: head!,
url: head!
},
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
return
}
@@ -129,16 +129,16 @@ export default async function guildMember(
const expValue = allDaysGexp.join("")
const totalWeeklyGexpUnformatted = Object.values(memberGexp).reduce(
(a, b) => a + b,
0,
0
)
const totalWeeklyGexp = new Intl.NumberFormat("en-US").format(
totalWeeklyGexpUnformatted,
totalWeeklyGexpUnformatted
)
const averageWeeklyGexpUnformatted = Math.round(
totalWeeklyGexpUnformatted / 7,
totalWeeklyGexpUnformatted / 7
)
const averageWeeklyGexp = new Intl.NumberFormat("en-US").format(
averageWeeklyGexpUnformatted,
averageWeeklyGexpUnformatted
)
const guildMemberJoinMS = guildMember!.joined
@@ -176,12 +176,12 @@ export default async function guildMember(
"`\n",
color: embedColor,
thumbnail: {
url: head!,
url: head!
},
fields: [
{
name: "**Daily GEXP**",
value: expValue,
value: expValue
},
{
name: "**Weekly GEXP**",
@@ -191,18 +191,18 @@ export default async function guildMember(
"`\n" +
"**➺ Daily avarage:** `" +
averageWeeklyGexp +
"`",
"`"
},
{
name: "**Join date**",
value: "**➺ **`" + guildMemberJoin + "`",
},
value: "**➺ **`" + guildMemberJoin + "`"
}
],
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
}

View File

@@ -6,7 +6,7 @@ import Illegitimate from "utils/Illegitimate"
const redis = Illegitimate.redis
export default async function guildTop(
interaction: ChatInputCommandInteraction,
interaction: ChatInputCommandInteraction
): Promise<void> {
await interaction.deferReply()
@@ -21,9 +21,9 @@ export default async function guildTop(
embeds: [
{
description: "You can't use this command in DMs!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -33,9 +33,9 @@ export default async function guildTop(
embeds: [
{
description: "Fetching your uuid...",
color: embedColor,
},
],
color: embedColor
}
]
})
const uuid = await getUUID(query)
@@ -44,9 +44,9 @@ export default async function guildTop(
embeds: [
{
description: "That player doen't exist!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -55,9 +55,9 @@ export default async function guildTop(
embeds: [
{
description: "Fetching your player data...",
color: embedColor,
},
],
color: embedColor
}
]
})
const player = await getPlayer(uuid)
@@ -66,9 +66,9 @@ export default async function guildTop(
embeds: [
{
description: "That player has never joined the server!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -77,9 +77,9 @@ export default async function guildTop(
embeds: [
{
description: "Fetching your guild data...",
color: embedColor,
},
],
color: embedColor
}
]
})
guild = await getGuild(uuid, "player")
@@ -88,9 +88,9 @@ export default async function guildTop(
embeds: [
{
description: "That player is not in a guild!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -99,9 +99,9 @@ export default async function guildTop(
embeds: [
{
description: "Fetching your guild data...",
color: embedColor,
},
],
color: embedColor
}
]
})
guild = await getGuild(query, "name")
@@ -110,9 +110,9 @@ export default async function guildTop(
embeds: [
{
description: "That guild doesn't exist!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -121,9 +121,9 @@ export default async function guildTop(
embeds: [
{
description: "Fetching your guild data...",
color: embedColor,
},
],
color: embedColor
}
]
})
guild = await getGuild(query, "id")
@@ -132,9 +132,9 @@ export default async function guildTop(
embeds: [
{
description: "That guild doesn't exist!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -152,20 +152,20 @@ export default async function guildTop(
})
.reduce((a, b) => a + b, 0)
const gexpToday = new Intl.NumberFormat("en-US").format(
gexpTodayUnformatted,
gexpTodayUnformatted
)
const averageGuildMemberGEXPUnformatted = Math.floor(
gexpTodayUnformatted / guildMembers.length,
gexpTodayUnformatted / guildMembers.length
)
const averageGuildMemberGEXP = new Intl.NumberFormat("en-US").format(
averageGuildMemberGEXPUnformatted,
averageGuildMemberGEXPUnformatted
)
const allMembersDailyGEXP = guildMembers.map(member => {
return {
uuid: member.uuid,
gexp: member.expHistory[Object.keys(member.expHistory)[0]],
gexp: member.expHistory[Object.keys(member.expHistory)[0]]
}
})
@@ -199,9 +199,9 @@ export default async function guildTop(
" members of " +
guildName +
"...",
color: embedColor,
},
],
color: embedColor
}
]
})
for (let i = 0; i < allMembersSortedUUIDArray.length; i++) {
@@ -210,7 +210,7 @@ export default async function guildTop(
guildData.push({
ign: ign!,
uuid: uuid,
uuid: uuid
})
}
@@ -218,7 +218,7 @@ export default async function guildTop(
"guildTop+" + guildId,
JSON.stringify(guildData),
"EX",
60 * 30,
60 * 30
)
} else {
cacheStatus = true
@@ -231,9 +231,9 @@ export default async function guildTop(
" members of " +
guildName +
"using cache...",
color: embedColor,
},
],
color: embedColor
}
]
})
guildData = JSON.parse(cachedData)
}
@@ -244,7 +244,7 @@ export default async function guildTop(
for (let i = 0; i < amount; i++) {
const gexp = new Intl.NumberFormat("en-US").format(topMembers[i].gexp)
const ign = guildData.find(
member => member.uuid === topMembers[i].uuid,
member => member.uuid === topMembers[i].uuid
)?.ign
const position = i + 1
@@ -253,7 +253,7 @@ export default async function guildTop(
}
const list = Array.from({ length: sliceSize }, (_, i) =>
fieldsValueRaw.slice(i * sliceSize, (i + 1) * sliceSize),
fieldsValueRaw.slice(i * sliceSize, (i + 1) * sliceSize)
)
const newList: NewList = []
@@ -263,7 +263,7 @@ export default async function guildTop(
newList[index] = {
name: "",
value: item.join("\n"),
inline: false,
inline: false
}
})
@@ -288,9 +288,9 @@ export default async function guildTop(
" | " +
devMessage +
cacheStatusText,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
}

View File

@@ -24,7 +24,7 @@ export = {
const commandRawList = client.commands.map(command => {
return {
name: command.name,
command: command,
command: command
}
})
@@ -34,22 +34,22 @@ export = {
if (!command.command.subcommands && command.command.public) {
commandList.push({
name: "**/" + commandName + "**",
value: "`" + command.command.description + "`",
value: "`" + command.command.description + "`"
})
} else if (command.command.subcommands && command.command.public) {
const subcommands = command.command.data.options.map(
subcommand => {
return {
name: commandName + " " + subcommand.toJSON().name,
description: subcommand.toJSON().description,
description: subcommand.toJSON().description
}
},
}
)
for (const subcommand of subcommands) {
commandList.push({
name: "**/" + subcommand.name + "**",
value: "`" + subcommand.description + "`",
value: "`" + subcommand.description + "`"
})
}
}
@@ -65,14 +65,14 @@ export = {
fields: commandList,
color: embedColor,
thumbnail: {
url: interaction.guild!.iconURL() || "",
url: interaction.guild!.iconURL() || ""
},
footer: {
icon_url: interaction.guild!.iconURL() || undefined,
text: interaction.guild!.name + " | " + devMessage,
},
},
],
text: interaction.guild!.name + " | " + devMessage
}
}
]
})
},
}
} as Command

View File

@@ -31,14 +31,14 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
icon_url: interaction.guild!.iconURL() || undefined
},
image: {
url: instructionsgif,
proxy_url: instructionsgif,
},
},
],
proxy_url: instructionsgif
}
}
]
})
},
}
} as Command

View File

@@ -2,7 +2,7 @@ import {
SlashCommandBuilder,
PermissionFlagsBits,
userMention,
GuildMember,
GuildMember
} from "discord.js"
import { admin, helper } from "config/roles.json"
import { color, devMessage } from "config/options.json"
@@ -22,12 +22,12 @@ export = {
option
.setName("member")
.setDescription("Member to kick.")
.setRequired(true),
.setRequired(true)
)
.addStringOption(option =>
option
.setName("reason")
.setDescription("Reason for kicking the member."),
.setDescription("Reason for kicking the member.")
)
.setDefaultMemberPermissions(PermissionFlagsBits.KickMembers)
.setDMPermission(false),
@@ -46,7 +46,7 @@ export = {
if (!modRoles.includes(helper) && !modRoles.includes(admin)) {
await interaction.editReply(
"You do not have permission to use this command.",
"You do not have permission to use this command."
)
return
}
@@ -83,7 +83,7 @@ export = {
{
author: {
name: mod.user.username,
icon_url: mod.user.avatarURL() || undefined,
icon_url: mod.user.avatarURL() || undefined
},
title: "Member Kicked",
description: `
@@ -93,15 +93,15 @@ export = {
`,
color: embedColor,
thumbnail: {
url: mod.user.avatarURL() || "",
url: mod.user.avatarURL() || ""
},
footer: {
text: "ID: " + member.user.id,
icon_url: member.user.avatarURL() || undefined,
icon_url: member.user.avatarURL() || undefined
},
timestamp: new Date().toISOString(),
},
],
timestamp: new Date().toISOString()
}
]
})
await interaction.editReply({
@@ -119,14 +119,14 @@ export = {
mod.user.username,
color: embedColor,
thumbnail: {
url: member.user.avatarURL() || "",
url: member.user.avatarURL() || ""
},
footer: {
icon_url: interaction.guild!.iconURL() || undefined,
text: interaction.guild!.name + " | " + devMessage,
},
},
],
text: interaction.guild!.name + " | " + devMessage
}
}
]
})
},
}
} as Command

View File

@@ -25,11 +25,11 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild?.iconURL() || undefined,
icon_url: interaction.guild?.iconURL() || undefined
},
timestamp: new Date().toISOString(),
},
],
timestamp: new Date().toISOString()
}
]
})
},
}
} as Command

View File

@@ -16,7 +16,7 @@ export = {
option
.setName("user")
.setDescription("User to show pp size")
.setRequired(false),
.setRequired(false)
)
.setDMPermission(false),
@@ -37,9 +37,9 @@ export = {
{
title: `${user.username}'s pp size`,
description: `8${"=".repeat(size)}D`,
color: embedColor,
},
],
color: embedColor
}
]
})
},
}
} as Command

View File

@@ -1,7 +1,7 @@
import {
SlashCommandBuilder,
PermissionFlagsBits,
userMention,
userMention
} from "discord.js"
import { color, devMessage } from "config/options.json"
import waitinglistSchema from "schemas/waitinglistSchema"
@@ -21,13 +21,13 @@ export = {
option
.setName("user")
.setDescription("The user to remove.")
.setRequired(true),
.setRequired(true)
)
.addStringOption(option =>
option
.setName("reason")
.setDescription("The reason for removing the user.")
.setRequired(false),
.setRequired(false)
)
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
@@ -50,9 +50,9 @@ export = {
description:
userMention(user.id) +
" is not on the waiting list.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -64,7 +64,7 @@ export = {
{
author: {
name: mod.username,
icon_url: mod.avatarURL() || undefined,
icon_url: mod.avatarURL() || undefined
},
title: "Waiting List - Remove User",
description: `
@@ -74,15 +74,15 @@ export = {
`,
color: embedColor,
thumbnail: {
url: mod.avatarURL() || "",
url: mod.avatarURL() || ""
},
footer: {
icon_url: user.avatarURL() || undefined,
text: "ID: " + user.id,
text: "ID: " + user.id
},
timestamp: new Date().toISOString(),
},
],
timestamp: new Date().toISOString()
}
]
})
await interaction.editReply({
@@ -99,10 +99,10 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
},
}
} as Command

View File

@@ -7,7 +7,7 @@ import {
swstars,
swkdr,
duelswins,
duelswlr,
duelswlr
} from "config/reqs.json"
import { Command } from "interfaces"
@@ -33,7 +33,7 @@ export = {
"**You must make 100k-150k weekly GEXP.\nAs well as onne of the game stats below**",
color: embedColor,
thumbnail: {
url: interaction.guild!.iconURL() || "",
url: interaction.guild!.iconURL() || ""
},
fields: [
{
@@ -45,7 +45,7 @@ export = {
bwwins.toString() +
"`\n**FKDR:** `" +
bwfkdr.toString() +
"`",
"`"
},
{
name: "**Skywars**",
@@ -54,7 +54,7 @@ export = {
swstars.toString() +
"`\n**KDR:** `" +
swkdr.toString() +
"`",
"`"
},
{
name: "**Duels**",
@@ -63,15 +63,15 @@ export = {
duelswins.toString() +
"`\n**WLR:** `" +
duelswlr.toString() +
"`",
},
"`"
}
],
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
},
}
} as Command

View File

@@ -2,7 +2,7 @@ import {
SlashCommandBuilder,
PermissionFlagsBits,
ChannelType,
TextChannel,
TextChannel
} from "discord.js"
import { color, devMessage } from "config/options.json"
import { Command } from "interfaces"
@@ -20,7 +20,7 @@ export = {
option
.setName("message")
.setDescription("The message to send.")
.setRequired(true),
.setRequired(true)
)
.addChannelOption(option =>
option
@@ -28,8 +28,8 @@ export = {
.setDescription("The channel to send the message to.")
.addChannelTypes(
ChannelType.GuildText,
ChannelType.GuildAnnouncement,
),
ChannelType.GuildAnnouncement
)
)
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
@@ -49,14 +49,14 @@ export = {
description: message,
color: embedColor,
thumbnail: {
url: interaction.guild!.iconURL() || "",
url: interaction.guild!.iconURL() || ""
},
footer: {
text: interaction.guild!.id + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
await interaction.editReply({
@@ -66,10 +66,10 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
},
}
} as Command

View File

@@ -2,7 +2,7 @@ import {
SlashCommandBuilder,
PermissionFlagsBits,
userMention,
GuildMember,
GuildMember
} from "discord.js"
import { color, devMessage } from "config/options.json"
import { Command } from "interfaces"
@@ -21,13 +21,13 @@ export = {
option
.setName("user")
.setDescription("The user to set the nickname for")
.setRequired(true),
.setRequired(true)
)
.addStringOption(option =>
option
.setName("nickname")
.setDescription("The nickname to set")
.setRequired(true),
.setRequired(true)
)
.setDefaultMemberPermissions(PermissionFlagsBits.ManageNicknames)
.setDMPermission(false),
@@ -40,7 +40,7 @@ export = {
if (!member.manageable) {
interaction.reply({
content: "I cannot set the nickname for this user!",
ephemeral: true,
ephemeral: true
})
return
}
@@ -52,7 +52,7 @@ export = {
{
author: {
name: interaction.user.username,
icon_url: interaction.user.avatarURL() || undefined,
icon_url: interaction.user.avatarURL() || undefined
},
title: "Nickname",
description: `
@@ -62,15 +62,15 @@ export = {
`,
color: embedColor,
thumbnail: {
url: interaction.user.avatarURL() || "",
url: interaction.user.avatarURL() || ""
},
footer: {
text: "ID: " + member.user.id,
icon_url: member.user.avatarURL() || undefined,
icon_url: member.user.avatarURL() || undefined
},
timestamp: new Date().toISOString(),
},
],
timestamp: new Date().toISOString()
}
]
})
await interaction.reply({
@@ -80,11 +80,11 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
icon_url: interaction.guild!.iconURL() || undefined
}
}
],
ephemeral: true,
ephemeral: true
})
},
}
} as Command

View File

@@ -5,7 +5,7 @@ import {
ActionRowBuilder,
ButtonStyle,
ChannelType,
TextChannel,
TextChannel
} from "discord.js"
import { color, devMessage } from "config/options.json"
import { Command } from "interfaces"
@@ -28,14 +28,14 @@ export = {
option
.setName("channel")
.setDescription(
"The channel to send the application to.",
"The channel to send the application to."
)
.addChannelTypes(
ChannelType.GuildText,
ChannelType.GuildAnnouncement,
ChannelType.GuildAnnouncement
)
.setRequired(true),
),
.setRequired(true)
)
)
.addSubcommand(subcommand =>
subcommand
@@ -45,14 +45,14 @@ export = {
option
.setName("channel")
.setDescription(
"The channel to send the application to.",
"The channel to send the application to."
)
.addChannelTypes(
ChannelType.GuildText,
ChannelType.GuildAnnouncement,
ChannelType.GuildAnnouncement
)
.setRequired(true),
),
.setRequired(true)
)
)
.addSubcommand(subcommand =>
subcommand
@@ -62,14 +62,14 @@ export = {
option
.setName("channel")
.setDescription(
"The channel to send the verfiy message to.",
"The channel to send the verfiy message to."
)
.addChannelTypes(
ChannelType.GuildText,
ChannelType.GuildAnnouncement,
ChannelType.GuildAnnouncement
)
.setRequired(true),
),
.setRequired(true)
)
)
.addSubcommand(subcommand =>
subcommand
@@ -79,14 +79,14 @@ export = {
option
.setName("channel")
.setDescription(
"The channel to send the waiting list message to.",
"The channel to send the waiting list message to."
)
.addChannelTypes(
ChannelType.GuildText,
ChannelType.GuildAnnouncement,
ChannelType.GuildAnnouncement
)
.setRequired(true),
),
.setRequired(true)
)
)
.addSubcommand(subcommand =>
subcommand
@@ -96,14 +96,14 @@ export = {
option
.setName("channel")
.setDescription(
"The channel to send the application to.",
"The channel to send the application to."
)
.addChannelTypes(
ChannelType.GuildText,
ChannelType.GuildAnnouncement,
ChannelType.GuildAnnouncement
)
.setRequired(true),
),
.setRequired(true)
)
)
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
@@ -168,13 +168,13 @@ export = {
description: description,
color: embedColor,
thumbnail: {
url: interaction.guild!.iconURL() || "",
url: interaction.guild!.iconURL() || ""
},
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
icon_url: interaction.guild!.iconURL() || undefined
}
}
],
components: [
new ActionRowBuilder<ButtonBuilder>().addComponents(
@@ -182,14 +182,14 @@ export = {
.setCustomId(customId)
.setLabel(label)
.setStyle(ButtonStyle.Primary)
.setEmoji({ name: emoji }),
),
],
.setEmoji({ name: emoji })
)
]
})
await interaction.reply({
content: "Message sent",
ephemeral: true,
ephemeral: true
})
},
}
} as Command

View File

@@ -4,7 +4,7 @@ import {
ChannelType,
TextChannel,
channelMention,
userMention,
userMention
} from "discord.js"
import { color, devMessage } from "config/options.json"
import { Command } from "interfaces"
@@ -22,9 +22,7 @@ export = {
.addIntegerOption(option =>
option
.setName("seconds")
.setDescription(
"The amount of seconds to set the slowmode to.",
),
.setDescription("The amount of seconds to set the slowmode to.")
)
.addChannelOption(option =>
option
@@ -32,8 +30,8 @@ export = {
.setDescription("The channel to set the slowmode of.")
.addChannelTypes(
ChannelType.GuildText,
ChannelType.GuildAnnouncement,
),
ChannelType.GuildAnnouncement
)
)
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
@@ -55,10 +53,10 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
return
}
@@ -68,7 +66,7 @@ export = {
{
author: {
name: interaction.user.username,
icon_url: interaction.user.avatarURL() || undefined,
icon_url: interaction.user.avatarURL() || undefined
},
title: "Slowmode Update",
description: `
@@ -78,15 +76,15 @@ export = {
`,
color: embedColor,
thumbnail: {
url: interaction.user.avatarURL() || "",
url: interaction.user.avatarURL() || ""
},
footer: {
icon_url: interaction.guild!.iconURL() || undefined,
text: " ID: " + channel.id,
text: " ID: " + channel.id
},
timestamp: new Date().toISOString(),
},
],
timestamp: new Date().toISOString()
}
]
})
await interaction.editReply({
@@ -96,11 +94,11 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
await channel.setRateLimitPerUser(seconds)
},
}
} as Command

View File

@@ -17,7 +17,7 @@ export = {
option
.setName("user")
.setDescription("The user to snipe")
.setRequired(true),
.setRequired(true)
)
.setDMPermission(false),
@@ -26,7 +26,7 @@ export = {
const member = interaction.options.getMember("user") as GuildMember
const snipeCache = await snipeCacheSchema.find({
userid: member.user.id,
channelid: interaction.channel!.id,
channelid: interaction.channel!.id
})
const embedColor = Number(color.replace("#", "0x"))
const messages: string[] = []
@@ -36,9 +36,9 @@ export = {
embeds: [
{
description: "No messages to snipe",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -51,7 +51,7 @@ export = {
} else {
messages.push(`**Message #${i}:** ${data.content}`)
messages.push(
`**Attachments:** ${data.attachments.join(", ")}\n`,
`**Attachments:** ${data.attachments.join(", ")}\n`
)
}
i++
@@ -62,20 +62,20 @@ export = {
{
author: {
name: member.user.username,
icon_url: member.user.avatarURL() || undefined,
icon_url: member.user.avatarURL() || undefined
},
description: messages.join("\n"),
thumbnail: {
url: member.user.avatarURL() || "",
url: member.user.avatarURL() || ""
},
color: embedColor,
footer: {
text: "ID: " + member.user.id,
icon_url: interaction.guild!.iconURL() || undefined,
icon_url: interaction.guild!.iconURL() || undefined
},
timestamp: new Date().toISOString(),
},
],
timestamp: new Date().toISOString()
}
]
})
},
}
} as Command

View File

@@ -18,7 +18,7 @@ export = {
.addSubcommand(subcommand =>
subcommand
.setName("help")
.setDescription("Get help with staff commands"),
.setDescription("Get help with staff commands")
)
.addSubcommand(subcommand =>
subcommand
@@ -28,15 +28,13 @@ export = {
option
.setName("ign")
.setDescription("The IGN of the player.")
.setRequired(true),
),
.setRequired(true)
)
)
.addSubcommand(subcommand =>
subcommand
.setName("updatediscordroles")
.setDescription(
"Update the discord roles of all guild members",
),
.setDescription("Update the discord roles of all guild members")
)
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
@@ -67,10 +65,10 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
},
}
} as Command

View File

@@ -5,7 +5,7 @@ import {
beastswkdr,
beastswstars,
beastduelswins,
duelswlr,
duelswlr
} from "config/reqs.json"
import { color, devMessage } from "config/options.json"
import {
@@ -15,12 +15,12 @@ import {
getUUID,
getPlayer,
getGuild,
getHeadURL,
getHeadURL
} from "utils/Hypixel"
import { ChatInputCommandInteraction } from "discord.js"
export default async function beast(
interaction: ChatInputCommandInteraction,
interaction: ChatInputCommandInteraction
): Promise<void> {
await interaction.deferReply()
@@ -36,9 +36,9 @@ export default async function beast(
embeds: [
{
description: "Fetching your uuid...",
color: embedColor,
},
],
color: embedColor
}
]
})
const uuid = await getUUID(ign)
@@ -47,9 +47,9 @@ export default async function beast(
embeds: [
{
description: "That player doesn't exist.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -58,9 +58,9 @@ export default async function beast(
embeds: [
{
description: "Fetching your player data...",
color: embedColor,
},
],
color: embedColor
}
]
})
const head = await getHeadURL(ign)
@@ -70,9 +70,9 @@ export default async function beast(
embeds: [
{
description: "That player hasn't played Hypixel before.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -97,9 +97,9 @@ export default async function beast(
embeds: [
{
description: "Fetching your guild data...",
color: embedColor,
},
],
color: embedColor
}
]
})
const guild = await getGuild(uuid)
@@ -124,7 +124,7 @@ export default async function beast(
if (!player.stats) {
statsFields.push({
name: "<a:_warning:1178350183457751100> This player never played any games.",
value: "**➺ Stats:** `None`",
value: "**➺ Stats:** `None`"
})
} else {
if (player.stats.Bedwars) {
@@ -165,12 +165,12 @@ export default async function beast(
hsbwwins.toString() +
" / " +
bwwins.toString() +
"`",
"`"
})
} else {
statsFields.push({
name: "<a:_warning:1178350183457751100> This player never played BedWars.",
value: "**➺ Stats:** `None`",
value: "**➺ Stats:** `None`"
})
}
@@ -206,12 +206,12 @@ export default async function beast(
"`\n" +
"**➺ Wins:** `" +
hsswwins.toString() +
"`",
"`"
})
} else {
statsFields.push({
name: "<a:_warning:1178350183457751100> This player never played SkyWars.",
value: "**➺ Stats:** `None`",
value: "**➺ Stats:** `None`"
})
}
@@ -247,12 +247,12 @@ export default async function beast(
"`\n" +
"**➺ KDR:** `" +
hsduelskd.toFixed(2).toString() +
"`\n",
"`\n"
})
} else {
statsFields.push({
name: "<a:_warning:1178350183457751100> This player never played Duels.",
value: "**➺ Stats:** `None`",
value: "**➺ Stats:** `None`"
})
}
}
@@ -274,14 +274,14 @@ export default async function beast(
"`",
color: embedColor,
thumbnail: {
url: head!,
url: head!
},
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
icon_url: interaction.guild!.iconURL() || undefined
},
fields: statsFields,
},
],
fields: statsFields
}
]
})
}

View File

@@ -4,7 +4,7 @@ import { ExtendedClient as Client } from "utils/Client"
export default async function help(
interaction: ChatInputCommandInteraction,
client: Client,
client: Client
): Promise<void> {
await interaction.deferReply({ ephemeral: true })
@@ -16,7 +16,7 @@ export default async function help(
const commandRawList = client.commands.map(command => {
return {
name: command.name,
command: command,
command: command
}
})
@@ -26,20 +26,20 @@ export default async function help(
if (!command.command.subcommands && !command.command.public) {
commandList.push({
name: "**/" + commandName + "**",
value: "`" + command.command.description + "`",
value: "`" + command.command.description + "`"
})
} else if (command.command.subcommands && !command.command.public) {
const subcommands = command.command.data.options.map(subcommand => {
return {
name: commandName + " " + subcommand.toJSON().name,
description: subcommand.toJSON().description,
description: subcommand.toJSON().description
}
})
for (const subcommand of subcommands) {
commandList.push({
name: "**/" + subcommand.name + "**",
value: "`" + subcommand.description + "`",
value: "`" + subcommand.description + "`"
})
}
}
@@ -55,13 +55,13 @@ export default async function help(
fields: commandList,
color: embedColor,
thumbnail: {
url: interaction.guild!.iconURL() || "",
url: interaction.guild!.iconURL() || ""
},
footer: {
icon_url: interaction.guild!.iconURL() || undefined,
text: interaction.guild?.name + " | " + devMessage,
},
},
],
text: interaction.guild?.name + " | " + devMessage
}
}
]
})
}

View File

@@ -7,7 +7,7 @@ import { getGuild } from "utils/Hypixel"
import { GuildData } from "interfaces"
export default async function updateDiscordRoles(
interaction: ChatInputCommandInteraction,
interaction: ChatInputCommandInteraction
): Promise<void> {
const discordMember = interaction.member as GuildMember
const embedColor = Number(color.replace("#", "0x"))
@@ -19,9 +19,9 @@ export default async function updateDiscordRoles(
{
description:
"You do not have permission to use this command.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -32,9 +32,9 @@ export default async function updateDiscordRoles(
members.map(member => {
return {
id: member.id,
member: member,
member: member
}
}),
})
)
const guildData = (await getGuild(hypixelGuildID, "id")) as GuildData
@@ -42,7 +42,7 @@ export default async function updateDiscordRoles(
const hypixelGuildMembers = guildData.members.map(gmember => {
return {
uuid: gmember.uuid,
rank: gmember.rank,
rank: gmember.rank
}
})
const guildMemberIDs = hypixelGuildMembers.map(gmember => gmember.uuid)
@@ -54,7 +54,7 @@ export default async function updateDiscordRoles(
const verifiedUsers = allVerifiedUsers.map(user => {
return {
userID: user.userID,
uuid: user.uuid,
uuid: user.uuid
}
})
@@ -62,21 +62,21 @@ export default async function updateDiscordRoles(
embeds: [
{
description: `Updating roles for ${guildMembers.length} members...`,
color: embedColor,
},
],
color: embedColor
}
]
})
for (const gmember of guildMembers) {
const memberData = verifiedUsers.find(
user => user.userID === gmember.id,
user => user.userID === gmember.id
)
if (!memberData) {
const rolesToremove = roleManage("default").rolesToRemove
await gmember.member.roles.remove(
rolesToremove,
"Updating all discord members",
"Updating all discord members"
)
continue
}
@@ -85,12 +85,12 @@ export default async function updateDiscordRoles(
const rolesToremove = roleManage("default").rolesToRemove
await gmember.member.roles.remove(
rolesToremove,
"Updating all discord members",
"Updating all discord members"
)
continue
} else if (guildMemberIDs.includes(memberData!.uuid)) {
const guildMemberRank = hypixelGuildMembers.find(
gmember => gmember.uuid === memberData!.uuid,
gmember => gmember.uuid === memberData!.uuid
)!.rank
console.log("Updating roles for " + gmember.member.user.username)
@@ -103,11 +103,11 @@ export default async function updateDiscordRoles(
const rolesmanage = roleManage("gm")
gmember.member.roles.remove(
rolesmanage.rolesToRemove,
"Updating all discord members",
"Updating all discord members"
)
gmember.member.roles.add(
rolesmanage.rolesToAdd,
"Updating all discord members",
"Updating all discord members"
)
continue
} else if (guildMemberRank === "Manager") {
@@ -119,11 +119,11 @@ export default async function updateDiscordRoles(
const rolesmanage = roleManage("manager")
gmember.member.roles.remove(
rolesmanage.rolesToRemove,
"Updating all discord members",
"Updating all discord members"
)
gmember.member.roles.add(
rolesmanage.rolesToAdd,
"Updating all discord members",
"Updating all discord members"
)
continue
} else if (guildMemberRank === "Moderator") {
@@ -135,11 +135,11 @@ export default async function updateDiscordRoles(
const rolesmanage = roleManage("moderator")
gmember.member.roles.remove(
rolesmanage.rolesToRemove,
"Updating all discord members",
"Updating all discord members"
)
gmember.member.roles.add(
rolesmanage.rolesToAdd,
"Updating all discord members",
"Updating all discord members"
)
continue
} else if (guildMemberRank === "Beast") {
@@ -150,11 +150,11 @@ export default async function updateDiscordRoles(
const rolesmanage = roleManage("beast")
gmember.member.roles.remove(
rolesmanage.rolesToRemove,
"Updating all discord members",
"Updating all discord members"
)
gmember.member.roles.add(
rolesmanage.rolesToAdd,
"Updating all discord members",
"Updating all discord members"
)
continue
} else if (guildMemberRank === "Elite") {
@@ -165,11 +165,11 @@ export default async function updateDiscordRoles(
const rolesmanage = roleManage("elite")
gmember.member.roles.remove(
rolesmanage.rolesToRemove,
"Updating all discord members",
"Updating all discord members"
)
gmember.member.roles.add(
rolesmanage.rolesToAdd,
"Updating all discord members",
"Updating all discord members"
)
continue
} else if (guildMemberRank === "Member") {
@@ -180,11 +180,11 @@ export default async function updateDiscordRoles(
const rolesmanage = roleManage("member")
gmember.member.roles.remove(
rolesmanage.rolesToRemove,
"Updating all discord members",
"Updating all discord members"
)
gmember.member.roles.add(
rolesmanage.rolesToAdd,
"Updating all discord members",
"Updating all discord members"
)
continue
}
@@ -198,8 +198,8 @@ export default async function updateDiscordRoles(
embeds: [
{
description: "Successfully updated all roles.",
color: embedColor,
},
],
color: embedColor
}
]
})
}

View File

@@ -3,7 +3,7 @@ import {
PermissionFlagsBits,
userMention,
ChatInputCommandInteraction,
GuildMember,
GuildMember
} from "discord.js"
import { color, devMessage } from "config/options.json"
import { Command } from "interfaces"
@@ -23,18 +23,18 @@ export = {
option
.setName("user")
.setDescription("The user to timeout")
.setRequired(true),
.setRequired(true)
)
.addStringOption(option =>
option
.setName("time")
.setDescription("The time to timeout the user for")
.setRequired(true),
.setRequired(true)
)
.addStringOption(option =>
option
.setName("reason")
.setDescription("The reason for the timeout"),
.setDescription("The reason for the timeout")
)
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
@@ -57,9 +57,9 @@ export = {
embeds: [
{
description: "You cannot timeout a bot.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -69,9 +69,9 @@ export = {
embeds: [
{
description: "You cannot timeout the server owner.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -85,9 +85,9 @@ export = {
{
description:
"I cannot timeout this user because their role is higher than mine.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -98,9 +98,9 @@ export = {
{
description:
"You cannot timeout this user because their role is higher than yours.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -110,9 +110,9 @@ export = {
embeds: [
{
description: "You cannot timeout yourself.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -159,7 +159,7 @@ export = {
{
author: {
name: mod.user.username,
icon_url: mod.user.avatarURL() || undefined,
icon_url: mod.user.avatarURL() || undefined
},
title: title,
description: `
@@ -170,15 +170,15 @@ export = {
`,
color: embedColor,
thumbnail: {
url: mod.user.avatarURL() || "",
url: mod.user.avatarURL() || ""
},
footer: {
text: "ID: " + target.id,
icon_url: target.user.avatarURL() || undefined,
icon_url: target.user.avatarURL() || undefined
},
timestamp: new Date().toISOString(),
},
],
timestamp: new Date().toISOString()
}
]
})
await interaction.editReply({
@@ -188,10 +188,10 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
},
}
} as Command

View File

@@ -2,7 +2,7 @@ import {
SlashCommandBuilder,
PermissionFlagsBits,
userMention,
User,
User
} from "discord.js"
import { color, devMessage } from "config/options.json"
import { Command } from "interfaces"
@@ -22,13 +22,13 @@ export = {
.setName("user")
.setDescription("The user to unban")
.setAutocomplete(true)
.setRequired(true),
.setRequired(true)
)
.addStringOption(option =>
option
.setName("reason")
.setDescription("The reason for unbanning the user")
.setRequired(false),
.setRequired(false)
)
.setDefaultMemberPermissions(PermissionFlagsBits.BanMembers)
.setDMPermission(false),
@@ -48,9 +48,9 @@ export = {
embeds: [
{
description: "You haven't specified a user to unban",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -62,9 +62,9 @@ export = {
embeds: [
{
description: "The user you specified is not valid",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -76,7 +76,7 @@ export = {
{
author: {
name: mod.username,
icon_url: mod.avatarURL() || undefined,
icon_url: mod.avatarURL() || undefined
},
title: "Member Unbanned",
description: `
@@ -86,15 +86,15 @@ export = {
`,
color: embedColor,
thumbnail: {
url: mod.avatarURL() || "",
url: mod.avatarURL() || ""
},
footer: {
text: "ID: " + user!.id,
icon_url: user.avatarURL() || undefined,
icon_url: user.avatarURL() || undefined
},
timestamp: new Date().toISOString(),
},
],
timestamp: new Date().toISOString()
}
]
})
await interaction.editReply({
@@ -112,14 +112,14 @@ export = {
userMention(mod.id),
color: embedColor,
thumbnail: {
url: user!.avatarURL() || "",
url: user!.avatarURL() || ""
},
footer: {
icon_url: interaction.guild!.iconURL() || undefined,
text: interaction.guild!.name + " | " + devMessage,
},
},
],
text: interaction.guild!.name + " | " + devMessage
}
}
]
})
},
}
} as Command

View File

@@ -32,10 +32,10 @@ export = {
color: embedColor,
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
return
}
@@ -44,9 +44,9 @@ export = {
embeds: [
{
description: "Fetching your guild data...",
color: embedColor,
},
],
color: embedColor
}
]
})
const guild = await getGuild(verifyData.uuid)
@@ -63,11 +63,11 @@ export = {
const roles = roleManage("default")
await user.roles.remove(
roles.rolesToRemove,
"User used the update command",
"User used the update command"
)
await user.roles.add(
roles.rolesToAdd,
"User used the update command",
"User used the update command"
)
await interaction.editReply({
@@ -76,14 +76,14 @@ export = {
description: "Updated your roles to `Default Member`",
color: embedColor,
thumbnail: {
url: head!,
url: head!
},
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
return
}
@@ -91,24 +91,24 @@ export = {
if (guildID === hypixelGuildID) {
const GuildMembers = guild!.members
const guildRank = GuildMembers.find(
member => member.uuid === verifyData.uuid,
member => member.uuid === verifyData.uuid
)!.rank
let replyRank: string | null = null
await user.roles.add(
roleManage("default").rolesToAdd,
"User used the update command",
"User used the update command"
)
if (guildRank === "Guild Master") {
const roles = roleManage("gm")
await user.roles.remove(
roles.rolesToRemove,
"User used the update command",
"User used the update command"
)
await user.roles.add(
roles.rolesToAdd,
"User used the update command",
"User used the update command"
)
replyRank = "Guild Master"
}
@@ -117,11 +117,11 @@ export = {
const roles = roleManage("manager")
await user.roles.remove(
roles.rolesToRemove,
"User used the update command",
"User used the update command"
)
await user.roles.add(
roles.rolesToAdd,
"User used the update command",
"User used the update command"
)
replyRank = "Manager"
}
@@ -130,11 +130,11 @@ export = {
const roles = roleManage("moderator")
await user.roles.remove(
roles.rolesToRemove,
"User used the update command",
"User used the update command"
)
await user.roles.add(
roles.rolesToAdd,
"User used the update command",
"User used the update command"
)
replyRank = "Moderator"
}
@@ -143,11 +143,11 @@ export = {
const roles = roleManage("beast")
await user.roles.remove(
roles.rolesToRemove,
"User used the update command",
"User used the update command"
)
await user.roles.add(
roles.rolesToAdd,
"User used the update command",
"User used the update command"
)
replyRank = "Beast"
}
@@ -156,11 +156,11 @@ export = {
const roles = roleManage("elite")
await user.roles.remove(
roles.rolesToRemove,
"User used the update command",
"User used the update command"
)
await user.roles.add(
roles.rolesToAdd,
"User used the update command",
"User used the update command"
)
replyRank = "Elite"
}
@@ -169,11 +169,11 @@ export = {
const roles = roleManage("member")
await user.roles.remove(
roles.rolesToRemove,
"User used the update command",
"User used the update command"
)
await user.roles.add(
roles.rolesToAdd,
"User used the update command",
"User used the update command"
)
replyRank = "Member"
}
@@ -185,15 +185,15 @@ export = {
"Updated your roles to `" + replyRank + "`",
color: embedColor,
thumbnail: {
url: head!,
url: head!
},
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
}
},
}
} as Command

View File

@@ -16,7 +16,7 @@ export = {
option
.setName("ign")
.setDescription("Player's name")
.setRequired(true),
.setRequired(true)
)
.setDMPermission(false),
@@ -35,9 +35,9 @@ export = {
embeds: [
{
description: "That player doesn't exist!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -55,14 +55,14 @@ export = {
"`",
color: embedColor,
thumbnail: {
url: head!,
url: head!
},
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
},
}
} as Command

View File

@@ -21,7 +21,7 @@ export = {
option
.setName("ign")
.setDescription("Your in-game name.")
.setRequired(true),
.setRequired(true)
)
.setDMPermission(false),
@@ -36,7 +36,7 @@ export = {
if (verifyData) {
interaction.editReply(
"You are already verified.\n" +
"Try running /update to update your roles.",
"Try running /update to update your roles."
)
return
}
@@ -47,9 +47,9 @@ export = {
{
description:
"<a:cross_a:1087808606897983539> Please provide your in-game name.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -58,9 +58,9 @@ export = {
embeds: [
{
description: "Fetching your uuid...",
color: embedColor,
},
],
color: embedColor
}
]
})
const uuid = await getUUID(ign)
@@ -70,9 +70,9 @@ export = {
{
description:
"<a:questionmark_pink:1130206038008803488> That player does not exist.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -81,9 +81,9 @@ export = {
embeds: [
{
description: "Fetching your player data...",
color: embedColor,
},
],
color: embedColor
}
]
})
const head = await getHeadURL(ign)
@@ -94,9 +94,9 @@ export = {
{
description:
"<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -112,9 +112,9 @@ export = {
embeds: [
{
description: "Checking your Discord tag...",
color: embedColor,
},
],
color: embedColor
}
]
})
const linkedDiscord = player?.socialMedia?.links?.DISCORD || null
@@ -129,9 +129,9 @@ export = {
"**Please set your Discord tag on hypixel to `" +
username +
"` and try again.**",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -149,9 +149,9 @@ export = {
"**Please set your Discord tag on hypixel to `" +
username +
"` and try again.**",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -160,9 +160,9 @@ export = {
embeds: [
{
description: "Fetching your guild data...",
color: embedColor,
},
],
color: embedColor
}
]
})
const guild = (await getGuild(uuid)) as GuildData | null
@@ -176,7 +176,7 @@ export = {
if (guildID === hypixelGuildID) {
const GuildMembers = guild!.members
const guildRank = GuildMembers.find(
member => member.uuid === player.uuid,
member => member.uuid === player.uuid
)!.rank
if (guildRank === "Guild Master") {
@@ -215,7 +215,7 @@ export = {
const newVerify = new verify({
_id: new mongoose.Types.ObjectId(),
userID: user.id,
uuid: uuid,
uuid: uuid
})
await newVerify.save()
@@ -232,14 +232,14 @@ export = {
"`.",
color: embedColor,
thumbnail: {
url: head!,
url: head!
},
footer: {
icon_url: interaction.guild!.iconURL() || undefined,
text: interaction.guild!.name + " | " + devMessage,
},
},
],
text: interaction.guild!.name + " | " + devMessage
}
}
]
})
},
}
} as Command

View File

@@ -27,9 +27,9 @@ export = {
embeds: [
{
description: "You are not verified!",
color: embedColor,
},
],
color: embedColor
}
]
})
return
}
@@ -49,14 +49,14 @@ export = {
"`",
color: embedColor,
thumbnail: {
url: head!,
url: head!
},
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
},
}
} as Command

View File

@@ -1,7 +1,7 @@
import {
SlashCommandBuilder,
PermissionFlagsBits,
userMention,
userMention
} from "discord.js"
import { getIGN, getHeadURL } from "utils/Hypixel"
import { color, devMessage } from "config/options.json"
@@ -21,7 +21,7 @@ export = {
option
.setName("user")
.setDescription("The user to get the ign of.")
.setRequired(true),
.setRequired(true)
)
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.setDMPermission(false),
@@ -35,7 +35,7 @@ export = {
const verifiedUser = await verify.findOne({ userID: user.id })
if (!verifiedUser) {
interaction.editReply({
content: "This user has not verified their account.",
content: "This user has not verified their account."
})
return
}
@@ -54,14 +54,14 @@ export = {
ign,
color: embedColor,
thumbnail: {
url: head!,
url: head!
},
footer: {
text: interaction.guild!.name + " | " + devMessage,
icon_url: interaction.guild!.iconURL() || undefined,
},
},
],
icon_url: interaction.guild!.iconURL() || undefined
}
}
]
})
},
}
} as Command