feat(onebot): enrich group/member info fields (#197)
Round out the OneBot v11 group-profile fields the issue asked for.
Group (get_group_info / get_group_list, inherited by get_group_info_ex /
get_group_detail_info):
- group_create_time + group_memo come free from the 0xFE5_2 list
(createdTime / announcement), verified live (createdTime=1729505343,
announcement populated).
- group_level lives only in the 0x88D_0 detail; get_group_info fetches it
(memoized 5min) so a joined group doesn't hit the detail every call.
get_group_list leaves it 0 — a per-group detail fetch across the whole
list would be far too costly.
Member (get_group_member_info / get_group_member_list):
- Add area / unfriendly / title_expire_time / card_changeable. QQ NT does
not expose these, so they're fixed placeholders ('' / false / 0 / true),
matching go-cqhttp / NapCat. sex/age stay unknown/0 (real values need a
per-member profile fetch — out of scope here).
typecheck 12 packages; onebot 523 / core 472 green.
This commit is contained in:
7 files changed
+183
-2
No files matched your search
@@ -151,6 +151,7 @@ describe('onebot/contact-actions / getGroupList', () => {
|
||||
expect(out).toEqual([{
|
||||
group_id: 100, group_name: 'Group A',
|
||||
member_count: 0, max_member_count: 500,
|
||||
group_create_time: 0, group_level: 0, group_memo: '',
|
||||
}]);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user