From 3618a3775f3a3dca0cdb87e50f09bc0d259e2ebd Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Sat, 2 Nov 2024 16:41:15 +0200 Subject: [PATCH] Telegram API 7.11 (#226) --- src/api_params.rs | 21 ++++++++++++++++++++- src/objects.rs | 14 ++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/api_params.rs b/src/api_params.rs index 44997ca..787bf78 100644 --- a/src/api_params.rs +++ b/src/api_params.rs @@ -250,6 +250,7 @@ pub struct SendMessageParams { pub link_preview_options: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -290,6 +291,7 @@ pub struct CopyMessageParams { pub show_caption_above_media: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub reply_parameters: Option, pub reply_markup: Option, } @@ -320,6 +322,7 @@ pub struct SendPhotoParams { pub has_spoiler: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -341,6 +344,7 @@ pub struct SendAudioParams { pub thumbnail: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -360,6 +364,7 @@ pub struct SendDocumentParams { pub disable_content_type_detection: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -384,6 +389,7 @@ pub struct SendVideoParams { pub supports_streaming: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -407,6 +413,7 @@ pub struct SendAnimationParams { pub has_spoiler: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -425,6 +432,7 @@ pub struct SendVoiceParams { pub duration: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -442,6 +450,7 @@ pub struct SendVideoNoteParams { pub thumbnail: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -461,6 +470,7 @@ pub struct SendPaidMediaParams { pub show_caption_above_media: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub reply_parameters: Option, pub reply_markup: Option, } @@ -473,8 +483,9 @@ pub struct SendMediaGroupParams { pub message_thread_id: Option, pub media: Vec, pub disable_notification: Option, - pub message_effect_id: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, + pub message_effect_id: Option, pub reply_parameters: Option, } @@ -491,6 +502,7 @@ pub struct SendLocationParams { pub proximity_alert_radius: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -536,6 +548,7 @@ pub struct SendVenueParams { pub google_place_type: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -553,6 +566,7 @@ pub struct SendContactParams { pub vcard: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -581,6 +595,7 @@ pub struct SendPollParams { pub is_closed: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -595,6 +610,7 @@ pub struct SendDiceParams { pub emoji: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -1113,6 +1129,7 @@ pub struct SendStickerParams { pub emoji: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -1271,6 +1288,7 @@ pub struct SendInvoiceParams { pub is_flexible: Option, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, @@ -1349,6 +1367,7 @@ pub struct SendGameParams { pub game_short_name: String, pub disable_notification: Option, pub protect_content: Option, + pub allow_paid_broadcast: Option, pub message_effect_id: Option, pub reply_parameters: Option, pub reply_markup: Option, diff --git a/src/objects.rs b/src/objects.rs index d902249..b3fa242 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -1074,6 +1074,7 @@ pub struct InlineKeyboardButton { pub switch_inline_query: Option, pub switch_inline_query_current_chat: Option, pub switch_inline_query_chosen_chat: Option, + pub copy_text: Option, pub callback_game: Option, pub pay: Option, } @@ -1097,6 +1098,12 @@ pub struct SwitchInlineQueryChosenChat { pub allow_channel_chats: Option, } +#[apply(apistruct!)] +#[derive(Eq)] +pub struct CopyTextButton { + pub text: String, +} + #[apply(apistruct!)] pub struct CallbackQuery { pub id: String, @@ -2227,6 +2234,7 @@ pub enum TransactionPartner { User(TransactionPartnerUser), Fragment(TransactionPartnerFragment), TelegramAds(TransactionPartnerTelegramAds), + TelegramApi(TransactionPartnerTelegramApi), Other(TransactionPartnerOther), } @@ -2248,6 +2256,12 @@ pub struct TransactionPartnerFragment { #[derive(Eq)] pub struct TransactionPartnerTelegramAds {} +#[apply(apistruct!)] +#[derive(Eq)] +pub struct TransactionPartnerTelegramApi { + pub request_count: u64, +} + #[apply(apistruct!)] #[derive(Eq)] pub struct TransactionPartnerOther {}