From: Carl Worth Date: Sun, 27 Dec 2020 18:48:23 +0000 (-0800) Subject: Use consistent formatting for channel name and spreadsheet name X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=114c095ba06d72bd924c2d1c8d3c52a96b84ffc7;p=turbot Use consistent formatting for channel name and spreadsheet name Specifically, using a prefix of "SOLVED: " when a puzzle is solved. --- 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)