← back to browse
goat command

pfp

๐’๐ก๐จ๐ฐ ๐ฉ๐ซ๐จ๐Ÿ๐ข๐ฅ๐ž ๐ฉ๐ข๐œ๐ญ๐ฎ๐ซ๐ž

0
views
0
likes
0
installs

Aliases: pp

raw source
const axios = require("axios");
const fs = require("fs");
const path = require("path");

module.exports = {
  config: {
    name: "pfp",
    aliases: ["pp"],
    version: "0.0.1",
    author: "Azadx69x",
    countDown: 3,
    role: 0,
    shortDescription: "๐’๐ก๐จ๐ฐ ๐ฉ๐ซ๐จ๐Ÿ๐ข๐ฅ๐ž ๐ฉ๐ข๐œ๐ญ๐ฎ๐ซ๐ž",
    longDescription: "๐ฉ๐ข๐œ๐ญ๐ฎ๐ซ๐ž ๐จ๐Ÿ ๐ฒ๐จ๐ฎ๐ซ๐ฌ๐ž๐ฅ๐Ÿ ๐จ๐ซ ๐š๐ง๐ฒ ๐ฎ๐ฌ๐ž๐ซ",
    category: "image",
    guide: {
      en: "{pn}[@tag | reply | uid]"
    }
  },

  onStart: async function ({ event, message, args, usersData }) {
    try {
      let targetID =
        (event.type === "message_reply" && event.messageReply?.senderID) ||
        (event.mentions && Object.keys(event.mentions)[0]) ||
        (args[0] && !isNaN(args[0]) && args[0]) ||
        event.senderID;

      const name = await usersData.getName(targetID).catch(() => "Unknown User");

      const avatarURL = await usersData.getAvatarUrl(targetID);

      const replyText = `
โœฟโ€ขโ‰ซโ”€โ”€โ”€โ”€โ€ขใ€ŽPPใ€โ€ขโ”€โ”€โ”€โ”€โ‰ชโ€ขโœฟ
๐‡๐ž๐ซ๐ž ๐ข๐ฌ ๐ญ๐ก๐ž ๐ฉ๐ซ๐จ๐Ÿ๐ข๐ฅ๐ž ๐ฉ๐ข๐œ๐ญ๐ฎ๐ซ๐ž ๐ŸŒธ 
๐๐ž ๐ญ๐จ๐ซ ๐ฉ๐ข๐œ: ๐Ÿ™‚ ${name}
๐ˆ๐: ${targetID}
โœฟโ€ขโ‰ซโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ‰ชโ€ขโœฟ
`;

      return message.reply({
        body: replyText,
        attachment: await global.utils.getStreamFromURL(avatarURL)
      });

    } catch (err) {
      console.error("๐œ๐จ๐ฆ๐ฆ๐š๐ง๐ ๐ž๐ซ๐ซ๐จ๐ซ:", err);

      const errorText = `
โœฟโ€ขโ‰ซโ”€โ”€โ”€โ”€โ€ขใ€ŽPPใ€โ€ขโ”€โ”€โ”€โ”€โ‰ชโ€ขโœฟ
โŒ ๐‚๐จ๐ฎ๐ฅ๐ ๐ง๐จ๐ญ ๐Ÿ๐ž๐ญ๐œ๐ก ๐ฉ๐ข๐œ๐ญ๐ฎ๐ซ๐ž.
โ›” ๐ข๐ง๐ฏ๐š๐ฅ๐ข๐ ๐จ๐ซ ๐ฉ๐ซ๐ข๐ฏ๐š๐œ๐ฒ ๐›๐ฅ๐จ๐œ๐ค๐ž๐.
โœฟโ€ขโ‰ซโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ‰ชโ€ขโœฟ
`;

      return message.reply(errorText);
    }
  }
};

View raw file