Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit f13a87f

Browse files
author
Nick Galbraith
committed
Add encourage.coffee
1 parent ae11cb7 commit f13a87f

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

encourage.coffee

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Description:
2+
# Robot is very encouraging
3+
#
4+
# Dependencies:
5+
# None
6+
#
7+
# Configuration:
8+
# None
9+
#
10+
# Commands:
11+
# ctctbot encourage me
12+
# ctctbot encourge name
13+
# ctctbot encourage all
14+
#
15+
# Author:
16+
# WoogieNoogie
17+
18+
remarks = [
19+
"Great job, %!",
20+
"Way to go, %!",
21+
"% is amazing, and everyone should be happy this amazing person is around.",
22+
"I wish I was more like %.",
23+
"% is good at like, 10 times more things than I am.",
24+
"%, you are an incredibly sensitive person who inspires joyous feelings in all those around you.",
25+
"%, you are crazy, but in a good way.",
26+
"% has a phenomenal attitude.",
27+
"% is a great part of the team!",
28+
"I admire %'s strength and perseverance.",
29+
"% is a problem-solver and cooperative teammate.",
30+
"% is the wind beneath my wings.",
31+
"% has a great reputation."
32+
]
33+
allinclusive = [
34+
"Great job today, everyone!",
35+
"Go team!",
36+
"Super duper, gang!",
37+
"If I could afford it, I would buy you all lunch!",
38+
"What a great group of individuals there are in here. I'm proud to be chatting with you.",
39+
"You all are capable of accomplishing whatever you set your mind to.",
40+
"I love this team's different way of looking at things!"
41+
]
42+
43+
module.exports = (robot) ->
44+
robot.respond /(encourage )(.*)/i, (msg) ->
45+
encourage = msg.random remarks
46+
47+
encouragingme = () -> msg.send encourage.replace "%", msg.message.user.name
48+
encouragingyou = () -> msg.send encourage.replace "%", msg.match[2]
49+
50+
if msg.match[2] == 'me'
51+
encouragingme()
52+
else if msg.match[2] == 'all'
53+
msg.send msg.random allinclusive
54+
else
55+
encouragingyou()

0 commit comments

Comments
 (0)