mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: descrete wargaming response
This commit is contained in:
1 parent
fd1dc40918
commit
d4f676091d
14 files changed
+211
-297
No files matched your search
@@ -12,7 +12,6 @@
|
|||||||
"@types/node": "^18.15.11",
|
"@types/node": "^18.15.11",
|
||||||
"discord.js": "^14.9.0",
|
"discord.js": "^14.9.0",
|
||||||
"node-fetch": "^3.3.1",
|
"node-fetch": "^3.3.1",
|
||||||
"ts-node": "^10.9.1",
|
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.0.4",
|
||||||
"vite-node": "^0.30.1"
|
"vite-node": "^0.30.1"
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-7
@@ -1,6 +1,7 @@
|
|||||||
import { Client, EmbedBuilder, TextChannel } from 'discord.js';
|
import { Client, EmbedBuilder, TextChannel } from 'discord.js';
|
||||||
import discord from '../../discord.json' assert { type: 'json' };
|
import discord from '../../discord.json' assert { type: 'json' };
|
||||||
import { NEGATIVE_COLOR } from '../constants/colors.js';
|
import { NEGATIVE_COLOR } from '../constants/colors.js';
|
||||||
|
import isDev from '../utilities/isDev.js';
|
||||||
|
|
||||||
export const PROCESS_ERROR_EVENTS = ['uncaughtException'];
|
export const PROCESS_ERROR_EVENTS = ['uncaughtException'];
|
||||||
export const CLIENT_ERROR_EVENTS = ['error'];
|
export const CLIENT_ERROR_EVENTS = ['error'];
|
||||||
@@ -18,19 +19,21 @@ function handleError(error: Error, client: Client) {
|
|||||||
.setTitle('Skilled Bot ran into a catastrophic error')
|
.setTitle('Skilled Bot ran into a catastrophic error')
|
||||||
.setColor(NEGATIVE_COLOR)
|
.setColor(NEGATIVE_COLOR)
|
||||||
.setDescription(
|
.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) {
|
export function registerErrorHandlers(client: Client) {
|
||||||
PROCESS_ERROR_EVENTS.forEach((name) =>
|
if (!isDev()) {
|
||||||
process.on(name, (error) => handleError(error, 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)),
|
CLIENT_ERROR_EVENTS.forEach((name) =>
|
||||||
);
|
client.on(name, (error) => handleError(error, client)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@ export const CLANS = {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
inProduction: true,
|
inProduction: true,
|
||||||
inDevelopment: false,
|
inDevelopment: true,
|
||||||
inPublic: false,
|
inPublic: false,
|
||||||
|
|
||||||
command: new SlashCommandBuilder()
|
command: new SlashCommandBuilder()
|
||||||
|
|||||||
+54
-48
@@ -1,11 +1,11 @@
|
|||||||
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
import fetch from 'node-fetch';
|
|
||||||
import { CommandRegistry } from '../behaviors/interactionCreate.js';
|
import { CommandRegistry } from '../behaviors/interactionCreate.js';
|
||||||
import { NEGATIVE_COLOR, POSITIVE_COLOR } from '../constants/colors.js';
|
import { NEGATIVE_COLOR, POSITIVE_COLOR } from '../constants/colors.js';
|
||||||
import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.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 { PlayerPersonalData } from '../types/playerPersonalData.js';
|
||||||
import getClan from '../utilities/getClan.js';
|
import getClan from '../utilities/getClan.js';
|
||||||
|
import getWargamingResponse from '../utilities/getWargamingResponse.js';
|
||||||
|
|
||||||
const DEFAULT_THRESHOLD = 7;
|
const DEFAULT_THRESHOLD = 7;
|
||||||
|
|
||||||
@@ -51,56 +51,62 @@ export default {
|
|||||||
const threshold =
|
const threshold =
|
||||||
interaction.options.getNumber('threshold')! ?? DEFAULT_THRESHOLD;
|
interaction.options.getNumber('threshold')! ?? DEFAULT_THRESHOLD;
|
||||||
const time = new Date().getTime() / 1000;
|
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
|
getWargamingResponse<ClanInfo>(
|
||||||
.map((memberId) => {
|
`https://api.wotblitz.com/wotb/clans/info/?application_id=${process.env.WARGAMING_APPLICATION_ID}&clan_id=${clan.clan_id}`,
|
||||||
const member = playerPersonalData.data[memberId];
|
interaction,
|
||||||
const inactiveDays = (time - member.last_battle_time) / 60 / 60 / 24;
|
async (clanInfo) => {
|
||||||
|
const memberIds = clanInfo[clan.clan_id].members_ids;
|
||||||
|
|
||||||
return [member.nickname, inactiveDays] as const;
|
getWargamingResponse<PlayerPersonalData>(
|
||||||
})
|
`https://api.wotblitz.com/wotb/account/info/?application_id=${
|
||||||
.filter(([, inactiveDays]) => inactiveDays >= threshold)
|
process.env.WARGAMING_APPLICATION_ID
|
||||||
.sort((a, b) => b[1] - a[1])
|
}&account_id=${memberIds.join(',')}`,
|
||||||
.map(([nickname, inactiveDays]) => {
|
interaction,
|
||||||
const days = Math.floor(inactiveDays);
|
async (playerPersonalData) => {
|
||||||
return `**${nickname}**: ${days} day${days === 1 ? '' : 's'}`;
|
const inactiveInfo = memberIds
|
||||||
});
|
.map((memberId) => {
|
||||||
const hasInactiveMembers = inactiveInfo.length > 0;
|
const member = playerPersonalData[memberId];
|
||||||
|
const inactiveDays =
|
||||||
|
(time - member.last_battle_time) / 60 / 60 / 24;
|
||||||
|
|
||||||
await interaction.reply({
|
return [member.nickname, inactiveDays] as const;
|
||||||
embeds: [
|
})
|
||||||
new EmbedBuilder()
|
.filter(([, inactiveDays]) => inactiveDays >= threshold)
|
||||||
.setColor(hasInactiveMembers ? NEGATIVE_COLOR : POSITIVE_COLOR)
|
.sort((a, b) => b[1] - a[1])
|
||||||
.setTitle(
|
.map(([nickname, inactiveDays]) => {
|
||||||
hasInactiveMembers
|
const days = Math.floor(inactiveDays);
|
||||||
? `${clan.name}'s inactive members`
|
return `**${nickname}**: ${days} day${days === 1 ? '' : 's'}`;
|
||||||
: `No inactive members in ${clan.name}`,
|
});
|
||||||
)
|
const hasInactiveMembers = inactiveInfo.length > 0;
|
||||||
.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(
|
await interaction.reply({
|
||||||
`Displaying inactive members in ${clan.name} for ${threshold} days`,
|
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`,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
+35
-35
@@ -1,10 +1,10 @@
|
|||||||
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
import fetch from 'node-fetch';
|
|
||||||
import { CommandRegistry } from '../behaviors/interactionCreate.js';
|
import { CommandRegistry } from '../behaviors/interactionCreate.js';
|
||||||
import { SKILLED_COLOR } from '../constants/colors.js';
|
import { SKILLED_COLOR } from '../constants/colors.js';
|
||||||
import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js';
|
import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js';
|
||||||
import { TanksStats } from '../types/tanksStats.js';
|
import { TanksStats } from '../types/tanksStats.js';
|
||||||
import getBlitzAccount from '../utilities/getBlitzAccount.js';
|
import getBlitzAccount from '../utilities/getBlitzAccount.js';
|
||||||
|
import getWargamingResponse from '../utilities/getWargamingResponse.js';
|
||||||
import { tankTypeEmojis, tankopedia } from '../utilities/tankopedia.js';
|
import { tankTypeEmojis, tankopedia } from '../utilities/tankopedia.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -47,42 +47,42 @@ export default {
|
|||||||
const tier = Math.round(interaction.options.getNumber('tier')!);
|
const tier = Math.round(interaction.options.getNumber('tier')!);
|
||||||
|
|
||||||
getBlitzAccount(interaction, name, server, async (account) => {
|
getBlitzAccount(interaction, name, server, async (account) => {
|
||||||
const tankStats = (await (
|
getWargamingResponse<TanksStats>(
|
||||||
await fetch(
|
`https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${process.env.WARGAMING_APPLICATION_ID}&account_id=${account.account_id}`,
|
||||||
`https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${process.env.WARGAMING_APPLICATION_ID}&account_id=${account.account_id}`,
|
interaction,
|
||||||
)
|
async (tankStats) => {
|
||||||
).json()) as TanksStats;
|
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(
|
await interaction.reply({
|
||||||
(tankData) => tankopedia.data[tankData.tank_id],
|
embeds: [
|
||||||
).filter((tank) => tank.tier === tier);
|
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({
|
console.log(
|
||||||
embeds: [
|
`Displaying ${account.nickname}'s owned tanks in tier ${tier}`,
|
||||||
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}`,
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
+49
-47
@@ -1,11 +1,11 @@
|
|||||||
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
import { EmbedBuilder, SlashCommandBuilder } from 'discord.js';
|
||||||
import fetch from 'node-fetch';
|
|
||||||
import discord from '../../discord.json' assert { type: 'json' };
|
import discord from '../../discord.json' assert { type: 'json' };
|
||||||
import { CommandRegistry } from '../behaviors/interactionCreate.js';
|
import { CommandRegistry } from '../behaviors/interactionCreate.js';
|
||||||
import { NEGATIVE_COLOR, POSITIVE_COLOR } from '../constants/colors.js';
|
import { NEGATIVE_COLOR, POSITIVE_COLOR } from '../constants/colors.js';
|
||||||
import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js';
|
import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js';
|
||||||
import { PlayerClanData } from '../types/playerClanData.js';
|
|
||||||
import getBlitzAccount from '../utilities/getBlitzAccount.js';
|
import getBlitzAccount from '../utilities/getBlitzAccount.js';
|
||||||
|
import getWargamingResponse from '../utilities/getWargamingResponse.js';
|
||||||
|
import { PlayerClanData } from '../types/playerClanData.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
inProduction: true,
|
inProduction: true,
|
||||||
@@ -38,55 +38,57 @@ export default {
|
|||||||
const server = interaction.options.getString('server') as BlitzServer;
|
const server = interaction.options.getString('server') as BlitzServer;
|
||||||
|
|
||||||
getBlitzAccount(interaction, name, server, async (account) => {
|
getBlitzAccount(interaction, name, server, async (account) => {
|
||||||
// good match
|
getWargamingResponse<PlayerClanData>(
|
||||||
const clanData = (await fetch(
|
|
||||||
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${process.env.WARGAMING_APPLICATION_ID}&account_id=${account.account_id}&extra=clan`,
|
`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;
|
interaction,
|
||||||
const clan = clanData.data[account.account_id].clan;
|
async (clanData) => {
|
||||||
const clanTag = clan === null ? '' : ` [${clan!.tag}]`;
|
const clan = clanData[account.account_id].clan;
|
||||||
|
const clanTag = clan === null ? '' : ` [${clan!.tag}]`;
|
||||||
|
|
||||||
if (interaction.member && interaction.guild) {
|
if (interaction.member && interaction.guild) {
|
||||||
const member = interaction.guild?.members.cache.get(
|
const member = interaction.guild?.members.cache.get(
|
||||||
interaction.member?.user.id,
|
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}`,
|
|
||||||
);
|
);
|
||||||
})
|
|
||||||
.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(
|
member
|
||||||
`${interaction.user.username} failed to verify as ${name}${clanTag}`,
|
?.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;
|
} satisfies CommandRegistry;
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
import { WargamingResponse } from './wargamingResponse.js';
|
export interface ClanInfo {
|
||||||
|
[clanId:number]:{recruiting_options: {
|
||||||
export interface ClanDetailsData {
|
|
||||||
recruiting_options: {
|
|
||||||
vehicles_level: number;
|
vehicles_level: number;
|
||||||
wins_ratio: number;
|
wins_ratio: number;
|
||||||
average_battles_per_day: number;
|
average_battles_per_day: number;
|
||||||
@@ -26,9 +24,5 @@ export interface ClanDetailsData {
|
|||||||
renamed_at: number;
|
renamed_at: number;
|
||||||
old_tag: null;
|
old_tag: null;
|
||||||
leader_id: number;
|
leader_id: number;
|
||||||
description: string;
|
description: string;}
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ClanDetails = WargamingResponse<{
|
|
||||||
[accountId: number]: ClanDetailsData;
|
|
||||||
}>;
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
import { WargamingResponse } from './wargamingResponse.js';
|
|
||||||
|
|
||||||
export interface Clan {
|
export interface Clan {
|
||||||
members_count: number;
|
members_count: number;
|
||||||
created_at: number;
|
created_at: number;
|
||||||
@@ -8,4 +6,4 @@ export interface Clan {
|
|||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ClanList = WargamingResponse<Clan[]>;
|
export type ClanList = Clan[];
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
import { WargamingResponse } from './wargamingResponse.js';
|
export type PlayerClanData = {
|
||||||
|
|
||||||
export type PlayerClanData = WargamingResponse<{
|
|
||||||
[accountId: number]: {
|
[accountId: number]: {
|
||||||
account_id: number;
|
account_id: number;
|
||||||
joined_at: number;
|
joined_at: number;
|
||||||
@@ -17,4 +15,4 @@ export type PlayerClanData = WargamingResponse<{
|
|||||||
emblem_set_id: number;
|
emblem_set_id: number;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}>;
|
};
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
import { WargamingResponse } from './wargamingResponse.js';
|
export type PlayerPersonalData = {
|
||||||
|
|
||||||
export type PlayerPersonalData = WargamingResponse<{
|
|
||||||
[accountId: number]: {
|
[accountId: number]: {
|
||||||
statistics: {
|
statistics: {
|
||||||
clan: {
|
clan: {
|
||||||
@@ -54,4 +52,4 @@ export type PlayerPersonalData = WargamingResponse<{
|
|||||||
last_battle_time: number;
|
last_battle_time: number;
|
||||||
nickname: string;
|
nickname: string;
|
||||||
};
|
};
|
||||||
}>;
|
};
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
import { WargamingResponse } from './wargamingResponse.js';
|
export type TanksStats = {
|
||||||
|
|
||||||
export type TanksStats = WargamingResponse<{
|
|
||||||
[accountId: number]: {
|
[accountId: number]: {
|
||||||
all: {
|
all: {
|
||||||
spotted: number;
|
spotted: number;
|
||||||
@@ -32,4 +30,4 @@ export type TanksStats = WargamingResponse<{
|
|||||||
in_garage: number | null;
|
in_garage: number | null;
|
||||||
tank_id: number;
|
tank_id: number;
|
||||||
}[];
|
}[];
|
||||||
}>;
|
};
|
||||||
+31
-34
@@ -3,10 +3,10 @@ import {
|
|||||||
ChatInputCommandInteraction,
|
ChatInputCommandInteraction,
|
||||||
EmbedBuilder,
|
EmbedBuilder,
|
||||||
} from 'discord.js';
|
} from 'discord.js';
|
||||||
import fetch from 'node-fetch';
|
|
||||||
import { NEGATIVE_COLOR } from '../constants/colors.js';
|
import { NEGATIVE_COLOR } from '../constants/colors.js';
|
||||||
import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js';
|
import { BLITZ_SERVERS, BlitzServer } from '../constants/servers.js';
|
||||||
import { Clan, ClanList } from '../types/clanList.js';
|
import { Clan, ClanList } from '../types/clanList.js';
|
||||||
|
import getWargamingResponse from './getWargamingResponse.js';
|
||||||
|
|
||||||
export default async function getClan(
|
export default async function getClan(
|
||||||
interaction: ChatInputCommandInteraction<CacheType>,
|
interaction: ChatInputCommandInteraction<CacheType>,
|
||||||
@@ -16,39 +16,36 @@ export default async function getClan(
|
|||||||
) {
|
) {
|
||||||
const serverName = BLITZ_SERVERS[server];
|
const serverName = BLITZ_SERVERS[server];
|
||||||
|
|
||||||
const clans = (await fetch(
|
getWargamingResponse<ClanList>(
|
||||||
`https://api.wotblitz.${server}/wotb/clans/list/?application_id=${process.env.WARGAMING_APPLICATION_ID}&search=${name}`,
|
`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 (
|
console.log(`Clan not found for ${name} in ${serverName} server.`);
|
||||||
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.`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -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<Data extends object>(
|
||||||
|
url: string,
|
||||||
|
interaction: ChatInputCommandInteraction<CacheType>,
|
||||||
|
callback: (data: Data) => void,
|
||||||
|
) {
|
||||||
|
fetch(url)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((response: WargamingResponse<Data>) => {
|
||||||
|
if (response.status === 'ok') {
|
||||||
|
callback(response.data);
|
||||||
|
} else {
|
||||||
|
wargamingError(interaction);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => wargamingError(interaction));
|
||||||
|
}
|
||||||
@@ -2,13 +2,6 @@
|
|||||||
# yarn lockfile v1
|
# 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":
|
"@discordjs/builders@^1.6.0":
|
||||||
version "1.6.1"
|
version "1.6.1"
|
||||||
resolved "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.1.tgz"
|
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"
|
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz#3a8e57153905308db357fd02f57c180ee3a0a1fa"
|
||||||
integrity sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==
|
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/[email protected]":
|
|
||||||
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":
|
"@sapphire/async-queue@^1.5.0":
|
||||||
version "1.5.0"
|
version "1.5.0"
|
||||||
resolved "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz"
|
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"
|
resolved "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz"
|
||||||
integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==
|
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":
|
"@types/node@*", "@types/node@^18.15.11":
|
||||||
version "18.15.11"
|
version "18.15.11"
|
||||||
resolved "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz"
|
resolved "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz"
|
||||||
@@ -236,21 +191,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
acorn-walk@^8.1.1:
|
acorn@^8.8.2:
|
||||||
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:
|
|
||||||
version "8.8.2"
|
version "8.8.2"
|
||||||
resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz"
|
resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz"
|
||||||
integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==
|
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:
|
busboy@^1.6.0:
|
||||||
version "1.6.0"
|
version "1.6.0"
|
||||||
resolved "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz"
|
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"
|
resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959"
|
||||||
integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==
|
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:
|
data-uri-to-buffer@^4.0.0:
|
||||||
version "4.0.1"
|
version "4.0.1"
|
||||||
resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz"
|
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:
|
dependencies:
|
||||||
ms "2.1.2"
|
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:
|
discord-api-types@^0.37.37:
|
||||||
version "0.37.39"
|
version "0.37.39"
|
||||||
resolved "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.39.tgz"
|
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"
|
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
|
||||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
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:
|
mlly@^1.1.1, mlly@^1.2.0:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.2.0.tgz#f0f6c2fc8d2d12ea6907cd869066689b5031b613"
|
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"
|
resolved "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz"
|
||||||
integrity sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==
|
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:
|
tslib@^2.5.0:
|
||||||
version "2.5.0"
|
version "2.5.0"
|
||||||
resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz"
|
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"
|
resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
|
||||||
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
|
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:
|
vite-node@^0.30.1:
|
||||||
version "0.30.1"
|
version "0.30.1"
|
||||||
resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-0.30.1.tgz#ab0ed1553019c7d81ac95529c57ab8ac9e82347d"
|
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"
|
version "8.13.0"
|
||||||
resolved "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz"
|
resolved "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz"
|
||||||
integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==
|
integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==
|
||||||
|
|
||||||
[email protected]:
|
|
||||||
version "3.1.1"
|
|
||||||
resolved "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz"
|
|
||||||
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
|
|
||||||
Reference in new issue
Block a user