File size: 437 Bytes
b83571a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | """
Telegram verification database operations.
"""
import json
from config import TELEGRAM_DB_FILE
def load_telegram_db():
try:
with open(TELEGRAM_DB_FILE, 'r', encoding='utf-8') as f:
return json.load(f)
except Exception:
return {}
def save_telegram_db(data):
with open(TELEGRAM_DB_FILE, 'w', encoding='utf-8') as f:
json.dump(data, f, indent=4, ensure_ascii=False) |