From 8bfdfeb7e02851ac34d1933b8d4311964e562b0d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 31 Dec 2020 22:01:00 -0800 Subject: [PATCH] Make /solved reject a missing solution string And instead give an error to the user explaining the usage of the /solved command. --- turbot/interaction.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/turbot/interaction.py b/turbot/interaction.py index bb0a8db..76eb061 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -536,6 +536,10 @@ def solved(turb, body, args): if not puzzle: return bot_reply("Sorry, this is not a puzzle channel.") + if not args: + return bot_reply( + "Error, no solution provided. Usage: `/solved SOLUTION HERE`") + # Set the status and solution fields in the database puzzle['status'] = 'solved' puzzle['solution'].append(args) -- 2.43.0