Update docs and OptIn annotations

This commit is contained in:
Him188 2020-03-08 22:21:10 +08:00
parent e51cf7ee71
commit 4a0333524b
3 changed files with 9 additions and 3 deletions

View File

@ -12,10 +12,16 @@ package net.mamoe.mirai.message.data
import net.mamoe.mirai.utils.MiraiExperimentalAPI
import net.mamoe.mirai.utils.SinceMirai
/**
* Json 消息.
*
* @see LightApp 一些消息实际上是 [LightApp]
*/
@SinceMirai("0.27.0")
@OptIn(MiraiExperimentalAPI::class)
class JsonMessage(override val content: String) : RichMessage {
companion object Key : Message.Key<JsonMessage>
// serviceId = 1
override fun toString(): String = content
}

View File

@ -13,7 +13,7 @@ import net.mamoe.mirai.utils.MiraiExperimentalAPI
import net.mamoe.mirai.utils.SinceMirai
/**
* 小程序, 如音乐分享
* 小程序分享, 如音乐分享
*/
@OptIn(MiraiExperimentalAPI::class)
@SinceMirai("0.27.0")

View File

@ -9,18 +9,18 @@
package net.mamoe.mirai.message.data
import net.mamoe.mirai.utils.MiraiExperimentalAPI
import net.mamoe.mirai.utils.SinceMirai
/**
* XML 消息等富文本消息
*
* @see XmlMessage
* @see JsonMessage
* @see LightApp
*/
@SinceMirai("0.27.0")
interface RichMessage : MessageContent {
companion object Key : Message.Key<RichMessage>
@MiraiExperimentalAPI
val content: String
}