Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lame = require('lame')
- Speaker = require('speaker')
- Spotify = require('spotify-web')
- username = "INSERTUSERNAMEHERE"
- password = "INSERTPASSWORDHERE"
- robot.respond /play (.*)/i, (message) ->
- uri = message.match[1]
- Spotify.login(username, password, ->(err, spotify)) {
- if (err) throw err;
- console.log('Playing: %s - %s', track.artist[0].name, track.name)
- }
- spotify.get(uri, ->(err, track){
- if err throw err;
- message.send("Playing:" + track.artist[0].name, track.name)
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement