From 1ef1c6f234ba7fb1f88900a664369efb1fc61efb Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 11 Jan 2021 08:03:30 -0800 Subject: [PATCH] Wire up "/edit hunt" to be the same as "/hunt edit" Just as we did for "/edit" and "/edit puzzle" before. --- turbot/interaction.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/turbot/interaction.py b/turbot/interaction.py index 34aa313..05bbbb8 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -86,11 +86,15 @@ def edit(turb, body, args): """Implementation of the `/edit` command - To edit the puzzle for the current channel. + This can be used as `/edit hunt` or `/edit puzzle`, (and if issued as + just `/edit` will default to editing the current puzzle. - This is simply a shortcut for `/puzzle edit`. + These are simply shortcuts for `/hunt edit` and `/puzzle edit`. """ + if args == "hunt": + return edit_hunt_command(turb, body) + return edit_puzzle_command(turb, body) commands["/edit"] = edit -- 2.43.0