SHARE
TWEET

Untitled

a guest Feb 29th, 2020 168 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getSong() {
  2.     request.get('https://api.spotify.com/v1/me/player/currently-playing', {
  3.         'auth': {
  4.             'bearer': ''
  5.         }
  6.     }, function (error, response, body) {
  7.         if (error) throw error;
  8.         let jsonBody = JSON.parse(body);
  9.         let name = jsonBody.item.album.artists[0].name;
  10.         let song = jsonBody.item.name;
  11.         client.say(target, name + " - " + song);
  12.     });
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top