feat: cleaned up tankopedia

This commit is contained in:
TresAbhi committed 2023-05-30 18:42:34 +00:00
1 parent 38fe4bf5da
commit c2fca42a86
14 files changed
+195 -96

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
import { CacheType, ChatInputCommandInteraction } from 'discord.js';
import { go } from 'fuzzysort';
import { tankopedia, tanks } from '../blitzstars/tankopedia.js';
import errorEmbed from '../interaction/errorEmbed.js';
import { TANKS, tankopedia } from './tankopedia.js';
export default async function resolveTankId(
interaction: ChatInputCommandInteraction<CacheType>,
@@ -10,7 +10,7 @@ export default async function resolveTankId(
const number = Number(tank);
if (Number.isNaN(number)) {
const searchResult = go(tank, tanks, { keys: ['name'], limit: 1 });
const searchResult = go(tank, TANKS, { keys: ['name'], limit: 1 });
if (searchResult.length === 0) {
await interaction.editReply({