mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
[types] Add Application Command Type payloads
This commit is contained in:
parent
1418464813
commit
5e800a726e
@ -37,8 +37,11 @@ if TYPE_CHECKING:
|
|||||||
from .message import AllowedMentions, Message
|
from .message import AllowedMentions, Message
|
||||||
|
|
||||||
|
|
||||||
|
ApplicationCommandType = Literal[1, 2, 3]
|
||||||
|
|
||||||
class _ApplicationCommandOptional(TypedDict, total=False):
|
class _ApplicationCommandOptional(TypedDict, total=False):
|
||||||
options: List[ApplicationCommandOption]
|
options: List[ApplicationCommandOption]
|
||||||
|
type: ApplicationCommandType
|
||||||
|
|
||||||
|
|
||||||
class ApplicationCommand(_ApplicationCommandOptional):
|
class ApplicationCommand(_ApplicationCommandOptional):
|
||||||
@ -154,6 +157,8 @@ class ApplicationCommandInteractionDataResolved(TypedDict, total=False):
|
|||||||
class _ApplicationCommandInteractionDataOptional(TypedDict, total=False):
|
class _ApplicationCommandInteractionDataOptional(TypedDict, total=False):
|
||||||
options: List[ApplicationCommandInteractionDataOption]
|
options: List[ApplicationCommandInteractionDataOption]
|
||||||
resolved: ApplicationCommandInteractionDataResolved
|
resolved: ApplicationCommandInteractionDataResolved
|
||||||
|
target_id: Snowflake
|
||||||
|
type: ApplicationCommandType
|
||||||
|
|
||||||
|
|
||||||
class ApplicationCommandInteractionData(_ApplicationCommandInteractionDataOptional):
|
class ApplicationCommandInteractionData(_ApplicationCommandInteractionDataOptional):
|
||||||
@ -217,8 +222,15 @@ class MessageInteraction(TypedDict):
|
|||||||
user: User
|
user: User
|
||||||
|
|
||||||
|
|
||||||
class EditApplicationCommand(TypedDict):
|
|
||||||
name: str
|
|
||||||
|
|
||||||
|
class _EditApplicationCommandOptional(TypedDict, total=False):
|
||||||
description: str
|
description: str
|
||||||
options: Optional[List[ApplicationCommandOption]]
|
options: Optional[List[ApplicationCommandOption]]
|
||||||
|
type: ApplicationCommandType
|
||||||
|
|
||||||
|
|
||||||
|
class EditApplicationCommand(_EditApplicationCommandOptional):
|
||||||
|
name: str
|
||||||
default_permission: bool
|
default_permission: bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user