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

A DisTube extractor plugin for supporting SoundCloud.

2.0.4
latest
Source
npmnpm
Version published
Weekly downloads
987
3.24%
Maintainers
1
Weekly downloads
 
Created
Source

npm peer dependency version npm GitHub Repo stars Discord

Buy Me a Coffee at ko-fi.com

@distube/soundcloud

A DisTube extractor plugin for supporting SoundCloud.

Feature

  • Using SoundCloud API
  • Support SoundCloud tracks, albums and playlists
  • Search tracks/playlists on SoundCloud
  • Play tracks directly from SoundCloud

Installation

npm install @distube/soundcloud@latest

Usage

Plugin

import { Client } from "discord.js";
import { DisTube } from "distube";
import { SoundCloudPlugin } from "@distube/soundcloud";

const client = new Client();

const distube = new DisTube(client, {
  plugins: [new SoundCloudPlugin()],
});
const scPlugin = new SoundCloudPlugin();
scPlugin.search("A SoundCloud Playlist", "playlist", 3);

Documentation

new SoundCloudPlugin([SoundCloudPluginOptions])

  • SoundCloudPluginOptions.clientId [string] (optional): Your account's client id.
  • SoundCloudPluginOptions.oauthToken [string] (optional): Your account's oauth token. Used to fetch more data with SoundCloud Go+ account.
  • How to get clientId and oauthToken? See here

Example

new SoundCloudPlugin({
  clientId: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  oauthToken: "0-000000-000000000-xxxxxxxxxxxxxx",
});

SoundCloudPlugin#search(query, [type], [limit])

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 27 Oct 2024

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.