Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 68ace2a

Browse files
Merge pull request #1178 from minton/rebootspot
Add command to restart Spotify client.
2 parents 82ee1c5 + 7e91051 commit 68ace2a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/scripts/spot.coffee

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# hubot say <message> - Tells hubot to read a message aloud.
2424
# hubot find <song> - See if Spotify knows about a song without attempting to play it.
2525
# hubot airplay <Apple TV> - Tell Spot to broadcast to the specified Apple TV.
26+
# hubot spot - Start or restart the Spotify client.
2627
#
2728
# Author:
2829
# mcminton
@@ -107,4 +108,8 @@ module.exports = (robot) ->
107108
robot.respond /airplay (.*)/i, (message) ->
108109
params = {atv: message.match[1]}
109110
spotRequest message, '/airplay', 'put', params, (err, res, body) ->
110-
message.send("#{body} :mega:")
111+
message.send("#{body} :mega:")
112+
113+
robot.respond /spot/i, (message) ->
114+
spotRequest message, '/spot', 'put', {}, (err, res, body) ->
115+
message.send(body)

0 commit comments

Comments
 (0)