1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-03-25 06:50:09 +08:00

Add @Deprecated annotation onto senderId

This commit is contained in:
Him188 2020-02-29 14:43:08 +08:00
parent 067a949630
commit b2f07d7173

View File

@ -45,20 +45,21 @@ interface MessageSource : Message, MessageMetadata {
suspend fun ensureSequenceIdAvailable()
/**
* 发送时间, 单位为秒
* 发送时间, 单位为秒. 撤回好友消息时可能需要
*/
val time: Long
/**
* 与这个消息相关的 [QQ] [QQ.id]
*
* 群消息时为发送人的 id. 好友消息时为消息发送目标好友的 id
* 群消息时为发送人的 id (可能为 bot 自己). 好友消息时为消息发送目标好友的 id (不可能为 bot 自己)
*/
val qqId: Long
@Suppress("unused") // TODO: 2020/2/29 0.25: 删除 `MessageSource.senderId`
@Deprecated("使用 qqId. 此 API 将在 0.25 删除", level = DeprecationLevel.HIDDEN, replaceWith = ReplaceWith("this.qqId"))
@Suppress("unused")
@Deprecated("使用 qqId. 此 API 将在不久后删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("this.qqId"))
val senderId: Long
get() = qqId
/**
* 群号码, 0 时则来自好友消息