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

+3 -3
View File
@@ -3,7 +3,7 @@ import markdownEscape from 'markdown-escape';
import { REGION_NAMES, Region } from '../constants/regions';
import getWargamingResponse from '../core/blitz/getWargamingResponse';
import addClanChoices from '../core/discord/addClanChoices';
import addServerChoices from '../core/discord/addServerChoices';
import addRegionChoices from '../core/discord/addRegionChoices';
import embedInfo from '../core/discord/embedInfo';
import { secrets } from '../core/node/secrets';
import { CommandRegistry } from '../events/interactionCreate';
@@ -17,7 +17,7 @@ export const searchClansCommand: CommandRegistry = {
command: new SlashCommandBuilder()
.setName('searchclans')
.setDescription('Search clans')
.addStringOption(addServerChoices)
.addStringOption(addRegionChoices)
.addStringOption((option) => addClanChoices(option).setAutocomplete(false))
.addIntegerOption((option) =>
option
@@ -28,7 +28,7 @@ export const searchClansCommand: CommandRegistry = {
),
async handler(interaction) {
const server = interaction.options.getString('server') as Region;
const server = interaction.options.getString('region') as Region;
const clan = interaction.options.getString('clan')!;
const limit = interaction.options.getInteger('limit') ?? 25;
const clanList = await getWargamingResponse<ClanList>(