Conditions | 1 |
Total Lines | 21 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Copyright Pincer 2021-Present |
||
16 | async def payload_middleware( |
||
17 | self: Client, |
||
18 | gateway: Gateway, |
||
19 | payload: GatewayDispatch, |
||
20 | ) -> Tuple[str, GatewayDispatch]: |
||
21 | """Invoked when anything is received from gateway. |
||
22 | |||
23 | |||
24 | Parameters |
||
25 | ---------- |
||
26 | payload : :class:`pincer.core.gateway.GatewayDispatch` |
||
27 | The data received from the ready event. |
||
28 | gateway : :class:`~pincer.core.gateway.Gateway` |
||
29 | The gateway for the current shard. |
||
30 | |||
31 | Returns |
||
32 | ------- |
||
33 | Tuple[:class:`str`, :class:`~pincer.core.gateway.GatewayDispatch`] |
||
34 | ``on_payload`` and a ``payload`` |
||
35 | """ |
||
36 | return "on_payload", payload |
||
37 | |||
41 |