diff options
| author | Rapptz <[email protected]> | 2021-04-20 08:02:27 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-20 08:02:40 -0400 |
| commit | 6065329c0e9a137f14503720fa088ded658cd3ad (patch) | |
| tree | a5629f10edfb580abdfd5f45030dc29cf5fd0eaf | |
| parent | [commands] Default construct flags if they're not passed as parameters (diff) | |
| download | discord.py-6065329c0e9a137f14503720fa088ded658cd3ad.tar.xz discord.py-6065329c0e9a137f14503720fa088ded658cd3ad.zip | |
[commands] Avoid creating unnecessary flag mapping copies
| -rw-r--r-- | discord/ext/commands/flags.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/ext/commands/flags.py b/discord/ext/commands/flags.py index 08f77d93..460774db 100644 --- a/discord/ext/commands/flags.py +++ b/discord/ext/commands/flags.py @@ -431,7 +431,7 @@ class FlagConverter(metaclass=FlagsMeta): @classmethod def parse_flags(cls, argument: str) -> Dict[str, List[str]]: result: Dict[str, List[str]] = {} - flags = cls.get_flags() + flags = cls.__commands_flags__ last_position = 0 last_flag: Optional[Flag] = None @@ -502,7 +502,7 @@ class FlagConverter(metaclass=FlagsMeta): The flag converter instance with all flags parsed. """ arguments = cls.parse_flags(argument) - flags = cls.get_flags() + flags = cls.__commands_flags__ self: F = cls.__new__(cls) for name, flag in flags.items(): |