feat(bot): implement admin review bot, inline keyboards and channel config

This commit is contained in:
mamad
2026-08-27 19:53:52 +03:30
parent 07b006698e
commit 17f56ba533
2 changed files with 236 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
from typing import List
from telethon import Button
from db.models import TargetChannel
def get_review_keyboard(post_id: int, targets: List[TargetChannel]) -> List[List[Button]]:
keyboard = []
# Add a button for each target channel
for target in targets:
title = target.title or f"Target #{target.id}"
keyboard.append([
Button.inline(f"🚀 Send to {title}", data=f"appr:{post_id}:{target.id}")
])
# Add Reject button
keyboard.append([
Button.inline("❌ Reject Post", data=f"rej:{post_id}")
])
return keyboard