pc button for trial_key

This commit is contained in:
Vladless
2024-12-02 03:37:28 +03:00
parent d0084f4062
commit 0353d9d628
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ async def create_trial_key(tg_id: int, session: Any):
email = generate_random_email()
public_link = f"{PUBLIC_LINK}{email}/{tg_id}"
instructions = INSTRUCTIONS
result = {"key": public_link, "instructions": instructions}
result = {"key": public_link, "instructions": instructions, "email": email}
current_time = datetime.utcnow()
expiry_time = current_time + timedelta(days=TRIAL_TIME)
expiry_timestamp = int(expiry_time.timestamp() * 1000)
+3
View File
@@ -80,6 +80,8 @@ async def handle_connect_vpn(callback_query: CallbackQuery, session: Any):
f"📋 <b>Быстрая инструкция по подключению:</b>\n{INSTRUCTIONS_TRIAL}"
)
email = trial_key_info["email"]
builder = InlineKeyboardBuilder()
builder.row(InlineKeyboardButton(text="💬 Поддержка", url=SUPPORT_CHAT_URL))
builder.row(
@@ -96,6 +98,7 @@ async def handle_connect_vpn(callback_query: CallbackQuery, session: Any):
url=f'{CONNECT_ANDROID}{trial_key_info["key"]}',
),
)
builder.row(InlineKeyboardButton(text="💻 Windows/Linux", callback_data=f"connect_pc|{email}"))
builder.row(InlineKeyboardButton(text="👤 Личный кабинет", callback_data="profile"))
await callback_query.message.answer(key_message, reply_markup=builder.as_markup())