fix match

This commit is contained in:
2026-01-20 08:39:59 +03:00
parent 950e5c1784
commit d029d53fee
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ export class OllamaPrompt extends ChatCommand {
async execute(msg: Message, match?: RegExpExecArray): Promise<void> { async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
console.log("match", match); console.log("match", match);
return this.executeOllama(msg, match?.[1]); return this.executeOllama(msg, match?.[3]);
} }
async executeOllama(msg: Message, text: string): Promise<void> { async executeOllama(msg: Message, text: string): Promise<void> {
+1 -1
View File
@@ -19,7 +19,7 @@ export class Title extends ChatCommand {
); );
async execute(msg: Message, match?: RegExpExecArray): Promise<void> { async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
const title = (match?.[1] ?? "").trim(); const title = (match?.[3] ?? "").trim();
if (title.length === 0) { if (title.length === 0) {
await oldReplyToMessage(msg, "Не нашёл название...").catch(logError); await oldReplyToMessage(msg, "Не нашёл название...").catch(logError);
return; return;