mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-17 03:09:05 +00:00
[types] Update typings to match API
This commit is contained in:
parent
e3ecfff85e
commit
8269e99a7a
@ -27,7 +27,7 @@ from __future__ import annotations
|
|||||||
from typing import List, Literal, TypedDict, Union
|
from typing import List, Literal, TypedDict, Union
|
||||||
from .emoji import PartialEmoji
|
from .emoji import PartialEmoji
|
||||||
|
|
||||||
ComponentType = Literal[1, 2, 3]
|
ComponentType = Literal[1, 2, 3, 4]
|
||||||
ButtonStyle = Literal[1, 2, 3, 4, 5]
|
ButtonStyle = Literal[1, 2, 3, 4, 5]
|
||||||
TextStyle = Literal[1, 2]
|
TextStyle = Literal[1, 2]
|
||||||
|
|
||||||
|
@ -43,13 +43,16 @@ class EmbedField(_EmbedFieldOptional):
|
|||||||
value: str
|
value: str
|
||||||
|
|
||||||
|
|
||||||
class EmbedThumbnail(TypedDict, total=False):
|
class _EmbedThumbnailOptional(TypedDict, total=False):
|
||||||
url: str
|
|
||||||
proxy_url: str
|
proxy_url: str
|
||||||
height: int
|
height: int
|
||||||
width: int
|
width: int
|
||||||
|
|
||||||
|
|
||||||
|
class EmbedThumbnail(_EmbedThumbnailOptional):
|
||||||
|
url: str
|
||||||
|
|
||||||
|
|
||||||
class EmbedVideo(TypedDict, total=False):
|
class EmbedVideo(TypedDict, total=False):
|
||||||
url: str
|
url: str
|
||||||
proxy_url: str
|
proxy_url: str
|
||||||
@ -57,25 +60,31 @@ class EmbedVideo(TypedDict, total=False):
|
|||||||
width: int
|
width: int
|
||||||
|
|
||||||
|
|
||||||
class EmbedImage(TypedDict, total=False):
|
class _EmbedImageOptional(TypedDict, total=False):
|
||||||
url: str
|
|
||||||
proxy_url: str
|
proxy_url: str
|
||||||
height: int
|
height: int
|
||||||
width: int
|
width: int
|
||||||
|
|
||||||
|
|
||||||
|
class EmbedImage(_EmbedImageOptional):
|
||||||
|
url: str
|
||||||
|
|
||||||
|
|
||||||
class EmbedProvider(TypedDict, total=False):
|
class EmbedProvider(TypedDict, total=False):
|
||||||
name: str
|
name: str
|
||||||
url: str
|
url: str
|
||||||
|
|
||||||
|
|
||||||
class EmbedAuthor(TypedDict, total=False):
|
class _EmbedAuthorOptional(TypedDict, total=False):
|
||||||
name: str
|
|
||||||
url: str
|
url: str
|
||||||
icon_url: str
|
icon_url: str
|
||||||
proxy_icon_url: str
|
proxy_icon_url: str
|
||||||
|
|
||||||
|
|
||||||
|
class EmbedAuthor(_EmbedAuthorOptional):
|
||||||
|
name: str
|
||||||
|
|
||||||
|
|
||||||
EmbedType = Literal['rich', 'image', 'video', 'gifv', 'article', 'link']
|
EmbedType = Literal['rich', 'image', 'video', 'gifv', 'article', 'link']
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ from .role import Role
|
|||||||
from .member import Member
|
from .member import Member
|
||||||
from .emoji import Emoji
|
from .emoji import Emoji
|
||||||
from .user import User
|
from .user import User
|
||||||
|
from .sticker import GuildSticker
|
||||||
from .threads import Thread
|
from .threads import Thread
|
||||||
|
|
||||||
|
|
||||||
@ -107,6 +108,7 @@ class _BaseGuildPreview(UnavailableGuild):
|
|||||||
splash: Optional[str]
|
splash: Optional[str]
|
||||||
discovery_splash: Optional[str]
|
discovery_splash: Optional[str]
|
||||||
emojis: List[Emoji]
|
emojis: List[Emoji]
|
||||||
|
stickers: List[GuildSticker]
|
||||||
features: List[GuildFeature]
|
features: List[GuildFeature]
|
||||||
description: Optional[str]
|
description: Optional[str]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user