fix: evolution refresh button

This commit is contained in:
TrèsAbhi committed 2023-10-12 12:07:45 -05:00
1 parent bcd3a00f91
commit 7447ccc487
5 files changed
+41 -50

No files matched your search

+5 -8
View File
@@ -80,22 +80,19 @@ export const fullStatsCommand = new Promise<CommandRegistryRaw>(
command,
async handler(interaction) {
const resolvedPlayer = await resolvePlayerFromCommand(interaction);
const resolvedPeriod = resolvePeriodFromCommand(
resolvedPlayer.region,
interaction,
);
const player = await resolvePlayerFromCommand(interaction);
const period = resolvePeriodFromCommand(player.region, interaction);
const filters = getFiltersFromCommand(interaction);
const path = interactionToURL(interaction, {
...resolvedPlayer,
...player,
...getCustomPeriodParams(interaction),
...filters,
});
return Promise.all([
render(resolvedPlayer, resolvedPeriod, filters),
render(player, period, filters),
refreshButton(interaction, path),
getBlitzStarsLinkButton(resolvedPlayer.region, resolvedPlayer.id),
getBlitzStarsLinkButton(player.region, player.id),
]);
},