mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
feat: used short region names for username autocomplete
This commit is contained in:
1 parent
ca38914095
commit
d38e873800
1 file changed
+4
-2
@@ -3,7 +3,7 @@ import {
|
||||
AutocompleteInteraction,
|
||||
CacheType,
|
||||
} from 'discord.js';
|
||||
import { REGION_NAMES } from '../../constants/regions';
|
||||
import { REGION_NAMES_SHORT } from '../../constants/regions';
|
||||
import searchPlayersAcrossRegions from '../blitz/searchPlayersAcrossRegions';
|
||||
|
||||
export default async function autocompleteUsername(
|
||||
@@ -19,7 +19,9 @@ export default async function autocompleteUsername(
|
||||
? players.map(
|
||||
(player) =>
|
||||
({
|
||||
name: `${player.nickname} (${REGION_NAMES[player.region]})`,
|
||||
name: `${player.nickname} (${
|
||||
REGION_NAMES_SHORT[player.region]
|
||||
})`,
|
||||
value: `${player.region}/${player.account_id}`,
|
||||
}) satisfies ApplicationCommandOptionChoiceData<string>,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user