]> git.cworth.org Git - turbot/blobdiff - turbot/blocks.py
Add a list of puzzles under each hunt on the Turbot home tab
[turbot] / turbot / blocks.py
index 5222e87e0433d248c2805ca0973396c411165dd2..27e69f4d6d9d61140a16e4fa71cd30fcfe9d75e3 100644 (file)
@@ -1,3 +1,8 @@
+def divider_block():
+    return {
+        "type": "divider"
+    }
+
 def text_block(body):
     return {
         "text": {
@@ -29,10 +34,11 @@ def button_block(label, name):
         "value": name
     }
 
-def input_block(label, name, placeholder):
+def input_block(label, name, placeholder, optional=False):
     return {
         "type": "input",
         "block_id": name,
+        "optional": optional,
         "element": {
             "type": "plain_text_input",
             "action_id": name,