forked from OperationCode/operationcode-pybot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent_messages.py
109 lines (99 loc) · 3.77 KB
/
event_messages.py
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
from typing import List
def team_join_initial_message(user_id: str) -> str:
return (
f"Hi <@{user_id}>,\n\n"
"Welcome to Operation Code! I'm a bot designed to help answer questions and "
"get you on your way in our community.\n\n "
"Our goal here at Operation Code is to get veterans and their families started on the path to a career "
"in programming. We do that through providing you with scholarships, mentoring, career development "
"opportunities, conference tickets, and more!\n"
)
def second_team_join_message() -> str:
return (
"Much of the provided aid requires veteran or military spouse status. Please verify your status on "
"your profile at https://operationcode.org/ if you haven't already.\n\n"
"You're currently in Slack, a chat application that serves as the hub of Operation Code. "
"If you're visiting us via your browser, Slack provides a stand alone program to make staying in "
"touch even more convenient.\n\n"
"All active Operation Code projects are located on our source control repository. "
"Our projects can be viewed on GitHub\n\n"
"Lastly, please take a moment to review our Code of Conduct."
)
def external_button_attachments() -> List[dict]:
return [
{
"text": "",
"fallback": "",
"color": "#3AA3E3",
"callback_id": "external_buttons",
"attachment_type": "default",
"actions": [
{
"name": "github",
"text": "GitHub",
"type": "button",
"value": "github",
"url": "https://github.com/OperationCode",
},
{
"name": "download",
"text": "Slack Client",
"type": "button",
"value": "download",
"url": "https://slack.com/downloads",
},
{
"name": "code_of_conduct",
"text": "Code of Conduct",
"type": "button",
"value": "code_of_conduct",
"url": "https://github.com/OperationCode/community/blob/master/code_of_conduct.md",
},
],
}
]
def base_resources():
return [
{
"text": "",
"fallback": "",
"color": "#3AA3E3",
"callback_id": "resource_buttons",
"attachment_type": "default",
"actions": [
{
"name": "javascript",
"text": "JavaScript",
"type": "button",
"value": "javascript",
},
{
"name": "python",
"text": "Python",
"type": "button",
"value": "python",
},
{"name": "ruby", "text": "Ruby", "type": "button", "value": "ruby"},
],
},
{
"text": "",
"fallback": "",
"color": "#3AA3E3",
"callback_id": "suggestion",
"attachment_type": "default",
"actions": [
{
"name": "suggestion_button",
"text": "Are we missing something? Click!",
"type": "button",
"value": "suggestion_button",
}
],
},
]
def profile_suggestion_message(channels):
message = "We found some channels that you might be interested in based on your profile information.\n"
for channel, name in channels:
message += f"<#{channel}|{name}> "
return message