Advertisement
samiroexpikachu

Gore

Jun 26th, 2024 (edited)
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  const axios = require('axios');
  2. const { getStreamFromURL } = global.utils;
  3.  
  4. module.exports = {
  5.     config: {
  6.         name: "gore",
  7.         version: "1.0",
  8.         author: "Samir Œ",
  9.         countDown: 5,
  10.         role: 2,
  11.         shortDescription: "Fetch and send a gore video",
  12.         longDescription: "Fetches a gore video ",
  13.         category: "utility",
  14.         guide: {
  15.             vi: "Sử dụng lệnh như sau:\ngore",
  16.             en: "Use the command as follows:\ngore"
  17.         }
  18.     },
  19.     onStart: async function ({ api, message, event }) {
  20.         try {
  21.             const response = await axios.get('https://samirxpikachu.onrender.com/gore');
  22.             const { title, video1 } = response.data;
  23.  
  24.             const videoStream = await getStreamFromURL(video1);
  25.  
  26.             await message.reply({
  27.                 body: title,
  28.                 attachment: videoStream
  29.             });
  30.         } catch (error) {
  31.             console.error(error);
  32.             message.reply("An error occurred while fetching the video. Please try again.");
  33.         }
  34.     }
  35. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement