diff --git a/src/commands/ollama-prompt.ts b/src/commands/ollama-prompt.ts index 071faea..5f23b79 100644 --- a/src/commands/ollama-prompt.ts +++ b/src/commands/ollama-prompt.ts @@ -17,7 +17,7 @@ export class OllamaPrompt extends ChatCommand { async execute(msg: Message, match?: RegExpExecArray): Promise { console.log("match", match); - return this.executeOllama(msg, match?.[1]); + return this.executeOllama(msg, match?.[3]); } async executeOllama(msg: Message, text: string): Promise { diff --git a/src/commands/title.ts b/src/commands/title.ts index d7c0577..15e320c 100644 --- a/src/commands/title.ts +++ b/src/commands/title.ts @@ -19,7 +19,7 @@ export class Title extends ChatCommand { ); async execute(msg: Message, match?: RegExpExecArray): Promise { - const title = (match?.[1] ?? "").trim(); + const title = (match?.[3] ?? "").trim(); if (title.length === 0) { await oldReplyToMessage(msg, "Не нашёл название...").catch(logError); return;