update randomstring command

This commit is contained in:
2026-01-22 20:26:33 +03:00
parent 027f5e0adf
commit 0aa2e19237
+6 -2
View File
@@ -1,5 +1,5 @@
import {ChatCommand} from "../base/chat-command"; import {ChatCommand} from "../base/chat-command";
import {getRandomInt, logError, oldSendMessage} from "../util/utils"; import {getRandomInt, logError, replyToMessage} from "../util/utils";
import {Message} from "typescript-telegram-bot-api"; import {Message} from "typescript-telegram-bot-api";
export class RandomString extends ChatCommand { export class RandomString extends ChatCommand {
@@ -22,6 +22,10 @@ export class RandomString extends ChatCommand {
result += characters.charAt(getRandomInt(characters.length)); result += characters.charAt(getRandomInt(characters.length));
} }
await oldSendMessage(msg, result).catch(logError); await replyToMessage({
message: msg,
text: "<blockquote expandable>" + result + "</blockquote>",
parse_mode: "HTML"
}).catch(logError);
} }
} }