// Response represents a response from the Telegram API with the result stored raw. If ok equals true, the request was successful, and the result of the query can be found in the result field. In case of an unsuccessful request, ok equals false, and the error is explained in the error field.
Responsestruct{
Okbool`json:"ok"`
ErrorCodestring`json:"error_code"`
Descriptionstring`json:"description"`
Result*json.RawMessage`json:"result"`
Parameters*ResponseParameters`json:"parameters"`
}
// Update represents an incoming update.
//
// At most one of the optional parameters can be present in any given update.
Updatestruct{
// The update‘s unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you’re using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order.
IDint`json:"update_id"`
// New incoming message of any kind — text, photo, sticker, etc.
Message*Message`json:"message"`// optional
// New version of a message that is known to the bot and was edited
// For forwarded messages, date the original message was sent in Unix time
ForwardDateint`json:"forward_date"`// optional
// For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
// Service message: the supergroup has been created. This field can‘t be received in a message coming through updates, because bot can’t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
// Service message: the channel has been created. This field can‘t be received in a message coming through updates, because bot can’t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
// Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
// MessageEntity represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
MessageEntitystruct{
// Type of the entity. Can be mention (@username), hashtag, bot_command, url, email, bold (bold text), italic (italic text), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs), text_mention (for users without usernames)
Typestring`json:"type"`
// Offset in UTF-16 code units to the start of the entity
Offsetint`json:"offset"`
// Length of the entity in UTF-16 code units
Lengthint`json:"length"`
// For “text_link” only, url that will be opened after user taps on the text
Urlstring`json:"url"`// optional
// For “text_mention” only, the mentioned user
User*User`json:"user"`// optional
}
// PhotoSize represents one size of a photo or a file / sticker thumbnail.
PhotoSizestruct{
// Unique identifier for this file
FileIDstring`json:"file_id"`
// Photo width
Widthint`json:"width"`
// Photo height
Heightint`json:"height"`
// File size
FileSizeint`json:"file_size"`// optional
}
// Audio represents an audio file to be treated as music by the Telegram clients.
Audiostruct{
// Unique identifier for this file
FileIDstring`json:"file_id"`
// Duration of the audio in seconds as defined by sender
Durationint`json:"duration"`
// Performer of the audio as defined by sender or by audio tags
Performerstring`json:"performer"`// optional
// Title of the audio as defined by sender or by audio tags
Titlestring`json:"title"`// optional
// MIME type of the file as defined by sender
MimeTypestring`json:"mime_type"`// optional
// File size
FileSizeint`json:"file_size"`// optional
}
// Document represents a general file (as opposed to photos, voice messages and audio files).
Documentstruct{
// Unique file identifier
FileIDstring`json:"file_id"`
// Document thumbnail as defined by sender
Thumb*PhotoSize`json:"thumb"`// optional
// Original filename as defined by sender
FileNamestring`json:"file_name"`// optional
// MIME type of the file as defined by sender
MimeTypestring`json:"mime_type"`// optional
// File size
FileSizeint`json:"file_size"`// optional
}
// Video represents a video file.
Videostruct{
// Unique identifier for this file
FileIDstring`json:"file_id"`
// Video width as defined by sender
Widthint`json:"width"`
// Video height as defined by sender
Heightint`json:"height"`
// Duration of the video in seconds as defined by sender
Durationint`json:"duration"`
// Video thumbnail
Thumb*PhotoSize`json:"thumb"`// optional
// Mime type of a file as defined by sender
MimeTypestring`json:"mime_type"`// optional
// File size
FileSizeint`json:"file_size"`// optional
}
// Voice represents a voice note.
Voicestruct{
// Unique identifier for this file
FileIDstring`json:"file_id"`
// Duration of the audio in seconds as defined by sender
Durationint`json:"duration"`
// MIME type of the file as defined by sender
MimeTypestring`json:"mime_type"`// optional
// File size
FileSizeint`json:"file_size"`// optional
}
// VideoNote represents a video message (available in Telegram apps as of v.4.0).
// UserProfilePhotos represent a user's profile pictures.
UserProfilePhotosstruct{
// Total number of profile pictures the target user has
TotalCountint`json:"total_count"`
// Requested profile pictures (in up to 4 sizes each)
Photos[]*[]PhotoSize`json:"photos"`
}
// File represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.
//
// Maximum file size to download is 20 MB
Filestruct{
// Unique identifier for this file
FileIDstring`json:"file_id"`
// File size, if known
FileSizeint`json:"file_size"`// optional
// File path. Use https://api.telegram.org/file/bot<token>/<file_path> to get the file.
FilePathstring`json:"file_path"`// optional
}
// ReplyKeyboardMarkup represents a custom keyboard with reply options (see Introduction to bots for details and examples).
ReplyKeyboardMarkupstruct{
// Array of button rows, each represented by an Array of KeyboardButton objects
keyboard[][]KeyboardButton`json:"keyboard"`
// Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). Defaults to false, in which case the custom keyboard is always of the same height as the app's standard keyboard.
// Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again. Defaults to false.
// Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
//
// Example: A user requests to 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.
selectivebool`json:"selective"`// optional
}
// KeyboardButton represents one button of the reply keyboard. For simple text buttons String can be used instead of this object to specify text of the button. Optional fields are mutually exclusive.
KeyboardButtonstruct{
// Text of the button. If none of the optional fields are used, it will be sent to the bot as a message when the button is pressed
Textstring`json:"text"`
// If True, the user's phone number will be sent as a contact when the button is pressed. Available in private chats only
// ReplyKeyboardRemove will 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).
ReplyKeyboardRemovestruct{
// Requests clients to remove the custom keyboard (user will not be able to summon this keyboard; if you want to hide the keyboard from sight but keep it accessible, use one_time_keyboard in ReplyKeyboardMarkup)
SemoveKeyboardbool`json:"remove_keyboard"`
// Use this parameter if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
//
// Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet.
Selectivebool`json:"selective"`// optional
}
// InlineKeyboardMarkup represents an inline keyboard that appears right next to the message it belongs to.
InlineKeyboardMarkupstruct{
// Array of button rows, each represented by an Array of InlineKeyboardButton objects
// If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot‘s username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.
//
// Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. Especially useful when combined with switch_pm… actions – in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen.
// If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot’s username will be inserted.
//
// This offers a quick way for the user to open your bot in inline mode in the same chat – good for selecting something from multiple options.
// NOTE: This type of button must always be the first button in the first row.
Paybool`json:"pay"`// optional
}
// CallbackQuery represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
//
// NOTE: After the user presses a callback button, Telegram clients will display a progress bar until you call answerCallbackQuery. It is, therefore, necessary to react by calling answerCallbackQuery even if no notification to the user is needed (e.g., without specifying any of the optional parameters).
CallbackQuerystruct{
// Unique identifier for this query
IDstring`json:"id"`
// Sender
From*User`json:"from"`
// Message with the callback button that originated the query. Note that message content and message date will not be available if the message is too old
Message*Message`json:"message"`// optional
// Identifier of the message sent via the bot in inline mode, that originated the query.
// ForceReply 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.
ForceReplystruct{
// Shows reply interface to the user, as if they manually selected the bot‘s message and tapped ’Reply'
ForceReplybool`json:"force_reply"`
// Use this parameter if you want to force reply from specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.
Selectivebool`json:"selective"`// optional
}
// ChatPhoto represents a chat photo.
ChatPhotostruct{
// Unique file identifier of small (160x160) chat photo. This file_id can be used only for photo download.
SmallFileIDstring`json:"small_file_id"`
// Unique file identifier of big (640x640) chat photo. This file_id can be used only for photo download.
BigFileIDstring`json:"big_file_id"`
}
// ChatMember contains information about one member of a chat.
ChatMemberstruct{
// Information about the user
User*User`json:"user"`
// The member's status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked”
Statusstring`json:"status"`
// Restictred and kicked only. Date when restrictions will be lifted for this user, unix time
UntilDateint`json:"until_date"`// optional
// Administrators only. True, if the bot is allowed to edit administrator privileges of that user
CanBeEditedbool`json:"can_be_edited"`// optional
// Administrators only. True, if the administrator can change the chat title, photo and other settings
// Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)
// In case of exceeding flood control, the number of seconds left to wait before the request can be repeated
RetryAfterint`json:"retry_after"`// optional
}
// InputFile represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.
InputFileinterface{}
// Sticker represents a sticker.
Stickerstruct{
// Unique identifier for this file
FileIDstring`json:"file_id"`
// Sticker width
Widthint`json:"width"`
// Sticker height
Heightint`json:"height"`
// Sticker thumbnail in the .webp or .jpg format
Thumb*PhotoSize`json:"thumb"`// optional
// Emoji associated with the sticker
Emojistring`json:"emoji"`// optional
// Name of the sticker set to which the sticker belongs
SetNamestring`json:"set_name"`// optional
// For mask stickers, the position where the mask should be placed
// MaskPosition describes the position on faces where a mask should be placed by default.
MaskPositionstruct{
// The part of the face relative to which the mask should be placed. One of “forehead”, “eyes”, “mouth”, or “chin”.
Pointstring`json:"point"`
// Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position.
XShiftfloat32`json:"x_shift"`
// Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.
YShiftfloat32`json:"y_shift"`
// Mask scaling coefficient. For example, 2.0 means double size.
Scalefloat32`json:"scale"`
}
// InlineQuery represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
InlineQuerystruct{
// Unique identifier for this query
IDstring`json:"id"`
// Sender
From*User`json:"from"`
// Sender location, only for bots that request user location
Location*Location`json:"location"`// optional
// Text of the query (up to 512 characters)
Querystring`json:"query"`
// Offset of the results to be returned, can be controlled by the bot
Offsetstring`json:"offset"`
}
// InlineQueryResultArticle represents a link to an article or web page.
// Pass True, if you don't want the URL to be shown in the message
HideURLbool`json:"hide_url"`// optional
// Short description of the result
Descriptionstring`json:"description"`// optional
// Url of the thumbnail for the result
ThumbURLstring`json:"thumb_url"`// optional
// Thumbnail width
ThumbWidthint`json:"thumb_width"`// optional
// Thumbnail height
ThumbHeightint`json:"thumb_height"`// optional
}
// InlineQueryResultPhoto represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
InlineQueryResultPhotostruct{
// Type of the result, must be photo
Typestring`json:"type"`
// Unique identifier for this result, 1-64 bytes
IDstring`json:"id"`
// A valid URL of the photo. Photo must be in jpeg format. Photo size must not exceed 5MB
PhotoURLstring`json:"photo_url"`
// URL of the thumbnail for the photo
thumb_urlstring`json:"thumb_url"`
// Width of the photo
photo_widthint`json:"photo_width"`// optional
// Height of the photo
photo_heightint`json:"photo_height"`// optional
// Title for the result
Titlestring`json:"title"`// optional
// Short description of the result
Descriptionstring`json:"description"`// optional
// Caption of the photo to be sent, 0-200 characters
// InlineQueryResultGif represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
InlineQueryResultGifstruct{
// Type of the result, must be gif
Typestring`json:"type"`
// Unique identifier for this result, 1-64 bytes
IDstring`json:"id"`
// A valid URL for the GIF file. File size must not exceed 1MB
GifURLstring`json:"gif_url"`
// Width of the GIF
GifWidthint`json:"gif_width"`// optional
// Height of the GIF
GifHeightint`json:"gif_height"`// optional
// Duration of the GIF
GifDurationint`json:"gif_duration"`// optional
// URL of the static thumbnail for the result (jpeg or gif)
ThumbURLstring`json:"thumb_url"`
// Title for the result
Titlestring`json:"title"`// optional
// Caption of the GIF file to be sent, 0-200 characters
// InlineQueryResultMpeg4Gif represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
InlineQueryResultMpeg4Gifstruct{
// Type of the result, must be mpeg4_gif
Typestring`json:"type"`
// Unique identifier for this result, 1-64 bytes
IDstring`json:"id"`
// A valid URL for the MP4 file. File size must not exceed 1MB
// InlineQueryResultVideo represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
//
// If an InlineQueryResultVideo message contains an embedded video (e.g., YouTube), you must replace its content using input_message_content.
InlineQueryResultVideostruct{
// Type of the result, must be video
Typestring`json:"type"`
// Unique identifier for this result, 1-64 bytes
IDstring`json:"id"`
// A valid URL for the embedded video player or video file
VideoURLstring`json:"video_url"`
// Mime type of the content of video url, “text/html” or “video/mp4”
MimeTypestring`json:"mime_type"`
// URL of the thumbnail (jpeg only) for the video
ThumbURLstring`json:"thumb_url"`
// Title for the result
Titlestring`json:"title"`
// Caption of the video to be sent, 0-200 characters
// Content of the message to be sent instead of the video. This field is required if InlineQueryResultVideo is used to send an HTML-page as a result (e.g., a YouTube video).
// InlineQueryResultAudio represents a link to an mp3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
// InlineQueryResultVoice represents a link to a voice recording in an .ogg container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.
// InlineQueryResultDocument represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.
InlineQueryResultDocumentstruct{
// Type of the result, must be document
Typestring`json:"type"`
// Unique identifier for this result, 1-64 bytes
IDstring`json:"id"`
// Title for the result
Titlestring`json:"title"`
// Caption of the document to be sent, 0-200 characters
Captionstring`json:"caption"`// optional
// A valid URL for the file
DocumentURLstring`json:"document_url"`
// Mime type of the content of the file, either “application/pdf” or “application/zip”
// InlineQueryResultLocation represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.
// InlineQueryResultVenue represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.
// InlineQueryResultContact represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.
// InlineQueryResultCachedPhoto represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
InlineQueryResultCachedPhotostruct{
// Type of the result, must be photo
Typestring`json:"type"`
// Unique identifier for this result, 1-64 bytes
IDstring`json:"id"`
// A valid file identifier of the photo
PhotoFileIDstring`json:"photo_file_id"`
// Title for the result
Titlestring`json:"title"`// optional
// Short description of the result
Descriptionstring`json:"description"`// optional
// Caption of the photo to be sent, 0-200 characters
// InlineQueryResultCachedGif represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.
InlineQueryResultCachedGifstruct{
// Type of the result, must be gif
Typestring`json:"type"`
// Unique identifier for this result, 1-64 bytes
IDstring`json:"id"`
// A valid file identifier for the GIF file
GifFileIDstring`json:"gif_file_id"`
// Title for the result
Titlestring`json:"title"`// optional
// Caption of the GIF file to be sent, 0-200 characters
// InlineQueryResultCachedMpeg4Gif represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
InlineQueryResultCachedMpeg4Gifstruct{
// Type of the result, must be mpeg4_gif
Typestring`json:"type"`
// Unique identifier for this result, 1-64 bytes
IDstring`json:"id"`
// A valid file identifier for the MP4 file
Mpeg4FileIDstring`json:"mpeg4_file_id"`
// Title for the result
Titlestring`json:"title"`// optional
// Caption of the MPEG-4 file to be sent, 0-200 characters
// InlineQueryResultCachedSticker represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.
// InlineQueryResultCachedDocument represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.
InlineQueryResultCachedDocumentstruct{
// Type of the result, must be document
Typestring`json:"type"`
// Unique identifier for this result, 1-64 bytes
IDstring`json:"id"`
// Title for the result
Titlestring`json:"title"`
// A valid file identifier for the file
DocumentFileIDstring`json:"document_file_id"`
// Short description of the result
Descriptionstring`json:"description"`// optional
// Caption of the document to be sent, 0-200 characters
// InlineQueryResultCachedVideo represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
InlineQueryResultCachedVideostruct{
// Type of the result, must be video
Typestring`json:"type"`
// Unique identifier for this result, 1-64 bytes
IDstring`json:"id"`
// A valid file identifier for the video file
VideoFileIDstring`json:"video_file_id"`
// Title for the result
Titlestring`json:"title"`
// Short description of the result
Descriptionstring`json:"description"`// optional
// Caption of the video to be sent, 0-200 characters
// InlineQueryResultCachedVoice represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.
// InlineQueryResultCachedAudio represents a link to an mp3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
// InputContactMessageContent represents the content of a contact message to be sent as the result of an inline query.
InputContactMessageContentstruct{
// Contact's phone number
PhoneNumberstring`json:"phone_number"`
// Contact's first name
FirstNamestring`json:"first_name"`
// Contact's last name
LastNamestring`json:"last_name"`// optional
}
// ChosenInlineResult represents a result of an inline query that was chosen by the user and sent to their chat partner.
ChosenInlineResultstruct{
// The unique identifier for the result that was chosen
ResultIDstring`json:"result_id"`
// The user that chose the result
From*User`json:"from"`
// Sender location, only for bots that require user location
Location*Location`json:"location"`// optional
// Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.
// LabeledPrice represents a portion of the price for goods or services.
LabeledPricestruct{
// Portion label
Labelstring`json:"label"`
// Price of the product 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).
Amountint`json:"amount"`
}
// Invoice contains basic information about an invoice.
Invoicestruct{
// Product name
Titlestring`json:"title"`
// Product description
Descriptionstring`json:"description"`
// Unique bot deep-linking parameter that can be used to generate this invoice
StartParameterstring`json:"start_parameter"`
// Three-letter ISO 4217 currency code
Currencystring`json:"currency"`
// 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).
TotalAmountint`json:"total_amount"`
}
// ShippingAddress represents a shipping address.
ShippingAddressstruct{
// ISO 3166-1 alpha-2 country code
CountryCodestring`json:"country_code"`
// State, if applicable
Statestring`json:"state"`
// City
Citystring`json:"city"`
// First line for the address
StreetLine1string`json:"street_line1"`
// Second line for the address
StreetLine2string`json:"street_line2"`
// Address post code
PostCodestring`json:"post_code"`
}
// OrderInfo represents information about an order.
OrderInfostruct{
// User name
Namestring`json:"name"`// optional
// User's phone number
PhoneNumberstring`json:"phone_number"`// optional
// User email
Emailstring`json:"email"`// optional
// User shipping address
ShippingAddress*ShippingAddress// optional
}
// ShippingOption represents one shipping option.
ShippingOptionstruct{
// Shipping option identifier
IDstring`json:"id"`
// Option title
Titlestring`json:"title"`
// List of price portions
Prices*[]LabeledPrice`json:"prices"`
}
// SuccessfulPayment contains basic information about a successful payment.
SuccessfulPaymentstruct{
// Three-letter ISO 4217 currency code
Currencystring`json:"currency"`
// 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).
TotalAmountint`json:"total_amount"`
// Bot specified invoice payload
InvoicePayloadstring`json:"invoice_payload"`
// Identifier of the shipping option chosen by the user
// PreCheckoutQuery contains information about an incoming pre-checkout query.
PreCheckoutQuerystruct{
// Unique query identifier
IDstring`json:"id"`
// User who sent the query
From*User`json:"from"`
// Three-letter ISO 4217 currency code
Currencystring`json:"currency"`
// 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).
TotalAmountint`json:"total_amount"`
// Bot specified invoice payload
InvoicePayloadstring`json:"invoice_payload"`
// Identifier of the shipping option chosen by the user
// Game represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
Gamestruct{
// Title of the game
Titlestring`json:"title"`
// Description of the game
Descriptionstring`json:"description"`
// Photo that will be displayed in the game message in chats.
Photo*[]PhotoSize`json:"photo"`
// Brief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
Textstring`json:"text"`// optional
// Special entities that appear in text, such as usernames, URLs, bot commands, etc.
// Animation that will be displayed in the game message in chats. Upload via BotFather
Animation*Animation`json:"animation"`// optional
}
// Animation provide an animation for your game so that it looks stylish in chats (check out Lumberjack for an example). This object represents an animation file to be displayed in the message containing a game.
Animationstruct{
// Unique file identifier
FileIDstring`json:"file_id"`
// Animation thumbnail as defined by sender
Thumb*PhotoSize`json:"thumb"`// optional
// Original animation filename as defined by sender
FileNamestring`json:"file_name"`// optional
// MIME type of the file as defined by sender
MimeTypestring`json:"mime_type"`// optional
// File size
FileSizeint`json:"file_size"`// optional
}
// CallbackGame a placeholder, currently holds no information. Use BotFather to set up your game.
CallbackGamestruct{}
// GameHighScore represents one row of the high scores table for a game.