mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
requesting music for tripradio
Adding a command to ping the DJ that a user requests a song.
This commit is contained in:
parent
566c91a2b6
commit
7537d85084
@ -55,6 +55,26 @@ var radio = function(dbot) {
|
||||
}.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.internalAPI.getRadio();
|
||||
}.bind(this);
|
||||
|
@ -5,4 +5,8 @@
|
||||
"now_playing": {
|
||||
"en": "Now Playing: {name} - {song} - {url}"
|
||||
}
|
||||
|
||||
"request":{
|
||||
"en":"{dj}: User {user} requests '{song}' to be played on tripradio."
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user