(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
+36 -15
View File
@@ -6,12 +6,22 @@ import "context"
// Since: Bot API 1.7
// See https://core.telegram.org/bots/api#answerinlinequery
type AnswerInlineQuery struct {
InlineQueryID string `json:"inline_query_id"`
Results []InlineQueryResult `json:"results"`
CacheTime int `json:"cache_time,omitempty"`
IsPersonal bool `json:"is_personal,omitempty"`
NextOffset string `json:"next_offset,omitempty"`
Button *InlineQueryResultsButton `json:"button,omitempty"`
// InlineQueryID Required. Unique identifier for the answered query
InlineQueryID string `json:"inline_query_id"`
// Results Required. A JSON-serialized Array of results for the inline query
Results []InlineQueryResult `json:"results"`
// CacheTime Optional. The maximum amount of time in seconds that the result of the inline query may be
// cached on the server. Defaults to 300.
CacheTime int `json:"cache_time,omitempty"`
// IsPersonal Optional. Pass True if results may be cached on the server side only for the user that sent
// the query. By default, results may be returned to any user who sends the same query.
IsPersonal bool `json:"is_personal,omitempty"`
// NextOffset Optional. Pass the offset that a client should send in the next query with the same text to
// receive more results. Pass an empty string if there are no more results or if you don't support
// pagination. Offset length can't exceed 64 bytes.
NextOffset string `json:"next_offset,omitempty"`
// Button Optional. A JSON-serialized object describing a button to be shown above inline query results
Button *InlineQueryResultsButton `json:"button,omitempty"`
}
// AnswerInlineQuery sends answers to an inline query.
@@ -36,8 +46,10 @@ func (api *API) AnswerInlineQueryWithContext(ctx context.Context, params AnswerI
// Since: Bot API 8.0
// See https://core.telegram.org/bots/api#answerwebappquery
type AnswerWebAppQuery struct {
WebAppQueryID string `json:"web_app_query_id"`
Result InlineQueryResult `json:"result"`
// WebAppQueryID Required. Unique identifier for the query to be answered
WebAppQueryID string `json:"web_app_query_id"`
// Result Required. A JSON-serialized object describing the message to be sent
Result InlineQueryResult `json:"result"`
}
// AnswerWebAppQuery sets the result of a Web App interaction.
@@ -61,12 +73,18 @@ func (api *API) AnswerWebAppQueryWithContext(ctx context.Context, params AnswerW
// Since: Bot API 8.0
// See https://core.telegram.org/bots/api#savepreparedinlinemessage
type SavePreparedInlineMessage struct {
UserID int64 `json:"user_id"`
Result InlineQueryResult `json:"result"`
AllowUserChats bool `json:"allow_user_chats,omitempty"`
AllowBotChats bool `json:"allow_bot_chats,omitempty"`
AllowGroupChats bool `json:"allow_group_chats,omitempty"`
AllowChannelChats bool `json:"allow_channel_chats,omitempty"`
// UserID Required. Unique identifier of the target user that can use the prepared message
UserID int64 `json:"user_id"`
// Result Required. A JSON-serialized object describing the message to be sent
Result InlineQueryResult `json:"result"`
// AllowUserChats Optional. Pass True if the message can be sent to private chats with users
AllowUserChats bool `json:"allow_user_chats,omitempty"`
// AllowBotChats Optional. Pass True if the message can be sent to private chats with bots
AllowBotChats bool `json:"allow_bot_chats,omitempty"`
// AllowGroupChats Optional. Pass True if the message can be sent to group and supergroup chats
AllowGroupChats bool `json:"allow_group_chats,omitempty"`
// AllowChannelChats Optional. Pass True if the message can be sent to channel chats
AllowChannelChats bool `json:"allow_channel_chats,omitempty"`
}
// SavePreparedInlineMessage stores a prepared message for Mini App users.
@@ -90,7 +108,10 @@ func (api *API) SavePreparedInlineMessageWithContext(ctx context.Context, params
// Since: Bot API 8.0
// See https://core.telegram.org/bots/api#savepreparedkeyboardbutton
type SavePreparedKeyboardButton struct {
UserID int64 `json:"user_id"`
// UserID Required. Unique identifier of the target user that can use the button
UserID int64 `json:"user_id"`
// Button Required. A JSON-serialized object describing the button to be saved. The button must be of the
// type request_users, request_chat, or request_managed_bot.
Button KeyboardButton `json:"button"`
}