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 = () => {};