Completed
Push — main ( 3a3ea0...93fa25 )
by Yohann
23s queued 12s
created

pincer.objects.guild.welcome_screen   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 16
dl 0
loc 54
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 Optional, List
8
9
from ...utils.api_object import APIObject
10
from ...utils.snowflake import Snowflake
11
12
13
@dataclass
14
class WelcomeScreenChannel(APIObject):
15
    """
16
    Represents a welcome screen channel. This is a channel which gets
17
    shown on the welcome screen.
18
19
    :param channel_id:
20
        the channel's id
21
22
    :param description:
23
        the description shown for the channel
24
25
    :param emoji_id:
26
        the emoji id, if the emoji is custom
27
28
    :param emoji_name:
29
        the emoji name if custom, the unicode character if standard,
30
        or null if no emoji is set
31
    """
32
33
    channel_id: Snowflake
34
    description: str
35
36
    emoji_id: Optional[int] = None
37
    emoji_name: Optional[str] = None
38
39
40
@dataclass
41
class WelcomeScreen(APIObject):
42
    """
43
    Representation of a Discord guild/server welcome screen.
44
45
    :description:
46
        the server description shown in the welcome screen
47
48
    :welcome_channels:
49
        the channels shown in the welcome screen, up to 5
50
    """
51
    welcome_channels: List[WelcomeScreenChannel]
52
53
    description: Optional[str] = None
54