pincer.objects.message.emoji   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 22
dl 0
loc 55
rs 10
c 0
b 0
f 0
1
# Copyright Pincer 2021-Present
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
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 TYPE_CHECKING
8
9
from ...utils.api_object import APIObject
10
from ...utils.types import MISSING
11
12
if TYPE_CHECKING:
13
    from typing import Optional, List
14
15
    from ..user.user import User
16
    from ..guild.role import Role
17
    from ...utils.types import APINullable
18
    from ...utils.snowflake import Snowflake
19
20
21
@dataclass(repr=False)
22
class Emoji(APIObject):
0 ignored issues
show
best-practice introduced by
Too many instance attributes (8/7)
Loading history...
23
    """Representation of an emoji in a class.
24
25
    Attributes
26
    ----------
27
    id: Optional[:class:`~pincer.utils.snowflake.Snowflake`]
28
        Emoji id
29
    name: Optional[:class:`str`]
30
        Emoji name
31
    animated: APINullable[:class:`bool`]
32
        Whether this emoji is animated
33
    available: APINullable[:class:`bool`]
34
        Whether this emoji can be used, may be false due to loss of Server
35
        Boosts
36
    managed: APINullable[:class:`bool`]
37
        Whether this emoji is managed
38
    require_colons: APINullable[:class:`bool`]
39
        Whether this emoji must be wrapped in colons
40
    roles: APINullable[List[:class:`~pincer.objects.guild.role.Role`]]
41
        Roles allowed to use this emoji
42
    user: APINullable[:class:`~pincer.objects.user.user.User`]
43
        User that created this emoji
44
    """
45
46
    name: Optional[str]
47
    id: APINullable[Snowflake] = MISSING
48
49
    animated: APINullable[bool] = MISSING
50
    available: APINullable[bool] = MISSING
51
    managed: APINullable[bool] = MISSING
52
    require_colons: APINullable[bool] = MISSING
53
    roles: APINullable[List[Role]] = MISSING
54
    user: APINullable[User] = MISSING
55