const fs = require("fs-extra"); const request = require("request"); const path = require("path"); module.exports = { config: { name: "owner", version: "1.3.0", author: "ajmaul", role: 0, shortDescription: "Owner information with image", category: "Information", guide: { en: "owner" } }, onStart: async function ({ api, event }) { const ownerText = `╭─ 👑 Oᴡɴᴇʀ Iɴғᴏ 👑 ─╮ │ 👤 Nᴀᴍᴇ : Ajmaul islam │ 🧸 Nɪᴄᴋ : Ajmaul │ 🎂 Aɢᴇ : 18+ │ 💘 Rᴇʟᴀᴛɪᴏɴ : Sɪɴɢʟᴇ │ 🎓 Pʀᴏғᴇssɪᴏɴ : Sᴛᴜᴅᴇɴᴛ │ 📚 Eᴅᴜᴄᴀᴛɪᴏɴ : secret │ 🏡 Lᴏᴄᴀᴛɪᴏɴ : joypurhat ├─ 🔗 Cᴏɴᴛᴀᴄᴛ ─╮ │ 📘 Facebook : https://www.facebook.com/profile.php?id=61594223392369 ╰────────────────╯`; 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/myTgiuq.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); } };