feat: user error strings

This commit is contained in:
TrèsAbhi committed 2024-03-09 11:48:35 -06:00
1 parent 265eff98bf
commit 889ae39e3b
14 files changed
+71 -374

No files matched your search

+3 -1
View File
@@ -1,3 +1,4 @@
import { Locale } from 'discord.js';
import { Region } from '../../constants/regions';
import {
GetHistoriesOptions,
@@ -34,6 +35,7 @@ export const getTankHistoriesDefaultOptions: GetTankHistoriesOptions = {
export default async function getTankHistories(
server: Region,
id: number,
locale: Locale,
options?: Partial<GetTankHistoriesOptions>,
) {
const mergedOptions = { ...getTankHistoriesDefaultOptions, ...options };
@@ -76,7 +78,7 @@ export default async function getTankHistories(
const latestNodes: TankHistories = [];
if (mergedOptions.includeLatestHistories) {
(await getTankStats(server, id)).forEach((tankHistory) => {
(await getTankStats(server, id, locale)).forEach((tankHistory) => {
if (
tankHistory.all.battles > (lastBattles[tankHistory.tank_id] ?? 0) &&
(mergedOptions.tankId === undefined ||