2.0.4 • Published 8 months ago

@distube/soundcloud v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@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()],
});

Search

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
2.0.4

8 months ago

1.3.5

1 year ago

1.3.4

1 year ago

2.0.3

12 months ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.0

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.0

4 years ago

0.2.1

4 years ago

0.2.2

4 years ago

0.2.0

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago