From eef8d8d3e4eb8948cf832906f6c83133e93554d2 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sun, 10 Jan 2021 15:41:57 -0800 Subject: [PATCH] Add "/new hunt" as a new sub-command of "/new" This means we now have both "/hunt new" as well as "/new hunt" that both do the same things. I'm not sure we'll want to keep both around long-term, but they are both here now so that we can experiment and see which feels more natural. --- turbot/interaction.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/turbot/interaction.py b/turbot/interaction.py index c1064bf..77a13ee 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -733,11 +733,20 @@ commands["/puzzle"] = puzzle def new(turb, body, args): """Implementation of the `/new` command - To create a new puzzle. - - This is simply a shortcut for `/puzzle new`. + This can be used to create a new hunt ("/new hunt") or a new + puzzle ("/new puzzle" or simply "/new"). So puzzle creation is the + default behavior (as it is much more common). + + This operations are identical to the existing "/hunt new" and + "/puzzle new". I don't know that that redundancy is actually + helpful in the interface. But at least having both allows us to + experiment and decide which is more natural and should be kept + around long-term. """ + if args == 'hunt': + return new_hunt_command(turb, body) + return new_puzzle(turb, body) commands["/new"] = new -- 2.43.0