mirror of
https://github.com/reality/dbot.git
synced 2024-11-23 12:29:26 +01:00
get a job
This commit is contained in:
parent
98e66a3086
commit
fff206a910
19
modules/getajob.js
Normal file
19
modules/getajob.js
Normal 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);
|
||||
};
|
Loading…
Reference in New Issue
Block a user