onebots 0.4.87 → 0.4.89
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.
|
@@ -137,7 +137,7 @@ class IcqqAdapter extends adapter_1.Adapter {
|
|
|
137
137
|
result.message_id = oneBot.V11.transformToInt("message_id", result.message_id);
|
|
138
138
|
}
|
|
139
139
|
return Object.fromEntries(Object.entries(result).filter(([_, value]) => {
|
|
140
|
-
return typeof value
|
|
140
|
+
return typeof value !== "function";
|
|
141
141
|
}));
|
|
142
142
|
}
|
|
143
143
|
async sendPrivateMessage(uin, version, args) {
|
|
@@ -249,6 +249,15 @@ class IcqqAdapter extends adapter_1.Adapter {
|
|
|
249
249
|
if (typeof item === "string")
|
|
250
250
|
return item;
|
|
251
251
|
const { type, data } = item;
|
|
252
|
+
if (type === "node")
|
|
253
|
+
return {
|
|
254
|
+
type,
|
|
255
|
+
data: {
|
|
256
|
+
user_id: data.user_id,
|
|
257
|
+
nickname: data.nickname,
|
|
258
|
+
message: this.fromSegment(onebot, version, data.message),
|
|
259
|
+
},
|
|
260
|
+
};
|
|
252
261
|
return { type, ...data };
|
|
253
262
|
});
|
|
254
263
|
}
|
|
@@ -262,6 +271,14 @@ class IcqqAdapter extends adapter_1.Adapter {
|
|
|
262
271
|
},
|
|
263
272
|
};
|
|
264
273
|
const { type, ...data } = item;
|
|
274
|
+
if (type === "node")
|
|
275
|
+
return {
|
|
276
|
+
type,
|
|
277
|
+
data: {
|
|
278
|
+
...data,
|
|
279
|
+
message: this.toSegment(version, data.message),
|
|
280
|
+
},
|
|
281
|
+
};
|
|
265
282
|
return {
|
|
266
283
|
type,
|
|
267
284
|
data,
|
|
@@ -3,9 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.processMessages = processMessages;
|
|
4
4
|
const shareMusicCustom_1 = require("./shareMusicCustom");
|
|
5
5
|
async function processMessages(uin, target_id, target_type, list) {
|
|
6
|
+
if (!Array.isArray(list))
|
|
7
|
+
list = [list];
|
|
6
8
|
let result = [];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
for (let item of [].concat(list).filter(Boolean)) {
|
|
10
|
+
if (typeof item === "string")
|
|
11
|
+
item = { type: "text", text: item };
|
|
9
12
|
const { type, ...data } = item;
|
|
10
13
|
switch (type) {
|
|
11
14
|
case "node": {
|