diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt index 176f77d93..b8c5956a8 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/Bot.kt @@ -351,8 +351,13 @@ public abstract class Bot internal constructor( @JvmSynthetic public abstract suspend fun ignoreInvitedJoinGroupRequest(event: BotInvitedJoinGroupRequestEvent) + @Deprecated( + "use member function.", + replaceWith = ReplaceWith("nudge.sendTo(contact)"), + level = DeprecationLevel.ERROR + ) @SinceMirai("1.3.0") - internal abstract suspend fun sendNudge(nudge: Nudge, receiver: Contact): Boolean + public abstract suspend fun sendNudge(nudge: Nudge, receiver: Contact): Boolean // endregion diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/action/Nudge.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/action/Nudge.kt index 033905424..927ec79df 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/action/Nudge.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/action/Nudge.kt @@ -54,6 +54,7 @@ public sealed class Nudge { @JvmBlockingBridge @MiraiExperimentalAPI public suspend fun sendTo(receiver: Contact): Boolean { + @Suppress("DEPRECATION_ERROR") return receiver.bot.sendNudge(this, receiver) }