(new): v1.2 release
Golang lint / lint (push) Successful in 11m32s

This commit is contained in:
2026-08-19 14:58:25 +03:00
parent f03a081ed6
commit 29b208eeec
79 changed files with 7301 additions and 2060 deletions
+49 -18
View File
@@ -6,9 +6,14 @@ import "context"
// Since: Bot API 1.4
// See https://core.telegram.org/bots/api#getuserprofilephotos
type GetUserProfilePhotos struct {
// UserID Required. Unique identifier of the target user
UserID int64 `json:"user_id"`
Offset int `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
// Offset Optional. Sequential number of the first photo to be returned. By default, all photos are
// returned.
Offset int `json:"offset,omitempty"`
// Limit Optional. Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults
// to 100.
Limit int `json:"limit,omitempty"`
}
// GetUserProfilePhotos returns a list of profile pictures for a user.
@@ -32,9 +37,14 @@ func (api *API) GetUserProfilePhotosWithContext(ctx context.Context, params GetU
// Since: Bot API 9.3
// See https://core.telegram.org/bots/api#getuserprofileaudios
type GetUserProfileAudios struct {
// UserID Required. Unique identifier of the target user
UserID int64 `json:"user_id"`
Offset int `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
// Offset Optional. Sequential number of the first audio to be returned. By default, all audios are
// returned.
Offset int `json:"offset,omitempty"`
// Limit Optional. Limits the number of audios to be retrieved. Values between 1-100 are accepted. Defaults
// to 100.
Limit int `json:"limit,omitempty"`
}
// GetUserProfileAudios returns a list of profile audios for a user.
@@ -58,9 +68,13 @@ func (api *API) GetUserProfileAudiosWithContext(ctx context.Context, params GetU
// Since: Bot API 8.0
// See https://core.telegram.org/bots/api#setuseremojistatus
type SetUserEmojiStatus struct {
UserID int64 `json:"user_id"`
EmojiID string `json:"emoji_status_custom_emoji_id,omitempty"`
ExpirationDate int `json:"emoji_status_expiration_date,omitempty"`
// UserID Required. Unique identifier of the target user
UserID int64 `json:"user_id"`
// EmojiID Optional. Custom emoji identifier of the emoji status to set. Pass an empty string to remove the
// status.
EmojiID string `json:"emoji_status_custom_emoji_id,omitempty"`
// ExpirationDate Optional. Expiration date of the emoji status, if any
ExpirationDate int `json:"emoji_status_expiration_date,omitempty"`
}
// SetUserEmojiStatus sets a custom emoji status for a user.
@@ -85,15 +99,29 @@ func (api *API) SetUserEmojiStatusWithContext(ctx context.Context, params SetUse
// Since: Bot API 9.3
// See https://core.telegram.org/bots/api#getusergifts
type GetUserGifts struct {
UserID int64 `json:"user_id"`
ExcludeUnlimited bool `json:"exclude_unlimited,omitempty"`
ExcludeLimitedUpgradable bool `json:"exclude_limited_upgradable,omitempty"`
ExcludeLimitedNonUpgradable bool `json:"exclude_limited_non_upgradable,omitempty"`
ExcludeUnique bool `json:"exclude_unique,omitempty"`
ExcludeFromBlockchain bool `json:"exclude_from_blockchain,omitempty"`
SortByPrice bool `json:"sort_by_price,omitempty"`
Offset string `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
// UserID Required. Unique identifier of the user
UserID int64 `json:"user_id"`
// ExcludeUnlimited Optional. Pass True to exclude gifts that can be purchased an unlimited number of times
ExcludeUnlimited bool `json:"exclude_unlimited,omitempty"`
// ExcludeLimitedUpgradable Optional. Pass True to exclude gifts that can be purchased a limited number of
// times and can be upgraded to unique
ExcludeLimitedUpgradable bool `json:"exclude_limited_upgradable,omitempty"`
// ExcludeLimitedNonUpgradable Optional. Pass True to exclude gifts that can be purchased a limited number
// of times and can't be upgraded to unique
ExcludeLimitedNonUpgradable bool `json:"exclude_limited_non_upgradable,omitempty"`
// ExcludeUnique Optional. Pass True to exclude unique gifts
ExcludeUnique bool `json:"exclude_unique,omitempty"`
// ExcludeFromBlockchain Optional. Pass True to exclude gifts that were assigned from the TON blockchain and
// can't be resold or transferred in Telegram
ExcludeFromBlockchain bool `json:"exclude_from_blockchain,omitempty"`
// SortByPrice Optional. Pass True to sort results by gift price instead of send date. Sorting is applied
// before pagination.
SortByPrice bool `json:"sort_by_price,omitempty"`
// Offset Optional. Offset of the first entry to return as received from the previous request; use an empty
// string to get the first chunk of results
Offset string `json:"offset,omitempty"`
// Limit Optional. The maximum number of gifts to be returned; 1-100. Defaults to 100.
Limit int `json:"limit,omitempty"`
}
// GetUserGifts returns gifts owned by a user.
@@ -117,9 +145,12 @@ func (api *API) GetUserGiftsWithContext(ctx context.Context, params GetUserGifts
// Since: Bot API 10.0
// See https://core.telegram.org/bots/api#getuserpersonalchatmessages
type GetUserPersonalChatMessages struct {
// UserID Required. Unique identifier for the target user
UserID int64 `json:"user_id"`
Offset int `json:"offset,omitempty"`
Limit int `json:"limit,omitempty"`
// Offset is the zero-based offset of the first message to return.
Offset int `json:"offset,omitempty"`
// Limit Required. The maximum number of messages to return; 1-20
Limit int `json:"limit,omitempty"`
}
// GetUserPersonalChatMessages returns messages from the personal chat of the user with the bot.