commands: localize generic bot commands

This commit is contained in:
2026-05-10 22:53:32 +03:00
parent 3d14e3c0d5
commit 94d695e008
33 changed files with 341 additions and 299 deletions
+6 -5
View File
@@ -3,14 +3,15 @@ import {Message} from "typescript-telegram-bot-api";
import {errorPlaceholder, logError, oldSendMessage} from "../util/utils";
import {Requirements} from "../base/requirements";
import {Requirement} from "../base/requirement";
import {Environment} from "../common/environment";
export class Ae extends Command {
argsMode = "required" as const;
command = ["ae"];
title = "/ae";
description = "evaluation";
title = Environment.commandTitles.ae;
description = Environment.commandDescriptions.ae;
requirements = Requirements.Build(Requirement.BOT_CREATOR);
@@ -24,7 +25,7 @@ export class Ae extends Command {
const text = e.message.toString();
if (text.includes("is not defined")) {
await oldSendMessage(msg, "variable is not defined").catch(logError);
await oldSendMessage(msg, Environment.variableNotDefinedText).catch(logError);
return;
}
@@ -46,7 +47,7 @@ export class Ae extends Command {
const text = e.message.toString();
if (text.includes("is not defined")) {
return "Variable not defined";
return Environment.evaluationVariableNotDefinedText;
}
logError(`${text}
@@ -55,4 +56,4 @@ export class Ae extends Command {
return text;
}
}
}
}