main.py: проверка модерации при входе в PHOTO_MODE
This commit is contained in:
@@ -119,6 +119,17 @@ async def main_menu(msg: Message):
|
||||
return
|
||||
elif action == "PHOTO":
|
||||
USER_MENU_SHOWN[user_id] = True
|
||||
from photo_bot.handlers import check_moderation_status
|
||||
from utils.texts import photo_moderation_pending
|
||||
status = await check_moderation_status(user_id)
|
||||
if status.get("status") == "ok" and status.get("moderation_status") == "pending":
|
||||
photo_id = status.get("photo_id", "???")
|
||||
log_menu_stats(user_id, "Photo Bot", "Вход заблокирован — фото на модерации")
|
||||
await msg.answer(
|
||||
photo_moderation_pending(photo_id),
|
||||
parse_mode="html"
|
||||
)
|
||||
return
|
||||
set_state(user_id, "PHOTO_MODE")
|
||||
log_menu_stats(user_id, "Photo Bot", "Вход")
|
||||
await msg.answer(PHOTO_MAIN_MENU_TEXT, parse_mode="html")
|
||||
|
||||
Reference in New Issue
Block a user