diff --git a/README.md b/README.md index 1fd262a..53516f7 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ > [Telegram Group](https://t.me/gotelegrambotui) -> Supports Bot API version: [8.1](https://core.telegram.org/bots/api#december-4-2024) from December 4, 2024 +> Supports Bot API version: [8.2](https://core.telegram.org/bots/api#january-1-2025) from January 1, 2025 It's a Go zero-dependencies telegram bot framework diff --git a/methods.go b/methods.go index c4d8018..32efcd5 100644 --- a/methods.go +++ b/methods.go @@ -915,3 +915,31 @@ func (b *Bot) SendGift(ctx context.Context, params *SendGiftParams) (bool, error err := b.rawRequest(ctx, "sendGift", params, &result) return result, err } + +// VerifyUser https://core.telegram.org/bots/api#verifyuser +func (b *Bot) VerifyUser(ctx context.Context, params *VerifyUserParams) (bool, error) { + var result bool + err := b.rawRequest(ctx, "verifyUser", params, &result) + return result, err +} + +// VerifyChat https://core.telegram.org/bots/api#verifychat +func (b *Bot) VerifyChat(ctx context.Context, params *VerifyChatParams) (bool, error) { + var result bool + err := b.rawRequest(ctx, "verifyChat", params, &result) + return result, err +} + +// RemoveUserVerification https://core.telegram.org/bots/api#removeuserverification +func (b *Bot) RemoveUserVerification(ctx context.Context, params *RemoveUserVerificationParams) (bool, error) { + var result bool + err := b.rawRequest(ctx, "removeUserVerification", params, &result) + return result, err +} + +// RemoveChatVerification https://core.telegram.org/bots/api#removechatverification +func (b *Bot) RemoveChatVerification(ctx context.Context, params *RemoveChatVerificationParams) (bool, error) { + var result bool + err := b.rawRequest(ctx, "removeChatVerification", params, &result) + return result, err +} diff --git a/methods_params.go b/methods_params.go index be33901..01ef050 100644 --- a/methods_params.go +++ b/methods_params.go @@ -1032,7 +1032,30 @@ type GetGameHighScoresParams struct { type SendGiftParams struct { UserID int64 `json:"user_id"` GiftID string `json:"gift_id"` + PayForUpgrade bool `json:"pay_for_upgrade,omitempty"` Text string `json:"text,omitempty"` TextParseMode models.ParseMode `json:"text_parse_mode,omitempty"` TextEntities []models.MessageEntity `json:"text_entities,omitempty"` } + +// VerifyUserParams https://core.telegram.org/bots/api#verifyuser +type VerifyUserParams struct { + UserID int64 `json:"user_id"` + CustomDescription string `json:"custom_description,omitempty"` +} + +// VerifyChatParams https://core.telegram.org/bots/api#verifychat +type VerifyChatParams struct { + ChatID any `json:"chat_id"` + CustomDescription string `json:"custom_description,omitempty"` +} + +// RemoveUserVerificationParams https://core.telegram.org/bots/api#removeuserverification +type RemoveUserVerificationParams struct { + UserID int64 `json:"user_id"` +} + +// RemoveChatVerificationParams https://core.telegram.org/bots/api#removechatverification +type RemoveChatVerificationParams struct { + ChatID any `json:"chat_id"` +} diff --git a/models/gift.go b/models/gift.go index 255465e..5f93601 100644 --- a/models/gift.go +++ b/models/gift.go @@ -7,9 +7,10 @@ type Gifts struct { // Gift https://core.telegram.org/bots/api#gift type Gift struct { - ID string `json:"id"` - Sticker Sticker `json:"sticker"` - StarCount int `json:"star_count"` - TotalCount int `json:"total_count,omitempty"` - RemainingCount int `json:"remaining_count,omitempty"` + ID string `json:"id"` + Sticker Sticker `json:"sticker"` + StarCount int `json:"star_count"` + UpgradeStarCount int `json:"upgrade_star_count,omitempty"` + TotalCount int `json:"total_count,omitempty"` + RemainingCount int `json:"remaining_count,omitempty"` } diff --git a/models/inline_query.go b/models/inline_query.go index 6fa256e..8a889b6 100644 --- a/models/inline_query.go +++ b/models/inline_query.go @@ -46,7 +46,6 @@ type InlineQueryResultArticle struct { InputMessageContent InputMessageContent `json:"input_message_content,omitempty"` ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"` URL string `json:"url,omitempty"` - HideURL bool `json:"hide_url,omitempty"` Description string `json:"description,omitempty"` ThumbnailURL string `json:"thumbnail_url,omitempty"` ThumbnailWidth int `json:"thumbnail_width,omitempty"`