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] @@ -20,8 +20,6 @@ const { Pool } = require('pg'); require('dotenv').config(); -const ADMIN_IDS = (process.env.ADMIN_IDS || '8439525687,7530834373').split(',').map(s => s.trim()); - // ── MODULAR CORE UTILITIES ───────────────────────────────────────────── const { toSansBold, toMono, CREDIT_EMOJI } = require('./modules/core/fonts'); const { sanitizeError } = require('./modules/core/sanitizer'); @@ -28,8 +28,25 @@ - -function checkIsAdmin(userId) { - if (!userId) return false; - return ADMIN_IDS.includes(String(userId)); -} +// ── MODULAR ADMIN SYSTEM ─────────────────────────────────────────────── +const { + ADMIN_IDS, + checkIsAdmin, + isUserAdmin: isUserAdminRaw, + assignPlanToUser: assignPlanToUserRaw, + parsePlanDurationDays, + initAdminModule, + handleAdminText, + startDailyResetBroadcast: startDailyResetBroadcastRaw, + freeModeState, + saveFreeModeState, + isFreeModeActive, + parseDuration, + applyFreeMode, + triggerFreeModeBroadcast: triggerFreeModeBroadcastRaw +} = require('./admin'); + +const isUserAdmin = (userId) => isUserAdminRaw(userId, pool); +const assignPlanToUser = (targetUserId, planDuration, paymentMethod, amount) => assignPlanToUserRaw(targetUserId, planDuration, paymentMethod, amount, pool, invalidateUserCache); +const startDailyResetBroadcast = (manualTriggered = false) => startDailyResetBroadcastRaw(bot, pool, manualTriggered, redisClient); +const triggerFreeModeBroadcast = (durationText) => triggerFreeModeBroadcastRaw(bot, pool, durationText); // HYBRID CACHE (Level 1: LRU In-Memory, Level 2: Redis) const LRUCache = require('lru-cache'); [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.