mirai-core / net.mamoe.mirai.message.data / ForwardMessageBuilder / BuilderNode

BuilderNode

inner class BuilderNode : INode

Constructors

<init>

BuilderNode()

Properties

message

消息内容

lateinit var message: Message

senderId

发送人 User.id

var senderId: Long

senderName

发送人名称

var senderName: String

time

时间戳秒

var time: Int

Functions

at

指定时间.

infix fun at(time: Int): BuilderNode

message

指定消息内容

infix fun message(message: Message): BuilderNode
infix fun message(message: String): BuilderNode

named

指定发送人名称.

infix fun named(name: String): BuilderNode

says

添加一条消息

infix fun says(message: Message): ForwardMessageBuilder
infix fun says(message: String): ForwardMessageBuilder

构造并添加一个 MessageChain

infix fun says(chain: MessageChainBuilder.() -> Unit): ForwardMessageBuilder

sender

指定发送人 id 和名称.

infix fun sender(user: User): BuilderNode

senderId

指定发送人 id.

infix fun senderId(id: Int): BuilderNode
infix fun senderId(id: Long): BuilderNode

senderName

指定发送人名称.

infix fun senderName(name: String): BuilderNode

time

指定时间.

infix fun time(time: Int): BuilderNode