Update inline.py

This commit is contained in:
Egor
2025-12-22 19:32:36 +03:00
committed by GitHub
parent 791482a8a1
commit 65da3a57a7
+8 -2
View File
@@ -507,7 +507,12 @@ def get_main_menu_keyboard(
)
# Добавляем кнопку докупки трафика для лимитированных подписок
if subscription and not subscription.is_trial and subscription.traffic_limit_gb > 0:
if (
settings.BUY_TRAFFIC_BUTTON_VISIBLE
and subscription
and not subscription.is_trial
and subscription.traffic_limit_gb > 0
):
paired_buttons.append(
InlineKeyboardButton(text=texts.t("BUY_TRAFFIC_BUTTON", "📈 Докупить трафик"), callback_data="buy_traffic")
)
@@ -1372,9 +1377,10 @@ def get_payment_methods_keyboard(amount_kopeks: int, language: str = DEFAULT_LAN
has_direct_payment_methods = True
if settings.is_platega_enabled() and settings.get_platega_active_methods():
platega_name = settings.get_platega_display_name()
keyboard.append([
InlineKeyboardButton(
text=texts.t("PAYMENT_PLATEGA", "💳 Platega"),
text=texts.t("PAYMENT_PLATEGA", f"💳 {platega_name}"),
callback_data=_build_callback("platega"),
)
])