version 4.0

This commit is contained in:
Vladless
2025-03-02 15:31:47 +03:00
parent 972c8fbe0a
commit 93fc0f45c4
3 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -51,10 +51,12 @@ async def process_connect_pc(callback_query: CallbackQuery, session: Any):
key_name = callback_query.data.split("|")[1]
record = await get_key_details(key_name, session)
if not record:
builder = InlineKeyboardBuilder()
builder.row(InlineKeyboardButton(text="👤 Личный кабинет", callback_data="profile"))
await edit_or_send_message(
target_message=callback_query.message,
text="❌ <b>Ключ не найден. Проверьте имя ключа.</b> 🔍",
reply_markup=types.InlineKeyboardMarkup(),
reply_markup=builder.as_markup(),
media_path=None,
)
return
@@ -78,6 +80,7 @@ async def process_connect_pc(callback_query: CallbackQuery, session: Any):
)
@router.callback_query(F.data.startswith("connect_tv|"))
async def process_connect_tv(callback_query: CallbackQuery):
key_name = callback_query.data.split("|")[1]
@@ -34,7 +34,7 @@ async def notify_inactive_trial_users(bot: Bot, conn: asyncpg.Connection):
SELECT tg_id, username, first_name, last_name FROM users
WHERE tg_id IN (
SELECT tg_id FROM connections
WHERE trial = 0
WHERE trial IN (0, -1)
)
AND tg_id NOT IN (
SELECT tg_id FROM blocked_users
+1
View File
@@ -119,6 +119,7 @@ async def balance_handler(callback_query: CallbackQuery, session: Any):
callback_query.from_user.id,
)
balance = result["balance"] if result else 0.0
balance = int(balance)
builder = InlineKeyboardBuilder()
builder.row(InlineKeyboardButton(text=PAYMENT, callback_data="pay"))