commands: localize generic bot commands
This commit is contained in:
+6
-5
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user