mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-20 21:50:10 +08:00
fix
This commit is contained in:
parent
7a25dc1ef1
commit
607e367bb1
@ -249,7 +249,7 @@ export interface NodeIKernelGroupService {
|
|||||||
|
|
||||||
reqToJoinGroup(groupCode: string, arg: unknown): void;
|
reqToJoinGroup(groupCode: string, arg: unknown): void;
|
||||||
|
|
||||||
setGroupShutUp(groupCode: string, shutUp: boolean): void;
|
setGroupShutUp(groupCode: string, shutUp: boolean): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
getGroupShutUpMemberList(groupCode: string): Promise<GeneralCallResult>;
|
getGroupShutUpMemberList(groupCode: string): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,10 @@ export default class SetGroupWholeBan extends OneBotAction<Payload, null> {
|
|||||||
|
|
||||||
async _handle(payload: Payload): Promise<null> {
|
async _handle(payload: Payload): Promise<null> {
|
||||||
const enable = payload.enable?.toString() !== 'false';
|
const enable = payload.enable?.toString() !== 'false';
|
||||||
await this.core.apis.GroupApi.banGroup(payload.group_id.toString(), enable);
|
let res = await this.core.apis.GroupApi.banGroup(payload.group_id.toString(), enable);
|
||||||
|
if (res.result !== 0) {
|
||||||
|
throw new Error(`SetGroupWholeBan failed: ${res.errMsg} ${res.result}`);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user