Files
gitlab-instance-0a899031_ma…/微信AI /可爱猫机器人功能.md
2024-03-04 21:09:34 +08:00

14 KiB
Raw Blame History

机器人上线/下线 定时消息/ 告警通知 wxid转正充值 好友请求, 根据男女(性别),回复不同 内容 好友请求, 存储 头像,性别/昵称, 微信号 wxid 修改备注=>数据分析 发送link 卡片 [携带key=wxid]+ openid匹配 撤回消息

获取好友列表=>数据分析 群成员列表=>数据分析 "type":1,//1/文本消息 3/图片消息 34/语音消息 42/名片消息 43/视频 47/动态表情 48/地理位置 49/分享链接 2000/转账 2001/红包 2002/小程序 2003/群邀请


系统好友请求通知 {'event': 'EventFriendVerify', 'robot_wxid': 'wxid_haqoszjheyuz22', 'robot_name': '', 'type': 37, 'from_wxid': '', 'from_name': '', 'final_from_wxid': 'wxid_4413224132412', 'final_from_name': 'Eric', 'to_wxid': 'wxid_haqoszjheyuz22', 'msgid': '', 'msg': {'from_content': '我是Eric', 'from_nickname': 'Eric', 'from_wxid': 'wxid_4413224132412', 'he adimgurl': 'http://wx.qlogo.cn/mmhead/ver_1/nBWOwvDWAQ8IzdQagjkiaNSWyyYA6nia6CJ3sxsA2tRGyibSyXQIoI41tVnibZt8kYWPF0Vt0IcX4oHyZlfXFD4icV6Jich5XkPs4XXEgYuNROMMjjGCvuVvSzlSEJ6XVOP1sm/132', 'msgid': '7786859767399705248', 'scene': 6, 'sex': 1, 'to_name': '轮回', 'to_wxid': 'wxid_haqoszjheyuz22', 'type': 6, 'v1': 'v3_020b3826fd030100000000005d7426e8a87817 000000501ea9a3dba12f95f6b60a0536a1adb6153e5243d7f7c10c2227c2866d079162a319e3fb97d58bfb050771b538359631535a6b577b9b6b9c9494bda5d158d99c3d4c78e6c5182747f62c8b8c@stranger', 'v2': 'v4_000b708f0b040000010000000000f37090679b2e24d6828c582569651000000050ded0b020927e3c97896a09d47e6e9edd9a9dd03e2eb8a8146b1784603bce66ff14ea5f6eb8a9b3a91b29af3b458508a9714ec4da73ad1bcadf6542d953e5bcbbff1e5583ac5b6c61892e1efd7767248b911690c6c0a3a83a3ee893a958956cb093fe41036d0206cc88eb0912b4bd5ca9ba04843ccb327a@stranger'}}

  • 上传用户数据到mysql数据库
  • 判断用户的添加方式"微信号"/扫码/名片

同意好友请求 {'event': 'EventFriendMsg', 'robot_wxid': 'wxid_haqoszjheyuz22', 'robot_name': '轮回', 'type': 10000, 'from_wxid ': 'wxid_4413224132412', 'from_name': 'Eric', 'final_from_wxid': 'wxid_4413224132412', 'final_from_name': 'Eric', 'to_wxid': 'wxid_haqoszjheyuz22', 'msgid': '1337125416523356513', 'msg': '你已添加了Eric现在可以开始聊天了。'}

  • 根据"关键词" 回复,比如:加群/活动
  • 根据男女(性别)=>返回不同的群聊/link

