KookAsset

@SerialName(value = "kook.asset.std")
data class KookAsset(val asset: Asset, val type: Int) : KookAssetMessage(source)

Kook 组件中针对 CreateAssetApi api 的请求响应的消息封装。

Author

ForteScarlet

Constructors

Link copied to clipboard
constructor(asset: Asset, type: MessageType)
constructor(asset: Asset, type: Int)

Properties

Link copied to clipboard
open override val asset: Asset

创建的文件资源。

Link copied to clipboard
@SerialName(value = "assetType")
open override val type: Int

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

Inherited functions

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

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

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

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

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

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