diff --git a/modules/getajob.js b/modules/getajob.js new file mode 100644 index 0000000..1202084 --- /dev/null +++ b/modules/getajob.js @@ -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); +};