RawPrivateMessageEvent

data class RawPrivateMessageEvent @SourceEventConstructor constructor(val time: Long, val selfId: LongID, val postType: String, val messageId: ID, val messageType: String, val subType: String, val message: List<OneBotMessageSegment> = emptyList(), val rawMessage: String = "", val userId: LongID, val font: Int? = null, val sender: RawPrivateMessageEvent.Sender) : RawMessageEvent(source)

私聊消息事件

Constructors

Link copied to clipboard
constructor(time: Long, selfId: LongID, postType: String, messageId: ID, messageType: String, subType: String, message: List<OneBotMessageSegment> = emptyList(), rawMessage: String = "", userId: LongID, font: Int? = null, sender: RawPrivateMessageEvent.Sender)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Sender @SourceEventConstructor constructor(val userId: LongID, val nickname: String, val sex: String = DEFAULT_SEX, val age: Int = DEFAULT_AGE) : RawMessageEvent.Sender

私聊事件的发送人信息

Properties

Link copied to clipboard
open override val font: Int? = null

字体

Link copied to clipboard
open override val message: List<OneBotMessageSegment>

消息内容

Link copied to clipboard
@SerialName(value = "message_id")
open override val messageId: ID

消息 ID

Link copied to clipboard
@SerialName(value = "message_type")
open override val messageType: String

消息类型

Link copied to clipboard
@SerialName(value = "post_type")
open override val postType: String

上报类型

Link copied to clipboard
@SerialName(value = "raw_message")
open override val rawMessage: String

原始消息内容

Link copied to clipboard
@SerialName(value = "self_id")
open override val selfId: LongID

收到事件的机器人 QQ 号

Link copied to clipboard

发送人信息

Link copied to clipboard
@SerialName(value = "sub_type")
open override val subType: String

消息子类型,如果是好友则是 friend,如果是群临时会话则是 group

Link copied to clipboard
open override val time: Long

事件发生的时间戳

Link copied to clipboard
@SerialName(value = "user_id")
open override val userId: LongID

发送者 QQ 号