diff --git a/apps/discord-bot/src/commands/deprecated/bridge.command.tsx b/apps/discord-bot/src/commands/deprecated/bridge.command.tsx new file mode 100644 index 000000000..7e6904624 --- /dev/null +++ b/apps/discord-bot/src/commands/deprecated/bridge.command.tsx @@ -0,0 +1,23 @@ +/** + * Copyright (c) Statsify + * + * This source code is licensed under the GNU GPL v3 license found in the + * LICENSE file in the root directory of this source tree. + * https://github.com/Statsify/statsify/blob/main/LICENSE + */ + +import { Command, type IMessage } from "@statsify/discord"; + +@Command({ description: (t) => t("deprecated.command-description", { newCommandName: "duels" }) }) +export class BridgeCommand { + public run(): IMessage { + return { + content: (t) => t("deprecated.merged-mode", { + oldCommandName: "`/bridge`", + newCommand: "", + newCommandName: `${t("emojis:games.DUELS")} **Duels**`, + mode: "**Bridge**", + }), + }; + } +} diff --git a/apps/discord-bot/src/commands/historical/daily.command.tsx b/apps/discord-bot/src/commands/deprecated/daily.command.tsx similarity index 100% rename from apps/discord-bot/src/commands/historical/daily.command.tsx rename to apps/discord-bot/src/commands/deprecated/daily.command.tsx diff --git a/apps/discord-bot/src/commands/deprecated/dropper.command.tsx b/apps/discord-bot/src/commands/deprecated/dropper.command.tsx new file mode 100644 index 000000000..eafbcf646 --- /dev/null +++ b/apps/discord-bot/src/commands/deprecated/dropper.command.tsx @@ -0,0 +1,23 @@ +/** + * Copyright (c) Statsify + * + * This source code is licensed under the GNU GPL v3 license found in the + * LICENSE file in the root directory of this source tree. + * https://github.com/Statsify/statsify/blob/main/LICENSE + */ + +import { Command, type IMessage } from "@statsify/discord"; + +@Command({ description: (t) => t("deprecated.command-description", { newCommandName: "arcade" }) }) +export class DropperCommand { + public run(): IMessage { + return { + content: (t) => t("deprecated.merged-mode", { + oldCommandName: "`/dropper`", + newCommand: "", + newCommandName: `${t("emojis:games.ARCADE")} **Arcade**`, + mode: "**Dropper**", + }), + }; + } +} diff --git a/apps/discord-bot/src/commands/historical/historical.base.tsx b/apps/discord-bot/src/commands/deprecated/historical.base.tsx similarity index 100% rename from apps/discord-bot/src/commands/historical/historical.base.tsx rename to apps/discord-bot/src/commands/deprecated/historical.base.tsx diff --git a/apps/discord-bot/src/commands/historical/lastDay.command.tsx b/apps/discord-bot/src/commands/deprecated/lastDay.command.tsx similarity index 100% rename from apps/discord-bot/src/commands/historical/lastDay.command.tsx rename to apps/discord-bot/src/commands/deprecated/lastDay.command.tsx diff --git a/apps/discord-bot/src/commands/historical/lastMonth.command.tsx b/apps/discord-bot/src/commands/deprecated/lastMonth.command.tsx similarity index 100% rename from apps/discord-bot/src/commands/historical/lastMonth.command.tsx rename to apps/discord-bot/src/commands/deprecated/lastMonth.command.tsx diff --git a/apps/discord-bot/src/commands/historical/lastWeek.command.tsx b/apps/discord-bot/src/commands/deprecated/lastWeek.command.tsx similarity index 100% rename from apps/discord-bot/src/commands/historical/lastWeek.command.tsx rename to apps/discord-bot/src/commands/deprecated/lastWeek.command.tsx diff --git a/apps/discord-bot/src/commands/historical/monthly.command.tsx b/apps/discord-bot/src/commands/deprecated/monthly.command.tsx similarity index 100% rename from apps/discord-bot/src/commands/historical/monthly.command.tsx rename to apps/discord-bot/src/commands/deprecated/monthly.command.tsx diff --git a/apps/discord-bot/src/commands/deprecated/recentgames.command.tsx b/apps/discord-bot/src/commands/deprecated/recentgames.command.tsx new file mode 100644 index 000000000..60437d4d0 --- /dev/null +++ b/apps/discord-bot/src/commands/deprecated/recentgames.command.tsx @@ -0,0 +1,22 @@ +/** + * Copyright (c) Statsify + * + * This source code is licensed under the GNU GPL v3 license found in the + * LICENSE file in the root directory of this source tree. + * https://github.com/Statsify/statsify/blob/main/LICENSE + */ + +import { Command, type IMessage } from "@statsify/discord"; + +@Command({ description: (t) => t("deprecated.command-description", { command: "status" }) }) +export class RecentGamesCommand { + public run(): IMessage { + return { + content: (t) => t("deprecated.merged-direct", { + oldCommandName: "`/recentgames`", + newCommandName: `${t("emojis:icons.status")} **Status**`, + newCommand: "", + }), + }; + } +} diff --git a/apps/discord-bot/src/commands/historical/weekly.command.tsx b/apps/discord-bot/src/commands/deprecated/weekly.command.tsx similarity index 100% rename from apps/discord-bot/src/commands/historical/weekly.command.tsx rename to apps/discord-bot/src/commands/deprecated/weekly.command.tsx diff --git a/apps/discord-bot/src/commands/historical/yesterday.command.tsx b/apps/discord-bot/src/commands/deprecated/yesterday.command.tsx similarity index 100% rename from apps/discord-bot/src/commands/historical/yesterday.command.tsx rename to apps/discord-bot/src/commands/deprecated/yesterday.command.tsx diff --git a/assets/private b/assets/private index 2e5630f28..f8b5157d1 160000 --- a/assets/private +++ b/assets/private @@ -1 +1 @@ -Subproject commit 2e5630f2865b933d2d83d0d64ceb1cecd1f7b05b +Subproject commit f8b5157d157b79b51fd1b3e3a9f6c97ed6f4856e diff --git a/locales/en-US/default.json b/locales/en-US/default.json index 65e025f72..f921c5bc4 100644 --- a/locales/en-US/default.json +++ b/locales/en-US/default.json @@ -553,6 +553,11 @@ "premium": "[Premium]()", "website": "[Website](https://statsify.net/)" }, + "deprecated": { + "merged-dropdown": "$t(emojis:icons.warning) {{oldCommandName}} has been merged into the {{newCommandName}} command. Please run {{newCommand}} and select {{mode}} in the dropdown.", + "merged-direct": "$t(emojis:icons.warning) {{oldCommandName}} has been removed in favor of {{newCommandName}}. Please run {{newCommand}} instead.", + "command-description": "This command has been removed in favor of {{newCommandName}}." + }, "stats": { "achievementPoints": "Achievement Points", "adrenaline": "Adrenaline", diff --git a/locales/en-US/emojis.json b/locales/en-US/emojis.json index aa45de9b1..e5a038284 100644 --- a/locales/en-US/emojis.json +++ b/locales/en-US/emojis.json @@ -32,6 +32,10 @@ "forward": "<:forward:995761547492204684>", "backward": "<:backward:995761554580578394>", "text-select": "<:textselect:1141485815046885416>", + "icons": { + "warning": "<:warning:1274900962468696084>", + "status": "<:status:1274907414797353043>" + }, "ranks": { "GM": "<:i0:973758897343045644><:i1:973758898601353216>", "MVP": "<:d0:973758899301802015><:d1:973758900341973042><:d2:973758901000503348>", diff --git a/packages/discord/src/command/command.context.ts b/packages/discord/src/command/command.context.ts index 5067231b3..645833863 100644 --- a/packages/discord/src/command/command.context.ts +++ b/packages/discord/src/command/command.context.ts @@ -7,13 +7,13 @@ */ import { - APIApplicationCommandInteractionDataBasicOption, + type APIApplicationCommandInteractionDataBasicOption, ApplicationCommandOptionType, } from "discord-api-types/v10"; -import { AbstractCommandListener } from "./abstract-command.listener.js"; -import { IMessage, LocalizeFunction, Message } from "#messages"; import { User } from "@statsify/schemas"; import { noop } from "@statsify/util"; +import type { AbstractCommandListener } from "./abstract-command.listener.js"; +import type { IMessage, LocalizeFunction, Message } from "#messages"; import type { Interaction } from "#interaction"; export class CommandContext {