Skip to content

Commit

Permalink
Undo on failed args when the default exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomatree committed Dec 29, 2023
1 parent 9bf443e commit 1cfc21d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions revolt/ext/commands/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ async def parse_arguments(self, context: Context[ClientT_Co_D]) -> None:
except StopIteration:
if parameter.default is not parameter.empty:
arg = parameter.default
context.view.undo()
else:
raise

Expand Down

0 comments on commit 1cfc21d

Please sign in to comment.