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