Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # Copyright Pincer 2021-Present |
||
2 | # Full MIT License can be found in `LICENSE` at the project root. |
||
3 | |||
4 | """sent when a message is updated in a subscribed text channel""" |
||
5 | |||
6 | from ..core.dispatch import GatewayDispatch |
||
7 | from ..objects import UserMessage |
||
8 | |||
9 | |||
10 | async def message_update_middleware(self, payload: GatewayDispatch): |
||
|
|||
11 | return "on_message_update", [ |
||
12 | UserMessage.from_dict( |
||
13 | {"_client": self, "_http": self.http, **payload.data} |
||
14 | ) |
||
15 | ] |
||
16 | |||
17 | |||
18 | def export(): |
||
19 | return message_update_middleware |
||
20 |