@distube/spotify
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

npm peer dependency version npm GitHub Repo stars Discord

Buy Me a Coffee at ko-fi.com

@distube/spotify

A DisTube info extractor plugin for supporting Spotify.

What is an info extractor plugin?

Usage

const Discord = require("discord.js");
const client = new Discord.Client();

const { DisTube } = require("distube");
const { SpotifyPlugin } = require("@distube/spotify");
const distube = new DisTube(client, {
  plugins: [new SpotifyPlugin()],
});

Documentation

SpotifyPlugin([SpotifyPluginOptions])

  • SpotifyPluginOptions.api: (Optional) Spotify API credentials.
    • SpotifyPluginOptions.api.clientId: Client ID of your Spotify application (Optional - Used when the plugin cannot get the credentials automatically)
    • SpotifyPluginOptions.api.clientSecret: Client Secret of your Spotify application (Optional - Used when the plugin cannot get the credentials automatically)
    • SpotifyPluginOptions.api.topTracksCountry: Country code of the top artist tracks (ISO 3166-1 alpha-2 country code). Default is US.

Example

new SpotifyPlugin({
  api: {
    clientId: "SpotifyAppClientID",
    clientSecret: "SpotifyAppClientSecret",
    topTracksCountry: "VN",
  },
});

/@distube/spotify/

    Package Sidebar

    Install

    npm i @distube/spotify

    Weekly Downloads

    2,248

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    64.1 kB

    Total Files

    8

    Last publish

    Collaborators

    • skick