// code from goatstore // api: https://store.agi.bd const axios = require("axios"); const fs = require("fs-extra"); const path = require("path"); const gifturls = [ "https://i.imgur.com/ucbuDUR.mp4", "https://i.imgur.com/VL6Yz5i.mp4", "https://i.imgur.com/Vt2B9Sa.mp4", "https://i.imgur.com/p0t3h3h.mp4", "https://i.imgur.com/z1nQMxI.mp4", "https://i.imgur.com/Gfhhy9D.mp4", "https://i.imgur.com/i5x2M1D.mp4", "https://i.imgur.com/8MQNy3h.mp4", "https://i.imgur.com/T2C3oxc.mp4", "https://i.imgur.com/K9N6BWo.mp4", "https://i.imgur.com/PLJJQC8.mp4" ]; module.exports = { config: { name: "Islam", version: "3.0.1", author: "ROBIUL ISLAM", countDown: 5, role: 0, shortDescription: "Islamic videos", longDescription: "Islam random Imgur video", category: "no prefix" }, onStart: async function () {}, onChat: async function ({ event, message }) { if (!event.body || event.body.trim().toLowerCase() !== "islam") { return; } if (!gifturls.length) { return message.reply("❌ no URL "); } const gifturl = gifturls[Math.floor(Math.random() * gifturls.length)]; const cacheDir = path.join(__dirname, "cache"); const videoPath = path.join( cacheDir, `islam_${Date.now()}.mp4` ); try { await fs.ensureDir(cacheDir); const response = await axios.get(gifturl, { responseType: "arraybuffer", timeout: 60000, headers: { "User-Agent": "Mozilla/5.0" } }); await fs.writeFile(videoPath, response.data); await message.reply({ body: "☪️ Islamic Video", attachment: fs.createReadStream(videoPath) }); setTimeout(async () => { try { await fs.remove(videoPath); } catch (e) {} }, 10000); } catch (error) { console.error("Islam Imgur Error:", error.message); try { await fs.remove(videoPath); } catch (e) {} return message.reply( "❌ Error" ); } } };