← back to browse
goat command

emoji_voice

Emoji দিলে ą¦•ą¦æą¦‰ą¦Ÿ মেয়ের ভয়েস পাঠাবে šŸ˜

0
views
0
likes
0
installs
raw source
module.exports.config = {
  name: "emoji_voice",
  version: "10.0",
  role: 0,
  author: "š“†©š‘…š‘œš’·š’¾š“ƒš“†Ŗ š’œš“š’¾",
  description: "Emoji দিলে ą¦•ą¦æą¦‰ą¦Ÿ মেয়ের ভয়েস পাঠাবে šŸ˜",
  category: "noprefix",
  usages: "šŸ˜˜šŸ„°šŸ˜",
  countDown: 5,
};

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

const emojiAudioMap = {
  "🄱": "https://files.catbox.moe/9pou40.mp3",
  "😁": "https://files.catbox.moe/60cwcg.mp3",
  "😌": "https://files.catbox.moe/epqwbx.mp3",
  "🄺": "https://files.catbox.moe/wc17iq.mp3",
  "🤭": "https://files.catbox.moe/cu0mpy.mp3",
  "šŸ˜…": "https://files.catbox.moe/jl3pzb.mp3",
  "šŸ˜": "https://files.catbox.moe/z9e52r.mp3",
  "šŸ˜ž": "https://files.catbox.moe/tdimtx.mp3",
  "🤫": "https://files.catbox.moe/0uii99.mp3",
  "šŸ¼": "https://files.catbox.moe/p6ht91.mp3",
  "šŸ¤”": "https://files.catbox.moe/hy6m6w.mp3",
  "🄰": "https://files.catbox.moe/dv9why.mp3",
  "🤦": "https://files.catbox.moe/ivlvoq.mp3",
  "😘": "https://files.catbox.moe/sbws0w.mp3",
  "šŸ˜‘": "https://files.catbox.moe/p78xfw.mp3",
  "😢": "https://files.catbox.moe/shxwj1.mp3",
  "šŸ™Š": "https://files.catbox.moe/3bejxv.mp3",
  "🤨": "https://files.catbox.moe/4aci0r.mp3",
  "😔": "https://files.catbox.moe/shxwj1.mp3",
  "šŸ™ˆ": "https://files.catbox.moe/3qc90y.mp3",
  "šŸ˜": "https://files.catbox.moe/qjfk1b.mp3",
  "😭": "https://files.catbox.moe/itm4g0.mp3",
  "😱": "https://files.catbox.moe/mu0kka.mp3",
  "😻": "https://files.catbox.moe/y8ul2j.mp3",
  "😿": "https://files.catbox.moe/tqxemm.mp3",
  "šŸ’”": "https://files.catbox.moe/6yanv3.mp3",
  "🤣": "https://files.catbox.moe/2sweut.mp3",
  "🄹": "https://files.catbox.moe/jf85xe.mp3",
  "😩": "https://files.catbox.moe/b4m5aj.mp3",
  "🫣": "https://files.catbox.moe/ttb6hi.mp3",
  "🐸": "https://files.catbox.moe/utl83s.mp3",
  "🤰": "https://files.catbox.moe/twr5wf.mp3",
  "šŸ’Ŗ": "https://files.catbox.moe/j03dk9.mp3",
  "šŸ’ƒ": "https://files.catbox.moe/jhyng8.mp3",
  "ā¤ļø": "https://files.catbox.moe/0qgv91.mp3",
  "🄶": "https://files.catbox.moe/rzti55.mp3",
  "šŸ‘€": "https://files.catbox.moe/wkdo44.mp3",
  "šŸ™": "https://files.catbox.moe/542hm1.mp3",
  "šŸ“": "https://files.catbox.moe/oaxtjv.mp3",
  "🩓": "https://files.catbox.moe/bhfqtr.mp3",
  "šŸ‘‘": "https://files.catbox.moe/jr4vnq.mp3",
  "šŸ‘™": "https://files.catbox.moe/jp0bqo.mp3",
  "šŸ·": "https://files.catbox.moe/oivwsu.mp3",
  "šŸŖ“": "https://files.catbox.moe/rn7gqe.mp3",
  "🚬": "https://files.catbox.moe/vixb01.mp3",
  "šŸ‰": "https://files.catbox.moe/x1ze8v.mp3",
  "": "",
  "šŸŽ²": "https://files.catbox.moe/6ek32y.mp3",
  "🤱": "https://files.catbox.moe/qc8gsi.mp3",
  "šŸ‘”": "https://files.catbox.moe/q8v9ys.mp3",
  "šŸ’µ": "https://files.catbox.moe/d42g6z.mp3",
  "šŸ‘°": "https://files.catbox.moe/waawu4.mp3",
  "": "",
  "šŸ’“": "https://files.catbox.moe/4kikih.mp3",
  "šŸ¤": "https://files.catbox.moe/tqsb5w.mp3",
  "šŸ†": "https://files.catbox.moe/ayimg9.mp3",
  "šŸ™‹ā€ā™€ļø": "https://files.catbox.moe/t8z0oi.mp3",
  "🤳": "https://files.catbox.moe/yqepwf.mp3",
  "ā˜Žļø": "https://files.catbox.moe/8lo8oe.mp3",
  "🧹": "https://files.catbox.moe/2xadpd.mp3",
  "": "",
  "🌹": "https://files.catbox.moe/pj2omq.mp3",
  "": "",
};

module.exports.onChat = async ({ api, event }) => {
  const { threadID, messageID, body } = event;
  if (!body || body.length > 2) return;

  const emoji = body.trim();
  const audioUrl = emojiAudioMap[emoji];
  if (!audioUrl) return;

  const cacheDir = path.join(__dirname, "cache");
  if (!fs.existsSync(cacheDir)) fs.mkdirSync(cacheDir);

  const filePath = path.join(cacheDir, `${encodeURIComponent(emoji)}.mp3`);

  try {
    const response = await axios({
      method: "GET",
      url: audioUrl,
      responseType: "stream",
    });

    const writer = fs.createWriteStream(filePath);
    response.data.pipe(writer);

    writer.on("finish", () => {
      api.sendMessage(
        {
          attachment: fs.createReadStream(filePath),
        },
        threadID,
        () => {
          fs.unlink(filePath, (err) => {
            if (err) console.error("Error deleting file:", err);
          });
        },
        messageID
      );
    });

    writer.on("error", (err) => {
      console.error("Error writing file:", err);
      api.sendMessage(
        "ą¦‡ą¦®ą§ą¦œą¦æ দিয়ে লাভ নাই\nযাও মুঔ়ি খাও জান😘",
        threadID,
        messageID
      );
    });
  } catch (error) {
    console.error("Error downloading audio:", error);
    api.sendMessage(
      "ą¦‡ą¦®ą§ą¦œą¦æ দিয়ে লাভ নাই\nযাও মুঔ়ি খাও জান😘",
      threadID,
      messageID
    );
  }
};

module.exports.onStart = () => {};

View raw file