llonebot-dist 7.12.5 → 7.12.7
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.
package/llbot.js
CHANGED
|
@@ -11385,7 +11385,7 @@ var OB11HeartbeatEvent = class extends OB11BaseMetaEvent {
|
|
|
11385
11385
|
};
|
|
11386
11386
|
//#endregion
|
|
11387
11387
|
//#region src/version.ts
|
|
11388
|
-
var version$2 = "7.12.
|
|
11388
|
+
var version$2 = "7.12.7";
|
|
11389
11389
|
//#endregion
|
|
11390
11390
|
//#region node_modules/sift/es5m/index.js
|
|
11391
11391
|
/******************************************************************************
|
|
@@ -21901,13 +21901,15 @@ var GetGroupMemberInfo$1 = class extends BaseAction {
|
|
|
21901
21901
|
let info;
|
|
21902
21902
|
try {
|
|
21903
21903
|
info = await this.ctx.ntUserApi.getUserDetailInfoWithBizInfo(member.uid);
|
|
21904
|
+
this.ctx.logger.info("getUserDetailInfoWithBizInfo");
|
|
21904
21905
|
} catch (e) {
|
|
21905
21906
|
try {
|
|
21906
|
-
|
|
21907
|
-
|
|
21907
|
+
info = (await this.ctx.ntUserApi.fetchUserDetailInfo(member.uid)).detail.get(member.uid);
|
|
21908
|
+
this.ctx.logger.info("fetchUserDetailInfo");
|
|
21908
21909
|
} catch (e) {}
|
|
21909
21910
|
}
|
|
21910
21911
|
if (info) {
|
|
21912
|
+
this.ctx.logger.info(info.simpleInfo.baseInfo);
|
|
21911
21913
|
ret.sex = OB11Entities.sex(info.simpleInfo.baseInfo.sex);
|
|
21912
21914
|
ret.qq_level = info.commonExt?.qqLevel && calcQQLevel(info.commonExt.qqLevel) || 0;
|
|
21913
21915
|
ret.age = info.simpleInfo.baseInfo.age ?? 0;
|
|
@@ -25408,14 +25410,11 @@ var SendGroupNotice = class extends BaseAction {
|
|
|
25408
25410
|
pinned: lib_default$1.union([Boolean, lib_default$1.transform(String, parseBool)]).default(false),
|
|
25409
25411
|
confirm_required: lib_default$1.union([Boolean, lib_default$1.transform(String, parseBool)]).default(true),
|
|
25410
25412
|
is_show_edit_card: lib_default$1.union([Boolean, lib_default$1.transform(String, parseBool)]).default(false),
|
|
25411
|
-
tip_window: lib_default$1.union([Boolean, lib_default$1.transform(String, parseBool)]).default(false)
|
|
25413
|
+
tip_window: lib_default$1.union([Boolean, lib_default$1.transform(String, parseBool)]).default(false),
|
|
25414
|
+
send_new_member: lib_default$1.union([Boolean, lib_default$1.transform(String, parseBool)]).default(false)
|
|
25412
25415
|
});
|
|
25413
25416
|
async _handle(payload) {
|
|
25414
25417
|
const groupCode = payload.group_id.toString();
|
|
25415
|
-
const pinned = +payload.pinned;
|
|
25416
|
-
const confirmRequired = +payload.confirm_required;
|
|
25417
|
-
const isShowEditCard = +payload.is_show_edit_card;
|
|
25418
|
-
const tipWindowType = +!payload.tip_window;
|
|
25419
25418
|
let picInfo;
|
|
25420
25419
|
if (payload.image) {
|
|
25421
25420
|
const { path, isLocal, success, errMsg } = await uri2local(this.ctx, payload.image, true);
|
|
@@ -25425,7 +25424,7 @@ var SendGroupNotice = class extends BaseAction {
|
|
|
25425
25424
|
if (!isLocal) unlink$1(path).catch(noop);
|
|
25426
25425
|
picInfo = result.picInfo;
|
|
25427
25426
|
}
|
|
25428
|
-
const res = await this.ctx.ntWebApi.publishGroupBulletin(groupCode, payload.content, pinned, 1,
|
|
25427
|
+
const res = await this.ctx.ntWebApi.publishGroupBulletin(groupCode, payload.content, +payload.pinned, payload.send_new_member ? 20 : 1, +payload.is_show_edit_card, +!payload.tip_window, +payload.confirm_required, picInfo?.id, picInfo?.width, picInfo?.height);
|
|
25429
25428
|
if (res.ec !== 0) throw new Error(`设置群公告失败, 错误信息: ${res.em}`);
|
|
25430
25429
|
return null;
|
|
25431
25430
|
}
|
|
@@ -25697,7 +25696,7 @@ var GetGroupNotice = class extends BaseAction {
|
|
|
25697
25696
|
async _handle(payload) {
|
|
25698
25697
|
const data = await this.ctx.ntGroupApi.getGroupBulletinList(payload.group_id.toString());
|
|
25699
25698
|
const result = [];
|
|
25700
|
-
for (const feed of data.feeds) result.push({
|
|
25699
|
+
for (const feed of [...data.feeds, ...data.inst]) result.push({
|
|
25701
25700
|
notice_id: feed.feedId,
|
|
25702
25701
|
sender_id: +feed.uin,
|
|
25703
25702
|
publish_time: +feed.publishTime,
|
|
@@ -25714,9 +25713,12 @@ var GetGroupNotice = class extends BaseAction {
|
|
|
25714
25713
|
settings: {
|
|
25715
25714
|
is_show_edit_card: !!feed.settings.isShowEditCard,
|
|
25716
25715
|
tip_window: !feed.settings.tipWindowType,
|
|
25717
|
-
confirm_required: !!feed.settings.confirmRequired
|
|
25716
|
+
confirm_required: !!feed.settings.confirmRequired,
|
|
25717
|
+
pinned: !!feed.pinned,
|
|
25718
|
+
send_new_member: feed.type === 20
|
|
25718
25719
|
}
|
|
25719
25720
|
});
|
|
25721
|
+
if (data.inst.length > 0) return result.sort((a, b) => b.publish_time - a.publish_time);
|
|
25720
25722
|
return result;
|
|
25721
25723
|
}
|
|
25722
25724
|
};
|
|
@@ -54601,7 +54603,7 @@ var NTQQWebApi = class extends Service {
|
|
|
54601
54603
|
imgWidth: imgWidth?.toString(),
|
|
54602
54604
|
imgHeight: imgHeight?.toString()
|
|
54603
54605
|
};
|
|
54604
|
-
const res = await fetch("https://web.qun.qq.com/cgi-bin/announce/add_qun_notice", {
|
|
54606
|
+
const res = await fetch(type === 20 ? "https://web.qun.qq.com/cgi-bin/announce/add_qun_instruction" : "https://web.qun.qq.com/cgi-bin/announce/add_qun_notice", {
|
|
54605
54607
|
method: "POST",
|
|
54606
54608
|
headers: {
|
|
54607
54609
|
"Content-Type": "application/x-www-form-urlencoded",
|