mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 20:56:11 +01:00
feat: rename tank types to tank classes
This commit is contained in:
1 parent
3325536bbc
commit
53174db351
18 files changed
+53
-64
No files matched your search
@@ -4,7 +4,7 @@ import {
|
||||
SlashCommandBuilder,
|
||||
SlashCommandSubcommandBuilder,
|
||||
} from 'discord.js';
|
||||
import { TANK_TYPES, TREE_TYPES } from '../../components/Tanks';
|
||||
import { TANK_CLASSES, TREE_TYPES } from '../../components/Tanks';
|
||||
import { translator } from '../localization/translator';
|
||||
import addTankChoices from './addTankChoices';
|
||||
import addTierChoices from './addTierChoices';
|
||||
@@ -46,26 +46,26 @@ export function addFilterOptions<
|
||||
.addStringOption((option) => addTierChoices(option).setRequired(false))
|
||||
.addStringOption((option) =>
|
||||
option
|
||||
.setName(translate('bot.common.options.filters.tank_type'))
|
||||
.setName(translate('bot.common.options.filters.tank_class'))
|
||||
.setNameLocalizations(
|
||||
localizationObject('bot.common.options.filters.tank_type'),
|
||||
localizationObject('bot.common.options.filters.tank_class'),
|
||||
)
|
||||
.setDescription(
|
||||
translate('bot.common.options.filters.tank_type.description'),
|
||||
translate('bot.common.options.filters.tank_class.description'),
|
||||
)
|
||||
.setDescriptionLocalizations(
|
||||
localizationObject(
|
||||
'bot.common.options.filters.tank_type.description',
|
||||
'bot.common.options.filters.tank_class.description',
|
||||
),
|
||||
)
|
||||
.addChoices(
|
||||
...TANK_TYPES.map(
|
||||
...TANK_CLASSES.map(
|
||||
(tankType) =>
|
||||
({
|
||||
value: tankType,
|
||||
name: translate(`common.tank_type_short.${tankType}`),
|
||||
name: translate(`common.tank_class_short.${tankType}`),
|
||||
name_localizations: localizationObject(
|
||||
`common.tank_type_short.${tankType}`,
|
||||
`common.tank_class_short.${tankType}`,
|
||||
),
|
||||
}) satisfies APIApplicationCommandOptionChoice,
|
||||
),
|
||||
|
||||
@@ -8,7 +8,7 @@ export function getFiltersFromButton(interaction: ButtonInteraction) {
|
||||
return {
|
||||
nation: url.searchParams.get('nation') ?? undefined,
|
||||
tank: parseInt(url.searchParams.get('tank') ?? '0') || undefined,
|
||||
tankType: url.searchParams.get('tank-type') ?? undefined,
|
||||
tankType: url.searchParams.get('tank-class') ?? undefined,
|
||||
treeType:
|
||||
(url.searchParams.get('tree-type') as TreeType | undefined) ?? undefined,
|
||||
tier: parseInt(url.searchParams.get('tier') ?? '0') || undefined,
|
||||
|
||||
@@ -11,7 +11,7 @@ export async function getFiltersFromCommand(
|
||||
return {
|
||||
nation: interaction.options.getString('nation') ?? undefined,
|
||||
tier: parseInt(interaction.options.getString('tier') ?? '0') || undefined,
|
||||
tankType: interaction.options.getString('tank-type') ?? undefined,
|
||||
tankType: interaction.options.getString('tank-class') ?? undefined,
|
||||
treeType:
|
||||
(interaction.options.getString('tree-type') as TreeType | undefined) ??
|
||||
undefined,
|
||||
|
||||
Reference in new issue
Block a user