From: Carl Worth <cworth@cworth.org>
Date: Mon, 11 Jan 2021 16:03:30 +0000 (-0800)
Subject: Wire up "/edit hunt" to be the same as "/hunt edit"
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=1ef1c6f234ba7fb1f88900a664369efb1fc61efb;p=turbot

Wire up "/edit hunt" to be the same as "/hunt edit"

Just as we did for "/edit" and "/edit puzzle" before.
---

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