From 7463e0aab93b915f8c546ed8748ff0a12199eaf0 Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Sat, 18 May 2024 18:52:45 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E5=88=A0=E9=99=A4=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E5=9C=B0=E6=96=B9=E6=AE=8B=E7=95=99=E7=9A=84=20config.py=20?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=20(#781)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/pipeline/longtext/longtext.py | 6 +++--- pkg/platform/sources/nakuru.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/pipeline/longtext/longtext.py b/pkg/pipeline/longtext/longtext.py index 756df445..0ab34abc 100644 --- a/pkg/pipeline/longtext/longtext.py +++ b/pkg/pipeline/longtext/longtext.py @@ -34,18 +34,18 @@ class LongTextProcessStage(stage.PipelineStage): if os.name == "nt": use_font = "C:/Windows/Fonts/msyh.ttc" if not os.path.exists(use_font): - self.ap.logger.warn("未找到字体文件,且无法使用Windows自带字体,更换为转发消息组件以发送长消息,您可以在config.py中调整相关设置。") + self.ap.logger.warn("未找到字体文件,且无法使用Windows自带字体,更换为转发消息组件以发送长消息,您可以在配置文件中调整相关设置。") config['blob_message_strategy'] = "forward" else: self.ap.logger.info("使用Windows自带字体:" + use_font) config['font-path'] = use_font else: - self.ap.logger.warn("未找到字体文件,且无法使用系统自带字体,更换为转发消息组件以发送长消息,您可以在config.py中调整相关设置。") + self.ap.logger.warn("未找到字体文件,且无法使用系统自带字体,更换为转发消息组件以发送长消息,您可以在配置文件中调整相关设置。") self.ap.platform_cfg.data['long-text-process']['strategy'] = "forward" except: traceback.print_exc() - self.ap.logger.error("加载字体文件失败({}),更换为转发消息组件以发送长消息,您可以在config.py中调整相关设置。".format(use_font)) + self.ap.logger.error("加载字体文件失败({}),更换为转发消息组件以发送长消息,您可以在配置文件中调整相关设置。".format(use_font)) self.ap.platform_cfg.data['long-text-process']['strategy'] = "forward" diff --git a/pkg/platform/sources/nakuru.py b/pkg/platform/sources/nakuru.py index 0b3b8c09..94c29812 100644 --- a/pkg/platform/sources/nakuru.py +++ b/pkg/platform/sources/nakuru.py @@ -322,7 +322,7 @@ class NakuruProjectAdapter(adapter_model.MessageSourceAdapter): proxies=None ) if resp.status_code == 403: - raise Exception("go-cqhttp拒绝访问,请检查config.py中nakuru_config的token是否与go-cqhttp设置的access-token匹配") + raise Exception("go-cqhttp拒绝访问,请检查配置文件中nakuru适配器的配置") self.bot_account_id = int(resp.json()['data']['user_id']) except Exception as e: raise Exception("获取go-cqhttp账号信息失败, 请检查是否已启动go-cqhttp并配置正确")