From 652ecc3f2b2ac6d48ed46310f81d292137a11e21 Mon Sep 17 00:00:00 2001 From: Him188 Date: Wed, 4 Dec 2019 21:42:39 +0800 Subject: [PATCH] Add toString --- .../src/commonMain/kotlin/net.mamoe.mirai/message/XML.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/XML.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/XML.kt index a593e4391..6a7c6ffea 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/XML.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/XML.kt @@ -9,6 +9,7 @@ package net.mamoe.mirai.message */ inline class XMLMessage(override val stringValue: String) : Message, SingleOnly { override fun followedBy(tail: Message): Nothing = error("XMLMessage Message cannot be followed") + override fun toString(): String = stringValue } /** @@ -32,7 +33,7 @@ class ItemBuilder( } inline fun title(text: String, size: Int = 18, color: String = "#FFFFFF") { - this.builder.append("$text") + this.builder.append("$text") } inline fun picture(coverUrl: String) {