Skip to content

Commit c82c500

Browse files
committed
fix(core): explain peeking during parsing
1 parent 8249152 commit c82c500

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/core/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,12 @@ A parser can fail when the input does not match the expectations.
637637
The command manager will turn the failure into a command syntax exception which can then be displayed to the
638638
sender, informing them about what went wrong.
639639

640+
<!-- prettier-ignore -->
641+
!!! note
642+
Cloud v2 does not require you to peek before consuming from the `CommandInput`. The input is defensively copied
643+
before being passed to the parser, unlike in Cloud v1. You may still want to peek in order to determine _how_
644+
to parse the input, but it is no longer considered incorrect not to do so.
645+
640646
The recommended way of parsing an argument is to:
641647

642648
1. Peek the command input.

0 commit comments

Comments
 (0)