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

Method extract_plain_text

nonebot/internal/adapter/message.py:431–434  ·  view source on GitHub ↗

提取消息内纯文本消息

(self)

Source from the content-addressed store, hash-verified

429 return self.__class__(seg for seg in self if seg.type not in types)
430
431 def extract_plain_text(self) -> str:
432 """提取消息内纯文本消息"""
433
434 return "".join(str(seg) for seg in self if seg.is_text())

Callers 6

_solve_plaintextMethod · 0.80
get_plaintextMethod · 0.80
test_argFunction · 0.80
test_template_messageFunction · 0.80
test_message_injectionFunction · 0.80
test_malformed_templateFunction · 0.80

Calls 2

joinMethod · 0.45
is_textMethod · 0.45

Tested by 4

test_argFunction · 0.64
test_template_messageFunction · 0.64
test_message_injectionFunction · 0.64
test_malformed_templateFunction · 0.64