// code from goatstore // api: https://store.agi.bd const axios = require("axios"); const fs = require("fs-extra"); const path = require("path"); module.exports = { config: { name: "lovevideo", aliases: ["love", "lovevedio"], version: "1.0.0", author: "Shaon Ahmed", countDown: 5, role: 0, shortDescription: { en: "Send random love status video" }, description: { en: "Sends a random love video status from Google Drive" }, category: "media", guide: { en: "{pn}" } }, onStart: async function ({ message }) { const videos = [ "https://drive.google.com/uc?id=1Z-6qll7ACq8Ka1pKpnC3guGcXU0gNvoL", "https://drive.google.com/uc?id=1YHm_oC7xItLokbt_MCWu-VdMGavvx-G4", "https://drive.google.com/uc?id=1YvDanPpMZKK4s547h9Bsf0uL719AvVEG", "https://drive.google.com/uc?id=1YemK-RQH3gUX_I9ThgNJLC89yPF-VtEY", "https://drive.google.com/uc?id=1YN25UGQQCpZvN29Y5a84ZCYlL-rc_JL_", "https://drive.google.com/uc?id=1YXbox7CyKc6Gu-56WAtAPlxSTs51Yo9n", "https://drive.google.com/uc?id=1YNVe1cEM0JM3lj7sU49tuJn4-8ASYVd8", "https://drive.google.com/uc?id=1ZDjeuPfIyUkovgmJCRsE7vE67aOe0Sp2", "https://drive.google.com/uc?id=1YcJciCtidcUxRGihUyx2uDgDg3cBYUE5", "https://drive.google.com/uc?id=1ZIE6xPwXg6_oxG0K7xCWKS04MNyag3QL", "https://drive.google.com/uc?id=1ZF9cOD_fj26rpWDf6WOjUQNz8QuRJhkv", "https://drive.google.com/uc?id=1ZAXQwA5BsnN555FrWii2bb-kdLaoMxLP", "https://drive.google.com/uc?id=1YvWRk-wQ_I8kuJzOuw2Mx7Q-Rrgbw6CT", "https://drive.google.com/uc?id=1Z8vKgEBUkKbwgMPvv_6K_lvVsrBca_X8", "https://drive.google.com/uc?id=1ZG-BJq7pP4oh93U6tHIKuYvZ8XiidlCV" ]; const caption = "「 ☆《LOVE VIDEO》☆ // ᥫ᭡፝֟፝֟ ϻꫝɪ֟፝ꜱʜꫝ ᥫ᭡፝֟፝֟𓍯_ 」"; const randomVideo = videos[Math.floor(Math.random() * videos.length)]; const filePath = path.join(__dirname, "cache", "lovevideo.mp4"); try { await fs.ensureDir(path.join(__dirname, "cache")); const response = await axios({ method: "GET", url: randomVideo, responseType: "stream", timeout: 60000 }); const writer = fs.createWriteStream(filePath); response.data.pipe(writer); await new Promise((resolve, reject) => { writer.on("finish", resolve); writer.on("error", reject); }); await message.reply({ body: caption, attachment: fs.createReadStream(filePath) }); // Delete temp file after sending fs.unlink(filePath).catch(() => {}); } catch (err) { console.error(err); return message.reply("❌ ভিডিও ডাউনলোড করতে সমস্যা হয়েছে। লিংক এক্সপায়ার হয়ে থাকতে পারে।"); } } };