channel_id = puzzle['channel_id']
url = puzzle.get('url', None)
sheet_url = puzzle.get('sheet_url', None)
+ state = puzzle.get('state', None)
status_emoji = ''
solution_str = ''
if sheet_url:
links.append("<{}|Sheet>".format(sheet_url))
- puzzle_text = "{}{} <{}|{}> ({})".format(
+ state_str = ''
+ if state:
+ state_str = "\n{}".format(state)
+
+ puzzle_text = "{}{} <{}|{}> ({}){}".format(
status_emoji, solution_str,
channel_url(channel_id), name,
- ', '.join(links)
+ ', '.join(links), state_str
)
return section_block(text_block(puzzle_text))
# Validate that the puzzle_id contains no invalid characters
if not re.match(valid_id_re, puzzle_id):
return submission_error("puzzle_id",
- "Puzzle ID can only contain lowercase letters, "
- + "numbers, and underscores")
+ "Puzzle ID can only contain lowercase letters,"
+ + " numbers, and underscores")
# Create a channel for the puzzle
hunt_dash_channel = "{}-{}".format(hunt_id, puzzle_id)