dbot/modules/getajob.js

20 lines
445 B
JavaScript
Raw Normal View History

2011-08-25 14:39:44 +02:00
var getAJob = function(dbot) {
var dbot = dbot;
return {
'listener': function(data) {
var num = Math.floor(Math.random()*101);
console.log(num);
if(num == 50 || data.message.indexOf('bored') !== -1) {
dbot.say(data.channel, data.user + ': Get a job!');
}
},
'on': 'PRIVMSG'
};
};
exports.fetch = function(dbot) {
return getAJob(dbot);
};