X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=turbot%2Finteraction.py;h=7f93c040ce8c4a5406adecf80104ab84c8e47d27;hb=30846beeed5db3c857a19f75a91dc33c014c9204;hp=8bff8bc3cbc656571ca0a953a5002d9f7659ec3d;hpb=29c36d3057c5602c5a4b6fb0e48f454db01ddd9d;p=turbot diff --git a/turbot/interaction.py b/turbot/interaction.py index 8bff8bc..7f93c04 100644 --- a/turbot/interaction.py +++ b/turbot/interaction.py @@ -81,6 +81,19 @@ def multi_static_select(turb, payload): actions['multi_static_select'] = {"*": multi_static_select} +def edit(turb, body, args): + """Implementation of the `/edit` command + + To edit the puzzle for the current channel. + + This is simply a shortcut for `/puzzle edit`. + """ + + return edit_puzzle_command(turb, body) + +commands["/edit"] = edit + + def edit_puzzle_command(turb, body): """Implementation of the `/puzzle edit` command @@ -696,6 +709,18 @@ def puzzle(turb, body, args): 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`. + """ + + return new_puzzle(turb, body) + +commands["/new"] = new + def new_puzzle(turb, body): """Implementation of the "/puzzle new" command