Move to pydantic settings paradigm
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user