/
pee.js
44 lines (40 loc) · 1.14 KB
/
pee.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const util = require('../util.js');
/* offer Pee */
function Pee(bot) {
var cmd = '!!pee', state = 1;
function stateHandler(ce) {
switch (state) {
case 1:
bot.send('That is gross ....');
state = 2;
break;
case 2:
bot.send('Open the floodgates ....');
state = 3;
break;
case 3:
bot.send('Let\'s build some dykes ....');
state = 4;
break;
case 4:
bot.send('Evacuate the room, woman and children first!');
state = 5;
setTimeout(function () {
bot.send('What a mess ...');
},
util.getRandomArbitrary(util.minutes(1), util.minutes(2)));
setTimeout(function () { state = 1; },
util.getRandomArbitrary(util.minutes(6), util.minutes(8)));
break;
default:
// stay quiet
break;
}
}
return {
command: cmd,
events: [1, 2],
next: stateHandler
};
}
module.exports = Pee