Replace single report type with composable analysis: depth levels (basic/standard/full) + focus area multi-select (psychology, business, marketing, content, audience, sentiment). Multi-step inline keyboard flow guides users through selection. - i18n: English + Russian, auto-detect from Telegram, /lang override - AI providers: Anthropic + OpenRouter via AIClient abstraction - Telegram Stars payments with per-depth pricing and free trial - SQLite (aiosqlite) for users, analyses, payments tracking - User middleware for auto-registration and language detection - Report persistence: save .md locally, offer file download - New commands: /features, /prices, /lang - Composable prompt system: depth modifiers + focus area fragments
16 lines
497 B
Python
16 lines
497 B
Python
from aiogram import Router
|
|
from aiogram.filters import Command
|
|
from aiogram.types import Message
|
|
|
|
from bot.i18n import Lang, t
|
|
from bot.models import FocusArea
|
|
|
|
router = Router()
|
|
|
|
|
|
@router.message(Command("features"))
|
|
async def cmd_features(message: Message, lang: Lang = Lang.EN, **_: object) -> None:
|
|
lines = [t("features_title", lang)]
|
|
for area in FocusArea:
|
|
lines.append(f"• {t(f'features_{area.value}', lang)}")
|
|
await message.answer("\n".join(lines), parse_mode="HTML")
|