diff --git a/hertavilla/apis/audit.py b/hertavilla/apis/audit.py index 4c94e9a..c0fb043 100644 --- a/hertavilla/apis/audit.py +++ b/hertavilla/apis/audit.py @@ -9,8 +9,8 @@ async def audit( self, villa_id: int, audit_content: str, - room_id: int, uid: int, + room_id: int | None = None, pass_through: str | None = None, content_type: AuditContentType = AuditContentType.TEXT, ) -> str: @@ -20,16 +20,14 @@ async def audit( Args: villa_id (int): 大别野 id audit_content (str): 待审核内容 - room_id (int): 房间 id uid (int): 用户 id + room_id (int | None, optional): 房间 id,选填. Defaults to None. pass_through (str | None, optional): 透传信息,该字段会在审核结果回调时携带给开发者,选填. Defaults to None. content_type (AuditContentType, optional): 审核内容的类型. Defaults to AuditContentType.TEXT. Returns: str: 审核事件 id """ # noqa: E501 - # FIXME: 文档所说 room_id 和 uid 为选填 - # 但是不填会 -1,所以这里设置成了必填 return ( await self.base_request( "/audit", diff --git a/hertavilla/event.py b/hertavilla/event.py index acf1426..44584d9 100644 --- a/hertavilla/event.py +++ b/hertavilla/event.py @@ -252,7 +252,7 @@ class AuditCallbackEvent(Event): bot_tpl_id: str """机器人 id""" - room_id: int + room_id: int | None = None """房间 id(和审核接口调用方传入的值一致)""" user_id: int