// code from goatstore // api: https://store.agi.bd const fs = require("fs-extra"); const path = require("path"); module.exports = { config: { name: "fvoice", aliases: ["fv", "funny"], version: "1.0.0", author: "Mahabub", countDown: 3, role: 0, description: "Send a funny voice message", category: "fun", guide: "{pn}" }, onStart: async function ({ api, event, message }) { const audioPath = path.join( process.cwd(), "scripts", "cmds", "assets", "funny.mp3.m4a" ); try { if (!fs.existsSync(audioPath)) { return message.reply( "❌ Audio file পাওয়া যায়নি!\n" + "Path: scripts/cmds/assets/funny.mp3.m4a" ); } const stats = await fs.stat(audioPath); if (stats.size === 0) { return message.reply("❌ Audio file খালি!"); } await api.sendMessage( { body: "😂 𝗙𝗨𝗡𝗡𝗬 𝗩𝗢𝗜𝗖𝗘 🎤", attachment: fs.createReadStream(audioPath) }, event.threadID, (err) => { if (err) { console.error("[FUNNYVOICE] Send error:", err); } }, event.messageID ); } catch (error) { console.error("[FUNNYVOICE] Error:", error); return message.reply( "❌ Funny voice পাঠানো যায়নি!\n" + (error.message || String(error)) ); } } };