"""Send notifications to the staff/admin Telegram group."""
import logging
from telegram import Bot
from config import STAFF_GROUP_ID

log = logging.getLogger(__name__)

async def notify_staff(bot: Bot, text: str):
    if not STAFF_GROUP_ID:
        return
    try:
        await bot.send_message(STAFF_GROUP_ID, text, parse_mode="HTML",
                               disable_web_page_preview=True)
    except Exception as e:
        log.warning("notify_staff failed: %s", e)
