// code from goatstore // api: https://store.agi.bd const DIG = require("discord-image-generation"); const fs = require("fs-extra"); module.exports = { config: { name: "buttslap", version: "1.1", author: "Siam Ahmed Saan", countDown: 5, role: 0, shortDescription: "Buttslap image", longDescription: "Buttslap image", category: "meme", guide: { en: " {pn} @tag" } }, langs: { vi: { noTag: "" }, en: { noTag: "You must tag the person you want to slap" } }, onStart: async function ({ event, message, usersData, args, getLang }) { const uid1 = event.senderID; const uid2 = Object.keys(event.mentions)[0]; if (!uid2) return message.reply(getLang("noTag")); const avatarURL1 = await usersData.getAvatarUrl(uid1); const avatarURL2 = await usersData.getAvatarUrl(uid2); const img = await new DIG.Spank().getImage(avatarURL1, avatarURL2); const pathSave = `${__dirname}/tmp/${uid1}_${uid2}spank.png`; fs.writeFileSync(pathSave, Buffer.from(img)); const content = args.join(' ').replace(Object.keys(event.mentions)[0], ""); message.reply({ body: `${(content || "hehe boii")}`, attachment: fs.createReadStream(pathSave) }, () => fs.unlinkSync(pathSave)); } };