KookTempTarget

@SerialName(value = "kook.temp.target")
sealed class KookTempTarget : KookMessageElement(source)

频道聊天消息中的临时消息ID

temp_target_id: 用户 id,如果传了,代表该消息是临时消息,该消息不会存数据库,但是会在频道内只给该用户推送临时消息。用于在频道内针对用户的操作进行单独的回应通知等。

当消息链中存在时,会在最终产生的消息发送API中为 SendChannelMessageApi.tempTargetId 填充用作临时消息ID的用户ID。

一个消息链中只会有一个 KookTempTarget 最终生效,非频道消息无效。

更多说明参考 KOOK文档

Author

ForteScarlet

See also

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
object Companion

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.