From beaec147b5eb8cc3ad1c923cd08f1ceecbf6d73e Mon Sep 17 00:00:00 2001 From: misaka20002 <40714502+misaka20002@users.noreply.github.com> Date: Sat, 3 Aug 2024 21:13:01 +0800 Subject: [PATCH] =?UTF-8?q?gemini=E6=99=BA=E8=83=BD=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E4=B8=BB=E4=BA=BA=E5=8F=AF=E4=BD=BF=E7=94=A8bot?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E7=A6=81=E8=A8=80=E6=9D=83=E9=99=90?= =?UTF-8?q?=20(#708)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/CustomGoogleGeminiClient.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/CustomGoogleGeminiClient.js b/client/CustomGoogleGeminiClient.js index b0e1ba3..22d5abe 100644 --- a/client/CustomGoogleGeminiClient.js +++ b/client/CustomGoogleGeminiClient.js @@ -232,8 +232,8 @@ export class CustomGoogleGeminiClient extends GoogleGeminiClient { } else { // execute function try { - let isAdmin = ['admin', 'owner'].includes(this.e.sender.role) - let isOwner = ['owner'].includes(this.e.sender.role) + let isAdmin = ['admin', 'owner'].includes(this.e.sender.role) || (this.e.group?.is_admin && this.e.isMaster) + let isOwner = ['owner'].includes(this.e.sender.role) || (this.e.group?.is_owner && this.e.isMaster) let args = Object.assign(functionCall.args, { isAdmin, isOwner,