feat: renaming

This commit is contained in:
TrèsAbhi committed 2024-03-25 18:22:37 -05:00
1 parent 817796ed3c
commit 71481f5971
5 files changed
+12 -19

No files matched your search

@@ -30,12 +30,10 @@ const LEAGUE_ACCENT = [
'_brown', '_brown',
] as const; ] as const;
export const ratingStatsCommand = new Promise<CommandRegistry>((resolve) => { export const ratingCommand = new Promise<CommandRegistry>((resolve) => {
resolve({ resolve({
command: command:
createLocalizedCommand('rating-session').addStringOption( createLocalizedCommand('rating').addStringOption(addUsernameChoices),
addUsernameChoices,
),
inProduction: true, inProduction: true,
inPublic: true, inPublic: true,
@@ -70,13 +68,12 @@ export const ratingStatsCommand = new Promise<CommandRegistry>((resolve) => {
throw new Error(`Rating info not available for ${region}`); throw new Error(`Rating info not available for ${region}`);
} }
if (!statsA) { if (!statsA) {
return t`bot.commands.rating_session.errors.unrecorded_stats`; return t`bot.commands.rating.errors.unrecorded_stats`;
} }
if (!statsB1) { if (!statsB1) {
return translate( return translate('bot.commands.rating.errors.no_participation', [
'bot.commands.rating_session.errors.no_participation', markdownEscape(accountInfo.nickname),
[markdownEscape(accountInfo.nickname)], ]);
);
} }
const reward = ratingInfo.rewards.find( const reward = ratingInfo.rewards.find(
@@ -97,7 +94,7 @@ export const ratingStatsCommand = new Promise<CommandRegistry>((resolve) => {
<TitleBar <TitleBar
title={accountInfo.nickname} title={accountInfo.nickname}
image={clanImage} 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, interaction.locale,
)}`} )}`}
/> />
+1 -1
View File
@@ -17,7 +17,7 @@ export default function CommandWrapper({ children, fat }: CommandWrapperProps) {
width: 480, width: 480,
color: theme.colors.textHighContrast, color: theme.colors.textHighContrast,
position: 'relative', position: 'relative',
background: `linear-gradient(${theme.colors.appBackground2}, ${theme.colors.appBackground1})`, background: theme.colors.appBackground1,
}} }}
> >
{children} {children}
@@ -11,10 +11,6 @@ interface ItemProps extends ComponentProps<'div'> {
highlight?: boolean; highlight?: boolean;
} }
function normalizeImage(url: string) {
return url.endsWith('.webp') ? 'https://i.imgur.com/ZniCzbO.png' : url;
}
export function Item({ export function Item({
position, position,
deltaPosition, deltaPosition,
+2 -2
View File
@@ -25,8 +25,8 @@ import { ownedTanksCommand } from '../../commands/ownedTanks';
import { permissionsCommand } from '../../commands/permissions'; import { permissionsCommand } from '../../commands/permissions';
import { pingCommand } from '../../commands/ping'; import { pingCommand } from '../../commands/ping';
import { playerInfoCommand } from '../../commands/playerInfo'; import { playerInfoCommand } from '../../commands/playerInfo';
import { ratingCommand } from '../../commands/rating';
import { ratingLeaderboardCommand } from '../../commands/ratingLeaderboard'; import { ratingLeaderboardCommand } from '../../commands/ratingLeaderboard';
import { ratingStatsCommand } from '../../commands/ratingSession';
import { researchCommand } from '../../commands/research'; import { researchCommand } from '../../commands/research';
import { searchClansCommand } from '../../commands/searchClans'; import { searchClansCommand } from '../../commands/searchClans';
import { searchPlayersCommand } from '../../commands/searchPlayers'; import { searchPlayersCommand } from '../../commands/searchPlayers';
@@ -96,7 +96,7 @@ export const COMMANDS_RAW: Promise<CommandRegistry>[] = [
ratingLeaderboardCommand, ratingLeaderboardCommand,
todayCommand, todayCommand,
researchCommand, researchCommand,
ratingStatsCommand, ratingCommand,
]; ];
export const commands = Promise.allSettled(COMMANDS_RAW).then((rawCommands) => { export const commands = Promise.allSettled(COMMANDS_RAW).then((rawCommands) => {
+2 -2
View File
@@ -541,12 +541,12 @@
} }
}, },
"rating_session": { "rating": {
"$": "rating-session", "$": "rating-session",
"description": "Rating player's statistics", "description": "Rating player's statistics",
"body": { "body": {
"subtitle": "Rating session" "subtitle": "Today's rating statistics"
}, },
"errors": { "errors": {