Skip to content

Commit 77fde32

Browse files
author
AffanTheBest
committed
back to 3 hrs
1 parent eec34e1 commit 77fde32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bot.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const track = async() => {
123123
await Promise.all(products.result.map(async product => {
124124
const details = await getProductDetails(product.link, product.merchant);
125125
// console.log(details);
126-
if(details.price == product.price){
126+
if(details.price !== product.price){
127127
await manageProducts({tracking_id: product.tracking_id, userId: product.userId, merchant: product.merchant, title: details.title, link: product.link, initPrice: product.price, price: details.price}, 'update');
128128
bot.api.sendMessage(product.userId, `[ ](${details.image})*Price has been ${product.price > details.price ? 'decreased' : 'increased'} by ${Math.abs(product.price - details.price)}*. \n\n*${details.title}*\n\nCurrent Price: *${details.price}*\nLink: [${product.merchant}](${details.link})\n\nTo stop tracking send ${'`/stop `'+ product.tracking_id}`,
129129
{parse_mode: "Markdown", reply_markup: {inline_keyboard: [
@@ -134,5 +134,5 @@ const track = async() => {
134134
}
135135
}));
136136
}
137-
setInterval(track, 1000 * 60); //Track every 3 hrs
137+
setInterval(track, 300000); //Track every 3 hrs
138138
bot.start()

0 commit comments

Comments
 (0)