Created At: 2026-11-18T05:04:05Z Completed At: 2026-11-18T05:04:06Z Command exited with code 0. Command output: COUNT(*) FILTER (WHERE (started_at >= NOW() - INTERVAL '7 days' OR created_at >= NOW() - INTERVAL '7 days')) as subs_7d, COUNT(*) FILTER (WHERE (started_at >= NOW() - INTERVAL '30 days' OR created_at >= NOW() - INTERVAL '30 days')) as subs_30d, COUNT(*) FILTER (WHERE (started_at >= NOW() - INTERVAL '365 days' OR created_at >= NOW() - INTERVAL '365 days')) as subs_365d, COUNT(*) as subs_total FROM user_subscriptions; `) ]); const u = usersRes.rows[0] || {}; const p = payRes.rows[0] || {}; const s = subsRes.rows[0] || {}; return { users_today: parseInt(u.users_today || 0, 10), users_7d: parseInt(u.users_7d || 0, 10), users_30d: parseInt(u.users_30d || 0, 10), users_365d: parseInt(u.users_365d || 0, 10), users_total: parseInt(u.users_total || 0, 10), pay_cnt_today: parseInt(p.pay_cnt_today || 0, 10), pay_amt_today: Math.round(Number(p.pay_amt_today || 0)), pay_cnt_7d: parseInt(p.pay_cnt_7d || 0, 10), pay_amt_7d: Math.round(Number(p.pay_amt_7d || 0)), pay_cnt_30d: parseInt(p.pay_cnt_30d || 0, 10), pay_amt_30d: Math.round(Number(p.pay_amt_30d || 0)), pay_cnt_365d: parseInt(p.pay_cnt_365d || 0, 10), pay_amt_365d: Math.round(Number(p.pay_amt_365d || 0)), pay_cnt_total: parseInt(p.pay_cnt_total || 0, 10), pay_amt_total: Math.round(Number(p.pay_amt_total || 0)), subs_today: parseInt(s.subs_today || 0, 10), subs_7d: parseInt(s.subs_7d || 0, 10), subs_30d: parseInt(s.subs_30d || 0, 10), subs_365d: parseInt(s.subs_365d || 0, 10), subs_total: parseInt(s.subs_total || 0, 10) }; } catch (e) { console.error('getOwnerStats error:', e.message); return { users_today: 0, users_7d: 0, users_30d: 0, users_365d: 0, users_total: 0, pay_cnt_today: 0, pay_amt_today: 0, pay_cnt_7d: 0, pay_amt_7d: 0, pay_cnt_30d: 0, pay_amt_30d: 0, pay_cnt_365d: 0, pay_amt_365d: 0, subs_today: 0, subs_7d: 0, subs_30d: 0, subs_365d: 0, subs_total: 0 }; } } async function getOwnerPanelMessage(isFreeModeActive, pool) { const freeModeStatus = isFreeModeActive ? '🟢 ACTIVE (Unlimited Mode)' : '🔴 INACTIVE (Credit System Active)'; const stats = await getOwnerStats(pool); return `╭━━━〔 👑 OWNER MASTER HUB 👑 〕━━━╮\n` + `┃ \n` + `┃ 🎁 Free Mode Status : ${freeModeStatus}\n` + `┃ \n` + `┃ 📊 REAL-TIME LIVE ANALYTICS:\n` + `┃ \n` + `┃ 📅 Aaj Ka Karobar (Today):\n` + `┃ ┣ 👥 New Users : +${stats.users_today}\n` +