Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
338
def
keyword(*keywords: str) -> Rule:
339
""
"匹配消息纯文本关键词。
340
341
参数:
342
keywords: 指定关键字元组
343
""
"
344
345
return
Rule(KeywordsRule(*keywords))
346
347
348
class
CommandRule:
Callers
2
on_keyword
Function · 0.90
test_keyword
Function · 0.90
Calls
2
Rule
Class · 0.90
KeywordsRule
Class · 0.85
Tested by
1
test_keyword
Function · 0.72