| Conditions | 1 |
| Total Lines | 20 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # Copyright Pincer 2021-Present |
||
| 20 | def channel_create_middleware( |
||
| 21 | self, |
||
| 22 | payload: GatewayDispatch |
||
| 23 | ) -> Tuple[str, List[Channel]]: |
||
| 24 | """|coro| |
||
| 25 | |||
| 26 | Middleware for ``on_channel_creation`` event. |
||
| 27 | |||
| 28 | Parameters |
||
| 29 | ---------- |
||
| 30 | payload : :class:`~pincer.core.dispatch.GatewayDispatch` |
||
| 31 | The data received from the ready event. |
||
| 32 | |||
| 33 | Returns |
||
| 34 | ------- |
||
| 35 | Tuple[:class:`str`, List[:class:`~pincer.objects.guild.channel.Channel`]] |
||
| 36 | ``"on_channel_creation"`` and a channel. |
||
| 37 | """ |
||
| 38 | return "on_channel_creation", [ |
||
| 39 | Channel.from_dict(construct_client_dict(self, payload.data)) |
||
| 40 | ] |
||
| 45 |