获取事件响应器定义所在插件。 **Deprecated**, 请使用 {ref}`nonebot.plugin.on.get_matcher_source` 获取信息。 参数: depth: 调用栈深度
(depth: int = 1)
| 49 | |
| 50 | |
| 51 | def 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 | |
| 66 | def get_matcher_module(depth: int = 1) -> ModuleType | None: # pragma: no cover |
nothing calls this directly
no test coverage detected