Conditions | 1 |
Total Lines | 21 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Copyright Pincer 2021-Present |
||
10 | async def channel_pins_update_middleware(self, payload: GatewayDispatch): |
||
|
|||
11 | """|coro| |
||
12 | |||
13 | Middleware for ``on_channel_pins_update``, |
||
14 | |||
15 | Parameters |
||
16 | ---------- |
||
17 | self : :class:`Client` |
||
18 | The current client/bot. |
||
19 | |||
20 | payload : :class:`pincer.core.dispatch.GatewayDispatch` |
||
21 | The data received from the channel pins update event. |
||
22 | |||
23 | Returns |
||
24 | ------- |
||
25 | Tuple[:class:`str`, List[:class:`~pincer.objects.guild.channel.Channel`]] |
||
26 | ``on_channel_pins_update`` and a ``Channel`` |
||
27 | """ |
||
28 | |||
29 | return "on_channel_pins_update", [ |
||
30 | ChannelPinsUpdateEvent.from_dict(payload.data) |
||
31 | ] |
||
36 |