Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1178 from minton/rebootspot

Add command to restart Spotify client.
  • Loading branch information...
commit 68ace2aaefb50146e8ca9429b3cc65bc9bc15f76 2 parents 82ee1c5 + 7e91051
@technicalpickles technicalpickles authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/scripts/spot.coffee
View
7 src/scripts/spot.coffee
@@ -23,6 +23,7 @@
# hubot say <message> - Tells hubot to read a message aloud.
# hubot find <song> - See if Spotify knows about a song without attempting to play it.
# hubot airplay <Apple TV> - Tell Spot to broadcast to the specified Apple TV.
+# hubot spot - Start or restart the Spotify client.
#
# Author:
# mcminton
@@ -107,4 +108,8 @@ module.exports = (robot) ->
robot.respond /airplay (.*)/i, (message) ->
params = {atv: message.match[1]}
spotRequest message, '/airplay', 'put', params, (err, res, body) ->
- message.send("#{body} :mega:")
+ message.send("#{body} :mega:")
+
+ robot.respond /spot/i, (message) ->
+ spotRequest message, '/spot', 'put', {}, (err, res, body) ->
+ message.send(body)
Please sign in to comment.
Something went wrong with that request. Please try again.