File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -529,8 +529,8 @@ async def _invoke(self, ctx: ApplicationContext) -> None:
529
529
if arg is None :
530
530
arg = ctx .guild .get_role (arg_id ) or arg_id
531
531
532
- elif op .input_type == SlashCommandOptionType .string and op ._converter is not None :
533
- arg = await op . _converter . convert (ctx , arg )
532
+ elif op .input_type == SlashCommandOptionType .string and ( converter := op .converter ) is not None :
533
+ arg = await converter . convert (converter , ctx , arg )
534
534
535
535
kwargs [op ._parameter_name ] = arg
536
536
@@ -626,11 +626,11 @@ def __init__(
626
626
) -> None :
627
627
self .name : Optional [str ] = kwargs .pop ("name" , None )
628
628
self .description = description or "No description provided"
629
- self ._converter = None
629
+ self .converter = None
630
630
self .channel_types : List [SlashCommandOptionType ] = kwargs .pop ("channel_types" , [])
631
631
if not isinstance (input_type , SlashCommandOptionType ):
632
632
if hasattr (input_type , "convert" ):
633
- self ._converter = input_type
633
+ self .converter = input_type
634
634
input_type = SlashCommandOptionType .string
635
635
else :
636
636
_type = SlashCommandOptionType .from_datatype (input_type )
You can’t perform that action at this time.
0 commit comments