// 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: "lofi", version: "2.0.0", author: "FARHAN-KHAN", countDown: 5, role: 0, shortDescription: "Sad video sender ๐Ÿ˜ข", longDescription: "Sends random sad video with emotional captions ๐Ÿ’”", category: "media", guide: { en: "{pn}" } }, onStart: async function ({ api, event }) { // ๐Ÿ’” Random sad captions const captions = [ "===ใ€Œ๐๐‘๐„๐…๐ˆ๐—-๐„๐•๐„๐๐“ใ€=== \n--โ–(โœทโ€ฟ๐’๐ˆ๐™๐”๐Š๐€-๐๐Ž๐“โ€ฟโœท)โ–-- \nโœขโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โœข \n๐ŸŽ€ โ™ก-๐‹๐Ÿ’ž๐•๐„-๐•๐ˆ๐ƒ๐„๐Ÿ’-โ™ก ๐ŸŽ€ \nโœขโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โœข\n(โœทโ€ฟ๐Ž๐–๐๐„๐‘:-๐‘๐‰-๐…๐€๐‘๐‡๐€๐โ€ฟโœท)" ]; const caption = captions[Math.floor(Math.random() * captions.length)]; // ๐ŸŽฅ Sad videos list const links = [ "https://drive.google.com/uc?id=1xLc_9r1TYGVM0J33hJ61hmW3yXOBTcEo", "https://drive.google.com/uc?id=1xFVA97twVhvJJzmxhXjT9QukwWEDRO2a", "https://drive.google.com/uc?id=1xC8J23XORH4zHsXCDkfrgzmVBm1_-b5E", "https://drive.google.com/uc?id=1x5EX0grUJwEKzHyzeR63HnzC_UlDdJD6", "https://drive.google.com/uc?id=1xM82tBosefpCvaDokhufHoikub1Opupz", "https://drive.google.com/uc?id=1xhCqfx7pScogeGph4T4ITnRJFYcUNmJ8", "https://drive.google.com/uc?id=1xTgkjk__QRMOVQnkQsSIcEzGfRUwUDLY", "https://drive.google.com/uc?id=1xRsWDPe485xXPna9nWhj0TaW_Q9lVJDd", "https://drive.google.com/uc?id=1xC30T2eSDWZGr_O8699yxaMS-AZ_X5y8", "https://drive.google.com/uc?id=1xcoHMLkNU1naPET4bP2sEiHoXUF23w-R", "https://drive.google.com/uc?id=1xcN88lPjPoRJhdxCUesuTFFArtvbUNL2", "https://drive.google.com/uc?id=1xUee8t4ukXW_XD4K4pGV_I4VFccwdyqt", "https://drive.google.com/uc?id=1xgfepctwXjZ5Y9kxhD3HcTTaJcsWHi-x", "https://drive.google.com/uc?id=1xhymaD6J1patQzfass5-e4ewUDg8gnQ9", "https://drive.google.com/uc?id=1xCvCvUa2zVWLm3y1pAGFKrr-emyaFicK", "https://drive.google.com/uc?id=1x87CHgjwaOjANyN_06_JqB-YKaUQGU2b" ]; const link = links[Math.floor(Math.random() * links.length)]; const cachePath = path.join(__dirname, "cache", "sad.mp4"); try { const response = await axios({ url: encodeURI(link), method: "GET", responseType: "stream" }); await fs.ensureDir(path.join(__dirname, "cache")); const writer = fs.createWriteStream(cachePath); response.data.pipe(writer); writer.on("finish", async () => { await api.sendMessage( { body: `ใ€Œ ${caption} ใ€`, attachment: fs.createReadStream(cachePath) }, event.threadID ); fs.unlinkSync(cachePath); }); writer.on("error", (err) => { console.error(err); api.sendMessage("โŒ เฆญเฆฟเฆกเฆฟเฆ“ เฆชเฆพเฆ เฆพเฆคเง‡ เฆธเฆฎเฆธเงเฆฏเฆพ เฆนเฆฏเฆผเง‡เฆ›เง‡!", event.threadID); }); } catch (error) { console.error(error); api.sendMessage("โŒ เฆ•เฆฟเฆ›เง เฆเฆ•เฆŸเฆพ เฆธเฆฎเฆธเงเฆฏเฆพ เฆนเฆฏเฆผเง‡เฆ›เง‡ เฆญเฆฟเฆกเฆฟเฆ“ เฆ†เฆจเฆคเง‡เฅค", event.threadID); } } };