Move to pydantic settings paradigm

This commit is contained in:
Roman Krček
2024-10-13 19:47:06 +02:00
parent c68d3d8722
commit d236f88b64
4 changed files with 68 additions and 19 deletions

View File

@@ -1,11 +1,9 @@
import os
from functools import wraps
from telegram_downloader_bot.logger import log
from telegram_downloader_bot.settings import settings
# Comma separated list of Telegram IDs that this bot will respond to
allowed_ids_raw = os.getenv("ALLOWED_IDS", "")
allowed_ids = allowed_ids_raw.split(",")
allowed_ids = settings.allowed_ids.split(",")
allowed_ids = [int(x) for x in allowed_ids]