soome changes

This commit is contained in:
2025-08-28 04:28:37 +09:00
parent 8b554f5968
commit 00b00f5bf3
9 changed files with 378 additions and 216 deletions

View File

@@ -0,0 +1,18 @@
# app/bot/routers/channel.py
from telegram.ext import CommandHandler, filters
async def channel_redirect(update, ctx):
try:
await update.effective_message.reply_text(
"⚠️ В канале команды не поддерживаются. "
"Откройте ЛС со мной и выполните:\n"
"• /bind @username (или -100…)\n"
"• или /add_group и перешлите сюда пост из канала.",
disable_web_page_preview=True
)
except Exception:
pass
def register_channel_handlers(app):
# В канале любые «команды настроек» переводим в ЛС
app.add_handler(CommandHandler(["start","settings","security","dicts","spam_import"], channel_redirect, filters.ChatType.CHANNEL))