Merge branch 'dev' into 'main'
Dev See merge request illegitimate/illegitimate-bot!339
This commit is contained in:
@@ -2,6 +2,7 @@ import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options"
|
||||
import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "~/config/reqs"
|
||||
import { ICommand } from "~/typings"
|
||||
import emoji from "~/utils/Functions/emoji"
|
||||
import { bedwarsLevel, getGuild, getHeadURL, getPlayer, getUUID, hypixelLevel, skywarsLevel } from "~/utils/Hypixel"
|
||||
|
||||
export default {
|
||||
@@ -39,7 +40,7 @@ export default {
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
description: emoji("questionmark") + " That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -58,7 +59,7 @@ export default {
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
description: emoji("questionmark") + " That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -116,7 +117,7 @@ export default {
|
||||
|
||||
if (!player.stats) {
|
||||
statsFields.push({
|
||||
name: "<a:_warning:1178350183457751100> This player never played any games.",
|
||||
name: emoji("warning") + " This player never played any games.",
|
||||
value: "**➺ Stats:** `None`"
|
||||
})
|
||||
} else {
|
||||
@@ -130,9 +131,9 @@ export default {
|
||||
|
||||
let bwtitle = ""
|
||||
if (hsbwstars < bwstars || hsbwfkdr < bwfkdr || hsbwwins < bwwins) {
|
||||
bwtitle = "<a:cross_a:1087808606897983539> This player does not meet the BedWars requirements."
|
||||
bwtitle = emoji("cross") + " This player does not meet the BedWars requirements."
|
||||
} else {
|
||||
bwtitle = "<a:check_a:1087808632172847134> This player meets the BedWars requirements."
|
||||
bwtitle = emoji("checkmark") + " This player meets the BedWars requirements."
|
||||
}
|
||||
|
||||
statsFields.push({
|
||||
@@ -146,7 +147,7 @@ export default {
|
||||
})
|
||||
} else {
|
||||
statsFields.push({
|
||||
name: "<a:_warning:1178350183457751100> This player never played BedWars.",
|
||||
name: emoji("warning") + " This player never played BedWars.",
|
||||
value: "**➺ Stats:** `None`"
|
||||
})
|
||||
}
|
||||
@@ -161,9 +162,9 @@ export default {
|
||||
|
||||
let swtitle = ""
|
||||
if (hsswstars < swstars || hsswkd < swkdr) {
|
||||
swtitle = "<a:cross_a:1087808606897983539> This player does not meet the SkyWars requirements."
|
||||
swtitle = emoji("cross") + " This player does not meet the SkyWars requirements."
|
||||
} else {
|
||||
swtitle = "<a:check_a:1087808632172847134> This player meets the SkyWars requirements."
|
||||
swtitle = emoji("checkmark") + " This player meets the SkyWars requirements."
|
||||
}
|
||||
|
||||
statsFields.push({
|
||||
@@ -176,7 +177,7 @@ export default {
|
||||
})
|
||||
} else {
|
||||
statsFields.push({
|
||||
name: "<a:_warning:1178350183457751100> This player never played SkyWars.",
|
||||
name: emoji("warning") + " This player never played SkyWars.",
|
||||
value: "**➺ Stats:** `None`"
|
||||
})
|
||||
}
|
||||
@@ -191,9 +192,9 @@ export default {
|
||||
|
||||
let duelstitle = ""
|
||||
if (hsduelswins < duelswins || hsduelswlr < duelswlr) {
|
||||
duelstitle = "<a:cross_a:1087808606897983539> This player does not meet the Duels requirements."
|
||||
duelstitle = emoji("cross") + " This player does not meet the Duels requirements."
|
||||
} else {
|
||||
duelstitle = "<a:check_a:1087808632172847134> This player meets the Duels requirements."
|
||||
duelstitle = emoji("checkmark") + " This player meets the Duels requirements."
|
||||
}
|
||||
|
||||
statsFields.push({
|
||||
@@ -206,7 +207,7 @@ export default {
|
||||
})
|
||||
} else {
|
||||
statsFields.push({
|
||||
name: "<a:_warning:1178350183457751100> This player never played Duels.",
|
||||
name: emoji("warning") + " This player never played Duels.",
|
||||
value: "**➺ Stats:** `None`"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandB
|
||||
import { addVerify, getVerify } from "src/drizzle/functions"
|
||||
import { devMessage, embedColor, hypixelGuildID } from "~/config/options"
|
||||
import { ICommand } from "~/typings"
|
||||
import emoji from "~/utils/Functions/emoji"
|
||||
import getGuildRank from "~/utils/Functions/guildrank"
|
||||
import logToChannel from "~/utils/Functions/logtochannel"
|
||||
import roleManage from "~/utils/Functions/rolesmanage"
|
||||
@@ -58,7 +59,7 @@ export default {
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player doesn't exist.",
|
||||
description: emoji("questionmark") + " That player doesn't exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -76,7 +77,7 @@ export default {
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
description: emoji("questionmark") + " That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { SlashCommandSubcommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options"
|
||||
import { IGuildData, SubCommand } from "~/typings"
|
||||
import emoji from "~/utils/Functions/emoji"
|
||||
import { dateTimeFormatter, numberFormatter } from "~/utils/Functions/intlFormaters"
|
||||
import { getGuild, getIGN, getPlayer, getUUID, guildLevel } from "~/utils/Hypixel"
|
||||
|
||||
@@ -43,7 +44,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
description: emoji("questionmark") + " That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -61,7 +62,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
description: emoji("questionmark") + " That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { SlashCommandSubcommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options"
|
||||
import { SubCommand } from "~/typings"
|
||||
import emoji from "~/utils/Functions/emoji"
|
||||
import { dateTimeFormatter, numberFormatter } from "~/utils/Functions/intlFormaters"
|
||||
import { getGuild, getHeadURL, getPlayer, getUUID } from "~/utils/Hypixel"
|
||||
|
||||
@@ -32,7 +33,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
description: emoji("questionmark") + " That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -51,7 +52,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
if (!player) {
|
||||
await interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
description: emoji("questionmark") + " That player hasn't played Hypixel before.",
|
||||
color: embedColor,
|
||||
thumbnail: {
|
||||
url: head!
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { SlashCommandSubcommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options"
|
||||
import { IGuildData, SubCommand } from "~/typings"
|
||||
import emoji from "~/utils/Functions/emoji"
|
||||
import { numberFormatter } from "~/utils/Functions/intlFormaters"
|
||||
import { getGuild, getIGN, getPlayer, getUUID } from "~/utils/Hypixel"
|
||||
import { redis } from "~/utils/Illegitimate"
|
||||
@@ -50,7 +51,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
description: emoji("questionmark") + " That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -68,7 +69,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
description: emoji("questionmark") + " That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -2,6 +2,7 @@ import { SlashCommandSubcommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options"
|
||||
import { beastbwfkdr, beastbwstars, beastduelswins, beastswkdr, beastswstars, bwwins, duelswlr } from "~/config/reqs"
|
||||
import { SubCommand } from "~/typings"
|
||||
import emoji from "~/utils/Functions/emoji"
|
||||
import { bedwarsLevel, getGuild, getHeadURL, getPlayer, getUUID, hypixelLevel, skywarsLevel } from "~/utils/Hypixel"
|
||||
|
||||
export const beastSub = new SlashCommandSubcommandBuilder()
|
||||
@@ -30,7 +31,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
description: emoji("questionmark") + " That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -49,7 +50,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
description: emoji("questionmark") + " That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -100,7 +101,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
|
||||
if (!player.stats) {
|
||||
statsFields.push({
|
||||
name: "<a:_warning:1178350183457751100> This player never played any games.",
|
||||
name: emoji("warning") + " This player never played any games.",
|
||||
value: "**➺ Stats:** `None`"
|
||||
})
|
||||
} else {
|
||||
@@ -114,9 +115,9 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
|
||||
let bwtitle = ""
|
||||
if (hsbwstars < beastbwstars || hsbwfkdr < beastbwfkdr || hsbwwins < bwwins) {
|
||||
bwtitle = "<a:cross_a:1087808606897983539> This player does not meet the BedWars requirements."
|
||||
bwtitle = emoji("cross") + " This player does not meet the BedWars requirements."
|
||||
} else {
|
||||
bwtitle = "<a:check_a:1087808632172847134> This player meets the BedWars requirements."
|
||||
bwtitle = emoji("checkmark") + " This player meets the BedWars requirements."
|
||||
}
|
||||
|
||||
statsFields.push({
|
||||
@@ -130,7 +131,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
})
|
||||
} else {
|
||||
statsFields.push({
|
||||
name: "<a:_warning:1178350183457751100> This player never played BedWars.",
|
||||
name: emoji("warning") + " This player never played BedWars.",
|
||||
value: "**➺ Stats:** `None`"
|
||||
})
|
||||
}
|
||||
@@ -145,9 +146,9 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
|
||||
let swtitle = ""
|
||||
if (hsswstars < beastswstars || hsswkd < beastswkdr) {
|
||||
swtitle = "<a:cross_a:1087808606897983539> This player does not meet the SkyWars requirements."
|
||||
swtitle = emoji("cross") + " This player does not meet the SkyWars requirements."
|
||||
} else {
|
||||
swtitle = "<a:check_a:1087808632172847134> This player meets the SkyWars requirements."
|
||||
swtitle = emoji("checkmark") + " This player meets the SkyWars requirements."
|
||||
}
|
||||
|
||||
statsFields.push({
|
||||
@@ -160,7 +161,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
})
|
||||
} else {
|
||||
statsFields.push({
|
||||
name: "<a:_warning:1178350183457751100> This player never played SkyWars.",
|
||||
name: emoji("warning") + " This player never played SkyWars.",
|
||||
value: "**➺ Stats:** `None`"
|
||||
})
|
||||
}
|
||||
@@ -175,9 +176,9 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
|
||||
let duelstitle = ""
|
||||
if (hsduelswins < beastduelswins || hsduelswlr < duelswlr) {
|
||||
duelstitle = "<a:cross_a:1087808606897983539> This player does not meet the Duels requirements."
|
||||
duelstitle = emoji("cross") + " This player does not meet the Duels requirements."
|
||||
} else {
|
||||
duelstitle = "<a:check_a:1087808632172847134> This player meets the Duels requirements."
|
||||
duelstitle = emoji("checkmark") + " This player meets the Duels requirements."
|
||||
}
|
||||
|
||||
statsFields.push({
|
||||
@@ -190,7 +191,7 @@ const cmd: SubCommand = async ({ interaction }) => {
|
||||
})
|
||||
} else {
|
||||
statsFields.push({
|
||||
name: "<a:_warning:1178350183457751100> This player never played Duels.",
|
||||
name: emoji("warning") + " This player never played Duels.",
|
||||
value: "**➺ Stats:** `None`"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { InteractionContextType, SlashCommandBuilder } from "discord.js"
|
||||
import { devMessage, embedColor } from "~/config/options"
|
||||
import { ICommand } from "~/typings"
|
||||
import emoji from "~/utils/Functions/emoji"
|
||||
import { formatUuid, getHeadURL, getIGN, getUUID } from "~/utils/Hypixel"
|
||||
|
||||
export default {
|
||||
@@ -31,7 +32,7 @@ export default {
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
description: emoji("questionmark") + " That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
|
||||
@@ -2,6 +2,7 @@ import { GuildMember, InteractionContextType, SlashCommandBuilder } from "discor
|
||||
import { addVerify, getVerify } from "src/drizzle/functions"
|
||||
import { devMessage, embedColor, hypixelGuildID } from "~/config/options"
|
||||
import { ICommand, IGuildData, IPlayerData } from "~/typings"
|
||||
import emoji from "~/utils/Functions/emoji"
|
||||
import getGuildRank from "~/utils/Functions/guildrank"
|
||||
import roleManage from "~/utils/Functions/rolesmanage"
|
||||
import { getGuild, getHeadURL, getPlayer, getUUID } from "~/utils/Hypixel"
|
||||
@@ -48,7 +49,7 @@ export default {
|
||||
if (!uuid) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist.",
|
||||
description: emoji("questionmark") + " That player does not exist.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -67,7 +68,7 @@ export default {
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
description: emoji("questionmark") + " That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -87,7 +88,7 @@ export default {
|
||||
if (!linkedDiscord) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:cross_a:1087808606897983539> There is no Discord account linked to `" + player.displayname + "`.\n\n" +
|
||||
description: emoji("cross") + " There is no Discord account linked to `" + player.displayname + "`.\n\n" +
|
||||
"**Please set your Discord tag on hypixel to `" + username + "` and try again.**",
|
||||
color: embedColor
|
||||
}]
|
||||
@@ -98,7 +99,7 @@ export default {
|
||||
if (linkedDiscord !== username) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:cross_a:1087808606897983539> The Discord account linked to `" +
|
||||
description: emoji("cross") + " The Discord account linked to `" +
|
||||
player.displayname + "` is currently `" + linkedDiscord + "`\n\n" +
|
||||
"**Please set your Discord tag on hypixel to `" + username + "` and try again.**",
|
||||
color: embedColor
|
||||
|
||||
@@ -2,6 +2,7 @@ import { getGuildApp } from "src/drizzle/functions"
|
||||
import { devMessage, embedColor } from "~/config/options"
|
||||
import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "~/config/reqs"
|
||||
import { IButton } from "~/typings"
|
||||
import emoji from "~/utils/Functions/emoji"
|
||||
import { bedwarsLevel, getGuild, getHeadURL, getPlayer, hypixelLevel, skywarsLevel } from "~/utils/Hypixel"
|
||||
|
||||
export default {
|
||||
@@ -21,7 +22,7 @@ export default {
|
||||
if (!player) {
|
||||
interaction.editReply({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player hasn't played Hypixel before.",
|
||||
description: emoji("questionmark") + " That player hasn't played Hypixel before.",
|
||||
color: embedColor
|
||||
}]
|
||||
})
|
||||
@@ -73,7 +74,7 @@ export default {
|
||||
const statsFields = []
|
||||
if (!player.stats) {
|
||||
statsFields.push({
|
||||
name: "<a:_warning:1178350183457751100> This player never played any games.",
|
||||
name: emoji("warning") + " This player never played any games.",
|
||||
value: "**➺ Stats:** `None`"
|
||||
})
|
||||
} else {
|
||||
@@ -87,9 +88,9 @@ export default {
|
||||
|
||||
let bwtitle = ""
|
||||
if (hsbwstars < bwstars || hsbwfkdr < bwfkdr || hsbwwins < bwwins) {
|
||||
bwtitle = "<a:cross_a:1087808606897983539> This player does not meet the BedWars requirements."
|
||||
bwtitle = emoji("cross") + " This player does not meet the BedWars requirements."
|
||||
} else {
|
||||
bwtitle = "<a:check_a:1087808632172847134> This player meets the BedWars requirements."
|
||||
bwtitle = emoji("checkmark") + " This player meets the BedWars requirements."
|
||||
}
|
||||
|
||||
statsFields.push({
|
||||
@@ -113,9 +114,9 @@ export default {
|
||||
|
||||
let swtitle = ""
|
||||
if (hsswstars < swstars || hsswkd < swkdr) {
|
||||
swtitle = "<a:cross_a:1087808606897983539> This player does not meet the SkyWars requirements."
|
||||
swtitle = emoji("cross") + " This player does not meet the SkyWars requirements."
|
||||
} else {
|
||||
swtitle = "<a:check_a:1087808632172847134> This player meets the SkyWars requirements."
|
||||
swtitle = emoji("checkmark") + " This player meets the SkyWars requirements."
|
||||
}
|
||||
|
||||
statsFields.push({
|
||||
@@ -138,9 +139,9 @@ export default {
|
||||
|
||||
let duelstitle = ""
|
||||
if (hsduelswins < duelswins || hsduelswlr < duelswlr) {
|
||||
duelstitle = "<a:cross_a:1087808606897983539> This player does not meet the Duels requirements."
|
||||
duelstitle = emoji("cross") + " This player does not meet the Duels requirements."
|
||||
} else {
|
||||
duelstitle = "<a:check_a:1087808632172847134> This player meets the Duels requirements."
|
||||
duelstitle = emoji("checkmark") + " This player meets the Duels requirements."
|
||||
}
|
||||
|
||||
statsFields.push({
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Collection, EmbedBuilder, GuildMember, Message } from "discord.js"
|
||||
import { embedColor } from "~/config/options"
|
||||
import { getUUID } from "~/utils/Hypixel"
|
||||
import emoji from "./emoji"
|
||||
|
||||
const tooLong = new EmbedBuilder()
|
||||
.setDescription("You took too long to respond.")
|
||||
@@ -59,7 +60,7 @@ export default async function applicationQuestions(
|
||||
if (!uuid) {
|
||||
await user.send({
|
||||
embeds: [{
|
||||
description: "<a:questionmark_pink:1130206038008803488> That player does not exist." +
|
||||
description: emoji("questionmark") + " That player does not exist." +
|
||||
"Application cancelled.",
|
||||
color: embedColor
|
||||
}]
|
||||
|
||||
13
src/utils/Functions/emoji.ts
Normal file
13
src/utils/Functions/emoji.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
const emojis = {
|
||||
questionmark: { name: "questionmark_pink", type: "a", id: "1130206038008803488" },
|
||||
warning: { name: "_warning", type: "a", id: "1178350183457751100" },
|
||||
cross: { name: "cross_a", type: "a", id: "1087808606897983539" },
|
||||
checkmark: { name: "check_a", type: "a", id: "1087808632172847134" }
|
||||
}
|
||||
|
||||
type Emoji = keyof typeof emojis
|
||||
|
||||
export default function emoji(emoji: Emoji) {
|
||||
const e = emojis[emoji]
|
||||
return `<${e.type}:${e.name}:${e.id}>`
|
||||
}
|
||||
Reference in New Issue
Block a user