@@ -1170,7 +1170,6 @@ def component_callback(*custom_id: str | re.Pattern) -> Callable[[AsyncCallable]
1170
1170
*custom_id: The custom ID of the component to wait for
1171
1171
1172
1172
"""
1173
- resolved_custom_id : tuple [str | re .Pattern , ...] | list [str ] = []
1174
1173
1175
1174
def wrapper (func : AsyncCallable ) -> ComponentCommand :
1176
1175
resolved_custom_id = custom_id or [func .__name__ ]
@@ -1182,8 +1181,8 @@ def wrapper(func: AsyncCallable) -> ComponentCommand:
1182
1181
name = f"ComponentCallback::{ resolved_custom_id } " , callback = func , listeners = resolved_custom_id
1183
1182
)
1184
1183
1185
- custom_id = _unpack_helper (resolved_custom_id )
1186
- custom_ids_validator (* resolved_custom_id )
1184
+ custom_id = _unpack_helper (custom_id )
1185
+ custom_ids_validator (* custom_id )
1187
1186
return wrapper
1188
1187
1189
1188
@@ -1203,7 +1202,6 @@ def modal_callback(*custom_id: str | re.Pattern) -> Callable[[AsyncCallable], Mo
1203
1202
Args:
1204
1203
*custom_id: The custom ID of the modal to wait for
1205
1204
"""
1206
- resolved_custom_id : tuple [str | re .Pattern , ...] | list [str ] = []
1207
1205
1208
1206
def wrapper (func : AsyncCallable ) -> ModalCommand :
1209
1207
resolved_custom_id = custom_id or [func .__name__ ]
@@ -1213,8 +1211,8 @@ def wrapper(func: AsyncCallable) -> ModalCommand:
1213
1211
1214
1212
return ModalCommand (name = f"ModalCallback::{ resolved_custom_id } " , callback = func , listeners = resolved_custom_id )
1215
1213
1216
- custom_id = _unpack_helper (resolved_custom_id )
1217
- custom_ids_validator (* resolved_custom_id )
1214
+ custom_id = _unpack_helper (custom_id )
1215
+ custom_ids_validator (* custom_id )
1218
1216
return wrapper
1219
1217
1220
1218
0 commit comments