调整代码

This commit is contained in:
liuwei
2025-04-27 10:12:30 +08:00
parent 08c505bfd3
commit a0db8fdf23

View File

@@ -6,6 +6,8 @@ from typing import Dict, Any, List, Optional, Tuple
import xml.etree.ElementTree as ET
import dacite
from gewechat.client import gewe_client
from gewechat.response.gewe_resp import GeweResponse
from gewechat.response.model.group.chatroom_member_detail import ChatroomMemberDetail
@@ -123,8 +125,10 @@ class GroupMemberChangePlugin(MessagePluginInterface):
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
member_wxids = [wxid]
profile: ChatroomMemberDetail = gewe_client.client.get_chatroom_member_detail(gewe_client.client.app_id,
member_wxids)
profile: ChatroomMemberDetail = dacite.from_dict(ChatroomMemberDetail,
gewe_client.client.get_chatroom_member_detail(
gewe_client.client.app_id,
member_wxids))
if profile.ret == 200:
gewe_client.client.post_link(gewe_client.client.app_id, sender,
title=f"👏欢迎 {nickname} 加入群聊!🎉",