Add migration helper for At.display

This commit is contained in:
Him188 2020-12-18 19:42:35 +08:00
parent 0e19197361
commit 6efb2ae525

View File

@ -37,6 +37,14 @@ public data class At(
public override fun toString(): String = "[mirai:at:$target]"
public override fun contentToString(): String = "@$target"
@Suppress("DeprecatedCallableAddReplaceWith")
@Deprecated(
"At.display is no longer supported. Please get Member.nameCard by your self.", level = DeprecationLevel.ERROR
)
@PlannedRemoval("2.0-M2")
val display: Nothing
get() = error("At.display is no longer supported")
public companion object {
/**
* 构造一个 [At], 仅供内部使用, 否则可能造成消息无法发出的问题.