const axios = require('axios'); const jimp = require("jimp"); const fs = require("fs"); const moment = require("moment-timezone"); module.exports = { config: { name: "birthday", aliases: ["bdy"], version: "1.0", author: "RUBISH", countDown: 5, role: 0, shortDescription: "Wish your friend ", longDescription: "", category: "๐Ÿ‘ฅ | Member", guide: { vi: "{pn} [@tag someone]", en: "{pn} [@tag someone]" } }, onStart: async function ({ message, args, api, event }) { const mention = event.mentions; if (!mention) return message.reply("โš ๏ธ | please mention someone"); const mentionedUserId = Object.keys(mention)[0]; try { const mentionedUser = await api.getUserInfo(mentionedUserId); if (mentionedUser && mentionedUser[mentionedUserId]) { const userName = mentionedUser[mentionedUserId].name; const currentDate = moment().tz("Asia/Dhaka").format("YYYY-MM-DD"); const currentTime = moment().tz("Asia/Dhaka").format("hh:mm:ss A"); bal(mentionedUserId).then(ptth => { message.reply({ body: ` โ”โ”“๏ฝก๏ฝฅ๏พŸ๏พŸ๏ฝฅ๏ฝก๏ฝก๏พŸโ™ก๐ŸŽˆ๐ŸŽˆ โ”ƒโ”—โ”› ๐š๐ฉ๐ฉ๐ฒโ€ขยฐโ€ขโ™ก๐ŸŽ โ”ƒโ”โ”“โ”ƒใ€€. ๐›๐ข๐ซ๐ญ๐ก๐๐š๐ฒ ๐Ÿง๐Ÿฐ โ”—โ”›โ”—โ”›ใ€€ โ•”โ•ฆโ•โ•โ€ขโ€ขโœ โ€ขโ€โ€โ€ขโœ โ€ขโ€ขโ•โ•โ•ฆโ•— ${userName} โ•šโ•ฉโ•โ•โ€ขโ€ขโœ โ€ขโ€โ€โ€ขโœ โ€ขโ€ขโ•โ•โ•ฉโ• - ๐šƒ๐š‘๐š’๐šœ ๐š‘๐šŠ๐š™๐š™๐šข ๐š‹๐š’๐š›๐š๐š‘๐š๐šŠ๐šข ๐š‚๐š๐šŠ๐š๐šž๐šœ ๐š’๐šœ ๐šœ๐š‘๐š˜๐š›๐š ๐™ฑ๐šž๐š ๐š ๐š’๐šœ๐š‘๐š’๐š—๐š ๐šข๐š˜๐šž ๐šŽ๐šŸ๐šŽ๐š›๐šข๐š๐š‘๐š’๐š—๐š ๐š๐š‘๐šŠ๐š ๐š‹๐š›๐š’๐š—๐š๐šœ ๐šข๐š˜๐šž ๐š‘๐šŠ๐šŸ๐š™๐š’๐š—๐šŽ๐šœ๐šœ ๐š๐š˜๐š๐šŠ๐šข ๐šŠ๐š—๐š ๐šŠ๐š•๐šœ๐š˜ ๐š ๐šŠ๐šข๐šœ... ๐Ÿฉ๐ŸŽ‰๐ŸŽ - ๐™ค๐™ฃ๐™˜๐™š ๐™–๐™œ๐™–๐™ž๐™ฃ ๐™๐™–๐™ฅ๐™ฅ๐™ฎ ๐™—๐™ž๐™ง๐™ฉ๐™๐™™๐™–๐™ฎ ๐™ฉ๐™ค ๐™ฎ๐™ค๐™ช ${userName}๐ŸŽ‚๐ŸŽ€๐ŸŒน - ๐™ผ๐šŠ๐š—๐šข ๐™ผ๐šŠ๐š—๐šข ๐™ท๐šŠ๐š™๐š™๐šข ๐š๐šŽ๐š๐šž๐š›๐š—๐šœ ๐™พ๐š ๐šƒ๐š‘๐šŽ ๐™ณ๐šŠ๐šข๐Ÿฅฐ - ๐™ƒ๐™–๐™ฅ๐™ฅ๐™ฎ ๐™—๐™ž๐™ง๐™ฉ๐™๐™™๐™–๐™ฎ ๐™ฉ๐™ค ๐™ฎ๐™ค๐™ช ๐˜ฟ๐™š๐™–๐™ง ${userName}๐Ÿ–ค ๐ŸŒนโค ๐™ป๐š˜๐šŸ๐šŽ ๐šž ๐šŠ๐š•๐š ๐šŠ๐šข๐šœ โค๐ŸŒน - ๐ž๐ฏ๐ž๐ซ๐ฒ ๐๐š๐ฒ ๐ข๐ฌ ๐ฌ๐ฉ๐ž๐œ๐ข๐š๐ฅ - ๐™ƒ๐™–๐™ฅ๐™ฅ๐™ฎ ๐™—๐™ž๐™ง๐™ฉ๐™๐™™๐™–๐™ฎ ๐™ฉ๐™ค ๐™ฎ๐™ค๐™ช.! ๐ŸŒน${userName}๐ŸŒน - Date โ‡ ${currentDate} - Time โ‡ ${currentTime} `, attachment: fs.createReadStream(ptth) }); }); } else { message.reply("โš ๏ธ | please mention someone"); } } catch (error) { console.error("Error fetching user information:", error); message.reply("Error fetching user information."); } } }; async function bal(mentionedUserId) { let avMentionedUser = await jimp.read(`https://graph.facebook.com/${mentionedUserId}/picture?width=512&height=512&access_token=6628568379%7Cc1e620fa708a1d5696fb991c1bde5662`); avMentionedUser.circle(); let pth = `${__dirname}/tmp/wish.jpg`; let img = await jimp.read("https://i.ibb.co/9cYzw3J/Hpbd-name-1655b9480a850c.jpg"); img.resize(1000, 667).composite(avMentionedUser.resize(320, 320), 346, 82); await img.writeAsync(pth); return pth; }