File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 2424"""
2525
2626from __future__ import annotations
27+
28+ import inspect
2729from typing import (
2830 TYPE_CHECKING ,
2931 Any ,
3234 Generic ,
3335 TypeVar ,
3436)
35- from typing_extensions import Self
3637
37- import inspect
38+ from typing_extensions import Self
3839
3940from ..interactions import Interaction
4041
@@ -77,11 +78,11 @@ def __init__(
7778
7879 def __call__ (self , interaction : Interaction ) -> Coroutine [Any , Any , Any ]:
7980 if self .parameters_amount == 1 :
80- return self .func (interaction ) # type: ignore # type checker doesn't like optional params
81+ return self .func (interaction ) # type: ignore # type checker doesn't like optional params
8182 elif self .parameters_amount == 2 :
82- return self .func (interaction , self .item ) # type: ignore # type checker doesn't like optional params
83+ return self .func (interaction , self .item ) # type: ignore # type checker doesn't like optional params
8384 elif self .parameters_amount == 3 :
84- return self .func (interaction , self .item , self .item .view ) # type: ignore # type checker doesn't like optional params
85+ return self .func (interaction , self .item , self .item .view ) # type: ignore # type checker doesn't like optional params
8586 else :
8687 raise TypeError ("callback must accept 1 to 3 parameters" )
8788
You can’t perform that action at this time.
0 commit comments