MiraiReceivedNudge

data class MiraiReceivedNudge @InternalSimbotApi constructor(val from: LongID, val target: LongID, val subjectType: MiraiReceivedNudge.SubjectType, val subject: LongID, val action: String, val suffix: String) : OriginalMiraiComputableSimbotMessage<MiraiReceivedNudge> (source)

Mirai事件中所接收到的戳一戳事件的信息。

MiraiNudge 类似,此消息会立即发送,不会计入等待发送的消息列表中。

See also

Constructors

Link copied to clipboard
fun MiraiReceivedNudge(from: LongID, target: LongID, subjectType: MiraiReceivedNudge.SubjectType, subject: LongID, action: String, suffix: String)

Types

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open suspend fun originalMiraiMessage(contact: Contact): Message

通过一个 Contact 计算得到一个具体的 OriginalMiraiMessage

open suspend override fun originalMiraiMessage(contact: Contact, isDropAction: Boolean): Message

立即发送戳一戳消息,并返回一个 EmptySingleMessage.

Properties

Link copied to clipboard
Link copied to clipboard

戳一戳发起人ID。

Link copied to clipboard
open override val key: Message.Key<MiraiReceivedNudge>
Link copied to clipboard

消息语境ID。 原类型为 net.mamoe.mirai.contact.Contact.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

戳一戳目标, 可能与 from 相同.

Extensions

Link copied to clipboard
suspend fun Message.toOriginalMiraiMessage(contact: Contact, isDropAction: Boolean = false): Message

将一个 Message 转化为 OriginalMiraiMessage 以发送。

Link copied to clipboard
suspend fun Message.toOriginalMiraiMessageChain(contact: Contact, isDropAction: Boolean = false): MessageChain