onebots 0.4.53 → 0.4.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -498,6 +498,19 @@ class V11 extends service_1.Service {
498
498
  return;
499
499
  const action = event.message_type === "private" ? "sendPrivateMsg" : "sendGroupMsg";
500
500
  const id = event.message_type === "private" ? event.user_id : event.group_id;
501
+ if (typeof res.reply === "string") {
502
+ if (/[CQ:music,type=.+,id=.+]/.test(res.reply)) {
503
+ res.reply = res.reply.replace(",type=", ",platform=");
504
+ }
505
+ res.reply = this.adapter.fromCqcode("V11", res.reply);
506
+ }
507
+ else {
508
+ if (res.reply[0].type == "music" && res.reply[0]?.data?.type) {
509
+ res.reply[0].data.platform = res.reply[0].data.type;
510
+ delete res.reply[0].data.type;
511
+ }
512
+ res.reply = this.adapter.fromSegment("V11", res.reply);
513
+ }
501
514
  this.action[action].apply(this, [id, res.reply, res.auto_escape]);
502
515
  }
503
516
  if (event.message_type === "group") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "onebots",
3
- "version": "0.4.53",
3
+ "version": "0.4.54",
4
4
  "description": "基于icqq的多例oneBot实现",
5
5
  "engines": {
6
6
  "node": ">=16"