feat: added all buttons to dynamic commands

This commit is contained in:
TresAbhi committed 2023-06-28 18:45:14 +00:00
1 parent dd39563d6d
commit d1d8aad6c7
9 files changed
+157 -57

No files matched your search

+4 -4
View File
@@ -21,7 +21,7 @@ export default async function evolution<Type extends StatType>(
type: Type,
{ start, end, evolutionName }: ResolvedPeriod,
{ server, id }: ResolvedPlayer,
tankId: Type extends 'tank' ? number : never,
tankId: Type extends 'tank' ? number : null,
) {
let nameDiscriminator: string | undefined;
let image: string | undefined;
@@ -38,8 +38,8 @@ export default async function evolution<Type extends StatType>(
? `https://wotblitz-gc.gcdn.co/icons/clanEmblems1x/clan-icon-v2-${clan.emblem_set_id}.png`
: undefined;
} else {
nameDiscriminator = `(${resolveTankName(tankId)})`;
image = tankopedia[tankId].images.normal;
nameDiscriminator = `(${resolveTankName(tankId!)})`;
image = tankopedia[tankId!].images.normal;
}
let histories: Histories;
@@ -53,7 +53,7 @@ export default async function evolution<Type extends StatType>(
});
} else {
histories = await getTankHistories(server, id, {
tankId,
tankId: tankId!,
start,
end,
includeLatestHistories: true,