修复notice处理意外的群notice
parent
8764961418
commit
b7d3c68b92
|
|
@ -480,6 +480,11 @@ class RecvHandler:
|
|||
|
||||
group_id = raw_message.get("group_id")
|
||||
user_id = raw_message.get("user_id")
|
||||
|
||||
if not self.check_allow_to_chat(user_id, group_id):
|
||||
logger.warning("notice消息被丢弃")
|
||||
return None
|
||||
|
||||
handled_message: Seg = None
|
||||
|
||||
match notice_type:
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ class SendHandler:
|
|||
"enable": enable,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
def handle_kick_command(self, args: Dict[str, Any], group_info: GroupInfo) -> Tuple[str, Dict[str, Any]]:
|
||||
"""处理群成员踢出命令
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ class SendHandler:
|
|||
"reject_add_request": False, # 不拒绝加群请求
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
async def send_message_to_napcat(self, action: str, params: dict) -> dict:
|
||||
request_uuid = str(uuid.uuid4())
|
||||
payload = json.dumps({"action": action, "params": params, "echo": request_uuid})
|
||||
|
|
|
|||
Loading…
Reference in New Issue