From b831b7d44082d2de4e6de2d9d455ad2bd199f342 Mon Sep 17 00:00:00 2001 From: taylor <=> Date: Fri, 13 Dec 2024 11:08:08 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base-config.yaml | 3 ++- maubot_llmplus/aibot.py | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/base-config.yaml b/base-config.yaml index 91c7ce8..7d58668 100644 --- a/base-config.yaml +++ b/base-config.yaml @@ -1,9 +1,10 @@ # allow users allowed_users: [] -# allow invoke update read command users +# allow update and read permission users allow_update_read_command_users: [] +# allow readonly permission users allow_readonly_command_users: [] # current use platform diff --git a/maubot_llmplus/aibot.py b/maubot_llmplus/aibot.py index 554046b..6d7237c 100644 --- a/maubot_llmplus/aibot.py +++ b/maubot_llmplus/aibot.py @@ -170,7 +170,7 @@ class AiBotPlugin(AbsExtraConfigPlugin): # 判断是否有更新命令权限,如果没有就返回没有权限的提示 is_allow = self.is_allow_readonly_command(event.sender) if not is_allow: - event.reply(f"{event.sender} have not read permission") + await event.reply(f"{event.sender} have not read permission") return show_infos = [] @@ -212,7 +212,7 @@ class AiBotPlugin(AbsExtraConfigPlugin): # 判断是否有更新命令权限,如果没有就返回没有权限的提示 is_allow = self.is_allow_readonly_command(event.sender) if not is_allow: - event.reply(f"{event.sender} have not read permission") + await event.reply(f"{event.sender} have not read permission") return if argus == 'list': @@ -230,7 +230,7 @@ class AiBotPlugin(AbsExtraConfigPlugin): # 判断是否有更新命令权限,如果没有就返回没有权限的提示 is_allow = self.is_allow_readonly_command(event.sender) if not is_allow: - event.reply(f"{event.sender} have not read permission") + await event.reply(f"{event.sender} have not read permission") return # 如果是list表示查看当前可以使用的模型列表 @@ -250,7 +250,7 @@ class AiBotPlugin(AbsExtraConfigPlugin): # 判断是否有更新命令权限,如果没有就返回没有权限的提示 is_allow = self.is_allow_update_read_command(event.sender) if not is_allow: - event.reply(f"{event.sender} have not update permission") + await event.reply(f"{event.sender} have not update permission") return platform = self.get_ai_platform() @@ -269,7 +269,7 @@ class AiBotPlugin(AbsExtraConfigPlugin): # 判断是否有更新命令权限,如果没有就返回没有权限的提示 is_allow = self.is_allow_update_read_command(event.sender) if not is_allow: - event.reply(f"{event.sender} have not update permission") + await event.reply(f"{event.sender} have not update permission") return # 判断是否是本地ai模型,如果是还需要解析#后的type