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