]> git.cworth.org Git - turbot/commitdiff
Use consistent formatting for channel name and spreadsheet name
authorCarl Worth <cworth@cworth.org>
Sun, 27 Dec 2020 18:48:23 +0000 (10:48 -0800)
committerCarl Worth <cworth@cworth.org>
Sun, 27 Dec 2020 18:48:23 +0000 (10:48 -0800)
Specifically, using a prefix of "SOLVED: " when a puzzle is solved.

turbot/interaction.py

index 1c5b34ec620c5a616f6472d539d30243b076afb6..f69afe0168504990c069b26d00a64f4396ea2b34 100644 (file)
@@ -382,7 +382,7 @@ def set_channel_topic(turb, puzzle):
     description = ''
 
     if status == 'solved':
-        description += "Solved: `{}` ".format('`, `'.join(puzzle['solution']))
+        description += "SOLVED: `{}` ".format('`, `'.join(puzzle['solution']))
 
     description += name
 
@@ -452,8 +452,8 @@ def solved(turb, body, args):
     # And update the puzzle's description
     set_channel_topic(turb, puzzle)
 
-    # And rename the sheet to prefix with SOLVED - 
-    turbot.sheets.renameSheet(turb, puzzle['sheet_url'], 'SOLVED - ' + puzzle['name'])
+    # And rename the sheet to prefix with "SOLVED: "
+    turbot.sheets.renameSheet(turb, puzzle['sheet_url'], 'SOLVED: ' + puzzle['name'])
 
     # Finally, rename the Slack channel to add the suffix '-solved'
     rename_channel_to_solved(turb, puzzle)