mirai-core / net.mamoe.mirai.message.data / AbstractImage

AbstractImage

sealed class AbstractImage : Image
Deprecated: This is internal API. Use Image instead

所有 Image 实现的基类.

Properties

DoNotImplementThisClass

val DoNotImplementThisClass: Nothing?

Functions

contentToString

fun contentToString(): String

toString

fun toString(): String

Extension Properties

md5

val Image.md5: ByteArray

Extension Functions

flash

fun Image.flash(): FlashImage

flash2

fun Image.flash2(): FlashImage

flatten

扁平化 Message

fun Message.flatten(): Sequence<SingleMessage>

isContentEmpty

判断消息内容是否为空.

fun Message.isContentEmpty(): Boolean

isContentNotEmpty

fun Message.isContentNotEmpty(): Boolean

isNotPlain

fun Message.isNotPlain(): Boolean

isNotPlain2

fun Message.isNotPlain2(): Boolean

isPlain

fun Message.isPlain(): Boolean

isPlain2

fun Message.isPlain2(): Boolean

queryUrl

查询原图下载链接.

suspend fun Image.queryUrl(): String

repeat

fun Message.repeat(count: Int): MessageChain

repeat2

fun Message.repeat2(count: Int): MessageChain

sendTo

suspend fun <C : Contact> Message.sendTo(contact: C): MessageReceipt<C>

times

operator fun Message.times(count: Int): MessageChain

toForwardMessage

转换为 ForwardMessage

fun Message.toForwardMessage(sender: User, time: Int = currentTimeSeconds.toInt(), displayStrategy: DisplayStrategy = DisplayStrategy): ForwardMessage
fun Message.toForwardMessage(senderId: Long, senderName: String, time: Int = currentTimeSeconds.toInt(), displayStrategy: DisplayStrategy = DisplayStrategy): ForwardMessage

Inheritors

FriendImage

好友图片

sealed class FriendImage : AbstractImage

GroupImage

群图片.

sealed class GroupImage : AbstractImage