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

6
.vscode/launch.json vendored
View File

@@ -4,6 +4,12 @@
// Для получения дополнительной информации посетите: https://go.microsoft.com/fwlink/?linkid=830387 // Для получения дополнительной информации посетите: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{
"name": "Отладчик Python: Модуль",
"type": "debugpy",
"request": "launch",
"module": "main"
},
{ {
"name": "Отладчик Python: Текущий файл", "name": "Отладчик Python: Текущий файл",
"type": "debugpy", "type": "debugpy",

View File

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