From 07760b779456872d9a8327065405a69246a8c511 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 31 Dec 2020 15:12:59 -0800 Subject: [PATCH] Make the error message from /state a little more explicit 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/turbot/interaction.py b/turbot/interaction.py index 0d2743e..df2f96f 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -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 -- 2.43.0