-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
45 lines (32 loc) · 862 Bytes
/
Copy pathsettings.py
File metadata and controls
45 lines (32 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""Configuration for bot"""
from dataclasses import dataclass
from os import environ
from src.bot import commands
@dataclass
class Bot:
"""Configuration for bot"""
bot_token: str
admin_ids: list[int]
welcome_message: str
chat_help_message: str
bot_admin_help_message: str
@dataclass
class DB:
"""Configuration for DataBase"""
database_url: str
@dataclass
class Settings:
"""Configuration for bot and DataBase"""
bot: Bot
db: DB
settings = Settings(
bot=Bot(
bot_token=environ["TOKEN"],
# TODO: add admin_ids to environment variables
admin_ids=[392087623],
welcome_message="Я жажду платин!",
chat_help_message=commands.CHAT_HELP_TEXT,
bot_admin_help_message=commands.ADMIN_HELP_TEXT,
),
db=DB(database_url=environ["DATABASE_URL"]),
)