mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-03 02:29:21 +08:00
Fix nudge
This commit is contained in:
parent
b76c23e647
commit
1717501d85
@ -351,8 +351,13 @@ public abstract class Bot internal constructor(
|
|||||||
@JvmSynthetic
|
@JvmSynthetic
|
||||||
public abstract suspend fun ignoreInvitedJoinGroupRequest(event: BotInvitedJoinGroupRequestEvent)
|
public abstract suspend fun ignoreInvitedJoinGroupRequest(event: BotInvitedJoinGroupRequestEvent)
|
||||||
|
|
||||||
|
@Deprecated(
|
||||||
|
"use member function.",
|
||||||
|
replaceWith = ReplaceWith("nudge.sendTo(contact)"),
|
||||||
|
level = DeprecationLevel.ERROR
|
||||||
|
)
|
||||||
@SinceMirai("1.3.0")
|
@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
|
// endregion
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ public sealed class Nudge {
|
|||||||
@JvmBlockingBridge
|
@JvmBlockingBridge
|
||||||
@MiraiExperimentalAPI
|
@MiraiExperimentalAPI
|
||||||
public suspend fun sendTo(receiver: Contact): Boolean {
|
public suspend fun sendTo(receiver: Contact): Boolean {
|
||||||
|
@Suppress("DEPRECATION_ERROR")
|
||||||
return receiver.bot.sendNudge(this, receiver)
|
return receiver.bot.sendNudge(this, receiver)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user