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:
@@ -1,14 +1,14 @@
|
||||
import {ChatCommand} from "../base/chat-command";
|
||||
import {Message} from "typescript-telegram-bot-api";
|
||||
import {logError, randomValue, replyToMessage} from "../util/utils";
|
||||
import {logError, randomValue, oldReplyToMessage} from "../util/utils";
|
||||
import {testAnswers} from "../db/database";
|
||||
|
||||
export class Test implements ChatCommand {
|
||||
export class Test extends ChatCommand {
|
||||
regexp = /^(test|тест|еуые|ntcn|инноке(нтий|ш|нтич))/i;
|
||||
title = "тест";
|
||||
description = "System functionality check";
|
||||
|
||||
async execute(msg: Message) {
|
||||
await replyToMessage(msg, randomValue(testAnswers) || "а").catch(logError);
|
||||
await oldReplyToMessage(msg, randomValue(testAnswers) || "а").catch(logError);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user