From bd920cedf54173a8314eca8ef817be07b808609e Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Thu, 5 Jan 2023 21:07:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BE=93=E5=87=BA=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=97=B6=E6=A3=80=E6=9F=A5=E6=98=AF=E5=90=A6=E6=9C=89=E6=96=B0?= =?UTF-8?q?=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/qqbot/process.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/qqbot/process.py b/pkg/qqbot/process.py index 40234449..40fbecf0 100644 --- a/pkg/qqbot/process.py +++ b/pkg/qqbot/process.py @@ -243,7 +243,14 @@ def process_message(launcher_type: str, launcher_id: int, text_message: str, mes and not config.include_image_description): reply.append(" ".join(params)) elif cmd == 'version': - reply = ["[bot]当前版本:\n{}".format(pkg.utils.updater.get_current_version_info())] + reply_str = "[bot]当前版本:{}\n".format(pkg.utils.updater.get_current_version_info()) + try: + if pkg.utils.updater.is_new_version_available(): + reply_str += "\n有新版本可用,请使用命令 !update 进行更新" + except: + pass + + reply = [reply_str] elif cmd == 'reload' and launcher_type == 'person' and launcher_id == config.admin_qq: def reload_task(): pkg.utils.reloader.reload_all()