first commit

This commit is contained in:
2026-04-04 21:30:35 +07:00
commit d66041fa31
24 changed files with 503 additions and 0 deletions

37
app/bot/handlers/start.py Normal file
View File

@@ -0,0 +1,37 @@
from aiogram import Router
from aiogram.filters import CommandObject, CommandStart
from aiogram.types import Message
from app.services.user_service import UserService
router = Router(name="start")
@router.message(CommandStart())
async def cmd_start(
message: Message,
command: CommandObject,
user_service: UserService,
) -> None:
if message.from_user is None:
return
await user_service.ensure_user(
telegram_id=message.from_user.id,
username=message.from_user.username,
first_name=message.from_user.first_name,
start_payload=command.args,
)
lines = [
'Welcome to <b>MaleniaVPN</b> — <a href="https://malenia.space">malenia.space</a>',
"",
"Your account is linked. VPN controls and billing will appear here as we ship them.",
]
if command.args:
lines.append("")
lines.append(
"<i>Referral link detected; attribution is stored for when rewards go live.</i>"
)
await message.answer("\n".join(lines), parse_mode="HTML")