update regex matching - now bot responds only for base commands (like /ping) and with mention (like /ping@panfilovi4_bot) and ignores command if it mentions other bot;

Add ability to see, change and list gemini, mistral and ollama models
This commit is contained in:
2026-01-20 08:31:05 +03:00
parent c31345a3eb
commit 32baaebb93
52 changed files with 605 additions and 231 deletions
+2 -3
View File
@@ -1,14 +1,13 @@
import {ChatCommand} from "../base/chat-command";
import {Message} from "typescript-telegram-bot-api";
import {getRangedRandomInt, logError, replyToMessage} from "../util/utils";
import {getRangedRandomInt, logError, oldReplyToMessage} from "../util/utils";
export class Coin extends ChatCommand {
regexp = /^\/coin$/i;
title = "/coin";
description = "Heads or tails";
async execute(msg: Message): Promise<void> {
const random = getRangedRandomInt(0, 2);
const headsOrTails = random === 1 ? "Выпал *Орёл* 🪙" : "Выпала *Решка* 🪙";
await replyToMessage(msg, headsOrTails, "Markdown").catch(logError); }
await oldReplyToMessage(msg, headsOrTails, "Markdown").catch(logError); }
}