测试入群提醒。
This commit is contained in:
@@ -119,12 +119,61 @@ class GroupMemberChangePlugin(MessagePluginInterface):
|
||||
wxid = member["wxid"]
|
||||
nickname = member["nickname"]
|
||||
|
||||
# now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
member_wxids = [wxid]
|
||||
|
||||
await bot.send_at_message(roomid, f"👏欢迎 {nickname} 加入群聊!🎉", member_wxids)
|
||||
# members = await bot.get_contract_detail(member_wxids, roomid)
|
||||
members = await bot.get_chatroom_member_detail(wxid, roomid)
|
||||
head_url = members.get("SmallHeadImgUrl") or members.get("BigHeadImgUrl") or ""
|
||||
|
||||
xml_content = f"""
|
||||
<appmsg appid="" sdkver="1">
|
||||
<title>👏欢迎 {nickname} 加入群聊!🎉</title>
|
||||
<des>⌚时间:{now}</des>
|
||||
<action>view</action>
|
||||
<type>5</type>
|
||||
<showtype>0</showtype>
|
||||
<content />
|
||||
<url>https://hot.imsyy.top/#/</url>
|
||||
<dataurl />
|
||||
<lowurl />
|
||||
<lowdataurl />
|
||||
<recorditem />
|
||||
<thumburl>{head_url}</thumburl>
|
||||
<messageaction />
|
||||
<laninfo />
|
||||
<extinfo />
|
||||
<sourceusername />
|
||||
<sourcedisplayname />
|
||||
<commenturl />
|
||||
<appattach>
|
||||
<totallen>0</totallen>
|
||||
<attachid />
|
||||
<emoticonmd5 />
|
||||
<fileext />
|
||||
<aeskey />
|
||||
</appattach>
|
||||
<webviewshared>
|
||||
<publisherId />
|
||||
<publisherReqId>0</publisherReqId>
|
||||
</webviewshared>
|
||||
<weappinfo>
|
||||
<pagepath />
|
||||
<username />
|
||||
<appid />
|
||||
<appservicetype>0</appservicetype>
|
||||
</weappinfo>
|
||||
<websearch />
|
||||
</appmsg>
|
||||
<fromusername>Jyunere</fromusername>
|
||||
<scene>0</scene>
|
||||
<appinfo>
|
||||
<version>1</version>
|
||||
<appname></appname>
|
||||
</appinfo>
|
||||
<commenturl></commenturl>
|
||||
"""
|
||||
await bot.send_link_xml_message(xml_content, roomid)
|
||||
# if members:
|
||||
# gewe_client.client.post_link(gewe_client.client.app_id, sender,
|
||||
# title=f"👏欢迎 {nickname} 加入群聊!🎉",
|
||||
|
||||
Reference in New Issue
Block a user