Total Complexity | 0 |
Total Lines | 57 |
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, List, TYPE_CHECKING |
||
8 | |||
9 | from ...utils.api_object import APIObject |
||
10 | from ...utils.snowflake import Snowflake |
||
11 | from ...utils.types import MISSING |
||
12 | |||
13 | if TYPE_CHECKING: |
||
14 | from ..guild.role import Role |
||
15 | from ..user import User |
||
16 | from ...utils import APINullable |
||
17 | |||
18 | |||
19 | @dataclass |
||
20 | class Emoji(APIObject): |
||
21 | """ |
||
22 | :param id: |
||
23 | emoji id |
||
24 | |||
25 | :param name: |
||
26 | emoji name |
||
27 | |||
28 | :param animated: |
||
29 | whether this emoji is animated |
||
30 | |||
31 | :param available: |
||
32 | whether this emoji can be used, may be false due to loss of Server |
||
33 | Boosts |
||
34 | |||
35 | :param managed: |
||
36 | whether this emoji is managed |
||
37 | |||
38 | :param require_colons: |
||
39 | whether this emoji must be wrapped in colons |
||
40 | |||
41 | :param roles: |
||
42 | roles allowed to use this emoji |
||
43 | |||
44 | :param user: |
||
45 | user that created this emoji |
||
46 | """ |
||
47 | |||
48 | id: Optional[Snowflake] |
||
49 | name: Optional[str] |
||
50 | |||
51 | animated: APINullable[bool] = MISSING |
||
52 | available: APINullable[bool] = MISSING |
||
53 | managed: APINullable[bool] = MISSING |
||
54 | require_colons: APINullable[bool] = MISSING |
||
55 | roles: APINullable[List[Role]] = MISSING |
||
56 | user: APINullable[User] = MISSING |
||
57 |