diff --git a/dprint.json b/dprint.json new file mode 100644 index 0000000..8ce361e --- /dev/null +++ b/dprint.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://plugins.dprint.dev/dprint/dprint-plugin-typescript/latest/schema.json", + "typescript": { + "lineWidth": 150, + "indentWidth": 4, + "useTabs": false, + "semiColons": "asi", + "quoteStyle": "alwaysDouble", + "newLineKind": "lf", + "bracePosition": "sameLine", + "trailingCommas": "never", + "operatorPosition": "maintain", + "typeLiteral.separatorKind.singleLine": "comma", + "typeLiteral.separatorKind.multiLine": "semiColon" + }, + "json": { + "indentWidth": "4" + }, + "markdown": { + }, + "toml": { + }, + "excludes": [ + "**/node_modules", + "**/*-lock.json" + ], + "plugins": [ + "https://plugins.dprint.dev/typescript-0.91.8.wasm", + "https://plugins.dprint.dev/json-0.19.3.wasm", + "https://plugins.dprint.dev/markdown-0.17.8.wasm", + "https://plugins.dprint.dev/toml-0.6.2.wasm" + ] +} diff --git a/package.json b/package.json index d5315c4..085fa52 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "dev:conc": "conc --names \"SWC,BOT\" --prefix-colors \"blue, magenta\" \"yarn watch\" \"yarn dev:js\"", "dev:ts": "nodemon --config nodemon.json src/index.ts", "dev:js": "nodemon --config nodemon-js.json dist/index.js", + "format": "dprint fmt \"**/*.ts\"", "check": "tsc --noEmit", "lint": "eslint", "lint:fix": "eslint --fix", @@ -61,6 +62,7 @@ "chokidar": "^3.6.0", "concurrently": "^8.2.2", "cross-env": "^7.0.3", + "dprint": "^0.47.2", "eslint": "^9.9.0", "globals": "^15.9.0", "sqlite3": "^5.1.7", diff --git a/scripts/delete-commands.ts b/scripts/delete-commands.ts index c3b00e9..7572966 100644 --- a/scripts/delete-commands.ts +++ b/scripts/delete-commands.ts @@ -8,7 +8,7 @@ async function deleteCommands() { console.log("Started deleting application (/) commands.") await rest.put( Routes.applicationGuildCommands(env.dev.devid, env.dev.guildid), - { body: [] }, + { body: [] } ) console.log("Successfully deleted application (/) commands.") } catch (error) { diff --git a/scripts/deploy-commands.ts b/scripts/deploy-commands.ts index 9294dea..6e5489c 100644 --- a/scripts/deploy-commands.ts +++ b/scripts/deploy-commands.ts @@ -2,7 +2,7 @@ import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js" import fs from "node:fs" import { ICommand } from "../src/interfaces" import env from "../src/utils/Env" -import color from "../src/utils/functions/colors" +import { color } from "../src/utils/functions/colors" const rest = new REST({ version: "10" }).setToken(env.prod.token) const commands: RESTPutAPIApplicationCommandsJSONBody = [] @@ -18,7 +18,7 @@ for (const file of contentMenuCommands) { commands.push(command.data.toJSON()) } -(async () => { +;(async () => { try { console.log(color(`Started refreshing ${commands.length} application (/) commands.`, "green")) @@ -27,12 +27,11 @@ for (const file of contentMenuCommands) { await rest.put( Routes.applicationCommands(env.dev.clientid), - { body: commands }, + { body: commands } ).then(() => { console.log(color(`Successfully reloaded ${commands.length} application (/) commands.`, "green")) process.exit(0) }) - } catch (error) { console.error(error) } diff --git a/scripts/dev-deploy.ts b/scripts/dev-deploy.ts index 506e813..e3f7629 100644 --- a/scripts/dev-deploy.ts +++ b/scripts/dev-deploy.ts @@ -1,7 +1,7 @@ import { REST, RESTPutAPIApplicationCommandsJSONBody, Routes } from "discord.js" import fs from "fs" -import env from "../src/utils/Env" import { ICommand } from "../src/interfaces" +import env from "../src/utils/Env" const rest = new REST({ version: "10" }).setToken(env.dev.devtoken) const commands: RESTPutAPIApplicationCommandsJSONBody = [] @@ -21,13 +21,13 @@ for (const file of contentMenuCommands) { } } -(async () => { +;(async () => { try { console.log(`Started refreshing ${commands.length} application (/) commands.`) await rest.put( Routes.applicationGuildCommands(env.dev.devid, env.dev.guildid), - { body: commands }, + { body: commands } ).then(() => { console.log(`Successfully reloaded ${commands.length} application (/) commands.`) process.exit(0) diff --git a/src/commands-contextmenu/congratsmessage.ts b/src/commands-contextmenu/congratsmessage.ts index 31ce36e..54328c5 100644 --- a/src/commands-contextmenu/congratsmessage.ts +++ b/src/commands-contextmenu/congratsmessage.ts @@ -1,4 +1,4 @@ -import { ContextMenuCommandBuilder, ApplicationCommandType, PermissionFlagsBits, userMention } from "discord.js" +import { ApplicationCommandType, ContextMenuCommandBuilder, PermissionFlagsBits, userMention } from "discord.js" import { IContextMenu } from "interfaces" export default { diff --git a/src/commands-contextmenu/resetnick.ts b/src/commands-contextmenu/resetnick.ts index 87adc46..fdbe3c3 100644 --- a/src/commands-contextmenu/resetnick.ts +++ b/src/commands-contextmenu/resetnick.ts @@ -1,4 +1,4 @@ -import { ContextMenuCommandBuilder, ApplicationCommandType, PermissionFlagsBits } from "discord.js" +import { ApplicationCommandType, ContextMenuCommandBuilder, PermissionFlagsBits } from "discord.js" import { IContextMenu } from "interfaces" export default { diff --git a/src/commands-contextmenu/updateuser.ts b/src/commands-contextmenu/updateuser.ts index 7da16f0..205853e 100644 --- a/src/commands-contextmenu/updateuser.ts +++ b/src/commands-contextmenu/updateuser.ts @@ -1,10 +1,10 @@ +import { devMessage, embedColor, hypixelGuildID } from "config/options.js" +import { waitingListRole } from "config/roles.js" import { ApplicationCommandType, ContextMenuCommandBuilder, PermissionFlagsBits, userMention } from "discord.js" -import { embedColor, devMessage, hypixelGuildID } from "config/options.js" import { IContextMenu } from "interfaces" import verify from "schemas/verifyTag.js" -import { getGuild, getHeadURL, getIGN } from "utils/Hypixel.js" import roleManage from "utils/functions/rolesmanage.js" -import { waitingListRole } from "config/roles.js" +import { getGuild, getHeadURL, getIGN } from "utils/Hypixel.js" export default { name: "Update User", diff --git a/src/commands/anime.ts b/src/commands/anime.ts index b1ee2eb..4cf9c73 100644 --- a/src/commands/anime.ts +++ b/src/commands/anime.ts @@ -1,15 +1,13 @@ +import { anilist } from "anilist" +import { devMessage, embedColor } from "config/options.js" import { SlashCommandBuilder } from "discord.js" import { ICommand } from "interfaces" -import { devMessage, embedColor } from "config/options.js" -import { anilist } from "anilist" -import { capitalizeFirstLetter, removeIndents } from "utils/functions/funcs.js" export default { name: "anime", description: "Anime subcommands", public: true, dev: false, - subcommands: true, data: new SlashCommandBuilder() .setName("anime") @@ -59,14 +57,14 @@ export default { const animeEpisodes = anime.episodes ? animeEpisodesRaw : "No episodes available" const animeStartDate = [anime.startDate?.day || "??", anime.startDate?.month || "??", anime.startDate?.year || "????"].join(".") const animeEndDate = [anime.endDate?.day || "??", anime.endDate?.month || "??", anime.endDate?.year || "????"].join(".") - const animeSeasonRaw = capitalizeFirstLetter(anime.season ?? "null") + " " + anime.startDate?.year + const animeSeasonRaw = anime.season?.capitalizeFirstLetter() + " " + anime.startDate?.year const animeSeason = anime.season ? animeSeasonRaw : "No season available" await interaction.editReply({ embeds: [{ title: romaji + " | " + english, url: anime.siteUrl || "", - description: removeIndents(` + description: ` **Description:** ${animeDescription} **Genres:** ${anime.genres.join(", ")} @@ -76,7 +74,7 @@ export default { **Season:** ${animeSeason} **Start Date:** ${animeStartDate} **End Date:** ${animeEndDate} - `), + `.removeIndents(), color: embedColor, thumbnail: { url: anime.coverImage?.medium || "" diff --git a/src/commands/ban.ts b/src/commands/ban.ts index 416c528..303bc91 100644 --- a/src/commands/ban.ts +++ b/src/commands/ban.ts @@ -1,9 +1,8 @@ -import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember, } from "discord.js" +import { devMessage, embedColor } from "config/options.js" import { admin, helper } from "config/roles.js" -import { embedColor, devMessage } from "config/options.js" +import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel.js" -import { removeIndents } from "utils/functions/funcs.js" export default { name: "ban", @@ -36,7 +35,7 @@ export default { { name: "4 days", value: 4 }, { name: "5 days", value: 5 }, { name: "6 days", value: 6 }, - { name: "7 days", value: 7 }, + { name: "7 days", value: 7 } ) ) .setDefaultMemberPermissions(PermissionFlagsBits.BanMembers) @@ -102,12 +101,12 @@ export default { icon_url: mod.user.avatarURL() || undefined }, title: "Member Banned", - description: removeIndents(` + description: ` **User:** ${userMention(member.user.id)} **Mod:** ${userMention(mod.user.id)} **Reason:** ${reason} **Messages Deleted:** ${messageDeletionDays} days - `), + `.removeIndents(), color: embedColor, thumbnail: { url: mod.user.avatarURL() || "" @@ -136,5 +135,5 @@ export default { } }] }) - }, + } } as ICommand diff --git a/src/commands/botinfo.ts b/src/commands/botinfo.ts index adcc9f6..5f57c9e 100644 --- a/src/commands/botinfo.ts +++ b/src/commands/botinfo.ts @@ -1,11 +1,10 @@ +import { execSync } from "child_process" +import { devMessage, embedColor } from "config/options.js" import { SlashCommandBuilder } from "discord.js" import { ICommand } from "interfaces" -import { embedColor, devMessage } from "config/options.js" +import { createRequire } from "node:module" import os from "os" import prettyMs from "pretty-ms" -import { execSync } from "child_process" -import { removeIndents } from "utils/functions/funcs.js" -import { createRequire } from "node:module" const require = createRequire(import.meta.url) const { dependencies, devDependencies } = require("../../package.json") @@ -46,7 +45,7 @@ export default { await interaction.reply({ embeds: [{ title: "Bot Info", - description: removeIndents(` + description: ` __**Bot**__ > **Name**: \`${client.user!.username}\` > **ID**: \`${client.user!.id}\` @@ -56,8 +55,8 @@ export default { __**Project**__ > **Node Version:** \`${process.version}\` - > **Typescript Version:** \`${(castedDevDeps.typescript).replace("^", "")}\` - > **Discord.js Version:** \`${(castedDeps["discord.js"]).replace("^", "")}\` + > **Typescript Version:** \`${castedDevDeps.typescript.replace("^", "")}\` + > **Discord.js Version:** \`${castedDeps["discord.js"].replace("^", "")}\` > **Dependencies (${Object.keys(castedDeps).length}):** \`${deps}\` > **Dev Dependencies (${Object.keys(castedDevDeps).length}):** \`${devDeps}\` > **Uptime:** \`${prettyMs(client.uptime!, { verbose: true })}\` @@ -67,15 +66,15 @@ export default { > **Channels:** \`${client.channels.cache.size}\` > **Users:** \`${client.users.cache.size}\` > **Roles:** \`${client.guilds.cache.reduce((a, b) => a + b.roles.cache.size, 0)}\` - `), + `.removeIndents(), thumbnail: { - url: client.user!.avatarURL() || "", + url: client.user!.avatarURL() || "" }, color: embedColor, footer: { text: interaction.guild!.name + " | " + devMessage, - icon_url: interaction.guild!.iconURL() || undefined, - }, + icon_url: interaction.guild!.iconURL() || undefined + } }] }) } diff --git a/src/commands/check.ts b/src/commands/check.ts index f031ed7..7c8d607 100644 --- a/src/commands/check.ts +++ b/src/commands/check.ts @@ -1,8 +1,8 @@ +import { devMessage, embedColor } from "config/options.js" +import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "config/reqs.js" import { SlashCommandBuilder } from "discord.js" -import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs.js" -import { embedColor, devMessage } from "config/options.js" -import { hypixelLevel, bedwarsLevel, skywarsLevel, getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel.js" import { ICommand } from "interfaces" +import { bedwarsLevel, getGuild, getHeadURL, getPlayer, getUUID, hypixelLevel, skywarsLevel } from "utils/Hypixel.js" export default { name: "check", @@ -202,7 +202,7 @@ export default { " / " + duelswins.toString() + "`\n" + "**➺ WLR:** `" + hsduelswlr.toFixed(2).toString() + " / " + duelswlr.toString() + "`\n" + - "**➺ KDR:** `" + hsduelskd.toFixed(2).toString() + "`", + "**➺ KDR:** `" + hsduelskd.toFixed(2).toString() + "`" }) } else { statsFields.push({ diff --git a/src/commands/clear.ts b/src/commands/clear.ts index a69d313..768cee0 100644 --- a/src/commands/clear.ts +++ b/src/commands/clear.ts @@ -1,8 +1,7 @@ -import { SlashCommandBuilder, PermissionFlagsBits, TextChannel, channelMention, userMention } from "discord.js" import { embedColor } from "config/options.js" +import { channelMention, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js" import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel.js" -import { removeIndents } from "utils/functions/funcs.js" export default { name: "clear", @@ -53,11 +52,11 @@ export default { icon_url: interaction.user.avatarURL() || undefined }, title: "Messages Cleared", - description: removeIndents(` + description: ` **Channel:** ${channelMention(channel.id)} **Amount:** \`${messages.size}\` messages **Mod:** ${userMention(interaction.user.id)} - `), + `.removeIndents(), color: embedColor, thumbnail: { url: interaction.user.avatarURL() || "" diff --git a/src/commands/config.ts b/src/commands/config.ts index 9d920f1..ccf57b7 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -1,5 +1,5 @@ -import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js" import { embedColor } from "config/options.js" +import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js" import { ICommand } from "interfaces" import settings from "schemas/settingsTag.js" diff --git a/src/commands/counting.ts b/src/commands/counting.ts index 489f74f..c6b8333 100644 --- a/src/commands/counting.ts +++ b/src/commands/counting.ts @@ -1,5 +1,5 @@ +import { devMessage, embedColor } from "config/options.js" import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js" -import { embedColor, devMessage } from "config/options.js" import { ICommand } from "interfaces" import ban from "./counting/ban.js" import unban from "./counting/unban.js" diff --git a/src/commands/counting/ban.ts b/src/commands/counting/ban.ts index a2ee9c8..e4a1e5e 100644 --- a/src/commands/counting/ban.ts +++ b/src/commands/counting/ban.ts @@ -1,6 +1,6 @@ -import { ChatInputCommandInteraction, GuildMember, userMention } from "discord.js" +import { devMessage, embedColor } from "config/options.js" import { countingBanned } from "config/roles.js" -import { embedColor, devMessage } from "config/options.js" +import { ChatInputCommandInteraction, GuildMember, userMention } from "discord.js" export default async function ban(interaction: ChatInputCommandInteraction): Promise { const member = interaction.options.getMember("user")! as GuildMember diff --git a/src/commands/counting/unban.ts b/src/commands/counting/unban.ts index 9e89da4..d3323a8 100644 --- a/src/commands/counting/unban.ts +++ b/src/commands/counting/unban.ts @@ -1,6 +1,6 @@ -import { ChatInputCommandInteraction, GuildMember, userMention } from "discord.js" +import { devMessage, embedColor } from "config/options.js" import { countingBanned } from "config/roles.js" -import { embedColor, devMessage } from "config/options.js" +import { ChatInputCommandInteraction, GuildMember, userMention } from "discord.js" export default async function ban(interaction: ChatInputCommandInteraction): Promise { const member = interaction.options.getMember("user")! as GuildMember diff --git a/src/commands/forceunverify.ts b/src/commands/forceunverify.ts index 95b1aad..6a3605c 100644 --- a/src/commands/forceunverify.ts +++ b/src/commands/forceunverify.ts @@ -1,11 +1,10 @@ -import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js" -import { embedColor, devMessage } from "config/options.js" -import verify from "schemas/verifyTag.js" +import { devMessage, embedColor } from "config/options.js" +import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" import { ICommand } from "interfaces" -import roleManage from "utils/functions/rolesmanage.js" +import verify from "schemas/verifyTag.js" import logToChannel from "utils/functions/logtochannel.js" +import roleManage from "utils/functions/rolesmanage.js" import { getIGN } from "utils/Hypixel.js" -import { removeIndents } from "utils/functions/funcs.js" export default { name: "forceunverify", @@ -58,12 +57,12 @@ export default { name: mod.username, icon_url: mod.avatarURL() || undefined }, - description: removeIndents(` + description: ` **User:** ${userMention(member.user.id)} **Mod:** ${userMention(mod.id)} **IGN:** \`${ign}\` **UUID:** \`${uuid}\` - `), + `.removeIndents(), color: embedColor, thumbnail: { url: mod.avatarURL() || "" diff --git a/src/commands/forceupdate.ts b/src/commands/forceupdate.ts index 948d844..e871aec 100644 --- a/src/commands/forceupdate.ts +++ b/src/commands/forceupdate.ts @@ -1,11 +1,10 @@ -import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js" -import { getGuild, getHeadURL, getIGN } from "utils/Hypixel.js" -import { hypixelGuildID, embedColor, devMessage } from "config/options.js" -import verify from "schemas/verifyTag.js" -import { ICommand } from "interfaces" -import roleManage from "utils/functions/rolesmanage.js" +import { devMessage, embedColor, hypixelGuildID } from "config/options.js" import { waitingListRole } from "config/roles.js" -import { removeIndents } from "utils/functions/funcs.js" +import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" +import { ICommand } from "interfaces" +import verify from "schemas/verifyTag.js" +import roleManage from "utils/functions/rolesmanage.js" +import { getGuild, getHeadURL, getIGN } from "utils/Hypixel.js" export default { name: "forceupdate", @@ -85,11 +84,11 @@ export default { await interaction.editReply({ embeds: [{ - description: removeIndents(` + description: ` ${usermentioned} was given the \`Default Member\` role. IGN: \`${ign}\` - `), + `.removeIndents(), color: embedColor, thumbnail: { url: head! @@ -159,11 +158,11 @@ export default { await interaction.editReply({ embeds: [{ - description: removeIndents(` + description: ` ${usermentioned} was given the \`${replyRank}\` role. IGN: \`${ign}\` - `), + `.removeIndents(), color: embedColor, thumbnail: { url: head! diff --git a/src/commands/forceverify.ts b/src/commands/forceverify.ts index 6e0dbde..6ecc1ae 100644 --- a/src/commands/forceverify.ts +++ b/src/commands/forceverify.ts @@ -1,11 +1,10 @@ -import { SlashCommandBuilder, PermissionFlagsBits, GuildMember, userMention } from "discord.js" -import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel.js" -import { embedColor, hypixelGuildID, devMessage } from "config/options.js" -import verify from "schemas/verifyTag.js" -import roleManage from "utils/functions/rolesmanage.js" +import { devMessage, embedColor, hypixelGuildID } from "config/options.js" +import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" import { ICommand } from "interfaces" +import verify from "schemas/verifyTag.js" import logToChannel from "utils/functions/logtochannel.js" -import { removeIndents } from "utils/functions/funcs.js" +import roleManage from "utils/functions/rolesmanage.js" +import { getGuild, getHeadURL, getPlayer, getUUID } from "utils/Hypixel.js" export default { name: "forceverify", @@ -43,8 +42,10 @@ export default { } if (!user) { - interaction.editReply("Please provide a user to force verify.\n" + - "This can also mean the user is not in the server.") + interaction.editReply( + "Please provide a user to force verify.\n" + + "This can also mean the user is not in the server." + ) return } @@ -161,7 +162,7 @@ export default { await verify.create({ userID: user.user.id, - uuid: uuid, + uuid: uuid }) await logToChannel("mod", { @@ -171,12 +172,12 @@ export default { icon_url: mod.avatarURL() || undefined }, title: "Force Verified", - description: removeIndents(` + description: ` **User:** ${userMention(user.id)} **Mod:** ${userMention(mod.id)} **IGN:** \`${player.displayname}\` **UUID:** \`${uuid}\` - `), + `.removeIndents(), color: embedColor, thumbnail: { url: mod.avatarURL() || "" diff --git a/src/commands/guild.ts b/src/commands/guild.ts index f14db05..a102d09 100644 --- a/src/commands/guild.ts +++ b/src/commands/guild.ts @@ -1,8 +1,8 @@ +import { devMessage, embedColor } from "config/options.js" import { SlashCommandBuilder } from "discord.js" -import { embedColor, devMessage } from "config/options.js" import { ICommand } from "interfaces" -import guildMember from "./guild/member.js" import guildInfo from "./guild/info.js" +import guildMember from "./guild/member.js" import guildTop from "./guild/top.js" export default { diff --git a/src/commands/guild/info.ts b/src/commands/guild/info.ts index 866135e..54a1e91 100644 --- a/src/commands/guild/info.ts +++ b/src/commands/guild/info.ts @@ -1,7 +1,7 @@ -import { getUUID, getIGN, getPlayer, getGuild, guildLevel } from "utils/Hypixel.js" -import { embedColor, devMessage } from "config/options.js" +import { devMessage, embedColor } from "config/options.js" import { ChatInputCommandInteraction } from "discord.js" import { IGuildData } from "interfaces" +import { getGuild, getIGN, getPlayer, getUUID, guildLevel } from "utils/Hypixel.js" export default async function guildInfo(interaction: ChatInputCommandInteraction): Promise { await interaction.deferReply() @@ -118,8 +118,7 @@ export default async function guildInfo(interaction: ChatInputCommandInteraction const guildCreatedMinute = guildCreated.getMinutes() const guildCreatedSecond = guildCreated.getSeconds() - const guildCreatedTime = - guildCreatedDate + "." + + const guildCreatedTime = guildCreatedDate + "." + guildCreatedMonth + "." + guildCreatedYear + " " + guildCreatedHour + ":" + @@ -132,7 +131,9 @@ export default async function guildInfo(interaction: ChatInputCommandInteraction const guildRanks = guildRanksUnsorted.map(r => "**➺ " + r.name + "** `[" + r.tag + "]`").join("\n") const allGuildMembersWeeklyXP = guildMembers.map(member => member.expHistory) - const guildMembersWeeklyXP = allGuildMembersWeeklyXP.map(member => { return Object.values(member).reduce((a, b) => a + b, 0) }) + const guildMembersWeeklyXP = allGuildMembersWeeklyXP.map(member => { + return Object.values(member).reduce((a, b) => a + b, 0) + }) const totalGuildMembersWeeklyXPUnformatted = guildMembersWeeklyXP.reduce((a, b) => a + b, 0) const totalGuildMembersWeeklyXP = new Intl.NumberFormat("en-US").format(totalGuildMembersWeeklyXPUnformatted) diff --git a/src/commands/guild/member.ts b/src/commands/guild/member.ts index ded500d..f6fe578 100644 --- a/src/commands/guild/member.ts +++ b/src/commands/guild/member.ts @@ -1,6 +1,6 @@ -import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel.js" -import { embedColor, devMessage } from "config/options.js" +import { devMessage, embedColor } from "config/options.js" import { ChatInputCommandInteraction } from "discord.js" +import { getGuild, getHeadURL, getPlayer, getUUID } from "utils/Hypixel.js" export default async function guildMember(interaction: ChatInputCommandInteraction): Promise { await interaction.deferReply() @@ -118,8 +118,7 @@ export default async function guildMember(interaction: ChatInputCommandInteracti const guildMemberJoinMinutes = guildMemberJoinTime.getMinutes() const guildMemberJoinSeconds = guildMemberJoinTime.getSeconds() - const guildMemberJoin = - guildMemberJoinDate + "." + + const guildMemberJoin = guildMemberJoinDate + "." + guildMemberJoinMonth + "." + guildMemberJoinYear + " " + guildMemberJoinHours + ":" + diff --git a/src/commands/guild/top.ts b/src/commands/guild/top.ts index 3a2834b..b81f541 100644 --- a/src/commands/guild/top.ts +++ b/src/commands/guild/top.ts @@ -1,7 +1,7 @@ -import { getUUID, getPlayer, getGuild, getIGN } from "utils/Hypixel.js" -import { embedColor, devMessage } from "config/options.js" +import { devMessage, embedColor } from "config/options.js" import { ChannelType, ChatInputCommandInteraction } from "discord.js" import { IGuildData } from "interfaces" +import { getGuild, getIGN, getPlayer, getUUID } from "utils/Hypixel.js" import { redis } from "utils/Illegitimate.js" export default async function guildTop(interaction: ChatInputCommandInteraction): Promise { @@ -143,8 +143,8 @@ export default async function guildTop(interaction: ChatInputCommandInteraction) amount = 1 } - type GuildTopData = { ign: string; uuid: string }[] - type NewList = { name: string; value: string; inline: boolean }[] + type GuildTopData = { ign: string, uuid: string }[] + type NewList = { name: string, value: string, inline: boolean }[] let cacheStatus: boolean let guildData: GuildTopData = [] diff --git a/src/commands/help.ts b/src/commands/help.ts index 6d7b000..3629b80 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -1,5 +1,5 @@ +import { devMessage, embedColor } from "config/options.js" import { SlashCommandBuilder } from "discord.js" -import { embedColor, devMessage } from "config/options.js" import { ICommand } from "interfaces" export default { diff --git a/src/commands/instructions.ts b/src/commands/instructions.ts index 63e7f34..c0e8612 100644 --- a/src/commands/instructions.ts +++ b/src/commands/instructions.ts @@ -1,7 +1,6 @@ -import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js" -import { embedColor, devMessage, instructionsgif } from "config/options.js" +import { devMessage, embedColor, instructionsgif } from "config/options.js" +import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js" import { ICommand } from "interfaces" -import { removeIndents } from "utils/functions/funcs.js" export default { name: "instructions", @@ -19,14 +18,14 @@ export default { await interaction.reply({ embeds: [{ title: "Verification", - description: removeIndents(` + description: ` - Log onto hypixel. - Right click with the head in your hotbar. - Click on the social media icon. - Click on the discord icon. - Type your username in the chat and press enter. - Run the \`/verify\` command in this channel. - `), + `.removeIndents(), thumbnail: { url: interaction.guild?.iconURL() || "" }, @@ -36,7 +35,7 @@ export default { icon_url: interaction.guild!.iconURL() || undefined }, image: { - url: instructionsgif, + url: instructionsgif } }] }) diff --git a/src/commands/kick.ts b/src/commands/kick.ts index 68d8f45..03aa3ea 100644 --- a/src/commands/kick.ts +++ b/src/commands/kick.ts @@ -1,9 +1,8 @@ -import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js" +import { devMessage, embedColor } from "config/options.js" import { admin, helper } from "config/roles.js" -import { embedColor, devMessage } from "config/options.js" +import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel.js" -import { removeIndents } from "utils/functions/funcs.js" export default { name: "kick", @@ -76,11 +75,11 @@ export default { icon_url: mod.user.avatarURL() || undefined }, title: "Member Kicked", - description: removeIndents(` + description: ` **User:** ${userMention(member.user.id)} **Mod:** ${userMention(mod.user.id)} **Reason:** ${reason} - `), + `.removeIndents(), color: embedColor, thumbnail: { url: mod.user.avatarURL() || "" diff --git a/src/commands/music.ts b/src/commands/music.ts index d184044..7efd37f 100644 --- a/src/commands/music.ts +++ b/src/commands/music.ts @@ -1,13 +1,13 @@ import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js" import { ICommand } from "interfaces" -import play from "./music/play.js" import leave from "./music/leave.js" -import queue from "./music/queue.js" -import volume from "./music/volume.js" -import skip from "./music/skip.js" import nowplaying from "./music/nowplaying.js" import pause from "./music/pause.js" +import play from "./music/play.js" +import queue from "./music/queue.js" +import skip from "./music/skip.js" import unpause from "./music/unpause.js" +import volume from "./music/volume.js" export default { name: "music", @@ -28,7 +28,9 @@ export default { .setName("query") .setDescription("The song to play") .setAutocomplete(true) - .setRequired(true))) + .setRequired(true) + ) + ) .addSubcommand(subcommand => subcommand .setName("volume") @@ -39,7 +41,9 @@ export default { .setDescription("The volume to set") .setMinValue(1) .setMaxValue(100) - .setRequired(true))) + .setRequired(true) + ) + ) .addSubcommand(subcommand => subcommand .setName("skip") @@ -47,27 +51,34 @@ export default { .addNumberOption(option => option .setName("amount") - .setDescription("The amount of songs to skip"))) + .setDescription("The amount of songs to skip") + ) + ) .addSubcommand(subcommand => subcommand .setName("queue") - .setDescription("Show the queue")) + .setDescription("Show the queue") + ) .addSubcommand(subcommand => subcommand .setName("nowplaying") - .setDescription("Show the currently playing song")) + .setDescription("Show the currently playing song") + ) .addSubcommand(subcommand => subcommand .setName("pause") - .setDescription("Pause the music")) + .setDescription("Pause the music") + ) .addSubcommand(subcommand => subcommand .setName("unpause") - .setDescription("Unpause the music")) + .setDescription("Unpause the music") + ) .addSubcommand(subcommand => subcommand .setName("leave") - .setDescription("Leave the voice channel")) + .setDescription("Leave the voice channel") + ) .setDMPermission(false) .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), @@ -114,4 +125,4 @@ export default { return } } -} as ICommand \ No newline at end of file +} as ICommand diff --git a/src/commands/music/leave.ts b/src/commands/music/leave.ts index 263240d..522d084 100644 --- a/src/commands/music/leave.ts +++ b/src/commands/music/leave.ts @@ -22,4 +22,4 @@ export default async function leave(interaction: ChatInputCommandInteraction) { color: embedColor }] }) -} \ No newline at end of file +} diff --git a/src/commands/music/nowplaying.ts b/src/commands/music/nowplaying.ts index d8ae45d..0ab34c6 100644 --- a/src/commands/music/nowplaying.ts +++ b/src/commands/music/nowplaying.ts @@ -1,7 +1,6 @@ import { embedColor } from "config/options.js" import { useMainPlayer } from "discord-player" import { ChatInputCommandInteraction } from "discord.js" -import { removeIndents } from "utils/functions/funcs.js" export default async function nowplaying(interaction: ChatInputCommandInteraction) { await interaction.deferReply() @@ -42,11 +41,11 @@ export default async function nowplaying(interaction: ChatInputCommandInteractio await interaction.editReply({ embeds: [{ title: "Now Playing", - description: removeIndents(` + description: ` [${current.title}](${current.url}) ${progressBar} - `), + `.removeIndents(), color: embedColor, thumbnail: { url: current.thumbnail @@ -56,4 +55,4 @@ export default async function nowplaying(interaction: ChatInputCommandInteractio } }] }) -} \ No newline at end of file +} diff --git a/src/commands/music/pause.ts b/src/commands/music/pause.ts index f3eccf0..b7c1c81 100644 --- a/src/commands/music/pause.ts +++ b/src/commands/music/pause.ts @@ -35,4 +35,4 @@ export default async function pause(interaction: ChatInputCommandInteraction) { color: embedColor }] }) -} \ No newline at end of file +} diff --git a/src/commands/music/play.ts b/src/commands/music/play.ts index 0601a61..a8c1e08 100644 --- a/src/commands/music/play.ts +++ b/src/commands/music/play.ts @@ -23,7 +23,7 @@ export default async function play(interaction: ChatInputCommandInteraction) { const { track } = await player.play(channel, query, { requestedBy: interaction.user, nodeOptions: { - volume: 25, + volume: 25 } }) @@ -40,4 +40,4 @@ export default async function play(interaction: ChatInputCommandInteraction) { } }] }) -} \ No newline at end of file +} diff --git a/src/commands/music/queue.ts b/src/commands/music/queue.ts index 45ca51d..a2b1dd8 100644 --- a/src/commands/music/queue.ts +++ b/src/commands/music/queue.ts @@ -36,4 +36,4 @@ export default async function queue(interaction: ChatInputCommandInteraction) { } }] }) -} \ No newline at end of file +} diff --git a/src/commands/music/skip.ts b/src/commands/music/skip.ts index f20db58..e57c6b5 100644 --- a/src/commands/music/skip.ts +++ b/src/commands/music/skip.ts @@ -41,4 +41,4 @@ export default async function skip(interaction: ChatInputCommandInteraction) { color: embedColor }] }) -} \ No newline at end of file +} diff --git a/src/commands/music/unpause.ts b/src/commands/music/unpause.ts index 9143866..b03eee8 100644 --- a/src/commands/music/unpause.ts +++ b/src/commands/music/unpause.ts @@ -35,4 +35,4 @@ export default async function pause(interaction: ChatInputCommandInteraction) { color: embedColor }] }) -} \ No newline at end of file +} diff --git a/src/commands/music/volume.ts b/src/commands/music/volume.ts index dbea150..0b0c09b 100644 --- a/src/commands/music/volume.ts +++ b/src/commands/music/volume.ts @@ -26,4 +26,4 @@ export default async function volume(interaction: ChatInputCommandInteraction) { color: embedColor }] }) -} \ No newline at end of file +} diff --git a/src/commands/ping.ts b/src/commands/ping.ts index 2ba6193..3115774 100644 --- a/src/commands/ping.ts +++ b/src/commands/ping.ts @@ -1,5 +1,5 @@ +import { devMessage, embedColor } from "config/options.js" import { SlashCommandBuilder } from "discord.js" -import { embedColor, devMessage } from "config/options.js" import { ICommand } from "interfaces" export default { diff --git a/src/commands/pp.ts b/src/commands/pp.ts index 9a5664c..043653b 100644 --- a/src/commands/pp.ts +++ b/src/commands/pp.ts @@ -1,5 +1,5 @@ -import { SlashCommandBuilder, User } from "discord.js" import { embedColor } from "config/options.js" +import { SlashCommandBuilder, User } from "discord.js" import { ICommand } from "interfaces" import env from "utils/Env.js" diff --git a/src/commands/remove.ts b/src/commands/remove.ts index 8d5df86..09c1afd 100644 --- a/src/commands/remove.ts +++ b/src/commands/remove.ts @@ -1,10 +1,9 @@ -import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js" -import { embedColor, devMessage } from "config/options.js" -import waitinglist from "schemas/waitinglistTag.js" -import { ICommand } from "interfaces" -import logToChannel from "utils/functions/logtochannel.js" +import { devMessage, embedColor } from "config/options.js" import { waitingListRole } from "config/roles.js" -import { removeIndents } from "utils/functions/funcs.js" +import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" +import { ICommand } from "interfaces" +import waitinglist from "schemas/waitinglistTag.js" +import logToChannel from "utils/functions/logtochannel.js" export default { name: "remove", @@ -58,11 +57,11 @@ export default { icon_url: mod.avatarURL() || undefined }, title: "Waiting List - Remove User", - description: removeIndents(` + description: ` **User:** ${userMention(member.user.id)} **Reason:** ${reason} **Mod:** ${userMention(mod.id)} - `), + `.removeIndents(), color: embedColor, thumbnail: { url: mod.avatarURL() || "" diff --git a/src/commands/reqs.ts b/src/commands/reqs.ts index 700a37e..46260ff 100644 --- a/src/commands/reqs.ts +++ b/src/commands/reqs.ts @@ -1,6 +1,6 @@ +import { devMessage, embedColor } from "config/options.js" +import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "config/reqs.js" import { SlashCommandBuilder } from "discord.js" -import { embedColor, devMessage } from "config/options.js" -import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs.js" import { ICommand } from "interfaces" export default { diff --git a/src/commands/send.ts b/src/commands/send.ts index 71d85d2..fc1ecb6 100644 --- a/src/commands/send.ts +++ b/src/commands/send.ts @@ -1,5 +1,5 @@ -import { SlashCommandBuilder, PermissionFlagsBits, ChannelType, TextChannel } from "discord.js" -import { embedColor, devMessage } from "config/options.js" +import { devMessage, embedColor } from "config/options.js" +import { ChannelType, PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js" import { ICommand } from "interfaces" export default { diff --git a/src/commands/setnick.ts b/src/commands/setnick.ts index 3e781b0..7dfe691 100644 --- a/src/commands/setnick.ts +++ b/src/commands/setnick.ts @@ -1,8 +1,7 @@ -import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js" -import { embedColor, devMessage } from "config/options.js" +import { devMessage, embedColor } from "config/options.js" +import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel.js" -import { removeIndents } from "utils/functions/funcs.js" export default { name: "setnick", @@ -49,11 +48,11 @@ export default { icon_url: interaction.user.avatarURL() || undefined }, title: "Nickname", - description: removeIndents(` + description: ` **User:** ${userMention(member.id)} **Nickname:** ${nickname} **Moderator:** ${userMention(interaction.user.id)} - `), + `.removeIndents(), color: embedColor, thumbnail: { url: interaction.user.avatarURL() || "" diff --git a/src/commands/setup.ts b/src/commands/setup.ts index 797cf01..8b25044 100644 --- a/src/commands/setup.ts +++ b/src/commands/setup.ts @@ -1,5 +1,5 @@ -import { SlashCommandBuilder, PermissionFlagsBits, ButtonBuilder, ActionRowBuilder, ButtonStyle, ChannelType, TextChannel } from "discord.js" -import { embedColor, devMessage } from "config/options.js" +import { devMessage, embedColor } from "config/options.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, PermissionFlagsBits, SlashCommandBuilder, TextChannel } from "discord.js" import { ICommand } from "interfaces" export default { diff --git a/src/commands/slowmode.ts b/src/commands/slowmode.ts index b767d3c..9952c5a 100644 --- a/src/commands/slowmode.ts +++ b/src/commands/slowmode.ts @@ -1,8 +1,7 @@ -import { SlashCommandBuilder, PermissionFlagsBits, ChannelType, TextChannel, channelMention, userMention } from "discord.js" -import { embedColor, devMessage } from "config/options.js" +import { devMessage, embedColor } from "config/options.js" +import { channelMention, ChannelType, PermissionFlagsBits, SlashCommandBuilder, TextChannel, userMention } from "discord.js" import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel.js" -import { removeIndents } from "utils/functions/funcs.js" export default { name: "slowmode", @@ -55,11 +54,11 @@ export default { icon_url: interaction.user.avatarURL() || undefined }, title: "Slowmode Update", - description: removeIndents(` + description: ` **Channel:** ${channelMention(channel.id)} **Slowmode:** ${seconds} seconds **Mod:** ${userMention(interaction.user.id)} - `), + `.removeIndents(), color: embedColor, thumbnail: { url: interaction.user.avatarURL() || "" diff --git a/src/commands/staff.ts b/src/commands/staff.ts index 8a2f879..83906a1 100644 --- a/src/commands/staff.ts +++ b/src/commands/staff.ts @@ -1,11 +1,11 @@ -import { SlashCommandBuilder, PermissionFlagsBits } from "discord.js" -import { embedColor, devMessage } from "config/options.js" +import { devMessage, embedColor } from "config/options.js" +import { PermissionFlagsBits, SlashCommandBuilder } from "discord.js" import { ICommand } from "interfaces" -import help from "./staff/help.js" import beast from "./staff/beast.js" -import updateAll from "./staff/updateall.js" +import help from "./staff/help.js" import prune from "./staff/prune.js" import removeGuildRoles from "./staff/removeguildroles.js" +import updateAll from "./staff/updateall.js" export default { name: "staff", diff --git a/src/commands/staff/beast.ts b/src/commands/staff/beast.ts index 5cdba89..8b12287 100644 --- a/src/commands/staff/beast.ts +++ b/src/commands/staff/beast.ts @@ -1,7 +1,7 @@ -import { bwwins, beastbwfkdr, beastbwstars, beastswkdr, beastswstars, beastduelswins, duelswlr } from "config/reqs.js" -import { embedColor, devMessage } from "config/options.js" -import { hypixelLevel, bedwarsLevel, skywarsLevel, getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel.js" +import { devMessage, embedColor } from "config/options.js" +import { beastbwfkdr, beastbwstars, beastduelswins, beastswkdr, beastswstars, bwwins, duelswlr } from "config/reqs.js" import { ChatInputCommandInteraction } from "discord.js" +import { bedwarsLevel, getGuild, getHeadURL, getPlayer, getUUID, hypixelLevel, skywarsLevel } from "utils/Hypixel.js" export default async function beast(interaction: ChatInputCommandInteraction): Promise { await interaction.deferReply() diff --git a/src/commands/staff/help.ts b/src/commands/staff/help.ts index 6088d54..1462632 100644 --- a/src/commands/staff/help.ts +++ b/src/commands/staff/help.ts @@ -1,5 +1,5 @@ +import { devMessage, embedColor } from "config/options.js" import { ChatInputCommandInteraction } from "discord.js" -import { embedColor, devMessage } from "config/options.js" import { ExtendedClient as Client } from "utils/Client.js" export default async function help(interaction: ChatInputCommandInteraction, client: Client): Promise { diff --git a/src/commands/staff/prune.ts b/src/commands/staff/prune.ts index 4518b58..c3de388 100644 --- a/src/commands/staff/prune.ts +++ b/src/commands/staff/prune.ts @@ -1,5 +1,5 @@ +import { devMessage, embedColor } from "config/options.js" import { ActionRowBuilder, ButtonBuilder, ButtonInteraction, ButtonStyle, ChatInputCommandInteraction, ComponentType } from "discord.js" -import { embedColor, devMessage } from "config/options.js" import env from "utils/Env.js" export default async function prune(interaction: ChatInputCommandInteraction): Promise { @@ -89,7 +89,7 @@ export default async function prune(interaction: ChatInputCommandInteraction): P embeds: [{ description: "Cancelled", color: embedColor - }], + }] }).then(() => { collector.stop() }) @@ -104,13 +104,13 @@ export default async function prune(interaction: ChatInputCommandInteraction): P } await m.edit({ - components: [], + components: [] }) await i.editReply({ embeds: [{ description: "Pruned all the members", color: embedColor - }], + }] }).then(() => { collector.stop() }) diff --git a/src/commands/staff/removeguildroles.ts b/src/commands/staff/removeguildroles.ts index ad283e2..60c9dcc 100644 --- a/src/commands/staff/removeguildroles.ts +++ b/src/commands/staff/removeguildroles.ts @@ -1,10 +1,10 @@ import { embedColor, hypixelGuildID } from "config/options.js" import { ChatInputCommandInteraction, GuildMember } from "discord.js" -import verify from "schemas/verifyTag.js" import { IGuildData } from "interfaces" +import verify from "schemas/verifyTag.js" import env from "utils/Env.js" -import { getGuild } from "utils/Hypixel.js" import roleManage from "utils/functions/rolesmanage.js" +import { getGuild } from "utils/Hypixel.js" export default async function removeGuildRoles(interaction: ChatInputCommandInteraction): Promise { await interaction.deferReply() @@ -22,12 +22,13 @@ export default async function removeGuildRoles(interaction: ChatInputCommandInte } const guildMembers = await interaction.guild!.members.fetch().then( - members => members.map(member => { - return { - id: member.id, - member: member - } - }) + members => + members.map(member => { + return { + id: member.id, + member: member + } + }) ) const guildData = (await getGuild(hypixelGuildID, "id")) as IGuildData diff --git a/src/commands/staff/updateall.ts b/src/commands/staff/updateall.ts index 6461f20..c1e4cd4 100644 --- a/src/commands/staff/updateall.ts +++ b/src/commands/staff/updateall.ts @@ -1,11 +1,11 @@ -import verify from "schemas/verifyTag.js" import { embedColor, hypixelGuildID } from "config/options.js" -import color from "utils/functions/colors.js" -import roleManage from "utils/functions/rolesmanage.js" import { ChatInputCommandInteraction, GuildMember } from "discord.js" -import env from "utils/Env.js" -import { getGuild, getIGN } from "utils/Hypixel.js" import { IGuildData } from "interfaces" +import verify from "schemas/verifyTag.js" +import env from "utils/Env.js" +import { color } from "utils/functions/colors.js" +import roleManage from "utils/functions/rolesmanage.js" +import { getGuild, getIGN } from "utils/Hypixel.js" export default async function updateAll(interaction: ChatInputCommandInteraction): Promise { await interaction.deferReply() @@ -23,12 +23,13 @@ export default async function updateAll(interaction: ChatInputCommandInteraction } const guildMembers = await interaction.guild!.members.fetch().then( - members => members.map(member => { - return { - id: member.id, - member: member - } - }) + members => + members.map(member => { + return { + id: member.id, + member: member + } + }) ) const guildData = (await getGuild(hypixelGuildID, "id")) as IGuildData diff --git a/src/commands/timeout.ts b/src/commands/timeout.ts index c9b1af5..812d1f7 100644 --- a/src/commands/timeout.ts +++ b/src/commands/timeout.ts @@ -1,10 +1,9 @@ -import { SlashCommandBuilder, PermissionFlagsBits, userMention, GuildMember } from "discord.js" -import { embedColor, devMessage } from "config/options.js" +import { devMessage, embedColor } from "config/options.js" +import { GuildMember, PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" import { ICommand } from "interfaces" import ms from "ms" import prettyMs from "pretty-ms" import logToChannel from "utils/functions/logtochannel.js" -import { removeIndents } from "utils/functions/funcs.js" export default { name: "timeout", @@ -144,12 +143,12 @@ export default { icon_url: mod.user.avatarURL() || undefined }, title: title, - description: removeIndents(` + description: ` **User:** ${userMention(target.id)} ${timeouttime === null ? "**Time:** `None`" : "**Time:** `" + prettyTime + "`"} **Reason:** \`${reason}\` **Mod:** ${userMention(mod.id)} - `), + `.removeIndents(), color: embedColor, thumbnail: { url: mod.user.avatarURL() || "" diff --git a/src/commands/unban.ts b/src/commands/unban.ts index b25bb22..1d64b23 100644 --- a/src/commands/unban.ts +++ b/src/commands/unban.ts @@ -1,8 +1,7 @@ -import { SlashCommandBuilder, PermissionFlagsBits, userMention, User } from "discord.js" -import { embedColor, devMessage } from "config/options.js" +import { devMessage, embedColor } from "config/options.js" +import { PermissionFlagsBits, SlashCommandBuilder, User, userMention } from "discord.js" import { ICommand } from "interfaces" import logToChannel from "utils/functions/logtochannel.js" -import { removeIndents } from "utils/functions/funcs.js" export default { name: "unban", @@ -69,11 +68,11 @@ export default { icon_url: mod.avatarURL() || undefined }, title: "Member Unbanned", - description: removeIndents(` + description: ` **User:** ${userMention(user!.id)} **Mod:** ${userMention(mod.id)} **Reason:** ${reason} - `), + `.removeIndents(), color: embedColor, thumbnail: { url: mod.avatarURL() || "" diff --git a/src/commands/update.ts b/src/commands/update.ts index 82e55ce..748e87f 100644 --- a/src/commands/update.ts +++ b/src/commands/update.ts @@ -1,11 +1,10 @@ -import { GuildMember, SlashCommandBuilder } from "discord.js" -import { getGuild, getIGN, getHeadURL } from "utils/Hypixel.js" -import verify from "schemas/verifyTag.js" -import { embedColor, hypixelGuildID, devMessage } from "config/options.js" -import roleManage from "utils/functions/rolesmanage.js" -import { ICommand } from "interfaces" +import { devMessage, embedColor, hypixelGuildID } from "config/options.js" import { waitingListRole } from "config/roles.js" -import { removeIndents } from "utils/functions/funcs.js" +import { GuildMember, SlashCommandBuilder } from "discord.js" +import { ICommand } from "interfaces" +import verify from "schemas/verifyTag.js" +import roleManage from "utils/functions/rolesmanage.js" +import { getGuild, getHeadURL, getIGN } from "utils/Hypixel.js" export default { name: "update", @@ -68,11 +67,11 @@ export default { await interaction.editReply({ embeds: [{ - description: removeIndents(` + description: ` Updated your roles to \`Default Member\` IGN: \`${ign}\` - `), + `.removeIndents(), color: embedColor, thumbnail: { url: head! @@ -143,11 +142,11 @@ export default { await interaction.editReply({ embeds: [{ - description: removeIndents(` + description: ` Updated your roles to \`${replyRank}\` IGN: \`${ign}\` - `), + `.removeIndents(), color: embedColor, thumbnail: { url: head! diff --git a/src/commands/uuid.ts b/src/commands/uuid.ts index 9693af0..2368ace 100644 --- a/src/commands/uuid.ts +++ b/src/commands/uuid.ts @@ -1,7 +1,7 @@ +import { devMessage, embedColor } from "config/options.js" import { SlashCommandBuilder } from "discord.js" -import { embedColor, devMessage } from "config/options.js" -import { getUUID, getIGN, getHeadURL, formatUuid } from "utils/Hypixel.js" import { ICommand } from "interfaces" +import { formatUuid, getHeadURL, getIGN, getUUID } from "utils/Hypixel.js" export default { name: "uuid", diff --git a/src/commands/verify.ts b/src/commands/verify.ts index a2626c3..2dc7319 100644 --- a/src/commands/verify.ts +++ b/src/commands/verify.ts @@ -1,11 +1,11 @@ +import { devMessage, embedColor, hypixelGuildID } from "config/options.js" import { GuildMember, SlashCommandBuilder } from "discord.js" -import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel.js" -import { embedColor, hypixelGuildID, devMessage } from "config/options.js" -import roleManage from "utils/functions/rolesmanage.js" import { ICommand } from "interfaces" -import verify from "schemas/verifyTag.js" import { IPlayerData } from "interfaces" import { IGuildData } from "interfaces" +import verify from "schemas/verifyTag.js" +import roleManage from "utils/functions/rolesmanage.js" +import { getGuild, getHeadURL, getPlayer, getUUID } from "utils/Hypixel.js" export default { name: "verify", @@ -114,7 +114,8 @@ export default { if (linkedDiscord !== username) { interaction.editReply({ embeds: [{ - description: " The Discord account linked to `" + player.displayname + "` is currently `" + linkedDiscord + "`\n\n" + + description: " 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 }] diff --git a/src/commands/whoami.ts b/src/commands/whoami.ts index 5becb7d..4a50acb 100644 --- a/src/commands/whoami.ts +++ b/src/commands/whoami.ts @@ -1,8 +1,8 @@ +import { devMessage, embedColor } from "config/options.js" import { SlashCommandBuilder, userMention } from "discord.js" import { ICommand } from "interfaces" -import { embedColor, devMessage } from "config/options.js" import verify from "schemas/verifyTag.js" -import { getIGN, getHeadURL } from "utils/Hypixel.js" +import { getHeadURL, getIGN } from "utils/Hypixel.js" export default { name: "whoami", diff --git a/src/commands/whois.ts b/src/commands/whois.ts index 129c69b..82c5b47 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -1,8 +1,8 @@ -import { SlashCommandBuilder, PermissionFlagsBits, userMention } from "discord.js" -import { getIGN, getHeadURL } from "utils/Hypixel.js" -import { embedColor, devMessage } from "config/options.js" -import verify from "schemas/verifyTag.js" +import { devMessage, embedColor } from "config/options.js" +import { PermissionFlagsBits, SlashCommandBuilder, userMention } from "discord.js" import { ICommand } from "interfaces" +import verify from "schemas/verifyTag.js" +import { getHeadURL, getIGN } from "utils/Hypixel.js" export default { name: "whois", diff --git a/src/components/autocomplete/music.ts b/src/components/autocomplete/music.ts index 7b38b2d..8eb71ca 100644 --- a/src/components/autocomplete/music.ts +++ b/src/components/autocomplete/music.ts @@ -29,4 +29,4 @@ export default { await interaction.respond(results.slice(0, 6)).catch() } -} as IAutocomplete \ No newline at end of file +} as IAutocomplete diff --git a/src/components/buttons/checkstats.ts b/src/components/buttons/checkstats.ts index 051a6b5..9a20bfa 100644 --- a/src/components/buttons/checkstats.ts +++ b/src/components/buttons/checkstats.ts @@ -1,8 +1,8 @@ -import { embedColor, devMessage } from "config/options.js" -import guildapp from "schemas/guildAppTag.js" -import { bwfkdr, bwstars, bwwins, swstars, swkdr, duelswins, duelswlr } from "config/reqs.js" -import { hypixelLevel, bedwarsLevel, skywarsLevel, getPlayer, getGuild, getHeadURL } from "utils/Hypixel.js" +import { devMessage, embedColor } from "config/options.js" +import { bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } from "config/reqs.js" import { IButton } from "interfaces" +import guildapp from "schemas/guildAppTag.js" +import { bedwarsLevel, getGuild, getHeadURL, getPlayer, hypixelLevel, skywarsLevel } from "utils/Hypixel.js" export default { name: "checkstats", diff --git a/src/components/buttons/guildapplicationaccept.ts b/src/components/buttons/guildapplicationaccept.ts index 7741d20..ed9e7d3 100644 --- a/src/components/buttons/guildapplicationaccept.ts +++ b/src/components/buttons/guildapplicationaccept.ts @@ -1,10 +1,10 @@ -import { ActionRowBuilder, ButtonStyle, ButtonBuilder, TextChannel } from "discord.js" -import { embedColor, waitingListChannel, waitingListMessage, hypixelGuildID } from "config/options.js" -import color from "utils/functions/colors.js" +import { embedColor, hypixelGuildID, waitingListChannel, waitingListMessage } from "config/options.js" +import { waitingListRole } from "config/roles.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, TextChannel } from "discord.js" +import { IButton } from "interfaces" import guildapp from "schemas/guildAppTag.js" import waitingList from "schemas/waitinglistTag.js" -import { waitingListRole } from "config/roles.js" -import { IButton } from "interfaces" +import { color } from "utils/functions/colors.js" import { getGuild, getIGN } from "utils/Hypixel.js" export default { @@ -99,7 +99,7 @@ export default { } } - const fields: { name: string; value: string }[] = [] + const fields: { name: string, value: string }[] = [] for (let i = 0; i < accepted.length; i++) { const ign = await getIGN(accepted[i].uuid) diff --git a/src/components/buttons/guildapplicationdeny.ts b/src/components/buttons/guildapplicationdeny.ts index 071f1d1..391f5b9 100644 --- a/src/components/buttons/guildapplicationdeny.ts +++ b/src/components/buttons/guildapplicationdeny.ts @@ -1,4 +1,4 @@ -import { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } from "discord.js" +import { ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } from "discord.js" import { IButton } from "interfaces" export default { diff --git a/src/components/buttons/guildapply.ts b/src/components/buttons/guildapply.ts index 5e269f9..7acf04e 100644 --- a/src/components/buttons/guildapply.ts +++ b/src/components/buttons/guildapply.ts @@ -1,10 +1,10 @@ -import { ButtonBuilder, ButtonStyle, ActionRowBuilder, GuildMember, TextChannel } from "discord.js" -import { embedColor, applicationsChannel } from "config/options.js" -import { largeM, smallM, ignM } from "config/limitmessages.js" +import { ignM, largeM, smallM } from "config/limitmessages.js" +import { applicationsChannel, embedColor } from "config/options.js" import { guild as guildQuestions } from "config/questions.js" import { guildRole } from "config/roles.js" -import guildapp from "schemas/guildAppTag.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, GuildMember, TextChannel } from "discord.js" import { IButton } from "interfaces" +import guildapp from "schemas/guildAppTag.js" import applicationQuestions from "utils/functions/applicationquestions.js" export default { @@ -250,7 +250,7 @@ export default { await guildapp.create({ userID: user.user.id, - uuid: uuid, + uuid: uuid }) const channel = guild.channels.cache.get(applicationsChannel) as TextChannel diff --git a/src/components/buttons/guildinactivitylog.ts b/src/components/buttons/guildinactivitylog.ts index 3f40591..e78a432 100644 --- a/src/components/buttons/guildinactivitylog.ts +++ b/src/components/buttons/guildinactivitylog.ts @@ -1,8 +1,8 @@ -import { ButtonBuilder, ActionRowBuilder, ButtonStyle, GuildMember, TextChannel } from "discord.js" -import { gm, manager, moderator, beast, member, guildStaff, guildRole } from "config/roles.js" -import { ignM, smallM, largeM } from "config/limitmessages.js" -import { inactivity } from "config/questions.js" +import { ignM, largeM, smallM } from "config/limitmessages.js" import { embedColor, inactivityLogChannel } from "config/options.js" +import { inactivity } from "config/questions.js" +import { beast, gm, guildRole, guildStaff, manager, member, moderator } from "config/roles.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, GuildMember, TextChannel } from "discord.js" import { IButton } from "interfaces" import applicationQuestions from "utils/functions/applicationquestions.js" const guildRoles = [gm, manager, moderator, beast, member, guildStaff, guildRole] diff --git a/src/components/buttons/staffapplicationaccept.ts b/src/components/buttons/staffapplicationaccept.ts index 9a8d040..3042443 100644 --- a/src/components/buttons/staffapplicationaccept.ts +++ b/src/components/buttons/staffapplicationaccept.ts @@ -1,7 +1,7 @@ -import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js" import { embedColor } from "config/options.js" -import staffapp from "schemas/staffAppTag.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js" import { IButton } from "interfaces" +import staffapp from "schemas/staffAppTag.js" export default { name: "staffapplicationaccept", diff --git a/src/components/buttons/staffapplicationdeny.ts b/src/components/buttons/staffapplicationdeny.ts index de738ea..36508f5 100644 --- a/src/components/buttons/staffapplicationdeny.ts +++ b/src/components/buttons/staffapplicationdeny.ts @@ -1,4 +1,4 @@ -import { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } from "discord.js" +import { ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } from "discord.js" import { IButton } from "interfaces" export default { diff --git a/src/components/buttons/staffapply.ts b/src/components/buttons/staffapply.ts index 0769673..e65dbf5 100644 --- a/src/components/buttons/staffapply.ts +++ b/src/components/buttons/staffapply.ts @@ -1,11 +1,11 @@ -import { ButtonBuilder, ButtonStyle, ActionRowBuilder, GuildMember, TextChannel } from "discord.js" +import { ignM, largeM } from "config/limitmessages.js" import { embedColor, staffApplicationsChannel } from "config/options.js" -import { largeM, ignM } from "config/limitmessages.js" import { staff as staffQuestions } from "config/questions.js" import { guildRole, guildStaff } from "config/roles.js" -import staffapp from "schemas/staffAppTag.js" -import settings from "schemas/settingsTag.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, GuildMember, TextChannel } from "discord.js" import { IButton } from "interfaces" +import settings from "schemas/settingsTag.js" +import staffapp from "schemas/staffAppTag.js" import env from "utils/Env.js" import applicationQuestions from "utils/functions/applicationquestions.js" diff --git a/src/components/buttons/verify.ts b/src/components/buttons/verify.ts index 36ef189..03d1925 100644 --- a/src/components/buttons/verify.ts +++ b/src/components/buttons/verify.ts @@ -1,4 +1,4 @@ -import { ModalBuilder, ActionRowBuilder, TextInputBuilder, TextInputStyle } from "discord.js" +import { ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } from "discord.js" import { IButton } from "interfaces" export default { diff --git a/src/components/buttons/waitingListUpdate.ts b/src/components/buttons/waitingListUpdate.ts index 3335e3d..e10c15b 100644 --- a/src/components/buttons/waitingListUpdate.ts +++ b/src/components/buttons/waitingListUpdate.ts @@ -1,7 +1,7 @@ -import waitinglist from "schemas/waitinglistTag.js" -import { getGuild, getIGN } from "utils/Hypixel.js" import { hypixelGuildID } from "config/options.js" import { IButton } from "interfaces" +import waitinglist from "schemas/waitinglistTag.js" +import { getGuild, getIGN } from "utils/Hypixel.js" export default { name: "waitinglistupdate", diff --git a/src/components/modals/denyreasonbox.ts b/src/components/modals/denyreasonbox.ts index 321d75e..b306f55 100644 --- a/src/components/modals/denyreasonbox.ts +++ b/src/components/modals/denyreasonbox.ts @@ -1,7 +1,7 @@ -import { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle, Message, GuildMember } from "discord.js" import { embedColor } from "config/options.js" -import guildapp from "schemas/guildAppTag.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, GuildMember, Message } from "discord.js" import { IModal } from "interfaces" +import guildapp from "schemas/guildAppTag.js" export default { name: "denyreasonbox", @@ -47,8 +47,9 @@ export default { } const dmMessage = new EmbedBuilder() - .setDescription("Your application for the Illegitimate guild has been denied\n" + - "**Reason:** `" + reason + "`" + .setDescription( + "Your application for the Illegitimate guild has been denied\n" + + "**Reason:** `" + reason + "`" ) .setColor(embedColor) @@ -58,8 +59,9 @@ export default { const responseEmbed = new EmbedBuilder() .setTitle("Application Denied") - .setDescription("The application has been denied by <@" + interaction.user.id + ">.\n" + - "**Reason:** `" + reason + "`" + .setDescription( + "The application has been denied by <@" + interaction.user.id + ">.\n" + + "**Reason:** `" + reason + "`" ) .setColor(embedColor) .setThumbnail(guild.iconURL() || "") diff --git a/src/components/modals/staffdenyreasonbox.ts b/src/components/modals/staffdenyreasonbox.ts index 5a5d6f8..4833416 100644 --- a/src/components/modals/staffdenyreasonbox.ts +++ b/src/components/modals/staffdenyreasonbox.ts @@ -1,7 +1,7 @@ -import { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } from "discord.js" import { embedColor } from "config/options.js" -import staffapp from "schemas/staffAppTag.js" +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from "discord.js" import { IModal } from "interfaces" +import staffapp from "schemas/staffAppTag.js" export default { name: "staffdenyreasonbox", @@ -35,8 +35,9 @@ export default { }) const dmMessage = new EmbedBuilder() - .setDescription("Your application for the Illegitimate guild staff has been denied\n" + - "**Reason:** `" + reason + "`" + .setDescription( + "Your application for the Illegitimate guild staff has been denied\n" + + "**Reason:** `" + reason + "`" ) .setColor(embedColor) diff --git a/src/components/modals/verifyModal.ts b/src/components/modals/verifyModal.ts index d4f7633..908af72 100644 --- a/src/components/modals/verifyModal.ts +++ b/src/components/modals/verifyModal.ts @@ -1,9 +1,9 @@ -import { getUUID, getPlayer, getGuild, getHeadURL } from "utils/Hypixel.js" -import { embedColor, hypixelGuildID, devMessage } from "config/options.js" -import verify from "schemas/verifyTag.js" -import { IModal } from "interfaces" +import { devMessage, embedColor, hypixelGuildID } from "config/options.js" import { GuildMember } from "discord.js" +import { IModal } from "interfaces" +import verify from "schemas/verifyTag.js" import roleManage from "utils/functions/rolesmanage.js" +import { getGuild, getHeadURL, getPlayer, getUUID } from "utils/Hypixel.js" export default { name: "verifybox", @@ -71,7 +71,6 @@ export default { }] }) - const linkedDiscord = player?.socialMedia?.links?.DISCORD if (!linkedDiscord) { interaction.editReply({ @@ -87,7 +86,8 @@ export default { if (linkedDiscord !== username) { interaction.editReply({ embeds: [{ - description: " The Discord account linked to `" + player.displayname + "` is currently `" + linkedDiscord + "`\n\n" + + description: " 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 }] diff --git a/src/config/limitmessages.ts b/src/config/limitmessages.ts index 39ea756..aeeea15 100644 --- a/src/config/limitmessages.ts +++ b/src/config/limitmessages.ts @@ -2,4 +2,4 @@ const largeM = "(256 characters max)" const smallM = "(128 characters max)" const ignM = "(16 characters max)" -export { largeM, smallM, ignM } \ No newline at end of file +export { ignM, largeM, smallM } diff --git a/src/config/options.ts b/src/config/options.ts index 2a955e8..1e310e6 100644 --- a/src/config/options.ts +++ b/src/config/options.ts @@ -14,24 +14,25 @@ const moderationLogChannel = "1193329771795447818" const devLogChannel = "1193688673632391280" const waitingListChannel = "1145773618291298384" const waitingListMessage = "1146027645415473193" -const instructionsgif = "https =//cdn.discordapp.com/attachments/838716950723952640/1188211176300089384/4DMu513uNxbM.gif?ex=6599b2e4&is=65873de4&hm=e727c7a39aacbc47d6a5453f4b5f792a45679983c30d662cd258a311381b6df0&" +const instructionsgif = + "https =//cdn.discordapp.com/attachments/838716950723952640/1188211176300089384/4DMu513uNxbM.gif?ex=6599b2e4&is=65873de4&hm=e727c7a39aacbc47d6a5453f4b5f792a45679983c30d662cd258a311381b6df0&" export { - embedColor, - guildid, - devMessage, applicationsChannel, - staffApplicationsChannel, - inactivityLogChannel, - staffOtherChannel, - hypixelGuildID, - onlineLogChannel, botLogChannel, - guildLogChannel, - errorLogChannel, - moderationLogChannel, devLogChannel, + devMessage, + embedColor, + errorLogChannel, + guildid, + guildLogChannel, + hypixelGuildID, + inactivityLogChannel, + instructionsgif, + moderationLogChannel, + onlineLogChannel, + staffApplicationsChannel, + staffOtherChannel, waitingListChannel, - waitingListMessage, - instructionsgif -} \ No newline at end of file + waitingListMessage +} diff --git a/src/config/questions.ts b/src/config/questions.ts index 7aa4510..5fb6e4f 100644 --- a/src/config/questions.ts +++ b/src/config/questions.ts @@ -73,4 +73,4 @@ const inactivity = [ } ] -export { guild, staff, inactivity } \ No newline at end of file +export { guild, inactivity, staff } diff --git a/src/config/reqs.ts b/src/config/reqs.ts index 41ce3b6..4064317 100644 --- a/src/config/reqs.ts +++ b/src/config/reqs.ts @@ -11,17 +11,4 @@ const beastswstars = 20 const beastswkdr = 2.5 const beastduelswins = 12000 -export { - bwstars, - bwfkdr, - bwwins, - swstars, - swkdr, - duelswins, - duelswlr, - beastbwstars, - beastbwfkdr, - beastswstars, - beastswkdr, - beastduelswins -} \ No newline at end of file +export { beastbwfkdr, beastbwstars, beastduelswins, beastswkdr, beastswstars, bwfkdr, bwstars, bwwins, duelswins, duelswlr, swkdr, swstars } diff --git a/src/config/roles.ts b/src/config/roles.ts index 79de6f7..9f8e364 100644 --- a/src/config/roles.ts +++ b/src/config/roles.ts @@ -15,19 +15,19 @@ const countingBanned = "1192183486128341072" const verifyTick = "1201624332674273290" export { - gm, - manager, - moderator, - elite, - beast, - member, - guildStaff, - guildRole, - waitingListRole, - defaultMember, admin, - helper, - muted, + beast, countingBanned, - verifyTick -} \ No newline at end of file + defaultMember, + elite, + gm, + guildRole, + guildStaff, + helper, + manager, + member, + moderator, + muted, + verifyTick, + waitingListRole +} diff --git a/src/config/statuses.ts b/src/config/statuses.ts index d778b57..39a2597 100644 --- a/src/config/statuses.ts +++ b/src/config/statuses.ts @@ -1,15 +1,35 @@ import { ActivityType, Guild } from "discord.js" const statuses = [ - { name: (guild: Guild) => { return `over ${guild.memberCount} members` }, type: ActivityType.Watching }, - { name: (guild: Guild) => { return `${guild.channels.cache.size} channels` }, type: ActivityType.Watching }, - { name: (guild: Guild) => { return `${guild.premiumSubscriptionCount} boosters` }, type: ActivityType.Watching }, - { name: (guild: Guild) => { return `${guild.voiceStates.cache.size} members in vc` }, type: ActivityType.Watching }, + { + name: (guild: Guild) => { + return `over ${guild.memberCount} members` + }, + type: ActivityType.Watching + }, + { + name: (guild: Guild) => { + return `${guild.channels.cache.size} channels` + }, + type: ActivityType.Watching + }, + { + name: (guild: Guild) => { + return `${guild.premiumSubscriptionCount} boosters` + }, + type: ActivityType.Watching + }, + { + name: (guild: Guild) => { + return `${guild.voiceStates.cache.size} members in vc` + }, + type: ActivityType.Watching + }, { name: "over the Illegitimate Server", type: ActivityType.Watching }, { name: "jon and pit edate", type: ActivityType.Watching }, { name: "for Martina's return", type: ActivityType.Watching }, { name: "w vri's feelings", type: ActivityType.Playing }, { name: "urCryhard steal finals again", type: ActivityType.Watching }, - { name: "with Perlcence the AI", type: ActivityType.Playing }, + { name: "with Perlcence the AI", type: ActivityType.Playing } ] -export default statuses \ No newline at end of file +export default statuses diff --git a/src/enviroment.d.ts b/src/enviroment.d.ts index 2a38ae2..b138f7e 100644 --- a/src/enviroment.d.ts +++ b/src/enviroment.d.ts @@ -7,4 +7,11 @@ declare global { } } -export { } \ No newline at end of file +declare global { + interface String { + removeIndents(): string + capitalizeFirstLetter(): string + } +} + +export {} diff --git a/src/events/cron/weeklyGexp.ts b/src/events/cron/weeklyGexp.ts index c29c903..11c768a 100644 --- a/src/events/cron/weeklyGexp.ts +++ b/src/events/cron/weeklyGexp.ts @@ -1,9 +1,9 @@ -import { hypixelGuildID, guildLogChannel, embedColor, devMessage } from "config/options.js" -import color from "utils/functions/colors.js" -import { getGuild, getIGN } from "utils/Hypixel.js" -import { ICron, IGuildData } from "interfaces" -import { client } from "utils/Illegitimate.js" +import { devMessage, embedColor, guildLogChannel, hypixelGuildID } from "config/options.js" import { TextChannel } from "discord.js" +import { ICron, IGuildData } from "interfaces" +import { color } from "utils/functions/colors.js" +import { getGuild, getIGN } from "utils/Hypixel.js" +import { client } from "utils/Illegitimate.js" async function guildWeekly() { const channel = client.channels.cache.get(guildLogChannel) as TextChannel @@ -22,7 +22,7 @@ async function guildWeekly() { const guild = (await getGuild(hypixelGuildID, "id")) as IGuildData const guildMembersList: string[] = [] - const topWeeklyMembers: { name: string; value: string; inline: boolean }[] = [] + const topWeeklyMembers: { name: string, value: string, inline: boolean }[] = [] const guildName = guild.name const guildMembers = guild.members @@ -44,9 +44,7 @@ async function guildWeekly() { guildMembersList.push("**#" + position + " " + ign + ":** `" + gexp + "`") } - const list = Array.from({ length: sliceSize }, (_, i) => - guildMembersList.slice(i * sliceSize, (i + 1) * sliceSize) - ) + const list = Array.from({ length: sliceSize }, (_, i) => guildMembersList.slice(i * sliceSize, (i + 1) * sliceSize)) list.forEach((item, index) => { if (item.length === 0) return diff --git a/src/events/server/guildMemberAdd/logNewJoins.ts b/src/events/server/guildMemberAdd/logNewJoins.ts index 414e49c..4906816 100644 --- a/src/events/server/guildMemberAdd/logNewJoins.ts +++ b/src/events/server/guildMemberAdd/logNewJoins.ts @@ -1,5 +1,5 @@ -import { GuildMember, userMention } from "discord.js" import { embedColor } from "config/options.js" +import { GuildMember, userMention } from "discord.js" import { IEvent } from "interfaces" import logToChannel from "utils/functions/logtochannel.js" diff --git a/src/events/server/interactions/logBtnsCmds.ts b/src/events/server/interactions/logBtnsCmds.ts index 59c6dcd..3074ed1 100644 --- a/src/events/server/interactions/logBtnsCmds.ts +++ b/src/events/server/interactions/logBtnsCmds.ts @@ -1,6 +1,6 @@ -import { ChatInputCommandInteraction, ButtonInteraction } from "discord.js" -import color from "utils/functions/colors.js" +import { ButtonInteraction, ChatInputCommandInteraction } from "discord.js" import { IEvent } from "interfaces" +import { color } from "utils/functions/colors.js" export default { name: "logBtnsCmds", @@ -22,9 +22,9 @@ export default { console.log( color( interaction.user.username + "#" + - interaction.user.discriminator + " ran " + - interaction.commandName + " " + - subcommand, + interaction.user.discriminator + " ran " + + interaction.commandName + " " + + subcommand, "pink" ) ) @@ -32,8 +32,8 @@ export default { console.log( color( interaction.user.username + "#" + - interaction.user.discriminator + " ran " + - interaction.commandName, + interaction.user.discriminator + " ran " + + interaction.commandName, "pink" ) ) @@ -44,8 +44,8 @@ export default { console.log( color( interaction.user.username + "#" + - interaction.user.discriminator + " clicked " + - interaction.customId, + interaction.user.discriminator + " clicked " + + interaction.customId, "pink" ) ) diff --git a/src/events/server/messages/react.ts b/src/events/server/messages/react.ts index 64e3f4a..8c71458 100644 --- a/src/events/server/messages/react.ts +++ b/src/events/server/messages/react.ts @@ -1,5 +1,5 @@ -import { IEvent } from "interfaces" import { Message } from "discord.js" +import { IEvent } from "interfaces" export default { name: "ur mom", diff --git a/src/events/server/ready/consolelog.ts b/src/events/server/ready/consolelog.ts index 39ee5da..157184d 100644 --- a/src/events/server/ready/consolelog.ts +++ b/src/events/server/ready/consolelog.ts @@ -1,6 +1,6 @@ import { IEvent } from "interfaces" import { ExtendedClient as Client } from "utils/Client.js" -import color from "utils/functions/colors.js" +import { color } from "utils/functions/colors.js" export default { name: "conolelog", diff --git a/src/events/server/ready/sendOnlineMessage.ts b/src/events/server/ready/sendOnlineMessage.ts index 6518499..d6ab2c6 100644 --- a/src/events/server/ready/sendOnlineMessage.ts +++ b/src/events/server/ready/sendOnlineMessage.ts @@ -1,6 +1,6 @@ -import logToChannel from "utils/functions/logtochannel.js" -import { IEvent } from "interfaces" import { embedColor } from "config/options.js" +import { IEvent } from "interfaces" +import logToChannel from "utils/functions/logtochannel.js" export default { name: "sendonlinemessage", diff --git a/src/interfaces/IContextMenu.ts b/src/interfaces/IContextMenu.ts index dfdae5a..13f37f2 100644 --- a/src/interfaces/IContextMenu.ts +++ b/src/interfaces/IContextMenu.ts @@ -1,4 +1,4 @@ -import { ContextMenuCommandInteraction, ContextMenuCommandBuilder } from "discord.js" +import { ContextMenuCommandBuilder, ContextMenuCommandInteraction } from "discord.js" import { ExtendedClient } from "utils/Client.js" export default interface IContextMenu { diff --git a/src/interfaces/IGuild.ts b/src/interfaces/IGuild.ts index 858232e..fc6445b 100644 --- a/src/interfaces/IGuild.ts +++ b/src/interfaces/IGuild.ts @@ -1,3 +1,4 @@ +// dprint-ignore-file export interface IGuild { data: { success: boolean diff --git a/src/interfaces/IPlayer.ts b/src/interfaces/IPlayer.ts index afe7fe1..1ec6f6e 100644 --- a/src/interfaces/IPlayer.ts +++ b/src/interfaces/IPlayer.ts @@ -1,3 +1,4 @@ +// dprint-ignore-file export interface IPlayer { data: { success: boolean diff --git a/src/interfaces/index.ts b/src/interfaces/index.ts index 1aec9b3..8778d1a 100644 --- a/src/interfaces/index.ts +++ b/src/interfaces/index.ts @@ -5,23 +5,10 @@ import IContextMenu from "./IContextMenu" import IEvent from "./IEvent" import IModal from "./IModal" -import IEnv from "./IEnv" import ICron from "./ICron" +import IEnv from "./IEnv" import { IGuild, IGuildData } from "./IGuild" import { IPlayer, IPlayerData } from "./IPlayer" -export { - IEnv, - ICron, - IAutocomplete, - IButton, - ICommand, - IContextMenu, - IEvent, - IModal, - IGuild, - IGuildData, - IPlayer, - IPlayerData -} +export { IAutocomplete, IButton, ICommand, IContextMenu, ICron, IEnv, IEvent, IGuild, IGuildData, IModal, IPlayer, IPlayerData } diff --git a/src/schemas/waitinglistTag.ts b/src/schemas/waitinglistTag.ts index 31d1219..412d997 100644 --- a/src/schemas/waitinglistTag.ts +++ b/src/schemas/waitinglistTag.ts @@ -2,9 +2,9 @@ import Sequelize, { InferAttributes, InferCreationAttributes, Model } from "sequ import { sequelize } from "utils/Illegitimate.js" interface WaitingList extends Model, InferCreationAttributes> { - userID: string; - uuid: string; - timestamp: number; + userID: string + uuid: string + timestamp: number } const tag = sequelize.define("waitingList", { diff --git a/src/typings/TimeZones.ts b/src/typings/TimeZones.ts index fab62cd..baed6df 100644 --- a/src/typings/TimeZones.ts +++ b/src/typings/TimeZones.ts @@ -429,4 +429,4 @@ const TimeZones = [ "Pacific/Wallis" ] as const -export default TimeZones \ No newline at end of file +export default TimeZones diff --git a/src/typings/index.ts b/src/typings/index.ts index 7b76987..45c5178 100644 --- a/src/typings/index.ts +++ b/src/typings/index.ts @@ -13,4 +13,4 @@ export type SnipeCache = { createdAt: number deletedAt: number attachments: string[] -} \ No newline at end of file +} diff --git a/src/utils/Autodeploy.ts b/src/utils/Autodeploy.ts index ef96f1b..c9c27fa 100644 --- a/src/utils/Autodeploy.ts +++ b/src/utils/Autodeploy.ts @@ -1,9 +1,9 @@ +import { RESTPostAPIChatInputApplicationCommandsJSONBody } from "discord.js" import fs from "fs" +import { ICommand } from "interfaces" import { ExtendedClient } from "./Client.js" import env from "./Env.js" -import { ICommand } from "interfaces" -import { RESTPostAPIChatInputApplicationCommandsJSONBody } from "discord.js" -import color from "./functions/colors.js" +import { color } from "./functions/colors.js" type FileType = "js" | "ts" export default async function autoDeployCommands(fileType: FileType, client: ExtendedClient) { @@ -36,10 +36,10 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext return { name: option.name, description: option.description, - type: option.type, + type: option.type } }), - defaultPermission: command.default_member_permissions ?? null, + defaultPermission: command.default_member_permissions ?? null } }).sort((a, b) => a.name > b.name ? 1 : -1) @@ -56,10 +56,10 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext return { name: option.name, description: option.description, - type: option.type, + type: option.type } }), - defaultPermission: command.defaultMemberPermissions, + defaultPermission: command.defaultMemberPermissions } }).sort((a, b) => a.name > b.name ? 1 : -1) @@ -108,7 +108,6 @@ export default async function autoDeployCommands(fileType: FileType, client: Ext } } - console.log(color("-------------", "lavender")) console.log(color(nc, "lavender")) } diff --git a/src/utils/Client.ts b/src/utils/Client.ts index 466440b..5956d5a 100644 --- a/src/utils/Client.ts +++ b/src/utils/Client.ts @@ -1,8 +1,8 @@ import { Client, Collection, GatewayIntentBits, Partials } from "discord.js" -import color from "./functions/colors.js" -import { ICommand, IContextMenu, IButton, IModal, IAutocomplete } from "interfaces" -import env from "./Env.js" +import { IAutocomplete, IButton, ICommand, IContextMenu, IModal } from "interfaces" import autoDeployCommands from "./Autodeploy.js" +import env from "./Env.js" +import { color } from "./functions/colors.js" export class ExtendedClient extends Client { commands: Collection = new Collection() diff --git a/src/utils/Events/autocomplete.ts b/src/utils/Events/autocomplete.ts index db5d5e4..324bcd4 100644 --- a/src/utils/Events/autocomplete.ts +++ b/src/utils/Events/autocomplete.ts @@ -1,10 +1,10 @@ -import { ExtendedClient as Client } from "utils/Client.js" import { embedColor } from "config/options.js" -import { IAutocomplete } from "interfaces" import { Events } from "discord.js" -import color from "utils/functions/colors.js" -import path from "path" import fs from "fs" +import { IAutocomplete } from "interfaces" +import path from "path" +import { ExtendedClient as Client } from "utils/Client.js" +import { color } from "utils/functions/colors.js" import logToChannel from "utils/functions/logtochannel.js" type FileType = "js" | "ts" const __dirname = import.meta.dirname diff --git a/src/utils/Events/button.ts b/src/utils/Events/button.ts index 0959a58..ba98041 100644 --- a/src/utils/Events/button.ts +++ b/src/utils/Events/button.ts @@ -1,10 +1,10 @@ -import { ExtendedClient as Client } from "utils/Client.js" -import color from "utils/functions/colors.js" import { embedColor } from "config/options.js" -import { IButton } from "interfaces" import { Events } from "discord.js" -import path from "path" import fs from "fs" +import { IButton } from "interfaces" +import path from "path" +import { ExtendedClient as Client } from "utils/Client.js" +import { color } from "utils/functions/colors.js" import logToChannel from "utils/functions/logtochannel.js" type FileType = "js" | "ts" const __dirname = import.meta.dirname diff --git a/src/utils/Events/command.ts b/src/utils/Events/command.ts index 53b1b10..f56d4aa 100644 --- a/src/utils/Events/command.ts +++ b/src/utils/Events/command.ts @@ -1,10 +1,10 @@ -import { ExtendedClient as Client } from "utils/Client.js" -import color from "utils/functions/colors.js" import { embedColor } from "config/options.js" -import { ICommand } from "interfaces" import { Events } from "discord.js" -import path from "path" import fs from "fs" +import { ICommand } from "interfaces" +import path from "path" +import { ExtendedClient as Client } from "utils/Client.js" +import { color } from "utils/functions/colors.js" import logToChannel from "utils/functions/logtochannel.js" type FileType = "js" | "ts" const __dirname = import.meta.dirname @@ -29,7 +29,7 @@ export default async function loadSlashCommandsEvents(client: Client, ft: FileTy } } - //! command handler + // ! command handler client.on(Events.InteractionCreate, async interaction => { if (!interaction.isChatInputCommand()) return diff --git a/src/utils/Events/contextmenu.ts b/src/utils/Events/contextmenu.ts index cb63aa8..4f0e2a3 100644 --- a/src/utils/Events/contextmenu.ts +++ b/src/utils/Events/contextmenu.ts @@ -1,10 +1,10 @@ -import { ExtendedClient as Client } from "utils/Client.js" -import color from "utils/functions/colors.js" -import { IContextMenu } from "interfaces" import { embedColor } from "config/options.js" import { Events } from "discord.js" -import path from "path" import fs from "fs" +import { IContextMenu } from "interfaces" +import path from "path" +import { ExtendedClient as Client } from "utils/Client.js" +import { color } from "utils/functions/colors.js" import logToChannel from "utils/functions/logtochannel.js" type FileType = "js" | "ts" const __dirname = import.meta.dirname @@ -29,7 +29,7 @@ export default async function loadContextMenuEvents(client: Client, ft: FileType } } - //! context menu command handler + // ! context menu command handler client.on(Events.InteractionCreate, async interaction => { if (!interaction.isContextMenuCommand()) return diff --git a/src/utils/Events/cron.ts b/src/utils/Events/cron.ts index b7810b9..73dfd40 100644 --- a/src/utils/Events/cron.ts +++ b/src/utils/Events/cron.ts @@ -1,7 +1,7 @@ import { CronJob } from "cron" -import path from "path" import fs from "fs" import { ICron } from "interfaces" +import path from "path" const __dirname = import.meta.dirname export default async function loadCronEvents() { @@ -12,8 +12,7 @@ export default async function loadCronEvents() { const filePath = path.join(cronPath, file) const { default: cron } = await import("file://" + filePath) as { default: ICron } - const time = - cron.time.seconds + " " + + const time = cron.time.seconds + " " + cron.time.minutes + " " + cron.time.hours + " " + cron.time.dayOfMonth + " " + diff --git a/src/utils/Events/events.ts b/src/utils/Events/events.ts index 3642843..39f69e1 100644 --- a/src/utils/Events/events.ts +++ b/src/utils/Events/events.ts @@ -1,7 +1,7 @@ -import { ExtendedClient as Client } from "utils/Client.js" +import fs from "fs" import { IEvent } from "interfaces" import path from "path" -import fs from "fs" +import { ExtendedClient as Client } from "utils/Client.js" const __dirname = import.meta.dirname export default async function loadEvents(client: Client) { diff --git a/src/utils/Events/modal.ts b/src/utils/Events/modal.ts index f6e4fe1..9f7b126 100644 --- a/src/utils/Events/modal.ts +++ b/src/utils/Events/modal.ts @@ -1,10 +1,10 @@ -import { ExtendedClient as Client } from "utils/Client.js" -import color from "utils/functions/colors.js" import { embedColor } from "config/options.js" -import { IModal } from "interfaces" import { Events } from "discord.js" -import path from "path" import fs from "fs" +import { IModal } from "interfaces" +import path from "path" +import { ExtendedClient as Client } from "utils/Client.js" +import { color } from "utils/functions/colors.js" import logToChannel from "utils/functions/logtochannel.js" type FileType = "js" | "ts" const __dirname = import.meta.dirname diff --git a/src/utils/Hypixel.ts b/src/utils/Hypixel.ts index ced9885..6e4c7f6 100644 --- a/src/utils/Hypixel.ts +++ b/src/utils/Hypixel.ts @@ -1,6 +1,6 @@ -export { skywarsLevel } from "./HypixelFunctions/skywars.js" +export { getGuild, getHeadURL, getIGN, getPlayer, getUUID } from "./HypixelFunctions/account.js" export { bedwarsLevel } from "./HypixelFunctions/bedwars.js" -export { hypixelLevel } from "./HypixelFunctions/main.js" -export { formatUuid } from "./HypixelFunctions/uuid.js" export { guildLevel, scaledGEXP } from "./HypixelFunctions/guild.js" -export { getUUID, getIGN, getPlayer, getGuild, getHeadURL } from "./HypixelFunctions/account.js" +export { hypixelLevel } from "./HypixelFunctions/main.js" +export { skywarsLevel } from "./HypixelFunctions/skywars.js" +export { formatUuid } from "./HypixelFunctions/uuid.js" diff --git a/src/utils/HypixelFunctions/account.ts b/src/utils/HypixelFunctions/account.ts index eb2e846..0e4a68c 100644 --- a/src/utils/HypixelFunctions/account.ts +++ b/src/utils/HypixelFunctions/account.ts @@ -1,7 +1,7 @@ import fetch from "axios" -import env from "utils/Env.js" import { IPlayer, IPlayerData } from "interfaces" import { IGuild, IGuildData } from "interfaces" +import env from "utils/Env.js" const apikey = env.prod.hypixelapikey const mojang = "https://api.mojang.com/users/profiles/minecraft/" const mojanguuid = "https://sessionserver.mojang.com/session/minecraft/profile/" @@ -21,7 +21,7 @@ type Profile2 = { data: { id: string name: string - properties: { name: string; value: string }[] + properties: { name: string, value: string }[] profileActions: [] } } @@ -86,4 +86,4 @@ async function getHeadURL(ign: string): Promise { return minotar + ign } -export { getUUID, getIGN, getPlayer, getGuild, getHeadURL } +export { getGuild, getHeadURL, getIGN, getPlayer, getUUID } diff --git a/src/utils/HypixelFunctions/guild.ts b/src/utils/HypixelFunctions/guild.ts index 978f115..a76731e 100644 --- a/src/utils/HypixelFunctions/guild.ts +++ b/src/utils/HypixelFunctions/guild.ts @@ -3,8 +3,21 @@ */ function guildLevel(exp: number): number { const EXP_NEEDED = [ - 100000, 150000, 250000, 500000, 750000, 1000000, 1250000, 1500000, - 2000000, 2500000, 2500000, 2500000, 2500000, 2500000, 3000000 + 100000, + 150000, + 250000, + 500000, + 750000, + 1000000, + 1250000, + 1500000, + 2000000, + 2500000, + 2500000, + 2500000, + 2500000, + 2500000, + 3000000 ] let level = 0 diff --git a/src/utils/Illegitimate.ts b/src/utils/Illegitimate.ts index 830cdcc..37723b9 100644 --- a/src/utils/Illegitimate.ts +++ b/src/utils/Illegitimate.ts @@ -1,12 +1,12 @@ -import { ExtendedClient as Client } from "utils/Client.js" -import color from "utils/functions/colors.js" import { Redis } from "ioredis" +import { ExtendedClient as Client } from "utils/Client.js" import env from "utils/Env.js" +import { color } from "utils/functions/colors.js" // import { connect } from "mongoose" -import loadAllEvents from "./Events/loadevents.js" import { Player } from "discord-player" -import { Sequelize } from "sequelize" import { YoutubeiExtractor } from "discord-player-youtubei" +import { Sequelize } from "sequelize" +import loadAllEvents from "./Events/loadevents.js" const client = new Client() const redis = new Redis(env.prod.redisURI) @@ -38,6 +38,7 @@ class Illegitimate { await player.extractors.register(YoutubeiExtractor, {}) await client.start() await this.databases() + this.loadMethods() } private async databases() { @@ -71,6 +72,16 @@ class Illegitimate { } } } + + private loadMethods() { + String.prototype.removeIndents = function(this: string) { + return this.replace(/^ */gm, "") + } + + String.prototype.capitalizeFirstLetter = function(this: string) { + return this[0].toUpperCase() + this.slice(1).toLowerCase() + } + } } -export { Illegitimate, client, redis, sequelize } +export { client, Illegitimate, redis, sequelize } diff --git a/src/utils/functions/applicationquestions.ts b/src/utils/functions/applicationquestions.ts index 05fc511..251758c 100644 --- a/src/utils/functions/applicationquestions.ts +++ b/src/utils/functions/applicationquestions.ts @@ -12,7 +12,6 @@ const attachments = new EmbedBuilder() .setDescription("You have uploaded an attachment. Please do not upload images, videos, or GIFS.") .setColor(embedColor) - export default async function applicationQuestions( input: Collection>, user: GuildMember, @@ -71,4 +70,4 @@ export default async function applicationQuestions( } return input!.first()!.content } -} \ No newline at end of file +} diff --git a/src/utils/functions/colors.ts b/src/utils/functions/colors.ts index 72df00f..6889811 100644 --- a/src/utils/functions/colors.ts +++ b/src/utils/functions/colors.ts @@ -7,10 +7,14 @@ const colors = { pink: "#f5c2e7" } -export default function color(text: string, type: keyof typeof colors) { +export function color(text: string, type: keyof typeof colors) { return chalk.hex(colors[type])(text) } +export function colorCustom(text: string, color: string) { + return chalk.hex(color)(text) +} + /* const colors = { reset: "\x1b[0m", bright: "\x1b[1m", diff --git a/src/utils/functions/funcs.ts b/src/utils/functions/funcs.ts deleted file mode 100644 index 6e34fc1..0000000 --- a/src/utils/functions/funcs.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function capitalizeFirstLetter(str: string): string { - return str[0].toUpperCase() + str.slice(1).toLowerCase() -} - -export function removeIndents(str: string): string { - return str.replace(/^ */gm, "") -} \ No newline at end of file diff --git a/src/utils/functions/logtochannel.ts b/src/utils/functions/logtochannel.ts index 2f7bc3a..e2438f0 100644 --- a/src/utils/functions/logtochannel.ts +++ b/src/utils/functions/logtochannel.ts @@ -1,12 +1,4 @@ -import { - guildid, - onlineLogChannel, - botLogChannel, - guildLogChannel, - errorLogChannel, - moderationLogChannel, - devLogChannel -} from "config/options.js" +import { botLogChannel, devLogChannel, errorLogChannel, guildid, guildLogChannel, moderationLogChannel, onlineLogChannel } from "config/options.js" import { Guild, MessageCreateOptions, TextChannel } from "discord.js" import { client } from "utils/Illegitimate.js" diff --git a/src/utils/functions/rolesmanage.ts b/src/utils/functions/rolesmanage.ts index 5a61497..b7047b5 100644 --- a/src/utils/functions/rolesmanage.ts +++ b/src/utils/functions/rolesmanage.ts @@ -1,15 +1,4 @@ -import { - gm, - manager, - moderator, - beast, - elite, - member, - guildStaff, - guildRole, - defaultMember, - verifyTick -} from "config/roles.js" +import { beast, defaultMember, elite, gm, guildRole, guildStaff, manager, member, moderator, verifyTick } from "config/roles.js" const roles = [ gm, manager, diff --git a/yarn.lock b/yarn.lock index 397162f..4fdc3cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -139,6 +139,62 @@ __metadata: languageName: node linkType: hard +"@dprint/darwin-arm64@npm:0.47.2": + version: 0.47.2 + resolution: "@dprint/darwin-arm64@npm:0.47.2" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@dprint/darwin-x64@npm:0.47.2": + version: 0.47.2 + resolution: "@dprint/darwin-x64@npm:0.47.2" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@dprint/linux-arm64-glibc@npm:0.47.2": + version: 0.47.2 + resolution: "@dprint/linux-arm64-glibc@npm:0.47.2" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@dprint/linux-arm64-musl@npm:0.47.2": + version: 0.47.2 + resolution: "@dprint/linux-arm64-musl@npm:0.47.2" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@dprint/linux-x64-glibc@npm:0.47.2": + version: 0.47.2 + resolution: "@dprint/linux-x64-glibc@npm:0.47.2" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@dprint/linux-x64-musl@npm:0.47.2": + version: 0.47.2 + resolution: "@dprint/linux-x64-musl@npm:0.47.2" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@dprint/win32-arm64@npm:0.47.2": + version: 0.47.2 + resolution: "@dprint/win32-arm64@npm:0.47.2" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@dprint/win32-x64@npm:0.47.2": + version: 0.47.2 + resolution: "@dprint/win32-x64@npm:0.47.2" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@esbuild/aix-ppc64@npm:0.23.1": version: 0.23.1 resolution: "@esbuild/aix-ppc64@npm:0.23.1" @@ -1829,6 +1885,41 @@ __metadata: languageName: node linkType: hard +"dprint@npm:^0.47.2": + version: 0.47.2 + resolution: "dprint@npm:0.47.2" + dependencies: + "@dprint/darwin-arm64": "npm:0.47.2" + "@dprint/darwin-x64": "npm:0.47.2" + "@dprint/linux-arm64-glibc": "npm:0.47.2" + "@dprint/linux-arm64-musl": "npm:0.47.2" + "@dprint/linux-x64-glibc": "npm:0.47.2" + "@dprint/linux-x64-musl": "npm:0.47.2" + "@dprint/win32-arm64": "npm:0.47.2" + "@dprint/win32-x64": "npm:0.47.2" + dependenciesMeta: + "@dprint/darwin-arm64": + optional: true + "@dprint/darwin-x64": + optional: true + "@dprint/linux-arm64-glibc": + optional: true + "@dprint/linux-arm64-musl": + optional: true + "@dprint/linux-x64-glibc": + optional: true + "@dprint/linux-x64-musl": + optional: true + "@dprint/win32-arm64": + optional: true + "@dprint/win32-x64": + optional: true + bin: + dprint: bin.js + checksum: 10c0/9add4613862613d3c3085b0eb29fd663bf59be904a22b36f06e3bb309f8a8007f555f8a34982b7d8c0574a1e6870952484cebf04c4684f83316f54984f20d95a + languageName: node + linkType: hard + "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -2762,6 +2853,7 @@ __metadata: discord-player-youtubei: "npm:^1.2.6" discord.js: "npm:^14.15.3" dotenv: "npm:^16.4.5" + dprint: "npm:^0.47.2" eslint: "npm:^9.9.0" globals: "npm:^15.9.0" ioredis: "npm:^5.4.1"