Browse Source

[commands] Fix flag detection code in get_flags

pull/6783/head
Rapptz 4 years ago
parent
commit
8e9860077d
  1. 2
      discord/ext/commands/flags.py

2
discord/ext/commands/flags.py

@ -184,7 +184,7 @@ def get_flags(namespace: Dict[str, Any], globals: Dict[str, Any], locals: Dict[s
annotation = flag.annotation = resolve_annotation(flag.annotation, globals, locals, cache) annotation = flag.annotation = resolve_annotation(flag.annotation, globals, locals, cache)
if flag.default is MISSING and issubclass(annotation, FlagConverter) and annotation._can_be_constructible(): if flag.default is MISSING and hasattr(annotation, '__commands_is_flag__') and annotation._can_be_constructible():
flag.default = annotation._construct_default flag.default = annotation._construct_default
if flag.aliases is MISSING: if flag.aliases is MISSING:

Loading…
Cancel
Save