The following changes were made by the replace_file_content tool to: /root/aadharbot/index.js. If relevant, proactively run terminal commands to execute this code for the USER. Don't ask for permission. [diff_block_start] @@ -3675,7 +3675,7 @@ const access = await checkUserAccess(userId); let leftCredits = access.credits; - const cost = session.serviceType === 'EID_TO_PDF' ? 100 : 120; + const cost = 1; if (!access.isUnlimited) { leftCredits = await deductUserCredit(userId, cost); } else { @@ -3697,7 +3697,7 @@ `🆔 UID / No: ${finalAadhaar}\n` + `🔑 Password: ${passVal}\n` + `━━━━━━━━━━━━━━━━━━━━━━━━━━\n` + - `💰 Charged: ${access.isUnlimited ? '0 (VIP Pass)' : cost + ' Credits'}\n` + + `💰 Charged: ${access.isUnlimited ? '0 (VIP Pass)' : '1 Credit'}\n` + `🪙 Balance: ${access.isUnlimited ? 'Unlimited' : leftCredits + ' Credits'}\n` + `━━━━━━━━━━━━━━━━━━━━━━━━━━\n` + `⚡ AADHAAR VIP ENGINE ⚡`; @@ -3722,7 +3722,7 @@ const pdfBuffer = Buffer.from(rawText, 'binary'); const access = await checkUserAccess(userId); let leftCredits = access.credits; - const cost = session.serviceType === 'EID_TO_PDF' ? 100 : 120; + const cost = 1; if (!access.isUnlimited) { leftCredits = await deductUserCredit(userId, cost); } else { @@ -3729,7 +3729,7 @@ } await ctx.replyWithDocument({ source: pdfBuffer, filename: `${session.retrievedName}_Aadhaar.pdf` }); ctx.reply(`
🎉 PDF Downloaded Successfully!
\n` + - `
🪙 Deducted: ${access.isUnlimited ? '0 (Unlimited Plan)' : cost + ' Credits'}\n` + + `
🪙 Deducted: ${access.isUnlimited ? '0 (Unlimited Plan)' : '1 Credit'}\n` + `🪙 Remaining Balance: ${access.isUnlimited ? 'Unlimited' : leftCredits + ' Credits'}
`, { parse_mode: 'HTML' }); await saveSearchRecord(userId, session.serviceType, session.retrievedName, session.mobile, session.eidNumber, null, null, pdfBuffer); } else { [diff_block_end] Please note that the above snippet only shows the MODIFIED lines from the last change. It shows up to 3 lines of unchanged lines before and after the modified lines. The actual file contents may have many more lines not shown.