mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 15:36:02 +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]
|
||||
|
||||
|
||||
class _ApplicationCommandInteractionDataOptionOptional(TypedDict, total=False):
|
||||
value: ApplicationCommandOptionType
|
||||
class _ApplicationCommandInteractionDataOption(TypedDict):
|
||||
name: str
|
||||
|
||||
|
||||
class _ApplicationCommandInteractionDataOptionSubcommand(
|
||||
_ApplicationCommandInteractionDataOption
|
||||
):
|
||||
type: Literal[1, 2]
|
||||
options: List[ApplicationCommandInteractionDataOption]
|
||||
|
||||
|
||||
class ApplicationCommandInteractionDataOption(
|
||||
_ApplicationCommandInteractionDataOptionOptional
|
||||
class _ApplicationCommandInteractionDataOptionString(
|
||||
_ApplicationCommandInteractionDataOption
|
||||
):
|
||||
name: str
|
||||
type: ApplicationCommandOptionType
|
||||
type: Literal[3]
|
||||
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user