add a "." check for considering prompts

This commit is contained in:
Jeel 2023-04-14 19:38:23 +05:30 committed by GitHub
parent 136b0fc5c9
commit 3fc3847149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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());
}
});