mirai-core / net.mamoe.mirai.message.data / OnlineMessageSource / Incoming

Incoming

sealed class Incoming : OnlineMessageSource

接收到的一条消息的 MessageSource

Types

FromFriend

abstract class FromFriend : Incoming

FromGroup

abstract class FromGroup : Incoming

FromTemp

abstract class FromTemp : Incoming

Key

companion object Key : Key<Incoming>

Properties

fromId

发送人.

val fromId: Long

sender

消息发送人. 可能为 机器人好友群员. 即类型必定为 Bot, QQMember

abstract val sender: User

target2

val target2: Any

targetId

消息发送目标.

val targetId: Long

Companion Object Properties

typeName

Key 指代的 Message 类型名. 一般为 class.simpleName, 如 "QuoteReply", "PlainText"

val typeName: String