]> git.cworth.org Git - turbot/blobdiff - turbot/puzzle.py
Add a "meta" checkbox when creating/editing a puzzle
[turbot] / turbot / puzzle.py
index 5384ef10c96c4e1889265a03ab0324490ee6484e..8137de7f87399ab4d047c03aa9067335ececbd74 100644 (file)
@@ -73,6 +73,10 @@ def puzzle_blocks(puzzle, include_rounds=False):
     if len(solution):
         solution_str = "*`" + '`, `'.join(solution) + "`*"
 
+    meta_str = ''
+    if puzzle.get('type', 'plain') == 'meta':
+        meta_str = "*META* "
+
     links = []
     if url:
         links.append("<{}|Puzzle>".format(url))
@@ -91,8 +95,9 @@ def puzzle_blocks(puzzle, include_rounds=False):
             ", ".join(rounds)
         )
 
-    puzzle_text = "{}{} <{}|{}> ({}){}{}".format(
+    puzzle_text = "{}{} {}<{}|{}> ({}){}{}".format(
         status_emoji, solution_str,
+        meta_str,
         channel_url(channel_id), name,
         ', '.join(links), rounds_str,
         state_str