// code from goatstore // api: https://store.agi.bd const axios = require("axios"); const ytdl = require("@distube/ytdl-core"); const fs = require("fs-extra"); const { getStreamFromURL, downloadFile, formatNumber } = global.utils; async function getStreamAndSize(url, path = "") { const response = await axios({ method: "GET", url, responseType: "stream", headers: { 'Range': 'bytes=0-' } }); if (path) response.data.path = path; const totalLength = response.headers["content-length"]; return { stream: response.data, size: totalLength }; } module.exports = { config: { name: "ytb", version: "1.16", author: "NTKhang", countDown: 5, role: 0, description: { vi: "Tải video, audio hoặc xem thông tin video trên YouTube", en: "Download video, audio or view video information on YouTube" }, category: "media", guide: { vi: " {pn} [video|-v] [|]: dùng để tải video từ youtube." + "\n {pn} [audio|-a] [|]: dùng để tải audio từ youtube" + "\n {pn} [info|-i] [|]: dùng để xem thông tin video từ youtube" + "\n Ví dụ:" + "\n {pn} -v Fallen Kingdom" + "\n {pn} -a Fallen Kingdom" + "\n {pn} -i Fallen Kingdom", en: " {pn} [video|-v] [