fix(env): stabilize .env parsing and add feature toggles
- Handle dotenv placeholders like 'KEY= # comment' without validation crashes - Add REQUIRED_CHANNEL_SUBSCRIBE_TO_USE to explicitly enable channel gate - Add REFERRAL_ENABLED to fully disable referral flow and bonuses - Hide referral UI/actions when disabled and ignore ref start params - Update .env.example defaults and README docs for new flags
This commit is contained in:
@@ -28,13 +28,16 @@ def get_main_menu_inline_keyboard(
|
||||
)
|
||||
)
|
||||
|
||||
referral_button = InlineKeyboardButton(
|
||||
text=_(key="menu_referral_inline"),
|
||||
callback_data="main_action:referral")
|
||||
promo_button = InlineKeyboardButton(
|
||||
text=_(key="menu_apply_promo_button"),
|
||||
callback_data="main_action:apply_promo")
|
||||
builder.row(referral_button, promo_button)
|
||||
if settings.REFERRAL_ENABLED:
|
||||
referral_button = InlineKeyboardButton(
|
||||
text=_(key="menu_referral_inline"),
|
||||
callback_data="main_action:referral")
|
||||
builder.row(referral_button, promo_button)
|
||||
else:
|
||||
builder.row(promo_button)
|
||||
|
||||
language_button = InlineKeyboardButton(
|
||||
text=_(key="menu_language_settings_inline"),
|
||||
|
||||
Reference in New Issue
Block a user