提交 bae84f00 编写于 作者: Q qq_21051503

Thu Feb 15 19:25:00 CST 2024 inscode

上级 9cb64c3c
{"\rpuppet\nPUPPET-WECHAT4U":{"PROP":{"uuid":"Qa6BQ6qiog==","uin":"1324338008","sid":"6LOE/4g4yh6vX4r0","skey":"@crypt_6a1ca4c0_cf0432f5ad40a875e09fb2d7c7edd197","passTicket":"3HmiJYHVawaSYe%2B4ADyusR9kuJuIC0yX7xZ1I%2FzsMwrRHqhOGBmtG5YC3Tw%2BCHMzWs0%2BR2r5rSJ9lFnsC6tOuQ%3D%3D","formatedSyncKey":"1_828890363|2_828890521|3_828890352|1000_1707982260","webwxDataTicket":"gSfU+Dtew7bvtaMZOTgVWVNf","syncKey":{"Count":4,"List":[{"Key":1,"Val":828890363},{"Key":2,"Val":828890531},{"Key":3,"Val":828890352},{"Key":1000,"Val":1707982260}]}},"CONF":{"origin":"https://wx2.qq.com","baseUri":"https://wx2.qq.com/cgi-bin/mmwebwx-bin","API_jsLogin":"https://login.wx2.qq.com/jslogin?appid=wx782c26e4c19acffb&fun=new&lang=zh-CN&redirect_uri=https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?mod=desktop","API_login":"https://login.wx2.qq.com/cgi-bin/mmwebwx-bin/login","API_synccheck":"https://webpush.wx2.qq.com/cgi-bin/mmwebwx-bin/synccheck","API_webwxdownloadmedia":"https://file.wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetmedia","API_webwxuploadmedia":"https://file.wx2.qq.com/cgi-bin/mmwebwx-bin/webwxuploadmedia","API_webwxpreview":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxpreview","API_webwxinit":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxinit","API_webwxgetcontact":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact","API_webwxsync":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsync","API_webwxbatchgetcontact":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxbatchgetcontact","API_webwxgeticon":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgeticon","API_webwxsendmsg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsg","API_webwxsendmsgimg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsgimg","API_webwxsendmsgvedio":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendvideomsg","API_webwxsendemoticon":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendemoticon","API_webwxsendappmsg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendappmsg","API_webwxgetheadimg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetheadimg","API_webwxgetmsgimg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetmsgimg","API_webwxgetmedia":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetmedia","API_webwxgetvideo":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetvideo","API_webwxlogout":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxlogout","API_webwxgetvoice":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetvoice","API_webwxupdatechatroom":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxupdatechatroom","API_webwxcreatechatroom":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcreatechatroom","API_webwxstatusnotify":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify","API_webwxcheckurl":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcheckurl","API_webwxverifyuser":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxverifyuser","API_webwxfeedback":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendfeedback","API_webwxreport":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport","API_webwxsearch":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsearchcontact","API_webwxoplog":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxoplog","API_checkupload":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcheckupload","API_webwxrevokemsg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxrevokemsg","LANG":"zh-CN","EMOTICON_REG":"img\\sclass=\"(qq)?emoji (qq)?emoji([\\da-f]*?)\"\\s(text=\"[^<>(\\s]*\")?\\s?src=\"[^<>(\\s]*\"\\s*","RES_PATH":"/zh_CN/htmledition/v2/","oplogCmdId":{"TOPCONTACT":3,"MODREMARKNAME":2},"SP_CONTACT_FILE_HELPER":"filehelper","SP_CONTACT_NEWSAPP":"newsapp","SP_CONTACT_RECOMMEND_HELPER":"fmessage","CONTACTFLAG_CONTACT":1,"CONTACTFLAG_CHATCONTACT":2,"CONTACTFLAG_CHATROOMCONTACT":4,"CONTACTFLAG_BLACKLISTCONTACT":8,"CONTACTFLAG_DOMAINCONTACT":16,"CONTACTFLAG_HIDECONTACT":32,"CONTACTFLAG_FAVOURCONTACT":64,"CONTACTFLAG_3RDAPPCONTACT":128,"CONTACTFLAG_SNSBLACKLISTCONTACT":256,"CONTACTFLAG_NOTIFYCLOSECONTACT":512,"CONTACTFLAG_TOPCONTACT":2048,"MM_USERATTRVERIFYFALG_BIZ":1,"MM_USERATTRVERIFYFALG_FAMOUS":2,"MM_USERATTRVERIFYFALG_BIZ_BIG":4,"MM_USERATTRVERIFYFALG_BIZ_BRAND":8,"MM_USERATTRVERIFYFALG_BIZ_VERIFIED":16,"MM_DATA_TEXT":1,"MM_DATA_HTML":2,"MM_DATA_IMG":3,"MM_DATA_PRIVATEMSG_TEXT":11,"MM_DATA_PRIVATEMSG_HTML":12,"MM_DATA_PRIVATEMSG_IMG":13,"MM_DATA_VOICEMSG":34,"MM_DATA_PUSHMAIL":35,"MM_DATA_QMSG":36,"MM_DATA_VERIFYMSG":37,"MM_DATA_PUSHSYSTEMMSG":38,"MM_DATA_QQLIXIANMSG_IMG":39,"MM_DATA_POSSIBLEFRIEND_MSG":40,"MM_DATA_SHARECARD":42,"MM_DATA_VIDEO":43,"MM_DATA_VIDEO_IPHONE_EXPORT":44,"MM_DATA_EMOJI":47,"MM_DATA_LOCATION":48,"MM_DATA_APPMSG":49,"MM_DATA_VOIPMSG":50,"MM_DATA_STATUSNOTIFY":51,"MM_DATA_VOIPNOTIFY":52,"MM_DATA_VOIPINVITE":53,"MM_DATA_MICROVIDEO":62,"MM_DATA_SYSNOTICE":9999,"MM_DATA_SYS":10000,"MM_DATA_RECALLED":10002,"MSGTYPE_TEXT":1,"MSGTYPE_IMAGE":3,"MSGTYPE_VOICE":34,"MSGTYPE_VIDEO":43,"MSGTYPE_MICROVIDEO":62,"MSGTYPE_EMOTICON":47,"MSGTYPE_APP":49,"MSGTYPE_VOIPMSG":50,"MSGTYPE_VOIPNOTIFY":52,"MSGTYPE_VOIPINVITE":53,"MSGTYPE_LOCATION":48,"MSGTYPE_STATUSNOTIFY":51,"MSGTYPE_SYSNOTICE":9999,"MSGTYPE_POSSIBLEFRIEND_MSG":40,"MSGTYPE_VERIFYMSG":37,"MSGTYPE_SHARECARD":42,"MSGTYPE_SYS":10000,"MSGTYPE_RECALLED":10002,"MSG_SEND_STATUS_READY":0,"MSG_SEND_STATUS_SENDING":1,"MSG_SEND_STATUS_SUCC":2,"MSG_SEND_STATUS_FAIL":5,"APPMSGTYPE_TEXT":1,"APPMSGTYPE_IMG":2,"APPMSGTYPE_AUDIO":3,"APPMSGTYPE_VIDEO":4,"APPMSGTYPE_URL":5,"APPMSGTYPE_ATTACH":6,"APPMSGTYPE_OPEN":7,"APPMSGTYPE_EMOJI":8,"APPMSGTYPE_VOICE_REMIND":9,"APPMSGTYPE_SCAN_GOOD":10,"APPMSGTYPE_GOOD":13,"APPMSGTYPE_EMOTION":15,"APPMSGTYPE_CARD_TICKET":16,"APPMSGTYPE_REALTIME_SHARE_LOCATION":17,"APPMSGTYPE_TRANSFERS":2000,"APPMSGTYPE_RED_ENVELOPES":2001,"APPMSGTYPE_READER_TYPE":100001,"UPLOAD_MEDIA_TYPE_IMAGE":1,"UPLOAD_MEDIA_TYPE_VIDEO":2,"UPLOAD_MEDIA_TYPE_AUDIO":3,"UPLOAD_MEDIA_TYPE_ATTACHMENT":4,"PROFILE_BITFLAG_NOCHANGE":0,"PROFILE_BITFLAG_CHANGE":190,"CHATROOM_NOTIFY_OPEN":1,"CHATROOM_NOTIFY_CLOSE":0,"StatusNotifyCode_READED":1,"StatusNotifyCode_ENTER_SESSION":2,"StatusNotifyCode_INITED":3,"StatusNotifyCode_SYNC_CONV":4,"StatusNotifyCode_QUIT_SESSION":5,"VERIFYUSER_OPCODE_ADDCONTACT":1,"VERIFYUSER_OPCODE_SENDREQUEST":2,"VERIFYUSER_OPCODE_VERIFYOK":3,"VERIFYUSER_OPCODE_VERIFYREJECT":4,"VERIFYUSER_OPCODE_SENDERREPLY":5,"VERIFYUSER_OPCODE_RECVERREPLY":6,"ADDSCENE_PF_QQ":4,"ADDSCENE_PF_EMAIL":5,"ADDSCENE_PF_CONTACT":6,"ADDSCENE_PF_WEIXIN":7,"ADDSCENE_PF_GROUP":8,"ADDSCENE_PF_UNKNOWN":9,"ADDSCENE_PF_MOBILE":10,"ADDSCENE_PF_WEB":33,"TIMEOUT_SYNC_CHECK":0,"EMOJI_FLAG_GIF":2,"KEYCODE_BACKSPACE":8,"KEYCODE_ENTER":13,"KEYCODE_SHIFT":16,"KEYCODE_ESC":27,"KEYCODE_DELETE":34,"KEYCODE_ARROW_LEFT":37,"KEYCODE_ARROW_UP":38,"KEYCODE_ARROW_RIGHT":39,"KEYCODE_ARROW_DOWN":40,"KEYCODE_NUM2":50,"KEYCODE_AT":64,"KEYCODE_NUM_ADD":107,"KEYCODE_NUM_MINUS":109,"KEYCODE_ADD":187,"KEYCODE_MINUS":189,"MM_NOTIFY_CLOSE":0,"MM_NOTIFY_OPEN":1,"MM_SOUND_CLOSE":0,"MM_SOUND_OPEN":1,"MM_SEND_FILE_STATUS_QUEUED":0,"MM_SEND_FILE_STATUS_SENDING":1,"MM_SEND_FILE_STATUS_SUCCESS":2,"MM_SEND_FILE_STATUS_FAIL":3,"MM_SEND_FILE_STATUS_CANCEL":4,"MM_EMOTICON_WEB":"_web","SYNCCHECK_RET_SUCCESS":0,"SYNCCHECK_RET_LOGOUT":1101,"SYNCCHECK_SELECTOR_NORMAL":0,"SYNCCHECK_SELECTOR_MSG":2,"SYNCCHECK_SELECTOR_MOBILEOPEN":7,"STATE":{"init":"init","uuid":"uuid","login":"login","logout":"logout"},"SPECIALUSERS":["newsapp","fmessage","filehelper","weibo","qqmail","fmessage","tmessage","qmessage","qqsync","floatbottle","lbsapp","shakeapp","medianote","qqfriend","readerapp","blogapp","facebookapp","masssendapp","meishiapp","feedsapp","voip","blogappweixin","weixin","brandsessionholder","weixinreminder","wxid_novlwrv3lqwv11","gh_22b87fa7cb3c","officialaccounts","notification_messages","wxid_novlwrv3lqwv11","gh_22b87fa7cb3c","wxitil","userexperience_alarm","notification_messages"]},"COOKIE":{"pgv_pvi":"5090925751050468000","pgv_si":"s13270131555243108000","wxuin":"1324338008","wxsid":"6LOE/4g4yh6vX4r0","wxloadtime":"1707992755","mm_lang":"zh-CN","webwx_data_ticket":"gSfU+Dtew7bvtaMZOTgVWVNf","webwxuvid":"bfa5eb4aab807e628bc1e00db26e58b7f561fa25d8757c80ab2c2bb2bcd872bcb74962e4197e7b0eb55d5f2edbcd001f","webwx_auth_ticket":"CIsBEKqSxPEFGoABrhQQ2SZR6ylAJRVXnv2hrITuF06230vH9K8K23fKlmzvEgm0pC4weyJrqDZbSSm6RBDq2b8WUEarDsIJJVQZ/Gf02YDGKFm+y0Pg3PZaEGmIUNghsw9olozFI3KG6g5vjMkmmqkjc8vtQNnMVNn6OAgdvYVbSo+P2gthY4drKdw="},"user":{"Uin":1324338008,"UserName":"@99921dfa3cc510fddfbf04d194bcfa51eebf927f7e86fcd0032d69146cf7fcfe","NickName":"五花肉<span class=\"emoji emoji1f339\"></span>","HeadImgUrl":"/cgi-bin/mmwebwx-bin/webwxgeticon?seq=1411770926&username=@99921dfa3cc510fddfbf04d194bcfa51eebf927f7e86fcd0032d69146cf7fcfe&skey=@crypt_6a1ca4c0_cf0432f5ad40a875e09fb2d7c7edd197","Sex":2,"HeadImgFlag":1,"SnsFlag":305}}}
\ No newline at end of file
{"\rpuppet\nPUPPET-WECHAT4U":{"PROP":{"uuid":"oaRfTteskw==","uin":"1324338008","sid":"1QEhugz60xQW2Wcd","skey":"@crypt_6a1ca4c0_20306ebd8809c05a345c11c402a505e8","passTicket":"Wl7bXcD%2BRj5%2FdxZc72Y7Gn1hFFAusbJY6f15CrP8zhtE2EmWFGvQVCghCtkc9XLfF8XTGgeK4MmWf3kZcRDivg%3D%3D","formatedSyncKey":"1_828890363|2_828890565|3_828890352|1000_1707982260","webwxDataTicket":"gScRS7OPnAQ5Gla9MgCwPlGh","syncKey":{"Count":4,"List":[{"Key":1,"Val":828890363},{"Key":2,"Val":828890583},{"Key":3,"Val":828890352},{"Key":1000,"Val":1707982260}]}},"CONF":{"origin":"https://wx2.qq.com","baseUri":"https://wx2.qq.com/cgi-bin/mmwebwx-bin","API_jsLogin":"https://login.wx2.qq.com/jslogin?appid=wx782c26e4c19acffb&fun=new&lang=zh-CN&redirect_uri=https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?mod=desktop","API_login":"https://login.wx2.qq.com/cgi-bin/mmwebwx-bin/login","API_synccheck":"https://webpush.wx2.qq.com/cgi-bin/mmwebwx-bin/synccheck","API_webwxdownloadmedia":"https://file.wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetmedia","API_webwxuploadmedia":"https://file.wx2.qq.com/cgi-bin/mmwebwx-bin/webwxuploadmedia","API_webwxpreview":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxpreview","API_webwxinit":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxinit","API_webwxgetcontact":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact","API_webwxsync":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsync","API_webwxbatchgetcontact":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxbatchgetcontact","API_webwxgeticon":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgeticon","API_webwxsendmsg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsg","API_webwxsendmsgimg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsgimg","API_webwxsendmsgvedio":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendvideomsg","API_webwxsendemoticon":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendemoticon","API_webwxsendappmsg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendappmsg","API_webwxgetheadimg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetheadimg","API_webwxgetmsgimg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetmsgimg","API_webwxgetmedia":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetmedia","API_webwxgetvideo":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetvideo","API_webwxlogout":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxlogout","API_webwxgetvoice":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetvoice","API_webwxupdatechatroom":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxupdatechatroom","API_webwxcreatechatroom":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcreatechatroom","API_webwxstatusnotify":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify","API_webwxcheckurl":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcheckurl","API_webwxverifyuser":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxverifyuser","API_webwxfeedback":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendfeedback","API_webwxreport":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport","API_webwxsearch":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsearchcontact","API_webwxoplog":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxoplog","API_checkupload":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcheckupload","API_webwxrevokemsg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxrevokemsg","LANG":"zh-CN","EMOTICON_REG":"img\\sclass=\"(qq)?emoji (qq)?emoji([\\da-f]*?)\"\\s(text=\"[^<>(\\s]*\")?\\s?src=\"[^<>(\\s]*\"\\s*","RES_PATH":"/zh_CN/htmledition/v2/","oplogCmdId":{"TOPCONTACT":3,"MODREMARKNAME":2},"SP_CONTACT_FILE_HELPER":"filehelper","SP_CONTACT_NEWSAPP":"newsapp","SP_CONTACT_RECOMMEND_HELPER":"fmessage","CONTACTFLAG_CONTACT":1,"CONTACTFLAG_CHATCONTACT":2,"CONTACTFLAG_CHATROOMCONTACT":4,"CONTACTFLAG_BLACKLISTCONTACT":8,"CONTACTFLAG_DOMAINCONTACT":16,"CONTACTFLAG_HIDECONTACT":32,"CONTACTFLAG_FAVOURCONTACT":64,"CONTACTFLAG_3RDAPPCONTACT":128,"CONTACTFLAG_SNSBLACKLISTCONTACT":256,"CONTACTFLAG_NOTIFYCLOSECONTACT":512,"CONTACTFLAG_TOPCONTACT":2048,"MM_USERATTRVERIFYFALG_BIZ":1,"MM_USERATTRVERIFYFALG_FAMOUS":2,"MM_USERATTRVERIFYFALG_BIZ_BIG":4,"MM_USERATTRVERIFYFALG_BIZ_BRAND":8,"MM_USERATTRVERIFYFALG_BIZ_VERIFIED":16,"MM_DATA_TEXT":1,"MM_DATA_HTML":2,"MM_DATA_IMG":3,"MM_DATA_PRIVATEMSG_TEXT":11,"MM_DATA_PRIVATEMSG_HTML":12,"MM_DATA_PRIVATEMSG_IMG":13,"MM_DATA_VOICEMSG":34,"MM_DATA_PUSHMAIL":35,"MM_DATA_QMSG":36,"MM_DATA_VERIFYMSG":37,"MM_DATA_PUSHSYSTEMMSG":38,"MM_DATA_QQLIXIANMSG_IMG":39,"MM_DATA_POSSIBLEFRIEND_MSG":40,"MM_DATA_SHARECARD":42,"MM_DATA_VIDEO":43,"MM_DATA_VIDEO_IPHONE_EXPORT":44,"MM_DATA_EMOJI":47,"MM_DATA_LOCATION":48,"MM_DATA_APPMSG":49,"MM_DATA_VOIPMSG":50,"MM_DATA_STATUSNOTIFY":51,"MM_DATA_VOIPNOTIFY":52,"MM_DATA_VOIPINVITE":53,"MM_DATA_MICROVIDEO":62,"MM_DATA_SYSNOTICE":9999,"MM_DATA_SYS":10000,"MM_DATA_RECALLED":10002,"MSGTYPE_TEXT":1,"MSGTYPE_IMAGE":3,"MSGTYPE_VOICE":34,"MSGTYPE_VIDEO":43,"MSGTYPE_MICROVIDEO":62,"MSGTYPE_EMOTICON":47,"MSGTYPE_APP":49,"MSGTYPE_VOIPMSG":50,"MSGTYPE_VOIPNOTIFY":52,"MSGTYPE_VOIPINVITE":53,"MSGTYPE_LOCATION":48,"MSGTYPE_STATUSNOTIFY":51,"MSGTYPE_SYSNOTICE":9999,"MSGTYPE_POSSIBLEFRIEND_MSG":40,"MSGTYPE_VERIFYMSG":37,"MSGTYPE_SHARECARD":42,"MSGTYPE_SYS":10000,"MSGTYPE_RECALLED":10002,"MSG_SEND_STATUS_READY":0,"MSG_SEND_STATUS_SENDING":1,"MSG_SEND_STATUS_SUCC":2,"MSG_SEND_STATUS_FAIL":5,"APPMSGTYPE_TEXT":1,"APPMSGTYPE_IMG":2,"APPMSGTYPE_AUDIO":3,"APPMSGTYPE_VIDEO":4,"APPMSGTYPE_URL":5,"APPMSGTYPE_ATTACH":6,"APPMSGTYPE_OPEN":7,"APPMSGTYPE_EMOJI":8,"APPMSGTYPE_VOICE_REMIND":9,"APPMSGTYPE_SCAN_GOOD":10,"APPMSGTYPE_GOOD":13,"APPMSGTYPE_EMOTION":15,"APPMSGTYPE_CARD_TICKET":16,"APPMSGTYPE_REALTIME_SHARE_LOCATION":17,"APPMSGTYPE_TRANSFERS":2000,"APPMSGTYPE_RED_ENVELOPES":2001,"APPMSGTYPE_READER_TYPE":100001,"UPLOAD_MEDIA_TYPE_IMAGE":1,"UPLOAD_MEDIA_TYPE_VIDEO":2,"UPLOAD_MEDIA_TYPE_AUDIO":3,"UPLOAD_MEDIA_TYPE_ATTACHMENT":4,"PROFILE_BITFLAG_NOCHANGE":0,"PROFILE_BITFLAG_CHANGE":190,"CHATROOM_NOTIFY_OPEN":1,"CHATROOM_NOTIFY_CLOSE":0,"StatusNotifyCode_READED":1,"StatusNotifyCode_ENTER_SESSION":2,"StatusNotifyCode_INITED":3,"StatusNotifyCode_SYNC_CONV":4,"StatusNotifyCode_QUIT_SESSION":5,"VERIFYUSER_OPCODE_ADDCONTACT":1,"VERIFYUSER_OPCODE_SENDREQUEST":2,"VERIFYUSER_OPCODE_VERIFYOK":3,"VERIFYUSER_OPCODE_VERIFYREJECT":4,"VERIFYUSER_OPCODE_SENDERREPLY":5,"VERIFYUSER_OPCODE_RECVERREPLY":6,"ADDSCENE_PF_QQ":4,"ADDSCENE_PF_EMAIL":5,"ADDSCENE_PF_CONTACT":6,"ADDSCENE_PF_WEIXIN":7,"ADDSCENE_PF_GROUP":8,"ADDSCENE_PF_UNKNOWN":9,"ADDSCENE_PF_MOBILE":10,"ADDSCENE_PF_WEB":33,"TIMEOUT_SYNC_CHECK":0,"EMOJI_FLAG_GIF":2,"KEYCODE_BACKSPACE":8,"KEYCODE_ENTER":13,"KEYCODE_SHIFT":16,"KEYCODE_ESC":27,"KEYCODE_DELETE":34,"KEYCODE_ARROW_LEFT":37,"KEYCODE_ARROW_UP":38,"KEYCODE_ARROW_RIGHT":39,"KEYCODE_ARROW_DOWN":40,"KEYCODE_NUM2":50,"KEYCODE_AT":64,"KEYCODE_NUM_ADD":107,"KEYCODE_NUM_MINUS":109,"KEYCODE_ADD":187,"KEYCODE_MINUS":189,"MM_NOTIFY_CLOSE":0,"MM_NOTIFY_OPEN":1,"MM_SOUND_CLOSE":0,"MM_SOUND_OPEN":1,"MM_SEND_FILE_STATUS_QUEUED":0,"MM_SEND_FILE_STATUS_SENDING":1,"MM_SEND_FILE_STATUS_SUCCESS":2,"MM_SEND_FILE_STATUS_FAIL":3,"MM_SEND_FILE_STATUS_CANCEL":4,"MM_EMOTICON_WEB":"_web","SYNCCHECK_RET_SUCCESS":0,"SYNCCHECK_RET_LOGOUT":1101,"SYNCCHECK_SELECTOR_NORMAL":0,"SYNCCHECK_SELECTOR_MSG":2,"SYNCCHECK_SELECTOR_MOBILEOPEN":7,"STATE":{"init":"init","uuid":"uuid","login":"login","logout":"logout"},"SPECIALUSERS":["newsapp","fmessage","filehelper","weibo","qqmail","fmessage","tmessage","qmessage","qqsync","floatbottle","lbsapp","shakeapp","medianote","qqfriend","readerapp","blogapp","facebookapp","masssendapp","meishiapp","feedsapp","voip","blogappweixin","weixin","brandsessionholder","weixinreminder","wxid_novlwrv3lqwv11","gh_22b87fa7cb3c","officialaccounts","notification_messages","wxid_novlwrv3lqwv11","gh_22b87fa7cb3c","wxitil","userexperience_alarm","notification_messages"]},"COOKIE":{"pgv_pvi":"8446370125958365000","pgv_si":"s9638392202805563000","wxuin":"1324338008","wxsid":"1QEhugz60xQW2Wcd","wxloadtime":"1707993868","mm_lang":"zh-CN","webwx_data_ticket":"gScRS7OPnAQ5Gla9MgCwPlGh","webwxuvid":"bfa5eb4aab807e628bc1e00db26e58b734ae2ff5ee3e8d3db230af0c10d425976a45cc4c8828948647f32c4ff75694bf","webwx_auth_ticket":"CIsBEJCb+J8BGoAB49GWpmfyQEFVGACO7cuoc4TuF06230vH9K8K23fKlmz7MIivgQjIRNtXyG4Fi8P6uYk1e1Wgam68vX85Vt+fbEzNKDn4cygPb1lkPV2+mIMvI6Nnu19HdO2fuvZ99bO+bGqJQ3h5rpnHveAzMNOhgggdvYVbSo+P2gthY4drKdw="},"user":{"Uin":1324338008,"UserName":"@4a20a6d0ca500476f6b0a54da13ae5d093f9d7e40f9836f6fccc7a432d2ac5b6","NickName":"五花肉<span class=\"emoji emoji1f339\"></span>","HeadImgUrl":"/cgi-bin/mmwebwx-bin/webwxgeticon?seq=1583115198&username=@4a20a6d0ca500476f6b0a54da13ae5d093f9d7e40f9836f6fccc7a432d2ac5b6&skey=@crypt_6a1ca4c0_20306ebd8809c05a345c11c402a505e8","Sex":2,"HeadImgFlag":1,"SnsFlag":305}}}
\ No newline at end of file
{"\rpuppet\nPUPPET-WECHAT4U":{"PROP":{"uuid":"AYfzIFsYrQ==","uin":"1324338008","sid":"ZiwfOtHxrcZ8gwKa","skey":"@crypt_6a1ca4c0_d9429fa08c8aa994959f0a8542286c8f","passTicket":"VBmHEnZVdaMvx9ndJc3TaltAxoaRv%2BTm1GaxIgKEGbdgdM5IVUcABrpsiO8%2B9YIppjRWJOJMtwUHFUbw9EbSRA%3D%3D","formatedSyncKey":"1_828890363|2_828890454|3_828890352|1000_1707982260","webwxDataTicket":"gSf8AD/eLt+f1DAo2fn8oKQs","syncKey":{"Count":4,"List":[{"Key":1,"Val":828890363},{"Key":2,"Val":828890693},{"Key":3,"Val":828890352},{"Key":1000,"Val":1707995522}]}},"CONF":{"origin":"https://wx2.qq.com","baseUri":"https://wx2.qq.com/cgi-bin/mmwebwx-bin","API_jsLogin":"https://login.wx2.qq.com/jslogin?appid=wx782c26e4c19acffb&fun=new&lang=zh-CN&redirect_uri=https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?mod=desktop","API_login":"https://login.wx2.qq.com/cgi-bin/mmwebwx-bin/login","API_synccheck":"https://webpush.wx2.qq.com/cgi-bin/mmwebwx-bin/synccheck","API_webwxdownloadmedia":"https://file.wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetmedia","API_webwxuploadmedia":"https://file.wx2.qq.com/cgi-bin/mmwebwx-bin/webwxuploadmedia","API_webwxpreview":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxpreview","API_webwxinit":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxinit","API_webwxgetcontact":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact","API_webwxsync":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsync","API_webwxbatchgetcontact":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxbatchgetcontact","API_webwxgeticon":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgeticon","API_webwxsendmsg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsg","API_webwxsendmsgimg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsgimg","API_webwxsendmsgvedio":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendvideomsg","API_webwxsendemoticon":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendemoticon","API_webwxsendappmsg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendappmsg","API_webwxgetheadimg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetheadimg","API_webwxgetmsgimg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetmsgimg","API_webwxgetmedia":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetmedia","API_webwxgetvideo":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetvideo","API_webwxlogout":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxlogout","API_webwxgetvoice":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetvoice","API_webwxupdatechatroom":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxupdatechatroom","API_webwxcreatechatroom":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcreatechatroom","API_webwxstatusnotify":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify","API_webwxcheckurl":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcheckurl","API_webwxverifyuser":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxverifyuser","API_webwxfeedback":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendfeedback","API_webwxreport":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport","API_webwxsearch":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsearchcontact","API_webwxoplog":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxoplog","API_checkupload":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxcheckupload","API_webwxrevokemsg":"https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxrevokemsg","LANG":"zh-CN","EMOTICON_REG":"img\\sclass=\"(qq)?emoji (qq)?emoji([\\da-f]*?)\"\\s(text=\"[^<>(\\s]*\")?\\s?src=\"[^<>(\\s]*\"\\s*","RES_PATH":"/zh_CN/htmledition/v2/","oplogCmdId":{"TOPCONTACT":3,"MODREMARKNAME":2},"SP_CONTACT_FILE_HELPER":"filehelper","SP_CONTACT_NEWSAPP":"newsapp","SP_CONTACT_RECOMMEND_HELPER":"fmessage","CONTACTFLAG_CONTACT":1,"CONTACTFLAG_CHATCONTACT":2,"CONTACTFLAG_CHATROOMCONTACT":4,"CONTACTFLAG_BLACKLISTCONTACT":8,"CONTACTFLAG_DOMAINCONTACT":16,"CONTACTFLAG_HIDECONTACT":32,"CONTACTFLAG_FAVOURCONTACT":64,"CONTACTFLAG_3RDAPPCONTACT":128,"CONTACTFLAG_SNSBLACKLISTCONTACT":256,"CONTACTFLAG_NOTIFYCLOSECONTACT":512,"CONTACTFLAG_TOPCONTACT":2048,"MM_USERATTRVERIFYFALG_BIZ":1,"MM_USERATTRVERIFYFALG_FAMOUS":2,"MM_USERATTRVERIFYFALG_BIZ_BIG":4,"MM_USERATTRVERIFYFALG_BIZ_BRAND":8,"MM_USERATTRVERIFYFALG_BIZ_VERIFIED":16,"MM_DATA_TEXT":1,"MM_DATA_HTML":2,"MM_DATA_IMG":3,"MM_DATA_PRIVATEMSG_TEXT":11,"MM_DATA_PRIVATEMSG_HTML":12,"MM_DATA_PRIVATEMSG_IMG":13,"MM_DATA_VOICEMSG":34,"MM_DATA_PUSHMAIL":35,"MM_DATA_QMSG":36,"MM_DATA_VERIFYMSG":37,"MM_DATA_PUSHSYSTEMMSG":38,"MM_DATA_QQLIXIANMSG_IMG":39,"MM_DATA_POSSIBLEFRIEND_MSG":40,"MM_DATA_SHARECARD":42,"MM_DATA_VIDEO":43,"MM_DATA_VIDEO_IPHONE_EXPORT":44,"MM_DATA_EMOJI":47,"MM_DATA_LOCATION":48,"MM_DATA_APPMSG":49,"MM_DATA_VOIPMSG":50,"MM_DATA_STATUSNOTIFY":51,"MM_DATA_VOIPNOTIFY":52,"MM_DATA_VOIPINVITE":53,"MM_DATA_MICROVIDEO":62,"MM_DATA_SYSNOTICE":9999,"MM_DATA_SYS":10000,"MM_DATA_RECALLED":10002,"MSGTYPE_TEXT":1,"MSGTYPE_IMAGE":3,"MSGTYPE_VOICE":34,"MSGTYPE_VIDEO":43,"MSGTYPE_MICROVIDEO":62,"MSGTYPE_EMOTICON":47,"MSGTYPE_APP":49,"MSGTYPE_VOIPMSG":50,"MSGTYPE_VOIPNOTIFY":52,"MSGTYPE_VOIPINVITE":53,"MSGTYPE_LOCATION":48,"MSGTYPE_STATUSNOTIFY":51,"MSGTYPE_SYSNOTICE":9999,"MSGTYPE_POSSIBLEFRIEND_MSG":40,"MSGTYPE_VERIFYMSG":37,"MSGTYPE_SHARECARD":42,"MSGTYPE_SYS":10000,"MSGTYPE_RECALLED":10002,"MSG_SEND_STATUS_READY":0,"MSG_SEND_STATUS_SENDING":1,"MSG_SEND_STATUS_SUCC":2,"MSG_SEND_STATUS_FAIL":5,"APPMSGTYPE_TEXT":1,"APPMSGTYPE_IMG":2,"APPMSGTYPE_AUDIO":3,"APPMSGTYPE_VIDEO":4,"APPMSGTYPE_URL":5,"APPMSGTYPE_ATTACH":6,"APPMSGTYPE_OPEN":7,"APPMSGTYPE_EMOJI":8,"APPMSGTYPE_VOICE_REMIND":9,"APPMSGTYPE_SCAN_GOOD":10,"APPMSGTYPE_GOOD":13,"APPMSGTYPE_EMOTION":15,"APPMSGTYPE_CARD_TICKET":16,"APPMSGTYPE_REALTIME_SHARE_LOCATION":17,"APPMSGTYPE_TRANSFERS":2000,"APPMSGTYPE_RED_ENVELOPES":2001,"APPMSGTYPE_READER_TYPE":100001,"UPLOAD_MEDIA_TYPE_IMAGE":1,"UPLOAD_MEDIA_TYPE_VIDEO":2,"UPLOAD_MEDIA_TYPE_AUDIO":3,"UPLOAD_MEDIA_TYPE_ATTACHMENT":4,"PROFILE_BITFLAG_NOCHANGE":0,"PROFILE_BITFLAG_CHANGE":190,"CHATROOM_NOTIFY_OPEN":1,"CHATROOM_NOTIFY_CLOSE":0,"StatusNotifyCode_READED":1,"StatusNotifyCode_ENTER_SESSION":2,"StatusNotifyCode_INITED":3,"StatusNotifyCode_SYNC_CONV":4,"StatusNotifyCode_QUIT_SESSION":5,"VERIFYUSER_OPCODE_ADDCONTACT":1,"VERIFYUSER_OPCODE_SENDREQUEST":2,"VERIFYUSER_OPCODE_VERIFYOK":3,"VERIFYUSER_OPCODE_VERIFYREJECT":4,"VERIFYUSER_OPCODE_SENDERREPLY":5,"VERIFYUSER_OPCODE_RECVERREPLY":6,"ADDSCENE_PF_QQ":4,"ADDSCENE_PF_EMAIL":5,"ADDSCENE_PF_CONTACT":6,"ADDSCENE_PF_WEIXIN":7,"ADDSCENE_PF_GROUP":8,"ADDSCENE_PF_UNKNOWN":9,"ADDSCENE_PF_MOBILE":10,"ADDSCENE_PF_WEB":33,"TIMEOUT_SYNC_CHECK":0,"EMOJI_FLAG_GIF":2,"KEYCODE_BACKSPACE":8,"KEYCODE_ENTER":13,"KEYCODE_SHIFT":16,"KEYCODE_ESC":27,"KEYCODE_DELETE":34,"KEYCODE_ARROW_LEFT":37,"KEYCODE_ARROW_UP":38,"KEYCODE_ARROW_RIGHT":39,"KEYCODE_ARROW_DOWN":40,"KEYCODE_NUM2":50,"KEYCODE_AT":64,"KEYCODE_NUM_ADD":107,"KEYCODE_NUM_MINUS":109,"KEYCODE_ADD":187,"KEYCODE_MINUS":189,"MM_NOTIFY_CLOSE":0,"MM_NOTIFY_OPEN":1,"MM_SOUND_CLOSE":0,"MM_SOUND_OPEN":1,"MM_SEND_FILE_STATUS_QUEUED":0,"MM_SEND_FILE_STATUS_SENDING":1,"MM_SEND_FILE_STATUS_SUCCESS":2,"MM_SEND_FILE_STATUS_FAIL":3,"MM_SEND_FILE_STATUS_CANCEL":4,"MM_EMOTICON_WEB":"_web","SYNCCHECK_RET_SUCCESS":0,"SYNCCHECK_RET_LOGOUT":1101,"SYNCCHECK_SELECTOR_NORMAL":0,"SYNCCHECK_SELECTOR_MSG":2,"SYNCCHECK_SELECTOR_MOBILEOPEN":7,"STATE":{"init":"init","uuid":"uuid","login":"login","logout":"logout"},"SPECIALUSERS":["newsapp","fmessage","filehelper","weibo","qqmail","fmessage","tmessage","qmessage","qqsync","floatbottle","lbsapp","shakeapp","medianote","qqfriend","readerapp","blogapp","facebookapp","masssendapp","meishiapp","feedsapp","voip","blogappweixin","weixin","brandsessionholder","weixinreminder","wxid_novlwrv3lqwv11","gh_22b87fa7cb3c","officialaccounts","notification_messages","wxid_novlwrv3lqwv11","gh_22b87fa7cb3c","wxitil","userexperience_alarm","notification_messages"]},"COOKIE":{"pgv_pvi":"5676958310035675000","pgv_si":"s9776703656137878000","wxuin":"1324338008","wxsid":"ZiwfOtHxrcZ8gwKa","wxloadtime":"1707994158","mm_lang":"zh-CN","webwx_data_ticket":"gSf8AD/eLt+f1DAo2fn8oKQs","webwxuvid":"bfa5eb4aab807e628bc1e00db26e58b7319e2a5ace1692b867d7ea3b1a911f21d240f67a1f1853e37822a727bd04dc28","webwx_auth_ticket":"CIsBEIac6PELGoABI9Wk3J7tmF4HDoCKJCcQ1oTuF06230vH9K8K23fKlmy0GgdaqxtFwYkvuOG4g+58xfZM48ZzL80uLEhzXVJI1f2836lgqcqBpxe+KdV/u5dpGOxXMuVuA7BOhwdpbZF3/SqBup7NMeig/0r088pxywgdvYVbSo+P2gthY4drKdw="},"user":{"Uin":1324338008,"UserName":"@1164bb5a60a2d7485eaf750142d3ef61102a66c0f7897486db3ed819e7d4983a","NickName":"五花肉<span class=\"emoji emoji1f339\"></span>","HeadImgUrl":"/cgi-bin/mmwebwx-bin/webwxgeticon?seq=1733748595&username=@1164bb5a60a2d7485eaf750142d3ef61102a66c0f7897486db3ed819e7d4983a&skey=@crypt_6a1ca4c0_d9429fa08c8aa994959f0a8542286c8f","Sex":2,"HeadImgFlag":1,"SnsFlag":305}}}
\ No newline at end of file
...@@ -11,6 +11,8 @@ import { FileBox } from 'file-box' ...@@ -11,6 +11,8 @@ import { FileBox } from 'file-box'
import QrcodeTerminal from 'qrcode-terminal' import QrcodeTerminal from 'qrcode-terminal'
import axios from "axios" import axios from "axios"
import { WechatyBuilder } from 'wechaty' import { WechatyBuilder } from 'wechaty'
const ajax = async (url, param, type) => { const ajax = async (url, param, type) => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
var axiosOption = { var axiosOption = {
...@@ -58,7 +60,7 @@ const page = { ...@@ -58,7 +60,7 @@ const page = {
}); });
}, },
async wechatyInit() { async wechatyInit() {
page.data.wechaty = WechatyBuilder.build() page.data.wechaty = WechatyBuilder.build({ name: 'ding-dong-bot' })
page.data.wechaty.on('scan', (qrcode, status) => { page.data.wechaty.on('scan', (qrcode, status) => {
console.log("开发版本 V2.0") console.log("开发版本 V2.0")
console.log(`目前关键字有["抽签", "天气", "讲笑话", "讲情话", "梦到", "解第", "动漫图", "去水印-", "历史今天", "星座-", "答案", "转语音-", "黄历"]`) console.log(`目前关键字有["抽签", "天气", "讲笑话", "讲情话", "梦到", "解第", "动漫图", "去水印-", "历史今天", "星座-", "答案", "转语音-", "黄历"]`)
...@@ -72,10 +74,39 @@ const page = { ...@@ -72,10 +74,39 @@ const page = {
console.log('登录成功:' + user) console.log('登录成功:' + user)
}) })
.on('message', async msg => { .on('message', async msg => {
console.log('收到消息:' + msg) console.log('收到消息1=' + msg)
page.methods.message(msg, false, 1)
const talker = msg.talker();
console.log('收到消息2=' + talker)
let text = msg.text() //获取聊天内容
let room = msg.room() //获取房间信息
let msgType = msg.type() //7 是文本 6是图片 8是视频 https://wechaty.js.org/zh/docs/api/message
let uid = talker.payload.id;
console.log('收到 msgType=' + msgType)
console.log('收到 payload.id=' + talker.payload.id)
if (room) {
console.log('收到 payload.roomId=' + talker.payload.roomId)
console.log('收到 payload.talkerId=' + talker.payload.talkerId)
const topic = await room.topic()
console.log(`Room: ${topic} Contact: ${msgType} Text: ${text}`)
await room.say(uid + ',' + text)
userEvent.sayMP3(text, room, "雷电将军")
} else {
//await msg.say('ok,' + text)
await talker.say(uid + ',' + text)
//await talker.say(FileBox.fromUrl('http://coolaf.com/static/img/favicon3.ico'))
userEvent.sayMP3(text, talker, "雷电将军")
}
//page.methods.message(msg, false, 1)
}) })
.on('friendship', friendship => { .on('friendship', friendship => {
console.log('收到好友请求:' + friendship) console.log('收到好友请求:' + friendship)
}) })
.on('room-invite', invitation => { .on('room-invite', invitation => {
...@@ -91,6 +122,28 @@ const page = { ...@@ -91,6 +122,28 @@ const page = {
let room = msg.room() //获取房间信息 let room = msg.room() //获取房间信息
let userNice = msg.talker(); let userNice = msg.talker();
let msgType = msg.type() //7 是文本 6是图片 8是视频 https://wechaty.js.org/zh/docs/api/message let msgType = msg.type() //7 是文本 6是图片 8是视频 https://wechaty.js.org/zh/docs/api/message
//let from = msg.from()//发送者
//let fileBox = msg.toFileBox()//消息附件(图片、音频、视频等)
let msgto = msg.to();
console.log('收到 text:' + text)
// console.log('收到 room:' + room)
// console.log('收到 userNice:' + userNice)
// console.log('收到 msgType:' + msgType)
// console.log('收到 from:' + from)
// console.log('收到 fileBox' + fileBox)
//const contact = msg.from()
//const text = msg.text()
//const room = msg.room()
console.log('StarterBot', msg.toString())
if (room) {
const topic = await room.topic()
//console.log(`Room: ${topic} Contact: ${contact.name()} Text: ${text}`)
} else {
//console.log(`Contact: ${contact.name()} Text: ${text}`)
await msg.say('ok' + text)
}
if (text.length == 0 || !room) { if (text.length == 0 || !room) {
return; return;
} }
...@@ -290,7 +343,7 @@ const userEvent = { ...@@ -290,7 +343,7 @@ const userEvent = {
null, "get") null, "get")
fileBox = FileBox.fromUrl(res.data.music); fileBox = FileBox.fromUrl(res.data.music);
await room.say(fileBox) await room.say(fileBox)
await room.say(m.sayEnd) //await room.say(m.sayEnd)
}, },
sayEnd: "\n----------------\n来至公众号:'程序员野区'的作者雪狼之夜的开源项目,\n公众号地址\nhttps://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzI1NjAxODkzMg== \n开源项目地址:https://inscode.csdn.net/@xuelang532777032/NodeJS" sayEnd: "\n----------------\n来至公众号:'程序员野区'的作者雪狼之夜的开源项目,\n公众号地址\nhttps://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzI1NjAxODkzMg== \n开源项目地址:https://inscode.csdn.net/@xuelang532777032/NodeJS"
} }
\ No newline at end of file
...@@ -5,20 +5,19 @@ ...@@ -5,20 +5,19 @@
"type": "module", "type": "module",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "node index.js", "dev": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@types/node": "^18.0.6",
"axios": "^1.4.0", "axios": "^1.4.0",
"file-box": "^1.4.15", "file-box": "^1.4.15",
"node-fetch": "^3.2.6",
"qrcode-terminal": "^0.12.0", "qrcode-terminal": "^0.12.0",
"wechaty": "^1.20.2", "wechaty": "^1.20.2",
"wechaty-puppet-wechat": "^1.18.4", "wechaty-puppet-wechat": "^1.18.4"
"@types/node": "^18.0.6",
"node-fetch": "^3.2.6"
} }
} }
\ No newline at end of file
const { WechatyBuilder } = require('wechaty');
const qrcode = require('qrcode-terminal');
class weChaty {
bot = null
constructor() {
this.bot = WechatyBuilder.build({ name: 'ding-dong-bot' });
this.bot.on('scan', code => {
qrcode.generate(code, { small: true });
})
this.bot.on('message', this.onMessage.bind(this));
}
onMessage(message) {
const talker = message.talker();
if(!talker.payload.friend || message.payload.roomId || talker.payload.type != 1) {
return;
}
if(message.payload.type != 7) {
talker.say("我只能处理文字消息,请发送文字内容");
return;
}
const content = message.text();
talker.say(`你好, 我收到了您发的消息 [${content}]`);
}
run() {
this.bot.start();
}
}
new weChaty().run();
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册