feat(napcat): 新增18个账号相关事件处理器与完善文档
为NapCat适配器添加完整的账号操作功能: - 在线客户端查询、在线状态设置、最近联系人 - 好友列表、分组列表、删除好友、点赞 - 头像设置、个性签名、自定义在线状态 - 小程序卡片生成、用户信息/状态查询 并同步补充事件类型注解 BREAKING CHANGE: BaseEvent构造函数不再接受可变默认实参
This commit is contained in:
@@ -9,7 +9,7 @@ class HandlerResult:
|
||||
|
||||
所有事件处理器必须返回此类的实例
|
||||
"""
|
||||
def __init__(self, success: bool, continue_process: bool, message: Any = {}, handler_name: str = ""):
|
||||
def __init__(self, success: bool, continue_process: bool, message: Any = None, handler_name: str = ""):
|
||||
self.success = success
|
||||
self.continue_process = continue_process
|
||||
self.message = message
|
||||
@@ -83,8 +83,8 @@ class BaseEvent:
|
||||
def __init__(
|
||||
self,
|
||||
name: str,
|
||||
allowed_subscribers: List[str]=[],
|
||||
allowed_triggers: List[str]=[]
|
||||
allowed_subscribers: List[str] = None,
|
||||
allowed_triggers: List[str] = None
|
||||
):
|
||||
self.name = name
|
||||
self.enabled = True
|
||||
|
||||
Reference in New Issue
Block a user