Refactor bot and integrate services
This commit is contained in:
10
auth.py
Normal file
10
auth.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from aiogram.types import Message, CallbackQuery
|
||||
from app import ADMIN_ID
|
||||
|
||||
|
||||
def is_admin_msg(msg: Message) -> bool:
|
||||
return msg.from_user and msg.from_user.id == ADMIN_ID
|
||||
|
||||
|
||||
def is_admin_cb(cb: CallbackQuery) -> bool:
|
||||
return cb.from_user and cb.from_user.id == ADMIN_ID
|
||||
Reference in New Issue
Block a user