The Spotify Command for Botyo posts a Spotify song to the chat.
#spotify <track>
For example:
#spotify Don't Let Me Down
#spotify Tyga - Dope
- you can optionally include the artist for a more relevant result
You need to register your application on the Spotify Developer website, as described in the Web API Tutorial in order to obtain a client ID and secret. These need to be set in the module configuration, as shown in the example below.
Step 1. Install the module from npm.
npm install --save botyo-command-spotify
Step 2. Register the module.
import Botyo from "botyo";
import SpotifyCommand from "botyo-command-spotify"
Botyo.builder()
...
.registerModule(SpotifyCommand)
...
.build()
.start();
modules:
SpotifyCommand:
market: US # An ISO 3166-1 alpha-2 country code. Only tracks playable in that market will be returned.
clientId: YOUR_CLIENT_ID
clientSecret: YOUR_CLIENT_SECRET