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

Function keyword

nonebot/rule.py:338–345  ·  view source on GitHub ↗

匹配消息纯文本关键词。 参数: keywords: 指定关键字元组

(*keywords: str)

Source from the content-addressed store, hash-verified

336
337
338def keyword(*keywords: str) -> Rule:
339 """匹配消息纯文本关键词。
340
341 参数:
342 keywords: 指定关键字元组
343 """
344
345 return Rule(KeywordsRule(*keywords))
346
347
348class CommandRule:

Callers 2

on_keywordFunction · 0.90
test_keywordFunction · 0.90

Calls 2

RuleClass · 0.90
KeywordsRuleClass · 0.85

Tested by 1

test_keywordFunction · 0.72