constDiscord=require("discord.js");const{ EmbedBuilder, ActionRowBuilder, ButtonBuilder }=require('discord.js');consttorrent_module=require('discord-torrent')consttorrent=require('discord-torrent')module.exports={name: "torrent",aliases: ['1337x'],description: "search torrent",usage: ".torrent <torrent name>",run: async(client,message,args)=>{if(!args.length){returnmessage.channel.send("What do you want to download?")}message.channel.send({content: "`Searching...`"})letquery="";args.map(string=>{query+=" "+string;});torrent_module.grabTorrents(query).then(torrentArray=>{if(torrentArray.length>0){consttorrentList=newEmbedBuilder()torrentArray.map((torrent)=>{torrentList.addFields({name : `${torrent.number}. ${torrent.title}`,value : `${torrent.magnet} | Seeders: ${torrent.seeds} | Size: ${torrent.size} | Time: ${torrent.time}`})});message.reply({embeds: [torrentList]});//Send them the list of torrents in the channel}else{consterror=newEmbedBuilder().setTitle("Not found").addFields({name: 'Message',value: 'Torrent not found!.',inline: true}).setTimestamp()message.reply({embeds: [error]});}});}}