import re
from pathlib import Path

_API_TXT = Path(__file__).parent / "api.txt"
_text = _API_TXT.read_text(encoding="utf-8")

API_ID = int(re.search(r"api_id:\s*\n?\s*(\d+)", _text).group(1))
API_HASH = re.search(r"api_hash:\s*\n?\s*([a-f0-9]+)", _text).group(1)
SESSION_NAME = str(Path(__file__).parent / "telegram_session")
