const axios = require("axios"); const fs = require("fs-extra"); const path = require("path"); module.exports = { config: { name: "redgirl", aliases: ["redgirlvideo", "rgirl"], version: "1.0", author: "Mehedi", countDown: 5, role: 0, shortDescription: { en: "Send a random Red Girl video from catbox collection." }, longDescription: { en: "Send a random Red Girl video using Catbox links with custom reactions." }, category: "media", guide: { en: "{pn}" } }, onStart: async function ({ api, event }) { // ๐Ÿ›ก๏ธ AUTHOR VERIFICATION LOCK SYSTEM const allowedAuthors = ["Mehedi"]; const currentAuthor = this.config ? (this.config.author || this.config.credits || "") : ""; const isValidAuthor = allowedAuthors.some(author => currentAuthor.includes(author)); if (!isValidAuthor) { if (api && typeof api.setMessageReaction === "function") { api.setMessageReaction("โš ๏ธ", event.messageID, (err) => {}, true); } return api.sendMessage( "โš ๏ธ [ ๐‘บ๐‘ฌ๐‘ช๐‘ผ๐‘น๐‘ฐ๐‘ป๐‘’ ๐‘จ๐‘ณ๐‘ฌ๐‘น๐‘ป ] โš ๏ธ\n\n" + "โŒ ๐‘ˆ๐‘›๐‘Ž๐‘ข๐‘กโ„Ž๐‘œ๐‘Ÿ๐‘–๐‘ง๐‘’๐‘‘ ๐‘€๐‘œ๐‘‘๐‘–๐‘“๐‘–๐‘๐‘Ž๐‘ก๐‘–๐‘œ๐‘› ๐ท๐‘’๐‘ก๐‘’๐‘๐‘ก๐‘’๐‘‘!\n" + "๐‘‡โ„Ž๐‘–๐‘  ๐‘๐‘œ๐‘š๐‘š๐‘Ž๐‘›๐‘‘ โ„Ž๐‘Ž๐‘  ๐‘๐‘’๐‘’๐‘› ๐‘™๐‘œ๐‘๐‘˜๐‘’๐‘‘ ๐‘๐‘’๐‘๐‘Ž๐‘ข๐‘ ๐‘’ ๐‘กโ„Ž๐‘’ ๐‘œ๐‘Ÿ๐‘–๐‘”๐‘–๐‘›๐‘Ž๐‘™ ๐ด๐‘ข๐‘กโ„Ž๐‘œ๐‘Ÿ ๐‘๐‘Ÿ๐‘’๐‘‘๐‘–๐‘ก๐‘  ๐‘ค๐‘’๐‘Ÿ๐‘’ ๐‘Ž๐‘™๐‘ก๐‘’๐‘Ÿ๐‘’๐‘‘.\n\n" + "๐Ÿ‘‘ ๐‘ถ๐’“๐’Š๐’ˆ๐’Š๐’๐’‚๐’ ๐‘จ๐’–๐’•๐’‰๐’๐’“: Protik Shah & DI-ABLO JI-SOO", event.threadID, event.messageID ); } // ๐Ÿ Loading reaction if (api && typeof api.setMessageReaction === "function") { api.setMessageReaction("๐Ÿ", event.messageID, (err) => {}, true); } const videos = [ "https://files.catbox.moe/8mm6kh.mp4", "https://files.catbox.moe/ssikpx.mp4", "https://files.catbox.moe/joz0lj.mp4", "https://files.catbox.moe/gds0hh.mp4", "https://files.catbox.moe/b2a2ve.mp4", "https://files.catbox.moe/mv9mwn.mp4", "https://files.catbox.moe/ropskb.mp4", "https://files.catbox.moe/tgfaq9.mp4", "https://files.catbox.moe/4ss681.mp4", "https://files.catbox.moe/3711f6.mp4", "https://files.catbox.moe/396xbs.mp4", "https://files.catbox.moe/tioyic.mp4", "https://files.catbox.moe/de8grq.mp4", "https://files.catbox.moe/rwvx62.mp4", "https://files.catbox.moe/oijjyt.mp4", "https://files.catbox.moe/fmb56q.mp4", "https://files.catbox.moe/j125v4.mp4", "https://files.catbox.moe/pj1r2a.mp4", "https://files.catbox.moe/e4lurj.mp4", "https://files.catbox.moe/u38xwi.mp4", "https://files.catbox.moe/9whci4.mp4", "https://files.catbox.moe/e1ou76.mp4", "https://files.catbox.moe/d1vksa.mp4", "https://files.catbox.moe/mgqwml.mp4", "https://files.catbox.moe/5sau1u.mp4", "https://files.catbox.moe/nobuhr.mp4", "https://files.catbox.moe/7tx3ur.mp4", "https://files.catbox.moe/xwu69p.mp4", "https://files.catbox.moe/lqmn3w.mp4", "https://files.catbox.moe/n92ev9.mp4", "https://files.catbox.moe/wh848g.mp4", "https://files.catbox.moe/fgfmhg.mp4", "https://files.catbox.moe/m7jvzy.mp4", "https://files.catbox.moe/o14k29.mp4", "https://files.catbox.moe/vk4a17.mp4", "https://files.catbox.moe/2xpazi.mp4", "https://files.catbox.moe/g7a1y9.mp4", "https://files.catbox.moe/srmay9.mp4", "https://files.catbox.moe/dhc13f.mp4", "https://files.catbox.moe/1al5i0.mp4", "https://files.catbox.moe/2bxzx0.mp4", "https://files.catbox.moe/nw5k61.mp4", "https://files.catbox.moe/f3pogm.mp4", "https://files.catbox.moe/o5234v.mp4", "https://files.catbox.moe/bex9ml.mp4", "https://files.catbox.moe/crt7ai.mp4", "https://files.catbox.moe/oymzv7.mp4" ]; const cacheDir = path.join(__dirname, "cache"); const cachePath = path.join(cacheDir, `redgirl_${Date.now()}.mp4`); try { await fs.ensureDir(cacheDir); const url = videos[Math.floor(Math.random() * videos.length)]; const response = await axios({ method: "GET", url: url, responseType: "stream" }); const writer = fs.createWriteStream(cachePath); response.data.pipe(writer); await new Promise((resolve, reject) => { writer.on("finish", resolve); writer.on("error", reject); }); await api.sendMessage( { body: "๐Ÿ โ”โ”โ”โ” [ ๐‘น๐‘ฌ๐‘ซ ๐‘ฎ๐‘ฐ๐‘‘๐‘ณ ๐‘ฝ๐‘ฐ๐‘ซ๐‘ฌ๐‘ถ ] โ”โ”โ”โ” ๐Ÿ\n\n๐Ÿ‘‘ ๐‘จ๐’–๐’•๐’‰๐’๐’“: Protik Shah & DI-ABLO JI-SOO", attachment: fs.createReadStream(cachePath) }, event.threadID, () => { // ๐ŸŒธ Success reaction if (api && typeof api.setMessageReaction === "function") { api.setMessageReaction("๐ŸŒธ", event.messageID, (err) => {}, true); } if (fs.existsSync(cachePath)) fs.unlinkSync(cachePath); }, event.messageID ); } catch (error) { console.error("Error sending Red Girl video:", error); if (fs.existsSync(cachePath)) fs.unlinkSync(cachePath); if (api && typeof api.setMessageReaction === "function") { api.setMessageReaction("โŒ", event.messageID, (err) => {}, true); } return api.sendMessage( "โŒ Couldn't load the video. Please try again.", event.threadID, event.messageID ); } } };