(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
+32 -6
View File
@@ -4,7 +4,10 @@ package tgapi
// Since: Bot API 4.7
// See https://core.telegram.org/bots/api#botcommand
type BotCommand struct {
Command string `json:"command"`
// Command Text of the command; 1-32 characters. Can contain only lowercase English letters, digits and
// underscores.
Command string `json:"command"`
// Description Description of the command; 1-256 characters
Description string `json:"description"`
// IsEphemeral marks the command as visible only in ephemeral command contexts.
IsEphemeral bool `json:"is_ephemeral,omitempty"` // Since: Bot API 10.2
@@ -34,26 +37,33 @@ const (
// Since: Bot API 5.3
// See https://core.telegram.org/bots/api#botcommandscope
type BotCommandScope struct {
Type BotCommandScopeType `json:"type"`
ChatID *int64 `json:"chat_id,omitempty"`
UserID *int64 `json:"user_id,omitempty"`
// Type identifies the concrete command-scope variant.
Type BotCommandScopeType `json:"type"`
// ChatID Unique identifier for the target chat or username of the target supergroup in the format
// @username. Channel direct messages chats and channel chats aren't supported.
ChatID *int64 `json:"chat_id,omitempty"`
// UserID Unique identifier of the target user
UserID *int64 `json:"user_id,omitempty"`
}
// BotName represents the bot's name.
// Since: Bot API 6.7
type BotName struct {
// Name The bot's name
Name string `json:"name"`
}
// BotDescription represents the bot's description.
// Since: Bot API 6.6
type BotDescription struct {
// Description The bot's description
Description string `json:"description"`
}
// BotShortDescription represents the bot's short description.
// Since: Bot API 6.6
type BotShortDescription struct {
// ShortDescription The bot's short description
ShortDescription string `json:"short_description"`
}
@@ -71,13 +81,22 @@ const (
// Since: Bot API 9.0
// See https://core.telegram.org/bots/api#inputprofilephoto
type InputProfilePhoto struct {
// Type identifies the static-photo or animated-photo variant.
Type InputProfilePhotoType `json:"type"`
// Photo The static profile photo. Profile photos can't be reused and can only be uploaded as a new file, so
// you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under
// <file_attach_name>. More information on Sending Files »
// Static fields (for static photos)
Photo *string `json:"photo,omitempty"`
// Animation The animated profile photo. Profile photos can't be reused and can only be uploaded as a new
// file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using
// multipart/form-data under <file_attach_name>. More information on Sending Files »
// Animated fields (for animated profile videos)
Animation *string `json:"animation,omitempty"`
Animation *string `json:"animation,omitempty"`
// MainFrameTimestamp Optional. Timestamp in seconds of the frame that will be used as the static profile
// photo. Defaults to 0.0.
MainFrameTimestamp *float64 `json:"main_frame_timestamp,omitempty"`
}
@@ -97,10 +116,16 @@ const (
// Since: Bot API 6.0
// See https://core.telegram.org/bots/api#menubutton
type MenuButton struct {
// Type identifies the commands, web_app, or default menu-button variant.
Type MenuButtonType `json:"type"`
// Text Text on the button
// WebApp fields (for web_app button)
Text *string `json:"text"`
Text *string `json:"text"`
// WebApp Description of the Web App that will be launched when the user presses the button. The Web App
// will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.
// Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web
// App's URL, in which case the Web App will be opened as if the user pressed the link.
WebApp *WebAppInfo `json:"web_app"`
}
@@ -108,5 +133,6 @@ type MenuButton struct {
// Since: Bot API 10.0
// See https://core.telegram.org/bots/api#botaccesssettings
type BotAccessSettings struct {
// AllowAllPrivateChats reports whether the managed bot may access all private chats of its owner.
AllowAllPrivateChats bool `json:"allow_all_private_chats"`
}