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 MaleniaVPN — malenia.space',
"",
"Your account is linked. VPN controls and billing will appear here as we ship them.",
]
if command.args:
lines.append("")
lines.append(
"Referral link detected; attribution is stored for when rewards go live."
)
await message.answer("\n".join(lines), parse_mode="HTML")