mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-03 08:35:53 +00:00
[commands] Set constructible FlagConverter flags to not be required
This commit is contained in:
@ -184,6 +184,9 @@ def get_flags(namespace: Dict[str, Any], globals: Dict[str, Any], locals: Dict[s
|
||||
|
||||
annotation = flag.annotation = resolve_annotation(flag.annotation, globals, locals, cache)
|
||||
|
||||
if flag.default is MISSING and issubclass(annotation, FlagConverter) and annotation._can_be_constructible():
|
||||
flag.default = annotation._construct_default
|
||||
|
||||
if flag.aliases is MISSING:
|
||||
flag.aliases = []
|
||||
|
||||
|
Reference in New Issue
Block a user