mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-08-01 09:24:51 +00:00
906 B
906 B
Premium Giveaway
Use this method to run a Telegram Premium giveaway for your channel.
Method
await client.giveaway_premium(
channel: str,
winners: int,
months: int = 3,
payment_method: PaymentMethod = "ton",
) -> PremiumGiveawayResult
Parameters
channel: accepts@channel,channel, orhttps://t.me/channelwinners: integer from1to24_000months: one of3,6,12payment_method:"ton"or"usdt_ton"
winners must be a positive integer, and large values can increase total cost significantly.
Return
PremiumGiveawayResult(transaction_id, channel, winners, amount)
Typical errors
ConfigurationErrorUserNotFoundErrorWalletErrorVerificationError
Example
result: PremiumGiveawayResult = await client.giveaway_premium("@channel", winners=100, months=3)
print(result.amount)