llonebot-dist 7.12.7 → 7.12.9
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.9";
|
|
11389
11389
|
//#endregion
|
|
11390
11390
|
//#region node_modules/sift/es5m/index.js
|
|
11391
11391
|
/******************************************************************************
|
|
@@ -21901,20 +21901,22 @@ 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");
|
|
21905
21904
|
} catch (e) {
|
|
21906
21905
|
try {
|
|
21907
21906
|
info = (await this.ctx.ntUserApi.fetchUserDetailInfo(member.uid)).detail.get(member.uid);
|
|
21908
|
-
this.ctx.logger.info("fetchUserDetailInfo");
|
|
21909
21907
|
} catch (e) {}
|
|
21910
21908
|
}
|
|
21911
|
-
if (info) {
|
|
21912
|
-
this.ctx.logger.info(info.simpleInfo.baseInfo);
|
|
21909
|
+
if (info?.commonExt) {
|
|
21913
21910
|
ret.sex = OB11Entities.sex(info.simpleInfo.baseInfo.sex);
|
|
21914
|
-
ret.qq_level =
|
|
21915
|
-
ret.age = info.simpleInfo.baseInfo.age
|
|
21911
|
+
ret.qq_level = calcQQLevel(info.commonExt.qqLevel);
|
|
21912
|
+
ret.age = info.simpleInfo.baseInfo.age;
|
|
21913
|
+
if (ret.qq_level === 0) ret.qq_level = (await this.ctx.pmhq.fetchUserInfo(+payload.user_id)).level;
|
|
21914
|
+
} else {
|
|
21915
|
+
const info = await this.ctx.pmhq.fetchUserInfo(+payload.user_id);
|
|
21916
|
+
ret.sex = OB11Entities.sex(info.sex);
|
|
21917
|
+
ret.qq_level = info.level;
|
|
21918
|
+
ret.age = info.age;
|
|
21916
21919
|
}
|
|
21917
|
-
if (ret.qq_level === 0) ret.qq_level = (await this.ctx.pmhq.fetchUserInfo(+payload.user_id)).level;
|
|
21918
21920
|
return ret;
|
|
21919
21921
|
}
|
|
21920
21922
|
};
|
|
@@ -23853,6 +23855,18 @@ var Msg;
|
|
|
23853
23855
|
var Misc;
|
|
23854
23856
|
(function(_Misc) {
|
|
23855
23857
|
_Misc.UserInfoLabel = ProtoMessage.of({ labels: ProtoField(1, { content: ProtoField(4, "string") }, "repeated") });
|
|
23858
|
+
_Misc.UserInfoBusiness = ProtoMessage.of({ body: ProtoField(3, {
|
|
23859
|
+
msg: ProtoField(1, "string"),
|
|
23860
|
+
lists: ProtoField(3, {
|
|
23861
|
+
type: ProtoField(1, "uint32"),
|
|
23862
|
+
field2: ProtoField(2, "uint32"),
|
|
23863
|
+
isYear: ProtoField(3, "uint32"),
|
|
23864
|
+
level: ProtoField(4, "uint32"),
|
|
23865
|
+
isPro: ProtoField(5, "uint32"),
|
|
23866
|
+
icon1: ProtoField(6, "string"),
|
|
23867
|
+
icon2: ProtoField(7, "string")
|
|
23868
|
+
}, "repeated")
|
|
23869
|
+
}) });
|
|
23856
23870
|
})(Misc || (Misc = {}));
|
|
23857
23871
|
//#endregion
|
|
23858
23872
|
//#region src/onebot11/helper/createMultiMessage.ts
|
|
@@ -24494,7 +24508,11 @@ var GetStrangerInfo = class extends BaseAction {
|
|
|
24494
24508
|
birthday_year: info.birthdayYear,
|
|
24495
24509
|
birthday_month: info.birthdayMonth,
|
|
24496
24510
|
birthday_day: info.birthdayDay,
|
|
24497
|
-
labels: info.labels
|
|
24511
|
+
labels: info.labels,
|
|
24512
|
+
is_vip: info.isVip,
|
|
24513
|
+
is_years_vip: info.isYearsVip,
|
|
24514
|
+
vip_level: info.vipLevel,
|
|
24515
|
+
remark: info.remark
|
|
24498
24516
|
};
|
|
24499
24517
|
}
|
|
24500
24518
|
};
|
|
@@ -43461,22 +43479,19 @@ var SystemApi = [
|
|
|
43461
43479
|
});
|
|
43462
43480
|
}),
|
|
43463
43481
|
defineApi("get_user_profile", GetUserProfileInput, GetUserProfileOutput, async (ctx, payload) => {
|
|
43464
|
-
const
|
|
43465
|
-
|
|
43466
|
-
|
|
43467
|
-
|
|
43468
|
-
|
|
43469
|
-
|
|
43470
|
-
|
|
43471
|
-
|
|
43472
|
-
|
|
43473
|
-
|
|
43474
|
-
|
|
43475
|
-
|
|
43476
|
-
|
|
43477
|
-
};
|
|
43478
|
-
if (profile.level === 0) profile.level = (await ctx.pmhq.fetchUserInfo(payload.user_id)).level;
|
|
43479
|
-
return Ok(profile);
|
|
43482
|
+
const info = await ctx.pmhq.fetchUserInfo(payload.user_id);
|
|
43483
|
+
return Ok({
|
|
43484
|
+
nickname: info.nick,
|
|
43485
|
+
qid: info.qid,
|
|
43486
|
+
age: info.age,
|
|
43487
|
+
sex: transformGender(info.sex),
|
|
43488
|
+
remark: info.remark,
|
|
43489
|
+
bio: info.longNick,
|
|
43490
|
+
level: info.level,
|
|
43491
|
+
country: info.country,
|
|
43492
|
+
city: info.city,
|
|
43493
|
+
school: info.school
|
|
43494
|
+
});
|
|
43480
43495
|
}),
|
|
43481
43496
|
defineApi("get_friend_list", GetFriendListInput, GetFriendListOutput, async (ctx) => {
|
|
43482
43497
|
const friends = await ctx.ntFriendApi.getBuddyList();
|
|
@@ -70336,12 +70351,15 @@ function UserMixin(Base) {
|
|
|
70336
70351
|
uin,
|
|
70337
70352
|
keys: [
|
|
70338
70353
|
{ key: 102 },
|
|
70354
|
+
{ key: 103 },
|
|
70339
70355
|
{ key: 104 },
|
|
70340
70356
|
{ key: 105 },
|
|
70357
|
+
{ key: 107 },
|
|
70341
70358
|
{ key: 20002 },
|
|
70342
70359
|
{ key: 20003 },
|
|
70343
70360
|
{ key: 20009 },
|
|
70344
70361
|
{ key: 20020 },
|
|
70362
|
+
{ key: 20021 },
|
|
70345
70363
|
{ key: 20026 },
|
|
70346
70364
|
{ key: 20031 },
|
|
70347
70365
|
{ key: 20037 },
|
|
@@ -70359,6 +70377,7 @@ function UserMixin(Base) {
|
|
|
70359
70377
|
const info = Oidb.FetchUserInfoResp.decode(oidbRespBody);
|
|
70360
70378
|
const numbers = Object.fromEntries(info.body.properties.numberProperties.map((p) => [p.key, p.value]));
|
|
70361
70379
|
const bytes = Object.fromEntries(info.body.properties.bytesProperties.map((p) => [p.key, p.value]));
|
|
70380
|
+
const business = bytes[107] ? Misc.UserInfoBusiness.decode(bytes[107]) : void 0;
|
|
70362
70381
|
return {
|
|
70363
70382
|
uin: info.body.uin,
|
|
70364
70383
|
nick: bytes[20002]?.toString() ?? "",
|
|
@@ -70373,7 +70392,12 @@ function UserMixin(Base) {
|
|
|
70373
70392
|
birthdayYear: bytes[20031]?.[0] << 8 | bytes[20031]?.[1],
|
|
70374
70393
|
birthdayMonth: bytes[20031]?.[2] ?? 0,
|
|
70375
70394
|
birthdayDay: bytes[20031]?.[3] ?? 0,
|
|
70376
|
-
labels: bytes[104] ? Misc.UserInfoLabel.decode(bytes[104]).labels.map((e) => e.content) : []
|
|
70395
|
+
labels: bytes[104] ? Misc.UserInfoLabel.decode(bytes[104]).labels.map((e) => e.content) : [],
|
|
70396
|
+
school: bytes[20021]?.toString() ?? "",
|
|
70397
|
+
remark: bytes[103]?.toString() ?? "",
|
|
70398
|
+
isVip: !!business?.body.lists[0],
|
|
70399
|
+
isYearsVip: !!business?.body.lists[0]?.isYear,
|
|
70400
|
+
vipLevel: business?.body.lists[0]?.level ?? 0
|
|
70377
70401
|
};
|
|
70378
70402
|
}
|
|
70379
70403
|
async fetchUserLoginDays(uin) {
|