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]
@@ -3815,7 +3815,7 @@
const resetMsg = `๐ DAILY FREE SEARCH RESET / เคกเฅเคฒเฅ เคซเฅเคฐเฅ เคธเคฐเฅเค เคฐเฅเคธเฅเค ๐\n` +
`โโโโโโโโโโโโโโโโโโโโโโโโโโ\n` +
- `Aapke account me aaj ka 1 Free Aadhaar Search (120 Credits) credit kar diya gaya hai! Abhi search karein.\n\n` +
+ `Aapke account me aaj ka 1 Free Aadhaar Search (1 Credit) credit kar diya gaya hai! Abhi search karein.\n\n` +
`(Your daily free searches have been credited! Start searching now.)\n` +
`โโโโโโโโโโโโโโโโโโโโโโโโโโ\n` +
``;
@@ -3879,8 +3879,8 @@
let db = JSON.parse(fs.readFileSync('db.json', 'utf8'));
let updated = false;
for (const userId in db) {
- if (db[userId] && (!db[userId].plan_type || db[userId].plan_type === 'credits') && (db[userId].credits || 0) < 120) {
- db[userId].credits = 120;
+ if (db[userId] && (!db[userId].plan_type || db[userId].plan_type === 'credits') && (db[userId].credits || 0) < 1) {
+ db[userId].credits = 1;
updated = true;
}
}
@@ -3890,9 +3890,9 @@
} else {
await pool.query(
`UPDATE users
- SET credits = 120
+ SET credits = 1
WHERE (plan_type IS NULL OR plan_type = 'credits')
- AND credits < 120`
+ AND credits < 1`
);
}
console.log("[DAILY RESET] Midnight credit reset completed successfully.");
[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.