MessageSyncEvent

机器人在其他客户端发送消息同步到这个客户端的事件.

本事件发生于机器人账号在另一个客户端向一个群或一个好友主动发送消息, 这条消息同步到机器人这个客户端上.

See also

Inheritors

Functions

Link copied to clipboard
inline fun MessageEvent.buildForwardMessage(context: Contact = this.subject, displayStrategy: ForwardMessage.DisplayStrategy = DisplayStrategy, block: ForwardMessageBuilder.() -> Unit): ForwardMessage

使用 DSL 构建一个 ForwardMessage.

Link copied to clipboard
abstract fun intercept()

拦截这个事件

Link copied to clipboard

Properties

Link copied to clipboard
open override val bot: Bot

与这个消息事件相关的 Bot

Link copied to clipboard
abstract override val client: OtherClient
Link copied to clipboard
abstract val isIntercepted: Boolean

事件是否已被拦截.

Link copied to clipboard
abstract val message: MessageChain

消息内容.

Link copied to clipboard
abstract val sender: User

发送人.

Link copied to clipboard
abstract val senderName: String

发送人名称. 由群员发送时为群员名片, 由好友发送时为好友昵称. 使用 User.nameCardOrNick 也能得到相同的结果.

Link copied to clipboard

消息源. 来自 message. 相当于对 messageMessageSource 参数调用 MessageChain.get.

Link copied to clipboard
abstract val subject: Contact

消息事件主体.

Link copied to clipboard
abstract val time: Int

消息发送时间戳, 单位为秒. 由服务器提供, 可能与本地有时差.