🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@distube/soundcloud

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@distube/soundcloud

Soundcloud plugin for DisTube.js.org

Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
765
-0.78%
Maintainers
1
Weekly downloads
 
Created
Source

@distube/soundcloud

SoundCloud extractor plugin for DisTube.js.org. Required DisTube version >= 3.0.0.

Feature

  • Using SoundCloud API
  • Support tracks, playlist
  • Search tracks/playlists
  • Faster than youtube-dl extractor

Installation

npm install @distube/soundcloud

Usage

const Discord = require('discord.js')
const DisTube = require('distube')
const SoundCloudPlugin = require("@distube/soundcloud")
const client = new Discord.Client()
const distube = new DisTube(client, {
    searchSongs: 10,
    emitNewSongOnly: true,
    plugins: [new SoundCloudPlugin()]
})

// Now distube.play can play spotify url.

client.on('message', message => {
	if (message.author.bot) return
	if (!message.content.startsWith(config.prefix)) return
	const args = message.content.slice(config.prefix.length).trim().split(/ +/g)
	const command = args.shift()
	if (command === 'play') distube.play(message, args.join(' '))
})

Documentation

new SoundCloudPlugin()

Create a DisTube's ExtractorPlugin

SoundCloudPlugin.search(query, [type], [limit]) (Both static and class method)

Searches for the given query on SoundCloud.

  • Parameters

    • query [string] Search query.
    • type [string]: Type of results (track or playlist). Default is track.
    • limit [integer]: Limit the results. Default is 10.
  • Returns a Promise<Song[]|Playlist[]>

    • Returns a Promise<Song[]> if type parameter is track
    • Returns a Promise<Playlist[]> if type parameter is playlist

Keywords

distube

FAQs

Package last updated on 25 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts