automap configs

This commit is contained in:
Mikhail Shahovalov
2025-03-16 01:21:40 +03:00
parent d8250f17cb
commit cb6805e0c0
2 changed files with 17 additions and 2 deletions

View File

@@ -2,7 +2,16 @@ import json
import io
with io.open('appsettings.json', 'r', encoding='utf-8') as f:
settings = json.load(f)
_settings = json.load(f)
class BotSettings:
Token: str = 'Token'
Token: str = 'Token'
@classmethod
def init(cls):
for key, value in _settings.items():
setattr(cls, key, value)
BotSettings.init()