diff --git a/src/api_params.rs b/src/api_params.rs index 5d078b0..d63fab4 100644 --- a/src/api_params.rs +++ b/src/api_params.rs @@ -1477,6 +1477,16 @@ pub struct AnswerWebAppQueryParams { pub result: InlineQueryResult, } +#[apply(apistruct!)] +pub struct SavePreparedInlineMessage { + pub user_id: u64, + pub result: InlineQueryResult, + pub allow_user_chats: Option, + pub allow_bot_chats: Option, + pub allow_group_chats: Option, + pub allow_channel_chats: Option, +} + #[apply(apistruct!)] #[derive(Eq)] pub struct SetChatMenuButtonParams { diff --git a/src/objects.rs b/src/objects.rs index 5b672d6..910ef0f 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -1732,6 +1732,12 @@ pub struct ChosenInlineResult { pub query: String, } +#[apply(apistruct!)] +pub struct PreparedInlineMessage { + pub id: String, + pub expiration_date: u64, +} + #[apply(apistruct!)] #[derive(Eq)] pub struct LabeledPrice { diff --git a/src/trait_async.rs b/src/trait_async.rs index b0708fc..01d7dbe 100644 --- a/src/trait_async.rs +++ b/src/trait_async.rs @@ -10,8 +10,8 @@ use crate::objects::{ BotCommand, BotDescription, BotName, BotShortDescription, BusinessConnection, ChatAdministratorRights, ChatFullInfo, ChatInviteLink, ChatMember, File as FileObject, ForumTopic, GameHighScore, InputSticker, MenuButton, Message, MessageId, Poll, - SentWebAppMessage, StarTransactions, Sticker, StickerSet, Update, User, UserChatBoosts, - UserProfilePhotos, WebhookInfo, + PreparedInlineMessage, SentWebAppMessage, StarTransactions, Sticker, StickerSet, Update, User, + UserChatBoosts, UserProfilePhotos, WebhookInfo, }; use crate::response::{MessageOrBool, MethodResponse}; @@ -639,6 +639,7 @@ where request!(setMyDefaultAdministratorRights, bool); request!(getMyDefaultAdministratorRights, ChatAdministratorRights); request!(answerWebAppQuery, SentWebAppMessage); + request!(savePreparedInlineMessage, PreparedInlineMessage); request!(setChatMenuButton, bool); request!(getChatMenuButton, MenuButton); request!(unpinAllGeneralForumTopicMessages, bool); diff --git a/src/trait_sync.rs b/src/trait_sync.rs index c8d6430..10434fa 100644 --- a/src/trait_sync.rs +++ b/src/trait_sync.rs @@ -10,8 +10,8 @@ use crate::objects::{ BotCommand, BotDescription, BotName, BotShortDescription, BusinessConnection, ChatAdministratorRights, ChatFullInfo, ChatInviteLink, ChatMember, File as FileObject, ForumTopic, GameHighScore, InputSticker, MenuButton, Message, MessageId, Poll, - SentWebAppMessage, StarTransactions, Sticker, StickerSet, Update, User, UserChatBoosts, - UserProfilePhotos, WebhookInfo, + PreparedInlineMessage, SentWebAppMessage, StarTransactions, Sticker, StickerSet, Update, User, + UserChatBoosts, UserProfilePhotos, WebhookInfo, }; use crate::response::{MessageOrBool, MethodResponse}; @@ -605,6 +605,7 @@ pub trait TelegramApi { request!(setMyDefaultAdministratorRights, bool); request!(getMyDefaultAdministratorRights, ChatAdministratorRights); request!(answerWebAppQuery, SentWebAppMessage); + request!(savePreparedInlineMessage, PreparedInlineMessage); request!(setChatMenuButton, bool); request!(getChatMenuButton, MenuButton); request!(unpinAllGeneralForumTopicMessages, bool);