[Update] Message Format: config.jsonで元々のkey "MESSAGE_FORMAT"が存在していた場合、"SEND_MESSAGE_FORMAT_WITH_T"へと引き継ぐ処理追加。
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user