fix match
This commit is contained in:
@@ -17,7 +17,7 @@ export class OllamaPrompt extends ChatCommand {
|
||||
|
||||
async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
|
||||
console.log("match", match);
|
||||
return this.executeOllama(msg, match?.[1]);
|
||||
return this.executeOllama(msg, match?.[3]);
|
||||
}
|
||||
|
||||
async executeOllama(msg: Message, text: string): Promise<void> {
|
||||
|
||||
@@ -19,7 +19,7 @@ export class Title extends ChatCommand {
|
||||
);
|
||||
|
||||
async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
|
||||
const title = (match?.[1] ?? "").trim();
|
||||
const title = (match?.[3] ?? "").trim();
|
||||
if (title.length === 0) {
|
||||
await oldReplyToMessage(msg, "Не нашёл название...").catch(logError);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user