兼容trss (#723)

Co-authored-by: Jin1c on imini <Jin0x31c@gmail.com>
This commit is contained in:
青青 2024-10-29 16:01:55 +08:00 committed by GitHub
parent aa2ac7b5d3
commit 2b9734c641
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

View file

@ -1058,7 +1058,7 @@ async function collectTools (e) {
}
let systemAddition = ''
if (e.isGroup) {
let botInfo = await e.bot.getGroupMemberInfo(e.group_id, getUin(e), true)
let botInfo = await e.bot?.pickMember?.(e.group_id, getUin(e), true) || await e.bot?.getGroupMemberInfo?.(e.group_id, getUin(e), true)
if (botInfo.role !== 'member') {
// 管理员才给这些工具
tools.push(...[new EditCardTool(), new JinyanTool(), new KickOutTool(), new HandleMessageMsgTool(), new SetTitleTool()])