Total Complexity | 0 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # Copyright Pincer 2021-Present |
||
|
|||
2 | # Full MIT License can be found in `LICENSE` at the project root. |
||
3 | |||
4 | from __future__ import annotations |
||
5 | |||
6 | from dataclasses import dataclass |
||
7 | from typing import Optional, TYPE_CHECKING |
||
8 | |||
9 | from ...utils.api_object import APIObject |
||
10 | from ...utils.types import MISSING |
||
11 | |||
12 | if TYPE_CHECKING: |
||
13 | from ...utils import APINullable, Snowflake |
||
14 | |||
15 | |||
16 | @dataclass |
||
17 | class Attachment(APIObject): |
||
18 | """ |
||
19 | Represents a Discord Attachment object |
||
20 | |||
21 | :param id: |
||
22 | attachment id |
||
23 | |||
24 | :param filename: |
||
25 | name of file attached |
||
26 | |||
27 | :param content_type: |
||
28 | the attachment's data type |
||
29 | |||
30 | :param size: |
||
31 | size of file in bytes |
||
32 | |||
33 | :param url: |
||
34 | source url of file |
||
35 | |||
36 | :param proxy_url: |
||
37 | a proxied url of file |
||
38 | |||
39 | :param height: |
||
40 | height of file (if image) |
||
41 | |||
42 | :param width: |
||
43 | width of file (if image) |
||
44 | """ |
||
45 | id: Snowflake |
||
46 | filename: str |
||
47 | size: int |
||
48 | url: str |
||
49 | proxy_url: str |
||
50 | |||
51 | content_type: APINullable[str] = MISSING |
||
52 | height: APINullable[Optional[int]] = MISSING |
||
53 | width: APINullable[Optional[int]] = MISSING |
||
54 |