Passed
Pull Request — main (#174)
by Yohann
01:54
created

pincer.objects.events.notification   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 12
dl 0
loc 40
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
5
from dataclasses import dataclass
6
7
from ...objects.message import UserMessage
8
from ...utils.api_object import APIObject
0 ignored issues
show
Bug introduced by
The name api_object does not seem to exist in module pincer.utils.
Loading history...
introduced by
Cannot import 'utils.api_object' due to syntax error 'invalid syntax (<unknown>, line 80)'
Loading history...
9
from ...utils.snowflake import Snowflake
10
11
12
@dataclass
13
class NotificationCreateEvent(APIObject):
14
    """
15
    Represents a notification
16
17
    Attributes
18
    ----------
19
    channel_id : :class:`Snowflake`
20
        id of channel where notification occurred
21
22
    message : :class:`UserMessage`
23
        message that generated this notification
24
25
    icon_url : :class:`str`
26
        icon url of the notification
27
28
    title : :class:`str`
29
        title of the notification
30
31
    body : :class:`str`
32
        body of the notification
33
    """
34
35
    channel_id: Snowflake
36
    message: UserMessage
37
    icon_url: str
38
    title: str
39
    body: str
40