mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-29 04:41:22 +08:00
feat: 处理失败的情况
This commit is contained in:
parent
040d0a8635
commit
a70585e854
@ -163,7 +163,7 @@ export interface NodeIKernelGroupService {
|
||||
|
||||
getGroupPortrait(): void;
|
||||
|
||||
modifyGroupName(groupCode: string, groupName: string, arg: false): void;
|
||||
modifyGroupName(groupCode: string, groupName: string, isNormalMember: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
modifyGroupRemark(groupCode: string, remark: string): void;
|
||||
|
||||
|
||||
@ -17,7 +17,10 @@ export default class SetGroupName extends OneBotAction<Payload, null> {
|
||||
payloadSchema = SchemaData;
|
||||
|
||||
async _handle(payload: Payload): Promise<null> {
|
||||
await this.core.apis.GroupApi.setGroupName(payload.group_id.toString(), payload.group_name);
|
||||
let ret = await this.core.apis.GroupApi.setGroupName(payload.group_id.toString(), payload.group_name);
|
||||
if (ret.result !== 0) {
|
||||
throw new Error(`设置群名称失败 ErrCode: ${ret.result} ErrMsg: ${ret.errMsg}`);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user