from telegram import Update

from tgbot.handlers.onboarding import static_text
from tgbot.models import User


def command_start(update: Update, context) -> None:
    u, created = User.get_user_and_created(update, context)

    if created:
        text = static_text.start_created.format(first_name=u.first_name)
    else:
        text = static_text.start_not_created.format(first_name=u.first_name)

    update.message.reply_text(text=text)
