const fs = require("fs-extra"); const request = require("request"); const path = require("path"); module.exports = { config: { name: "owner2", version: "1.3.0", author: "亗•𝘔𝘈𝘔𝘜𝘕✿᭄+ edit by Milon", role: 0, shortDescription: "Owner information with image", category: "Information", guide: { en: "owner" } }, onStart: async function ({ api, event }) { const ownerText = `╭─ 👑 Oᴡɴᴇʀ Iɴғᴏ 👑 ─╮ │ 👤 Nᴀᴍᴇ : MD MILON SARKAR │🧸 Nɪᴄᴋ : Milon │ 🎂 Aɢᴇ : 23+ │ 💘 Rᴇʟᴀᴛɪᴏɴ : Pure Sɪɴɢʟᴇ │ 🎓 Pʀᴏғᴇssɪᴏɴ : Job (private company) │ 📚 Eᴅᴜᴄᴀᴛɪᴏɴ : Dakhil (ssc2020) │ 🏡 Lᴏᴄᴀᴛɪᴏɴ : Kurigram, Bangladesh ├─ 🔗 Cᴏɴᴛᴀᴄᴛ ─╮ │ 📘 Facebook : https://www.facebook.com/share/1CNLskKAtw/ │ 💬 Messenger: m.me/100081225144815 │ 📞 WhatsApp : wa.me/016*****314 ╰────────────────╯`; const cacheDir = path.join(__dirname, "cache"); const imgPath = path.join(cacheDir, "owner.jpg"); if (!fs.existsSync(cacheDir)) fs.mkdirSync(cacheDir); const imgLink = "https://i.imgur.com/O9mM8gZ.jpeg"; const send = () => { api.sendMessage( { body: ownerText, attachment: fs.createReadStream(imgPath) }, event.threadID, () => fs.unlinkSync(imgPath), event.messageID ); }; request(encodeURI(imgLink)) .pipe(fs.createWriteStream(imgPath)) .on("close", send); } };