mirai-core / net.mamoe.mirai / Bot / constructMessageSource

constructMessageSource

@SinceMirai("0.39.0") abstract fun constructMessageSource(kind: Kind, fromUin: Long, targetUin: Long, id: Int, time: Int, internalId: Int, originalMessage: MessageChain): OfflineMessageSource

构造一个 OfflineMessageSource

Parameters

id - 即 MessageSource.id

internalId - 即 MessageSource.internalId

fromUin - 为用户时为 Friend.id, 为群时需使用 Group.calculateGroupUinByGroupCode 计算

targetUin - 为用户时为 Friend.id, 为群时需使用 Group.calculateGroupUinByGroupCode 计算