# 事件池(监听器)

注意

在 v0.3.4 版本及以后 事件池被整合进了 Listeners.(...)

使用 append() 方法,向指定数组内添加函数

字段名 = append(字段名, 函数(对应结构体), ...)
1
字段名 对应结构体 说明 类型
OnPrivateMsg MessagePrivate 私聊消息事件 消息事件
OnGroupMsg MessageGroup 群聊消息事件 消息事件
OnGroupUpload GroupUpload 群文件上传 提醒事件
OnGroupAdmin GroupAdmin 群管理员变动 提醒事件
OnGroupDecrease GroupDecrease 群成员减少 提醒事件
OnGroupIncrease GroupIncrease 群成员增加 提醒事件
OnGroupBan GroupBan 群聊禁言 提醒事件
OnFriendAdd FriendAdd 已经添加好友后的事件 提醒事件
OnGroupRecall GroupRecall 群消息撤回(群聊) 提醒事件
OnFriendRecall FriendRecall 好友消息撤回(私聊) 提醒事件
OnNotify Notify 群内戳一戳 群红包运气王 群成员荣誉变更 提醒事件
OnFriendRequest FriendRequest 加好友请求 请求事件
OnGroupRequest GroupRequest 加群请求/邀请 请求事件
OnMetaLifecycle MetaLifecycle 生命周期 元事件
OnMetaHeartbeat MetaHeartbeat 心跳包 元事件