mirror of
https://github.com/mamoe/mirai.git
synced 2024-12-31 05:09:15 +08:00
Fix nudge
This commit is contained in:
parent
b76c23e647
commit
1717501d85
@ -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
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user