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

guild_member_remove()   A

Complexity

Conditions 1

Size

Total Lines 14
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 14
rs 10
c 0
b 0
f 0
cc 1
nop 2
1
# Copyright Pincer 2021-Present
2
# Full MIT License can be found in `LICENSE` at the project root.
3
4
"""
5
Sent when a user is removed from a guild (leave/kick/ban).
6
"""
7
8
from ..core.dispatch import GatewayDispatch
9
from ..utils import Coro
10
from ..objects.events.guild import GuildMemberRemoveEvent
11
12
13
async def guild_member_remove(self, payload: GatewayDispatch):
0 ignored issues
show
Unused Code introduced by
The argument self seems to be unused.
Loading history...
14
    """
15
    Middleware for ``guild_member_remove`` event.
16
17
    :param self:
18
        The current client/bot.
19
20
    :param payload:
21
        The data received from the event.
22
    """
23
24
    return (
25
        "on_guild_member_remove",
26
        [GuildMemberRemoveEvent.from_dict(payload.data)]
27
    )
28
29
30
def export() -> Coro:
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
31
    return guild_member_remove
32