@distube/spotify
v2.0.2
Published
A DisTube extractor plugin for supporting Spotify.
Downloads
5,895
Readme
@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 isUS
.
Example
new SpotifyPlugin({
api: {
clientId: "SpotifyAppClientID",
clientSecret: "SpotifyAppClientSecret",
topTracksCountry: "VN",
},
});