过滤消息 参数: types: 不包含的消息段类型 返回: 新构造的消息
(self, *types: str)
| 418 | return self.__class__(seg for seg in self if seg.type in types) |
| 419 | |
| 420 | def exclude(self, *types: str) -> Self: |
| 421 | """过滤消息 |
| 422 | |
| 423 | 参数: |
| 424 | types: 不包含的消息段类型 |
| 425 | |
| 426 | 返回: |
| 427 | 新构造的消息 |
| 428 | """ |
| 429 | return self.__class__(seg for seg in self if seg.type not in types) |
| 430 | |
| 431 | def extract_plain_text(self) -> str: |
| 432 | """提取消息内纯文本消息""" |
no outgoing calls