3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-28 05:32:50 +01:00

spotify module uses addHandler [#344] also spaceinvader sort your bloody indentation out

This commit is contained in:
reality 2013-04-12 19:17:22 +00:00
parent 0f298bd061
commit 6134f97a97

View File

@ -58,14 +58,13 @@ var spotify = function(dbot) {
}
};
commands['~spotify'].regex = [/^~spotify (.*)/, 2];
this.listener = function(event) {
var spotifyMatches = event.message.match(this.spotifyRegex);
if (spotifyMatches != null) {
this.lookup(event, spotifyMatches[0]);
}
}.bind(this);
this.on = 'PRIVMSG';
this.commands = commands;
this.onLoad = function() {
dbot.api.link.addHandler(this.name, this.spotifyRegex, function(event, matches, name) {
this.lookup(event, matches[0]);
}.bind(this));
}.bind(this);
};
exports.fetch = function(dbot) {