mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: added player list api
This commit is contained in:
1 parent
33b4ea04b4
commit
cbeb83d8d0
7 files changed
+57
-17
No files matched your search
@@ -19,8 +19,8 @@ export default async function autocompleteUsername(
|
||||
? players.map(
|
||||
(player) =>
|
||||
({
|
||||
name: `${player.nickname} (${REGION_NAMES[player.server]})`,
|
||||
value: `${player.server}/${player.account_id}`,
|
||||
name: `${player.nickname} (${REGION_NAMES[player.region]})`,
|
||||
value: `${player.region}/${player.account_id}`,
|
||||
}) satisfies ApplicationCommandOptionChoiceData<string>,
|
||||
)
|
||||
: [],
|
||||
|
||||
@@ -39,7 +39,7 @@ export default async function resolvePlayerFromCommand(
|
||||
|
||||
if (accounts[0]) {
|
||||
return {
|
||||
region: accounts[0].server,
|
||||
region: accounts[0].region,
|
||||
id: accounts[0].account_id,
|
||||
} satisfies ResolvedPlayer;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user