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
+4 -3
View File
@@ -4,8 +4,9 @@ import {ChatCommand} from "../base/chat-command";
import {chatCommands} from "../index";
import {TelegramError} from "typescript-telegram-bot-api/dist/errors";
export class Help implements ChatCommand {
regexp = /^\/(h|help)/i;
export class Help extends ChatCommand {
command = ["h", "help"];
title = "/help";
description = "Show list of commands";
@@ -16,7 +17,7 @@ export class Help implements ChatCommand {
text += `${chatCommandToString(c)}\n`;
});
await sendMessage({chatId: msg.from.id, text: text})
await sendMessage({chat_id: msg.from.id, text: text})
.then(async () => {
if (msg.chat.type !== "private") {
await sendMessage({message: msg, text: "Отправил команды в ЛС 😎"}).catch(logError);