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?_](https://github.com/skick1234/DisTube/wiki/Projects-Hub#plugins) ## Usage ```js 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 ```js new SpotifyPlugin({ api: { clientId: "SpotifyAppClientID", clientSecret: "SpotifyAppClientSecret", topTracksCountry: "VN", }, }); ```