mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
950 B
950 B
Stars Giveaway
Use this method to run a Stars giveaway for a channel audience.
Method
await client.giveaway_stars(
channel: str,
winners: int,
amount: int,
payment_method: PaymentMethod = PaymentMethod.GRAM,
) -> StarsGiveawayResult
Parameters
channel: accepts@channel,channel, orhttps://t.me/channelwinners: integer from1to15amount: integer from500to1_000_000(per winner)payment_method:PaymentMethod.GRAM(default),PaymentMethod.USDT_GRAM, or any otherPaymentMethodvalue
Each winner receives the full amount value.
Return
StarsGiveawayResult(transaction_id, channel, winners, amount)
Typical errors
ConfigurationErrorUserNotFoundErrorWalletErrorVerificationError
Example
result: StarsGiveawayResult = await client.giveaway_stars("@channel", winners=3, amount=1000)
print(result.transaction_id)