Conditions | 1 |
Total Lines | 17 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Copyright Pincer 2021-Present |
||
12 | async def voice_server_update_middleware(self, payload: GatewayDispatch): |
||
13 | """|coro| |
||
14 | |||
15 | Middleware for ``on_voice_server_update`` event. |
||
16 | |||
17 | Parameters |
||
18 | ---------- |
||
19 | payload : :class:`GatewayDispatch` |
||
20 | The data received from the voice server update event. |
||
21 | |||
22 | Returns |
||
23 | ------- |
||
24 | Tuple[:class:`str`, List[:class:`~pincer.objects.events.voice.VoiceServerUpdateEvent`]] |
||
25 | ``on_voice_server_update`` and a ``VoiceServerUpdateEvent`` |
||
26 | """ |
||
27 | return "on_voice_server_update", [ |
||
28 | VoiceServerUpdateEvent.from_dict(construct_client_dict(self, payload.data)) |
||
29 | ] |
||
34 |