Skip to content

Commit

Permalink
Bot API 7.10
Browse files Browse the repository at this point in the history
  • Loading branch information
ayrat555 committed Sep 7, 2024
1 parent 81c27aa commit 539c0c9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/api_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,10 @@ pub struct SendPaidMediaParams {

pub media: Vec<InputPaidMedia>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub payload: Option<String>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub caption: Option<String>,
Expand Down
27 changes: 26 additions & 1 deletion src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ pub enum UpdateContent {
ChatJoinRequest(ChatJoinRequest),
ChatBoost(ChatBoostUpdated),
RemovedChatBoost(ChatBoostRemoved),
PurchasedPaidMedia(PaidMediaPurchased),
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)]
Expand Down Expand Up @@ -3746,6 +3747,14 @@ pub struct PreCheckoutQuery {
pub order_info: Option<OrderInfo>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)]
pub struct PaidMediaPurchased {
pub from: User,

#[builder(setter(into))]
pub paid_media_payload: String,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)]
pub struct PassportData {
pub data: Vec<EncryptedPassportElement>,
Expand Down Expand Up @@ -3961,7 +3970,10 @@ pub struct GameHighScore {
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)]
pub struct GiveawayCreated {}
pub struct GiveawayCreated {
#[serde(skip_serializing_if = "Option::is_none")]
pub prize_star_count: Option<u32>,
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Builder)]
pub struct Giveaway {
Expand All @@ -3987,6 +3999,9 @@ pub struct Giveaway {
#[builder(setter(into, strip_option), default)]
pub country_codes: Option<Vec<String>>,

#[serde(skip_serializing_if = "Option::is_none")]
pub prize_star_count: Option<u32>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub premium_subscription_month_count: Option<u32>,
Expand All @@ -4008,6 +4023,9 @@ pub struct GiveawayWinners {
#[builder(setter(into, strip_option), default)]
pub additional_chat_count: Option<u32>,

#[serde(skip_serializing_if = "Option::is_none")]
pub prize_star_count: Option<u32>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub premium_subscription_month_count: Option<u32>,
Expand Down Expand Up @@ -4040,6 +4058,10 @@ pub struct GiveawayCompleted {
#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub giveaway_message: Option<Box<Message>>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub is_star_giveaway: Option<bool>,
}

#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Builder)]
Expand Down Expand Up @@ -4136,6 +4158,9 @@ pub struct ChatBoostSourceGiveaway {
#[builder(setter(into, strip_option), default)]
pub user: Option<User>,

#[serde(skip_serializing_if = "Option::is_none")]
pub prize_star_count: Option<u32>,

#[serde(skip_serializing_if = "Option::is_none")]
#[builder(setter(into, strip_option), default)]
pub is_unclaimed: Option<bool>,
Expand Down

0 comments on commit 539c0c9

Please sign in to comment.