Closed Yang474985795 closed 11 months ago
xmlMsg.content = `<?xml version="1.0"?>
<msg>
<appmsg appid="wx5aa333606550dfd5" sdkver="0">
<title>嘉宾</title>
<des>张远</des>
<action>view</action>
<type>3</type>
<showtype>0</showtype>
<content />
<url>https://i.y.qq.com/v8/playsong.html?hosteuin=oK6kowEAoK4z7eSqoi6F7iCPon**&sharefrom=&from_id=0&from_idtype=0&from_name=&songid=281506863&songmid=&type=0&platform=(10rpl)&appsongtype=(11rpl)&_wv=1&source=qq&appshare=iphone&media_mid=000CsplS4eA2jd&ADTAG=wxfshare</url>
<dataurl>http://c6.y.qq.com/rsc/fcgi-bin/fcg_pyq_play.fcg?songid=0&songmid=001i36ji0C8Cov&songtype=1&fromtag=46&uin=1152921504793187640&code=c135e</dataurl>
<lowurl />
<lowdataurl />
<recorditem>(null)</recorditem>
<thumburl />
<messageaction />
<laninfo />
<md5>aa6e1c793929a0edfdda69aed5906c58</md5>
<extinfo />
<sourceusername />
<sourcedisplayname />
<commenturl />
<appattach>
<totallen>0</totallen>
<attachid />
<emoticonmd5 />
<fileext>jpg</fileext>
<filekey>9bb604b62db7008a6c269937ef1a2623</filekey>
<cdnthumburl>3057020100044b30490201000204fbbf095802032f5aa90204d1996971020464d335da042437623063666463352d393037392d343163392d383831372d3064343633353238626230390204011808030201000405004c537500</cdnthumburl>
<aeskey>58ed62307de144f5bd0e9c6378fa94bb</aeskey>
<cdnthumbaeskey>58ed62307de144f5bd0e9c6378fa94bb</cdnthumbaeskey>
<encryver>1</encryver>
<cdnthumblength>6571</cdnthumblength>
<cdnthumbheight>100</cdnthumbheight>
<cdnthumbwidth>100</cdnthumbwidth>
</appattach>
<weappinfo>
<pagepath />
<username />
<appid />
<appservicetype>0</appservicetype>
</weappinfo>
<websearch />
</appmsg>
<fromusername>xxxx</fromusername>
<scene>0</scene>
<appinfo>
<version>53</version>
<appname>QQ音乐</appname>
</appinfo>
<commenturl></commenturl>
</msg>`
// 利用消息转发 debug 可知此消息类型为 49,直接构造 xml 调用 forwardMessage 接口即可
await bot.puppet.messageForward(talker.id, message.id)
const response = await bot.puppet._client.api.forwardMessage(new Date().getTime(), talker.id, xmlMsg.content, 49, talker.id);
想不明白这种操作,是怕别人知道了?
🖕 直接鄙视楼上两个
xmlMsg.content = `<?xml version="1.0"?> <msg> <appmsg appid="wx5aa333606550dfd5" sdkver="0"> <title>嘉宾</title> <des>张远</des> <action>view</action> <type>3</type> <showtype>0</showtype> <content /> <url>https://i.y.qq.com/v8/playsong.html?hosteuin=oK6kowEAoK4z7eSqoi6F7iCPon**&sharefrom=&from_id=0&from_idtype=0&from_name=&songid=281506863&songmid=&type=0&platform=(10rpl)&appsongtype=(11rpl)&_wv=1&source=qq&appshare=iphone&media_mid=000CsplS4eA2jd&ADTAG=wxfshare</url> <dataurl>http://c6.y.qq.com/rsc/fcgi-bin/fcg_pyq_play.fcg?songid=0&songmid=001i36ji0C8Cov&songtype=1&fromtag=46&uin=1152921504793187640&code=c135e</dataurl> <lowurl /> <lowdataurl /> <recorditem>(null)</recorditem> <thumburl /> <messageaction /> <laninfo /> <md5>aa6e1c793929a0edfdda69aed5906c58</md5> <extinfo /> <sourceusername /> <sourcedisplayname /> <commenturl /> <appattach> <totallen>0</totallen> <attachid /> <emoticonmd5 /> <fileext>jpg</fileext> <filekey>9bb604b62db7008a6c269937ef1a2623</filekey> <cdnthumburl>3057020100044b30490201000204fbbf095802032f5aa90204d1996971020464d335da042437623063666463352d393037392d343163392d383831372d3064343633353238626230390204011808030201000405004c537500</cdnthumburl> <aeskey>58ed62307de144f5bd0e9c6378fa94bb</aeskey> <cdnthumbaeskey>58ed62307de144f5bd0e9c6378fa94bb</cdnthumbaeskey> <encryver>1</encryver> <cdnthumblength>6571</cdnthumblength> <cdnthumbheight>100</cdnthumbheight> <cdnthumbwidth>100</cdnthumbwidth> </appattach> <weappinfo> <pagepath /> <username /> <appid /> <appservicetype>0</appservicetype> </weappinfo> <websearch /> </appmsg> <fromusername>xxxx</fromusername> <scene>0</scene> <appinfo> <version>53</version> <appname>QQ音乐</appname> </appinfo> <commenturl></commenturl> </msg>` // 利用消息转发 debug 可知此消息类型为 49,直接构造 xml 调用 forwardMessage 接口即可 await bot.puppet.messageForward(talker.id, message.id) const response = await bot.puppet._client.api.forwardMessage(new Date().getTime(), talker.id, xmlMsg.content, 49, talker.id);
你好 请问你现在还能发送音乐类型的消息嘛?我参考层主你的方法 但是报错: padlocal grpc request failed: 1, error: Error: 2 UNKNOWN: internal error
.