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

Function is_type

nonebot/rule.py:765–772  ·  view source on GitHub ↗

匹配事件类型。 参数: types: 事件类型

(*types: type[Event])

Source from the content-addressed store, hash-verified

763
764
765def is_type(*types: type[Event]) -> Rule:
766 """匹配事件类型。
767
768 参数:
769 types: 事件类型
770 """
771
772 return Rule(IsTypeRule(*types))
773
774
775__autodoc__ = {

Callers 2

on_typeFunction · 0.90
test_is_typeFunction · 0.90

Calls 2

RuleClass · 0.90
IsTypeRuleClass · 0.85

Tested by 1

test_is_typeFunction · 0.72