/* * Echotron * Copyright (C) 2018 The Echotron Contributors * * Echotron is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Echotron is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package echotron // ParseMode is a custom type for the various frequent options used by some methods of the API. type ParseMode string // These are all the possible options that can be used by some methods. const ( Markdown ParseMode = "Markdown" MarkdownV2 = "MarkdownV2" HTML = "HTML" ) // PollType is a custom type for the various types of poll that can be sent. type PollType string // These are all the possible poll types. const ( Quiz PollType = "quiz" Regular = "regular" Any = "" ) // DiceEmoji is a custom type for the various emojis that can be sent through the SendDice method. type DiceEmoji string // These are all the possible emojis that can be sent through the SendDice method. const ( Die DiceEmoji = "🎲" Darts = "🎯" Basket = "🏀" Goal = "⚽️" Bowling = "🎳" Slot = "🎰" ) // ChatAction is a custom type for the various actions that can be sent through the SendChatAction method. type ChatAction string // These are all the possible actions that can be sent through the SendChatAction method. const ( Typing ChatAction = "typing" UploadPhoto = "upload_photo" RecordVideo = "record_video" UploadVideo = "upload_video" RecordAudio = "record_audio" UploadAudio = "upload_audio" UploadDocument = "upload_document" FindLocation = "find_location" RecordVideoNote = "record_video_note" UploadVideoNote = "upload_video_note" ChooseSticker = "choose_sticker" ) // MessageEntityType is a custom type for the various MessageEntity types used in various methods. type MessageEntityType string // These are all the possible types for MessageEntityType. const ( MentionEntity MessageEntityType = "mention" HashtagEntity = "hashtag" CashtagEntity = "cashtag" BotCommandEntity = "bot_command" UrlEntity = "url" EmailEntity = "email" PhoneNumberEntity = "phone_number" BoldEntity = "bold" ItalicEntity = "italic" UnderlineEntity = "underline" StrikethroughEntity = "strikethrough" SpoilerEntity = "spoiler" BlockQuoteEntity = "blockquote" ExpandableBlockQuoteEntity = "expandable_blockquote" CodeEntity = "code" PreEntity = "pre" TextLinkEntity = "text_link" TextMentionEntity = "text_mention" CustomEmojiEntity = "custom_emoji" DateTimeEntity = "date_time" ) // UpdateType is a custom type for the various update types that a bot can be subscribed to. type UpdateType string // These are all the possible types that a bot can be subscribed to. const ( MessageUpdate UpdateType = "message" EditedMessageUpdate = "edited_message" ChannelPostUpdate = "channel_post" EditedChannelPostUpdate = "edited_channel_post" InlineQueryUpdate = "inline_query" ChosenInlineResultUpdate = "chosen_inline_result" CallbackQueryUpdate = "callback_query" ShippingQueryUpdate = "shipping_query" PreCheckoutQueryUpdate = "pre_checkout_query" PollUpdate = "poll" PollAnswerUpdate = "poll_answer" MyChatMemberUpdate = "my_chat_member" ChatMemberUpdate = "chat_member" ) // ReplyMarkup is an interface for the various keyboard types. type ReplyMarkup interface { ImplementsReplyMarkup() } // KeyboardButton represents a button in a keyboard. type KeyboardButton struct { RequestPoll *KeyboardButtonPollType `json:"request_poll,omitempty"` WebApp *WebAppInfo `json:"web_app,omitempty"` RequestUsers *KeyboardButtonRequestUsers `json:"request_users,omitempty"` RequestChat *KeyboardButtonRequestChat `json:"request_chat,omitempty"` RequestManagedBot *KeyboardButtonRequestManagedBot `json:"request_managed_bot,omitempty"` Text string `json:"text"` IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"` Style string `json:"style,omitempty"` RequestContact bool `json:"request_contact,omitempty"` RequestLocation bool `json:"request_location,omitempty"` } // KeyboardButtonPollType represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed. type KeyboardButtonPollType struct { Type PollType `json:"type"` } // KeyboardButtonRequestUsers defines the criteria used to request suitable users. // The identifiers of the selected users will be shared with the bot when the corresponding button is pressed. type KeyboardButtonRequestUsers struct { RequestID int `json:"request_id"` MaxQuantity int `json:"max_quantity,omitempty"` UserIsBot bool `json:"user_is_bot,omitempty"` UserIsPremium bool `json:"user_is_premium,omitempty"` RequestName bool `json:"request_name,omitempty"` RequestUsername bool `json:"request_username,omitempty"` RequestPhoto bool `json:"request_photo,omitempty"` } // KeyboardButtonRequestManagedBot defines the criteria used to request a managed bot. // The identifier of the selected bot will be shared with the bot when the corresponding button is pressed. type KeyboardButtonRequestManagedBot struct { SuggestedName string `json:"suggested_name,omitempty"` SuggestedUsername string `json:"suggested_username,omitempty"` RequestID int `json:"request_id"` } // KeyboardButtonRequestChat defines the criteria used to request a suitable chat. // The identifier of the selected chat will be shared with the bot when the corresponding button is pressed. type KeyboardButtonRequestChat struct { UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"` BotAdministratorRights *ChatAdministratorRights `json:"bot_administrator_rights,omitempty"` RequestID int `json:"request_id"` ChatIsChannel bool `json:"chat_is_channel,omitempty"` ChatIsForum bool `json:"chat_is_forum,omitempty"` ChatHasUsername bool `json:"chat_has_username,omitempty"` ChatIsCreated bool `json:"chat_is_created,omitempty"` BotIsMember bool `json:"bot_is_member,omitempty"` RequestName bool `json:"request_name,omitempty"` RequestTitle bool `json:"request_title,omitempty"` RequestUsername bool `json:"request_username,omitempty"` RequestPhoto bool `json:"request_photo,omitempty"` } // ReplyKeyboardMarkup represents a custom keyboard with reply options. type ReplyKeyboardMarkup struct { InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"` Keyboard [][]KeyboardButton `json:"keyboard"` IsPersistent bool `json:"is_persistent,omitempty"` ResizeKeyboard bool `json:"resize_keyboard,omitempty"` OneTimeKeyboard bool `json:"one_time_keyboard,omitempty"` Selective bool `json:"selective,omitempty"` ForceReply bool `json:"force_reply,omitempty"` } // ImplementsReplyMarkup is a dummy method which exists to implement the interface ReplyMarkup. func (i ReplyKeyboardMarkup) ImplementsReplyMarkup() {} // ReplyKeyboardRemove is used to remove the current custom keyboard and display the default letter-keyboard. // By default, custom keyboards are displayed until a new keyboard is sent by a bot. // An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). // RemoveKeyboard MUST BE true. type ReplyKeyboardRemove struct { RemoveKeyboard bool `json:"remove_keyboard"` Selective bool `json:"selective"` } // ImplementsReplyMarkup is a dummy method which exists to implement the interface ReplyMarkup. func (r ReplyKeyboardRemove) ImplementsReplyMarkup() {} // InlineKeyboardButton represents a button in an inline keyboard. type InlineKeyboardButton struct { CopyText *CopyTextButton `json:"copy_text,omitempty"` Disabled *DisabledButton `json:"disabled,omitempty"` CallbackGame *CallbackGame `json:"callback_game,omitempty"` WebApp *WebAppInfo `json:"web_app,omitempty"` LoginURL *LoginURL `json:"login_url,omitempty"` SwitchInlineQueryChosenChat *SwitchInlineQueryChosenChat `json:"switch_inline_query_chosen_chat,omitempty"` Text string `json:"text"` CallbackData string `json:"callback_data,omitempty"` SwitchInlineQuery string `json:"switch_inline_query,omitempty"` SwitchInlineQueryCurrentChat string `json:"switch_inline_query_current_chat,omitempty"` URL string `json:"url,omitempty"` IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"` Style string `json:"style,omitempty"` Pay bool `json:"pay,omitempty"` } // DisabledButton represents a disabled button which does nothing. type DisabledButton struct{} // CopyTextButton represents an inline keyboard button that copies specified text to the clipboard. type CopyTextButton struct { Text string `json:"text"` } // InlineKeyboardMarkup represents an inline keyboard. type InlineKeyboardMarkup struct { InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard" query:"inline_keyboard"` ForceReply bool `json:"force_reply,omitempty"` } // ImplementsReplyMarkup is a dummy method which exists to implement the interface ReplyMarkup. func (i InlineKeyboardMarkup) ImplementsReplyMarkup() {} // ForceReply is used to display a reply interface to the user (act as if the user has selected the bot's message and tapped 'Reply'). // This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. type ForceReply struct { InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"` ForceReply bool `json:"force_reply"` Selective bool `json:"selective"` } // ImplementsReplyMarkup is a dummy method which exists to implement the interface ReplyMarkup. func (f ForceReply) ImplementsReplyMarkup() {} // UpdateOptions contains the optional parameters used by the GetUpdates method. type UpdateOptions struct { AllowedUpdates []UpdateType `query:"allowed_updates"` Offset int `query:"offset"` Limit int `query:"limit"` Timeout int `query:"timeout"` } // WebhookOptions contains the optional parameters used by the SetWebhook method. type WebhookOptions struct { IPAddress string `query:"ip_address"` SecretToken string `query:"secret_token"` Certificate InputFile AllowedUpdates []UpdateType `query:"allowed_updates"` MaxConnections int `query:"max_connections"` } // BaseOptions contains the optional parameters used frequently in some Telegram API methods. type BaseOptions struct { SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` ReplyMarkup ReplyMarkup `query:"reply_markup"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // MessageOptions contains the optional parameters used by some Telegram API methods. type MessageOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` ParseMode ParseMode `query:"parse_mode"` LinkPreviewOptions LinkPreviewOptions `query:"link_preview_options"` Entities []MessageEntity `query:"entities"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int64 `query:"message_thread_id"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // PinMessageOptions contains the optional parameters used by the PinChatMember method. type PinMessageOptions struct { BusinessConnectionID string `query:"business_connection_id"` DisableNotification bool `query:"disable_notification"` } // UnpinMessageOptions contains the optional parameters used by the UnpinChatMember method. type UnpinMessageOptions struct { BusinessConnectionID string `query:"business_connection_id"` MessageID int `query:"message_id"` } // ForwardOptions contains the optional parameters used by the ForwardMessage and ForwardMessages methods. type ForwardOptions struct { SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` MessageEffectID string `query:"message_effect_id"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` VideoStartTimestamp int `query:"video_start_timestamp"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` } // CopyOptions contains the optional parameters used by the CopyMessage method. type CopyOptions struct { SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` MessageEffectID string `query:"message_effect_id"` ParseMode ParseMode `query:"parse_mode"` Caption string `query:"caption"` CaptionEntities []MessageEntity `query:"caption_entities"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` VideoStartTimestamp int `query:"video_start_timestamp"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` ShowCaptionAboveMedia bool `query:"show_caption_above_media"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // CopyMessagesOptions contains the optional parameters used by the CopyMessages methods. type CopyMessagesOptions struct { DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` VideoStartTimestamp int `query:"video_start_timestamp"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` RemoveCaption bool `query:"remove_caption"` } // StickerOptions contains the optional parameters used by the SendSticker method. type StickerOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` BusinessConnectionID string `query:"business_connection_id"` Emoji string `query:"emoji"` MessageEffectID string `query:"message_effect_id"` ReplyMarkup ReplyMarkup `query:"reply_markup"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // InputFile is a struct which contains data about a file to be sent. type InputFile struct { id string path string url string content []byte } // ref returns the reference to a file already on the Telegram servers or on the web. func (i InputFile) ref() string { if i.id != "" { return i.id } return i.url } // NewInputFileID is a wrapper for InputFile which only fills the id field. func NewInputFileID(ID string) InputFile { return InputFile{id: ID} } // NewInputFilePath is a wrapper for InputFile which only fills the path field. func NewInputFilePath(filePath string) InputFile { return InputFile{path: filePath} } // NewInputFileURL is a wrapper for InputFile which only fills the url field. func NewInputFileURL(url string) InputFile { return InputFile{url: url} } // NewInputFileBytes is a wrapper for InputFile which only fills the path and content fields. func NewInputFileBytes(fileName string, content []byte) InputFile { return InputFile{path: fileName, content: content} } // PhotoOptions contains the optional parameters used by the SendPhoto method. type PhotoOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` ParseMode ParseMode `query:"parse_mode"` Caption string `query:"caption"` CaptionEntities []MessageEntity `query:"caption_entities"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` HasSpoiler bool `query:"has_spoiler"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` ShowCaptionAboveMedia bool `query:"show_caption_above_media"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // AudioOptions contains the optional parameters used by the SendAudio method. type AudioOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` Title string `query:"title"` MessageEffectID string `query:"message_effect_id"` ParseMode ParseMode `query:"parse_mode"` Caption string `query:"caption"` Performer string `query:"performer"` BusinessConnectionID string `query:"business_connection_id"` Thumbnail InputFile CaptionEntities []MessageEntity `query:"caption_entities"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` Duration int `query:"duration"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // DocumentOptions contains the optional parameters used by the SendDocument method. type DocumentOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` ParseMode ParseMode `query:"parse_mode"` Caption string `query:"caption"` Thumbnail InputFile CaptionEntities []MessageEntity `query:"caption_entities"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` DisableContentTypeDetection bool `query:"disable_content_type_detection"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // VideoOptions contains the optional parameters used by the SendVideo method. // TODO: handle the cover correctly. type VideoOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` BusinessConnectionID string `query:"business_connection_id"` Caption string `query:"caption"` MessageEffectID string `query:"message_effect_id"` ParseMode ParseMode `query:"parse_mode"` Thumbnail InputFile Cover InputFile CaptionEntities []MessageEntity `query:"caption_entities"` ReplyParameters ReplyParameters `query:"reply_parameters"` MessageThreadID int `query:"message_thread_id"` Duration int `query:"duration"` Width int `query:"width"` Height int `query:"height"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` StartTimestamp int `query:"start_timestamp"` HasSpoiler bool `query:"has_spoiler"` SupportsStreaming bool `query:"supports_streaming"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` ShowCaptionAboveMedia bool `query:"show_caption_above_media"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // AnimationOptions contains the optional parameters used by the SendAnimation method. type AnimationOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` ParseMode ParseMode `query:"parse_mode"` Caption string `query:"caption"` Thumbnail InputFile CaptionEntities []MessageEntity `query:"caption_entities"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` Duration int `query:"duration"` Width int `query:"width"` Height int `query:"height"` HasSpoiler bool `query:"has_spoiler"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` ShowCaptionAboveMedia bool `query:"show_caption_above_media"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // VoiceOptions contains the optional parameters used by the SendVoice method. type VoiceOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` ParseMode ParseMode `query:"parse_mode"` Caption string `query:"caption"` CaptionEntities []MessageEntity `query:"caption_entities"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` Duration int `query:"duration"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // VideoNoteOptions contains the optional parameters used by the SendVideoNote method. type VideoNoteOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` Thumbnail InputFile ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` Duration int `query:"duration"` Length int `query:"length"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // PaidMediaOptions contains the optional parameters used by the SendPaidMedia method. type PaidMediaOptions struct { SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` Caption string `query:"caption"` Payload string `query:"payload"` ParseMode ParseMode `query:"parse_mode"` CaptionEntities []MessageEntity `query:"caption_entities"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` ShowCaptionAboveMedia bool `query:"show_caption_above_media"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // MediaGroupOptions contains the optional parameters used by the SendMediaGroup method. type MediaGroupOptions struct { BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // This is a custom constant to set an infinite live period value in LocationOptions and EditLocationOptions. const InfiniteLivePeriod = 0x7FFFFFFF // LocationOptions contains the optional parameters used by the SendLocation method. type LocationOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` ReplyMarkup ReplyMarkup `query:"reply_markup"` ReplyParameters ReplyParameters `query:"reply_parameters"` HorizontalAccuracy float64 `query:"horizontal_accuracy"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` LivePeriod int `query:"live_period"` ProximityAlertRadius int `query:"proximity_alert_radius"` Heading int `query:"heading"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // EditLocationOptions contains the optional parameters used by the EditMessageLiveLocation method. type EditLocationOptions struct { BusinessConnectionID string `query:"business_connection_id"` ReplyMarkup InlineKeyboardMarkup `query:"reply_markup"` HorizontalAccuracy float64 `query:"horizontal_accuracy"` Heading int `query:"heading"` LivePeriod int `query:"live_period"` ProximityAlertRadius int `query:"proximity_alert_radius"` } // StopLocationOptions contains the optional parameters used by the StopMessageLiveLocation method. type StopLocationOptions struct { ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` } // VenueOptions contains the optional parameters used by the SendVenue method. type VenueOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` FoursquareID string `query:"foursquare_id"` FoursquareType string `query:"foursquare_type"` GooglePlaceType string `query:"google_place_type"` GooglePlaceID string `query:"google_place_id"` MessageEffectID string `query:"message_effect_id"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // ContactOptions contains the optional parameters used by the SendContact method. type ContactOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` VCard string `query:"vcard"` LastName string `query:"last_name"` MessageEffectID string `query:"message_effect_id"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // PollOptions contains the optional parameters used by the SendPoll method. // Media and ExplanationMedia can be an InputMediaAnimation, InputMediaAudio, InputMediaDocument, // InputMediaLivePhoto, InputMediaLocation, InputMediaPhoto, InputMediaVenue or InputMediaVideo. type PollOptions struct { ReplyMarkup ReplyMarkup `query:"reply_markup"` Media InputMedia `query:"media"` ExplanationMedia InputMedia `query:"explanation_media"` BusinessConnectionID string `query:"business_connection_id"` Explanation string `query:"explanation"` Description string `query:"description"` MessageEffectID string `query:"message_effect_id"` ExplanationParseMode ParseMode `query:"explanation_parse_mode"` QuestionParseMode ParseMode `query:"question_parse_mode"` DescriptionParseMode ParseMode `query:"description_parse_mode"` Type PollType `query:"type"` ExplanationEntities []MessageEntity `query:"explanation_entities"` QuestionEntities []MessageEntity `query:"question_entities"` DescriptionEntities []MessageEntity `query:"description_entities"` CountryCodes []string `query:"country_codes"` CorrectOptionIDs []int `query:"correct_option_ids"` ReplyParameters ReplyParameters `query:"reply_parameters"` MessageThreadID int `query:"message_thread_id"` CloseDate int `query:"close_date"` OpenPeriod int `query:"open_period"` IsClosed bool `query:"is_closed"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowsMultipleAnswers bool `query:"allows_multiple_answers"` AllowsRevoting bool `query:"allows_revoting"` ShuffleOptions bool `query:"shuffle_options"` AllowAddingOptions bool `query:"allow_adding_options"` HideResultsUntilCloses bool `query:"hide_results_until_closes"` MembersOnly bool `query:"members_only"` IsAnonymous bool `query:"is_anonymous"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // StopPollOptions contains the optional parameters used by the StopPoll method. type StopPollOptions struct { ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` } // BanOptions contains the optional parameters used by the BanChatMember method. type BanOptions struct { UntilDate int `query:"until_date"` RevokeMessages bool `query:"revoke_messages"` } // UnbanOptions contains the optional parameters used by the UnbanChatMember method. type UnbanOptions struct { OnlyIfBanned bool `query:"only_if_banned"` } // RestrictOptions contains the optional parameters used by the RestrictChatMember method. type RestrictOptions struct { UseIndependentChatPermissions bool `query:"use_independent_chat_permissions"` UntilDate int `query:"until_date"` } // PromoteOptions contains the optional parameters used by the PromoteChatMember method. type PromoteOptions struct { IsAnonymous bool `query:"is_anonymous"` CanManageChat bool `query:"can_manage_chat"` CanPostMessages bool `query:"can_post_messages"` CanEditMessages bool `query:"can_edit_messages"` CanDeleteMessages bool `query:"can_delete_messages"` CanManageVideoChats bool `query:"can_manage_video_chats"` CanRestrictMembers bool `query:"can_restrict_members"` CanPromoteMembers bool `query:"can_promote_members"` CanChangeInfo bool `query:"can_change_info"` CanInviteUsers bool `query:"can_invite_users"` CanPinMessages bool `query:"can_pin_messages"` CanPostStories bool `query:"can_post_stories"` CanEditStories bool `query:"can_edit_stories"` CanDeleteStories bool `query:"can_delete_stories"` CanManageTopics bool `query:"can_manage_topics"` CanManageDirectMessages bool `query:"can_manage_direct_messages"` CanManageTags bool `query:"can_manage_tags"` CanSendWelcomeMessages bool `query:"can_send_welcome_messages"` } // UserProfileOptions contains the optional parameters used by the GetUserProfilePhotos method. type UserProfileOptions struct { Offset int `query:"offset"` Limit int `query:"limit"` } // UserEmojiStatusOptions contains the optional parameters used by the SetUserEmojiStatus method. type UserEmojiStatusOptions struct { EmojiStatusCustomEmojiID string `query:"emoji_status_custom_emoji_id"` EmojiStatusExpirationDate string `query:"emoji_status_expiration_date"` } // ChatPermissionsOptions contains the optional parameters used by the SetChatPermissions method. type ChatPermissionsOptions struct { UseIndependentChatPermissions bool `query:"use_independent_chat_permissions"` } // InviteLinkOptions contains the optional parameters used by the CreateChatInviteLink and EditChatInviteLink methods. type InviteLinkOptions struct { Name string `query:"name"` ExpireDate int64 `query:"expire_date"` MemberLimit int `query:"member_limit"` CreatesJoinRequest bool `query:"creates_join_request"` } // ChatSubscriptionInviteOptions contains the optional parameters used by the CreateChatSubscriptionInviteLink and EditChatSubscriptionInviteLink methods. type ChatSubscriptionInviteOptions struct { Name string `query:"name"` } // CallbackQueryOptions contains the optional parameters used by the AnswerCallbackQuery method. type CallbackQueryOptions struct { Text string `query:"text"` URL string `query:"url"` CacheTime int `query:"cache_time"` ShowAlert bool `query:"show_alert"` } // MessageIDOptions is a struct which contains data about a message to edit. type MessageIDOptions struct { inlineMessageID string `query:"inline_message_id"` chatID int64 `query:"chat_id"` messageID int `query:"message_id"` } // NewMessageID is a wrapper for MessageIDOptions which only fills the chatID and messageID fields. func NewMessageID(chatID int64, messageID int) MessageIDOptions { return MessageIDOptions{chatID: chatID, messageID: messageID} } // NewInlineMessageID is a wrapper for MessageIDOptions which only fills the inlineMessageID fields. func NewInlineMessageID(ID string) MessageIDOptions { return MessageIDOptions{inlineMessageID: ID} } // MessageTextOptions contains the optional parameters used by the EditMessageText method. type MessageTextOptions struct { RichMessage *InputRichMessage `query:"rich_message"` ParseMode ParseMode `query:"parse_mode"` BusinessConnectionID string `query:"business_connection_id"` Entities []MessageEntity `query:"entities"` ReplyMarkup InlineKeyboardMarkup `query:"reply_markup"` LinkPreviewOptions LinkPreviewOptions `query:"link_preview_options"` } // MessageCaptionOptions contains the optional parameters used by the EditMessageCaption method. type MessageCaptionOptions struct { Caption string `query:"caption"` BusinessConnectionID string `query:"business_connection_id"` ParseMode ParseMode `query:"parse_mode"` CaptionEntities []MessageEntity `query:"caption_entities"` ReplyMarkup InlineKeyboardMarkup `query:"reply_markup"` ShowCaptionAboveMedia bool `query:"show_caption_above_media"` } // MessageMediaOptions contains the optional parameters used by the EditMessageMedia method. type MessageMediaOptions struct { ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` } // MessageReplyMarkupOptions contains the optional parameters used by the EditMessageReplyMarkup method. type MessageReplyMarkupOptions struct { BusinessConnectionID string `query:"business_connection_id"` ReplyMarkup InlineKeyboardMarkup `query:"reply_markup"` } // CommandOptions contains the optional parameters used by the SetMyCommands, DeleteMyCommands and GetMyCommands methods. type CommandOptions struct { LanguageCode string `query:"language_code"` Scope BotCommandScope `query:"scope"` } // InvoiceOptions contains the optional parameters used by the SendInvoice API method. type InvoiceOptions struct { SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` StartParameter string `query:"start_parameter"` ProviderData string `query:"provider_data"` PhotoURL string `query:"photo_url"` ProviderToken string `query:"provider_token"` MessageEffectID string `query:"message_effect_id"` ReplyMarkup InlineKeyboardMarkup `query:"reply_markup"` SuggestedTipAmount []int `query:"suggested_tip_amounts"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MaxTipAmount int `query:"max_tip_amount"` PhotoSize int `query:"photo_size"` PhotoWidth int `query:"photo_width"` PhotoHeight int `query:"photo_height"` MessageThreadID int `query:"message_thread_id"` SendPhoneNumberToProvider bool `query:"send_phone_number_to_provider"` NeedShippingAddress bool `query:"need_shipping_address"` NeedPhoneNumber bool `query:"need_phone_number"` SendEmailToProvider bool `query:"send_email_to_provider"` IsFlexible bool `query:"is_flexible"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` NeedName bool `query:"need_name"` NeedEmail bool `query:"need_email"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // CreateInvoiceLinkOptions contains the optional parameters used by the CreateInvoiceLink API method. // Currently, SubscriptionPeriod should always be set to 2592000 (30 days) if specified. type CreateInvoiceLinkOptions struct { ProviderData string `query:"provider_data"` PhotoURL string `query:"photo_url"` ProviderToken string `query:"provider_token"` BusinessConnectionID string `query:"business_connection_id"` SuggestedTipAmounts []int `query:"suggested_tip_amounts"` PhotoSize int `query:"photo_size"` PhotoWidth int `query:"photo_width"` PhotoHeight int `query:"photo_height"` MaxTipAmount int `query:"max_tip_amount"` SubscriptionPeriod int `query:"subscription_period"` NeedPhoneNumber bool `query:"need_phone_number"` NeepShippingAddress bool `query:"need_shipping_address"` SendPhoneNumberToProvider bool `query:"send_phone_number_to_provider"` SendEmailToProvider bool `query:"send_email_to_provider"` IsFlexible bool `query:"is_flexible"` NeedName bool `query:"need_name"` NeedEmail bool `query:"need_email"` } // ShippingOption represents one shipping option. type ShippingOption struct { ID string `query:"id"` Title string `query:"title"` Prices []LabeledPrice `query:"prices"` } // ShippingQueryOptions contains the optional parameters used by the AnswerShippingQuery API method. type ShippingQueryOptions struct { ErrorMessage string `query:"error_message"` ShippingOptions []ShippingOption `query:"shipping_options"` } // PreCheckoutOptions contains the optional parameters used by the AnswerPreCheckoutQuery API method. type PreCheckoutOptions struct { ErrorMessage string `query:"error_message"` } // CreateTopicOptions contains the optional parameters used by the CreateForumTopic API method. type CreateTopicOptions struct { IconCustomEmojiID string `query:"icon_custom_emoji_id"` IconColor IconColor `query:"icon_color"` } // EditTopicOptions contains the optional parameters used by the EditForumTopic API method. type EditTopicOptions struct { Name string `query:"name"` IconCustomEmojiID string `query:"icon_custom_emoji_id"` } // ChatActionOptions contains the optional parameters used by the SendChatAction API method. type ChatActionOptions struct { BusinessConnectionID string `query:"business_connection_id"` MessageThreadID int `query:"message_thread_id"` } // MessageReactionOptions contains the optional parameters used by the SetMessageReaction API method. type MessageReactionOptions struct { Reaction []ReactionType `query:"reaction"` IsBig bool `query:"is_big"` } // GiftOptions contains the optional parameters used by the SendGift API method. type GiftOptions struct { Text string `query:"text"` TextParseMode string `query:"text_parse_mode"` TextEntities []MessageEntity `query:"text_entities"` ChatID int64 `query:"chat_id"` PayForUpgrade bool `query:"pay_for_upgrade"` } // VerifyOptions contains the optional parameters used by the VerifyUser and VerifyChat API methods. type VerifyOptions struct { CustomDescription string `query:"custom_description"` } // UserProfileAudiosOptions contains the optional parameters used by the GetUserProfileAudios method. type UserProfileAudiosOptions struct { Offset int `query:"offset"` Limit int `query:"limit"` } // ApproveSuggestedPostOptions contains the optional parameters used by the ApproveSuggestedPost method. type ApproveSuggestedPostOptions struct { SendDate int `query:"send_date"` } // DeclineSuggestedPostOptions contains the optional parameters used by the DeclineSuggestedPost method. type DeclineSuggestedPostOptions struct { Comment string `query:"comment"` } // GetUserGiftsOptions contains the optional parameters used by the GetUserGifts method. type GetUserGiftsOptions struct { Offset string `query:"offset"` Limit int `query:"limit"` ExcludeUnlimited bool `query:"exclude_unlimited"` ExcludeLimitedUpgradable bool `query:"exclude_limited_upgradable"` ExcludeLimitedNonUpgradable bool `query:"exclude_limited_non_upgradable"` ExcludeFromBlockchain bool `query:"exclude_from_blockchain"` ExcludeUnique bool `query:"exclude_unique"` SortByPrice bool `query:"sort_by_price"` } // GetChatGiftsOptions contains the optional parameters used by the GetChatGifts method. type GetChatGiftsOptions struct { Offset string `query:"offset"` Limit int `query:"limit"` ExcludeUnsaved bool `query:"exclude_unsaved"` ExcludeSaved bool `query:"exclude_saved"` ExcludeUnlimited bool `query:"exclude_unlimited"` ExcludeLimitedUpgradable bool `query:"exclude_limited_upgradable"` ExcludeLimitedNonUpgradable bool `query:"exclude_limited_non_upgradable"` ExcludeFromBlockchain bool `query:"exclude_from_blockchain"` ExcludeUnique bool `query:"exclude_unique"` SortByPrice bool `query:"sort_by_price"` } // SendMessageDraftOptions contains the optional parameters used by the SendMessageDraft method. type SendMessageDraftOptions struct { ParseMode ParseMode `query:"parse_mode"` Entities []MessageEntity `query:"entities"` MessageThreadID int `query:"message_thread_id"` CanStop bool `query:"can_stop"` KeepOnStop bool `query:"keep_on_stop"` } // GetBusinessAccountGiftsOptions contains the optional parameters used by the GetBusinessAccountGifts method. type GetBusinessAccountGiftsOptions struct { Offset string `query:"offset"` Limit int `query:"limit"` ExcludeUnsaved bool `query:"exclude_unsaved"` ExcludeSaved bool `query:"exclude_saved"` ExcludeUnlimited bool `query:"exclude_unlimited"` ExcludeLimitedUpgradable bool `query:"exclude_limited_upgradable"` ExcludeLimitedNonUpgradable bool `query:"exclude_limited_non_upgradable"` ExcludeFromBlockchain bool `query:"exclude_from_blockchain"` ExcludeUnique bool `query:"exclude_unique"` SortByPrice bool `query:"sort_by_price"` } // UpgradeGiftOptions contains the optional parameters used by the UpgradeGift method. type UpgradeGiftOptions struct { KeepOriginalDetails bool `query:"keep_original_details"` StarCount int `query:"star_count"` } // TransferGiftOptions contains the optional parameters used by the TransferGift method. type TransferGiftOptions struct { StarCount int `query:"star_count"` } // SendChecklistOptions contains the optional parameters used by the SendChecklist method. type SendChecklistOptions struct { ReplyParameters *ReplyParameters `query:"reply_parameters"` ReplyMarkup *InlineKeyboardMarkup `query:"reply_markup"` MessageEffectID string `query:"message_effect_id"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` } // EditMessageChecklistOptions contains the optional parameters used by the EditMessageChecklist method. type EditMessageChecklistOptions struct { ReplyMarkup *InlineKeyboardMarkup `query:"reply_markup"` } // PostStoryOptions contains the optional parameters used by the PostStory method. type PostStoryOptions struct { Caption string `query:"caption"` ParseMode ParseMode `query:"parse_mode"` CaptionEntities []MessageEntity `query:"caption_entities"` Areas []StoryArea `query:"areas"` PostToChatPage bool `query:"post_to_chat_page"` ProtectContent bool `query:"protect_content"` } // EditStoryOptions contains the optional parameters used by the EditStory method. type EditStoryOptions struct { Caption string `query:"caption"` ParseMode ParseMode `query:"parse_mode"` CaptionEntities []MessageEntity `query:"caption_entities"` Areas []StoryArea `query:"areas"` } // SetBusinessAccountProfilePhotoOptions contains the optional parameters used by the SetBusinessAccountProfilePhoto method. type SetBusinessAccountProfilePhotoOptions struct { IsPublic bool `query:"is_public"` } // RemoveBusinessAccountProfilePhotoOptions contains the optional parameters used by the RemoveBusinessAccountProfilePhoto method. type RemoveBusinessAccountProfilePhotoOptions struct { IsPublic bool `query:"is_public"` } // ChatMemberTagOptions contains the optional parameters used by the SetChatMemberTag method. type ChatMemberTagOptions struct { Tag string `query:"tag"` } // SendLivePhotoOptions contains the optional parameters used by the SendLivePhoto method. type SendLivePhotoOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` ParseMode ParseMode `query:"parse_mode"` Caption string `query:"caption"` CaptionEntities []MessageEntity `query:"caption_entities"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` HasSpoiler bool `query:"has_spoiler"` ShowCaptionAboveMedia bool `query:"show_caption_above_media"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // SendRichMessageOptions contains the optional parameters used by the SendRichMessage method. type SendRichMessageOptions struct { EphemeralMessageParameters *EphemeralMessageParameters `query:"ephemeral_message_parameters"` SuggestedPostParameters *SuggestedPostParameters `query:"suggested_post_parameters"` ReplyMarkup ReplyMarkup `query:"reply_markup"` BusinessConnectionID string `query:"business_connection_id"` MessageEffectID string `query:"message_effect_id"` ReplyParameters ReplyParameters `query:"reply_parameters"` DirectMessagesTopicID int64 `query:"direct_messages_topic_id"` MessageThreadID int `query:"message_thread_id"` DisableNotification bool `query:"disable_notification"` ProtectContent bool `query:"protect_content"` AllowPaidBroadcast bool `query:"allow_paid_broadcast"` } // SendRichMessageDraftOptions contains the optional parameters used by the SendRichMessageDraft method. type SendRichMessageDraftOptions struct { MessageThreadID int `query:"message_thread_id"` CanStop bool `query:"can_stop"` KeepOnStop bool `query:"keep_on_stop"` } // GiftPremiumSubscriptionOptions contains the optional parameters used by the GiftPremiumSubscription method. type GiftPremiumSubscriptionOptions struct { TextParseMode string `query:"text_parse_mode"` Text string `query:"text"` TextEntities []MessageEntity `query:"text_entities"` } // DeleteMessageReactionOptions contains the optional parameters used by the DeleteMessageReaction method. type DeleteMessageReactionOptions struct { UserID int64 `query:"user_id"` ActorChatID int64 `query:"actor_chat_id"` } // DeleteAllMessageReactionsOptions contains the optional parameters used by the DeleteAllMessageReactions method. type DeleteAllMessageReactionsOptions struct { UserID int64 `query:"user_id"` ActorChatID int64 `query:"actor_chat_id"` } // SetManagedBotAccessSettingsOptions contains the optional parameters used by the SetManagedBotAccessSettings method. type SetManagedBotAccessSettingsOptions struct { AddedUserIDs []int64 `query:"added_user_ids"` } // ChatAdministratorsOptions contains the optional parameters used by the GetChatAdministrators method. type ChatAdministratorsOptions struct { ReturnBots bool `query:"return_bots"` } // EphemeralMessageParameters describes the parameters of an ephemeral message, // which is visible only to a specific user and the bot. type EphemeralMessageParameters struct { CallbackQueryID string `json:"callback_query_id,omitempty"` ReceiverUserID int64 `json:"receiver_user_id"` ReplaceCallbackQueryMessage bool `json:"replace_callback_query_message,omitempty"` } // ephemeralMessage identifies an ephemeral message in the EditEphemeralMessage* and DeleteEphemeralMessage methods. type ephemeralMessage struct { chatID int64 `query:"chat_id"` receiverUserID int64 `query:"receiver_user_id"` ephemeralMessageID int `query:"ephemeral_message_id"` } // EphemeralTextOptions contains the optional parameters used by the EditEphemeralMessageText method. type EphemeralTextOptions struct { RichMessage *InputRichMessage `query:"rich_message"` ParseMode ParseMode `query:"parse_mode"` Entities []MessageEntity `query:"entities"` LinkPreviewOptions LinkPreviewOptions `query:"link_preview_options"` ReplyMarkup InlineKeyboardMarkup `query:"reply_markup"` } // EphemeralCaptionOptions contains the optional parameters used by the EditEphemeralMessageCaption method. type EphemeralCaptionOptions struct { Caption string `query:"caption"` ParseMode ParseMode `query:"parse_mode"` CaptionEntities []MessageEntity `query:"caption_entities"` ReplyMarkup InlineKeyboardMarkup `query:"reply_markup"` ShowCaptionAboveMedia bool `query:"show_caption_above_media"` } // EphemeralReplyMarkupOptions contains the optional parameters used by the // EditEphemeralMessageMedia and EditEphemeralMessageReplyMarkup methods. type EphemeralReplyMarkupOptions struct { ReplyMarkup InlineKeyboardMarkup `query:"reply_markup"` }