-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblocks.py
71 lines (71 loc) · 1.97 KB
/
blocks.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
poll_input_block = [
{
"type": "input",
"block_id": "type",
"element": {
"type": "static_select",
"placeholder": {
"type": "plain_text",
"text": "Select a type of poll",
},
"options": [
{
"text": {"type": "plain_text", "text": "Single Choice"},
"value": "radio_buttons",
},
{
"text": {"type": "plain_text", "text": "Multi Choice"},
"value": "checkboxes",
},
],
"action_id": "multi_static_select-action",
},
"label": {
"type": "plain_text",
"text": "Type of Poll",
},
},
{
"type": "input",
"block_id": "question",
"element": {
"type": "plain_text_input",
"action_id": "question-action",
"placeholder": {
"type": "plain_text",
"text": "Enter the question",
},
},
"label": {"type": "plain_text", "text": "Question"},
},
{
"type": "input",
"block_id": "choices",
"element": {
"type": "plain_text_input",
"multiline": True,
"action_id": "choices-action",
"placeholder": {
"type": "plain_text",
"text": "Enter the choices (Each on new line)",
},
},
"label": {"type": "plain_text", "text": "Choices"},
},
{
"type": "input",
"block_id": "channels",
"element": {
"type": "multi_channels_select",
"placeholder": {
"type": "plain_text",
"text": "Select channels",
},
"action_id": "channels-action",
},
"label": {
"type": "plain_text",
"text": "Channels for the Poll",
},
},
]