Skip to content

Commit

Permalink
Add MockActions.fireNudge
Browse files Browse the repository at this point in the history
  • Loading branch information
Karlatemp committed Sep 1, 2022
1 parent 333c99f commit caa5d1c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mirai-core-mock/src/MockActions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ import net.mamoe.mirai.mock.contact.MockNormalMember
import net.mamoe.mirai.mock.contact.MockStranger
import net.mamoe.mirai.mock.contact.MockUserOrBot
import net.mamoe.mirai.mock.database.removeMessageInfo
import net.mamoe.mirai.mock.utils.NudgeDsl
import net.mamoe.mirai.mock.utils.mock
import net.mamoe.mirai.mock.utils.nudged0
import net.mamoe.mirai.utils.cast

@JvmBlockingBridge
Expand Down Expand Up @@ -171,4 +173,15 @@ public object MockActions {
return fireMessageRecalled(receipt.source, operator)
}

/**
* 令 [actor] 戳一下 [actee]
*
* @param actor 发起戳一戳的人
* @param actee 被戳的人
*/
@JvmStatic
public suspend fun fireNudge(actor: MockUserOrBot, actee: MockUserOrBot, dsl: NudgeDsl) {
actor.nudged0(actee, dsl)
}

}

0 comments on commit caa5d1c

Please sign in to comment.