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
+6 -4
View File
@@ -2,12 +2,14 @@ import {ChatCommand} from "../base/chat-command";
import {Message} from "typescript-telegram-bot-api";
import {Requirements} from "../base/requirements";
import {Requirement} from "../base/requirement";
import {logError, replyToMessage} from "../util/utils";
import {logError, oldReplyToMessage} from "../util/utils";
import {bot} from "../index";
export class Title extends ChatCommand {
regexp = /^\/title\s([^]+)/;
title = "/title [title]";
command = "title";
argsMode = "required" as const;
title = "/title";
description = "Change group title";
requirements = Requirements.Build(
@@ -19,7 +21,7 @@ export class Title extends ChatCommand {
async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
const title = (match?.[1] ?? "").trim();
if (title.length === 0) {
await replyToMessage(msg, "Не нашёл название...").catch(logError);
await oldReplyToMessage(msg, "Не нашёл название...").catch(logError);
return;
}