Face.toString: use contentToString() for better readability (#1382)

This commit is contained in:
Him188 2021-07-06 16:07:41 +08:00 committed by GitHub
parent 2f010b749b
commit be3c873f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ public data class Face(public val id: Int) : // used in delegation
public val name: String get() = contentToString().let { it.substring(1, it.length - 1) }
override fun toString(): String = serializeToMiraiCode()
override fun toString(): String = contentToString()
override fun contentToString(): String = names.getOrElse(id) { "[表情]" }
@MiraiExperimentalApi