mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-18 23:15:48 +00:00
[commands] Unwrap transformers when considering them as converters
This commit is contained in:
parent
5357b9319b
commit
405c445093
@ -161,6 +161,9 @@ def get_signature_parameters(
|
|||||||
if annotation is Greedy:
|
if annotation is Greedy:
|
||||||
raise TypeError('Unparameterized Greedy[...] is disallowed in signature.')
|
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)
|
params[name] = parameter.replace(annotation=annotation)
|
||||||
|
|
||||||
return params
|
return params
|
||||||
|
Loading…
x
Reference in New Issue
Block a user