Skip to content

Commit 4cf035b

Browse files
committed
Add a py 3.10 overload to command decorator
1 parent 6800b57 commit 4cf035b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

discord/ext/commands/core.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,23 @@ async def reinvoke(self, ctx: Context, *, call_hooks: bool = False) -> None:
15981598
# Decorators
15991599

16001600

1601+
@overload # for py 3.10
1602+
def command(
1603+
name: str = ...,
1604+
cls: Type[Command[CogT, P, T]] = ...,
1605+
**attrs: Any,
1606+
) -> Callable[
1607+
[
1608+
Union[
1609+
Callable[Concatenate[CogT, ContextT, P]], Coro[T],
1610+
Callable[Concatenate[ContextT, P]], Coro[T],
1611+
]
1612+
],
1613+
Command[CogT, P, T],
1614+
]:
1615+
...
1616+
1617+
16011618
@overload
16021619
def command(
16031620
name: str = ...,

0 commit comments

Comments
 (0)