Skip to content

Commit

Permalink
Bot API 8.2 (#243)
Browse files Browse the repository at this point in the history
* Bot API 8.2
  • Loading branch information
ayrat555 authored Jan 5, 2025
1 parent e627295 commit 8f028b4
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/api_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1235,11 +1235,38 @@ pub struct DeleteStickerSetParams {
pub struct SendGiftParams {
pub user_id: u64,
pub gift_id: String,
pub pay_for_upgrade: Option<bool>,
pub text: Option<String>,
pub text_parse_mode: Option<ParseMode>,
pub text_entities: Option<Vec<MessageEntity>>,
}

#[apply(apistruct!)]
#[derive(Eq)]
pub struct VerifyUserParams {
pub user_id: u64,
pub custom_description: Option<String>,
}

#[apply(apistruct!)]
#[derive(Eq)]
pub struct VerifyChatParams {
pub chat_id: ChatId,
pub custom_description: Option<String>,
}

#[apply(apistruct!)]
#[derive(Eq)]
pub struct RemoveUserVerificationParams {
pub user_id: u64,
}

#[apply(apistruct!)]
#[derive(Eq)]
pub struct RemoveChatVerificationParams {
pub chat_id: ChatId,
}

#[apply(apistruct!)]
pub struct AnswerInlineQueryParams {
pub inline_query_id: String,
Expand Down
6 changes: 6 additions & 0 deletions src/objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,7 @@ pub struct Gift {
pub id: String,
pub stricker: Sticker,
pub star_count: u32,
pub upgrade_star_count: Option<u32>,
pub total_count: Option<u32>,
pub remaining_count: Option<u32>,
}
Expand Down Expand Up @@ -1398,6 +1399,11 @@ pub struct InlineQueryResultArticle {
pub input_message_content: InputMessageContent,
pub reply_markup: Option<InlineKeyboardMarkup>,
pub url: Option<String>,
#[doc(hidden)]
#[deprecated(
since = "0.38.0",
note = "Please pass an empty string as `url` instead"
)]
pub hide_url: Option<bool>,
pub description: Option<String>,
pub thumbnail_url: Option<String>,
Expand Down
4 changes: 4 additions & 0 deletions src/trait_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,10 @@ where
request!(deleteStickerSet, bool);
request_nb!(getAvailableGifts, Gifts);
request!(sendGift, bool);
request!(verifyUser, bool);
request!(verifyChat, bool);
request!(removeUserVerification, bool);
request!(removeChatVerification, bool);
request!(sendInvoice, Message);
request!(createInvoiceLink, String);
request!(answerShippingQuery, bool);
Expand Down
4 changes: 4 additions & 0 deletions src/trait_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,10 @@ pub trait TelegramApi {
request!(deleteStickerSet, bool);
request_nb!(getAvailableGifts, Gifts);
request!(sendGift, bool);
request!(verifyUser, bool);
request!(verifyChat, bool);
request!(removeUserVerification, bool);
request!(removeChatVerification, bool);
request!(sendInvoice, Message);
request!(createInvoiceLink, String);
request!(answerShippingQuery, bool);
Expand Down

0 comments on commit 8f028b4

Please sign in to comment.