Berikut adalah kode yang sudah ditulis ulang tanpa looping:

const { ytmp4 } = require('@ruhend/scraper');

exports.on = async (msg, { conn, command, text, mess, ceklimit, limitnya }) => {
  try {
    const name = ['DOWNLOADER'];
    const tag = ['ytmp4'];
    const help = ['ytmp4', 'ytv'];
    const limit = 4;

    if (help.includes(command)) {
      if (ceklimit) {
        return msg.reply(mess.limit);
      }
      if (!text) {
        return msg.reply('*Masukan Link Youtubenya*');
      }
      msg.reply('Tunggu...');
      let { title, video, quality, thumbnail, size } = await ytmp4(text);
      conn.sendFile(msg.chat, video, {
        caption: `🎗Youtube Video 
Judul : ${title}
Kualitas : ${quality}
Size : ${size}`,
        quoted: msg
      });
      limitnya(msg.sender, limit);
    }
  } catch (err) {
    console.error(err);
  }
};

原文地址: https://www.cveoy.top/t/topic/o62o 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录