From 592d5fdef53c6d88f653fc55af6b88341d5d1c1b Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 8 Mar 2020 20:14:22 +0800 Subject: [PATCH] Add `PlainText.of(CharSequence)` --- .../kotlin/net.mamoe.mirai/message/data/PlainText.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/PlainText.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/PlainText.kt index 6f2ca8383..24dacdeb1 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/PlainText.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/PlainText.kt @@ -38,6 +38,10 @@ inline class PlainText(val stringValue: String) : Message, MessageContent { inline fun of(value: String): PlainText { return PlainText(value) } + + inline fun of(value: CharSequence): PlainText { + return PlainText(value) + } } }