From 12a8fb92f93f42c2940908e1dee4c72130bd0df4 Mon Sep 17 00:00:00 2001 From: Zakhar Izmaylov Date: Sun, 24 Nov 2024 08:13:52 +0300 Subject: [PATCH] Fix --- handlers/keys/key_management.py | 4 ++-- handlers/payments/freekassa_pay.py | 2 +- handlers/payments/robokassa_pay.py | 4 ++-- handlers/payments/stars_pay.py | 2 +- handlers/payments/yookassa_pay.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/handlers/keys/key_management.py b/handlers/keys/key_management.py index 7085b2cc..c1f10428 100644 --- a/handlers/keys/key_management.py +++ b/handlers/keys/key_management.py @@ -68,13 +68,13 @@ async def confirm_create_new_key(callback_query: CallbackQuery, state: FSMContex if balance < RENEWAL_PLANS["1"]["price"]: builder = InlineKeyboardBuilder() builder.row(InlineKeyboardButton(text="👤 Личный кабинет", callback_data="profile")) - await callback_query.message.edit_text(NULL_BALANCE, reply_markup=builder.as_markup()) + await callback_query.message.answer(NULL_BALANCE, reply_markup=builder.as_markup()) await state.clear() return logger.info(f"Balance for user {tg_id} is sufficient. Asking for device name.") - await callback_query.message.edit_text("🔑 Пожалуйста, введите имя подключаемого устройства:") + await callback_query.message.answer("🔑 Пожалуйста, введите имя подключаемого устройства:") await state.set_state(Form.waiting_for_key_name) logger.info(f"State set to waiting_for_key_name for user {tg_id}") await state.update_data(creating_new_key=True) diff --git a/handlers/payments/freekassa_pay.py b/handlers/payments/freekassa_pay.py index 6c91b841..88ebe04f 100644 --- a/handlers/payments/freekassa_pay.py +++ b/handlers/payments/freekassa_pay.py @@ -154,7 +154,7 @@ async def process_amount_selection(callback_query: types.CallbackQuery, state: F @router.callback_query(F.data == "enter_custom_amount_freekassa") async def process_enter_custom_amount(callback_query: types.CallbackQuery, state: FSMContext): - await callback_query.message.edit_text(text="Введите сумму пополнения:") + await callback_query.message.answer(text="Введите сумму пополнения:") await state.set_state(ReplenishBalanceState.entering_custom_amount_freekassa) diff --git a/handlers/payments/robokassa_pay.py b/handlers/payments/robokassa_pay.py index bf5489f4..ea1c332f 100644 --- a/handlers/payments/robokassa_pay.py +++ b/handlers/payments/robokassa_pay.py @@ -132,7 +132,7 @@ async def process_amount_selection(callback_query: types.CallbackQuery, state: F ] ) - await callback_query.message.edit_text( + await callback_query.message.answer( text=f"Вы выбрали пополнение на {amount} рублей. Для оплаты перейдите по ссылке ниже:", reply_markup=confirm_keyboard, ) @@ -203,7 +203,7 @@ async def process_custom_amount_selection(callback_query: types.CallbackQuery, s tg_id = callback_query.from_user.id logger.info(f"User {tg_id} chose to enter a custom amount.") - await callback_query.message.edit_text(text="Пожалуйста, введите сумму пополнения в рублях (например, 150):") + await callback_query.message.answer(text="Пожалуйста, введите сумму пополнения в рублях (например, 150):") await state.set_state(ReplenishBalanceState.waiting_for_payment_confirmation_robokassa) diff --git a/handlers/payments/stars_pay.py b/handlers/payments/stars_pay.py index 8d277426..a0db97a4 100644 --- a/handlers/payments/stars_pay.py +++ b/handlers/payments/stars_pay.py @@ -128,7 +128,7 @@ async def process_amount_selection(callback_query: types.CallbackQuery, state: F @router.callback_query(F.data == "enter_custom_amount_stars") async def process_enter_custom_amount(callback_query: types.CallbackQuery, state: FSMContext): - await callback_query.message.edit_text(text="Введите сумму пополнения:") + await callback_query.message.answer(text="Введите сумму пополнения:") await state.set_state(ReplenishBalanceState.entering_custom_amount_stars) diff --git a/handlers/payments/yookassa_pay.py b/handlers/payments/yookassa_pay.py index 0278fa0f..5dddef4b 100644 --- a/handlers/payments/yookassa_pay.py +++ b/handlers/payments/yookassa_pay.py @@ -138,7 +138,7 @@ async def process_amount_selection(callback_query: types.CallbackQuery, state: F ] ) - await callback_query.message.edit_text( + await callback_query.message.answer( text=f"Вы выбрали пополнение на {amount} рублей.", reply_markup=confirm_keyboard, )