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] @@ -21,71 +21,10 @@ const ADMIN_IDS = (process.env.ADMIN_IDS || '8439525687,7530834373').split(',').map(s => s.trim()); -// ── COOL FUNKY & MONOSPACE FONT UTILITIES ────────────────────────────────── -const FONT_SANS_BOLD = { - A: "𝗔", B: "𝗕", C: "𝗖", D: "𝗗", E: "𝗘", F: "𝗙", G: "𝗚", H: "𝗛", I: "𝗜", J: "𝗝", K: "𝗞", L: "𝗟", M: "𝗠", - N: "𝗡", O: "𝗢", P: "𝗣", Q: "𝗤", R: "𝗥", S: "𝗦", T: "𝗧", U: "𝗨", V: "𝗩", W: "𝗪", X: "𝗫", Y: "𝗬", Z: "𝗭", - a: "𝗮", b: "𝗯", c: "𝗰", d: "𝗱", e: "𝗲", f: "𝗳", g: "𝗴", h: "𝗵", i: "𝗶", j: "𝗷", k: "𝗸", l: "𝗹", m: "𝗺", - n: "𝗻", o: "𝗼", p: "𝗽", q: "𝗾", r: "𝗿", s: "𝘀", t: "𝘁", u: "𝘂", v: "𝘃", w: "𝘄", x: "𝘅", y: "𝘆", z: "𝘇", - "0": "𝟬", "1": "𝟭", "2": "𝟮", "3": "𝟯", "4": "𝟰", "5": "𝟱", "6": "𝟲", "7": "𝟳", "8": "𝟴", "9": "𝟵" -}; - -const FONT_MONO = { - A: "𝙰", B: "𝙱", C: "𝙲", D: "𝙳", E: "𝙴", F: "𝙵", G: "𝙶", H: "𝙷", I: "𝙸", J: "𝙹", K: "𝙺", L: "𝙻", M: "𝙼", - N: "𝙽", O: "𝙾", P: "𝙿", Q: "𝚀", R: "𝚁", S: "𝚂", T: "𝚃", U: "𝚄", V: "𝚅", W: "𝚆", X: "𝚇", Y: "𝚈", Z: "𝚉", - a: "𝚊", b: "𝚋", c: "𝚌", d: "𝚍", e: "𝚎", f: "𝚏", g: "𝚐", h: "𝚑", i: "𝚒", j: "𝚓", k: "𝚔", l: "𝚕", m: "𝚖", - n: "𝚗", o: "𝚘", p: "𝚙", q: "𝚚", r: "𝚛", s: "𝚜", t: "𝚝", u: "𝚞", v: "𝚟", w: "𝚠", x: "𝚡", y: "𝚢", z: "𝚣", - "0": "𝟶", "1": "𝟷", "2": "𝟸", "3": "𝟹", "4": "𝟺", "5": "𝟻", "6": "𝟼", "7": "𝟽", "8": "𝟾", "9": "𝟿" -}; - -function toSansBold(str) { - if (!str) return ""; - return String(str).split("").map(c => FONT_SANS_BOLD[c] || c).join(""); -} - -function toMono(str) { - if (!str) return ""; - return String(str).split("").map(c => FONT_MONO[c] || c).join(""); -} - - -function sanitizeError(msg) { - if (!msg || typeof msg !== "string") return "Server is currently busy. Please try again in a moment."; - const lower = msg.toLowerCase(); - if ( - lower.includes("http") || - lower.includes("fetch") || - lower.includes("socket") || - lower.includes("econn") || - lower.includes("etimedout") || - lower.includes("enotfound") || - lower.includes("hang up") || - lower.includes("abort") || - lower.includes("network") || - lower.includes("tathya") || - lower.includes("uidai") || - lower.includes("myaadhaar") || - lower.includes("apikendra") || - lower.includes("gov.in") || - lower.includes(".in") || - lower.includes(".cc") || - lower.includes("500") || - lower.includes("502") || - lower.includes("503") || - lower.includes("504") - ) { - return "Server is currently busy. Please try again in a few moments."; - } - - let clean = msg - .replace(/https?:\/\/[^\s]+/gi, "") - .replace(/[a-zA-Z0-9-]+\.(gov\.in|uidai|myaadhaar|tathya|apikendra|cc|com|org|net)/gi, "") - .replace(/\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/g, "") - .replace(/\s+/g, " ") - .trim(); - - return clean || "Something went wrong. Please check your details and try again."; -} +// ── MODULAR CORE UTILITIES ───────────────────────────────────────────── +const { toSansBold, toMono } = require('./modules/core/fonts'); +const { sanitizeError } = require('./modules/core/sanitizer'); + function checkIsAdmin(userId) { if (!userId) return false; [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.