pub struct GiveawayWinners {
pub chat: Chat,
pub giveaway_message_id: i64,
pub winner_count: i64,
pub winners: Vec<User>,
pub winners_selection_date: i64,
pub additional_chat_count: Option<i64>,
pub only_new_members: Option<bool>,
pub premium_subscription_month_count: Option<i64>,
pub prize_description: Option<String>,
pub prize_star_count: Option<i64>,
pub unclaimed_prize_count: Option<i64>,
pub was_refunded: Option<bool>,
}
Expand description
Represents a message about the completion of a giveaway with public winners.
Fields§
§chat: Chat
The chat that created the giveaway.
giveaway_message_id: i64
Identifier of the messsage with the giveaway in the chat.
winner_count: i64
Total number of winners in the giveaway.
winners: Vec<User>
List of up to 100 winners of the giveaway.
winners_selection_date: i64
Point in time (Unix timestamp) when winners of the giveaway were selected.
additional_chat_count: Option<i64>
The number of other chats the user had to join in order to be eligible for the giveaway.
only_new_members: Option<bool>
Whether only users who had joined the chats after the giveaway started were eligible to win.
The number of months the Telegram Premium subscription won from the giveaway will be active for.
prize_description: Option<String>
Description of additional giveaway prize.
prize_star_count: Option<i64>
The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only.
unclaimed_prize_count: Option<i64>
Number of undistributed prizes.
was_refunded: Option<bool>
Whether the giveaway was canceled because the payment for it was refunded.
Implementations§
Source§impl GiveawayWinners
impl GiveawayWinners
Sourcepub fn new<A, B>(
chat: A,
giveaway_message_id: i64,
winner_count: i64,
winners: B,
winners_selection_date: i64,
) -> GiveawayWinners
pub fn new<A, B>( chat: A, giveaway_message_id: i64, winner_count: i64, winners: B, winners_selection_date: i64, ) -> GiveawayWinners
Creates a new GiveawayWinners
.
§Arguments
chat
- The chat that created the giveaway.giveaway_message_id
- Identifier of the messsage with the giveaway in the chat.winner_count
- Total number of winners in the giveaway.winners
- List of up to 100 winners of the giveaway.winners_selection_date
- Point in time (Unix timestamp) when winners of the giveaway were selected.
Sourcepub fn with_additional_chat_count(self, value: i64) -> GiveawayWinners
pub fn with_additional_chat_count(self, value: i64) -> GiveawayWinners
Sets a new number of additional chats.
§Arguments
value
- The number of other chats the user had to join in order to be eligible for the giveaway.
Sourcepub fn with_only_new_members(self, value: bool) -> GiveawayWinners
pub fn with_only_new_members(self, value: bool) -> GiveawayWinners
Sets a new value for the only_new_members
flag.
§Arguments
value
- Whether only users who had joined the chats after the giveaway started were eligible to win.
Sets a new number of premium subscription months.
§Arguments
value
- The number of months the Telegram Premium subscription won from the giveaway will be active for.
Sourcepub fn with_prize_description<T>(self, value: T) -> GiveawayWinners
pub fn with_prize_description<T>(self, value: T) -> GiveawayWinners
Sourcepub fn with_prize_star_count(self, value: i64) -> GiveawayWinners
pub fn with_prize_star_count(self, value: i64) -> GiveawayWinners
Sets a new prize star count.
§Arguments
value
- The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only.
Sourcepub fn with_unclaimed_prize_count(self, value: i64) -> GiveawayWinners
pub fn with_unclaimed_prize_count(self, value: i64) -> GiveawayWinners
Sourcepub fn with_was_refunded(self, value: bool) -> GiveawayWinners
pub fn with_was_refunded(self, value: bool) -> GiveawayWinners
Sets a new value for the was_refunded
flag.
§Arguments
value
- Whether the giveaway was canceled because the payment for it was refunded.
Trait Implementations§
Source§impl Clone for GiveawayWinners
impl Clone for GiveawayWinners
Source§fn clone(&self) -> GiveawayWinners
fn clone(&self) -> GiveawayWinners
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more