feat: custom periods for /stats and /tankstats

This commit is contained in:
TresAbhi committed 2023-06-18 01:56:21 +00:00
1 parent 78424c1535
commit e0c1db2a0b
14 files changed
+125 -49

No files matched your search

+1 -6
View File
@@ -1,15 +1,10 @@
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
import { BLITZ_SERVERS, BlitzServer } from '../../constants/servers.js';
import { TanksStats } from '../../types/tanksStats.js';
import { WARGAMING_APPLICATION_ID } from '../process/args.js';
import errorWithCause from '../process/errorWithCause.js';
import getWargamingResponse from './getWargamingResponse.js';
export default async function getTankStats(
interaction: ChatInputCommandInteraction<CacheType>,
server: BlitzServer,
id: number,
) {
export default async function getTankStats(server: BlitzServer, id: number) {
const tankStats = await getWargamingResponse<TanksStats>(
`https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`,
);