From 8a0b2de54092d4ca114ab43baeb3c9f86d31e3e6 Mon Sep 17 00:00:00 2001 From: Sakamoto Shiina <68018796+ShiinaSakamoto@users.noreply.github.com> Date: Tue, 19 Dec 2023 22:28:18 +0900 Subject: [PATCH] =?UTF-8?q?[Update]=20Message=20Format:=20config.json?= =?UTF-8?q?=E3=81=A7=E5=85=83=E3=80=85=E3=81=AEkey=20"MESSAGE=5FFORMAT"?= =?UTF-8?q?=E3=81=8C=E5=AD=98=E5=9C=A8=E3=81=97=E3=81=A6=E3=81=84=E3=81=9F?= =?UTF-8?q?=E5=A0=B4=E5=90=88=E3=80=81"SEND=5FMESSAGE=5FFORMAT=5FWITH=5FT"?= =?UTF-8?q?=E3=81=B8=E3=81=A8=E5=BC=95=E3=81=8D=E7=B6=99=E3=81=90=E5=87=A6?= =?UTF-8?q?=E7=90=86=E8=BF=BD=E5=8A=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config.py b/config.py index 4477be25..7160e48c 100644 --- a/config.py +++ b/config.py @@ -667,8 +667,13 @@ class Config: with open(self.PATH_CONFIG, 'r', encoding="utf-8") as fp: config = json_load(fp) + old_message_format = None for key in config.keys(): + if key == "MESSAGE_FORMAT": + old_message_format = config[key] setattr(self, key, config[key]) + if old_message_format is not None: + setattr(self, "SEND_MESSAGE_FORMAT_WITH_T", old_message_format) with open(self.PATH_CONFIG, 'w', encoding="utf-8") as fp: config = {}