Skip to content

Commit 1a425fb

Browse files
author
AffanTheBest
committed
place url filter at last
1 parent 5cc2a1f commit 1a425fb

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

bot.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,7 @@ bot.command("track", async (ctx) => {
101101
const message = ctx.message.text.replace("/track ", "");
102102
processUrl(message, ctx);
103103
});
104-
105-
bot.on('::url', async ctx => {
106-
if(ctx.chat.type === "private"){
107-
const message = ctx.message.text;
108-
processUrl(message, ctx);
109-
}
110-
});
111-
104+
112105
bot.command("list", async (ctx) => {
113106
try {
114107
const products = await manageProducts({ userId: ctx.from.id }, "read");
@@ -196,6 +189,13 @@ bot.command("stats", async (ctx) => {
196189
);
197190
});
198191

192+
bot.on('::url', async ctx => {
193+
if(ctx.chat.type === "private"){
194+
const message = ctx.message.text;
195+
processUrl(message, ctx);
196+
}
197+
});
198+
199199
bot.callbackQuery("stopTracking", async (ctx) => {
200200
const tracking_id =
201201
ctx.update?.callback_query?.message?.reply_markup?.inline_keyboard[1][0]?.text?.split(

0 commit comments

Comments
 (0)