diff options
| author | Rapptz <[email protected]> | 2021-04-08 01:56:23 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-08 01:56:23 -0400 |
| commit | d299bfef26e2424d23c5e0517ccb9ae9ef365bb3 (patch) | |
| tree | 57ca9007f185487876797d47dfc4a7fc7a98449e | |
| parent | Add typings for `Message`, `Emoji`, and `Member` (diff) | |
| download | discord.py-d299bfef26e2424d23c5e0517ccb9ae9ef365bb3.tar.xz discord.py-d299bfef26e2424d23c5e0517ccb9ae9ef365bb3.zip | |
Fix up typings for attachment and message
| -rw-r--r-- | discord/types/message.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/discord/types/message.py b/discord/types/message.py index 8f5de254..e9042e72 100644 --- a/discord/types/message.py +++ b/discord/types/message.py @@ -46,14 +46,18 @@ class Reaction(TypedDict): emoji: PartialEmoji -class Attachment(TypedDict): +class _AttachmentOptional(TypedDict, total=False): + height: Optional[int] + width: Optional[int] + content_type: str + + +class Attachment(_AttachmentOptional): id: Snowflake filename: str size: int url: str proxy_url: str - height: Optional[int] - width: Optional[int] MessageActivityType = Literal[1, 2, 3, 5] @@ -105,7 +109,7 @@ class _MessageOptional(TypedDict, total=False): mention_channels: List[ChannelMention] reactions: List[Reaction] nonce: Union[int, str] - webhook_id: int + webhook_id: Snowflake activity: MessageActivity application: MessageApplication message_reference: MessageReference |