// code from goatstore // api: https://store.agi.bd const fs = require("fs-extra"); const axios = require("axios"); module.exports = { config: { name: "sexy", version: "3.0", role: 2, author: "MEHEDI HASAN MIRAZ × Modified", description: "18+ Random Hot Video", category: "18+", usages: "Akash", cooldowns: 5 }, onStart: async function ({ event, api }) { const videos = [ "https://files.catbox.moe/51zmkl.mp4", "https://files.catbox.moe/9u0w4q.mp4", "https://files.catbox.moe/amp199.mp4", "https://files.catbox.moe/uz1e0i.mp4", "https://files.catbox.moe/k6qnu0.mp4", "https://files.catbox.moe/xvatrl.mp4", "https://files.catbox.moe/n97gxb.mp4", "https://files.catbox.moe/801hbm.mp4", "https://files.catbox.moe/7dhy2j.mp4", "https://files.catbox.moe/kbp9vk.mp4", "https://files.catbox.moe/ggv0ns.mp4", "https://files.catbox.moe/tcvf4s.mp4", "https://files.catbox.moe/18fghb.mp4", "https://files.catbox.moe/sn3yyi.mp4", "https://files.catbox.moe/3kbn3c.mp4", "https://files.catbox.moe/wb3cyy.mp4", "https://files.catbox.moe/rchruk.mp4", "https://files.catbox.moe/5dtorv.mp4", "https://files.catbox.moe/nz4mbp.mp4", "https://files.catbox.moe/ulodhq.mp4", "https://files.catbox.moe/7kgeiw.mp4", "https://files.catbox.moe/w79eym.mp4", "https://files.catbox.moe/lfxa4l.mp4", "https://files.catbox.moe/omn3ux.mp4", "https://files.catbox.moe/6r3r5i.mp4", "https://files.catbox.moe/1ltwnu.mp4", "https://files.catbox.moe/iz959z.mp4" ]; const randomLink = videos[Math.floor(Math.random() * videos.length)]; const cacheDir = __dirname + "/cache"; const path = cacheDir + "/sexy.mp4"; try { await fs.ensureDir(cacheDir); const response = await axios({ url: randomLink, method: "GET", responseType: "stream", timeout: 60000 }); const writer = fs.createWriteStream(path); response.data.pipe(writer); writer.on("finish", async () => { try { await api.sendMessage( { body: "💫__𝗧𝘂𝗺𝗶 𝗮𝗺𝗮𝗸𝗲 𝘁𝘂𝗺𝗮𝗿 𝗯𝗲𝗸𝘁𝗶𝗴𝗼𝘁𝗼 𝗳𝘂𝗹𝗹 𝗯𝗮𝗻𝗮𝘂", attachment: fs.createReadStream(path) }, event.threadID, async () => { try { await fs.remove(path); } catch (e) { console.error("Cache delete error:", e); } }, event.messageID ); } catch (err) { console.error("Send video error:", err); await fs.remove(path).catch(() => {}); } }); writer.on("error", async (err) => { console.error("Write error:", err); await fs.remove(path).catch(() => {}); api.sendMessage( "🍂😔 প্লিজ ভিডিও টা আবার চেষ্টা করো__🍂🍓", event.threadID ); }); } catch (error) { console.error("Video download error:", error); await fs.remove(path).catch(() => {}); api.sendMessage( "❌ ভিডিও লোড করতে সমস্যা হয়েছে, আবার চেষ্টা করো!", event.threadID ); } } };