17 lines
326 B
Python
17 lines
326 B
Python
import json
|
|
import io
|
|
|
|
with io.open('appsettings.json', 'r', encoding='utf-8') as f:
|
|
_settings = json.load(f)
|
|
|
|
|
|
class BotSettings:
|
|
Token: str = 'Token'
|
|
|
|
@classmethod
|
|
def init(cls):
|
|
for key, value in _settings.items():
|
|
setattr(cls, key, value)
|
|
|
|
|
|
BotSettings.init() |