mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-14 13:16:11 +01:00
feat: null handling
This commit is contained in:
1 parent
3e7a73c528
commit
7aa0b65d1d
6 files changed
+41
-19
No files matched your search
@@ -126,7 +126,11 @@ export const researchCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
]);
|
||||
}
|
||||
|
||||
const tankStats = await getTankStats(region, id, interaction.locale);
|
||||
const tankStats = await getTankStats(region, id);
|
||||
|
||||
if (tankStats === null) {
|
||||
return t`bot.common.errors.no_tank_stats`;
|
||||
}
|
||||
|
||||
if (tankStats.some(({ tank_id }) => tank_id === targetTankId)) {
|
||||
return translate('bot.commands.research.errors.already_researched', [
|
||||
|
||||
Reference in new issue
Block a user