← back to browse
goat command

owner2

Owner information with image

0
views
0
likes
0
installs
raw source
const fs = require("fs-extra");
const request = require("request");
const path = require("path");

module.exports = {
  config: {
    name: "owner2",
    version: "1.3.0",
    author: "ไบ—โ€ข๐˜”๐˜ˆ๐˜”๐˜œ๐˜•โœฟแญ„+ edit by Milon",
    role: 0,
    shortDescription: "Owner information with image",
    category: "Information",
    guide: {
      en: "owner"
    }
  },

  onStart: async function ({ api, event }) {
    const ownerText = 
`โ•ญโ”€ ๐Ÿ‘‘ Oแดกษดแด‡ส€ Iษดา“แด ๐Ÿ‘‘ โ”€โ•ฎ
โ”‚ ๐Ÿ‘ค Nแด€แดแด‡       : MD MILON SARKAR
โ”‚๐Ÿงธ Nษชแด„แด‹       : Milon
โ”‚ ๐ŸŽ‚ Aษขแด‡        : 23+
โ”‚ ๐Ÿ’˜ Rแด‡สŸแด€แด›ษชแดษด : Pure SษชษดษขสŸแด‡
โ”‚ ๐ŸŽ“ Pส€แดา“แด‡ssษชแดษด : Job (private company)
โ”‚ ๐Ÿ“š Eแด…แดœแด„แด€แด›ษชแดษด : Dakhil (ssc2020)
โ”‚ ๐Ÿก Lแดแด„แด€แด›ษชแดษด : Kurigram, Bangladesh 
โ”œโ”€ ๐Ÿ”— Cแดษดแด›แด€แด„แด› โ”€โ•ฎ
โ”‚ ๐Ÿ“˜ Facebook  : https://www.facebook.com/share/1CNLskKAtw/
โ”‚ ๐Ÿ’ฌ Messenger: m.me/100081225144815
โ”‚ ๐Ÿ“ž WhatsApp  : wa.me/016*****314
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ`;

    const cacheDir = path.join(__dirname, "cache");
    const imgPath = path.join(cacheDir, "owner.jpg");

    if (!fs.existsSync(cacheDir)) fs.mkdirSync(cacheDir);

    const imgLink = "https://i.imgur.com/O9mM8gZ.jpeg";

    const send = () => {
      api.sendMessage(
        {
          body: ownerText,
          attachment: fs.createReadStream(imgPath)
        },
        event.threadID,
        () => fs.unlinkSync(imgPath),
        event.messageID
      );
    };

    request(encodeURI(imgLink))
      .pipe(fs.createWriteStream(imgPath))
      .on("close", send);
  }
};

View raw file