goat
command
girl2
Send a non-repeating Girl 2 video from catbox collection.
0
views
0
likes
0
installs
Aliases: girl2video, g2
raw source
const axios = require("axios");
const fs = require("fs-extra");
const path = require("path");
// π§ Smart Memory Array to track sent videos
let usedVideos = [];
module.exports = {
config: {
name: "girl2",
aliases: ["girl2video", "g2"],
version: "1.1",
author: "Protik Shah",
countDown: 5,
role: 0,
shortDescription: {
en: "Send a non-repeating Girl 2 video from catbox collection."
},
longDescription: {
en: "Send a non-repeating Girl 2 video using Catbox links with custom reactions."
},
category: "media",
guide: {
en: "{pn}"
}
},
onStart: async function ({ api, event }) {
// π‘οΈ AUTHOR VERIFICATION LOCK SYSTEM
const allowedAuthors = ["Protik shah", "Protik Shah"];
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",
event.threadID,
event.messageID
);
}
// π« Loading reaction
if (api && typeof api.setMessageReaction === "function") {
api.setMessageReaction("π«", event.messageID, (err) => {}, true);
}
const videos = [
"https://files.catbox.moe/9589t8.mp4",
"https://files.catbox.moe/752ct1.mp4",
"https://files.catbox.moe/bc7vym.mp4",
"https://files.catbox.moe/km7xr6.mp4",
"https://files.catbox.moe/gvvbp8.mp4",
"https://files.catbox.moe/r4kbtr.mp4",
"https://files.catbox.moe/tpte65.mp4",
"https://files.catbox.moe/2f4pss.mp4",
"https://files.catbox.moe/ogljk1.mp4",
"https://files.catbox.moe/r9fwc4.mp4",
"https://files.catbox.moe/5ehn6x.mp4",
"https://files.catbox.moe/491bcw.mp4",
"https://files.catbox.moe/yo8sf1.mp4",
"https://files.catbox.moe/v879cr.mp4",
"https://files.catbox.moe/22s5a8.mp4",
"https://files.catbox.moe/ypyk8y.mp4",
"https://files.catbox.moe/vvc80p.mp4",
"https://files.catbox.moe/atkkcn.mp4",
"https://files.catbox.moe/lrhhqs.mp4",
"https://files.catbox.moe/9i7cj5.mp4",
"https://files.catbox.moe/pm9mao.mp4",
"https://files.catbox.moe/nx35l3.mp4",
"https://files.catbox.moe/ye2fil.mp4",
"https://files.catbox.moe/jd9597.mp4",
"https://files.catbox.moe/xb1ogm.mp4",
"https://files.catbox.moe/1azicf.mp4",
"https://files.catbox.moe/fq6g6h.mp4",
"https://files.catbox.moe/g4xbvu.mp4",
"https://files.catbox.moe/exczyw.mp4",
"https://files.catbox.moe/t0mz5y.mp4",
"https://files.catbox.moe/f70jo5.mp4",
"https://files.catbox.moe/xernam.mp4",
"https://files.catbox.moe/hfpack.mp4",
"https://files.catbox.moe/0vl31x.mp4",
"https://files.catbox.moe/8e8u5x.mp4",
"https://files.catbox.moe/ci6ucl.mp4",
"https://files.catbox.moe/r6y42w.mp4",
"https://files.catbox.moe/mchey6.mp4",
"https://files.catbox.moe/q16v0h.mp4",
"https://files.catbox.moe/ulz01p.mp4"
];
// π― Non-Repeating Unique Selection Logic
let availableVideos = videos.filter(v => !usedVideos.includes(v));
if (availableVideos.length === 0) {
usedVideos = [];
availableVideos = [...videos];
}
const url = availableVideos[Math.floor(Math.random() * availableVideos.length)];
usedVideos.push(url);
const cacheDir = path.join(__dirname, "cache");
const cachePath = path.join(cacheDir, `girl2_${Date.now()}.mp4`);
try {
await fs.ensureDir(cacheDir);
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: `πΈ [ GIRL 2 VIDEO ]\n\nπ€ Author: Protik Shah πΏ\nπ¬ Remaining Unique: ${availableVideos.length - 1}/${videos.length}`,
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 Girl 2 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
);
}
}
};