1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | module.exports = (robot) ->
|
20 | robot.hear regex, (msg) ->
|
21 | msg.send msg.random images
|
22 |
|
23 | gaffes = [
|
24 | 'i ha(ve|s) no idea',
|
25 | '(wh|)oops(|ie)',
|
26 | 'my (bad|mistake|fault)',
|
27 | 'd(\')oh'
|
28 | ]
|
29 |
|
30 | images = [
|
31 | 'http://i.imgur.com/XhZzd2h.jpg',
|
32 | 'http://i.imgur.com/GtgkJ38.jpg',
|
33 | 'http://i.imgur.com/Jv3qULQ.jpg',
|
34 | 'http://i.imgur.com/1hrVmZD.jpg',
|
35 | 'http://i.imgur.com/xC0JCFK.jpg',
|
36 | 'http://i.imgur.com/kFNAAeX.jpg',
|
37 | 'http://i.imgur.com/9s62t7y.jpg',
|
38 | 'http://i.imgur.com/ugZ2tGn.jpg',
|
39 | 'http://i.imgur.com/DeyWrC2.jpg',
|
40 | 'http://i.imgur.com/tkbLyTG.jpg',
|
41 | 'http://i.imgur.com/g8EbISz.jpg',
|
42 | 'http://i.imgur.com/RuFZdPR.jpg',
|
43 | 'http://i.imgur.com/YLEM3Ns.jpg',
|
44 | 'http://i.imgur.com/1TWbKbW.jpg'
|
45 | ]
|
46 |
|
47 | regex = new RegExp gaffes.join('|'), 'ig'
|