Skip to content

PlatinText为何在重构后它的伴生对象没有实现MessageKey #903

Answered by Him188
LovesAsuna asked this question in Q&A
Discussion options

You must be logged in to vote

由于一条消息不一定只包含一个 PlainTextMessageChain.get(PlainText) 以前是返回第一个实例,这可能会产生迷惑性,保守起见就删除了。

若要获得纯文本内容,可以使用 message.contentToString() (Java) 和 message.content (Kotlin)

对于其他消息类型,请基于 MessageChain 实现的 List<SingleMessage> 操作。

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by LovesAsuna
Comment options

You must be logged in to vote
1 reply
@sandtechnology
Comment options

Comment options

You must be logged in to vote
1 reply
@Him188
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants