feat(onebot): add group share links

Retrieve group invitation links with compatible request defaults and explicit error reporting. Add a typed SDK helper and discoverable action documentation.

Fixes #521
This commit is contained in:
DrSmoothl committed 2026-10-13 10:34:41 +08:00
1 parent c7428363cb
commit f85b28d23c
14 files changed
+587 -2

No files matched your search

+20
View File
@@ -153,6 +153,26 @@ export abstract class SnowLumaApiClient {
);
}
getGroupShareLink(
groupId: number,
options?: RequestOptions & {
needShortUrl?: boolean;
srcId?: number;
additionalParam?: string;
},
) {
return this.call(
'get_group_share_link',
{
group_id: groupId,
need_short_url: options?.needShortUrl,
src_id: options?.srcId,
additional_param: options?.additionalParam,
},
options,
);
}
getGroupMemberInfo(
groupId: number,
userId: number,
+2
View File
@@ -21,6 +21,7 @@ import type {
GetGroupHonorInfoParams,
GetGroupSystemMsgParams,
GetGroupInfoParams,
GetGroupShareLinkParams,
GetGroupListParams,
GetGroupMemberInfoParams,
GetGroupMemberListParams,
@@ -134,6 +135,7 @@ export interface SnowLumaActionMap {
delete_friend: { params: DeleteFriendParams; data: EmptyData };
get_group_list: { params: GetGroupListParams; data: JsonObject[] };
get_group_info: { params: GetGroupInfoParams; data: JsonObject };
get_group_share_link: { params: GetGroupShareLinkParams; data: { url: string } };
get_group_member_list: { params: GetGroupMemberListParams; data: JsonObject[] };
get_group_member_info: { params: GetGroupMemberInfoParams; data: JsonObject };
get_group_honor_info: { params: GetGroupHonorInfoParams; data: JsonValue };
+6
View File
@@ -52,6 +52,12 @@ export interface GetGroupInfoParams extends GroupIdParams {
no_cache?: boolean;
}
export interface GetGroupShareLinkParams extends GroupIdParams {
need_short_url?: boolean;
src_id?: number;
additional_param?: string;
}
export interface GetGroupMemberListParams extends GroupIdParams {
no_cache?: boolean;
}