diff --git a/package.json b/package.json index 2ace24497..88b6e7c33 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "@types/node": "^18.15.11", "discord.js": "^14.9.0", "node-fetch": "^3.3.1", - "ts-node": "^10.9.1", "typescript": "^5.0.4", "vite-node": "^0.30.1" } diff --git a/src/behaviors/error.ts b/src/behaviors/error.ts index 848fa6351..ae21dd442 100644 --- a/src/behaviors/error.ts +++ b/src/behaviors/error.ts @@ -1,6 +1,7 @@ import { Client, EmbedBuilder, TextChannel } from 'discord.js'; import discord from '../../discord.json' assert { type: 'json' }; import { NEGATIVE_COLOR } from '../constants/colors.js'; +import isDev from '../utilities/isDev.js'; export const PROCESS_ERROR_EVENTS = ['uncaughtException']; export const CLIENT_ERROR_EVENTS = ['error']; @@ -18,19 +19,21 @@ function handleError(error: Error, client: Client) { .setTitle('Skilled Bot ran into a catastrophic error') .setColor(NEGATIVE_COLOR) .setDescription( - `Total shutdown was avoided! Error:\n\n\`\`\`${error.name}\n${error.message}\n${error.stack}\n${error.cause}\`\`\``, + `\`\`\`${error.name}\n${error.message}\n${error.stack}\n${error.cause}\`\`\``, ), ], }); } export function registerErrorHandlers(client: Client) { - PROCESS_ERROR_EVENTS.forEach((name) => - process.on(name, (error) => handleError(error, client)), - ); - CLIENT_ERROR_EVENTS.forEach((name) => - client.on(name, (error) => handleError(error, client)), - ); + if (!isDev()) { + PROCESS_ERROR_EVENTS.forEach((name) => + process.on(name, (error) => handleError(error, client)), + ); + CLIENT_ERROR_EVENTS.forEach((name) => + client.on(name, (error) => handleError(error, client)), + ); + } return client; } diff --git a/src/commands/eligible.ts b/src/commands/eligible.ts index c59b37b6f..388311142 100644 --- a/src/commands/eligible.ts +++ b/src/commands/eligible.ts @@ -20,7 +20,7 @@ export const CLANS = { export default { inProduction: true, - inDevelopment: false, + inDevelopment: true, inPublic: false, command: new SlashCommandBuilder() diff --git a/src/commands/inactive.ts b/src/commands/inactive.ts index ba58200b1..24d7eff51 100644 --- a/src/commands/inactive.ts +++ b/src/commands/inactive.ts @@ -1,11 +1,11 @@ import { EmbedBuilder, SlashCommandBuilder } from 'discord.js'; -import fetch from 'node-fetch'; import { CommandRegistry } from '../behaviors/interactionCreate.js'; import { NEGATIVE_COLOR, POSITIVE_COLOR } from '../constants/colors.js'; import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js'; -import { ClanDetails } from '../types/clanDetails.js'; +import { ClanInfo } from '../types/clanInfo.js'; import { PlayerPersonalData } from '../types/playerPersonalData.js'; import getClan from '../utilities/getClan.js'; +import getWargamingResponse from '../utilities/getWargamingResponse.js'; const DEFAULT_THRESHOLD = 7; @@ -51,56 +51,62 @@ export default { const threshold = interaction.options.getNumber('threshold')! ?? DEFAULT_THRESHOLD; const time = new Date().getTime() / 1000; - const clanData = (await ( - await fetch( - `https://api.wotblitz.com/wotb/clans/info/?application_id=${process.env.WARGAMING_APPLICATION_ID}&clan_id=${clan.clan_id}`, - ) - ).json()) as ClanDetails; - const memberIds = clanData.data[clan.clan_id].members_ids; - const playerPersonalData = (await ( - await fetch( - `https://api.wotblitz.com/wotb/account/info/?application_id=${ - process.env.WARGAMING_APPLICATION_ID - }&account_id=${memberIds.join(',')}`, - ) - ).json()) as PlayerPersonalData; - const inactiveInfo = memberIds - .map((memberId) => { - const member = playerPersonalData.data[memberId]; - const inactiveDays = (time - member.last_battle_time) / 60 / 60 / 24; + getWargamingResponse( + `https://api.wotblitz.com/wotb/clans/info/?application_id=${process.env.WARGAMING_APPLICATION_ID}&clan_id=${clan.clan_id}`, + interaction, + async (clanInfo) => { + const memberIds = clanInfo[clan.clan_id].members_ids; - return [member.nickname, inactiveDays] as const; - }) - .filter(([, inactiveDays]) => inactiveDays >= threshold) - .sort((a, b) => b[1] - a[1]) - .map(([nickname, inactiveDays]) => { - const days = Math.floor(inactiveDays); - return `**${nickname}**: ${days} day${days === 1 ? '' : 's'}`; - }); - const hasInactiveMembers = inactiveInfo.length > 0; + getWargamingResponse( + `https://api.wotblitz.com/wotb/account/info/?application_id=${ + process.env.WARGAMING_APPLICATION_ID + }&account_id=${memberIds.join(',')}`, + interaction, + async (playerPersonalData) => { + const inactiveInfo = memberIds + .map((memberId) => { + const member = playerPersonalData[memberId]; + const inactiveDays = + (time - member.last_battle_time) / 60 / 60 / 24; - await interaction.reply({ - embeds: [ - new EmbedBuilder() - .setColor(hasInactiveMembers ? NEGATIVE_COLOR : POSITIVE_COLOR) - .setTitle( - hasInactiveMembers - ? `${clan.name}'s inactive members` - : `No inactive members in ${clan.name}`, - ) - .setDescription( - hasInactiveMembers - ? `Players that exceed the threshold of ${threshold} days:\n\n${inactiveInfo.join( - '\n', - )}` - : `No players exceed the threshold of ${threshold} days.`, - ), - ], - }); + return [member.nickname, inactiveDays] as const; + }) + .filter(([, inactiveDays]) => inactiveDays >= threshold) + .sort((a, b) => b[1] - a[1]) + .map(([nickname, inactiveDays]) => { + const days = Math.floor(inactiveDays); + return `**${nickname}**: ${days} day${days === 1 ? '' : 's'}`; + }); + const hasInactiveMembers = inactiveInfo.length > 0; - console.log( - `Displaying inactive members in ${clan.name} for ${threshold} days`, + await interaction.reply({ + embeds: [ + new EmbedBuilder() + .setColor( + hasInactiveMembers ? NEGATIVE_COLOR : POSITIVE_COLOR, + ) + .setTitle( + hasInactiveMembers + ? `${clan.name}'s inactive members` + : `No inactive members in ${clan.name}`, + ) + .setDescription( + hasInactiveMembers + ? `Players that exceed the threshold of ${threshold} days:\n\n${inactiveInfo.join( + '\n', + )}` + : `No players exceed the threshold of ${threshold} days.`, + ), + ], + }); + + console.log( + `Displaying inactive members in ${clan.name} for ${threshold} days`, + ); + }, + ); + }, ); }); }, diff --git a/src/commands/tanks.ts b/src/commands/tanks.ts index 8d7fef6d4..f4e12c99f 100644 --- a/src/commands/tanks.ts +++ b/src/commands/tanks.ts @@ -1,10 +1,10 @@ import { EmbedBuilder, SlashCommandBuilder } from 'discord.js'; -import fetch from 'node-fetch'; import { CommandRegistry } from '../behaviors/interactionCreate.js'; import { SKILLED_COLOR } from '../constants/colors.js'; import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js'; import { TanksStats } from '../types/tanksStats.js'; import getBlitzAccount from '../utilities/getBlitzAccount.js'; +import getWargamingResponse from '../utilities/getWargamingResponse.js'; import { tankTypeEmojis, tankopedia } from '../utilities/tankopedia.js'; export default { @@ -47,42 +47,42 @@ export default { const tier = Math.round(interaction.options.getNumber('tier')!); getBlitzAccount(interaction, name, server, async (account) => { - const tankStats = (await ( - await fetch( - `https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${process.env.WARGAMING_APPLICATION_ID}&account_id=${account.account_id}`, - ) - ).json()) as TanksStats; + getWargamingResponse( + `https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${process.env.WARGAMING_APPLICATION_ID}&account_id=${account.account_id}`, + interaction, + async (tankStats) => { + const tanks = tankStats[account.account_id]!.map( + (tankData) => tankopedia.data[tankData.tank_id], + ).filter((tank) => tank.tier === tier); - const tanks = tankStats.data[account.account_id]!.map( - (tankData) => tankopedia.data[tankData.tank_id], - ).filter((tank) => tank.tier === tier); + await interaction.reply({ + embeds: [ + new EmbedBuilder() + .setTitle( + `${account.nickname}'s owned ${ + tier === null ? '' : `tier ${tier} ` + }tanks`, + ) + .setDescription( + tanks.length === 0 + ? `No tanks found for player in tier ${tier}` + : tanks + .map( + (tank) => + `${tankTypeEmojis[tank.type]} ${tank.name} ${ + tank.is_premium ? '⭐' : '' + }`, + ) + .join('\n'), + ) + .setColor(SKILLED_COLOR), + ], + }); - await interaction.reply({ - embeds: [ - new EmbedBuilder() - .setTitle( - `${account.nickname}'s owned ${ - tier === null ? '' : `tier ${tier} ` - }tanks`, - ) - .setDescription( - tanks.length === 0 - ? `No tanks found for player in tier ${tier}` - : tanks - .map( - (tank) => - `${tankTypeEmojis[tank.type]} ${tank.name} ${ - tank.is_premium ? '⭐' : '' - }`, - ) - .join('\n'), - ) - .setColor(SKILLED_COLOR), - ], - }); - - console.log( - `Displaying ${account.nickname}'s owned tanks in tier ${tier}`, + console.log( + `Displaying ${account.nickname}'s owned tanks in tier ${tier}`, + ); + }, ); }); }, diff --git a/src/commands/verify.ts b/src/commands/verify.ts index c681e35d8..d033f06f8 100644 --- a/src/commands/verify.ts +++ b/src/commands/verify.ts @@ -1,11 +1,11 @@ import { EmbedBuilder, SlashCommandBuilder } from 'discord.js'; -import fetch from 'node-fetch'; import discord from '../../discord.json' assert { type: 'json' }; import { CommandRegistry } from '../behaviors/interactionCreate.js'; import { NEGATIVE_COLOR, POSITIVE_COLOR } from '../constants/colors.js'; import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js'; -import { PlayerClanData } from '../types/playerClanData.js'; import getBlitzAccount from '../utilities/getBlitzAccount.js'; +import getWargamingResponse from '../utilities/getWargamingResponse.js'; +import { PlayerClanData } from '../types/playerClanData.js'; export default { inProduction: true, @@ -38,55 +38,57 @@ export default { const server = interaction.options.getString('server') as BlitzServer; getBlitzAccount(interaction, name, server, async (account) => { - // good match - const clanData = (await fetch( + getWargamingResponse( `https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${process.env.WARGAMING_APPLICATION_ID}&account_id=${account.account_id}&extra=clan`, - ).then((response) => response.json())) as PlayerClanData; - const clan = clanData.data[account.account_id].clan; - const clanTag = clan === null ? '' : ` [${clan!.tag}]`; + interaction, + async (clanData) => { + const clan = clanData[account.account_id].clan; + const clanTag = clan === null ? '' : ` [${clan!.tag}]`; - if (interaction.member && interaction.guild) { - const member = interaction.guild?.members.cache.get( - interaction.member?.user.id, - ); - - member - ?.setNickname(`${name}${clanTag}`) - .then(async () => { - await member.roles.remove(discord.verify_role); - await member.roles.add(discord.peasant_role); - await interaction.reply({ - embeds: [ - new EmbedBuilder() - .setColor(POSITIVE_COLOR) - .setTitle(`${interaction.user.username} is verified`) - .setDescription( - `The user is now verified as ${name}${clanTag}`, - ), - ], - }); - - console.log( - `${interaction.user.username} verified as ${name}${clanTag}`, + if (interaction.member && interaction.guild) { + const member = interaction.guild?.members.cache.get( + interaction.member?.user.id, ); - }) - .catch(async () => { - await interaction.reply({ - embeds: [ - new EmbedBuilder() - .setColor(NEGATIVE_COLOR) - .setTitle(`${interaction.user.username} failed to verify`) - .setDescription( - 'I may not have the permission to change your nickname.', - ), - ], - }); - console.warn( - `${interaction.user.username} failed to verify as ${name}${clanTag}`, - ); - }); - } + member + ?.setNickname(`${name}${clanTag}`) + .then(async () => { + await member.roles.remove(discord.verify_role); + await member.roles.add(discord.peasant_role); + await interaction.reply({ + embeds: [ + new EmbedBuilder() + .setColor(POSITIVE_COLOR) + .setTitle(`${interaction.user.username} is verified`) + .setDescription( + `The user is now verified as ${name}${clanTag}`, + ), + ], + }); + + console.log( + `${interaction.user.username} verified as ${name}${clanTag}`, + ); + }) + .catch(async () => { + await interaction.reply({ + embeds: [ + new EmbedBuilder() + .setColor(NEGATIVE_COLOR) + .setTitle(`${interaction.user.username} failed to verify`) + .setDescription( + 'I may not have the permission to change your nickname.', + ), + ], + }); + + console.warn( + `${interaction.user.username} failed to verify as ${name}${clanTag}`, + ); + }); + } + }, + ); }); }, } satisfies CommandRegistry; diff --git a/src/types/clanDetails.ts b/src/types/clanInfo.ts similarity index 69% rename from src/types/clanDetails.ts rename to src/types/clanInfo.ts index 41f0cf0b7..db1f412f6 100644 --- a/src/types/clanDetails.ts +++ b/src/types/clanInfo.ts @@ -1,7 +1,5 @@ -import { WargamingResponse } from './wargamingResponse.js'; - -export interface ClanDetailsData { - recruiting_options: { +export interface ClanInfo { + [clanId:number]:{recruiting_options: { vehicles_level: number; wins_ratio: number; average_battles_per_day: number; @@ -26,9 +24,5 @@ export interface ClanDetailsData { renamed_at: number; old_tag: null; leader_id: number; - description: string; + description: string;} } - -export type ClanDetails = WargamingResponse<{ - [accountId: number]: ClanDetailsData; -}>; diff --git a/src/types/clanList.ts b/src/types/clanList.ts index 7d2f8e53a..4fdbdffc0 100644 --- a/src/types/clanList.ts +++ b/src/types/clanList.ts @@ -1,5 +1,3 @@ -import { WargamingResponse } from './wargamingResponse.js'; - export interface Clan { members_count: number; created_at: number; @@ -8,4 +6,4 @@ export interface Clan { name: string; } -export type ClanList = WargamingResponse; +export type ClanList = Clan[]; diff --git a/src/types/playerClanData.ts b/src/types/playerClanData.ts index 3d64d83c4..8ac882a40 100644 --- a/src/types/playerClanData.ts +++ b/src/types/playerClanData.ts @@ -1,6 +1,4 @@ -import { WargamingResponse } from './wargamingResponse.js'; - -export type PlayerClanData = WargamingResponse<{ +export type PlayerClanData = { [accountId: number]: { account_id: number; joined_at: number; @@ -17,4 +15,4 @@ export type PlayerClanData = WargamingResponse<{ emblem_set_id: number; }; }; -}>; +}; diff --git a/src/types/playerPersonalData.ts b/src/types/playerPersonalData.ts index 598734e6a..d7e3d1277 100644 --- a/src/types/playerPersonalData.ts +++ b/src/types/playerPersonalData.ts @@ -1,6 +1,4 @@ -import { WargamingResponse } from './wargamingResponse.js'; - -export type PlayerPersonalData = WargamingResponse<{ +export type PlayerPersonalData = { [accountId: number]: { statistics: { clan: { @@ -54,4 +52,4 @@ export type PlayerPersonalData = WargamingResponse<{ last_battle_time: number; nickname: string; }; -}>; +}; diff --git a/src/types/tanksStats.ts b/src/types/tanksStats.ts index 1cc24c0ed..8584948b3 100644 --- a/src/types/tanksStats.ts +++ b/src/types/tanksStats.ts @@ -1,6 +1,4 @@ -import { WargamingResponse } from './wargamingResponse.js'; - -export type TanksStats = WargamingResponse<{ +export type TanksStats = { [accountId: number]: { all: { spotted: number; @@ -32,4 +30,4 @@ export type TanksStats = WargamingResponse<{ in_garage: number | null; tank_id: number; }[]; -}>; +}; diff --git a/src/utilities/getClan.ts b/src/utilities/getClan.ts index 36f3ecd65..5a9fc5a28 100644 --- a/src/utilities/getClan.ts +++ b/src/utilities/getClan.ts @@ -3,10 +3,10 @@ import { ChatInputCommandInteraction, EmbedBuilder, } from 'discord.js'; -import fetch from 'node-fetch'; import { NEGATIVE_COLOR } from '../constants/colors.js'; import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js'; import { Clan, ClanList } from '../types/clanList.js'; +import getWargamingResponse from './getWargamingResponse.js'; export default async function getClan( interaction: ChatInputCommandInteraction, @@ -16,39 +16,36 @@ export default async function getClan( ) { const serverName = BLITZ_SERVERS[server]; - const clans = (await fetch( + getWargamingResponse( `https://api.wotblitz.${server}/wotb/clans/list/?application_id=${process.env.WARGAMING_APPLICATION_ID}&search=${name}`, - ).then((response) => response.json())) as ClanList; + interaction, + async (clans) => { + if ( + clans.length > 0 && + (clans[0].name === name || clans[0].tag === name.toUpperCase()) + ) { + callback(clans[0]); + } else { + // no exact match + await interaction.reply({ + embeds: [ + new EmbedBuilder() + .setColor(NEGATIVE_COLOR) + .setTitle(`Clan not found`) + .setDescription( + `I couldn't find "${name}" in the ${serverName} server. I found ${ + clans ? (clans.length < 100 ? clans.length : 'over 100') : 0 + } similarly spelled clan${clans?.length !== 1 ? 's' : ''}. ${ + clans && clans.length > 0 + ? `Did you mean "${clans[0].name}" or "${clans[0].tag}"? ` + : '' + }Re-run the command, don't make typos, and capitalize correctly.`, + ), + ], + }); - if ( - clans.status === 'ok' && - clans.data.length > 0 && - (clans.data[0].name === name || clans.data[0].tag === name.toUpperCase()) - ) { - callback(clans.data[0]); - } else { - // no exact match - await interaction.reply({ - embeds: [ - new EmbedBuilder() - .setColor(NEGATIVE_COLOR) - .setTitle(`Clan not found`) - .setDescription( - `I couldn't find "${name}" in the ${serverName} server. I found ${ - clans?.data - ? clans.data.length < 100 - ? clans.data.length - : 'over 100' - : 0 - } similarly spelled clan${clans?.data?.length !== 1 ? 's' : ''}. ${ - clans?.data && clans.data.length > 0 - ? `Did you mean "${clans.data[0].name}" or "${clans.data[0].tag}"? ` - : '' - }Re-run the command, don't make typos, and capitalize correctly.`, - ), - ], - }); - - console.log(`Clan not found for ${name} in ${serverName} server.`); - } + console.log(`Clan not found for ${name} in ${serverName} server.`); + } + }, + ); } diff --git a/src/utilities/getWargamingResponse.ts b/src/utilities/getWargamingResponse.ts new file mode 100644 index 000000000..3bfd19009 --- /dev/null +++ b/src/utilities/getWargamingResponse.ts @@ -0,0 +1,20 @@ +import { CacheType, ChatInputCommandInteraction } from 'discord.js'; +import { WargamingResponse } from '../types/wargamingResponse.js'; +import wargamingError from './wargamingError.js'; + +export default function getWargamingResponse( + url: string, + interaction: ChatInputCommandInteraction, + callback: (data: Data) => void, +) { + fetch(url) + .then((response) => response.json()) + .then((response: WargamingResponse) => { + if (response.status === 'ok') { + callback(response.data); + } else { + wargamingError(interaction); + } + }) + .catch(() => wargamingError(interaction)); +} diff --git a/yarn.lock b/yarn.lock index e12ae3862..ed924aee4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,13 +2,6 @@ # yarn lockfile v1 -"@cspotcode/source-map-support@^0.8.0": - version "0.8.1" - resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - "@discordjs/builders@^1.6.0": version "1.6.1" resolved "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.1.tgz" @@ -163,24 +156,6 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz#3a8e57153905308db357fd02f57c180ee3a0a1fa" integrity sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg== -"@jridgewell/resolve-uri@^3.0.3": - version "3.1.1" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.15" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@sapphire/async-queue@^1.5.0": version "1.5.0" resolved "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz" @@ -204,26 +179,6 @@ resolved "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz" integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A== -"@tsconfig/node10@^1.0.7": - version "1.0.9" - resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz" - integrity sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA== - -"@tsconfig/node12@^1.0.7": - version "1.0.11" - resolved "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz" - integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== - -"@tsconfig/node14@^1.0.0": - version "1.0.3" - resolved "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz" - integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== - -"@tsconfig/node16@^1.0.2": - version "1.0.3" - resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz" - integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== - "@types/node@*", "@types/node@^18.15.11": version "18.15.11" resolved "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz" @@ -236,21 +191,11 @@ dependencies: "@types/node" "*" -acorn-walk@^8.1.1: - version "8.2.0" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz" - integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== - -acorn@^8.4.1, acorn@^8.8.2: +acorn@^8.8.2: version "8.8.2" resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== -arg@^4.1.0: - version "4.1.3" - resolved "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz" - integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== - busboy@^1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz" @@ -263,11 +208,6 @@ cac@^6.7.14: resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== -create-require@^1.1.0: - version "1.1.1" - resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" - integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== - data-uri-to-buffer@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz" @@ -280,11 +220,6 @@ debug@^4.3.4: dependencies: ms "2.1.2" -diff@^4.0.1: - version "4.0.2" - resolved "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz" - integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== - discord-api-types@^0.37.37: version "0.37.39" resolved "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.39.tgz" @@ -396,11 +331,6 @@ lodash@^4.17.21: resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -make-error@^1.1.1: - version "1.3.6" - resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz" - integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== - mlly@^1.1.1, mlly@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.2.0.tgz#f0f6c2fc8d2d12ea6907cd869066689b5031b613" @@ -534,25 +464,6 @@ ts-mixer@^6.0.3: resolved "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz" integrity sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ== -ts-node@^10.9.1: - version "10.9.1" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== - dependencies: - "@cspotcode/source-map-support" "^0.8.0" - "@tsconfig/node10" "^1.0.7" - "@tsconfig/node12" "^1.0.7" - "@tsconfig/node14" "^1.0.0" - "@tsconfig/node16" "^1.0.2" - acorn "^8.4.1" - acorn-walk "^8.1.1" - arg "^4.1.0" - create-require "^1.1.0" - diff "^4.0.1" - make-error "^1.1.1" - v8-compile-cache-lib "^3.0.1" - yn "3.1.1" - tslib@^2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz" @@ -580,11 +491,6 @@ util-deprecate@^1.0.1: resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -v8-compile-cache-lib@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" - integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== - vite-node@^0.30.1: version "0.30.1" resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.30.1.tgz#ab0ed1553019c7d81ac95529c57ab8ac9e82347d" @@ -617,8 +523,3 @@ ws@^8.13.0: version "8.13.0" resolved "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz" integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== - -yn@3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz" - integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==