goat
command
deshi
Send a random Deshi video.
0
views
0
likes
0
installs
Aliases: deshi
raw source
const axios = require("axios");
module.exports = {
Config: {
name: "deshi",
author: "mehedi",
aliases: ["deshi"],
version: "1.0",
role: 0,
category: "media",
usage: "{pn}",
description: "Send a random Deshi video."
},
onStart: async function ({ api, event }) {
const videos = [
"1ia7-RfruD4wVcKljMDBII0b07u_vcdQy",
"1p9o4twihCEZ4Qs0aTGB65NNOSxn-7VEs",
"12VOq4pW0MGYcGLoAdXjuhKKTiBV3wKqi",
"1tQQ_tj7aF9xNpetS2X8kJLp0ea_kKrYQ",
"1o-KEM5chK1JSDcuhEAVowPkXd8K7kymi",
"1ycvCz1cAfGazfDENPhDwR0VvNKh5CgeE",
"1nq9s2zNzm9Imev3yndjIO6VdrnWcLift"
];
try {
const fileId = videos[Math.floor(Math.random() * videos.length)];
const url = `https://drive.google.com/uc?export=download&id=${fileId}`;
const response = await axios({
method: "GET",
url: url,
responseType: "stream",
maxRedirects: 10
});
return api.sendMessage(
{
body: "๐ฌ Random Deshi Video",
attachment: response.data
},
event.threadID,
event.messageID
);
} catch (error) {
console.error("Error sending Deshi video:", error);
return api.sendMessage(
"โ Couldn't load the video. Please try again.",
event.threadID,
event.messageID
);
}
}
};