|
|
@ -99,19 +99,19 @@ T = TypeVar('T') |
|
|
|
F = TypeVar('F', bound=Callable[..., Any]) |
|
|
|
GroupT = TypeVar('GroupT', bound='Binding') |
|
|
|
Coro = Coroutine[Any, Any, T] |
|
|
|
UnboundError = Callable[['Interaction', AppCommandError], Coro[Any]] |
|
|
|
UnboundError = Callable[['Interaction[Any]', AppCommandError], Coro[Any]] |
|
|
|
Error = Union[ |
|
|
|
Callable[[GroupT, 'Interaction', AppCommandError], Coro[Any]], |
|
|
|
Callable[[GroupT, 'Interaction[Any]', AppCommandError], Coro[Any]], |
|
|
|
UnboundError, |
|
|
|
] |
|
|
|
Check = Callable[['Interaction'], Union[bool, Coro[bool]]] |
|
|
|
Check = Callable[['Interaction[Any]'], Union[bool, Coro[bool]]] |
|
|
|
Binding = Union['Group', 'commands.Cog'] |
|
|
|
|
|
|
|
|
|
|
|
if TYPE_CHECKING: |
|
|
|
CommandCallback = Union[ |
|
|
|
Callable[Concatenate[GroupT, 'Interaction', P], Coro[T]], |
|
|
|
Callable[Concatenate['Interaction', P], Coro[T]], |
|
|
|
Callable[Concatenate[GroupT, 'Interaction[Any]', P], Coro[T]], |
|
|
|
Callable[Concatenate['Interaction[Any]', P], Coro[T]], |
|
|
|
] |
|
|
|
|
|
|
|
ContextMenuCallback = Union[ |
|
|
@ -120,15 +120,15 @@ if TYPE_CHECKING: |
|
|
|
# Callable[[GroupT, 'Interaction', User], Coro[Any]], |
|
|
|
# Callable[[GroupT, 'Interaction', Message], Coro[Any]], |
|
|
|
# Callable[[GroupT, 'Interaction', Union[Member, User]], Coro[Any]], |
|
|
|
Callable[['Interaction', Member], Coro[Any]], |
|
|
|
Callable[['Interaction', User], Coro[Any]], |
|
|
|
Callable[['Interaction', Message], Coro[Any]], |
|
|
|
Callable[['Interaction', Union[Member, User]], Coro[Any]], |
|
|
|
Callable[['Interaction[Any]', Member], Coro[Any]], |
|
|
|
Callable[['Interaction[Any]', User], Coro[Any]], |
|
|
|
Callable[['Interaction[Any]', Message], Coro[Any]], |
|
|
|
Callable[['Interaction[Any]', Union[Member, User]], Coro[Any]], |
|
|
|
] |
|
|
|
|
|
|
|
AutocompleteCallback = Union[ |
|
|
|
Callable[[GroupT, 'Interaction', str], Coro[List[Choice[ChoiceT]]]], |
|
|
|
Callable[['Interaction', str], Coro[List[Choice[ChoiceT]]]], |
|
|
|
Callable[[GroupT, 'Interaction[Any]', str], Coro[List[Choice[ChoiceT]]]], |
|
|
|
Callable[['Interaction[Any]', str], Coro[List[Choice[ChoiceT]]]], |
|
|
|
] |
|
|
|
else: |
|
|
|
CommandCallback = Callable[..., Coro[T]] |
|
|
|