feat(group): add group management APIs (#1996)

This commit is contained in:
Zizheng Guo authored and 手瓜一十雪 committed 2026-08-07 17:46:59 +08:00
1 parent f0e045df35
commit ead24423b5
11 files changed
+490 -2

No files matched your search

@@ -0,0 +1,13 @@
import type { GeneralCallResult } from 'napcat-core';
export function assertGroupManagementResults (
operation: string,
results: Array<{ setting: string, result: GeneralCallResult; }>
): void {
const failure = results.find(item => item.result.result !== 0);
if (!failure) return;
throw new Error(
`${operation}失败 Setting: ${failure.setting} ErrCode: ${failure.result.result} ` +
`ErrMsg: ${failure.result.errMsg || '未知错误'}`
);
}