Skip to content

Commit

Permalink
add deprecated command messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobk999 committed Aug 19, 2024
1 parent 067bf57 commit eaa5e68
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 4 deletions.
23 changes: 23 additions & 0 deletions apps/discord-bot/src/commands/deprecated/bridge.command.tsx
Original file line number Diff line number Diff line change
@@ -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: "</duels:1140654940658868317>",
newCommandName: `${t("emojis:games.DUELS")} **Duels**`,
mode: "**Bridge**",
}),
};
}
}
23 changes: 23 additions & 0 deletions apps/discord-bot/src/commands/deprecated/dropper.command.tsx
Original file line number Diff line number Diff line change
@@ -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: "</arcade:1140654940273000557>",
newCommandName: `${t("emojis:games.ARCADE")} **Arcade**`,
mode: "**Dropper**",
}),
};
}
}
22 changes: 22 additions & 0 deletions apps/discord-bot/src/commands/deprecated/recentgames.command.tsx
Original file line number Diff line number Diff line change
@@ -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: "</status:1140654940273000550>",
}),
};
}
}
2 changes: 1 addition & 1 deletion assets/private
5 changes: 5 additions & 0 deletions locales/en-US/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@
"premium": "[Premium](<https://statsify.net/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",
Expand Down
4 changes: 4 additions & 0 deletions locales/en-US/emojis.json
Original file line number Diff line number Diff line change
Expand Up @@ -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>",
Expand Down
6 changes: 3 additions & 3 deletions packages/discord/src/command/command.context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit eaa5e68

Please sign in to comment.