Add TG Chat DB (KB not working currently)

This commit is contained in:
seel2304
2023-05-05 02:10:45 +03:00
parent 1653e184a8
commit 0bc37fc87f
2 changed files with 20 additions and 0 deletions

View File

@@ -1,10 +1,17 @@
from aiogram import types
from bot.config import ADMIN
async def other_user(call: types.CallbackQuery) -> bool:
if not hasattr(call.message.reply_to_message, 'from_id'):
await call.answer('Error, original call was removed', show_alert=True)
return True
elif call.from_user.id == ADMIN:
print(f"call.from_user.id: {call.from_user.id}")
print(f"ADMIN: {ADMIN}")
print("User is Admin")
return False
elif call.message.reply_to_message.from_id != call.from_user.id:
await call.answer('It is not your menu!', show_alert=True)
return True