From 114c095ba06d72bd924c2d1c8d3c52a96b84ffc7 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sun, 27 Dec 2020 10:48:23 -0800 Subject: [PATCH] Use consistent formatting for channel name and spreadsheet name Specifically, using a prefix of "SOLVED: " when a puzzle is solved. --- turbot/interaction.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/turbot/interaction.py b/turbot/interaction.py index 1c5b34e..f69afe0 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -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) -- 2.43.0