{"File":"/root/aadharbot/index.js","LineNumber":67,"LineContent":" console.error(\"Retailer check err:\", e);"} {"File":"/root/aadharbot/index.js","LineNumber":170,"LineContent":" console.error(\"Retailer check err:\", e); }"} {"File":"/root/aadharbot/index.js","LineNumber":311,"LineContent":" console.error(\"Retailer check err:\", e); console.error(\"Redis error:\", e.message); }"} {"File":"/root/aadharbot/index.js","LineNumber":323,"LineContent":" console.error(\"Retailer check err:\", e); return null; }"} {"File":"/root/aadharbot/index.js","LineNumber":399,"LineContent":" console.error(\"Retailer check err:\", e); return null; }"} {"File":"/root/aadharbot/index.js","LineNumber":824,"LineContent":" console.error(\"Retailer check err:\", e); }"} {"File":"/root/aadharbot/index.js","LineNumber":845,"LineContent":" console.error(\"Retailer check err:\", e); }"} {"File":"/root/aadharbot/index.js","LineNumber":889,"LineContent":" console.error(\"Retailer check err:\", e);"} {"File":"/root/aadharbot/index.js","LineNumber":1020,"LineContent":" console.error(\"Retailer check err:\", e); }"} {"File":"/root/aadharbot/index.js","LineNumber":1393,"LineContent":" console.error(\"Retailer check err:\", e);"} {"File":"/root/aadharbot/index.js","LineNumber":1401,"LineContent":" console.error(\"Retailer check err:\", e);"} {"File":"/root/aadharbot/index.js","LineNumber":1414,"LineContent":" console.error(\"Retailer check err:\", e); }"} {"File":"/root/aadharbot/index.js","LineNumber":1520,"LineContent":" console.error(\"Retailer check err:\", e);}"} {"File":"/root/aadharbot/index.js","LineNumber":1762,"LineContent":" console.error(\"Retailer check err:\", e); }"} {"File":"/root/aadharbot/index.js","LineNumber":1772,"LineContent":" console.error(\"Retailer check err:\", e);}"} {"File":"/root/aadharbot/index.js","LineNumber":1903,"LineContent":" console.error(\"Retailer check err:\", e);}"} {"File":"/root/aadharbot/index.js","LineNumber":1920,"LineContent":" console.error(\"Retailer check err:\", e);}"} {"File":"/root/aadharbot/index.js","LineNumber":1972,"LineContent":" console.error(\"Retailer check err:\", e);"} {"File":"/root/aadharbot/index.js","LineNumber":2025,"LineContent":" console.error(\"Retailer check err:\", e);}"} {"File":"/root/aadharbot/index.js","LineNumber":2031,"LineContent":" console.error(\"Retailer check err:\", e);}"} {"File":"/root/aadharbot/index.js","LineNumber":2072,"LineContent":" console.error(\"Retailer check err:\", e);"} {"File":"/root/aadharbot/index.js","LineNumber":2117,"LineContent":" console.error(\"Retailer check err:\", e);}"} {"File":"/root/aadharbot/index.js","LineNumber":2124,"LineContent":" console.error(\"Retailer check err:\", e);}"} {"File":"/root/aadharbot/index.js","LineNumber":2187,"LineContent":" console.error(\"Retailer check err:\", e); }"} {"File":"/root/aadharbot/index.js","LineNumber":2224,"LineContent":" console.error(\"Retailer check err:\", e); }"} {"File":"/root/aadharbot/index.js","LineNumber":2256,"LineContent":"async function isUserRetailer(userId) {"} {"File":"/root/aadharbot/index.js","LineNumber":2262,"LineContent":" return !!(db[userId] \u0026\u0026 db[userId].is_retailer);"} {"File":"/root/aadharbot/index.js","LineNumber":2264,"LineContent":" console.error(\"Retailer check err:\", e);"} {"File":"/root/aadharbot/index.js","LineNumber":2269,"LineContent":" const res = await pool.query('SELECT is_retailer FROM users WHERE telegram_id = $1', [userId]);"} {"File":"/root/aadharbot/index.js","LineNumber":2271,"LineContent":" return !!res.rows[0].is_retailer;"} {"File":"/root/aadharbot/index.js","LineNumber":2275,"LineContent":" console.error(\"Retailer check err:\", e);"} {"File":"/root/aadharbot/index.js","LineNumber":2307,"LineContent":"// Owner command to add a retailer"} {"File":"/root/aadharbot/index.js","LineNumber":2308,"LineContent":"bot.command('addretailer', async (ctx) =\u003e {"} {"File":"/root/aadharbot/index.js","LineNumber":2317,"LineContent":" return ctx.reply(\"💡 **Usage:** `/addretailer \u003ctelegram_id\u003e`\", { parse_mode: 'Markdown' });"} {"File":"/root/aadharbot/index.js","LineNumber":2331,"LineContent":" console.error(\"Retailer check err:\", e); }"} {"File":"/root/aadharbot/index.js","LineNumber":2336,"LineContent":" db[targetUserId].is_retailer = true;"} {"File":"/root/aadharbot/index.js","LineNumber":2340,"LineContent":" `INSERT INTO users (telegram_id, name, credits, is_retailer, created_at, updated_at) VALUES ($1, 'User', 0, true, NOW(), NOW()) "} {"File":"/root/aadharbot/index.js","LineNumber":2342,"LineContent":" DO UPDATE SET is_retailer = true`,"} {"File":"/root/aadharbot/index.js","LineNumber":2346,"LineContent":" return ctx.reply(`✅ User \\`${targetUserId}\\` is now designated as a **Retailer**! They can use \\`/maya\\` command.`, { parse_mode: 'Markdown' });"} {"File":"/root/aadharbot/index.js","LineNumber":2348,"LineContent":" console.error(\"Error adding retailer:\", err.message);"} {"File":"/root/aadharbot/index.js","LineNumber":2349,"LineContent":" ctx.reply(`❌ Error designating retailer: ${err.message}`);"} {"File":"/root/aadharbot/index.js","LineNumber":2353,"LineContent":"// Owner command to remove a retailer"} {"File":"/root/aadharbot/index.js","LineNumber":2354,"LineContent":"bot.command('removeretailer', async (ctx) =\u003e {"} {"File":"/root/aadharbot/index.js","LineNumber":2363,"LineContent":" return ctx.reply(\"💡 **Usage:** `/removeretailer \u003ctelegram_id\u003e`\", { parse_mode: 'Markdown' });"} {"File":"/root/aadharbot/index.js","LineNumber":2377,"LineContent":" console.error(\"Retailer check err:\", e); }"} {"File":"/root/aadharbot/index.js","LineNumber":2380,"LineContent":" db[targetUserId].is_retailer = false;"} {"File":"/root/aadharbot/index.js","LineNumber":2385,"LineContent":" `UPDATE users SET is_retailer = false WHERE telegram_id = $1`,"} {"File":"/root/aadharbot/index.js","LineNumber":2389,"LineContent":" return ctx.reply(`✅ Designated **Retailer** status has been removed from User \\`${targetUserId}\\`.`, { parse_mode: 'Markdown' });"} {"File":"/root/aadharbot/index.js","LineNumber":2391,"LineContent":" console.error(\"Error removing retailer:\", err.message);"} {"File":"/root/aadharbot/index.js","LineNumber":2392,"LineContent":" ctx.reply(`❌ Error removing retailer: ${err.message}`);"} (...74 more results not shown)