Skip to content

Commit 5cc2a1f

Browse files
author
AffanTheBest
committed
Process only if sent in private chat
1 parent 0ac490f commit 5cc2a1f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bot.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,10 @@ bot.command("track", async (ctx) => {
103103
});
104104

105105
bot.on('::url', async ctx => {
106-
const message = ctx.message.text;
107-
processUrl(message, ctx);
106+
if(ctx.chat.type === "private"){
107+
const message = ctx.message.text;
108+
processUrl(message, ctx);
109+
}
108110
});
109111

110112
bot.command("list", async (ctx) => {

0 commit comments

Comments
 (0)