mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-16 19:22:31 +08:00
Add migration helpers for MessageEvent
This commit is contained in:
parent
5737dc7463
commit
20a6896755
86
mirai-core-api/src/commonMain/kotlin/message/deprecated.kt
Normal file
86
mirai-core-api/src/commonMain/kotlin/message/deprecated.kt
Normal file
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright 2019-2020 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.message
|
||||
|
||||
import net.mamoe.mirai.event.events.FriendMessageEvent
|
||||
import net.mamoe.mirai.event.events.GroupAwareMessageEvent
|
||||
import net.mamoe.mirai.event.events.GroupMessageEvent
|
||||
import net.mamoe.mirai.event.events.MessageEvent
|
||||
import net.mamoe.mirai.event.events.MessageEventExtensions
|
||||
import net.mamoe.mirai.event.events.MessageEventPlatformExtensions
|
||||
import net.mamoe.mirai.event.events.TempMessageEvent
|
||||
import net.mamoe.mirai.event.events.UserMessageEvent
|
||||
import net.mamoe.mirai.utils.PlannedRemoval
|
||||
|
||||
// internal 定义可以通过全名引用, 用户就能看到 ReplaceWith. 新用户则看不到这些旧类型的 import.
|
||||
|
||||
@PlannedRemoval("2.0-M2")
|
||||
@Deprecated(
|
||||
"Replace with new package.",
|
||||
ReplaceWith("FriendMessageEvent", "net.mamoe.mirai.event.events.FriendMessageEvent"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
internal typealias FriendMessageEvent = FriendMessageEvent
|
||||
|
||||
@PlannedRemoval("2.0-M2")
|
||||
@Deprecated(
|
||||
"Replace with new package.",
|
||||
ReplaceWith("GroupAwareMessageEvent", "net.mamoe.mirai.event.events.GroupAwareMessageEvent"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
internal typealias GroupAwareMessageEvent = GroupAwareMessageEvent
|
||||
|
||||
@PlannedRemoval("2.0-M2")
|
||||
@Deprecated(
|
||||
"Replace with new package.",
|
||||
ReplaceWith("GroupMessageEvent", "net.mamoe.mirai.event.events.GroupMessageEvent"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
internal typealias GroupMessageEvent = GroupMessageEvent
|
||||
|
||||
@PlannedRemoval("2.0-M2")
|
||||
@Deprecated(
|
||||
"Replace with new package.",
|
||||
ReplaceWith("MessageEvent", "net.mamoe.mirai.event.events.MessageEvent"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
internal typealias MessageEvent = MessageEvent
|
||||
|
||||
@PlannedRemoval("2.0-M2")
|
||||
@Deprecated(
|
||||
"Replace with new package.",
|
||||
ReplaceWith("TempMessageEvent", "net.mamoe.mirai.event.events.TempMessageEvent"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
internal typealias TempMessageEvent = TempMessageEvent
|
||||
|
||||
@PlannedRemoval("2.0-M2")
|
||||
@Deprecated(
|
||||
"Replace with new package.",
|
||||
ReplaceWith("UserMessageEvent", "net.mamoe.mirai.event.events.UserMessageEvent"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
internal typealias UserMessageEvent = UserMessageEvent
|
||||
|
||||
@PlannedRemoval("2.0-M2")
|
||||
@Deprecated(
|
||||
"Replace with new package.",
|
||||
ReplaceWith("MessageEventExtensions", "net.mamoe.mirai.event.events.MessageEventExtensions"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
internal typealias MessageEventExtensions<TSender, TSubject> = MessageEventExtensions<TSender, TSubject>
|
||||
|
||||
@PlannedRemoval("2.0-M2")
|
||||
@Deprecated(
|
||||
"Replace with new package.",
|
||||
ReplaceWith("MessageEventPlatformExtensions", "net.mamoe.mirai.event.events.MessageEventPlatformExtensions"),
|
||||
level = DeprecationLevel.ERROR
|
||||
)
|
||||
internal typealias MessageEventPlatformExtensions<TSender, TSubject> = MessageEventPlatformExtensions<TSender, TSubject>
|
Loading…
Reference in New Issue
Block a user