mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: moved tankopedia and tankaverages into a runtime cache
This commit is contained in:
1 parent
95b105cb65
commit
00b721f34f
29 files changed
+268
-235
No files matched your search
@@ -15,14 +15,16 @@ export default async function autocompleteTanks(
|
||||
|
||||
await interaction.respond(
|
||||
focusedOption.value
|
||||
? go(focusedOption.value, TANKS, { keys: ['name'], limit: 10 }).map(
|
||||
(item) =>
|
||||
({
|
||||
name: item.obj.name
|
||||
? item.obj.name
|
||||
: resolveTankName(item.obj.tank_id),
|
||||
value: `${item.obj.tank_id}`,
|
||||
} satisfies ApplicationCommandOptionChoiceData<string>),
|
||||
? await Promise.all(
|
||||
go(focusedOption.value, TANKS, { keys: ['name'], limit: 10 }).map(
|
||||
async (item) =>
|
||||
({
|
||||
name: item.obj.name
|
||||
? item.obj.name
|
||||
: await resolveTankName(item.obj.tank_id),
|
||||
value: `${item.obj.tank_id}`,
|
||||
} satisfies ApplicationCommandOptionChoiceData<string>),
|
||||
),
|
||||
)
|
||||
: [],
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user