Files
tg-admin-bot/auth.py

11 lines
279 B
Python

from aiogram.types import Message, CallbackQuery
from app import ADMIN_IDS
def is_admin_msg(msg: Message) -> bool:
return msg.from_user and msg.from_user.id in ADMIN_IDS
def is_admin_cb(cb: CallbackQuery) -> bool:
return cb.from_user and cb.from_user.id in ADMIN_IDS