Skip to content

Commit

Permalink
Add attachment command option data
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluenix2 committed Jul 2, 2022
1 parent 4ae111b commit 58ce6f9
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions discord_typings/interactions/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,16 @@ class AutocompleteNumberOptionData(TypedDict):
autocomplete: NotRequired[bool]


@final
class AttachmentOptionData(TypedDict):
type: Literal[10]
name: str
name_localizations: NotRequired[Optional[Dict[Locales, str]]]
description: str
description_localizations: NotRequired[Optional[Dict[Locales, str]]]
required: NotRequired[bool]


AutocompleteOptionData = Union[
AutocompleteStringOptionData, AutocompleteIntegerOptionData,
AutocompleteNumberOptionData
Expand All @@ -257,7 +267,7 @@ class AutocompleteNumberOptionData(TypedDict):
MinMaxIntegerCommandOptionData, MinMaxStringOptionData, BooleanOptionData,
UserOptionData, ChannelOptionData, RoleOptionData, MentionableOptionData,
ChoicesNumberCommandOptionData, MinMaxNumberCommandOptionData,
AutocompleteOptionData, SubcommandOptionData
AutocompleteOptionData, SubcommandOptionData, AttachmentOptionData,
]


Expand Down Expand Up @@ -367,11 +377,18 @@ class NumberInteractionData(TypedDict):
focused: NotRequired[bool]


@final
class AttachmentInteractionData(TypedDict):
name: str
type: Literal[10]
value: str


ApplicationCommandOptionInteractionData = Union[
SubcommandOptionInteractionData, SubcommandGroupOptionInteractionData,
StringOptionInteractionData, IntegerOptionInteractionData, BooleanOptionInteractionData,
UserOptionInteractionData, ChannelOptionInteractionData, RoleOptionInteractionData,
MentionableInteractionData, NumberInteractionData,
MentionableInteractionData, NumberInteractionData, AttachmentInteractionData,
]


Expand Down

0 comments on commit 58ce6f9

Please sign in to comment.