Skip to content

Commit 29401b1

Browse files
LulalabyDorukyumJustaSqu1d
authored
Apply suggestions from code review
Co-authored-by: Dorukyum <[email protected]> Co-authored-by: JustaSqu1d <[email protected]> Signed-off-by: Lala Sabathil <[email protected]>
1 parent 409ec1a commit 29401b1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ These changes are available on the `master` branch, but have not yet been releas
2424
([#2421](https://github.com/Pycord-Development/pycord/pull/2421))
2525
- Added `member` data to the `raw_reaction_remove` event.
2626
([#2412](https://github.com/Pycord-Development/pycord/pull/2412))
27-
- Added `positional` argument to `commands.Flag`
27+
- Added `positional` argument to `commands.Flag`.
2828
([#2443](https://github.com/Pycord-Development/pycord/pull/2443))
2929

3030
### Fixed

discord/ext/commands/flags.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ class Flag:
8383
The maximum number of arguments the flag can accept.
8484
A negative value indicates an unlimited amount of arguments.
8585
positional: :class:`bool`
86-
Whether the flag is positional or not. There can only be one positional flag.
86+
Whether the flag is positional.
87+
A :class:`FlagConverter` can only handle one positional flag.
8788
override: :class:`bool`
8889
Whether multiple given values overrides the previous value.
8990
"""

docs/ext/commands/commands.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ This tells the parser that the ``members`` attribute is mapped to a flag named `
656656
the default value is an empty list. For greater customisability, the default can either be a value or a callable
657657
that takes the :class:`~ext.commands.Context` as a sole parameter. This callable can either be a function or a coroutine.
658658

659-
Flags can also have one of its flags be marked as positional. This means that the flag does not require a corresponding
659+
Flags can also be positional. This means that the flag does not require a corresponding
660660
value to be passed in by the user. This is useful for flags that are either optional or have a default value.
661661
For example, in the following code:
662662

@@ -667,7 +667,7 @@ For example, in the following code:
667667
reason: str = commands.flag(default='no reason')
668668
days: int = commands.flag(default=1)
669669
670-
The ``members`` flag is marked as positional, meaning that the user can invoke the command without specifying the flag
670+
The ``members`` flag is marked as positional, meaning that the user can invoke the command without explicitly specifying the flag.
671671

672672
In order to customise the flag syntax we also have a few options that can be passed to the class parameter list:
673673

0 commit comments

Comments
 (0)