const fs = require("fs-extra"); const request = require("request"); const path = require("path"); module.exports = { config: { name: "owner", version: "1.3.0", author: "๐“†ฉ๐‘…๐‘œ๐’ท๐’พ๐“ƒ๐“†ช ๐’œ๐“๐’พ", role: 0, shortDescription: "Owner information with image", category: "Information", guide: { en: "owner" } }, onStart: async function ({ api, event }) { const ownerText = `โ•ญโ”€ ๐Ÿ‘‘ Oแดกษดแด‡ส€ Iษดา“แด ๐Ÿ‘‘ โ”€โ•ฎ โ”‚ ๐Ÿ‘ค Nแด€แดแด‡ : ๐“†ฉ๐‘…๐‘œ๐’ท๐’พ๐“ƒ๐“†ช ๐’œ๐“๐’พ โ”‚ ๐Ÿงธ Nษชแด„แด‹ : ๐“†ฉ๐‘…๐‘œ๐’ท๐’พ๐“ƒ๐“†ช โ”‚ ๐ŸŽ‚ Aษขแด‡ : 18+ โ”‚ ๐Ÿ’˜ Rแด‡สŸแด€แด›ษชแดษด : SษชษดษขสŸแด‡ โ”‚ ๐ŸŽ“ Pส€แดา“แด‡ssษชแดษด : Sแด›แดœแด…แด‡ษดแด› โ”‚ ๐Ÿ“š Eแด…แดœแด„แด€แด›ษชแดษด : Iษดแด›แด‡ส€ 2ษดแด… Yแด‡แด€ส€ โ”‚ ๐Ÿก Lแดแด„แด€แด›ษชแดษด : Bangladesh โ”œโ”€ ๐Ÿ”— Cแดษดแด›แด€แด„แด› โ”€โ•ฎ โ”‚ ๐Ÿ“˜ Facebook : fb.com/100091520325159 โ”‚ ๐Ÿ’ฌ Messenger : m.me/100091520325159 โ”‚ ๐Ÿ“ž WhatsApp : wa.me/ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ`; 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/1G4ZhU7.jpeg"; const send = () => { api.sendMessage( { body: ownerText, attachment: fs.createReadStream(imgPath) }, event.threadID, () => fs.unlinkSync(imgPath), event.messageID ); }; try { request(encodeURI(imgLink)) .pipe(fs.createWriteStream(imgPath)) .on("close", send) .on("error", () => { api.sendMessage(ownerText, event.threadID, event.messageID); }); } catch { api.sendMessage(ownerText, event.threadID, event.messageID); } } };