Skip to content

Commit

Permalink
feat: add /ratios pit (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobk999 authored Aug 17, 2024
1 parent 66fd297 commit ee6e426
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
6 changes: 6 additions & 0 deletions apps/discord-bot/src/commands/ratios/ratios.command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
MEGAWALLS_MODES,
MURDER_MYSTERY_MODES,
PAINTBALL_MODES,
PIT_MODES,
Player,
PlayerStats,
QUAKE_MODES,
Expand Down Expand Up @@ -128,6 +129,11 @@ export class RatiosCommand {
return this.run(context, PAINTBALL_MODES);
}

@SubCommand({ description: (t) => t("commands.ratios-pit"), args })
public pit(context: CommandContext) {
return this.run(context, PIT_MODES);
}

@SubCommand({ description: (t) => t("commands.ratios-quake"), args, group: "classic" })
public quake(context: CommandContext) {
return this.run(context, QUAKE_MODES);
Expand Down
2 changes: 0 additions & 2 deletions apps/discord-bot/src/commands/ratios/ratios.profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ export type RatioWithStats = [

export interface RatiosProfileProps extends Omit<BaseProfileProps, "time"> {
mode: GameMode<any>;

ratios: RatioWithStats[];

gameName: FormattedGame;
}

Expand Down
2 changes: 2 additions & 0 deletions apps/discord-bot/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ export const MODES_TO_API = new Map<GameModes<GamesWithBackgrounds>, keyof Playe
[MEGAWALLS_MODES, "megawalls"],
[MURDER_MYSTERY_MODES, "murdermystery"],
[PAINTBALL_MODES, "paintball"],
[PIT_MODES, "pit"],
[PARKOUR_MODES, "parkour"],
[QUAKE_MODES, "quake"],
[SKYWARS_MODES, "skywars"],
Expand Down Expand Up @@ -445,6 +446,7 @@ export const MODES_TO_FORMATTED = new Map<GameModes<GamesWithBackgrounds>, Forma
[MEGAWALLS_MODES, FormattedGame.MEGAWALLS],
[MURDER_MYSTERY_MODES, FormattedGame.MURDER_MYSTERY],
[PAINTBALL_MODES, FormattedGame.PAINTBALL],
[PIT_MODES, FormattedGame.PIT],
[PARKOUR_MODES, FormattedGame.PARKOUR],
[QUAKE_MODES, FormattedGame.QUAKE],
[SKYWARS_MODES, FormattedGame.SKYWARS],
Expand Down
1 change: 1 addition & 0 deletions locales/en-US/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
"ratios-megawalls": "$t(commands.ratios-command, { \"name\": \"MegaWalls\" })",
"ratios-murdermystery": "$t(commands.ratios-command, { \"name\": \"Murder Mystery\" })",
"ratios-paintball": "$t(commands.ratios-command, { \"name\": \"Paintball\" })",
"ratios-pit": "$t(commands.ratios-command, { \"name\": \"Pit\" })",
"ratios-quake": "$t(commands.ratios-command, { \"name\": \"Quake\" })",
"ratios-skywars": "$t(commands.ratios-command, { \"name\": \"SkyWars\" })",
"ratios-smashheroes": "$t(commands.ratios-command, { \"name\": \"Smash Heroes\" })",
Expand Down
5 changes: 4 additions & 1 deletion packages/schemas/src/player/gamemodes/pit/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import {
getPrestigeReq,
} from "./util.js";

export const PIT_MODES = new GameModes([{ api: "overall", hypixel: "PIT", formatted: "Pit" }] as const);
export const PIT_MODES = new GameModes([
{ api: "overall" },
{ hypixel: "PIT", formatted: "Pit" },
] as const);

export type PitModes = ExtractGameModes<typeof PIT_MODES>;

Expand Down

0 comments on commit ee6e426

Please sign in to comment.