NewFriendRequestEvent

data class NewFriendRequestEvent @MiraiInternalApi constructor(    val bot: Bot,     val eventId: Long,     val message: String,     val fromId: Long,     val fromGroupId: Long,     val fromNick: String) : AbstractEvent, BotEvent, Packet, FriendInfoChangeEvent

一个账号请求添加机器人为好友的事件

Constructors

Link copied to clipboard
fun NewFriendRequestEvent(    bot: Bot,     eventId: Long,     message: String,     fromId: Long,     fromGroupId: Long,     fromNick: String)

Functions

Link copied to clipboard
suspend fun accept()
Link copied to clipboard
fun cancel()
Link copied to clipboard
abstract fun intercept()

拦截这个事件

Link copied to clipboard
suspend fun reject(blackList: Boolean = false)

Properties

Link copied to clipboard
var _intercepted: Boolean = false
Link copied to clipboard
open override val bot: Bot
Link copied to clipboard
val broadCastLock: Mutex

限制一个事件实例不能并行广播. (适用于 object 广播的情况)

Link copied to clipboard
val eventId: Long

事件唯一识别号

Link copied to clipboard
val fromGroup: Group?
Link copied to clipboard
val fromGroupId: Long

来自群 Group.id, 其他途径时为 0

Link copied to clipboard
val fromId: Long

请求人 User.id

Link copied to clipboard
val fromNick: String

群名片或好友昵称

Link copied to clipboard
val isCancelled: Boolean
Link copied to clipboard
abstract val isIntercepted: Boolean

事件是否已被拦截.

Link copied to clipboard
val message: String

申请好友消息

Extensions

Link copied to clipboard