mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-10-14 05:39:18 +00:00
fix:修复管理员判断错误
This commit is contained in:
parent
a175b88faf
commit
bab7795f32
@ -37,7 +37,7 @@ export class carbonAuthSetting extends plugin {
|
||||
if (!(e.sender.role === 'owner' || e.sender.role === 'admin' || e.isMaster))
|
||||
return e.reply('只有群主或管理员可以设置验证..', true);
|
||||
const botMember = await e.group?.pickMember?.(e.bot.uin);
|
||||
const info = botMember?.info || (await botMember?.getInfo?.());
|
||||
const info = await botMember?.getInfo();
|
||||
if (info.role !== 'admin' || info.role !== 'owner') {
|
||||
return e.reply(`${ConfigControl.get('profile')?.nickName}不是管理,没法帮你验证啦..`, true);
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ export class CarbonAuth extends plugin {
|
||||
let atElem = (e.message || []).find((m) => m.type === 'at');
|
||||
if (!atElem || !atElem.qq) return e.reply('你要验证谁?', true);
|
||||
const targetId = Number(atElem.qq);
|
||||
const member = await e.group.pickMember(targetId);
|
||||
const member = await e.group.pickMember(targetId).getInfo();
|
||||
if (member.role === 'owner' || member.role === 'admin') {
|
||||
return e.reply('这对吗', true);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user