This repository was archived by the owner on Jun 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathencourage.coffee
55 lines (51 loc) · 1.56 KB
/
encourage.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
# Description:
# Robot is very encouraging
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot encourage me
# hubot encourage name
# hubot encourage all
#
# Author:
# WoogieNoogie
remarks = [
"Great job, %!",
"Way to go, %!",
"% is amazing, and everyone should be happy this amazing person is around.",
"I wish I was more like %.",
"% is good at like, 10 times more things than I am.",
"%, you are an incredibly sensitive person who inspires joyous feelings in all those around you.",
"%, you are crazy, but in a good way.",
"% has a phenomenal attitude.",
"% is a great part of the team!",
"I admire %'s strength and perseverance.",
"% is a problem-solver and cooperative teammate.",
"% is the wind beneath my wings.",
"% has a great reputation."
]
allinclusive = [
"Great job today, everyone!",
"Go team!",
"Super duper, gang!",
"If I could afford it, I would buy you all lunch!",
"What a great group of individuals there are in here. I'm proud to be chatting with you.",
"You all are capable of accomplishing whatever you set your mind to.",
"I love this team's different way of looking at things!"
]
module.exports = (robot) ->
robot.respond /(encourage )(.*)/i, (msg) ->
encourage = msg.random remarks
encouragingme = () -> msg.send encourage.replace "%", msg.message.user.name
encouragingyou = () -> msg.send encourage.replace "%", msg.match[2]
if msg.match[2] == 'me'
encouragingme()
else if msg.match[2] == 'all'
msg.send msg.random allinclusive
else
encouragingyou()