Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getSong() {
- request.get('https://api.spotify.com/v1/me/player/currently-playing', {
- 'auth': {
- 'bearer': ''
- }
- }, function (error, response, body) {
- if (error) throw error;
- let jsonBody = JSON.parse(body);
- let name = jsonBody.item.album.artists[0].name;
- let song = jsonBody.item.name;
- client.say(target, name + " - " + song);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement