-
Notifications
You must be signed in to change notification settings - Fork 0
/
knope-me.coffee
117 lines (111 loc) · 6.79 KB
/
knope-me.coffee
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Description
# Returns a Leslie Knope gif for your viewing pleasure
#
# Commands:
# hubot knope me
# hubot knope me KNOPE_THING
#
# Author:
# Kelly Shearon
knopes =
"alone": 'http://media.giphy.com/media/vwzr2ywUVcUNi/giphy.gif'
"all night work": 'http://25.media.tumblr.com/tumblr_lovezorRDv1ql01e1o1_500.gif'
"ahahahaha": 'http://media.giphy.com/media/JIqItpa38s0nK/giphy.gif'
"awesome ladies": 'http://media2.onsugar.com/files/2013/09/16/005/n/3019466/30baf1ccc5cf123b_amy-12.gif'
"this is bad": 'http://media.giphy.com/media/10ABvIA9IM29tC/giphy.gif'
"bacon": 'http://24.media.tumblr.com/d103c8630d9018b09d26054617b6b124/tumblr_mzm0eqriqu1qh5199o1_400.gif'
"best day": 'http://media.giphy.com/media/CiwvbxRORzFDO/giphy.gif'
"bitches be crazy": 'http://649point133.com/wp-content/uploads/2013/10/leslie-knope-bitches.gif'
"blech": 'http://img.photobucket.com/albums/v84/NarfNa/leslie-knope_zpsd3001f6f.gif'
"breakfast food": 'http://media.giphy.com/media/voegMISO1RHfa/giphy.gif'
"my breath": 'http://cdnl.complex.com/mp/620/400/80/0/bb/1/ffffff/c981e3fd6b4fef8a8e509409e1efc32f/images_/assets/CHANNEL_IMAGES/POP_CULTURE/2013/02/the-50-funniest-gifs-of-leslie-knope/knopemybreath_496943.gif'
"dancing together": 'http://media.giphy.com/media/m3rRq9As0ITao/giphy.gif'
"denmark destroys all": 'http://25.media.tumblr.com/tumblr_m5q72pmELp1qdvraco1_500.gif'
"duh": 'http://media1.giphy.com/media/14joII5lDkkVUc/giphy.gif'
"dessert": 'http://37.media.tumblr.com/fbb956e8f90fe6ff1eb6d5a35f9ce3cf/tumblr_n3d8xnQZkH1rvllqgo1_500.gif'
"dying": 'http://37.media.tumblr.com/75316e9f43aade4b68c42dad23fa46cf/tumblr_mrsoapHwIX1sp7ha5o1_400.gif'
"elf dance": 'http://persephonemagazine.com/wp-content/uploads/2013/12/leslie-knope-jingle-bells.gif'
"facts and science": 'http://25.media.tumblr.com/f406ba98bcb73dcc62fdc1da6bc35c57/tumblr_mx7y36972G1rt5f2yo1_500.gif'
"friendship waffles": 'http://media1.giphy.com/media/W8G8TB0tlHZWE/giphy.gif'
"i don'?t understand": 'http://gifrific.com/wp-content/uploads/2014/01/I-Dont-Understand-It-Leslie-Knope-Parks-and-Recreation.gif'
"it'?s my destiny": 'http://media.giphy.com/media/WeYuiDP3t1tkc/giphy.gif'
"i invented this game": 'http://i58.photobucket.com/albums/g246/sey115/parks-game-son_zpsf91a6fa0.gif'
"i will find you love": 'http://media.giphy.com/media/PUnelcmdYWxnq/giphy.gif'
"marijuana": 'http://media.giphy.com/media/CuSAnsgR8W5oc/giphy.gif'
"more": 'http://media.giphy.com/media/nYlVLlfYDI6FG/giphy.gif'
"moonwalk": 'http://cdnl.complex.com/mp/620/400/80/0/bb/1/ffffff/0f1e0f15af15fe07572dbb177447754f/images_/assets/CHANNEL_IMAGES/POP_CULTURE/2013/02/the-50-funniest-gifs-of-leslie-knope/knopebowling_496943.gif'
"nice to see you": 'http://media.giphy.com/media/PTq5GHSaRq6Yw/giphy.gif'
"nightmare": 'http://media1.giphy.com/media/lwLxaQew5N2I8/giphy.gif'
"nom": 'http://media.giphy.com/media/ZjZvbEhZ4UO4w/giphy.gif'
"oh fuck": 'http://s3-ec.buzzfed.com/static/2013-10/enhanced/webdr03/16/22/anigif_enhanced-buzz-30008-1381975483-20.gif'
"oh yeah": 'http://kouchpotato.in/wp-content/uploads/2012/09/scBCN.gif'
"ovaries": 'http://stupidcupidblog.files.wordpress.com/2013/06/ovaries-before-brovaries.gif'
"pants": 'http://cdn2.hellogiggles.com/wp-content/uploads/2014/01/06/knope-pantsnow.gif'
"party": 'http://24.media.tumblr.com/ac7a7a1708b7afec76004ef95ecfeafe/tumblr_mq77467Ksb1r0fjpxo6_r2_250.gif'
"penguins": 'http://media.giphy.com/media/j6sbkWQaIyBwY/giphy.gif'
"ready": 'http://media.giphy.com/media/ogO1uRPuRmAhO/giphy.gif'
"really": 'http://barnettjenna.files.wordpress.com/2013/01/tumblr_md0pqunuft1ro2d43.gif'
"right fucking now": 'http://37.media.tumblr.com/c296a1a7224cd34d82ef927031cce992/tumblr_n3dapeutQe1tpga0qo2_400.gif'
"salad": 'http://s3.amazonaws.com/inarticles/ac749e264fb5d591a4817a609f972854.gif'
"shot": 'http://comediva.com/images/stories/2012/knopeshot1127.gif'
"ice skating": 'http://media.giphy.com/media/9ENAwBZfJgSNq/giphy.gif'
"slept": 'http://media.giphy.com/media/W8yPZ5NryG1Ak/giphy.gif'
"smile": 'http://uproxx.files.wordpress.com/2013/09/leslie-knope-smiley.gif'
"sober": 'http://media.giphy.com/media/meDotqMY1aI4o/giphy.gif'
"spaceship": 'http://24.media.tumblr.com/9ebf402b79117743b5f6ea462dafb392/tumblr_n1oq0bpQQ71qa0n48o2_250.gif'
"super chill": 'http://media.giphy.com/media/g8F7mSNwdAcbS/giphy.gif'
"swanson": 'http://31.media.tumblr.com/474bb51f05a33360d70f18cbde9fd18c/tumblr_mj0vbo8n9K1s6j9xho1_500.gif'
"that is ridiculous": 'http://media.giphy.com/media/o1hnzkf9bFjYA/giphy.gif'
"text me": 'http://uproxx.files.wordpress.com/2013/09/leslie-knope-textme.gif'
"this isn'?t happening": 'http://media.giphy.com/media/11xmPfAeVMhVKw/giphy.gif'
"uh what": 'http://uproxx.files.wordpress.com/2013/09/leslie-knope-what.gif'
"victory dance": 'http://media.giphy.com/media/I6qgIy7CpgkHS/giphy.gif'
"delicious waffles": 'http://media.giphy.com/media/UaAUgixBKu9X2/giphy.gif'
"whaaaat": 'http://media.giphy.com/media/IsZhUGHkWQHcI/giphy.gif'
"winning": 'http://24.media.tumblr.com/tumblr_m8bxlmUR0T1r3i7aho1_500.gif'
random = (obj = knopes) ->
keys = Object.keys(obj)
randomNum = Math.floor(Math.random() * keys.length)
obj[keys[randomNum]]
module.exports = (robot) ->
robot.respond /knope(.*)/i, (msg) ->
knopeThing = msg.match[1]
# be very leslie if someone types it wrong.
unless knopeThing.match /^ me/
return msg.send "Oh #{msg.message.user.name}, you wild and crazy flower pot. It's `/knope me`."
# sub off 'me' and the spaces so we can match knopes keys
knopeThing = knopeThing.replace /^ me\s*/, ''
switch knopeThing
when '' # /knope me
msg.send random()
when 'dancing' # /knope me dancing
dancing =
d1: knopes['dancing together']
d2: knopes['oh yeah']
d3: knopes['victory dance']
d4: knopes['elf dance']
d5: knopes['party']
d6: knopes['moonwalk']
msg.send random(dancing)
when 'laughing' # /knope me laughing
laughing =
l1: knopes['duh']
l2: knopes['that is ridiculous']
l3: knopes['ahahahaha']
msg.send random(laughing)
when 'waffles' # /knope me waffles
waffles =
w1: knopes['friendship waffles']
w2: knopes['nom']
w3: knopes['delicious waffles']
msg.send random(waffles)
when 'what' # /knope me what
what =
wh1: knopes['whaaaat']
wh2: knopes['uh what']
msg.send random(what)
else
if knopes[knopeThing] # /knope me KNOPE_THING
msg.send knopes[knopeThing]
else
msg.send "Oh #{msg.message.user.name}, you beautiful, naive, sophisticated newborn baby. '#{knopeThing}' is not a supported knope thing."