mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
feat: renaming
This commit is contained in:
1 parent
817796ed3c
commit
71481f5971
5 files changed
+12
-19
No files matched your search
@@ -30,12 +30,10 @@ const LEAGUE_ACCENT = [
|
||||
'_brown',
|
||||
] as const;
|
||||
|
||||
export const ratingStatsCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
resolve({
|
||||
command:
|
||||
createLocalizedCommand('rating-session').addStringOption(
|
||||
addUsernameChoices,
|
||||
),
|
||||
createLocalizedCommand('rating').addStringOption(addUsernameChoices),
|
||||
|
||||
inProduction: true,
|
||||
inPublic: true,
|
||||
@@ -70,13 +68,12 @@ export const ratingStatsCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
throw new Error(`Rating info not available for ${region}`);
|
||||
}
|
||||
if (!statsA) {
|
||||
return t`bot.commands.rating_session.errors.unrecorded_stats`;
|
||||
return t`bot.commands.rating.errors.unrecorded_stats`;
|
||||
}
|
||||
if (!statsB1) {
|
||||
return translate(
|
||||
'bot.commands.rating_session.errors.no_participation',
|
||||
[markdownEscape(accountInfo.nickname)],
|
||||
);
|
||||
return translate('bot.commands.rating.errors.no_participation', [
|
||||
markdownEscape(accountInfo.nickname),
|
||||
]);
|
||||
}
|
||||
|
||||
const reward = ratingInfo.rewards.find(
|
||||
@@ -97,7 +94,7 @@ export const ratingStatsCommand = new Promise<CommandRegistry>((resolve) => {
|
||||
<TitleBar
|
||||
title={accountInfo.nickname}
|
||||
image={clanImage}
|
||||
description={`${t`bot.commands.rating_session.body.subtitle`} • ${new Date().toLocaleDateString(
|
||||
description={`${t`bot.commands.rating.body.subtitle`} • ${new Date().toLocaleDateString(
|
||||
interaction.locale,
|
||||
)}`}
|
||||
/>
|
||||
@@ -17,7 +17,7 @@ export default function CommandWrapper({ children, fat }: CommandWrapperProps) {
|
||||
width: 480,
|
||||
color: theme.colors.textHighContrast,
|
||||
position: 'relative',
|
||||
background: `linear-gradient(${theme.colors.appBackground2}, ${theme.colors.appBackground1})`,
|
||||
background: theme.colors.appBackground1,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
|
||||
@@ -11,10 +11,6 @@ interface ItemProps extends ComponentProps<'div'> {
|
||||
highlight?: boolean;
|
||||
}
|
||||
|
||||
function normalizeImage(url: string) {
|
||||
return url.endsWith('.webp') ? 'https://i.imgur.com/ZniCzbO.png' : url;
|
||||
}
|
||||
|
||||
export function Item({
|
||||
position,
|
||||
deltaPosition,
|
||||
|
||||
@@ -25,8 +25,8 @@ import { ownedTanksCommand } from '../../commands/ownedTanks';
|
||||
import { permissionsCommand } from '../../commands/permissions';
|
||||
import { pingCommand } from '../../commands/ping';
|
||||
import { playerInfoCommand } from '../../commands/playerInfo';
|
||||
import { ratingCommand } from '../../commands/rating';
|
||||
import { ratingLeaderboardCommand } from '../../commands/ratingLeaderboard';
|
||||
import { ratingStatsCommand } from '../../commands/ratingSession';
|
||||
import { researchCommand } from '../../commands/research';
|
||||
import { searchClansCommand } from '../../commands/searchClans';
|
||||
import { searchPlayersCommand } from '../../commands/searchPlayers';
|
||||
@@ -96,7 +96,7 @@ export const COMMANDS_RAW: Promise<CommandRegistry>[] = [
|
||||
ratingLeaderboardCommand,
|
||||
todayCommand,
|
||||
researchCommand,
|
||||
ratingStatsCommand,
|
||||
ratingCommand,
|
||||
];
|
||||
|
||||
export const commands = Promise.allSettled(COMMANDS_RAW).then((rawCommands) => {
|
||||
|
||||
+2
-2
@@ -541,12 +541,12 @@
|
||||
}
|
||||
},
|
||||
|
||||
"rating_session": {
|
||||
"rating": {
|
||||
"$": "rating-session",
|
||||
"description": "Rating player's statistics",
|
||||
|
||||
"body": {
|
||||
"subtitle": "Rating session"
|
||||
"subtitle": "Today's rating statistics"
|
||||
},
|
||||
|
||||
"errors": {
|
||||
|
||||
Reference in new issue
Block a user