refactor(config): simplify ADMIN_ID handling
This commit is contained in:
@@ -3,7 +3,6 @@ import logging
|
||||
|
||||
from typing import Any
|
||||
from dotenv import load_dotenv
|
||||
from curses.ascii import isdigit
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -47,7 +46,6 @@ class Config:
|
||||
admin_id = (
|
||||
os.getenv(key="ADMIN_ID", default=None)
|
||||
if not os.getenv(key="ADMIN_ID", default=None)
|
||||
or not isdigit(os.getenv(key="ADMIN_ID", default=None))
|
||||
else int(os.getenv(key="ADMIN_ID", default=None))
|
||||
)
|
||||
notify_admin = (
|
||||
|
||||
Reference in New Issue
Block a user