diff --git a/src/core/services/NodeIKernelGroupService.ts b/src/core/services/NodeIKernelGroupService.ts index fd9b2c70..61f3179a 100644 --- a/src/core/services/NodeIKernelGroupService.ts +++ b/src/core/services/NodeIKernelGroupService.ts @@ -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; modifyGroupRemark(groupCode: string, remark: string): void; diff --git a/src/onebot/action/group/SetGroupName.ts b/src/onebot/action/group/SetGroupName.ts index 816317d9..719649c5 100644 --- a/src/onebot/action/group/SetGroupName.ts +++ b/src/onebot/action/group/SetGroupName.ts @@ -17,7 +17,10 @@ export default class SetGroupName extends OneBotAction { payloadSchema = SchemaData; async _handle(payload: Payload): Promise { - 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; } }