mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Fix typing of ApplicationCommandInteractionDataOption
This commit is contained in:
parent
abac04b759
commit
39a674ddee
@ -93,16 +93,52 @@ class GuildApplicationCommandPermissions(PartialGuildApplicationCommandPermissio
|
|||||||
InteractionType = Literal[1, 2, 3]
|
InteractionType = Literal[1, 2, 3]
|
||||||
|
|
||||||
|
|
||||||
class _ApplicationCommandInteractionDataOptionOptional(TypedDict, total=False):
|
class _ApplicationCommandInteractionDataOption(TypedDict):
|
||||||
value: ApplicationCommandOptionType
|
name: str
|
||||||
|
|
||||||
|
|
||||||
|
class _ApplicationCommandInteractionDataOptionSubcommand(
|
||||||
|
_ApplicationCommandInteractionDataOption
|
||||||
|
):
|
||||||
|
type: Literal[1, 2]
|
||||||
options: List[ApplicationCommandInteractionDataOption]
|
options: List[ApplicationCommandInteractionDataOption]
|
||||||
|
|
||||||
|
|
||||||
class ApplicationCommandInteractionDataOption(
|
class _ApplicationCommandInteractionDataOptionString(
|
||||||
_ApplicationCommandInteractionDataOptionOptional
|
_ApplicationCommandInteractionDataOption
|
||||||
):
|
):
|
||||||
name: str
|
type: Literal[3]
|
||||||
type: ApplicationCommandOptionType
|
value: str
|
||||||
|
|
||||||
|
|
||||||
|
class _ApplicationCommandInteractionDataOptionInteger(
|
||||||
|
_ApplicationCommandInteractionDataOption
|
||||||
|
):
|
||||||
|
type: Literal[4]
|
||||||
|
value: int
|
||||||
|
|
||||||
|
|
||||||
|
class _ApplicationCommandInteractionDataOptionBoolean(
|
||||||
|
_ApplicationCommandInteractionDataOption
|
||||||
|
):
|
||||||
|
type: Literal[5]
|
||||||
|
value: bool
|
||||||
|
|
||||||
|
|
||||||
|
class _ApplicationCommandInteractionDataOptionSnowflake(
|
||||||
|
_ApplicationCommandInteractionDataOption
|
||||||
|
):
|
||||||
|
type: Literal[6, 7, 8, 9]
|
||||||
|
value: Snowflake
|
||||||
|
|
||||||
|
|
||||||
|
ApplicationCommandInteractionDataOption = Union[
|
||||||
|
_ApplicationCommandInteractionDataOptionString,
|
||||||
|
_ApplicationCommandInteractionDataOptionInteger,
|
||||||
|
_ApplicationCommandInteractionDataOptionSubcommand,
|
||||||
|
_ApplicationCommandInteractionDataOptionBoolean,
|
||||||
|
_ApplicationCommandInteractionDataOptionSnowflake,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
class ApplicationCommandResolvedPartialChannel(TypedDict):
|
class ApplicationCommandResolvedPartialChannel(TypedDict):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user