]> git.cworth.org Git - turbot/commitdiff
Wire up "/edit hunt" to be the same as "/hunt edit"
authorCarl Worth <cworth@cworth.org>
Mon, 11 Jan 2021 16:03:30 +0000 (08:03 -0800)
committerCarl Worth <cworth@cworth.org>
Mon, 11 Jan 2021 16:58:18 +0000 (08:58 -0800)
Just as we did for "/edit" and "/edit puzzle" before.

turbot/interaction.py

index 34aa31305427661b83825ec8849b8a8859507b8e..05bbbb88d3c09f5eade01318604df40d330484e1 100644 (file)
@@ -86,11 +86,15 @@ def edit(turb, body, args):
 
     """Implementation of the `/edit` command
 
 
     """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
     return edit_puzzle_command(turb, body)
 
 commands["/edit"] = edit