Spaces:
Sleeping
Sleeping
| from dataclasses import dataclass, field | |
| import os | |
| def get_admin_ids(): | |
| ids = os.environ.get("ADMIN_IDS", "") | |
| if ids: | |
| return [int(x.strip()) for x in ids.split(",") if x.strip()] | |
| return [] | |
| class Config: | |
| BOT_TOKEN: str = os.environ.get("BOT_TOKEN", "") | |
| MONGO_URI: str = os.environ.get("MONGO_URI", "mongodb://localhost:27017") | |
| DATABASE_NAME: str = os.environ.get("DATABASE_NAME", "textile_shop") | |
| ADMIN_IDS: list = field(default_factory=get_admin_ids) | |
| config = Config() | |