Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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_plaintext
Method · 0.80
get_plaintext
Method · 0.80
test_arg
Function · 0.80
test_template_message
Function · 0.80
test_message_injection
Function · 0.80
test_malformed_template
Function · 0.80
Calls
2
join
Method · 0.45
is_text
Method · 0.45
Tested by
4
test_arg
Function · 0.64
test_template_message
Function · 0.64
test_message_injection
Function · 0.64
test_malformed_template
Function · 0.64