|
1
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
|
2
|
|
|
# MIT License |
|
3
|
|
|
# |
|
4
|
|
|
# Copyright (c) 2021 Pincer |
|
5
|
|
|
# |
|
6
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining |
|
7
|
|
|
# a copy of this software and associated documentation files |
|
8
|
|
|
# (the "Software"), to deal in the Software without restriction, |
|
9
|
|
|
# including without limitation the rights to use, copy, modify, merge, |
|
10
|
|
|
# publish, distribute, sublicense, and/or sell copies of the Software, |
|
11
|
|
|
# and to permit persons to whom the Software is furnished to do so, |
|
12
|
|
|
# subject to the following conditions: |
|
13
|
|
|
# |
|
14
|
|
|
# The above copyright notice and this permission notice shall be |
|
15
|
|
|
# included in all copies or substantial portions of the Software. |
|
16
|
|
|
# |
|
17
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|
18
|
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|
19
|
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|
20
|
|
|
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
|
21
|
|
|
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
|
22
|
|
|
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
|
23
|
|
|
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
24
|
|
|
from __future__ import annotations |
|
25
|
|
|
|
|
26
|
|
|
from dataclasses import dataclass |
|
27
|
|
|
from typing import Optional, List |
|
28
|
|
|
|
|
29
|
|
|
from pincer.objects.role import Role |
|
30
|
|
|
from pincer.objects.user import User |
|
31
|
|
|
from pincer.utils.snowflake import Snowflake |
|
32
|
|
|
from pincer.utils.api_object import APIObject |
|
33
|
|
|
from pincer.utils.constants import APINullable, MISSING |
|
34
|
|
|
|
|
35
|
|
|
|
|
36
|
|
|
@dataclass |
|
|
|
|
|
|
37
|
|
|
class Emoji(APIObject): |
|
38
|
|
|
""" |
|
39
|
|
|
:param id: |
|
40
|
|
|
emoji id |
|
41
|
|
|
|
|
42
|
|
|
:param name: |
|
43
|
|
|
emoji name |
|
44
|
|
|
|
|
45
|
|
|
:param animated: |
|
46
|
|
|
whether this emoji is animated |
|
47
|
|
|
|
|
48
|
|
|
:param available: |
|
49
|
|
|
whether this emoji can be used, may be false due to loss of Server |
|
50
|
|
|
Boosts |
|
51
|
|
|
|
|
52
|
|
|
:param managed: |
|
53
|
|
|
whether this emoji is managed |
|
54
|
|
|
|
|
55
|
|
|
:param require_colons: |
|
56
|
|
|
whether this emoji must be wrapped in colons |
|
57
|
|
|
|
|
58
|
|
|
:param roles: |
|
59
|
|
|
roles allowed to use this emoji |
|
60
|
|
|
|
|
61
|
|
|
:param user: |
|
62
|
|
|
user that created this emoji |
|
63
|
|
|
""" |
|
64
|
|
|
|
|
65
|
|
|
id: Optional[Snowflake] |
|
|
|
|
|
|
66
|
|
|
name: Optional[str] |
|
67
|
|
|
|
|
68
|
|
|
animated: APINullable[bool] = MISSING |
|
|
|
|
|
|
69
|
|
|
available: APINullable[bool] = MISSING |
|
|
|
|
|
|
70
|
|
|
managed: APINullable[bool] = MISSING |
|
|
|
|
|
|
71
|
|
|
require_colons: APINullable[bool] = MISSING |
|
|
|
|
|
|
72
|
|
|
roles: APINullable[List[Role]] = MISSING |
|
|
|
|
|
|
73
|
|
|
user: APINullable[User] = MISSING |
|
|
|
|
|
|
74
|
|
|
|