(fix): finalize v2 contracts (tests): cover v2 migration (doc): prepare release guidance
This commit is contained in:
+64
-2
@@ -423,6 +423,8 @@ type Message struct {
|
||||
ChecklistTasksAdded *ChecklistTasksAdded `json:"checklist_tasks_added,omitempty"` // Since: Bot API 9.1
|
||||
// CommunityChatAdded describes a community chat addition service message.
|
||||
CommunityChatAdded *CommunityChatAdded `json:"community_chat_added,omitempty"` // Since: Bot API 10.2
|
||||
// CommunityChatJoined Optional. Service message: a chat was joined by a user from a community.
|
||||
CommunityChatJoined *CommunityChatJoined `json:"community_chat_joined,omitempty"` // Since: Bot API 10.3
|
||||
// CommunityChatRemoved describes a community chat removal service message.
|
||||
CommunityChatRemoved *CommunityChatRemoved `json:"community_chat_removed,omitempty"` // Since: Bot API 10.2
|
||||
// DirectMessagePriceChanged Optional. Service message: the price for paid messages in the corresponding
|
||||
@@ -683,8 +685,7 @@ type ReplyParameters struct {
|
||||
Quote string `json:"quote,omitempty"`
|
||||
// QuoteParsingMode Optional. Mode for parsing entities in the quote. See formatting options for more
|
||||
// details.
|
||||
// Subject to change in v2: the Go field name may be corrected to QuoteParseMode.
|
||||
QuoteParsingMode string `json:"quote_parse_mode,omitempty"`
|
||||
QuoteParseMode string `json:"quote_parse_mode,omitempty"`
|
||||
// QuoteEntities Optional. A JSON-serialized list of special entities that appear in the quote. It can be
|
||||
// specified instead of quote_parse_mode.
|
||||
QuoteEntities []MessageEntity `json:"quote_entities,omitempty"`
|
||||
@@ -758,6 +759,8 @@ type ReplyMarkup struct {
|
||||
type InlineKeyboardMarkup struct {
|
||||
// InlineKeyboard Array of button rows, each represented by an Array of InlineKeyboardButton objects
|
||||
InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard,omitempty"`
|
||||
// ForceReply opens the reply interface for the user.
|
||||
ForceReply bool `json:"force_reply,omitempty"` // Since: Bot API 10.3
|
||||
}
|
||||
|
||||
// KeyboardButtonStyle represents the style of a keyboard button.
|
||||
@@ -916,6 +919,8 @@ type InlineKeyboardButton struct {
|
||||
// by the bot to private, group and supergroup chats if the owner of the bot has a Telegram Premium
|
||||
// subscription.
|
||||
IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"` // Since: Bot API 9.4
|
||||
// Disabled makes the button do nothing. It must be the button's only action.
|
||||
Disabled *DisabledButton `json:"disabled,omitempty"` // Since: Bot API 10.3
|
||||
}
|
||||
|
||||
// ReplyKeyboardMarkup represents a custom keyboard with reply options.
|
||||
@@ -945,6 +950,8 @@ type ReplyKeyboardMarkup struct {
|
||||
// change the bot's language, bot replies to the request with a keyboard to select the new language. Other
|
||||
// users in the group don't see the keyboard.
|
||||
Selective bool `json:"selective,omitempty"`
|
||||
// ForceReply opens the reply interface for the user.
|
||||
ForceReply bool `json:"force_reply,omitempty"` // Since: Bot API 10.3
|
||||
}
|
||||
|
||||
// CallbackQuery represents an incoming callback query from a callback button in an inline keyboard.
|
||||
@@ -970,6 +977,49 @@ type CallbackQuery struct {
|
||||
GameShortName string `json:"game_short_name,omitempty"`
|
||||
}
|
||||
|
||||
// LoginURL configures HTTPS authorization through Telegram Login.
|
||||
//
|
||||
// Since: Bot API 4.3
|
||||
type LoginURL struct {
|
||||
// URL is the HTTPS authorization destination with a domain linked to the bot.
|
||||
URL string `json:"url"`
|
||||
// ForwardText optionally replaces the button label in forwarded messages.
|
||||
ForwardText string `json:"forward_text,omitempty"`
|
||||
// BotUsername optionally selects the authorization bot; unsupported in rich buttons.
|
||||
BotUsername string `json:"bot_username,omitempty"`
|
||||
// RequestWriteAccess asks permission for the bot to message the user.
|
||||
RequestWriteAccess bool `json:"request_write_access,omitempty"`
|
||||
}
|
||||
|
||||
// SwitchInlineQueryChosenChat restricts the chat picker for an inline query.
|
||||
//
|
||||
// Since: Bot API 6.7
|
||||
type SwitchInlineQueryChosenChat struct {
|
||||
// Query is the initial query; an empty value inserts only the bot username.
|
||||
Query string `json:"query,omitempty"`
|
||||
// AllowUserChats permits private chats with users.
|
||||
AllowUserChats bool `json:"allow_user_chats,omitempty"`
|
||||
// AllowBotChats permits private chats with bots.
|
||||
AllowBotChats bool `json:"allow_bot_chats,omitempty"`
|
||||
// AllowGroupChats permits groups and supergroups.
|
||||
AllowGroupChats bool `json:"allow_group_chats,omitempty"`
|
||||
// AllowChannelChats permits channels.
|
||||
AllowChannelChats bool `json:"allow_channel_chats,omitempty"`
|
||||
}
|
||||
|
||||
// CopyTextButton describes text copied to the clipboard when pressed.
|
||||
//
|
||||
// Since: Bot API 7.11
|
||||
type CopyTextButton struct {
|
||||
// Text contains 1-256 characters to copy.
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
// DisabledButton represents a button without an action.
|
||||
//
|
||||
// Since: Bot API 10.3
|
||||
type DisabledButton struct{}
|
||||
|
||||
// ChatActionType represents the type of chat action.
|
||||
type ChatActionType string
|
||||
|
||||
@@ -1288,3 +1338,15 @@ type InputRichMessage struct {
|
||||
// SkipEntityDetection disables automatic detection of links, mentions, hashtags, commands, phone numbers, and bank cards.
|
||||
SkipEntityDetection bool `json:"skip_entity_detection,omitempty"`
|
||||
}
|
||||
|
||||
// EphemeralMessageParameters identifies the recipient and callback context of an ephemeral message.
|
||||
//
|
||||
// Since: Bot API 10.3
|
||||
type EphemeralMessageParameters struct {
|
||||
// ReceiverUserID identifies the user who may receive the message.
|
||||
ReceiverUserID int64 `json:"receiver_user_id"`
|
||||
// CallbackQueryID identifies the callback query that triggered the message.
|
||||
CallbackQueryID string `json:"callback_query_id,omitempty"`
|
||||
// ReplaceCallbackQueryMessage shows the ephemeral message in place of the original callback message.
|
||||
ReplaceCallbackQueryMessage bool `json:"replace_callback_query_message,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user