KookApiMessage
提供一个 KookApi 作为原始的消息发送请求(例如 SendChannelMessageApi)。
此消息会在发送时直接通过 api 发起一个请求,但是不会处理它的响应。
默认情况下此 API 请求过程中产生的异常会直接抛出。这可能会影响并中断消息发送的流程。
这是一个仅用于发送的消息,且不支持序列化。
Author
ForteScarlet
See also
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.