MCPcopy
hub / github.com/nonebot/nonebot2 / event_postprocessor

Function event_postprocessor

nonebot/message.py:103–111  ·  view source on GitHub ↗

事件后处理。 装饰一个函数,使它在每次接收到事件并分发给各响应器之后执行。

(func: T_EventPostProcessor)

Source from the content-addressed store, hash-verified

101
102
103def event_postprocessor(func: T_EventPostProcessor) -> T_EventPostProcessor:
104 """事件后处理。
105
106 装饰一个函数,使它在每次接收到事件并分发给各响应器之后执行。
107 """
108 _event_postprocessors.add(
109 Dependent[Any].parse(call=func, allow_types=EVENT_PCS_PARAMS)
110 )
111 return func
112
113
114def run_preprocessor(func: T_RunPreProcessor) -> T_RunPreProcessor:

Callers

nothing calls this directly

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected