This commit is contained in:
Luke Slater 2012-02-15 21:04:01 +00:00
parent 4aed2a700c
commit a9af977f9d

View File

@ -42,13 +42,14 @@ var drama = function(dbot) {
dbot.say(data.channel, '\'' + msg + '\' classified as \'' + category + '\''); dbot.say(data.channel, '\'' + msg + '\' classified as \'' + category + '\'');
}, },
'~classify': function(data, params) { },
params.splice(0, 1);
var msg = params.join(' '); '~classify': function(data, params) {
bayes.classify(msg, function(category) { params.splice(0, 1);
dbot.say(data.channel, 'Classified as: ' + category + '!'); var msg = params.join(' ');
}.bind(this)); bayes.classify(msg, function(category) {
} dbot.say(data.channel, 'Classified as: ' + category + '!');
}.bind(this));
} }
} }