Skip to content

Commit

Permalink
fix(core): explain peeking during parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Citymonstret committed Sep 1, 2024
1 parent 8249152 commit c82c500
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,12 @@ A parser can fail when the input does not match the expectations.
The command manager will turn the failure into a command syntax exception which can then be displayed to the
sender, informing them about what went wrong.

<!-- prettier-ignore -->
!!! note
Cloud v2 does not require you to peek before consuming from the `CommandInput`. The input is defensively copied
before being passed to the parser, unlike in Cloud v1. You may still want to peek in order to determine _how_
to parse the input, but it is no longer considered incorrect not to do so.

The recommended way of parsing an argument is to:

1. Peek the command input.
Expand Down

0 comments on commit c82c500

Please sign in to comment.