收到转账1.2 {'event': 'EventReceivedTransfer', 'robot_wxid': 'wxid_haqoszjheyuz22', 'robot_name': '', 'type': 2000, 'from_wxid': 'wxid_4413224132412', 'from_name': 'Eric', 'final_from_wxid': 'wxid_4413224132412', 'final_from_name': 'Eric', 'to_wxid': 'wxid_haqoszjheyuz22', 'money': '1.20', 'msgid': '', 'msg': {'is_arrived': 1, 'is_received': 0, 'money': '1.20', 'payer_pay_id': '100005000123120100087236308257792162', 'paysubtype': '1', 'receiver_pay_id': '1000050001202312010216430748916', 'remark': '', 'robot_pay_id': '1000050001202312010216430748916', 'pay_id': '100005000123120100087236308257792162', 'update_msg': 'receiver_pay_id、payer_pay_id属 性为robot_pay_id、pay_id的新名字内容是一样的建议更INFO:

接受转账1.2 {'event': 'EventReceivedTransfer', 'robot_wxid': 'wxid_haqoszjheyuz22', 'robot_name': '', 'type': 2000, 'from_wxid': 'wxid_haqoszjheyuz22', 'from_name': '轮 回', 'final_from_wxid': 'wxid_haqoszjheyuz22', 'final_from_name': '轮回', 'to_wxid': 'wxid_4413224132412', 'money': '1.20', 'msgid': '', 'msg': {'is_arrived': 1, 'is_received': 1, 'money': '1.20', 'payer_pay_id': '100005000123120100087236308257792162', 'paysubtype': '3', 'receiver_pay_id': '1000050001202312010216430748916', 'remark': '', 'robot_pay_id': '1000050001202312010216430748916', 'pay_id': '100005000123120100087236308257792162', 'update_msg': 'receiver_pay_id、payer_pay_id 属性为robot_pay_id、pay_id的新名字内容是一样的建议更换'}}

  • 充值积分系统=>数据可视化(小程序)

二维码收款 {'event': 'EventScanCashMoney', 'robot_wxid': 'wxid_haqoszjheyuz22', 'robot_name': '', 'type': 9, 'from_wxid': '', 'from_name': '', 'final_from_wxid': '', 'final_from_name': '轮回', 'to_wxi d': 'wxid_haqoszjheyuz22', 'money': '1.30', 'msgid': '', 'msg': {'from_name': '微信支付', 'from_wxid': 'gh_3dfda90e39d6', 'money': '1.30', 'msgid': '15371052704166345', 'payer_nickname': '轮回', 'received_money_index': '1', 'remark': '', 'robot_wxid': 'wxid_haqoszjheyuz22', 'scene': 3, 'scene_desc': '个人收款完成', 'timestamp': 1701392422, 'to_name': '轮回', 'to_wxid': 'wxid_haqoszjhey uz22', 'total_money': '1.30', 'pay_wxid': 'gh_3dfda90e39d6', 'pay_INFO

  • 类似于V免签的支付系统 [更牛逼]

获取好友列表 [{"headimgurl":"https://wx.qlogo.cn/mmhead/ver_1/snpuqoMBlicH7zSpicTicwvdTwhCjEX72L7icibJzbmwa8RHuRcNaQ4NAibwDK1NjR2RtZSVYnNCP5AqU6IjXNPqRLQGiaUrvKlTXZ6INgVxVRic559fzZZdpnKL9S3nsJibobxV4/0","nickname":"amy","note":"","sex":2,"wx_num":"jiangsha6565","wxid":"wxid_gbs1prseui2f21","robot_wxid":"wxid_haqoszjheyuz22"},

  • 好友关系数据分析==>后台管理系统SCRM

接受文本消息

  • 消息备份
  • 年终总结

接受小程序消息 {'event': 'EventFriendMsg', 'robot_wxid': 'wxid_haqoszjheyuz22', 'robot_name': '轮回', 'type': 2002, 'from_wxid': 'wxid_4413224132412', 'from_name': 'Eric', 'final_from_wxid': 'wxid_4413224132412', 'final_from_name': 'Eric', 'to_wxid': 'wxid_haqoszjheyuz22', 'msgid': '6649187133962216517', 'content': '<?xml version="1.0"?>\r\n\r\n\t\r\n\t\t\r\n\t\t异度世界小助手\r\n\t\t33\r\n\t\thttps://mp.weixi n.qq.com/mp/waerrpage?appid=wxe50d2cfda682d4d2&type=upgrade&upgradetype=3#wechat_redirect\r\n\t\t\r\n\t\t\t3057020100044b304902010002043866a09902032f5aa90204b099697102046569295d042431303933336533352d663262342d346666612d613465632d3361346635306662633363320204051808030201000405004c550500\r\n\t\t\tac95a80afdeb87846c1e66c9b61e4193\r\n\t\t\t18260\r\n\t\t\t720\r\n\t\t\t576\r\n\t\t\tcd77a7b51a6372f24e909a4074f6a382\r\n\t\t\tcd77a7b51a6372f24e909a4074f6a382\r\n\t\t\t0\r\n\t\t\twxid_haqoszjheyuz22_6_1701390684\r\n\t\t\r\n\t\tgh_20265a6801b7@app\r\n\t\t异度世界小助手\r\n\t\tac95a80afdeb87846c1e66c9b61e4193\r\n\t\t< weappinfo>\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t2\r\n\t\t\t5\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\r\n\t\r\n\twxid_4413224132412\r\n\t0\r\n\t\r\n\t\t1\r\n\t\t\r\n\t\r\n\t\r\n\r\n', 'msg': '<?xml version="1.0"?>\r\n\r\n\t\r\n\t\t\r\n\t\t异度世界小助手\r\n\t\t33\r\n\t\thttps: //mp.weixin.qq.com/mp/waerrpage?appid=wxe50d2cfda682d4d2&type=upgrade&upgradetype=3#wechat_redirect\r\n\t\t\r\n\t\t\t3057020100044b304902010002043866a09902032f5aa90204b099697102046569295d042431303933336533352d663262342d346666612d613465632d3361346635306662633363320204051808030201000405004c550500\r\n\t\t\tac95a80afdeb87846c1e66c9b61e4193\r\n\t\t\t18260\r\n\t\t\t720\r\n\t\t\t576\r\n\t\t\tcd77a7b51a6372f24e909a4074f6a382\r\n\t\t\tcd77a7b51a6372f24e909a4074f6a382\r\n\t\t\t0\r\n\t\t\twxid_haqoszjheyuz22_6_1701390684\r\n\t\t\r\n\t\tgh_20265a6801b7@app\r\n\t\t异度世界小助手\r\n\t\tac95a80afdeb87846c1e66c9b61e4193</md5

\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t2\r\n\t\t\t5\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\t0\r\n\t\t\r\n\t\r\n\twxid_4413224132412\r\n\t0\r\n\t\r\n\t\t1\r\n\t\t\r\n\t\r\n\t\r\n\r\n'}

  • 小程序转码(二维码/文字链接)
  • 获取url路径地址/appld

接受图片消息 {'event': 'EventFriendMsg', 'robot_wxid': 'wxid_haqoszjheyuz22', 'robot_name': '轮回', 'type': 3, 'from_wxid': 'wxid_4413224132412', 'from_name': 'Eric', 'fi nal_from_wxid': 'wxid_4413224132412', 'final_from_name': 'Eric', 'to_wxid': 'wxid_haqoszjheyuz22', 'msgid': '3594034256049460127', 'msg': 'C:\Users\Administrator\Documents\Applet\static\8cc3763e7620f8344a64bf8879d47600.png'}

引用消息[@处理图片指令] {'event': 'EventFriendMsg', 'robot_wxid': 'wxid_haqoszjheyuz22', 'robot_name': '轮回', 'type': 49, 'from_wxid': 'wxid_4413224132412', 'from_name': 'Eric', 'f inal_from_wxid': 'wxid_4413224132412', 'final_from_name': 'Eric', 'to_wxid': 'wxid_haqoszjheyuz22', 'msgid': '7001340219117692963', 'msg': '<?xml version="1.0"?>\r\n\r\n\t\r\n\t\t\r\n\t\t57\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t3\r\n\t\t\t3594034256049460127\r\n\t\t\twxid_4413224132412\r\n\t\t\t\r\n\t\t\tEric\r\n\t\t\t<msg><img hdlength="0" length="59093" aeskey="76369b8bfcff816a6d893642d82d2b81" encryver="1" md5="8cc3763e7620f8344a64bf8879d47600" originsourcemd5="8db0825a497bb945da0a383a3d32dd4c" filekey="wxid_haqoszjheyuz22_7_1701390794" uploadcontinuecount="0" imgsourceurl="" hevc_mid_size="59093" cdnbigimgurl="" cdnmidimgurl="3057020100044b304902010002047c076f2902032f5aa90204b69969710204656929ca042466616562356337302d396532382d346430622d393739652d353964323331306565643261020405190a020201000405004c55cd00" cdnthumburl="3057020100044b304902010002047c076f2902032f5aa90204b69969710204656929ca042466616562356337302d396532382d346430622d393739652d353964323331306565643261020405190a020201000405004c55cd00" cdnthumblength="2230" cdnthumbwidth="55" cdnthumbheight="120" cdnthumbaeskey="76369b8bfcff816a6d893642d82d2b81"/><appinfo><appid></appid><appname></appname><version>0</version><isforceupdate>1</isforceupdate><mediatagname></mediatagname><messageext></messageext><messageaction></messageaction></appinfo><MMAsset><m_assetUrlForSystem><![CDATA[749B89AD-79A4-4A14-ABBE-B878E79722B8/L0/001]]></m_assetUrlForSystem><m_isNeedOriginImage>0</m_isNeedOriginImage><m_isFailedFromIcloud>0</m_isFailedFromIcloud><m_isLoadingFromIcloud>0</m_isLoadingFromIcloud></MMAsset></msg>\r\n\t\t\t<msgsource><bizflag>0</bizflag><sec_msg_node><uuid><![CDATA[a84e81cea000773f7f0f0dbcef187c21_]]></uuid></sec_msg_node></msgsource>\r\n\t\t\t1701390794\r\n\t\t\r\n\t\r\n\twxid_4413224132412\r\n\t0\r\n\t\r\n\t\t1\r\n\t\t\r\n\t\r\n\t\r\n\r\n'}

核心: 判断引用消息id,以及消息类型(图片)==>'msgid': '3594034256049460127'

  • OCR识别
  • 头像转动漫

发送文件语音消息 {'event': 'SendFileMsg, 'robot_wxid': 'wxid_haqoszjheyuz22', 'robot_name': '', 'type': 34, 'from_wxid': 'wxid_haqoszjheyuz22', 'from_name': '', 'final_from_wxid': 'wxid_haqoszjheyuz22', 'final_from_name': '', 'to_wxid': 'wxid_4413224132412', 'msgid': '1666643945130145436', 'msg': 'C:\Users\Administrator\Documents\Applet\static\.mp3'}

  • AI变声

接受文件(pdf)

  • pdf翻译
  • 自动上传网盘 [nextcloud]

接受语音消息 {'event': 'EventFriendMsg', 'robot_wxid': 'wxid_haqoszjheyuz22', 'robot_name': '轮回', 'type': 34, 'from_wxid': 'wxid_4413224132412', 'from_name': 'Eric', 'f inal_from_wxid': 'wxid_4413224132412', 'final_from_name': 'Eric', 'to_wxid': 'wxid_haqoszjheyuz22', 'msgid': '6536324883072635591', 'msg': 'C:\Users\Administrator\Documents\Applet\static\.mp3'}

  • 自动识别翻译

接受视频消息

  • 自动生成srt双语字幕