Skip to content

Commit 5a645b4

Browse files
authored
修正 'contentToString` 注释不严谨处 (#2374)
* 修正 'contentToString` 注释不严谨处 * link `At`
1 parent e65f4e6 commit 5a645b4

File tree

1 file changed

+3
-1
lines changed
  • mirai-core-api/src/commonMain/kotlin/message/data

1 file changed

+3
-1
lines changed

mirai-core-api/src/commonMain/kotlin/message/data/Message.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ public interface Message {
153153
public override fun toString(): String
154154

155155
/**
156-
* 转为最接近官方格式的字符串, 即 "内容". 如 `At(member) + "test"` 将转为 `"@群名片 test"`.
156+
* 转为接近官方格式的字符串, 即 "内容". 如 `At(member) + "test"` 将转为 `"@QQ test"`.
157+
*
158+
* (对于 [At],应使用 [At.getDisplay] 将其转为最接近官方格式的字符串 `"@群名片"`)
157159
*
158160
* 在使用消息相关 DSL 和扩展时, 一些内容比较的实现均使用 [contentToString] 而不是 [toString].
159161
*

0 commit comments

Comments
 (0)