Passed
Push — main ( 05f81d...c2214f )
by Yohann
02:15 queued 12s
created

pincer.middleware.message_update   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Functions

Rating   Name   Duplication   Size   Complexity  
A export() 0 2 1
A message_update_middleware() 0 4 1
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):
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
11
    return "on_message_update", [
12
        UserMessage.from_dict(
13
            {"_client": self, "_http": self.http, **payload.data}
14
        )
15
    ]
16
17
18
def export():
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
19
    return message_update_middleware
20