ChatBoostSource.giveaway constructor
const
ChatBoostSource.giveaway({
- @JsonKey(name: 'source') @Default(ChatBoostSourceType.giveaway) ChatBoostSourceType source,
- @JsonKey(name: 'giveaway_message_id') required int giveawayMessageId,
- @JsonKey(name: 'user') User? user,
- @JsonKey(name: 'prize_star_count') int? prizeStarCount,
- @JsonKey(name: 'is_unclaimed') bool? isUnclaimed,
The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways.
Implementation
const factory ChatBoostSource.giveaway({
/// Source of the boost, always "giveaway"
@JsonKey(name: 'source')
@Default(ChatBoostSourceType.giveaway)
final ChatBoostSourceType source,
/// Identifier of a message in the chat with the giveaway; the message could
/// have been deleted already. May be 0 if the message isn't sent yet.
@JsonKey(name: 'giveaway_message_id') required int giveawayMessageId,
/// User that won the prize in the giveaway if any; for Telegram Premium
/// giveaways only
@JsonKey(name: 'user') User? user,
/// The number of Telegram Stars to be split between giveaway winners; for
/// Telegram Star giveaways only
@JsonKey(name: 'prize_star_count') int? prizeStarCount,
/// True, if the giveaway was completed, but there was no user to win the
/// prize
@JsonKey(name: 'is_unclaimed') bool? isUnclaimed,
}) = ChatBoostSourceGiveaway;