// code from goatstore // api: https://store.agi.bd const fs = require("fs-extra"); const path = __dirname + "/cache/autoseen.json"; // 🔒 AUTHOR LOCK const LOCKED_AUTHOR = "FARHAN-KHAN"; // āϝāĻĻāĻŋ āĻĢāĻžāχāϞ āύāĻž āĻĨāĻžāϕ⧇, āĻŦāĻžāύāĻžāύ⧋ āĻšāĻŦ⧇ if (!fs.existsSync(path)) { fs.writeFileSync(path, JSON.stringify({ status: true }, null, 2)); } module.exports = { config: { name: "autoseen", version: "2.0", author: LOCKED_AUTHOR, countDown: 0, role: 0, shortDescription: "āĻ¸ā§āĻŦāϝāĻŧāĻ‚āĻ•ā§āϰāĻŋāϝāĻŧāĻ­āĻžāĻŦ⧇ seen āϏāĻŋāĻ¸ā§āĻŸā§‡āĻŽ", longDescription: "āĻŦāϟ āĻ¸ā§āĻŦāϝāĻŧāĻ‚āĻ•ā§āϰāĻŋāϝāĻŧāĻ­āĻžāĻŦ⧇ āϏāĻ•āϞ āύāϤ⧁āύ āĻŽā§‡āϏ⧇āϜ seen āĻ•āϰāĻŦ⧇āĨ¤", category: "system", guide: { en: "{pn} on/off", }, }, onStart: async function ({ message, args }) { // 🔒 AUTHOR CHECK (LOCK SYSTEM) if (module.exports.config.author !== LOCKED_AUTHOR) { console.log("đŸšĢ FILE LOCKED: Author changed!"); return; } const data = JSON.parse(fs.readFileSync(path)); if (!args[0]) { return message.reply( `📄 Autoseen āĻŦāĻ°ā§āϤāĻŽāĻžāύ āĻ…āĻŦāĻ¸ā§āĻĨāĻž: ${data.status ? "✅ āϚāĻžāϞ⧁" : "❌ āĻŦāĻ¨ā§āϧ"}` ); } if (args[0].toLowerCase() === "on") { data.status = true; fs.writeFileSync(path, JSON.stringify(data, null, 2)); return message.reply("✅ Autoseen āĻāĻ–āύ āĻĨ⧇āϕ⧇ āϚāĻžāϞ⧁!"); } else if (args[0].toLowerCase() === "off") { data.status = false; fs.writeFileSync(path, JSON.stringify(data, null, 2)); return message.reply("❌ Autoseen āĻāĻ–āύ āĻŦāĻ¨ā§āϧ!"); } else { return message.reply("âš ī¸ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻ•āϰ⧁āύ: autoseen on / off"); } }, onChat: async function ({ event, api }) { try { // 🔒 AUTHOR CHECK (CHAT LEVEL SAFETY) if (module.exports.config.author !== LOCKED_AUTHOR) { console.log("đŸšĢ FILE LOCKED: Author changed!"); return; } const data = JSON.parse(fs.readFileSync(path)); if (data.status === true) { api.markAsReadAll(); } } catch (e) { console.error(e); } }, };