3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 20:39:25 +01:00

requesting music for tripradio

Adding a command to ping the DJ that a user requests a song.
This commit is contained in:
thieson 2014-02-18 17:17:39 +01:00
parent 566c91a2b6
commit 7537d85084
2 changed files with 28 additions and 4 deletions

View File

@ -55,6 +55,26 @@ var radio = function(dbot) {
}.bind(this)); }.bind(this));
}.bind(this) }.bind(this)
}; };
//requesting music by pinging the current DJ
//dj should be icy-description inside the headers
//user should be the requesting user
//request should be the event
//TODO:pm dj
this.commands={
'~request music': function(event){
var dj=this.data['icy-description'];
var user=event.user;
var request=event;
dbot.say(dbot.t('request',{
'dj':dj,
'user':user,
'song':song
}));
}
};
this.onLoad = function() { this.onLoad = function() {
this.internalAPI.getRadio(); this.internalAPI.getRadio();
}.bind(this); }.bind(this);

View File

@ -5,4 +5,8 @@
"now_playing": { "now_playing": {
"en": "Now Playing: {name} - {song} - {url}" "en": "Now Playing: {name} - {song} - {url}"
} }
"request":{
"en":"{dj}: User {user} requests '{song}' to be played on tripradio."
}
} }