Update keyboards, update texts.py

This commit is contained in:
Zakhar Izmaylov
2024-11-13 16:48:56 +03:00
parent 399537530a
commit 3a46d12657
7 changed files with 49 additions and 27 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ async def add_client(
id=client_id,
email=email.lower(),
limit_ip=limit_ip,
total_gb = TOTAL_GB,
total_gb=TOTAL_GB,
expiry_time=expiry_time,
enable=enable,
tg_id=tg_id,
+4 -8
View File
@@ -300,22 +300,18 @@ async def handle_key_name_input(message: types.Message, state: FSMContext):
key_buttons.row(
InlineKeyboardButton(
text="⏳ Изменить время истечения",
callback_data=f"change_expiry|{email}"
callback_data=f"change_expiry|{email}",
)
)
key_buttons.row(
InlineKeyboardButton(
text="❌ Удалить ключ",
callback_data=f"delete_key_admin|{email}"
text="❌ Удалить ключ", callback_data=f"delete_key_admin|{email}"
)
)
key_buttons.row(
InlineKeyboardButton(
text="🔙 Назад",
callback_data="back_to_user_editor"
)
)
InlineKeyboardButton(text="🔙 Назад", callback_data="back_to_user_editor")
)
await message.reply(
"\n".join(response_messages),
+6
View File
@@ -77,6 +77,12 @@ async def process_callback_pay_cryptobot(
callback_data=PAYMENT_OPTIONS[i]["callback_data"],
)
)
builder.row(
InlineKeyboardButton(
text="💰 Ввести свою сумму", callback_data="enter_custom_amount"
)
)
builder.row(InlineKeyboardButton(text="⬅️ Назад", callback_data="back_to_profile"))
key_count = await get_key_count(tg_id)
+6
View File
@@ -119,6 +119,12 @@ async def process_callback_pay_freekassa(
callback_data=PAYMENT_OPTIONS[i]["callback_data"],
)
)
builder.row(
InlineKeyboardButton(
text="💰 Ввести свою сумму", callback_data="enter_custom_amount"
)
)
builder.row(InlineKeyboardButton(text="⬅️ Назад", callback_data="back_to_profile"))
await bot.delete_message(
chat_id=tg_id, message_id=callback_query.message.message_id
+6
View File
@@ -72,6 +72,12 @@ async def process_callback_pay_stars(
callback_data=PAYMENT_OPTIONS[i]["callback_data"],
)
)
builder.row(
InlineKeyboardButton(
text="💰 Ввести свою сумму", callback_data="enter_custom_amount"
)
)
builder.row(InlineKeyboardButton(text="⬅️ Назад", callback_data="back_to_profile"))
key_count = await get_key_count(tg_id)
+25 -17
View File
@@ -63,24 +63,32 @@ async def process_callback_pay_yookassa(
builder = InlineKeyboardBuilder()
for i in range(0, 4, 2):
builder.row(
InlineKeyboardButton(
text=PAYMENT_OPTIONS[i]["text"],
callback_data=PAYMENT_OPTIONS[i]["callback_data"],
),
InlineKeyboardButton(
text=PAYMENT_OPTIONS[i + 1]["text"],
callback_data=PAYMENT_OPTIONS[i + 1]["callback_data"],
),
)
for i in range(4, len(PAYMENT_OPTIONS)):
builder.row(
InlineKeyboardButton(
text=PAYMENT_OPTIONS[i]["text"],
callback_data=PAYMENT_OPTIONS[i]["callback_data"],
for i in range(0, len(PAYMENT_OPTIONS), 2):
if i + 1 < len(PAYMENT_OPTIONS):
builder.row(
InlineKeyboardButton(
text=PAYMENT_OPTIONS[i]["text"],
callback_data=PAYMENT_OPTIONS[i]["callback_data"],
),
InlineKeyboardButton(
text=PAYMENT_OPTIONS[i + 1]["text"],
callback_data=PAYMENT_OPTIONS[i + 1]["callback_data"],
),
)
else:
builder.row(
InlineKeyboardButton(
text=PAYMENT_OPTIONS[i]["text"],
callback_data=PAYMENT_OPTIONS[i]["callback_data"],
)
)
builder.row(
InlineKeyboardButton(
text="💰 Ввести свою сумму", callback_data="enter_custom_amount"
)
)
builder.row(
InlineKeyboardButton(text="⬅️ Назад", callback_data="back_to_profile")
)
key_count = await get_key_count(tg_id)
+1 -1
View File
@@ -8,7 +8,7 @@ from aiogram.utils.keyboard import InlineKeyboardBuilder
from loguru import logger
from bot import bot
from config import APP_URL, CHANNEL_URL, DATABASE_URL, SUPPORT_CHAT_URL, DOWNLOAD_IOS, DOWNLOAD_ANDROID, CONNECT_ANDROID, CONNECT_IOS
from config import CHANNEL_URL, CONNECT_ANDROID, CONNECT_IOS, DATABASE_URL, DOWNLOAD_ANDROID, DOWNLOAD_IOS, SUPPORT_CHAT_URL
from database import add_connection, add_referral, check_connection_exists, get_trial
from handlers.keys.trial_key import create_trial_key
from handlers.texts import INSTRUCTIONS_TRIAL, WELCOME_TEXT, get_about_vpn