feat: update payment method defaults to use PaymentMethod enum; refactor related validation checks

This commit is contained in:
bohd4nx
2026-05-29 22:31:30 +03:00
parent 5124af17ef
commit 6aa7037380
13 changed files with 49 additions and 38 deletions
+4 -4
View File
@@ -136,7 +136,7 @@ class FragmentClient:
username: str,
months: int,
show_sender: bool = True,
payment_method: PaymentMethod = "ton",
payment_method: PaymentMethod = PaymentMethod.TON,
) -> PremiumResult:
"""Gift Telegram Premium to a user.
@@ -156,7 +156,7 @@ class FragmentClient:
username: str,
amount: int,
show_sender: bool = True,
payment_method: PaymentMethod = "ton",
payment_method: PaymentMethod = PaymentMethod.TON,
) -> StarsResult:
"""Send Telegram Stars to a user.
@@ -212,7 +212,7 @@ class FragmentClient:
channel: str,
winners: int,
amount: int,
payment_method: PaymentMethod = "ton",
payment_method: PaymentMethod = PaymentMethod.TON,
) -> StarsGiveawayResult:
"""Run a Telegram Stars giveaway for a channel.
@@ -233,7 +233,7 @@ class FragmentClient:
channel: str,
winners: int,
months: int = 3,
payment_method: PaymentMethod = "ton",
payment_method: PaymentMethod = PaymentMethod.TON,
) -> PremiumGiveawayResult:
"""Run a Telegram Premium giveaway for a channel.