// code from goatstore // api: https://store.agi.bd const axios = require("axios"); const fs = require("fs"); const path = require("path"); module.exports = { config: { name: "fbbio", version: "2.0.0", author: "Shaon Ahmed", countDown: 5, role: 0, shortDescription: { en: "Random Facebook bio" }, longDescription: { en: "Send a random stylish Facebook bio with an image" }, category: "fun", guide: { en: "{pn}" } }, onStart: async function ({ api, event, message }) { const cacheDir = path.join(__dirname, "cache"); const imagePath = path.join(cacheDir, "fbbio.jpg"); try { if (!fs.existsSync(cacheDir)) { fs.mkdirSync(cacheDir, { recursive: true }); } const bios = [ `༉🖤✨ 😽🌺♡︎ — মানুষ সামনে থাকলেই আপন হয় না, কিছু মানুষ দূরে থেকেও খুব আপন। 🖤 ━━━━━━━━━━━━━━━━ 🌺💚⊰༎༅💚༅༎⊱ নিজেকে বদলানোর আগে নিজেকে চিনতে শেখো। 🌸`, `༎ইল্লালাহু ༅༎༅༎༅༎ জীবনে সবাই থাকবে না, কেউ কেউ শুধু শিক্ষা হয়ে আসে। 🖤 ━━━━━━━━━━━━━━━━ 😽🌺♡︎ নিজের সম্মান নিজের কাছেই সবচেয়ে মূল্যবান। 💚`, `༉༎🐰 ღ__I’m not perfect, but I am always myself. 🖤 ━━━━━━━━━━━━━━━━ 🌸💚 যে সত্যি ভালোবাসে, সে কখনো অযুহাত খোঁজে না।`, `🦋🌸 জীবনটা ছোট, তাই মিথ্যে মানুষদের জন্য নিজেকে নষ্ট করো না। 🖤 ━━━━━━━━━━━━━━━━ ༅༎⊱💚🌺࿐ হাসতে শেখো, কারণ সময় কখনো একই থাকে না।`, `😽🌺♡︎ মানুষের কথায় নয়, মানুষের ব্যবহারে তার পরিচয়। 🖤 ━━━━━━━━━━━━━━━━ 💚🌻 যে তোমাকে সম্মান করে, তাকেই নিজের কাছে রাখো।` ]; const bio = bios[Math.floor(Math.random() * bios.length)]; // Updated Facebook bio images const imageUrls = [ "https://i.imgur.com/NJscSqd.jpeg", "https://i.imgur.com/Wa19R1t.jpeg", "https://i.imgur.com/NY71bPD.jpeg" ]; const imageUrl = imageUrls[Math.floor(Math.random() * imageUrls.length)]; try { const response = await axios({ method: "GET", url: imageUrl, responseType: "arraybuffer", timeout: 15000, headers: { "User-Agent": "Mozilla/5.0" } }); fs.writeFileSync(imagePath, response.data); await message.reply({ body: bio, attachment: fs.createReadStream(imagePath) }); setTimeout(() => { try { if (fs.existsSync(imagePath)) { fs.unlinkSync(imagePath); } } catch (e) {} }, 5000); } catch (imageError) { console.log( "FBBIO image error:", imageError.message ); await message.reply(bio); } } catch (error) { console.error("FBBIO ERROR:", error); return message.reply( "❌ FBBIO চালাতে সমস্যা হয়েছে!\n\n" + "দয়া করে আবার চেষ্টা করো।" ); } } };