From 3237e554226dc122f9b4dac38d20493c15f33a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B2=A9=E6=B5=86?= Date: Mon, 18 Nov 2024 04:07:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BD=BF=E6=9C=BA=E5=99=A8=E4=BA=BA?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E7=BB=84=E7=9A=84=E6=9D=83=E9=99=90?= =?UTF-8?q?=E5=87=8C=E9=A9=BE=E4=BA=8E=E7=BE=A4=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=20(#192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/event/handler/base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/event/handler/base.ts b/src/event/handler/base.ts index 88d447e7..39de0805 100644 --- a/src/event/handler/base.ts +++ b/src/event/handler/base.ts @@ -102,8 +102,8 @@ export class EventBaseHandler { const role = list[permission] if (!role) return true - if (role.role === 'owner' && this.e.sender?.role === 'owner') return true - if (role.role === 'admin' && (this.e.sender?.role === 'owner' || this.e.sender?.role === 'admin')) return true + if (role.role === 'owner' && (this.e.sender?.role === 'owner' || this.e.isMaster || this.e.isAdmin)) return true + if (role.role === 'admin' && (this.e.sender?.role === 'owner' || this.e.sender?.role === 'admin' || this.e.isMaster || this.e.isAdmin)) return true this.e.reply(`暂无权限,只有${role.name}才能操作`) return false