// code from goatstore // api: https://store.agi.bd module.exports = { config: { name: "profilepicture", aliases: ["pp"], version: "1.0", author: "—͞𝐏ʀɪᴍᴇ́", role: 0, category: "media", guide: "{pn} [@mention/reply/uid/link]" }, onStart: async function ({ api, event, args }) { let uid = event.senderID; if (event.type == "message_reply") { uid = event.messageReply.senderID; } else if (Object.keys(event.mentions).length > 0) { uid = Object.keys(event.mentions)[0]; } else if (args[0]) { if (args[0].includes("facebook.com")) { uid = await api.getUID(args[0]); } else if (!isNaN(args[0])) { uid = args[0]; } } try { // config.json theke bot nickname nebe let botName = "Bot"; try { const config = require("../config.json"); botName = config.nickname || config.botName || "Bot"; } catch { botName = global.GoatBot?.config?.nickname || "Bot"; } const info = await api.getUserInfo(uid); const name = info[uid].name; const url = `https://graph.facebook.com/${uid}/picture?width=2048&height=2048&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`; const stream = await global.utils.getStreamFromURL(url); const stylish = `💫 𝗣𝗥𝗢𝗙𝗜𝗟𝗘 𝗣𝗜𝗖𝗧𝗨𝗥𝗘 ✨ 🧸 𝗡𝗮𝗺𝗲 : ${name}`; return api.sendMessage({ body: stylish, attachment: stream }, event.threadID, event.messageID); } catch (e) { return api.sendMessage(`😕__বেবি....! এর তহহহ প্রোফাইল পিকচার পাইলাম না গোহহহহ -!😒🥲`, event.threadID, event.messageID); } } };