mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-12 00:39:56 +00:00
Add fallback overloads for CommandTree
This commit is contained in:
parent
147948af9b
commit
6110fe5b1c
@ -210,6 +210,17 @@ class CommandTree:
|
||||
) -> Optional[Union[Command, Group]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def remove_command(
|
||||
self,
|
||||
command: str,
|
||||
/,
|
||||
*,
|
||||
guild: Optional[Snowflake] = ...,
|
||||
type: AppCommandType = ...,
|
||||
) -> Optional[Union[Command, ContextMenu, Group]]:
|
||||
...
|
||||
|
||||
def remove_command(
|
||||
self,
|
||||
command: str,
|
||||
@ -278,6 +289,17 @@ class CommandTree:
|
||||
) -> Optional[Union[Command, Group]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def get_command(
|
||||
self,
|
||||
command: str,
|
||||
/,
|
||||
*,
|
||||
guild: Optional[Snowflake] = ...,
|
||||
type: AppCommandType = ...,
|
||||
) -> Optional[Union[Command, ContextMenu, Group]]:
|
||||
...
|
||||
|
||||
def get_command(
|
||||
self,
|
||||
command: str,
|
||||
@ -339,6 +361,15 @@ class CommandTree:
|
||||
) -> List[Union[Command, Group]]:
|
||||
...
|
||||
|
||||
@overload
|
||||
def get_commands(
|
||||
self,
|
||||
*,
|
||||
guild: Optional[Snowflake] = ...,
|
||||
type: AppCommandType = ...,
|
||||
) -> Union[List[Union[Command, Group]], List[ContextMenu]]:
|
||||
...
|
||||
|
||||
def get_commands(
|
||||
self,
|
||||
*,
|
||||
|
Loading…
x
Reference in New Issue
Block a user