-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathresponses.py
37 lines (34 loc) · 970 Bytes
/
responses.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
attachm = [
{
"callback_id": "confirm_post",
"fallback": "New job posting",
"title": "Your job post",
"color": "#7CD197",
"actions": [
{
"type": "button",
"text": "Post It!!",
"name": "PostJob",
"style": "primary"
},
{
"type": "button",
"text": "I've changed my mind!",
"name": "cancelled_job",
"style": "danger"
}
]
}
]
attachm_update = [
{
"callback_id": "confirmed",
"fallback": "Posted",
"title": "Done",
"text": "job posted",
"color": "#7CD197",
}
]
def make_response(jtype, location, job_title, salary, message, contact):
salary = salary or 'Salary not supplied'
return f"*[{jtype}] [{location}] [{job_title}] [{salary}]* {message}. Contact <@{contact}> for information!"