Passed
Pull Request — main (#163)
by
unknown
01:39
created

export()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nop 0
1
# Copyright Pincer 2021-Present
2
# Full MIT License can be found in `LICENSE` at the project root.
3
4
"""sent when a user explicitly removes all reactions from a message."""
5
6
from ..core.dispatch import GatewayDispatch
7
from ..objects.events.message import MessageReactionRemoveAllEvent
8
from ..utils.conversion import construct_client_dict
9
10
11
async def message_reaction_remove_all_middleware(
12
    self,
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
13
    payload: GatewayDispatch):
0 ignored issues
show
Coding Style introduced by
Wrong hanging indentation before block (add 4 spaces).
Loading history...
14
    """
15
    Middleware for ``on_message_reaction_remove_all``,
16
        creates a object for the message reactions that are removed
17
18
    :param self:
19
        The current client.
20
21
    :param payload:
22
        The data received from the message reaction remove all event.
23
    """
24
    return "on_message_reaction_remove_all", [
25
        MessageReactionRemoveAllEvent.from_dict(
26
            construct_client_dict(self, payload.data)
27
        )
28
    ]
29
30
31
def export():
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
32
    return message_reaction_remove_all_middleware
33