MCPcopy Index your code
hub / github.com/nonebot/nonebot2 / get_matcher_plugin

Function get_matcher_plugin

nonebot/plugin/on.py:51–63  ·  view source on GitHub ↗

获取事件响应器定义所在插件。 **Deprecated**, 请使用 {ref}`nonebot.plugin.on.get_matcher_source` 获取信息。 参数: depth: 调用栈深度

(depth: int = 1)

Source from the content-addressed store, hash-verified

49
50
51def get_matcher_plugin(depth: int = 1) -> Plugin | None: # pragma: no cover
52 """获取事件响应器定义所在插件。
53
54 **Deprecated**, 请使用 {ref}`nonebot.plugin.on.get_matcher_source` 获取信息。
55
56 参数:
57 depth: 调用栈深度
58 """
59 warnings.warn(
60 "`get_matcher_plugin` is deprecated, please use `get_matcher_source` instead",
61 DeprecationWarning,
62 )
63 return (source := get_matcher_source(depth + 1)) and source.plugin
64
65
66def get_matcher_module(depth: int = 1) -> ModuleType | None: # pragma: no cover

Callers

nothing calls this directly

Calls 1

get_matcher_sourceFunction · 0.85

Tested by

no test coverage detected