Passed
Pull Request — main (#162)
by
unknown
01:37
created

pincer.middleware.guild_members_chunk.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
"""
5
Sent in response to Guild Request Members. You can use the ``chunk_index``
6
and ``chunk_count`` to calculate how many chunks are left for your request.
7
"""
8
9
from ..core.dispatch import GatewayDispatch
10
from ..utils import Coro
11
from ..objects.events.guild import GuildMembersChunkEvent
12
13
14
async def guild_member_chunk(self, payload: GatewayDispatch):
0 ignored issues
show
Unused Code introduced by
The argument self seems to be unused.
Loading history...
15
    """
16
    Middleware for ``guild_member_chunk`` event.
17
18
    :param self:
19
        The current client/bot.
20
21
    :param payload:
22
        The data received from the event.
23
    """
24
25
    return (
26
        "on_guild_member_chunk",
27
        [GuildMembersChunkEvent.from_dict(payload.data)]
28
    )
29
30
31
def export() -> Coro:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
32
    return guild_member_chunk
33