KookAssetImage

使用 AssetCreated 作为一个 Image 消息类型。当前消息的ID等同于 AssetCreated.url.

Constructors

Link copied to clipboard

Types

Link copied to clipboard
object Key : Message.Key<KookAssetImage>

Functions

Link copied to clipboard
open suspend override fun resource(): Resource

Properties

Link copied to clipboard
open override val asset: AssetCreated

创建的文件资源。

Link copied to clipboard
open override val id: ID
Link copied to clipboard
open override val key: Message.Key<KookAssetImage>
Link copied to clipboard
open override val resource: URLResource
Link copied to clipboard
open override val resourceAsync: CompletableFuture<out Resource>
Link copied to clipboard
open override val type: Int

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

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。