feat: added other regions

This commit is contained in:
TresAbhi committed 2023-07-18 00:23:59 +00:00
1 parent c173ece882
commit 62627c96a3
6 files changed
+19 -29

No files matched your search

@@ -1,10 +1,10 @@
import { SlashCommandStringOption } from 'discord.js';
import { REGION_NAMES } from '../../constants/regions';
export default function addServerChoices(option: SlashCommandStringOption) {
export default function addRegionChoices(option: SlashCommandStringOption) {
return option
.setName('server')
.setDescription('The Blitz server you are in')
.setName('region')
.setDescription('The Blitz region you are in')
.addChoices(
{ name: REGION_NAMES.com, value: 'com' },
{ name: REGION_NAMES.eu, value: 'eu' },
+1 -1
View File
@@ -6,6 +6,6 @@ export default function resolvePlayerFromURL(urlString: string) {
return {
id: parseInt(url.searchParams.get('id')!),
region: url.searchParams.get('server') as Region,
region: url.searchParams.get('region') as Region,
} satisfies ResolvedPlayer;
}