[commands] Unwrap transformers when considering them as converters

This commit is contained in:
Rapptz 2022-04-21 03:19:11 -04:00
parent 5357b9319b
commit 405c445093

View File

@ -161,6 +161,9 @@ def get_signature_parameters(
if annotation is Greedy:
raise TypeError('Unparameterized Greedy[...] is disallowed in signature.')
if isinstance(annotation, discord.app_commands.transformers._TransformMetadata):
annotation = annotation.metadata
params[name] = parameter.replace(annotation=annotation)
return params