From 0d51a425171cf5c7a39cf6f896f3c49f9d86f12e Mon Sep 17 00:00:00 2001 From: KimigaiiWuyi <444835641@qq.com> Date: Fri, 4 Oct 2024 05:31:45 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E4=B8=BA`=E5=B8=AE=E5=8A=A9`?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0`block=3DTrue`=20(#76)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gsuid_core/plugins/core_command/core_help/__init__.py | 6 ++++-- gsuid_core/webconsole/create_sv_panel.py | 10 ++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gsuid_core/plugins/core_command/core_help/__init__.py b/gsuid_core/plugins/core_command/core_help/__init__.py index 4464a24..2a6c2fe 100644 --- a/gsuid_core/plugins/core_command/core_help/__init__.py +++ b/gsuid_core/plugins/core_command/core_help/__init__.py @@ -12,7 +12,8 @@ sv_core_help_img = SV('Core帮助') 'core帮助', 'Core帮助', '帮助', - ) + ), + block=True, ) async def send_core_help_msg(bot: Bot, ev: Event): logger.info('[早柚核心] 开始执行[帮助图]') @@ -24,7 +25,8 @@ async def send_core_help_msg(bot: Bot, ev: Event): 'core管理帮助', 'Core管理帮助', '管理帮助', - ) + ), + block=True, ) async def send_core_master_help_msg(bot: Bot, ev: Event): logger.info('[早柚核心] 开始执行[管理帮助图]') diff --git a/gsuid_core/webconsole/create_sv_panel.py b/gsuid_core/webconsole/create_sv_panel.py index 89f57e0..ba40afb 100644 --- a/gsuid_core/webconsole/create_sv_panel.py +++ b/gsuid_core/webconsole/create_sv_panel.py @@ -22,10 +22,15 @@ def get_sv_panel( black_list: List = [], white_list: List = [], prefix: List = [], + force_prefix: List[str] = [], disable_force_prefix: bool = False, allow_empty_prefix: bool = False, ): api = f'{API}/{name}' + if force_prefix: + defalut_prefix = ','.join(force_prefix) + else: + defalut_prefix = '无自带前缀' area_options = [ {'label': '全局', 'value': 'ALL'}, @@ -43,7 +48,7 @@ def get_sv_panel( 'type': 'container', 'body': [ get_input_tag( - '自定义插件前缀(不影响插件默认前缀)', + '自定义插件前缀(不影响插件自带前缀)', 'prefix', prefix, [], @@ -67,7 +72,7 @@ def get_sv_panel( 'body': [ { 'type': 'switch', - 'label': '是否禁用插件自带前缀', + 'label': f'是否禁用插件自带前缀({defalut_prefix})', 'option': '开启/关闭功能', 'name': 'disable_force_prefix', 'falseValue': False, @@ -426,6 +431,7 @@ def get_sv_page(): plugins.black_list, plugins.white_list, plugins.prefix, + plugins.force_prefix, plugins.disable_force_prefix, plugins.allow_empty_prefix, )