3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 06:19:24 +01:00

get a job

This commit is contained in:
Luke Slater 2011-08-25 13:39:44 +01:00
parent 98e66a3086
commit fff206a910

19
modules/getajob.js Normal file
View File

@ -0,0 +1,19 @@
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);
};