From 3fc3847149aa327bb9d2cf66aa8e7722b93f9079 Mon Sep 17 00:00:00 2001 From: Jeel <33726155+JeelPatel231@users.noreply.github.com> Date: Fri, 14 Apr 2023 19:38:23 +0530 Subject: [PATCH] add a "." check for considering prompts --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index b0c9f71..1260c75 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,8 +23,8 @@ async function main() { const reply = ctx.message.reply_to_message; const message = ctx.message; - if ("text" in reply && "text" in message) { - ai(ctx, message.text); + if ("text" in reply && "text" in message && message.text.startsWith('.')) { + ai(ctx, message.text.splice(1).trim()); } });