goat
command
birthday
Wish your friend
0
views
0
likes
0
installs
Aliases: bdy
raw source
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;
}