Conditions | 1 |
Total Lines | 23 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Copyright Pincer 2021-Present |
||
22 | async def guild_member_chunk_middleware( |
||
23 | self: Client, gateway: Gateway, payload: GatewayDispatch |
||
24 | ): |
||
25 | """|coro| |
||
26 | |||
27 | Middleware for the ``on_guild_member_chunk`` event. |
||
28 | |||
29 | Parameters |
||
30 | ---------- |
||
31 | payload : :class:`~pincer.core.gateway.GatewayDispatch` |
||
32 | The data received from the guild member chunk event. |
||
33 | gateway : :class:`~pincer.core.gateway.Gateway` |
||
34 | The gateway for the current shard. |
||
35 | |||
36 | Returns |
||
37 | ------- |
||
38 | Tuple[:class:`str`, :class:`~pincer.objects.events.guild.GuildMembersChunkEvent`] |
||
39 | ``on_guild_member_chunk`` and a ``GuildMembersChunkEvent`` |
||
40 | """ # noqa: E501 |
||
41 | |||
42 | return ( |
||
43 | "on_guild_member_chunk", |
||
44 | GuildMembersChunkEvent.from_dict(payload.data), |
||
45 | ) |
||
50 |