| Conditions | 1 |
| Total Lines | 20 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # Copyright Pincer 2021-Present |
||
| 21 | async def webhooks_update_middleware( |
||
| 22 | self: Client, gateway: Gateway, payload: GatewayDispatch |
||
| 23 | ): |
||
| 24 | """|coro| |
||
| 25 | |||
| 26 | Middleware for the ``on_webhooks_update`` event. |
||
| 27 | |||
| 28 | Parameters |
||
| 29 | ---------- |
||
| 30 | payload : :class:`~pincer.core.gateway.GatewayDispatch` |
||
| 31 | The data received from the webhooks update event. |
||
| 32 | gateway : :class:`~pincer.core.gateway.Gateway` |
||
| 33 | The gateway for the current shard. |
||
| 34 | |||
| 35 | Returns |
||
| 36 | ------- |
||
| 37 | Tuple[:class:`str`, :class:`~pincer.objects.events.webhook.WebhooksUpdateEvent`] |
||
| 38 | ``on_webhooks_update`` and a ``WebhooksUpdateEvent`` |
||
| 39 | """ # noqa: E501 |
||
| 40 | return ("on_webhooks_update", WebhooksUpdateEvent.from_dict(payload.data)) |
||
| 41 | |||
| 45 |