NewFriendRequestEvent

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

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

Constructors

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

Functions

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

拦截这个事件

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

Properties

bot
Link copied to clipboard
open override val bot: Bot
eventId
Link copied to clipboard
val eventId: Long

事件唯一识别号

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

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

fromId
Link copied to clipboard
val fromId: Long

请求人 User.id

fromNick
Link copied to clipboard
val fromNick: String

群名片或好友昵称

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

事件是否已被拦截.

message
Link copied to clipboard
val message: String

申请好友消息

Extensions

toRequestEventData
Link copied to clipboard