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,6 +1,6 @@
|
||||
import {ChatCommand} from "../base/chat-command";
|
||||
import {Message} from "typescript-telegram-bot-api";
|
||||
import {logError, replyToMessage} from "../util/utils";
|
||||
import {logError, oldReplyToMessage} from "../util/utils";
|
||||
|
||||
const EN =
|
||||
"`qwertyuiop[]asdfghjkl;'zxcvbnm,./" +
|
||||
@@ -98,7 +98,6 @@ export function fixLayoutAuto(
|
||||
}
|
||||
|
||||
export class Transliteration extends ChatCommand {
|
||||
regexp = /^\/tr/i;
|
||||
title = "/tr [text or reply]";
|
||||
description = "Transliteration EN <--> RU";
|
||||
|
||||
@@ -120,6 +119,6 @@ export class Transliteration extends ChatCommand {
|
||||
|
||||
const newText = fixLayoutAuto(text, toRuLayout, toEnLayout);
|
||||
|
||||
await replyToMessage(msg, newText).catch(logError);
|
||||
await oldReplyToMessage(msg, newText).catch(logError);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user