1.0.7 • Published 1 year ago

discord-torrent v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Discord-torrent

Example usage

const Discord = require("discord.js");
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder } = require('discord.js');

const torrent_module = require('discord-torrent')
const torrent = require('discord-torrent')

module.exports = {
    name: "torrent",
    aliases: ['1337x'],
    description: "search torrent",
    usage: ".torrent <torrent name>",
    run: async (client, message, args) => {
    if(!args.length) {
        return message.channel.send("What do you want to download?")
          }


      message.channel.send({ content: "`Searching...`" })
      let query = "";
      args.map(string=> {
          query += " " + string;
      });
      torrent_module.grabTorrents(query)
      .then(torrentArray => {

          if (torrentArray.length > 0)
          {

              const torrentList = new EmbedBuilder()
              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
          {
              
            const error = new EmbedBuilder()
            .setTitle("Not found")
            .addFields({ name: 'Message', value: 'Torrent not found!.', inline: true })
            .setTimestamp()
            message.reply({ embeds: [error] });
              
          }

      });
   
  }}

enter image description here

Invite:

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago