KookAssetMessage

与上传后的媒体资源相关的消息类型。

See also

Types

Link copied to clipboard
object Key : Message.Key<KookAssetMessage<*>>

Functions

Link copied to clipboard
abstract operator override fun equals(other: Any?): Boolean
Link copied to clipboard
abstract override fun toString(): String

Properties

Link copied to clipboard
abstract val asset: AssetCreated

创建的文件资源。

Link copied to clipboard
abstract override val key: Message.Key<M>
Link copied to clipboard
abstract val type: Int

在发送时所需要使用的消息类型。通常选择为 MessageType.IMAGEMessageType.FILEMessageType.VIDEO 中的值, 即 234

Inheritors

Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard
suspend fun Message.sendToChannel(bot: KookComponentBot, targetId: ID, quote: ID? = null, nonce: String? = null, tempTargetId: ID? = null): KookMessageReceipt?

将消息发送给目标。此消息如果是个消息链,则有可能会被拆分为多条消息发送, 届时将会返回 KookAggregatedMessageReceipt.

Link copied to clipboard
suspend fun Message.sendToDirectByChatCode(bot: KookComponentBot, chatCode: ID, quote: ID? = null, nonce: String? = null, tempTargetId: ID? = null): KookMessageReceipt?

将消息发送给目标。此消息如果是个消息链,则有可能会被拆分为多条消息发送, 届时将会返回 KookAggregatedMessageReceipt.

Link copied to clipboard
suspend fun Message.sendToDirectByTargetId(bot: KookComponentBot, targetId: ID, quote: ID? = null, nonce: String? = null, tempTargetId: ID? = null): KookMessageReceipt?

将消息发送给目标。此消息如果是个消息链,则有可能会被拆分为多条消息发送, 届时将会返回 KookAggregatedMessageReceipt.

Link copied to clipboard
suspend fun Message.toDirectRequest(bot: KookComponentBot, targetId: ID, quote: ID? = null, nonce: String? = null, tempTargetId: ID? = null): DirectMessageCreateRequest?

将一个 Message 转化为用于发送消息的请求api。

Link copied to clipboard
suspend fun Message.toRequest(bot: KookComponentBot, targetId: ID, quote: ID? = null, nonce: String? = null, tempTargetId: ID? = null): KookApiRequest<*>?

将一个 Message 转化为用于发送消息的请求api。