]> git.cworth.org Git - turbot/commitdiff
Make the error message from /state a little more explicit
authorCarl Worth <cworth@cworth.org>
Thu, 31 Dec 2020 23:12:59 +0000 (15:12 -0800)
committerCarl Worth <cworth@cworth.org>
Fri, 1 Jan 2021 05:46:27 +0000 (21:46 -0800)
Specifically, make it clear that it was /state that caused the error.

(This is useful because the /state command doesn't get insterted into
the channel history but the error response does. So repeating this in
the error message can make things more clear if the conversation is
referred to by the user later.)

turbot/interaction.py

index 0d2743e20fe3ddc8a5703d71435cf99f75d02b33..df2f96f634da97af16b79973fad1ae207aa6aa5b 100644 (file)
@@ -444,7 +444,8 @@ def state(turb, body, args):
     puzzle = puzzle_for_channel(turb, channel_id)
 
     if not puzzle:
-        return bot_reply("Sorry, this is not a puzzle channel.")
+        return bot_reply(
+            "Sorry, the /state command only works in a puzzle channel")
 
     # Set the state field in the database
     puzzle['state'] = args