fix: 权限和角色问题导致的工具调用失败

This commit is contained in:
ikechan8370 2023-12-15 18:08:03 +08:00
parent 0ac70a325f
commit 4dc5d6fe77
3 changed files with 13 additions and 4 deletions

View file

@ -34,7 +34,7 @@ export class SetTitleTool extends AbstractTool {
return `failed, the user ${qq} is not in group ${groupId}`
}
if (mm.get(e.bot.uin).role !== 'owner') {
return 'on group owner can give title'
return 'failed, only group owner can give title'
}
logger.info('edit card: ', groupId, qq)
let result = await group.setTitle(qq, title)