From d4c0bc2fe15fec14acf045ed3f94c60c09c8dda7 Mon Sep 17 00:00:00 2001 From: Waffle <waffle.lapkin@gmail.com> Date: Sun, 16 Aug 2020 21:10:42 +0300 Subject: [PATCH 1/2] make all methods fields public --- src/requests/all/add_sticker_to_set.rs | 10 ++-- src/requests/all/answer_callback_query.rs | 10 ++-- src/requests/all/answer_inline_query.rs | 14 +++--- src/requests/all/answer_pre_checkout_query.rs | 6 +-- src/requests/all/answer_shipping_query.rs | 8 ++-- src/requests/all/create_new_sticker_set.rs | 14 +++--- src/requests/all/delete_chat_photo.rs | 2 +- src/requests/all/delete_chat_sticker_set.rs | 2 +- src/requests/all/delete_message.rs | 4 +- src/requests/all/delete_sticker_from_set.rs | 2 +- .../all/edit_inline_message_caption.rs | 8 ++-- .../all/edit_inline_message_live_location.rs | 8 ++-- src/requests/all/edit_inline_message_media.rs | 6 +-- .../all/edit_inline_message_reply_markup.rs | 4 +- src/requests/all/edit_inline_message_text.rs | 10 ++-- src/requests/all/edit_message_caption.rs | 10 ++-- .../all/edit_message_live_location.rs | 10 ++-- src/requests/all/edit_message_media.rs | 8 ++-- src/requests/all/edit_message_reply_markup.rs | 6 +-- src/requests/all/edit_message_text.rs | 12 ++--- src/requests/all/export_chat_invite_link.rs | 2 +- src/requests/all/forward_message.rs | 8 ++-- src/requests/all/get_chat.rs | 2 +- src/requests/all/get_chat_administrators.rs | 2 +- src/requests/all/get_chat_member.rs | 4 +- src/requests/all/get_chat_members_count.rs | 2 +- src/requests/all/get_file.rs | 2 +- src/requests/all/get_game_high_scores.rs | 4 +- src/requests/all/get_sticker_set.rs | 2 +- src/requests/all/get_updates.rs | 8 ++-- src/requests/all/get_user_profile_photos.rs | 6 +-- src/requests/all/kick_chat_member.rs | 6 +-- src/requests/all/leave_chat.rs | 2 +- src/requests/all/pin_chat_message.rs | 6 +-- src/requests/all/promote_chat_member.rs | 20 ++++---- src/requests/all/restrict_chat_member.rs | 8 ++-- src/requests/all/send_audio.rs | 22 ++++----- src/requests/all/send_chat_action.rs | 4 +- src/requests/all/send_contact.rs | 16 +++---- src/requests/all/send_dice.rs | 11 ++--- src/requests/all/send_document.rs | 16 +++---- src/requests/all/send_game.rs | 10 ++-- src/requests/all/send_invoice.rs | 46 +++++++++---------- src/requests/all/send_location.rs | 14 +++--- src/requests/all/send_media_group.rs | 8 ++-- src/requests/all/send_photo.rs | 14 +++--- src/requests/all/send_poll.rs | 30 ++++++------ src/requests/all/send_sticker.rs | 10 ++-- src/requests/all/send_venue.rs | 20 ++++---- src/requests/all/send_video.rs | 24 +++++----- src/requests/all/send_video_note.rs | 16 +++---- src/requests/all/send_voice.rs | 16 +++---- .../set_chat_administrator_custom_title.rs | 6 +-- src/requests/all/set_chat_description.rs | 4 +- src/requests/all/set_chat_permissions.rs | 4 +- src/requests/all/set_chat_photo.rs | 4 +- src/requests/all/set_chat_sticker_set.rs | 4 +- src/requests/all/set_chat_title.rs | 4 +- src/requests/all/set_game_score.rs | 10 ++-- src/requests/all/set_my_commands.rs | 3 +- .../all/set_sticker_position_in_set.rs | 4 +- src/requests/all/set_sticker_set_thumb.rs | 6 +-- src/requests/all/set_webhook.rs | 8 ++-- .../all/stop_inline_message_live_location.rs | 4 +- .../all/stop_message_live_location.rs | 6 +-- src/requests/all/stop_poll.rs | 6 +-- src/requests/all/unban_chat_member.rs | 4 +- src/requests/all/unpin_chat_message.rs | 2 +- src/requests/all/upload_sticker_file.rs | 4 +- 69 files changed, 298 insertions(+), 300 deletions(-) diff --git a/src/requests/all/add_sticker_to_set.rs b/src/requests/all/add_sticker_to_set.rs index 3408f36b..d78571bc 100644 --- a/src/requests/all/add_sticker_to_set.rs +++ b/src/requests/all/add_sticker_to_set.rs @@ -19,12 +19,12 @@ use crate::{ pub struct AddStickerToSet { #[serde(skip_serializing)] bot: Bot, - user_id: i32, - name: String, + pub user_id: i32, + pub name: String, #[serde(flatten)] - sticker_type: StickerType, - emojis: String, - mask_position: Option<MaskPosition>, + pub sticker_type: StickerType, + pub emojis: String, + pub mask_position: Option<MaskPosition>, } #[async_trait::async_trait] diff --git a/src/requests/all/answer_callback_query.rs b/src/requests/all/answer_callback_query.rs index c74b1e88..254f2f07 100644 --- a/src/requests/all/answer_callback_query.rs +++ b/src/requests/all/answer_callback_query.rs @@ -21,11 +21,11 @@ use crate::{ pub struct AnswerCallbackQuery { #[serde(skip_serializing)] bot: Bot, - callback_query_id: String, - text: Option<String>, - show_alert: Option<bool>, - url: Option<String>, - cache_time: Option<i32>, + pub callback_query_id: String, + pub text: Option<String>, + pub show_alert: Option<bool>, + pub url: Option<String>, + pub cache_time: Option<i32>, } #[async_trait::async_trait] diff --git a/src/requests/all/answer_inline_query.rs b/src/requests/all/answer_inline_query.rs index dd1b6a38..f680df36 100644 --- a/src/requests/all/answer_inline_query.rs +++ b/src/requests/all/answer_inline_query.rs @@ -17,13 +17,13 @@ use crate::{ pub struct AnswerInlineQuery { #[serde(skip_serializing)] bot: Bot, - inline_query_id: String, - results: Vec<InlineQueryResult>, - cache_time: Option<i32>, - is_personal: Option<bool>, - next_offset: Option<String>, - switch_pm_text: Option<String>, - switch_pm_parameter: Option<String>, + pub inline_query_id: String, + pub results: Vec<InlineQueryResult>, + pub cache_time: Option<i32>, + pub is_personal: Option<bool>, + pub next_offset: Option<String>, + pub switch_pm_text: Option<String>, + pub switch_pm_parameter: Option<String>, } #[async_trait::async_trait] diff --git a/src/requests/all/answer_pre_checkout_query.rs b/src/requests/all/answer_pre_checkout_query.rs index 2ac4df42..d3ccc3d9 100644 --- a/src/requests/all/answer_pre_checkout_query.rs +++ b/src/requests/all/answer_pre_checkout_query.rs @@ -24,9 +24,9 @@ use crate::{ pub struct AnswerPreCheckoutQuery { #[serde(skip_serializing)] bot: Bot, - pre_checkout_query_id: String, - ok: bool, - error_message: Option<String>, + pub pre_checkout_query_id: String, + pub ok: bool, + pub error_message: Option<String>, } #[async_trait::async_trait] diff --git a/src/requests/all/answer_shipping_query.rs b/src/requests/all/answer_shipping_query.rs index be4d6662..020dce24 100644 --- a/src/requests/all/answer_shipping_query.rs +++ b/src/requests/all/answer_shipping_query.rs @@ -20,10 +20,10 @@ use crate::{ pub struct AnswerShippingQuery { #[serde(skip_serializing)] bot: Bot, - shipping_query_id: String, - ok: bool, - shipping_options: Option<Vec<ShippingOption>>, - error_message: Option<String>, + pub shipping_query_id: String, + pub ok: bool, + pub shipping_options: Option<Vec<ShippingOption>>, + pub error_message: Option<String>, } #[async_trait::async_trait] diff --git a/src/requests/all/create_new_sticker_set.rs b/src/requests/all/create_new_sticker_set.rs index d9c5e9da..9c2d1934 100644 --- a/src/requests/all/create_new_sticker_set.rs +++ b/src/requests/all/create_new_sticker_set.rs @@ -16,14 +16,14 @@ use crate::{ pub struct CreateNewStickerSet { #[serde(skip_serializing)] bot: Bot, - user_id: i32, - name: String, - title: String, + pub user_id: i32, + pub name: String, + pub title: String, #[serde(flatten)] - sticker_type: StickerType, - emojis: String, - contains_masks: Option<bool>, - mask_position: Option<MaskPosition>, + pub sticker_type: StickerType, + pub emojis: String, + pub contains_masks: Option<bool>, + pub mask_position: Option<MaskPosition>, } #[async_trait::async_trait] diff --git a/src/requests/all/delete_chat_photo.rs b/src/requests/all/delete_chat_photo.rs index 01439bfa..56291e04 100644 --- a/src/requests/all/delete_chat_photo.rs +++ b/src/requests/all/delete_chat_photo.rs @@ -17,7 +17,7 @@ use crate::{ pub struct DeleteChatPhoto { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, + pub chat_id: ChatId, } #[async_trait::async_trait] diff --git a/src/requests/all/delete_chat_sticker_set.rs b/src/requests/all/delete_chat_sticker_set.rs index 9fe228c5..739aa0f6 100644 --- a/src/requests/all/delete_chat_sticker_set.rs +++ b/src/requests/all/delete_chat_sticker_set.rs @@ -22,7 +22,7 @@ use crate::{ pub struct DeleteChatStickerSet { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, + pub chat_id: ChatId, } #[async_trait::async_trait] diff --git a/src/requests/all/delete_message.rs b/src/requests/all/delete_message.rs index 35ead60a..4fd58ec4 100644 --- a/src/requests/all/delete_message.rs +++ b/src/requests/all/delete_message.rs @@ -27,8 +27,8 @@ use crate::{ pub struct DeleteMessage { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - message_id: i32, + pub chat_id: ChatId, + pub message_id: i32, } #[async_trait::async_trait] diff --git a/src/requests/all/delete_sticker_from_set.rs b/src/requests/all/delete_sticker_from_set.rs index 59269f7a..ce1df04c 100644 --- a/src/requests/all/delete_sticker_from_set.rs +++ b/src/requests/all/delete_sticker_from_set.rs @@ -15,7 +15,7 @@ use crate::{ pub struct DeleteStickerFromSet { #[serde(skip_serializing)] bot: Bot, - sticker: String, + pub sticker: String, } #[async_trait::async_trait] diff --git a/src/requests/all/edit_inline_message_caption.rs b/src/requests/all/edit_inline_message_caption.rs index e777f17c..4e4ff938 100644 --- a/src/requests/all/edit_inline_message_caption.rs +++ b/src/requests/all/edit_inline_message_caption.rs @@ -19,10 +19,10 @@ use crate::{ pub struct EditInlineMessageCaption { #[serde(skip_serializing)] bot: Bot, - inline_message_id: String, - caption: Option<String>, - parse_mode: Option<ParseMode>, - reply_markup: Option<InlineKeyboardMarkup>, + pub inline_message_id: String, + pub caption: Option<String>, + pub parse_mode: Option<ParseMode>, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/edit_inline_message_live_location.rs b/src/requests/all/edit_inline_message_live_location.rs index 4b267427..eae40eb0 100644 --- a/src/requests/all/edit_inline_message_live_location.rs +++ b/src/requests/all/edit_inline_message_live_location.rs @@ -21,10 +21,10 @@ use crate::{ pub struct EditInlineMessageLiveLocation { #[serde(skip_serializing)] bot: Bot, - inline_message_id: String, - latitude: f32, - longitude: f32, - reply_markup: Option<InlineKeyboardMarkup>, + pub inline_message_id: String, + pub latitude: f32, + pub longitude: f32, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/edit_inline_message_media.rs b/src/requests/all/edit_inline_message_media.rs index ea0a4070..b874d5c4 100644 --- a/src/requests/all/edit_inline_message_media.rs +++ b/src/requests/all/edit_inline_message_media.rs @@ -24,9 +24,9 @@ use crate::{ pub struct EditInlineMessageMedia { #[serde(skip_serializing)] bot: Bot, - inline_message_id: String, - media: InputMedia, - reply_markup: Option<InlineKeyboardMarkup>, + pub inline_message_id: String, + pub media: InputMedia, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/edit_inline_message_reply_markup.rs b/src/requests/all/edit_inline_message_reply_markup.rs index cd96c686..632bac1d 100644 --- a/src/requests/all/edit_inline_message_reply_markup.rs +++ b/src/requests/all/edit_inline_message_reply_markup.rs @@ -20,8 +20,8 @@ use crate::{ pub struct EditInlineMessageReplyMarkup { #[serde(skip_serializing)] bot: Bot, - inline_message_id: String, - reply_markup: Option<InlineKeyboardMarkup>, + pub inline_message_id: String, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/edit_inline_message_text.rs b/src/requests/all/edit_inline_message_text.rs index 2b266314..a4716ca0 100644 --- a/src/requests/all/edit_inline_message_text.rs +++ b/src/requests/all/edit_inline_message_text.rs @@ -19,11 +19,11 @@ use crate::{ pub struct EditInlineMessageText { #[serde(skip_serializing)] bot: Bot, - inline_message_id: String, - text: String, - parse_mode: Option<ParseMode>, - disable_web_page_preview: Option<bool>, - reply_markup: Option<InlineKeyboardMarkup>, + pub inline_message_id: String, + pub text: String, + pub parse_mode: Option<ParseMode>, + pub disable_web_page_preview: Option<bool>, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/edit_message_caption.rs b/src/requests/all/edit_message_caption.rs index 9294af93..441f4931 100644 --- a/src/requests/all/edit_message_caption.rs +++ b/src/requests/all/edit_message_caption.rs @@ -19,11 +19,11 @@ use crate::{ pub struct EditMessageCaption { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - message_id: i32, - caption: Option<String>, - parse_mode: Option<ParseMode>, - reply_markup: Option<InlineKeyboardMarkup>, + pub chat_id: ChatId, + pub message_id: i32, + pub caption: Option<String>, + pub parse_mode: Option<ParseMode>, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/edit_message_live_location.rs b/src/requests/all/edit_message_live_location.rs index c5afd295..7d1f4779 100644 --- a/src/requests/all/edit_message_live_location.rs +++ b/src/requests/all/edit_message_live_location.rs @@ -21,11 +21,11 @@ use crate::{ pub struct EditMessageLiveLocation { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - message_id: i32, - latitude: f32, - longitude: f32, - reply_markup: Option<InlineKeyboardMarkup>, + pub chat_id: ChatId, + pub message_id: i32, + pub latitude: f32, + pub longitude: f32, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/edit_message_media.rs b/src/requests/all/edit_message_media.rs index 826244db..36080a96 100644 --- a/src/requests/all/edit_message_media.rs +++ b/src/requests/all/edit_message_media.rs @@ -22,10 +22,10 @@ use crate::{ pub struct EditMessageMedia { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - message_id: i32, - media: InputMedia, - reply_markup: Option<InlineKeyboardMarkup>, + pub chat_id: ChatId, + pub message_id: i32, + pub media: InputMedia, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/edit_message_reply_markup.rs b/src/requests/all/edit_message_reply_markup.rs index 66aab5bf..45f8f14d 100644 --- a/src/requests/all/edit_message_reply_markup.rs +++ b/src/requests/all/edit_message_reply_markup.rs @@ -19,9 +19,9 @@ use crate::{ pub struct EditMessageReplyMarkup { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - message_id: i32, - reply_markup: Option<InlineKeyboardMarkup>, + pub chat_id: ChatId, + pub message_id: i32, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/edit_message_text.rs b/src/requests/all/edit_message_text.rs index 12251313..4fcc0442 100644 --- a/src/requests/all/edit_message_text.rs +++ b/src/requests/all/edit_message_text.rs @@ -19,12 +19,12 @@ use crate::{ pub struct EditMessageText { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - message_id: i32, - text: String, - parse_mode: Option<ParseMode>, - disable_web_page_preview: Option<bool>, - reply_markup: Option<InlineKeyboardMarkup>, + pub chat_id: ChatId, + pub message_id: i32, + pub text: String, + pub parse_mode: Option<ParseMode>, + pub disable_web_page_preview: Option<bool>, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/export_chat_invite_link.rs b/src/requests/all/export_chat_invite_link.rs index 51a26437..70a5825a 100644 --- a/src/requests/all/export_chat_invite_link.rs +++ b/src/requests/all/export_chat_invite_link.rs @@ -31,7 +31,7 @@ use crate::{ pub struct ExportChatInviteLink { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, + pub chat_id: ChatId, } #[async_trait::async_trait] diff --git a/src/requests/all/forward_message.rs b/src/requests/all/forward_message.rs index feb9ec02..24783cdc 100644 --- a/src/requests/all/forward_message.rs +++ b/src/requests/all/forward_message.rs @@ -15,10 +15,10 @@ use crate::{ pub struct ForwardMessage { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - from_chat_id: ChatId, - disable_notification: Option<bool>, - message_id: i32, + pub chat_id: ChatId, + pub from_chat_id: ChatId, + pub disable_notification: Option<bool>, + pub message_id: i32, } #[async_trait::async_trait] diff --git a/src/requests/all/get_chat.rs b/src/requests/all/get_chat.rs index 11406776..e0552798 100644 --- a/src/requests/all/get_chat.rs +++ b/src/requests/all/get_chat.rs @@ -17,7 +17,7 @@ use crate::{ pub struct GetChat { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, + pub chat_id: ChatId, } #[async_trait::async_trait] diff --git a/src/requests/all/get_chat_administrators.rs b/src/requests/all/get_chat_administrators.rs index 06657ec5..44cb9c53 100644 --- a/src/requests/all/get_chat_administrators.rs +++ b/src/requests/all/get_chat_administrators.rs @@ -18,7 +18,7 @@ use crate::{ pub struct GetChatAdministrators { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, + pub chat_id: ChatId, } #[async_trait::async_trait] diff --git a/src/requests/all/get_chat_member.rs b/src/requests/all/get_chat_member.rs index 4ebe3f56..5883eea3 100644 --- a/src/requests/all/get_chat_member.rs +++ b/src/requests/all/get_chat_member.rs @@ -15,8 +15,8 @@ use crate::{ pub struct GetChatMember { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - user_id: i32, + pub chat_id: ChatId, + pub user_id: i32, } #[async_trait::async_trait] diff --git a/src/requests/all/get_chat_members_count.rs b/src/requests/all/get_chat_members_count.rs index 5c78596b..c9861215 100644 --- a/src/requests/all/get_chat_members_count.rs +++ b/src/requests/all/get_chat_members_count.rs @@ -15,7 +15,7 @@ use crate::{ pub struct GetChatMembersCount { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, + pub chat_id: ChatId, } #[async_trait::async_trait] diff --git a/src/requests/all/get_file.rs b/src/requests/all/get_file.rs index d2d0556c..d45b6013 100644 --- a/src/requests/all/get_file.rs +++ b/src/requests/all/get_file.rs @@ -31,7 +31,7 @@ use crate::{ pub struct GetFile { #[serde(skip_serializing)] bot: Bot, - file_id: String, + pub file_id: String, } #[async_trait::async_trait] diff --git a/src/requests/all/get_game_high_scores.rs b/src/requests/all/get_game_high_scores.rs index 1a43d63e..e6d325e0 100644 --- a/src/requests/all/get_game_high_scores.rs +++ b/src/requests/all/get_game_high_scores.rs @@ -24,8 +24,8 @@ pub struct GetGameHighScores { #[serde(skip_serializing)] bot: Bot, #[serde(flatten)] - target: TargetMessage, - user_id: i32, + pub target: TargetMessage, + pub user_id: i32, } #[async_trait::async_trait] diff --git a/src/requests/all/get_sticker_set.rs b/src/requests/all/get_sticker_set.rs index a8a83bea..185d721a 100644 --- a/src/requests/all/get_sticker_set.rs +++ b/src/requests/all/get_sticker_set.rs @@ -15,7 +15,7 @@ use crate::{ pub struct GetStickerSet { #[serde(skip_serializing)] bot: Bot, - name: String, + pub name: String, } #[async_trait::async_trait] diff --git a/src/requests/all/get_updates.rs b/src/requests/all/get_updates.rs index a9f4558d..9cb57a7a 100644 --- a/src/requests/all/get_updates.rs +++ b/src/requests/all/get_updates.rs @@ -22,10 +22,10 @@ use crate::{ pub struct GetUpdates { #[serde(skip_serializing)] pub(crate) bot: Bot, - pub(crate) offset: Option<i32>, - pub(crate) limit: Option<u8>, - pub(crate) timeout: Option<u32>, - pub(crate) allowed_updates: Option<Vec<AllowedUpdate>>, + pub offset: Option<i32>, + pub limit: Option<u8>, + pub timeout: Option<u32>, + pub allowed_updates: Option<Vec<AllowedUpdate>>, } #[async_trait::async_trait] diff --git a/src/requests/all/get_user_profile_photos.rs b/src/requests/all/get_user_profile_photos.rs index 663a07a4..a3105701 100644 --- a/src/requests/all/get_user_profile_photos.rs +++ b/src/requests/all/get_user_profile_photos.rs @@ -15,9 +15,9 @@ use crate::{ pub struct GetUserProfilePhotos { #[serde(skip_serializing)] bot: Bot, - user_id: i32, - offset: Option<i32>, - limit: Option<i32>, + pub user_id: i32, + pub offset: Option<i32>, + pub limit: Option<i32>, } #[async_trait::async_trait] diff --git a/src/requests/all/kick_chat_member.rs b/src/requests/all/kick_chat_member.rs index 31953949..50c5bb04 100644 --- a/src/requests/all/kick_chat_member.rs +++ b/src/requests/all/kick_chat_member.rs @@ -22,9 +22,9 @@ use crate::{ pub struct KickChatMember { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - user_id: i32, - until_date: Option<i32>, + pub chat_id: ChatId, + pub user_id: i32, + pub until_date: Option<i32>, } #[async_trait::async_trait] diff --git a/src/requests/all/leave_chat.rs b/src/requests/all/leave_chat.rs index d0411efb..1290fa5c 100644 --- a/src/requests/all/leave_chat.rs +++ b/src/requests/all/leave_chat.rs @@ -15,7 +15,7 @@ use crate::{ pub struct LeaveChat { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, + pub chat_id: ChatId, } #[async_trait::async_trait] diff --git a/src/requests/all/pin_chat_message.rs b/src/requests/all/pin_chat_message.rs index ae1f3227..9a0655b1 100644 --- a/src/requests/all/pin_chat_message.rs +++ b/src/requests/all/pin_chat_message.rs @@ -19,9 +19,9 @@ use crate::{ pub struct PinChatMessage { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - message_id: i32, - disable_notification: Option<bool>, + pub chat_id: ChatId, + pub message_id: i32, + pub disable_notification: Option<bool>, } #[async_trait::async_trait] diff --git a/src/requests/all/promote_chat_member.rs b/src/requests/all/promote_chat_member.rs index 468b3c48..cc1beef6 100644 --- a/src/requests/all/promote_chat_member.rs +++ b/src/requests/all/promote_chat_member.rs @@ -19,16 +19,16 @@ use crate::{ pub struct PromoteChatMember { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - user_id: i32, - can_change_info: Option<bool>, - can_post_messages: Option<bool>, - can_edit_messages: Option<bool>, - can_delete_messages: Option<bool>, - can_invite_users: Option<bool>, - can_restrict_members: Option<bool>, - can_pin_messages: Option<bool>, - can_promote_members: Option<bool>, + pub chat_id: ChatId, + pub user_id: i32, + pub can_change_info: Option<bool>, + pub can_post_messages: Option<bool>, + pub can_edit_messages: Option<bool>, + pub can_delete_messages: Option<bool>, + pub can_invite_users: Option<bool>, + pub can_restrict_members: Option<bool>, + pub can_pin_messages: Option<bool>, + pub can_promote_members: Option<bool>, } #[async_trait::async_trait] diff --git a/src/requests/all/restrict_chat_member.rs b/src/requests/all/restrict_chat_member.rs index 6b825b91..5ce1ebab 100644 --- a/src/requests/all/restrict_chat_member.rs +++ b/src/requests/all/restrict_chat_member.rs @@ -19,10 +19,10 @@ use crate::{ pub struct RestrictChatMember { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - user_id: i32, - permissions: ChatPermissions, - until_date: Option<i32>, + pub chat_id: ChatId, + pub user_id: i32, + pub permissions: ChatPermissions, + pub until_date: Option<i32>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_audio.rs b/src/requests/all/send_audio.rs index dc61458c..125ed8c0 100644 --- a/src/requests/all/send_audio.rs +++ b/src/requests/all/send_audio.rs @@ -23,17 +23,17 @@ use crate::{ pub struct SendAudio { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - audio: InputFile, - caption: Option<String>, - parse_mode: Option<ParseMode>, - duration: Option<i32>, - performer: Option<String>, - title: Option<String>, - thumb: Option<InputFile>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub audio: InputFile, + pub caption: Option<String>, + pub parse_mode: Option<ParseMode>, + pub duration: Option<i32>, + pub performer: Option<String>, + pub title: Option<String>, + pub thumb: Option<InputFile>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_chat_action.rs b/src/requests/all/send_chat_action.rs index 5fe853b2..82c6328e 100644 --- a/src/requests/all/send_chat_action.rs +++ b/src/requests/all/send_chat_action.rs @@ -29,8 +29,8 @@ use crate::{ pub struct SendChatAction { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - action: SendChatActionKind, + pub chat_id: ChatId, + pub action: SendChatActionKind, } /// A type of action used in [`SendChatAction`]. diff --git a/src/requests/all/send_contact.rs b/src/requests/all/send_contact.rs index ef3ff034..61b59e4d 100644 --- a/src/requests/all/send_contact.rs +++ b/src/requests/all/send_contact.rs @@ -15,14 +15,14 @@ use crate::{ pub struct SendContact { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - phone_number: String, - first_name: String, - last_name: Option<String>, - vcard: Option<String>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub phone_number: String, + pub first_name: String, + pub last_name: Option<String>, + pub vcard: Option<String>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_dice.rs b/src/requests/all/send_dice.rs index 663d7001..ad3cb16a 100644 --- a/src/requests/all/send_dice.rs +++ b/src/requests/all/send_dice.rs @@ -15,13 +15,12 @@ use crate::{ pub struct SendDice { #[serde(skip_serializing)] bot: Bot, - - chat_id: ChatId, + pub chat_id: ChatId, #[serde(flatten)] - emoji: Option<DiceEmoji>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub emoji: Option<DiceEmoji>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_document.rs b/src/requests/all/send_document.rs index e865a008..7357341d 100644 --- a/src/requests/all/send_document.rs +++ b/src/requests/all/send_document.rs @@ -18,14 +18,14 @@ use crate::{ pub struct SendDocument { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - document: InputFile, - thumb: Option<InputFile>, - caption: Option<String>, - parse_mode: Option<ParseMode>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub document: InputFile, + pub thumb: Option<InputFile>, + pub caption: Option<String>, + pub parse_mode: Option<ParseMode>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_game.rs b/src/requests/all/send_game.rs index 03a0b0e2..876cabba 100644 --- a/src/requests/all/send_game.rs +++ b/src/requests/all/send_game.rs @@ -15,11 +15,11 @@ use crate::{ pub struct SendGame { #[serde(skip_serializing)] bot: Bot, - chat_id: i32, - game_short_name: String, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<InlineKeyboardMarkup>, + pub chat_id: i32, + pub game_short_name: String, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_invoice.rs b/src/requests/all/send_invoice.rs index 8466cdba..0469e25f 100644 --- a/src/requests/all/send_invoice.rs +++ b/src/requests/all/send_invoice.rs @@ -15,29 +15,29 @@ use crate::{ pub struct SendInvoice { #[serde(skip_serializing)] bot: Bot, - chat_id: i32, - title: String, - description: String, - payload: String, - provider_token: String, - start_parameter: String, - currency: String, - prices: Vec<LabeledPrice>, - provider_data: Option<String>, - photo_url: Option<String>, - photo_size: Option<i32>, - photo_width: Option<i32>, - photo_height: Option<i32>, - need_name: Option<bool>, - need_phone_number: Option<bool>, - need_email: Option<bool>, - need_shipping_address: Option<bool>, - send_phone_number_to_provider: Option<bool>, - send_email_to_provider: Option<bool>, - is_flexible: Option<bool>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<InlineKeyboardMarkup>, + pub chat_id: i32, + pub title: String, + pub description: String, + pub payload: String, + pub provider_token: String, + pub start_parameter: String, + pub currency: String, + pub prices: Vec<LabeledPrice>, + pub provider_data: Option<String>, + pub photo_url: Option<String>, + pub photo_size: Option<i32>, + pub photo_width: Option<i32>, + pub photo_height: Option<i32>, + pub need_name: Option<bool>, + pub need_phone_number: Option<bool>, + pub need_email: Option<bool>, + pub need_shipping_address: Option<bool>, + pub send_phone_number_to_provider: Option<bool>, + pub send_email_to_provider: Option<bool>, + pub is_flexible: Option<bool>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_location.rs b/src/requests/all/send_location.rs index 20201ad1..a55d3cc5 100644 --- a/src/requests/all/send_location.rs +++ b/src/requests/all/send_location.rs @@ -15,13 +15,13 @@ use crate::{ pub struct SendLocation { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - latitude: f32, - longitude: f32, - live_period: Option<i64>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub latitude: f32, + pub longitude: f32, + pub live_period: Option<i64>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_media_group.rs b/src/requests/all/send_media_group.rs index e7adb68a..2c9f422a 100644 --- a/src/requests/all/send_media_group.rs +++ b/src/requests/all/send_media_group.rs @@ -15,10 +15,10 @@ use crate::{ pub struct SendMediaGroup { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - media: Vec<InputMedia>, // TODO: InputMediaPhoto and InputMediaVideo - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, + pub chat_id: ChatId, + pub media: Vec<InputMedia>, // TODO: InputMediaPhoto and InputMediaVideo + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_photo.rs b/src/requests/all/send_photo.rs index 42ad8e6f..e6126fcf 100644 --- a/src/requests/all/send_photo.rs +++ b/src/requests/all/send_photo.rs @@ -15,13 +15,13 @@ use crate::{ pub struct SendPhoto { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - photo: InputFile, - caption: Option<String>, - parse_mode: Option<ParseMode>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub photo: InputFile, + pub caption: Option<String>, + pub parse_mode: Option<ParseMode>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_poll.rs b/src/requests/all/send_poll.rs index 3dd412a1..699362c9 100644 --- a/src/requests/all/send_poll.rs +++ b/src/requests/all/send_poll.rs @@ -15,21 +15,21 @@ use crate::{ pub struct SendPoll { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - question: String, - options: Vec<String>, - is_anonymous: Option<bool>, - poll_type: Option<PollType>, - allows_multiple_answers: Option<bool>, - correct_option_id: Option<i32>, - explanation: Option<String>, - explanation_parse_mode: Option<ParseMode>, - open_period: Option<i32>, - close_date: Option<i32>, - is_closed: Option<bool>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub question: String, + pub options: Vec<String>, + pub is_anonymous: Option<bool>, + pub poll_type: Option<PollType>, + pub allows_multiple_answers: Option<bool>, + pub correct_option_id: Option<i32>, + pub explanation: Option<String>, + pub explanation_parse_mode: Option<ParseMode>, + pub open_period: Option<i32>, + pub close_date: Option<i32>, + pub is_closed: Option<bool>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_sticker.rs b/src/requests/all/send_sticker.rs index dd25c9bb..8c9f0b00 100644 --- a/src/requests/all/send_sticker.rs +++ b/src/requests/all/send_sticker.rs @@ -17,11 +17,11 @@ use crate::{ pub struct SendSticker { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - sticker: InputFile, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub sticker: InputFile, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_venue.rs b/src/requests/all/send_venue.rs index 513ece7d..6dacb74e 100644 --- a/src/requests/all/send_venue.rs +++ b/src/requests/all/send_venue.rs @@ -15,16 +15,16 @@ use crate::{ pub struct SendVenue { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - latitude: f32, - longitude: f32, - title: String, - address: String, - foursquare_id: Option<String>, - foursquare_type: Option<String>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub latitude: f32, + pub longitude: f32, + pub title: String, + pub address: String, + pub foursquare_id: Option<String>, + pub foursquare_type: Option<String>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_video.rs b/src/requests/all/send_video.rs index 3f218f10..4c84e52d 100644 --- a/src/requests/all/send_video.rs +++ b/src/requests/all/send_video.rs @@ -19,18 +19,18 @@ use crate::{ pub struct SendVideo { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - video: InputFile, - duration: Option<i32>, - width: Option<i32>, - height: Option<i32>, - thumb: Option<InputFile>, - caption: Option<String>, - parse_mode: Option<ParseMode>, - supports_streaming: Option<bool>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub video: InputFile, + pub duration: Option<i32>, + pub width: Option<i32>, + pub height: Option<i32>, + pub thumb: Option<InputFile>, + pub caption: Option<String>, + pub parse_mode: Option<ParseMode>, + pub supports_streaming: Option<bool>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_video_note.rs b/src/requests/all/send_video_note.rs index 9a0e07dd..7ae4ae82 100644 --- a/src/requests/all/send_video_note.rs +++ b/src/requests/all/send_video_note.rs @@ -18,14 +18,14 @@ use crate::{ pub struct SendVideoNote { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - video_note: InputFile, - duration: Option<i32>, - length: Option<i32>, - thumb: Option<InputFile>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub video_note: InputFile, + pub duration: Option<i32>, + pub length: Option<i32>, + pub thumb: Option<InputFile>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/send_voice.rs b/src/requests/all/send_voice.rs index 6bfc301a..20ca93c2 100644 --- a/src/requests/all/send_voice.rs +++ b/src/requests/all/send_voice.rs @@ -24,14 +24,14 @@ use crate::{ pub struct SendVoice { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - voice: InputFile, - caption: Option<String>, - parse_mode: Option<ParseMode>, - duration: Option<i32>, - disable_notification: Option<bool>, - reply_to_message_id: Option<i32>, - reply_markup: Option<ReplyMarkup>, + pub chat_id: ChatId, + pub voice: InputFile, + pub caption: Option<String>, + pub parse_mode: Option<ParseMode>, + pub duration: Option<i32>, + pub disable_notification: Option<bool>, + pub reply_to_message_id: Option<i32>, + pub reply_markup: Option<ReplyMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/set_chat_administrator_custom_title.rs b/src/requests/all/set_chat_administrator_custom_title.rs index a3211811..bbc7c251 100644 --- a/src/requests/all/set_chat_administrator_custom_title.rs +++ b/src/requests/all/set_chat_administrator_custom_title.rs @@ -16,9 +16,9 @@ use crate::{ pub struct SetChatAdministratorCustomTitle { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - user_id: i32, - custom_title: String, + pub chat_id: ChatId, + pub user_id: i32, + pub custom_title: String, } #[async_trait::async_trait] diff --git a/src/requests/all/set_chat_description.rs b/src/requests/all/set_chat_description.rs index 092c495b..a9c98bc9 100644 --- a/src/requests/all/set_chat_description.rs +++ b/src/requests/all/set_chat_description.rs @@ -19,8 +19,8 @@ use crate::{ pub struct SetChatDescription { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - description: Option<String>, + pub chat_id: ChatId, + pub description: Option<String>, } #[async_trait::async_trait] diff --git a/src/requests/all/set_chat_permissions.rs b/src/requests/all/set_chat_permissions.rs index aaa1881b..b2233f9bc 100644 --- a/src/requests/all/set_chat_permissions.rs +++ b/src/requests/all/set_chat_permissions.rs @@ -18,8 +18,8 @@ use crate::{ pub struct SetChatPermissions { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - permissions: ChatPermissions, + pub chat_id: ChatId, + pub permissions: ChatPermissions, } #[async_trait::async_trait] diff --git a/src/requests/all/set_chat_photo.rs b/src/requests/all/set_chat_photo.rs index dcc5febc..1572cc03 100644 --- a/src/requests/all/set_chat_photo.rs +++ b/src/requests/all/set_chat_photo.rs @@ -18,8 +18,8 @@ use crate::{ pub struct SetChatPhoto { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - photo: InputFile, + pub chat_id: ChatId, + pub photo: InputFile, } #[async_trait::async_trait] diff --git a/src/requests/all/set_chat_sticker_set.rs b/src/requests/all/set_chat_sticker_set.rs index 010a10f5..04b18e61 100644 --- a/src/requests/all/set_chat_sticker_set.rs +++ b/src/requests/all/set_chat_sticker_set.rs @@ -19,8 +19,8 @@ use crate::{ pub struct SetChatStickerSet { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - sticker_set_name: String, + pub chat_id: ChatId, + pub sticker_set_name: String, } #[async_trait::async_trait] diff --git a/src/requests/all/set_chat_title.rs b/src/requests/all/set_chat_title.rs index 7d6ae6d1..3b0e92c8 100644 --- a/src/requests/all/set_chat_title.rs +++ b/src/requests/all/set_chat_title.rs @@ -18,8 +18,8 @@ use crate::{ pub struct SetChatTitle { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - title: String, + pub chat_id: ChatId, + pub title: String, } #[async_trait::async_trait] diff --git a/src/requests/all/set_game_score.rs b/src/requests/all/set_game_score.rs index 8e429e3a..5a467fe9 100644 --- a/src/requests/all/set_game_score.rs +++ b/src/requests/all/set_game_score.rs @@ -24,11 +24,11 @@ pub struct SetGameScore { #[serde(skip_serializing)] bot: Bot, #[serde(flatten)] - target: TargetMessage, - user_id: i32, - score: i32, - force: Option<bool>, - disable_edit_message: Option<bool>, + pub target: TargetMessage, + pub user_id: i32, + pub score: i32, + pub force: Option<bool>, + pub disable_edit_message: Option<bool>, } #[async_trait::async_trait] diff --git a/src/requests/all/set_my_commands.rs b/src/requests/all/set_my_commands.rs index 831f9705..c2447c67 100644 --- a/src/requests/all/set_my_commands.rs +++ b/src/requests/all/set_my_commands.rs @@ -15,8 +15,7 @@ use crate::{ pub struct SetMyCommands { #[serde(skip_serializing)] bot: Bot, - - commands: Vec<BotCommand>, + pub commands: Vec<BotCommand>, } #[async_trait::async_trait] diff --git a/src/requests/all/set_sticker_position_in_set.rs b/src/requests/all/set_sticker_position_in_set.rs index 4ed78551..6ca7e701 100644 --- a/src/requests/all/set_sticker_position_in_set.rs +++ b/src/requests/all/set_sticker_position_in_set.rs @@ -16,8 +16,8 @@ use crate::{ pub struct SetStickerPositionInSet { #[serde(skip_serializing)] bot: Bot, - sticker: String, - position: i32, + pub sticker: String, + pub position: i32, } #[async_trait::async_trait] diff --git a/src/requests/all/set_sticker_set_thumb.rs b/src/requests/all/set_sticker_set_thumb.rs index 1f84aacd..343f270a 100644 --- a/src/requests/all/set_sticker_set_thumb.rs +++ b/src/requests/all/set_sticker_set_thumb.rs @@ -16,9 +16,9 @@ use crate::{ pub struct SetStickerSetThumb { #[serde(skip_serializing)] bot: Bot, - name: String, - user_id: i32, - thumb: Option<InputFile>, + pub name: String, + pub user_id: i32, + pub thumb: Option<InputFile>, } #[async_trait::async_trait] diff --git a/src/requests/all/set_webhook.rs b/src/requests/all/set_webhook.rs index c2aff792..4a1f565a 100644 --- a/src/requests/all/set_webhook.rs +++ b/src/requests/all/set_webhook.rs @@ -28,10 +28,10 @@ use crate::{ pub struct SetWebhook { #[serde(skip_serializing)] bot: Bot, - url: String, - certificate: Option<InputFile>, - max_connections: Option<i32>, - allowed_updates: Option<Vec<AllowedUpdate>>, + pub url: String, + pub certificate: Option<InputFile>, + pub max_connections: Option<i32>, + pub allowed_updates: Option<Vec<AllowedUpdate>>, } #[async_trait::async_trait] diff --git a/src/requests/all/stop_inline_message_live_location.rs b/src/requests/all/stop_inline_message_live_location.rs index 40fb5604..55c23038 100644 --- a/src/requests/all/stop_inline_message_live_location.rs +++ b/src/requests/all/stop_inline_message_live_location.rs @@ -20,8 +20,8 @@ use crate::{ pub struct StopInlineMessageLiveLocation { #[serde(skip_serializing)] bot: Bot, - inline_message_id: String, - reply_markup: Option<InlineKeyboardMarkup>, + pub inline_message_id: String, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/stop_message_live_location.rs b/src/requests/all/stop_message_live_location.rs index 892492ea..e07db923 100644 --- a/src/requests/all/stop_message_live_location.rs +++ b/src/requests/all/stop_message_live_location.rs @@ -20,9 +20,9 @@ use crate::{ pub struct StopMessageLiveLocation { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - message_id: i32, - reply_markup: Option<InlineKeyboardMarkup>, + pub chat_id: ChatId, + pub message_id: i32, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/stop_poll.rs b/src/requests/all/stop_poll.rs index 946b4760..c60bdb50 100644 --- a/src/requests/all/stop_poll.rs +++ b/src/requests/all/stop_poll.rs @@ -15,9 +15,9 @@ use crate::{ pub struct StopPoll { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - message_id: i32, - reply_markup: Option<InlineKeyboardMarkup>, + pub chat_id: ChatId, + pub message_id: i32, + pub reply_markup: Option<InlineKeyboardMarkup>, } #[async_trait::async_trait] diff --git a/src/requests/all/unban_chat_member.rs b/src/requests/all/unban_chat_member.rs index 5aee625c..ba206733 100644 --- a/src/requests/all/unban_chat_member.rs +++ b/src/requests/all/unban_chat_member.rs @@ -18,8 +18,8 @@ use crate::{ pub struct UnbanChatMember { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, - user_id: i32, + pub chat_id: ChatId, + pub user_id: i32, } #[async_trait::async_trait] diff --git a/src/requests/all/unpin_chat_message.rs b/src/requests/all/unpin_chat_message.rs index 15e76a99..1ce74c30 100644 --- a/src/requests/all/unpin_chat_message.rs +++ b/src/requests/all/unpin_chat_message.rs @@ -19,7 +19,7 @@ use crate::{ pub struct UnpinChatMessage { #[serde(skip_serializing)] bot: Bot, - chat_id: ChatId, + pub chat_id: ChatId, } #[async_trait::async_trait] diff --git a/src/requests/all/upload_sticker_file.rs b/src/requests/all/upload_sticker_file.rs index b09b143f..9f5df548 100644 --- a/src/requests/all/upload_sticker_file.rs +++ b/src/requests/all/upload_sticker_file.rs @@ -20,8 +20,8 @@ use crate::{ pub struct UploadStickerFile { #[serde(skip_serializing)] bot: Bot, - user_id: i32, - png_sticker: InputFile, + pub user_id: i32, + pub png_sticker: InputFile, } #[async_trait::async_trait] impl Request for UploadStickerFile { From 57867e7c6726deb3db4945cb882758a94a4dea49 Mon Sep 17 00:00:00 2001 From: Waffle <waffle.lapkin@gmail.com> Date: Sun, 16 Aug 2020 21:31:55 +0300 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf1b58fa..1e0364ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added `RequestError::Io(io::Error)` to wrap I/O error those can happen while sending files to telegram - Change `StickerType`: instead of newtypes (`Png(InputFile)`) use structs (`Png { png_sticker: InputFile }`), add `StickerType::{png,tgs}` constructors +- Make all fields of all methods `pub` ### Removed