diff --git a/src/tourmaline/client/api.cr b/src/tourmaline/client/api.cr index d3dbaef73..a67e00d7c 100644 --- a/src/tourmaline/client/api.cr +++ b/src/tourmaline/client/api.cr @@ -82,6 +82,7 @@ module Tourmaline link_preview_options : Tourmaline::LinkPreviewOptions | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -95,6 +96,7 @@ module Tourmaline link_preview_options: link_preview_options, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -197,25 +199,29 @@ module Tourmaline caption : String | ::Nil = nil, parse_mode : ParseMode = default_parse_mode, caption_entities : Array(Tourmaline::MessageEntity) | ::Nil = nil, + show_caption_above_media : Bool | ::Nil = nil, has_spoiler : Bool | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) request(Tourmaline::Message, "sendPhoto", { - chat_id: chat_id, - photo: photo, - business_connection_id: business_connection_id, - message_thread_id: message_thread_id, - caption: caption, - parse_mode: parse_mode, - caption_entities: caption_entities.try(&.to_json), - has_spoiler: has_spoiler, - disable_notification: disable_notification, - protect_content: protect_content, - reply_parameters: reply_parameters, - reply_markup: reply_markup.try(&.to_json), + chat_id: chat_id, + photo: photo, + business_connection_id: business_connection_id, + message_thread_id: message_thread_id, + caption: caption, + parse_mode: parse_mode, + caption_entities: caption_entities.try(&.to_json), + show_caption_above_media: show_caption_above_media, + has_spoiler: has_spoiler, + disable_notification: disable_notification, + protect_content: protect_content, + message_effect_id: message_effect_id, + reply_parameters: reply_parameters, + reply_markup: reply_markup.try(&.to_json), }) end @@ -235,6 +241,7 @@ module Tourmaline thumbnail : ::File | String | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -252,6 +259,7 @@ module Tourmaline thumbnail: thumbnail, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -270,6 +278,7 @@ module Tourmaline disable_content_type_detection : Bool | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -285,6 +294,7 @@ module Tourmaline disable_content_type_detection: disable_content_type_detection, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -303,31 +313,35 @@ module Tourmaline caption : String | ::Nil = nil, parse_mode : ParseMode = default_parse_mode, caption_entities : Array(Tourmaline::MessageEntity) | ::Nil = nil, + show_caption_above_media : Bool | ::Nil = nil, has_spoiler : Bool | ::Nil = nil, supports_streaming : Bool | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) request(Tourmaline::Message, "sendVideo", { - chat_id: chat_id, - video: video, - business_connection_id: business_connection_id, - message_thread_id: message_thread_id, - duration: duration, - width: width, - height: height, - thumbnail: thumbnail, - caption: caption, - parse_mode: parse_mode, - caption_entities: caption_entities.try(&.to_json), - has_spoiler: has_spoiler, - supports_streaming: supports_streaming, - disable_notification: disable_notification, - protect_content: protect_content, - reply_parameters: reply_parameters, - reply_markup: reply_markup.try(&.to_json), + chat_id: chat_id, + video: video, + business_connection_id: business_connection_id, + message_thread_id: message_thread_id, + duration: duration, + width: width, + height: height, + thumbnail: thumbnail, + caption: caption, + parse_mode: parse_mode, + caption_entities: caption_entities.try(&.to_json), + show_caption_above_media: show_caption_above_media, + has_spoiler: has_spoiler, + supports_streaming: supports_streaming, + disable_notification: disable_notification, + protect_content: protect_content, + message_effect_id: message_effect_id, + reply_parameters: reply_parameters, + reply_markup: reply_markup.try(&.to_json), }) end @@ -344,29 +358,33 @@ module Tourmaline caption : String | ::Nil = nil, parse_mode : ParseMode = default_parse_mode, caption_entities : Array(Tourmaline::MessageEntity) | ::Nil = nil, + show_caption_above_media : Bool | ::Nil = nil, has_spoiler : Bool | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) request(Tourmaline::Message, "sendAnimation", { - chat_id: chat_id, - animation: animation, - business_connection_id: business_connection_id, - message_thread_id: message_thread_id, - duration: duration, - width: width, - height: height, - thumbnail: thumbnail, - caption: caption, - parse_mode: parse_mode, - caption_entities: caption_entities.try(&.to_json), - has_spoiler: has_spoiler, - disable_notification: disable_notification, - protect_content: protect_content, - reply_parameters: reply_parameters, - reply_markup: reply_markup.try(&.to_json), + chat_id: chat_id, + animation: animation, + business_connection_id: business_connection_id, + message_thread_id: message_thread_id, + duration: duration, + width: width, + height: height, + thumbnail: thumbnail, + caption: caption, + parse_mode: parse_mode, + caption_entities: caption_entities.try(&.to_json), + show_caption_above_media: show_caption_above_media, + has_spoiler: has_spoiler, + disable_notification: disable_notification, + protect_content: protect_content, + message_effect_id: message_effect_id, + reply_parameters: reply_parameters, + reply_markup: reply_markup.try(&.to_json), }) end @@ -382,6 +400,7 @@ module Tourmaline duration : Int32 | Int64 | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -396,6 +415,7 @@ module Tourmaline duration: duration, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -412,6 +432,7 @@ module Tourmaline thumbnail : ::File | String | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -425,6 +446,7 @@ module Tourmaline thumbnail: thumbnail, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -438,6 +460,7 @@ module Tourmaline message_thread_id : Int32 | Int64 | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil ) request(Array(Tourmaline::Message), "sendMediaGroup", { @@ -447,6 +470,7 @@ module Tourmaline message_thread_id: message_thread_id, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, }) end @@ -464,6 +488,7 @@ module Tourmaline proximity_alert_radius : Int32 | Int64 | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -479,6 +504,7 @@ module Tourmaline proximity_alert_radius: proximity_alert_radius, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -499,6 +525,7 @@ module Tourmaline google_place_type : String | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -516,6 +543,7 @@ module Tourmaline google_place_type: google_place_type, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -532,6 +560,7 @@ module Tourmaline vcard : String | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -545,6 +574,7 @@ module Tourmaline vcard: vcard, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -571,6 +601,7 @@ module Tourmaline is_closed : Bool | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -594,6 +625,7 @@ module Tourmaline is_closed: is_closed, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -607,6 +639,7 @@ module Tourmaline emoji : String | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -617,6 +650,7 @@ module Tourmaline emoji: emoji, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -1368,6 +1402,7 @@ module Tourmaline caption : String | ::Nil = nil, parse_mode : ParseMode = default_parse_mode, caption_entities : Array(Tourmaline::MessageEntity) | ::Nil = nil, + show_caption_above_media : Bool | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil = nil ) request(Tourmaline::Message | Bool, "editMessageCaption", { @@ -1508,6 +1543,7 @@ module Tourmaline emoji : String | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | Tourmaline::ReplyKeyboardMarkup | Tourmaline::ReplyKeyboardRemove | Tourmaline::ForceReply | ::Nil = nil ) @@ -1519,6 +1555,7 @@ module Tourmaline emoji: emoji, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -1738,10 +1775,10 @@ module Tourmaline title : String, description : String, payload : String, - provider_token : String, currency : String, prices : Array(Tourmaline::LabeledPrice), message_thread_id : Int32 | Int64 | ::Nil = nil, + provider_token : String | ::Nil = nil, max_tip_amount : Int32 | Int64 | ::Nil = nil, suggested_tip_amounts : Array(Int32 | Int64) | ::Nil = nil, start_parameter : String | ::Nil = nil, @@ -1759,6 +1796,7 @@ module Tourmaline is_flexible : Bool | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil = nil ) @@ -1767,10 +1805,10 @@ module Tourmaline title: title, description: description, payload: payload, - provider_token: provider_token, currency: currency, prices: prices.to_json, message_thread_id: message_thread_id, + provider_token: provider_token, max_tip_amount: max_tip_amount, suggested_tip_amounts: suggested_tip_amounts.try(&.to_json), start_parameter: start_parameter, @@ -1788,6 +1826,7 @@ module Tourmaline is_flexible: is_flexible, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) @@ -1798,9 +1837,9 @@ module Tourmaline title : String, description : String, payload : String, - provider_token : String, currency : String, prices : Array(Tourmaline::LabeledPrice), + provider_token : String | ::Nil = nil, max_tip_amount : Int32 | Int64 | ::Nil = nil, suggested_tip_amounts : Array(Int32 | Int64) | ::Nil = nil, provider_data : String | ::Nil = nil, @@ -1820,9 +1859,9 @@ module Tourmaline title: title, description: description, payload: payload, - provider_token: provider_token, currency: currency, prices: prices.to_json, + provider_token: provider_token, max_tip_amount: max_tip_amount, suggested_tip_amounts: suggested_tip_amounts.try(&.to_json), provider_data: provider_data.try(&.to_json), @@ -1888,6 +1927,7 @@ module Tourmaline message_thread_id : Int32 | Int64 | ::Nil = nil, disable_notification : Bool | ::Nil = nil, protect_content : Bool | ::Nil = nil, + message_effect_id : String | ::Nil = nil, reply_parameters : Tourmaline::ReplyParameters | ::Nil = nil, reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil = nil ) @@ -1898,6 +1938,7 @@ module Tourmaline message_thread_id: message_thread_id, disable_notification: disable_notification, protect_content: protect_content, + message_effect_id: message_effect_id, reply_parameters: reply_parameters, reply_markup: reply_markup.try(&.to_json), }) diff --git a/src/tourmaline/types/api.cr b/src/tourmaline/types/api.cr index d3585ab22..7a26527d2 100644 --- a/src/tourmaline/types/api.cr +++ b/src/tourmaline/types/api.cr @@ -510,6 +510,9 @@ module Tourmaline # Optional. Options used for link preview generation for the message, if it is a text message and link preview options were changed property link_preview_options : Tourmaline::LinkPreviewOptions | ::Nil + # Optional. Unique identifier of the message effect added to the message + property effect_id : String | ::Nil + # Optional. Message is an animation, information about the animation. For backward compatibility, when this field is set, the document field will also be set property animation : Tourmaline::Animation | ::Nil @@ -543,6 +546,9 @@ module Tourmaline # Optional. For messages with a caption, special entities like usernames, URLs, bot commands, etc. that appear in the caption property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. True, if the message media is covered by a spoiler animation property? has_media_spoiler : Bool | ::Nil @@ -704,6 +710,7 @@ module Tourmaline @text : String | ::Nil = nil, @entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, @link_preview_options : Tourmaline::LinkPreviewOptions | ::Nil = nil, + @effect_id : String | ::Nil = nil, @animation : Tourmaline::Animation | ::Nil = nil, @audio : Tourmaline::Audio | ::Nil = nil, @document : Tourmaline::Document | ::Nil = nil, @@ -715,6 +722,7 @@ module Tourmaline @voice : Tourmaline::Voice | ::Nil = nil, @caption : String | ::Nil = nil, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @has_media_spoiler : Bool | ::Nil = nil, @contact : Tourmaline::Contact | ::Nil = nil, @dice : Tourmaline::Dice | ::Nil = nil, @@ -808,7 +816,7 @@ module Tourmaline class MessageEntity include JSON::Serializable - # Type of the entity. Currently, can be "mention" (@username), "hashtag" (#hashtag), "cashtag" ($USD), "bot_command" (/start@jobs_bot), "url" (https://telegram.org), "email" (do-not-reply@telegram.org), "phone_number" (+1-212-555-0123), "bold" (bold text), "italic" (italic text), "underline" (underlined text), "strikethrough" (strikethrough text), "spoiler" (spoiler message), "blockquote" (block quotation), "code" (monowidth string), "pre" (monowidth block), "text_link" (for clickable text URLs), "text_mention" (for users without usernames), "custom_emoji" (for inline custom emoji stickers) + # Type of the entity. Currently, can be "mention" (@username), "hashtag" (#hashtag), "cashtag" ($USD), "bot_command" (/start@jobs_bot), "url" (https://telegram.org), "email" (do-not-reply@telegram.org), "phone_number" (+1-212-555-0123), "bold" (bold text), "italic" (italic text), "underline" (underlined text), "strikethrough" (strikethrough text), "spoiler" (spoiler message), "blockquote" (block quotation), "expandable_blockquote" (collapsed-by-default block quotation), "code" (monowidth string), "pre" (monowidth block), "text_link" (for clickable text URLs), "text_mention" (for users without usernames), "custom_emoji" (for inline custom emoji stickers) property type : String # Offset in UTF-16 code units to the start of the entity @@ -2324,7 +2332,7 @@ module Tourmaline end end - # This object represents one button of the reply keyboard. For simple text buttons, String can be used instead of this object to specify the button text. The optional fields web_app, request_users, request_chat, request_contact, request_location, and request_poll are mutually exclusive. + # This object represents one button of the reply keyboard. At most one of the optional fields must be used to specify type of the button. For simple text buttons, String can be used instead of this object to specify the button text. # Note: request_users and request_chat options will only work in Telegram versions released after 3 February, 2023. Older clients will display unsupported message. class KeyboardButton include JSON::Serializable @@ -2495,7 +2503,7 @@ module Tourmaline end end - # This object represents one button of an inline keyboard. You must use exactly one of the optional fields. + # This object represents one button of an inline keyboard. Exactly one of the optional fields must be used to specify type of the button. class InlineKeyboardButton include JSON::Serializable @@ -2526,7 +2534,7 @@ module Tourmaline # Optional. Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row. property callback_game : Tourmaline::CallbackGame | ::Nil - # Optional. Specify True, to send a Pay button. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages. + # Optional. Specify True, to send a Pay button. Substrings "⭐" and "XTR" in the buttons's text will be replaced with a Telegram Star icon. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages. property? pay : Bool | ::Nil def initialize( @@ -3924,6 +3932,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Pass True if the photo needs to be covered with a spoiler animation property? has_spoiler : Bool | ::Nil @@ -3933,6 +3944,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @has_spoiler : Bool | ::Nil = nil ) end @@ -3960,6 +3972,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Video width property width : Int32 | Int64 | ::Nil @@ -3982,6 +3997,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @width : Int32 | Int64 | ::Nil = nil, @height : Int32 | Int64 | ::Nil = nil, @duration : Int32 | Int64 | ::Nil = nil, @@ -4013,6 +4029,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Animation width property width : Int32 | Int64 | ::Nil @@ -4032,6 +4051,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @width : Int32 | Int64 | ::Nil = nil, @height : Int32 | Int64 | ::Nil = nil, @duration : Int32 | Int64 | ::Nil = nil, @@ -4447,6 +4467,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Inline keyboard attached to the message property reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil @@ -4465,6 +4488,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil = nil, @input_message_content : Tourmaline::InputMessageContent | ::Nil = nil ) @@ -4511,6 +4535,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Inline keyboard attached to the message property reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil @@ -4530,6 +4557,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil = nil, @input_message_content : Tourmaline::InputMessageContent | ::Nil = nil ) @@ -4576,6 +4604,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Inline keyboard attached to the message property reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil @@ -4595,6 +4626,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil = nil, @input_message_content : Tourmaline::InputMessageContent | ::Nil = nil ) @@ -4632,6 +4664,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Video width property video_width : Int32 | Int64 | ::Nil @@ -4660,6 +4695,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @video_width : Int32 | Int64 | ::Nil = nil, @video_height : Int32 | Int64 | ::Nil = nil, @video_duration : Int32 | Int64 | ::Nil = nil, @@ -5077,6 +5113,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Inline keyboard attached to the message property reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil @@ -5092,6 +5131,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil = nil, @input_message_content : Tourmaline::InputMessageContent | ::Nil = nil ) @@ -5123,6 +5163,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Inline keyboard attached to the message property reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil @@ -5137,6 +5180,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil = nil, @input_message_content : Tourmaline::InputMessageContent | ::Nil = nil ) @@ -5168,6 +5212,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Inline keyboard attached to the message property reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil @@ -5182,6 +5229,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil = nil, @input_message_content : Tourmaline::InputMessageContent | ::Nil = nil ) @@ -5294,6 +5342,9 @@ module Tourmaline # Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode property caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity + # Optional. Pass True, if the caption must be shown above the message media + property? show_caption_above_media : Bool | ::Nil + # Optional. Inline keyboard attached to the message property reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil @@ -5309,6 +5360,7 @@ module Tourmaline @caption : String | ::Nil = nil, @parse_mode : ParseMode = ParseMode::Markdown, @caption_entities : Array(Tourmaline::MessageEntity) = [] of Tourmaline::MessageEntity, + @show_caption_above_media : Bool | ::Nil = nil, @reply_markup : Tourmaline::InlineKeyboardMarkup | ::Nil = nil, @input_message_content : Tourmaline::InputMessageContent | ::Nil = nil ) @@ -5546,16 +5598,16 @@ module Tourmaline # Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. property payload : String - # Payment provider token, obtained via @BotFather - property provider_token : String - - # Three-letter ISO 4217 currency code, see more on currencies + # Three-letter ISO 4217 currency code, see more on currencies. Pass "XTR" for payments in Telegram Stars. property currency : String - # Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) + # Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.). Must contain exactly one item for payments in Telegram Stars. property prices : Array(Tourmaline::LabeledPrice) = [] of Tourmaline::LabeledPrice - # Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0 + # Optional. Payment provider token, obtained via @BotFather. Pass an empty string for payments in Telegram Stars. + property provider_token : String | ::Nil + + # Optional. The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars. property max_tip_amount : Int32 | Int64 | ::Nil # Optional. A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. @@ -5576,34 +5628,34 @@ module Tourmaline # Optional. Photo height property photo_height : Int32 | Int64 | ::Nil - # Optional. Pass True if you require the user's full name to complete the order + # Optional. Pass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars. property? need_name : Bool | ::Nil - # Optional. Pass True if you require the user's phone number to complete the order + # Optional. Pass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars. property? need_phone_number : Bool | ::Nil - # Optional. Pass True if you require the user's email address to complete the order + # Optional. Pass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars. property? need_email : Bool | ::Nil - # Optional. Pass True if you require the user's shipping address to complete the order + # Optional. Pass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars. property? need_shipping_address : Bool | ::Nil - # Optional. Pass True if the user's phone number should be sent to provider + # Optional. Pass True if the user's phone number should be sent to the provider. Ignored for payments in Telegram Stars. property? send_phone_number_to_provider : Bool | ::Nil - # Optional. Pass True if the user's email address should be sent to provider + # Optional. Pass True if the user's email address should be sent to the provider. Ignored for payments in Telegram Stars. property? send_email_to_provider : Bool | ::Nil - # Optional. Pass True if the final price depends on the shipping method + # Optional. Pass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars. property? is_flexible : Bool | ::Nil def initialize( @title, @description, @payload, - @provider_token, @currency, @prices : Array(Tourmaline::LabeledPrice) = [] of Tourmaline::LabeledPrice, + @provider_token : String | ::Nil = nil, @max_tip_amount : Int32 | Int64 | ::Nil = nil, @suggested_tip_amounts : Array(Int32 | Int64) = [] of Int32 | Int64, @provider_data : String | ::Nil = nil, @@ -5695,7 +5747,7 @@ module Tourmaline # Unique bot deep-linking parameter that can be used to generate this invoice property start_parameter : String - # Three-letter ISO 4217 currency code + # Three-letter ISO 4217 currency code, or "XTR" for payments in Telegram Stars property currency : String # Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). @@ -5794,7 +5846,7 @@ module Tourmaline class SuccessfulPayment include JSON::Serializable - # Three-letter ISO 4217 currency code + # Three-letter ISO 4217 currency code, or "XTR" for payments in Telegram Stars property currency : String # Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). @@ -5862,7 +5914,7 @@ module Tourmaline # User who sent the query property from : Tourmaline::User - # Three-letter ISO 4217 currency code + # Three-letter ISO 4217 currency code, or "XTR" for payments in Telegram Stars property currency : String # Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).