diff options
| author | Nadir Chowdhury <[email protected]> | 2021-04-10 07:53:24 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-04-10 02:53:24 -0400 |
| commit | 3e92196a2bdcf57dfcbd8e277737345af1d35330 (patch) | |
| tree | 381dba2a0401a016beebc4200af09eb34d149f94 /discord/asset.py | |
| parent | [commands]Add typing.Literal converter (diff) | |
| download | discord.py-3e92196a2bdcf57dfcbd8e277737345af1d35330.tar.xz discord.py-3e92196a2bdcf57dfcbd8e277737345af1d35330.zip | |
Add typings for audit logs, integrations, and webhooks
Diffstat (limited to 'discord/asset.py')
| -rw-r--r-- | discord/asset.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/discord/asset.py b/discord/asset.py index da1788d1..13f9336f 100644 --- a/discord/asset.py +++ b/discord/asset.py @@ -23,6 +23,7 @@ DEALINGS IN THE SOFTWARE. """ import io +from typing import Literal, TYPE_CHECKING from .errors import DiscordException from .errors import InvalidArgument from . import utils @@ -31,6 +32,10 @@ __all__ = ( 'Asset', ) +if TYPE_CHECKING: + ValidStaticFormatTypes = Literal['webp', 'jpeg', 'jpg', 'png'] + ValidAvatarFormatTypes = Literal['webp', 'jpeg', 'jpg', 'png', 'gif'] + VALID_STATIC_FORMATS = frozenset({"jpeg", "jpg", "webp", "png"}) VALID_AVATAR_FORMATS = VALID_STATIC_FORMATS | {"gif"} |