完全匹配消息。 参数: msg: 指定消息全匹配字符串元组 ignorecase: 是否忽略大小写
(msg: str | tuple[str, ...], ignorecase: bool = False)
| 287 | |
| 288 | |
| 289 | def fullmatch(msg: str | tuple[str, ...], ignorecase: bool = False) -> Rule: |
| 290 | """完全匹配消息。 |
| 291 | |
| 292 | 参数: |
| 293 | msg: 指定消息全匹配字符串元组 |
| 294 | ignorecase: 是否忽略大小写 |
| 295 | """ |
| 296 | if isinstance(msg, str): |
| 297 | msg = (msg,) |
| 298 | |
| 299 | return Rule(FullmatchRule(msg, ignorecase)) |
| 300 | |
| 301 | |
| 302 | class KeywordsRule: |