[Update] config.py: Message Format. 設定された文字列に"[message]"と"[translation]"の両方が入っていなければ初期値を設定するように。

This commit is contained in:
Sakamoto Shiina
2023-11-01 09:19:40 +09:00
parent 8d90ca0cc6
commit f5b3b503e4

View File

@@ -447,6 +447,8 @@ class Config:
@MESSAGE_FORMAT.setter
def MESSAGE_FORMAT(self, value):
if type(value) is str:
if "[message]" not in value or "[translation]" not in value:
value = "[message]([translation])"
self._MESSAGE_FORMAT = value
saveJson(self.PATH_CONFIG, inspect.currentframe().f_code.co_name, value)