Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 128.57 KB | None | 0 0
  1. package bot
  2.  
  3. // ReplyMarkup - This object represents one row of the high scores table for a game.
  4. type ReplyMarkup interface {
  5.     ReplyMarkup()
  6. }
  7.  
  8. // ChatID - This object represents one row of the high scores table for a game.
  9. type ChatID interface {
  10.     ChatID()
  11. }
  12.  
  13. // InputMedia - This object represents one row of the high scores table for a game.
  14. type InputMedia interface {
  15.     InputMedia()
  16. }
  17.  
  18. // InlineQueryResult - This object represents one row of the high scores table for a game.
  19. type InlineQueryResult interface {
  20.     InlineQueryResult()
  21. }
  22.  
  23. // InputMessageContent - This object represents one row of the high scores table for a game.
  24. type InputMessageContent interface {
  25.     InputMessageContent()
  26. }
  27.  
  28. // PassportElementError - This object represents one row of the high scores table for a game.
  29. type PassportElementError interface {
  30.     PassportElementError()
  31. }
  32.  
  33. // Update - This object represents an incoming update.At most one of the optional parameters can be present in any given update.
  34. type Update struct {
  35.     UpdateID           int                 `json:"update_id"`
  36.     Message            *Message            `json:"message"`
  37.     EditedMessage      *Message            `json:"edited_message"`
  38.     ChannelPost        *Message            `json:"channel_post"`
  39.     EditedChannelPost  *Message            `json:"edited_channel_post"`
  40.     InlineQuery        *InlineQuery        `json:"inline_query"`
  41.     ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result"`
  42.     CallbackQuery      *CallbackQuery      `json:"callback_query"`
  43.     ShippingQuery      *ShippingQuery      `json:"shipping_query"`
  44.     PreCheckoutQuery   *PreCheckoutQuery   `json:"pre_checkout_query"`
  45.     Poll               *Poll               `json:"poll"`
  46.     PollAnswer         *PollAnswer         `json:"poll_answer"`
  47. }
  48.  
  49. // WebhookInfo - Contains information about the current status of a webhook.
  50. type WebhookInfo struct {
  51.     URL                  string   `json:"url"`
  52.     HasCustomCertificate bool     `json:"has_custom_certificate"`
  53.     PendingUpdateCount   int      `json:"pending_update_count"`
  54.     LastErrorDate        int      `json:"last_error_date"`
  55.     LastErrorMessage     string   `json:"last_error_message"`
  56.     MaxConnections       int      `json:"max_connections"`
  57.     AllowedUpdates       []string `json:"allowed_updates"`
  58. }
  59.  
  60. // User - This object represents a Telegram user or bot.
  61. type User struct {
  62.     ID                      int    `json:"id"`
  63.     IsBot                   bool   `json:"is_bot"`
  64.     FirstName               string `json:"first_name"`
  65.     LastName                string `json:"last_name"`
  66.     Username                string `json:"username"`
  67.     LanguageCode            string `json:"language_code"`
  68.     CanJoinGroups           bool   `json:"can_join_groups"`
  69.     CanReadAllGroupMessages bool   `json:"can_read_all_group_messages"`
  70.     SupportsInlineQueries   bool   `json:"supports_inline_queries"`
  71. }
  72.  
  73. // Chat - This object represents a chat.
  74. type Chat struct {
  75.     ID               int64            `json:"id"`
  76.     Type             string           `json:"type"`
  77.     Title            string           `json:"title"`
  78.     Username         string           `json:"username"`
  79.     FirstName        string           `json:"first_name"`
  80.     LastName         string           `json:"last_name"`
  81.     Photo            *ChatPhoto       `json:"photo"`
  82.     Description      string           `json:"description"`
  83.     InviteLink       string           `json:"invite_link"`
  84.     PinnedMessage    *Message         `json:"pinned_message"`
  85.     Permissions      *ChatPermissions `json:"permissions"`
  86.     SlowModeDelay    int              `json:"slow_mode_delay"`
  87.     StickerSetName   string           `json:"sticker_set_name"`
  88.     CanSetStickerSet bool             `json:"can_set_sticker_set"`
  89. }
  90.  
  91. // Message - This object represents a message.
  92. type Message struct {
  93.     MessageID             int                `json:"message_id"`
  94.     From                  *User              `json:"from"`
  95.     Date                  int                `json:"date"`
  96.     Chat                  *Chat              `json:"chat"`
  97.     ForwardFrom           *User              `json:"forward_from"`
  98.     ForwardFromChat       *Chat              `json:"forward_from_chat"`
  99.     ForwardFromMessageID  int                `json:"forward_from_message_id"`
  100.     ForwardSignature      string             `json:"forward_signature"`
  101.     ForwardSenderName     string             `json:"forward_sender_name"`
  102.     ForwardDate           int                `json:"forward_date"`
  103.     ReplyToMessage        *Message           `json:"reply_to_message"`
  104.     EditDate              int                `json:"edit_date"`
  105.     MediaGroupID          string             `json:"media_group_id"`
  106.     AuthorSignature       string             `json:"author_signature"`
  107.     Text                  string             `json:"text"`
  108.     Entities              []*MessageEntity   `json:"entities"`
  109.     CaptionEntities       []*MessageEntity   `json:"caption_entities"`
  110.     Audio                 *Audio             `json:"audio"`
  111.     Document              *Document          `json:"document"`
  112.     Animation             *Animation         `json:"animation"`
  113.     Game                  *Game              `json:"game"`
  114.     Photo                 []*PhotoSize       `json:"photo"`
  115.     Sticker               *Sticker           `json:"sticker"`
  116.     Video                 *Video             `json:"video"`
  117.     Voice                 *Voice             `json:"voice"`
  118.     VideoNote             *VideoNote         `json:"video_note"`
  119.     Caption               string             `json:"caption"`
  120.     Contact               *Contact           `json:"contact"`
  121.     Location              *Location          `json:"location"`
  122.     Venue                 *Venue             `json:"venue"`
  123.     Poll                  *Poll              `json:"poll"`
  124.     NewChatMembers        []*User            `json:"new_chat_members"`
  125.     LeftChatMember        *User              `json:"left_chat_member"`
  126.     NewChatTitle          string             `json:"new_chat_title"`
  127.     NewChatPhoto          []*PhotoSize       `json:"new_chat_photo"`
  128.     DeleteChatPhoto       bool               `json:"delete_chat_photo"`
  129.     GroupChatCreated      bool               `json:"group_chat_created"`
  130.     SupergroupChatCreated bool               `json:"supergroup_chat_created"`
  131.     ChannelChatCreated    bool               `json:"channel_chat_created"`
  132.     MigrateToChatID       int64              `json:"migrate_to_chat_id"`
  133.     MigrateFromChatID     int64              `json:"migrate_from_chat_id"`
  134.     PinnedMessage         *Message           `json:"pinned_message"`
  135.     Invoice               *Invoice           `json:"invoice"`
  136.     SuccessfulPayment     *SuccessfulPayment `json:"successful_payment"`
  137.     ConnectedWebsite      string             `json:"connected_website"`
  138.     PassportData          *PassportData      `json:"passport_data"`
  139.     ReplyMarkup           *ReplyMarkup       `json:"reply_markup"`
  140. }
  141.  
  142. // MessageEntity - This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
  143. type MessageEntity struct {
  144.     Type     string `json:"type"`
  145.     Offset   int    `json:"offset"`
  146.     Length   int    `json:"length"`
  147.     URL      string `json:"url"`
  148.     User     *User  `json:"user"`
  149.     Language string `json:"language"`
  150. }
  151.  
  152. // PhotoSize - This object represents one size of a photo or a file / sticker thumbnail.
  153. type PhotoSize struct {
  154.     FileID       string `json:"file_id"`
  155.     FileUniqueID string `json:"file_unique_id"`
  156.     Width        int    `json:"width"`
  157.     Height       int    `json:"height"`
  158.     FileSize     int    `json:"file_size"`
  159. }
  160.  
  161. // Audio - This object represents an audio file to be treated as music by the Telegram clients.
  162. type Audio struct {
  163.     FileID       string     `json:"file_id"`
  164.     FileUniqueID string     `json:"file_unique_id"`
  165.     Duration     int        `json:"duration"`
  166.     Performer    string     `json:"performer"`
  167.     Title        string     `json:"title"`
  168.     MimeType     string     `json:"mime_type"`
  169.     FileSize     int        `json:"file_size"`
  170.     Thumb        *PhotoSize `json:"thumb"`
  171. }
  172.  
  173. // Document - This object represents a general file (as opposed to photos, voice messages and audio files).
  174. type Document struct {
  175.     FileID       string     `json:"file_id"`
  176.     FileUniqueID string     `json:"file_unique_id"`
  177.     Thumb        *PhotoSize `json:"thumb"`
  178.     FileName     string     `json:"file_name"`
  179.     MimeType     string     `json:"mime_type"`
  180.     FileSize     int        `json:"file_size"`
  181. }
  182.  
  183. // Video - This object represents a video file.
  184. type Video struct {
  185.     FileID       string     `json:"file_id"`
  186.     FileUniqueID string     `json:"file_unique_id"`
  187.     Width        int        `json:"width"`
  188.     Height       int        `json:"height"`
  189.     Duration     int        `json:"duration"`
  190.     Thumb        *PhotoSize `json:"thumb"`
  191.     MimeType     string     `json:"mime_type"`
  192.     FileSize     int        `json:"file_size"`
  193. }
  194.  
  195. // Animation - This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
  196. type Animation struct {
  197.     FileID       string     `json:"file_id"`
  198.     FileUniqueID string     `json:"file_unique_id"`
  199.     Width        int        `json:"width"`
  200.     Height       int        `json:"height"`
  201.     Duration     int        `json:"duration"`
  202.     Thumb        *PhotoSize `json:"thumb"`
  203.     FileName     string     `json:"file_name"`
  204.     MimeType     string     `json:"mime_type"`
  205.     FileSize     int        `json:"file_size"`
  206. }
  207.  
  208. // Voice - This object represents a voice note.
  209. type Voice struct {
  210.     FileID       string `json:"file_id"`
  211.     FileUniqueID string `json:"file_unique_id"`
  212.     Duration     int    `json:"duration"`
  213.     MimeType     string `json:"mime_type"`
  214.     FileSize     int    `json:"file_size"`
  215. }
  216.  
  217. // VideoNote - This object represents a video message (available in Telegram apps as of v.4.0).
  218. type VideoNote struct {
  219.     FileID       string     `json:"file_id"`
  220.     FileUniqueID string     `json:"file_unique_id"`
  221.     Length       int        `json:"length"`
  222.     Duration     int        `json:"duration"`
  223.     Thumb        *PhotoSize `json:"thumb"`
  224.     FileSize     int        `json:"file_size"`
  225. }
  226.  
  227. // Contact - This object represents a phone contact.
  228. type Contact struct {
  229.     PhoneNumber string `json:"phone_number"`
  230.     FirstName   string `json:"first_name"`
  231.     LastName    string `json:"last_name"`
  232.     UserID      int    `json:"user_id"`
  233.     Vcard       string `json:"vcard"`
  234. }
  235.  
  236. // Location - This object represents a point on the map.
  237. type Location struct {
  238.     Longitude float64 `json:"longitude"`
  239.     Latitude  float64 `json:"latitude"`
  240. }
  241.  
  242. // Venue - This object represents a venue.
  243. type Venue struct {
  244.     Location       *Location `json:"location"`
  245.     Title          string    `json:"title"`
  246.     Address        string    `json:"address"`
  247.     FoursquareID   string    `json:"foursquare_id"`
  248.     FoursquareType string    `json:"foursquare_type"`
  249. }
  250.  
  251. // PollOption - This object contains information about one answer option in a poll.
  252. type PollOption struct {
  253.     Text       string `json:"text"`
  254.     VoterCount int    `json:"voter_count"`
  255. }
  256.  
  257. // PollAnswer - This object represents an answer of a user in a non-anonymous poll.
  258. type PollAnswer struct {
  259.     PollID    string `json:"poll_id"`
  260.     User      *User  `json:"user"`
  261.     OptionIds []int  `json:"option_ids"`
  262. }
  263.  
  264. // Poll - This object contains information about a poll.
  265. type Poll struct {
  266.     ID                    string        `json:"id"`
  267.     Question              string        `json:"question"`
  268.     Options               []*PollOption `json:"options"`
  269.     TotalVoterCount       int           `json:"total_voter_count"`
  270.     IsClosed              bool          `json:"is_closed"`
  271.     IsAnonymous           bool          `json:"is_anonymous"`
  272.     Type                  string        `json:"type"`
  273.     AllowsMultipleAnswers bool          `json:"allows_multiple_answers"`
  274.     CorrectOptionID       int           `json:"correct_option_id"`
  275. }
  276.  
  277. // UserProfilePhotos - This object represent a user's profile pictures.
  278. type UserProfilePhotos struct {
  279.     TotalCount int            `json:"total_count"`
  280.     Photos     [][]*PhotoSize `json:"photos"`
  281. }
  282.  
  283. // File - This object 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.
  284. type File struct {
  285.     FileID       string `json:"file_id"`
  286.     FileUniqueID string `json:"file_unique_id"`
  287.     FileSize     int    `json:"file_size"`
  288.     FilePath     string `json:"file_path"`
  289. }
  290.  
  291. // ReplyKeyboardMarkup - This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
  292. type ReplyKeyboardMarkup struct {
  293.     Keyboard        [][]*KeyboardButton `json:"keyboard"`
  294.     ResizeKeyboard  bool                `json:"resize_keyboard"`
  295.     OneTimeKeyboard bool                `json:"one_time_keyboard"`
  296.     Selective       bool                `json:"selective"`
  297. }
  298.  
  299. // KeyboardButton - This object 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 request_contact, request_location, and request_poll are mutually exclusive.
  300. type KeyboardButton struct {
  301.     Text            string                  `json:"text"`
  302.     RequestContact  bool                    `json:"request_contact"`
  303.     RequestLocation bool                    `json:"request_location"`
  304.     RequestPoll     *KeyboardButtonPollType `json:"request_poll"`
  305. }
  306.  
  307. // KeyboardButtonPollType - This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
  308. type KeyboardButtonPollType struct {
  309.     Type string `json:"type"`
  310. }
  311.  
  312. // ReplyKeyboardRemove - Upon receiving a message with this object, Telegram clients 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).
  313. type ReplyKeyboardRemove struct {
  314.     RemoveKeyboard bool `json:"remove_keyboard"`
  315.     Selective      bool `json:"selective"`
  316. }
  317.  
  318. // InlineKeyboardMarkup - This object represents an inline keyboard that appears right next to the message it belongs to.
  319. type InlineKeyboardMarkup struct {
  320.     InlineKeyboard [][]*InlineKeyboardButton `json:"inline_keyboard"`
  321. }
  322.  
  323. // InlineKeyboardButton - This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
  324. type InlineKeyboardButton struct {
  325.     Text                         string        `json:"text"`
  326.     URL                          string        `json:"url"`
  327.     LoginURL                     *LoginURL     `json:"login_url"`
  328.     CallbackData                 string        `json:"callback_data"`
  329.     SwitchInlineQuery            string        `json:"switch_inline_query"`
  330.     SwitchInlineQueryCurrentChat string        `json:"switch_inline_query_current_chat"`
  331.     CallbackGame                 *CallbackGame `json:"callback_game"`
  332.     Pay                          bool          `json:"pay"`
  333. }
  334.  
  335. // LoginURL - This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
  336. type LoginURL struct {
  337.     URL                string `json:"url"`
  338.     ForwardText        string `json:"forward_text"`
  339.     BotUsername        string `json:"bot_username"`
  340.     RequestWriteAccess bool   `json:"request_write_access"`
  341. }
  342.  
  343. // CallbackQuery - This object 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.
  344. type CallbackQuery struct {
  345.     ID              string   `json:"id"`
  346.     From            *User    `json:"from"`
  347.     Message         *Message `json:"message"`
  348.     InlineMessageID string   `json:"inline_message_id"`
  349.     ChatInstance    string   `json:"chat_instance"`
  350.     Data            string   `json:"data"`
  351.     GameShortName   string   `json:"game_short_name"`
  352. }
  353.  
  354. // ForceReply - Upon receiving a message with this object, Telegram clients will 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.
  355. type ForceReply struct {
  356.     ForceReply bool `json:"force_reply"`
  357.     Selective  bool `json:"selective"`
  358. }
  359.  
  360. // ChatPhoto - This object represents a chat photo.
  361. type ChatPhoto struct {
  362.     SmallFileID       string `json:"small_file_id"`
  363.     SmallFileUniqueID string `json:"small_file_unique_id"`
  364.     BigFileID         string `json:"big_file_id"`
  365.     BigFileUniqueID   string `json:"big_file_unique_id"`
  366. }
  367.  
  368. // ChatMember - This object contains information about one member of a chat.
  369. type ChatMember struct {
  370.     User                  *User  `json:"user"`
  371.     Status                string `json:"status"`
  372.     CustomTitle           string `json:"custom_title"`
  373.     UntilDate             int    `json:"until_date"`
  374.     CanBeEdited           bool   `json:"can_be_edited"`
  375.     CanPostMessages       bool   `json:"can_post_messages"`
  376.     CanEditMessages       bool   `json:"can_edit_messages"`
  377.     CanDeleteMessages     bool   `json:"can_delete_messages"`
  378.     CanRestrictMembers    bool   `json:"can_restrict_members"`
  379.     CanPromoteMembers     bool   `json:"can_promote_members"`
  380.     CanChangeInfo         bool   `json:"can_change_info"`
  381.     CanInviteUsers        bool   `json:"can_invite_users"`
  382.     CanPinMessages        bool   `json:"can_pin_messages"`
  383.     IsMember              bool   `json:"is_member"`
  384.     CanSendMessages       bool   `json:"can_send_messages"`
  385.     CanSendMediaMessages  bool   `json:"can_send_media_messages"`
  386.     CanSendPolls          bool   `json:"can_send_polls"`
  387.     CanSendOtherMessages  bool   `json:"can_send_other_messages"`
  388.     CanAddWebPagePreviews bool   `json:"can_add_web_page_previews"`
  389. }
  390.  
  391. // ChatPermissions - Describes actions that a non-administrator user is allowed to take in a chat.
  392. type ChatPermissions struct {
  393.     CanSendMessages       bool `json:"can_send_messages"`
  394.     CanSendMediaMessages  bool `json:"can_send_media_messages"`
  395.     CanSendPolls          bool `json:"can_send_polls"`
  396.     CanSendOtherMessages  bool `json:"can_send_other_messages"`
  397.     CanAddWebPagePreviews bool `json:"can_add_web_page_previews"`
  398.     CanChangeInfo         bool `json:"can_change_info"`
  399.     CanInviteUsers        bool `json:"can_invite_users"`
  400.     CanPinMessages        bool `json:"can_pin_messages"`
  401. }
  402.  
  403. // ResponseParameters - Contains information about why a request was unsuccessful.
  404. type ResponseParameters struct {
  405.     MigrateToChatID int64 `json:"migrate_to_chat_id"`
  406.     RetryAfter      int   `json:"retry_after"`
  407. }
  408.  
  409. // InputMediaPhoto - Represents a photo to be sent.
  410. type InputMediaPhoto struct {
  411.     Type      string `json:"type"`
  412.     Media     string `json:"media"`
  413.     Caption   string `json:"caption"`
  414.     ParseMode string `json:"parse_mode"`
  415. }
  416.  
  417. // InputMediaVideo - Represents a video to be sent.
  418. type InputMediaVideo struct {
  419.     Type              string     `json:"type"`
  420.     Media             string     `json:"media"`
  421.     Thumb             *InputFile `json:"thumb"`
  422.     Caption           string     `json:"caption"`
  423.     ParseMode         string     `json:"parse_mode"`
  424.     Width             int        `json:"width"`
  425.     Height            int        `json:"height"`
  426.     Duration          int        `json:"duration"`
  427.     SupportsStreaming bool       `json:"supports_streaming"`
  428. }
  429.  
  430. // InputMediaAnimation - Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
  431. type InputMediaAnimation struct {
  432.     Type      string     `json:"type"`
  433.     Media     string     `json:"media"`
  434.     Thumb     *InputFile `json:"thumb"`
  435.     Caption   string     `json:"caption"`
  436.     ParseMode string     `json:"parse_mode"`
  437.     Width     int        `json:"width"`
  438.     Height    int        `json:"height"`
  439.     Duration  int        `json:"duration"`
  440. }
  441.  
  442. // InputMediaAudio - Represents an audio file to be treated as music to be sent.
  443. type InputMediaAudio struct {
  444.     Type      string     `json:"type"`
  445.     Media     string     `json:"media"`
  446.     Thumb     *InputFile `json:"thumb"`
  447.     Caption   string     `json:"caption"`
  448.     ParseMode string     `json:"parse_mode"`
  449.     Duration  int        `json:"duration"`
  450.     Performer string     `json:"performer"`
  451.     Title     string     `json:"title"`
  452. }
  453.  
  454. // InputMediaDocument - Represents a general file to be sent.
  455. type InputMediaDocument struct {
  456.     Type      string     `json:"type"`
  457.     Media     string     `json:"media"`
  458.     Thumb     *InputFile `json:"thumb"`
  459.     Caption   string     `json:"caption"`
  460.     ParseMode string     `json:"parse_mode"`
  461. }
  462.  
  463. // InputFile - This object 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.
  464. type InputFile struct {
  465. }
  466.  
  467. // Sticker - This object represents a sticker.
  468. type Sticker struct {
  469.     FileID       string        `json:"file_id"`
  470.     FileUniqueID string        `json:"file_unique_id"`
  471.     Width        int           `json:"width"`
  472.     Height       int           `json:"height"`
  473.     IsAnimated   bool          `json:"is_animated"`
  474.     Thumb        *PhotoSize    `json:"thumb"`
  475.     Emoji        string        `json:"emoji"`
  476.     SetName      string        `json:"set_name"`
  477.     MaskPosition *MaskPosition `json:"mask_position"`
  478.     FileSize     int           `json:"file_size"`
  479. }
  480.  
  481. // StickerSet - This object represents a sticker set.
  482. type StickerSet struct {
  483.     Name          string     `json:"name"`
  484.     Title         string     `json:"title"`
  485.     IsAnimated    bool       `json:"is_animated"`
  486.     ContainsMasks bool       `json:"contains_masks"`
  487.     Stickers      []*Sticker `json:"stickers"`
  488. }
  489.  
  490. // MaskPosition - This object describes the position on faces where a mask should be placed by default.
  491. type MaskPosition struct {
  492.     Point  string  `json:"point"`
  493.     XShift float64 `json:"x_shift"`
  494.     YShift float64 `json:"y_shift"`
  495.     Scale  float64 `json:"scale"`
  496. }
  497.  
  498. // InlineQuery - This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
  499. type InlineQuery struct {
  500.     ID       string    `json:"id"`
  501.     From     *User     `json:"from"`
  502.     Location *Location `json:"location"`
  503.     Query    string    `json:"query"`
  504.     Offset   string    `json:"offset"`
  505. }
  506.  
  507. // InlineQueryResultArticle - Represents a link to an article or web page.
  508. type InlineQueryResultArticle struct {
  509.     Type                string               `json:"type"`
  510.     ID                  string               `json:"id"`
  511.     Title               string               `json:"title"`
  512.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  513.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  514.     URL                 string               `json:"url"`
  515.     HideURL             bool                 `json:"hide_url"`
  516.     Description         string               `json:"description"`
  517.     ThumbURL            string               `json:"thumb_url"`
  518.     ThumbWidth          int                  `json:"thumb_width"`
  519.     ThumbHeight         int                  `json:"thumb_height"`
  520. }
  521.  
  522. // 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.
  523. type InlineQueryResultPhoto struct {
  524.     Type                string               `json:"type"`
  525.     ID                  string               `json:"id"`
  526.     PhotoURL            string               `json:"photo_url"`
  527.     ThumbURL            string               `json:"thumb_url"`
  528.     PhotoWidth          int                  `json:"photo_width"`
  529.     PhotoHeight         int                  `json:"photo_height"`
  530.     Title               string               `json:"title"`
  531.     Description         string               `json:"description"`
  532.     Caption             string               `json:"caption"`
  533.     ParseMode           string               `json:"parse_mode"`
  534.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  535.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  536. }
  537.  
  538. // 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.
  539. type InlineQueryResultGif struct {
  540.     Type                string               `json:"type"`
  541.     ID                  string               `json:"id"`
  542.     GifURL              string               `json:"gif_url"`
  543.     GifWidth            int                  `json:"gif_width"`
  544.     GifHeight           int                  `json:"gif_height"`
  545.     GifDuration         int                  `json:"gif_duration"`
  546.     ThumbURL            string               `json:"thumb_url"`
  547.     Title               string               `json:"title"`
  548.     Caption             string               `json:"caption"`
  549.     ParseMode           string               `json:"parse_mode"`
  550.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  551.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  552. }
  553.  
  554. // 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.
  555. type InlineQueryResultMpeg4Gif struct {
  556.     Type                string               `json:"type"`
  557.     ID                  string               `json:"id"`
  558.     Mpeg4URL            string               `json:"mpeg4_url"`
  559.     Mpeg4Width          int                  `json:"mpeg4_width"`
  560.     Mpeg4Height         int                  `json:"mpeg4_height"`
  561.     Mpeg4Duration       int                  `json:"mpeg4_duration"`
  562.     ThumbURL            string               `json:"thumb_url"`
  563.     Title               string               `json:"title"`
  564.     Caption             string               `json:"caption"`
  565.     ParseMode           string               `json:"parse_mode"`
  566.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  567.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  568. }
  569.  
  570. // 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.
  571. type InlineQueryResultVideo struct {
  572.     Type                string               `json:"type"`
  573.     ID                  string               `json:"id"`
  574.     VideoURL            string               `json:"video_url"`
  575.     MimeType            string               `json:"mime_type"`
  576.     ThumbURL            string               `json:"thumb_url"`
  577.     Title               string               `json:"title"`
  578.     Caption             string               `json:"caption"`
  579.     ParseMode           string               `json:"parse_mode"`
  580.     VideoWidth          int                  `json:"video_width"`
  581.     VideoHeight         int                  `json:"video_height"`
  582.     VideoDuration       int                  `json:"video_duration"`
  583.     Description         string               `json:"description"`
  584.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  585.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  586. }
  587.  
  588. // 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.
  589. type InlineQueryResultAudio struct {
  590.     Type                string               `json:"type"`
  591.     ID                  string               `json:"id"`
  592.     AudioURL            string               `json:"audio_url"`
  593.     Title               string               `json:"title"`
  594.     Caption             string               `json:"caption"`
  595.     ParseMode           string               `json:"parse_mode"`
  596.     Performer           string               `json:"performer"`
  597.     AudioDuration       int                  `json:"audio_duration"`
  598.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  599.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  600. }
  601.  
  602. // 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.
  603. type InlineQueryResultVoice struct {
  604.     Type                string               `json:"type"`
  605.     ID                  string               `json:"id"`
  606.     VoiceURL            string               `json:"voice_url"`
  607.     Title               string               `json:"title"`
  608.     Caption             string               `json:"caption"`
  609.     ParseMode           string               `json:"parse_mode"`
  610.     VoiceDuration       int                  `json:"voice_duration"`
  611.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  612.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  613. }
  614.  
  615. // 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.
  616. type InlineQueryResultDocument struct {
  617.     Type                string               `json:"type"`
  618.     ID                  string               `json:"id"`
  619.     Title               string               `json:"title"`
  620.     Caption             string               `json:"caption"`
  621.     ParseMode           string               `json:"parse_mode"`
  622.     DocumentURL         string               `json:"document_url"`
  623.     MimeType            string               `json:"mime_type"`
  624.     Description         string               `json:"description"`
  625.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  626.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  627.     ThumbURL            string               `json:"thumb_url"`
  628.     ThumbWidth          int                  `json:"thumb_width"`
  629.     ThumbHeight         int                  `json:"thumb_height"`
  630. }
  631.  
  632. // 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.
  633. type InlineQueryResultLocation struct {
  634.     Type                string               `json:"type"`
  635.     ID                  string               `json:"id"`
  636.     Latitude            float64              `json:"latitude"`
  637.     Longitude           float64              `json:"longitude"`
  638.     Title               string               `json:"title"`
  639.     LivePeriod          int                  `json:"live_period"`
  640.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  641.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  642.     ThumbURL            string               `json:"thumb_url"`
  643.     ThumbWidth          int                  `json:"thumb_width"`
  644.     ThumbHeight         int                  `json:"thumb_height"`
  645. }
  646.  
  647. // 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.
  648. type InlineQueryResultVenue struct {
  649.     Type                string               `json:"type"`
  650.     ID                  string               `json:"id"`
  651.     Latitude            float64              `json:"latitude"`
  652.     Longitude           float64              `json:"longitude"`
  653.     Title               string               `json:"title"`
  654.     Address             string               `json:"address"`
  655.     FoursquareID        string               `json:"foursquare_id"`
  656.     FoursquareType      string               `json:"foursquare_type"`
  657.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  658.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  659.     ThumbURL            string               `json:"thumb_url"`
  660.     ThumbWidth          int                  `json:"thumb_width"`
  661.     ThumbHeight         int                  `json:"thumb_height"`
  662. }
  663.  
  664. // 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.
  665. type InlineQueryResultContact struct {
  666.     Type                string               `json:"type"`
  667.     ID                  string               `json:"id"`
  668.     PhoneNumber         string               `json:"phone_number"`
  669.     FirstName           string               `json:"first_name"`
  670.     LastName            string               `json:"last_name"`
  671.     Vcard               string               `json:"vcard"`
  672.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  673.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  674.     ThumbURL            string               `json:"thumb_url"`
  675.     ThumbWidth          int                  `json:"thumb_width"`
  676.     ThumbHeight         int                  `json:"thumb_height"`
  677. }
  678.  
  679. // InlineQueryResultGame - Represents a Game.
  680. type InlineQueryResultGame struct {
  681.     Type          string       `json:"type"`
  682.     ID            string       `json:"id"`
  683.     GameShortName string       `json:"game_short_name"`
  684.     ReplyMarkup   *ReplyMarkup `json:"reply_markup"`
  685. }
  686.  
  687. // 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.
  688. type InlineQueryResultCachedPhoto struct {
  689.     Type                string               `json:"type"`
  690.     ID                  string               `json:"id"`
  691.     PhotoFileID         string               `json:"photo_file_id"`
  692.     Title               string               `json:"title"`
  693.     Description         string               `json:"description"`
  694.     Caption             string               `json:"caption"`
  695.     ParseMode           string               `json:"parse_mode"`
  696.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  697.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  698. }
  699.  
  700. // 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.
  701. type InlineQueryResultCachedGif struct {
  702.     Type                string               `json:"type"`
  703.     ID                  string               `json:"id"`
  704.     GifFileID           string               `json:"gif_file_id"`
  705.     Title               string               `json:"title"`
  706.     Caption             string               `json:"caption"`
  707.     ParseMode           string               `json:"parse_mode"`
  708.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  709.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  710. }
  711.  
  712. // 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.
  713. type InlineQueryResultCachedMpeg4Gif struct {
  714.     Type                string               `json:"type"`
  715.     ID                  string               `json:"id"`
  716.     Mpeg4FileID         string               `json:"mpeg4_file_id"`
  717.     Title               string               `json:"title"`
  718.     Caption             string               `json:"caption"`
  719.     ParseMode           string               `json:"parse_mode"`
  720.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  721.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  722. }
  723.  
  724. // 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.
  725. type InlineQueryResultCachedSticker struct {
  726.     Type                string               `json:"type"`
  727.     ID                  string               `json:"id"`
  728.     StickerFileID       string               `json:"sticker_file_id"`
  729.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  730.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  731. }
  732.  
  733. // 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.
  734. type InlineQueryResultCachedDocument struct {
  735.     Type                string               `json:"type"`
  736.     ID                  string               `json:"id"`
  737.     Title               string               `json:"title"`
  738.     DocumentFileID      string               `json:"document_file_id"`
  739.     Description         string               `json:"description"`
  740.     Caption             string               `json:"caption"`
  741.     ParseMode           string               `json:"parse_mode"`
  742.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  743.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  744. }
  745.  
  746. // 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.
  747. type InlineQueryResultCachedVideo struct {
  748.     Type                string               `json:"type"`
  749.     ID                  string               `json:"id"`
  750.     VideoFileID         string               `json:"video_file_id"`
  751.     Title               string               `json:"title"`
  752.     Description         string               `json:"description"`
  753.     Caption             string               `json:"caption"`
  754.     ParseMode           string               `json:"parse_mode"`
  755.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  756.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  757. }
  758.  
  759. // 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.
  760. type InlineQueryResultCachedVoice struct {
  761.     Type                string               `json:"type"`
  762.     ID                  string               `json:"id"`
  763.     VoiceFileID         string               `json:"voice_file_id"`
  764.     Title               string               `json:"title"`
  765.     Caption             string               `json:"caption"`
  766.     ParseMode           string               `json:"parse_mode"`
  767.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  768.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  769. }
  770.  
  771. // 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.
  772. type InlineQueryResultCachedAudio struct {
  773.     Type                string               `json:"type"`
  774.     ID                  string               `json:"id"`
  775.     AudioFileID         string               `json:"audio_file_id"`
  776.     Caption             string               `json:"caption"`
  777.     ParseMode           string               `json:"parse_mode"`
  778.     ReplyMarkup         *ReplyMarkup         `json:"reply_markup"`
  779.     InputMessageContent *InputMessageContent `json:"input_message_content"`
  780. }
  781.  
  782. // InputTextMessageContent - Represents the content of a text message to be sent as the result of an inline query.
  783. type InputTextMessageContent struct {
  784.     MessageText           string `json:"message_text"`
  785.     ParseMode             string `json:"parse_mode"`
  786.     DisableWebPagePreview bool   `json:"disable_web_page_preview"`
  787. }
  788.  
  789. // InputLocationMessageContent - Represents the content of a location message to be sent as the result of an inline query.
  790. type InputLocationMessageContent struct {
  791.     Latitude   float64 `json:"latitude"`
  792.     Longitude  float64 `json:"longitude"`
  793.     LivePeriod int     `json:"live_period"`
  794. }
  795.  
  796. // InputVenueMessageContent - Represents the content of a venue message to be sent as the result of an inline query.
  797. type InputVenueMessageContent struct {
  798.     Latitude       float64 `json:"latitude"`
  799.     Longitude      float64 `json:"longitude"`
  800.     Title          string  `json:"title"`
  801.     Address        string  `json:"address"`
  802.     FoursquareID   string  `json:"foursquare_id"`
  803.     FoursquareType string  `json:"foursquare_type"`
  804. }
  805.  
  806. // InputContactMessageContent - Represents the content of a contact message to be sent as the result of an inline query.
  807. type InputContactMessageContent struct {
  808.     PhoneNumber string `json:"phone_number"`
  809.     FirstName   string `json:"first_name"`
  810.     LastName    string `json:"last_name"`
  811.     Vcard       string `json:"vcard"`
  812. }
  813.  
  814. // ChosenInlineResult - Represents a result of an inline query that was chosen by the user and sent to their chat partner.
  815. type ChosenInlineResult struct {
  816.     ResultID        string    `json:"result_id"`
  817.     From            *User     `json:"from"`
  818.     Location        *Location `json:"location"`
  819.     InlineMessageID string    `json:"inline_message_id"`
  820.     Query           string    `json:"query"`
  821. }
  822.  
  823. // LabeledPrice - This object represents a portion of the price for goods or services.
  824. type LabeledPrice struct {
  825.     Label  string `json:"label"`
  826.     Amount int    `json:"amount"`
  827. }
  828.  
  829. // Invoice - This object contains basic information about an invoice.
  830. type Invoice struct {
  831.     Title          string `json:"title"`
  832.     Description    string `json:"description"`
  833.     StartParameter string `json:"start_parameter"`
  834.     Currency       string `json:"currency"`
  835.     TotalAmount    int    `json:"total_amount"`
  836. }
  837.  
  838. // ShippingAddress - This object represents a shipping address.
  839. type ShippingAddress struct {
  840.     CountryCode string `json:"country_code"`
  841.     State       string `json:"state"`
  842.     City        string `json:"city"`
  843.     StreetLine1 string `json:"street_line1"`
  844.     StreetLine2 string `json:"street_line2"`
  845.     PostCode    string `json:"post_code"`
  846. }
  847.  
  848. // OrderInfo - This object represents information about an order.
  849. type OrderInfo struct {
  850.     Name            string           `json:"name"`
  851.     PhoneNumber     string           `json:"phone_number"`
  852.     Email           string           `json:"email"`
  853.     ShippingAddress *ShippingAddress `json:"shipping_address"`
  854. }
  855.  
  856. // ShippingOption - This object represents one shipping option.
  857. type ShippingOption struct {
  858.     ID     string          `json:"id"`
  859.     Title  string          `json:"title"`
  860.     Prices []*LabeledPrice `json:"prices"`
  861. }
  862.  
  863. // SuccessfulPayment - This object contains basic information about a successful payment.
  864. type SuccessfulPayment struct {
  865.     Currency                string     `json:"currency"`
  866.     TotalAmount             int        `json:"total_amount"`
  867.     InvoicePayload          string     `json:"invoice_payload"`
  868.     ShippingOptionID        string     `json:"shipping_option_id"`
  869.     OrderInfo               *OrderInfo `json:"order_info"`
  870.     TelegramPaymentChargeID string     `json:"telegram_payment_charge_id"`
  871.     ProviderPaymentChargeID string     `json:"provider_payment_charge_id"`
  872. }
  873.  
  874. // ShippingQuery - This object contains information about an incoming shipping query.
  875. type ShippingQuery struct {
  876.     ID              string           `json:"id"`
  877.     From            *User            `json:"from"`
  878.     InvoicePayload  string           `json:"invoice_payload"`
  879.     ShippingAddress *ShippingAddress `json:"shipping_address"`
  880. }
  881.  
  882. // PreCheckoutQuery - This object contains information about an incoming pre-checkout query.
  883. type PreCheckoutQuery struct {
  884.     ID               string     `json:"id"`
  885.     From             *User      `json:"from"`
  886.     Currency         string     `json:"currency"`
  887.     TotalAmount      int        `json:"total_amount"`
  888.     InvoicePayload   string     `json:"invoice_payload"`
  889.     ShippingOptionID string     `json:"shipping_option_id"`
  890.     OrderInfo        *OrderInfo `json:"order_info"`
  891. }
  892.  
  893. // PassportData - Contains information about Telegram Passport data shared with the bot by the user.
  894. type PassportData struct {
  895.     Data        []*EncryptedPassportElement `json:"data"`
  896.     Credentials *EncryptedCredentials       `json:"credentials"`
  897. }
  898.  
  899. // PassportFile - This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.
  900. type PassportFile struct {
  901.     FileID       string `json:"file_id"`
  902.     FileUniqueID string `json:"file_unique_id"`
  903.     FileSize     int    `json:"file_size"`
  904.     FileDate     int    `json:"file_date"`
  905. }
  906.  
  907. // EncryptedPassportElement - Contains information about documents or other Telegram Passport elements shared with the bot by the user.
  908. type EncryptedPassportElement struct {
  909.     Type        string          `json:"type"`
  910.     Data        string          `json:"data"`
  911.     PhoneNumber string          `json:"phone_number"`
  912.     Email       string          `json:"email"`
  913.     Files       []*PassportFile `json:"files"`
  914.     FrontSide   *PassportFile   `json:"front_side"`
  915.     ReverseSide *PassportFile   `json:"reverse_side"`
  916.     Selfie      *PassportFile   `json:"selfie"`
  917.     Translation []*PassportFile `json:"translation"`
  918.     Hash        string          `json:"hash"`
  919. }
  920.  
  921. // EncryptedCredentials - Contains data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
  922. type EncryptedCredentials struct {
  923.     Data   string `json:"data"`
  924.     Hash   string `json:"hash"`
  925.     Secret string `json:"secret"`
  926. }
  927.  
  928. // PassportElementErrorDataField - Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.
  929. type PassportElementErrorDataField struct {
  930.     Source    string `json:"source"`
  931.     Type      string `json:"type"`
  932.     FieldName string `json:"field_name"`
  933.     DataHash  string `json:"data_hash"`
  934.     Message   string `json:"message"`
  935. }
  936.  
  937. // PassportElementErrorFrontSide - Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.
  938. type PassportElementErrorFrontSide struct {
  939.     Source   string `json:"source"`
  940.     Type     string `json:"type"`
  941.     FileHash string `json:"file_hash"`
  942.     Message  string `json:"message"`
  943. }
  944.  
  945. // PassportElementErrorReverseSide - Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
  946. type PassportElementErrorReverseSide struct {
  947.     Source   string `json:"source"`
  948.     Type     string `json:"type"`
  949.     FileHash string `json:"file_hash"`
  950.     Message  string `json:"message"`
  951. }
  952.  
  953. // PassportElementErrorSelfie - Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
  954. type PassportElementErrorSelfie struct {
  955.     Source   string `json:"source"`
  956.     Type     string `json:"type"`
  957.     FileHash string `json:"file_hash"`
  958.     Message  string `json:"message"`
  959. }
  960.  
  961. // PassportElementErrorFile - Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
  962. type PassportElementErrorFile struct {
  963.     Source   string `json:"source"`
  964.     Type     string `json:"type"`
  965.     FileHash string `json:"file_hash"`
  966.     Message  string `json:"message"`
  967. }
  968.  
  969. // PassportElementErrorFiles - Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
  970. type PassportElementErrorFiles struct {
  971.     Source     string   `json:"source"`
  972.     Type       string   `json:"type"`
  973.     FileHashes []string `json:"file_hashes"`
  974.     Message    string   `json:"message"`
  975. }
  976.  
  977. // PassportElementErrorTranslationFile - Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
  978. type PassportElementErrorTranslationFile struct {
  979.     Source   string `json:"source"`
  980.     Type     string `json:"type"`
  981.     FileHash string `json:"file_hash"`
  982.     Message  string `json:"message"`
  983. }
  984.  
  985. // PassportElementErrorTranslationFiles - Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
  986. type PassportElementErrorTranslationFiles struct {
  987.     Source     string   `json:"source"`
  988.     Type       string   `json:"type"`
  989.     FileHashes []string `json:"file_hashes"`
  990.     Message    string   `json:"message"`
  991. }
  992.  
  993. // PassportElementErrorUnspecified - Represents an issue in an unspecified place. The error is considered resolved when new data is added.
  994. type PassportElementErrorUnspecified struct {
  995.     Source      string `json:"source"`
  996.     Type        string `json:"type"`
  997.     ElementHash string `json:"element_hash"`
  998.     Message     string `json:"message"`
  999. }
  1000.  
  1001. // Game - This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
  1002. type Game struct {
  1003.     Title        string           `json:"title"`
  1004.     Description  string           `json:"description"`
  1005.     Photo        []*PhotoSize     `json:"photo"`
  1006.     Text         string           `json:"text"`
  1007.     TextEntities []*MessageEntity `json:"text_entities"`
  1008.     Animation    *Animation       `json:"animation"`
  1009. }
  1010.  
  1011. // CallbackGame - A placeholder, currently holds no information. Use BotFather to set up your game.
  1012. type CallbackGame struct {
  1013. }
  1014.  
  1015. // GameHighScore - This object represents one row of the high scores table for a game.
  1016. type GameHighScore struct {
  1017.     Position int   `json:"position"`
  1018.     User     *User `json:"user"`
  1019.     Score    int   `json:"score"`
  1020. }
  1021.  
  1022. // Client represents telegram bot client
  1023. type Client interface {
  1024.     Request(string, interface{}, interface{})
  1025. }
  1026.  
  1027. // GetUpdatesMethod - bla-bla
  1028. type GetUpdatesMethod struct {
  1029.     Offset         int      `json:"offset"`
  1030.     Limit          int      `json:"limit"`
  1031.     Timeout        int      `json:"timeout"`
  1032.     AllowedUpdates []string `json:"allowed_updates"`
  1033. }
  1034.  
  1035. // GetUpdates creates new Telegram Bot API method getUpdates
  1036. func GetUpdates() *GetUpdatesMethod {
  1037.     return &GetUpdatesMethod{}
  1038. }
  1039.  
  1040. // SetOffset - bla-bla
  1041. func (b *GetUpdatesMethod) SetOffset(value int) *GetUpdatesMethod {
  1042.     b.Offset = value
  1043.     return b
  1044. }
  1045.  
  1046. // SetLimit - bla-bla
  1047. func (b *GetUpdatesMethod) SetLimit(value int) *GetUpdatesMethod {
  1048.     b.Limit = value
  1049.     return b
  1050. }
  1051.  
  1052. // SetTimeout - bla-bla
  1053. func (b *GetUpdatesMethod) SetTimeout(value int) *GetUpdatesMethod {
  1054.     b.Timeout = value
  1055.     return b
  1056. }
  1057.  
  1058. // SetAllowedUpdates - bla-bla
  1059. func (b *GetUpdatesMethod) SetAllowedUpdates(value []string) *GetUpdatesMethod {
  1060.     b.AllowedUpdates = value
  1061.     return b
  1062. }
  1063.  
  1064. // SetWebhookMethod - bla-bla
  1065. type SetWebhookMethod struct {
  1066.     URL            string     `json:"url"`
  1067.     Certificate    *InputFile `json:"certificate"`
  1068.     MaxConnections int        `json:"max_connections"`
  1069.     AllowedUpdates []string   `json:"allowed_updates"`
  1070. }
  1071.  
  1072. // SetWebhook creates new Telegram Bot API method setWebhook
  1073. func SetWebhook(uRL string) *SetWebhookMethod {
  1074.     return &SetWebhookMethod{
  1075.         URL: uRL,
  1076.     }
  1077. }
  1078.  
  1079. // SetURL - bla-bla
  1080. func (b *SetWebhookMethod) SetURL(value string) *SetWebhookMethod {
  1081.     b.URL = value
  1082.     return b
  1083. }
  1084.  
  1085. // SetCertificate - bla-bla
  1086. func (b *SetWebhookMethod) SetCertificate(value *InputFile) *SetWebhookMethod {
  1087.     b.Certificate = value
  1088.     return b
  1089. }
  1090.  
  1091. // SetMaxConnections - bla-bla
  1092. func (b *SetWebhookMethod) SetMaxConnections(value int) *SetWebhookMethod {
  1093.     b.MaxConnections = value
  1094.     return b
  1095. }
  1096.  
  1097. // SetAllowedUpdates - bla-bla
  1098. func (b *SetWebhookMethod) SetAllowedUpdates(value []string) *SetWebhookMethod {
  1099.     b.AllowedUpdates = value
  1100.     return b
  1101. }
  1102.  
  1103. // DeleteWebhookMethod - bla-bla
  1104. type DeleteWebhookMethod struct {
  1105. }
  1106.  
  1107. // DeleteWebhook creates new Telegram Bot API method deleteWebhook
  1108. func DeleteWebhook() *DeleteWebhookMethod {
  1109.     return &DeleteWebhookMethod{}
  1110. }
  1111.  
  1112. // GetWebhookInfoMethod - bla-bla
  1113. type GetWebhookInfoMethod struct {
  1114. }
  1115.  
  1116. // GetWebhookInfo creates new Telegram Bot API method getWebhookInfo
  1117. func GetWebhookInfo() *GetWebhookInfoMethod {
  1118.     return &GetWebhookInfoMethod{}
  1119. }
  1120.  
  1121. // GetMeMethod - bla-bla
  1122. type GetMeMethod struct {
  1123. }
  1124.  
  1125. // GetMe creates new Telegram Bot API method getMe
  1126. func GetMe() *GetMeMethod {
  1127.     return &GetMeMethod{}
  1128. }
  1129.  
  1130. // SendMessageMethod - bla-bla
  1131. type SendMessageMethod struct {
  1132.     ChatID                ChatID       `json:"chat_id"`
  1133.     Text                  string       `json:"text"`
  1134.     ParseMode             string       `json:"parse_mode"`
  1135.     DisableWebPagePreview bool         `json:"disable_web_page_preview"`
  1136.     DisableNotification   bool         `json:"disable_notification"`
  1137.     ReplyToMessageID      int          `json:"reply_to_message_id"`
  1138.     ReplyMarkup           *ReplyMarkup `json:"reply_markup"`
  1139. }
  1140.  
  1141. // SendMessage creates new Telegram Bot API method sendMessage
  1142. func SendMessage(chatID ChatID, text string) *SendMessageMethod {
  1143.     return &SendMessageMethod{
  1144.         ChatID: chatID,
  1145.         Text:   text,
  1146.     }
  1147. }
  1148.  
  1149. // SetChatID - bla-bla
  1150. func (b *SendMessageMethod) SetChatID(value ChatID) *SendMessageMethod {
  1151.     b.ChatID = value
  1152.     return b
  1153. }
  1154.  
  1155. // SetText - bla-bla
  1156. func (b *SendMessageMethod) SetText(value string) *SendMessageMethod {
  1157.     b.Text = value
  1158.     return b
  1159. }
  1160.  
  1161. // SetParseMode - bla-bla
  1162. func (b *SendMessageMethod) SetParseMode(value string) *SendMessageMethod {
  1163.     b.ParseMode = value
  1164.     return b
  1165. }
  1166.  
  1167. // SetDisableWebPagePreview - bla-bla
  1168. func (b *SendMessageMethod) SetDisableWebPagePreview(value bool) *SendMessageMethod {
  1169.     b.DisableWebPagePreview = value
  1170.     return b
  1171. }
  1172.  
  1173. // SetDisableNotification - bla-bla
  1174. func (b *SendMessageMethod) SetDisableNotification(value bool) *SendMessageMethod {
  1175.     b.DisableNotification = value
  1176.     return b
  1177. }
  1178.  
  1179. // SetReplyToMessageID - bla-bla
  1180. func (b *SendMessageMethod) SetReplyToMessageID(value int) *SendMessageMethod {
  1181.     b.ReplyToMessageID = value
  1182.     return b
  1183. }
  1184.  
  1185. // SetReplyMarkup - bla-bla
  1186. func (b *SendMessageMethod) SetReplyMarkup(value *ReplyMarkup) *SendMessageMethod {
  1187.     b.ReplyMarkup = value
  1188.     return b
  1189. }
  1190.  
  1191. // ForwardMessageMethod - bla-bla
  1192. type ForwardMessageMethod struct {
  1193.     ChatID              ChatID `json:"chat_id"`
  1194.     FromChatID          ChatID `json:"from_chat_id"`
  1195.     DisableNotification bool   `json:"disable_notification"`
  1196.     MessageID           int    `json:"message_id"`
  1197. }
  1198.  
  1199. // ForwardMessage creates new Telegram Bot API method forwardMessage
  1200. func ForwardMessage(chatID ChatID, fromChatID ChatID, messageID int) *ForwardMessageMethod {
  1201.     return &ForwardMessageMethod{
  1202.         ChatID:     chatID,
  1203.         FromChatID: fromChatID,
  1204.         MessageID:  messageID,
  1205.     }
  1206. }
  1207.  
  1208. // SetChatID - bla-bla
  1209. func (b *ForwardMessageMethod) SetChatID(value ChatID) *ForwardMessageMethod {
  1210.     b.ChatID = value
  1211.     return b
  1212. }
  1213.  
  1214. // SetFromChatID - bla-bla
  1215. func (b *ForwardMessageMethod) SetFromChatID(value ChatID) *ForwardMessageMethod {
  1216.     b.FromChatID = value
  1217.     return b
  1218. }
  1219.  
  1220. // SetDisableNotification - bla-bla
  1221. func (b *ForwardMessageMethod) SetDisableNotification(value bool) *ForwardMessageMethod {
  1222.     b.DisableNotification = value
  1223.     return b
  1224. }
  1225.  
  1226. // SetMessageID - bla-bla
  1227. func (b *ForwardMessageMethod) SetMessageID(value int) *ForwardMessageMethod {
  1228.     b.MessageID = value
  1229.     return b
  1230. }
  1231.  
  1232. // SendPhotoMethod - bla-bla
  1233. type SendPhotoMethod struct {
  1234.     ChatID              ChatID       `json:"chat_id"`
  1235.     Photo               *InputFile   `json:"photo"`
  1236.     Caption             string       `json:"caption"`
  1237.     ParseMode           string       `json:"parse_mode"`
  1238.     DisableNotification bool         `json:"disable_notification"`
  1239.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  1240.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  1241. }
  1242.  
  1243. // SendPhoto creates new Telegram Bot API method sendPhoto
  1244. func SendPhoto(chatID ChatID, photo *InputFile) *SendPhotoMethod {
  1245.     return &SendPhotoMethod{
  1246.         ChatID: chatID,
  1247.         Photo:  photo,
  1248.     }
  1249. }
  1250.  
  1251. // SetChatID - bla-bla
  1252. func (b *SendPhotoMethod) SetChatID(value ChatID) *SendPhotoMethod {
  1253.     b.ChatID = value
  1254.     return b
  1255. }
  1256.  
  1257. // SetPhoto - bla-bla
  1258. func (b *SendPhotoMethod) SetPhoto(value *InputFile) *SendPhotoMethod {
  1259.     b.Photo = value
  1260.     return b
  1261. }
  1262.  
  1263. // SetCaption - bla-bla
  1264. func (b *SendPhotoMethod) SetCaption(value string) *SendPhotoMethod {
  1265.     b.Caption = value
  1266.     return b
  1267. }
  1268.  
  1269. // SetParseMode - bla-bla
  1270. func (b *SendPhotoMethod) SetParseMode(value string) *SendPhotoMethod {
  1271.     b.ParseMode = value
  1272.     return b
  1273. }
  1274.  
  1275. // SetDisableNotification - bla-bla
  1276. func (b *SendPhotoMethod) SetDisableNotification(value bool) *SendPhotoMethod {
  1277.     b.DisableNotification = value
  1278.     return b
  1279. }
  1280.  
  1281. // SetReplyToMessageID - bla-bla
  1282. func (b *SendPhotoMethod) SetReplyToMessageID(value int) *SendPhotoMethod {
  1283.     b.ReplyToMessageID = value
  1284.     return b
  1285. }
  1286.  
  1287. // SetReplyMarkup - bla-bla
  1288. func (b *SendPhotoMethod) SetReplyMarkup(value *ReplyMarkup) *SendPhotoMethod {
  1289.     b.ReplyMarkup = value
  1290.     return b
  1291. }
  1292.  
  1293. // SendAudioMethod - bla-bla
  1294. type SendAudioMethod struct {
  1295.     ChatID              ChatID       `json:"chat_id"`
  1296.     Audio               *InputFile   `json:"audio"`
  1297.     Caption             string       `json:"caption"`
  1298.     ParseMode           string       `json:"parse_mode"`
  1299.     Duration            int          `json:"duration"`
  1300.     Performer           string       `json:"performer"`
  1301.     Title               string       `json:"title"`
  1302.     Thumb               *InputFile   `json:"thumb"`
  1303.     DisableNotification bool         `json:"disable_notification"`
  1304.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  1305.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  1306. }
  1307.  
  1308. // SendAudio creates new Telegram Bot API method sendAudio
  1309. func SendAudio(chatID ChatID, audio *InputFile) *SendAudioMethod {
  1310.     return &SendAudioMethod{
  1311.         ChatID: chatID,
  1312.         Audio:  audio,
  1313.     }
  1314. }
  1315.  
  1316. // SetChatID - bla-bla
  1317. func (b *SendAudioMethod) SetChatID(value ChatID) *SendAudioMethod {
  1318.     b.ChatID = value
  1319.     return b
  1320. }
  1321.  
  1322. // SetAudio - bla-bla
  1323. func (b *SendAudioMethod) SetAudio(value *InputFile) *SendAudioMethod {
  1324.     b.Audio = value
  1325.     return b
  1326. }
  1327.  
  1328. // SetCaption - bla-bla
  1329. func (b *SendAudioMethod) SetCaption(value string) *SendAudioMethod {
  1330.     b.Caption = value
  1331.     return b
  1332. }
  1333.  
  1334. // SetParseMode - bla-bla
  1335. func (b *SendAudioMethod) SetParseMode(value string) *SendAudioMethod {
  1336.     b.ParseMode = value
  1337.     return b
  1338. }
  1339.  
  1340. // SetDuration - bla-bla
  1341. func (b *SendAudioMethod) SetDuration(value int) *SendAudioMethod {
  1342.     b.Duration = value
  1343.     return b
  1344. }
  1345.  
  1346. // SetPerformer - bla-bla
  1347. func (b *SendAudioMethod) SetPerformer(value string) *SendAudioMethod {
  1348.     b.Performer = value
  1349.     return b
  1350. }
  1351.  
  1352. // SetTitle - bla-bla
  1353. func (b *SendAudioMethod) SetTitle(value string) *SendAudioMethod {
  1354.     b.Title = value
  1355.     return b
  1356. }
  1357.  
  1358. // SetThumb - bla-bla
  1359. func (b *SendAudioMethod) SetThumb(value *InputFile) *SendAudioMethod {
  1360.     b.Thumb = value
  1361.     return b
  1362. }
  1363.  
  1364. // SetDisableNotification - bla-bla
  1365. func (b *SendAudioMethod) SetDisableNotification(value bool) *SendAudioMethod {
  1366.     b.DisableNotification = value
  1367.     return b
  1368. }
  1369.  
  1370. // SetReplyToMessageID - bla-bla
  1371. func (b *SendAudioMethod) SetReplyToMessageID(value int) *SendAudioMethod {
  1372.     b.ReplyToMessageID = value
  1373.     return b
  1374. }
  1375.  
  1376. // SetReplyMarkup - bla-bla
  1377. func (b *SendAudioMethod) SetReplyMarkup(value *ReplyMarkup) *SendAudioMethod {
  1378.     b.ReplyMarkup = value
  1379.     return b
  1380. }
  1381.  
  1382. // SendDocumentMethod - bla-bla
  1383. type SendDocumentMethod struct {
  1384.     ChatID              ChatID       `json:"chat_id"`
  1385.     Document            *InputFile   `json:"document"`
  1386.     Thumb               *InputFile   `json:"thumb"`
  1387.     Caption             string       `json:"caption"`
  1388.     ParseMode           string       `json:"parse_mode"`
  1389.     DisableNotification bool         `json:"disable_notification"`
  1390.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  1391.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  1392. }
  1393.  
  1394. // SendDocument creates new Telegram Bot API method sendDocument
  1395. func SendDocument(chatID ChatID, document *InputFile) *SendDocumentMethod {
  1396.     return &SendDocumentMethod{
  1397.         ChatID:   chatID,
  1398.         Document: document,
  1399.     }
  1400. }
  1401.  
  1402. // SetChatID - bla-bla
  1403. func (b *SendDocumentMethod) SetChatID(value ChatID) *SendDocumentMethod {
  1404.     b.ChatID = value
  1405.     return b
  1406. }
  1407.  
  1408. // SetDocument - bla-bla
  1409. func (b *SendDocumentMethod) SetDocument(value *InputFile) *SendDocumentMethod {
  1410.     b.Document = value
  1411.     return b
  1412. }
  1413.  
  1414. // SetThumb - bla-bla
  1415. func (b *SendDocumentMethod) SetThumb(value *InputFile) *SendDocumentMethod {
  1416.     b.Thumb = value
  1417.     return b
  1418. }
  1419.  
  1420. // SetCaption - bla-bla
  1421. func (b *SendDocumentMethod) SetCaption(value string) *SendDocumentMethod {
  1422.     b.Caption = value
  1423.     return b
  1424. }
  1425.  
  1426. // SetParseMode - bla-bla
  1427. func (b *SendDocumentMethod) SetParseMode(value string) *SendDocumentMethod {
  1428.     b.ParseMode = value
  1429.     return b
  1430. }
  1431.  
  1432. // SetDisableNotification - bla-bla
  1433. func (b *SendDocumentMethod) SetDisableNotification(value bool) *SendDocumentMethod {
  1434.     b.DisableNotification = value
  1435.     return b
  1436. }
  1437.  
  1438. // SetReplyToMessageID - bla-bla
  1439. func (b *SendDocumentMethod) SetReplyToMessageID(value int) *SendDocumentMethod {
  1440.     b.ReplyToMessageID = value
  1441.     return b
  1442. }
  1443.  
  1444. // SetReplyMarkup - bla-bla
  1445. func (b *SendDocumentMethod) SetReplyMarkup(value *ReplyMarkup) *SendDocumentMethod {
  1446.     b.ReplyMarkup = value
  1447.     return b
  1448. }
  1449.  
  1450. // SendVideoMethod - bla-bla
  1451. type SendVideoMethod struct {
  1452.     ChatID              ChatID       `json:"chat_id"`
  1453.     Video               *InputFile   `json:"video"`
  1454.     Duration            int          `json:"duration"`
  1455.     Width               int          `json:"width"`
  1456.     Height              int          `json:"height"`
  1457.     Thumb               *InputFile   `json:"thumb"`
  1458.     Caption             string       `json:"caption"`
  1459.     ParseMode           string       `json:"parse_mode"`
  1460.     SupportsStreaming   bool         `json:"supports_streaming"`
  1461.     DisableNotification bool         `json:"disable_notification"`
  1462.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  1463.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  1464. }
  1465.  
  1466. // SendVideo creates new Telegram Bot API method sendVideo
  1467. func SendVideo(chatID ChatID, video *InputFile) *SendVideoMethod {
  1468.     return &SendVideoMethod{
  1469.         ChatID: chatID,
  1470.         Video:  video,
  1471.     }
  1472. }
  1473.  
  1474. // SetChatID - bla-bla
  1475. func (b *SendVideoMethod) SetChatID(value ChatID) *SendVideoMethod {
  1476.     b.ChatID = value
  1477.     return b
  1478. }
  1479.  
  1480. // SetVideo - bla-bla
  1481. func (b *SendVideoMethod) SetVideo(value *InputFile) *SendVideoMethod {
  1482.     b.Video = value
  1483.     return b
  1484. }
  1485.  
  1486. // SetDuration - bla-bla
  1487. func (b *SendVideoMethod) SetDuration(value int) *SendVideoMethod {
  1488.     b.Duration = value
  1489.     return b
  1490. }
  1491.  
  1492. // SetWidth - bla-bla
  1493. func (b *SendVideoMethod) SetWidth(value int) *SendVideoMethod {
  1494.     b.Width = value
  1495.     return b
  1496. }
  1497.  
  1498. // SetHeight - bla-bla
  1499. func (b *SendVideoMethod) SetHeight(value int) *SendVideoMethod {
  1500.     b.Height = value
  1501.     return b
  1502. }
  1503.  
  1504. // SetThumb - bla-bla
  1505. func (b *SendVideoMethod) SetThumb(value *InputFile) *SendVideoMethod {
  1506.     b.Thumb = value
  1507.     return b
  1508. }
  1509.  
  1510. // SetCaption - bla-bla
  1511. func (b *SendVideoMethod) SetCaption(value string) *SendVideoMethod {
  1512.     b.Caption = value
  1513.     return b
  1514. }
  1515.  
  1516. // SetParseMode - bla-bla
  1517. func (b *SendVideoMethod) SetParseMode(value string) *SendVideoMethod {
  1518.     b.ParseMode = value
  1519.     return b
  1520. }
  1521.  
  1522. // SetSupportsStreaming - bla-bla
  1523. func (b *SendVideoMethod) SetSupportsStreaming(value bool) *SendVideoMethod {
  1524.     b.SupportsStreaming = value
  1525.     return b
  1526. }
  1527.  
  1528. // SetDisableNotification - bla-bla
  1529. func (b *SendVideoMethod) SetDisableNotification(value bool) *SendVideoMethod {
  1530.     b.DisableNotification = value
  1531.     return b
  1532. }
  1533.  
  1534. // SetReplyToMessageID - bla-bla
  1535. func (b *SendVideoMethod) SetReplyToMessageID(value int) *SendVideoMethod {
  1536.     b.ReplyToMessageID = value
  1537.     return b
  1538. }
  1539.  
  1540. // SetReplyMarkup - bla-bla
  1541. func (b *SendVideoMethod) SetReplyMarkup(value *ReplyMarkup) *SendVideoMethod {
  1542.     b.ReplyMarkup = value
  1543.     return b
  1544. }
  1545.  
  1546. // SendAnimationMethod - bla-bla
  1547. type SendAnimationMethod struct {
  1548.     ChatID              ChatID       `json:"chat_id"`
  1549.     Animation           *InputFile   `json:"animation"`
  1550.     Duration            int          `json:"duration"`
  1551.     Width               int          `json:"width"`
  1552.     Height              int          `json:"height"`
  1553.     Thumb               *InputFile   `json:"thumb"`
  1554.     Caption             string       `json:"caption"`
  1555.     ParseMode           string       `json:"parse_mode"`
  1556.     DisableNotification bool         `json:"disable_notification"`
  1557.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  1558.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  1559. }
  1560.  
  1561. // SendAnimation creates new Telegram Bot API method sendAnimation
  1562. func SendAnimation(chatID ChatID, animation *InputFile) *SendAnimationMethod {
  1563.     return &SendAnimationMethod{
  1564.         ChatID:    chatID,
  1565.         Animation: animation,
  1566.     }
  1567. }
  1568.  
  1569. // SetChatID - bla-bla
  1570. func (b *SendAnimationMethod) SetChatID(value ChatID) *SendAnimationMethod {
  1571.     b.ChatID = value
  1572.     return b
  1573. }
  1574.  
  1575. // SetAnimation - bla-bla
  1576. func (b *SendAnimationMethod) SetAnimation(value *InputFile) *SendAnimationMethod {
  1577.     b.Animation = value
  1578.     return b
  1579. }
  1580.  
  1581. // SetDuration - bla-bla
  1582. func (b *SendAnimationMethod) SetDuration(value int) *SendAnimationMethod {
  1583.     b.Duration = value
  1584.     return b
  1585. }
  1586.  
  1587. // SetWidth - bla-bla
  1588. func (b *SendAnimationMethod) SetWidth(value int) *SendAnimationMethod {
  1589.     b.Width = value
  1590.     return b
  1591. }
  1592.  
  1593. // SetHeight - bla-bla
  1594. func (b *SendAnimationMethod) SetHeight(value int) *SendAnimationMethod {
  1595.     b.Height = value
  1596.     return b
  1597. }
  1598.  
  1599. // SetThumb - bla-bla
  1600. func (b *SendAnimationMethod) SetThumb(value *InputFile) *SendAnimationMethod {
  1601.     b.Thumb = value
  1602.     return b
  1603. }
  1604.  
  1605. // SetCaption - bla-bla
  1606. func (b *SendAnimationMethod) SetCaption(value string) *SendAnimationMethod {
  1607.     b.Caption = value
  1608.     return b
  1609. }
  1610.  
  1611. // SetParseMode - bla-bla
  1612. func (b *SendAnimationMethod) SetParseMode(value string) *SendAnimationMethod {
  1613.     b.ParseMode = value
  1614.     return b
  1615. }
  1616.  
  1617. // SetDisableNotification - bla-bla
  1618. func (b *SendAnimationMethod) SetDisableNotification(value bool) *SendAnimationMethod {
  1619.     b.DisableNotification = value
  1620.     return b
  1621. }
  1622.  
  1623. // SetReplyToMessageID - bla-bla
  1624. func (b *SendAnimationMethod) SetReplyToMessageID(value int) *SendAnimationMethod {
  1625.     b.ReplyToMessageID = value
  1626.     return b
  1627. }
  1628.  
  1629. // SetReplyMarkup - bla-bla
  1630. func (b *SendAnimationMethod) SetReplyMarkup(value *ReplyMarkup) *SendAnimationMethod {
  1631.     b.ReplyMarkup = value
  1632.     return b
  1633. }
  1634.  
  1635. // SendVoiceMethod - bla-bla
  1636. type SendVoiceMethod struct {
  1637.     ChatID              ChatID       `json:"chat_id"`
  1638.     Voice               *InputFile   `json:"voice"`
  1639.     Caption             string       `json:"caption"`
  1640.     ParseMode           string       `json:"parse_mode"`
  1641.     Duration            int          `json:"duration"`
  1642.     DisableNotification bool         `json:"disable_notification"`
  1643.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  1644.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  1645. }
  1646.  
  1647. // SendVoice creates new Telegram Bot API method sendVoice
  1648. func SendVoice(chatID ChatID, voice *InputFile) *SendVoiceMethod {
  1649.     return &SendVoiceMethod{
  1650.         ChatID: chatID,
  1651.         Voice:  voice,
  1652.     }
  1653. }
  1654.  
  1655. // SetChatID - bla-bla
  1656. func (b *SendVoiceMethod) SetChatID(value ChatID) *SendVoiceMethod {
  1657.     b.ChatID = value
  1658.     return b
  1659. }
  1660.  
  1661. // SetVoice - bla-bla
  1662. func (b *SendVoiceMethod) SetVoice(value *InputFile) *SendVoiceMethod {
  1663.     b.Voice = value
  1664.     return b
  1665. }
  1666.  
  1667. // SetCaption - bla-bla
  1668. func (b *SendVoiceMethod) SetCaption(value string) *SendVoiceMethod {
  1669.     b.Caption = value
  1670.     return b
  1671. }
  1672.  
  1673. // SetParseMode - bla-bla
  1674. func (b *SendVoiceMethod) SetParseMode(value string) *SendVoiceMethod {
  1675.     b.ParseMode = value
  1676.     return b
  1677. }
  1678.  
  1679. // SetDuration - bla-bla
  1680. func (b *SendVoiceMethod) SetDuration(value int) *SendVoiceMethod {
  1681.     b.Duration = value
  1682.     return b
  1683. }
  1684.  
  1685. // SetDisableNotification - bla-bla
  1686. func (b *SendVoiceMethod) SetDisableNotification(value bool) *SendVoiceMethod {
  1687.     b.DisableNotification = value
  1688.     return b
  1689. }
  1690.  
  1691. // SetReplyToMessageID - bla-bla
  1692. func (b *SendVoiceMethod) SetReplyToMessageID(value int) *SendVoiceMethod {
  1693.     b.ReplyToMessageID = value
  1694.     return b
  1695. }
  1696.  
  1697. // SetReplyMarkup - bla-bla
  1698. func (b *SendVoiceMethod) SetReplyMarkup(value *ReplyMarkup) *SendVoiceMethod {
  1699.     b.ReplyMarkup = value
  1700.     return b
  1701. }
  1702.  
  1703. // SendVideoNoteMethod - bla-bla
  1704. type SendVideoNoteMethod struct {
  1705.     ChatID              ChatID       `json:"chat_id"`
  1706.     VideoNote           *InputFile   `json:"video_note"`
  1707.     Duration            int          `json:"duration"`
  1708.     Length              int          `json:"length"`
  1709.     Thumb               *InputFile   `json:"thumb"`
  1710.     DisableNotification bool         `json:"disable_notification"`
  1711.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  1712.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  1713. }
  1714.  
  1715. // SendVideoNote creates new Telegram Bot API method sendVideoNote
  1716. func SendVideoNote(chatID ChatID, videoNote *InputFile) *SendVideoNoteMethod {
  1717.     return &SendVideoNoteMethod{
  1718.         ChatID:    chatID,
  1719.         VideoNote: videoNote,
  1720.     }
  1721. }
  1722.  
  1723. // SetChatID - bla-bla
  1724. func (b *SendVideoNoteMethod) SetChatID(value ChatID) *SendVideoNoteMethod {
  1725.     b.ChatID = value
  1726.     return b
  1727. }
  1728.  
  1729. // SetVideoNote - bla-bla
  1730. func (b *SendVideoNoteMethod) SetVideoNote(value *InputFile) *SendVideoNoteMethod {
  1731.     b.VideoNote = value
  1732.     return b
  1733. }
  1734.  
  1735. // SetDuration - bla-bla
  1736. func (b *SendVideoNoteMethod) SetDuration(value int) *SendVideoNoteMethod {
  1737.     b.Duration = value
  1738.     return b
  1739. }
  1740.  
  1741. // SetLength - bla-bla
  1742. func (b *SendVideoNoteMethod) SetLength(value int) *SendVideoNoteMethod {
  1743.     b.Length = value
  1744.     return b
  1745. }
  1746.  
  1747. // SetThumb - bla-bla
  1748. func (b *SendVideoNoteMethod) SetThumb(value *InputFile) *SendVideoNoteMethod {
  1749.     b.Thumb = value
  1750.     return b
  1751. }
  1752.  
  1753. // SetDisableNotification - bla-bla
  1754. func (b *SendVideoNoteMethod) SetDisableNotification(value bool) *SendVideoNoteMethod {
  1755.     b.DisableNotification = value
  1756.     return b
  1757. }
  1758.  
  1759. // SetReplyToMessageID - bla-bla
  1760. func (b *SendVideoNoteMethod) SetReplyToMessageID(value int) *SendVideoNoteMethod {
  1761.     b.ReplyToMessageID = value
  1762.     return b
  1763. }
  1764.  
  1765. // SetReplyMarkup - bla-bla
  1766. func (b *SendVideoNoteMethod) SetReplyMarkup(value *ReplyMarkup) *SendVideoNoteMethod {
  1767.     b.ReplyMarkup = value
  1768.     return b
  1769. }
  1770.  
  1771. // SendMediaGroupMethod - bla-bla
  1772. type SendMediaGroupMethod struct {
  1773.     ChatID              ChatID     `json:"chat_id"`
  1774.     Media               InputMedia `json:"media"`
  1775.     DisableNotification bool       `json:"disable_notification"`
  1776.     ReplyToMessageID    int        `json:"reply_to_message_id"`
  1777. }
  1778.  
  1779. // SendMediaGroup creates new Telegram Bot API method sendMediaGroup
  1780. func SendMediaGroup(chatID ChatID, media InputMedia) *SendMediaGroupMethod {
  1781.     return &SendMediaGroupMethod{
  1782.         ChatID: chatID,
  1783.         Media:  media,
  1784.     }
  1785. }
  1786.  
  1787. // SetChatID - bla-bla
  1788. func (b *SendMediaGroupMethod) SetChatID(value ChatID) *SendMediaGroupMethod {
  1789.     b.ChatID = value
  1790.     return b
  1791. }
  1792.  
  1793. // SetMedia - bla-bla
  1794. func (b *SendMediaGroupMethod) SetMedia(value InputMedia) *SendMediaGroupMethod {
  1795.     b.Media = value
  1796.     return b
  1797. }
  1798.  
  1799. // SetDisableNotification - bla-bla
  1800. func (b *SendMediaGroupMethod) SetDisableNotification(value bool) *SendMediaGroupMethod {
  1801.     b.DisableNotification = value
  1802.     return b
  1803. }
  1804.  
  1805. // SetReplyToMessageID - bla-bla
  1806. func (b *SendMediaGroupMethod) SetReplyToMessageID(value int) *SendMediaGroupMethod {
  1807.     b.ReplyToMessageID = value
  1808.     return b
  1809. }
  1810.  
  1811. // SendLocationMethod - bla-bla
  1812. type SendLocationMethod struct {
  1813.     ChatID              ChatID       `json:"chat_id"`
  1814.     Latitude            float64      `json:"latitude"`
  1815.     Longitude           float64      `json:"longitude"`
  1816.     LivePeriod          int          `json:"live_period"`
  1817.     DisableNotification bool         `json:"disable_notification"`
  1818.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  1819.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  1820. }
  1821.  
  1822. // SendLocation creates new Telegram Bot API method sendLocation
  1823. func SendLocation(chatID ChatID, latitude float64, longitude float64) *SendLocationMethod {
  1824.     return &SendLocationMethod{
  1825.         ChatID:    chatID,
  1826.         Latitude:  latitude,
  1827.         Longitude: longitude,
  1828.     }
  1829. }
  1830.  
  1831. // SetChatID - bla-bla
  1832. func (b *SendLocationMethod) SetChatID(value ChatID) *SendLocationMethod {
  1833.     b.ChatID = value
  1834.     return b
  1835. }
  1836.  
  1837. // SetLatitude - bla-bla
  1838. func (b *SendLocationMethod) SetLatitude(value float64) *SendLocationMethod {
  1839.     b.Latitude = value
  1840.     return b
  1841. }
  1842.  
  1843. // SetLongitude - bla-bla
  1844. func (b *SendLocationMethod) SetLongitude(value float64) *SendLocationMethod {
  1845.     b.Longitude = value
  1846.     return b
  1847. }
  1848.  
  1849. // SetLivePeriod - bla-bla
  1850. func (b *SendLocationMethod) SetLivePeriod(value int) *SendLocationMethod {
  1851.     b.LivePeriod = value
  1852.     return b
  1853. }
  1854.  
  1855. // SetDisableNotification - bla-bla
  1856. func (b *SendLocationMethod) SetDisableNotification(value bool) *SendLocationMethod {
  1857.     b.DisableNotification = value
  1858.     return b
  1859. }
  1860.  
  1861. // SetReplyToMessageID - bla-bla
  1862. func (b *SendLocationMethod) SetReplyToMessageID(value int) *SendLocationMethod {
  1863.     b.ReplyToMessageID = value
  1864.     return b
  1865. }
  1866.  
  1867. // SetReplyMarkup - bla-bla
  1868. func (b *SendLocationMethod) SetReplyMarkup(value *ReplyMarkup) *SendLocationMethod {
  1869.     b.ReplyMarkup = value
  1870.     return b
  1871. }
  1872.  
  1873. // EditMessageLiveLocationMethod - bla-bla
  1874. type EditMessageLiveLocationMethod struct {
  1875.     ChatID          ChatID       `json:"chat_id"`
  1876.     MessageID       int          `json:"message_id"`
  1877.     InlineMessageID string       `json:"inline_message_id"`
  1878.     Latitude        float64      `json:"latitude"`
  1879.     Longitude       float64      `json:"longitude"`
  1880.     ReplyMarkup     *ReplyMarkup `json:"reply_markup"`
  1881. }
  1882.  
  1883. // EditMessageLiveLocation creates new Telegram Bot API method editMessageLiveLocation
  1884. func EditMessageLiveLocation(latitude float64, longitude float64) *EditMessageLiveLocationMethod {
  1885.     return &EditMessageLiveLocationMethod{
  1886.         Latitude:  latitude,
  1887.         Longitude: longitude,
  1888.     }
  1889. }
  1890.  
  1891. // SetChatID - bla-bla
  1892. func (b *EditMessageLiveLocationMethod) SetChatID(value ChatID) *EditMessageLiveLocationMethod {
  1893.     b.ChatID = value
  1894.     return b
  1895. }
  1896.  
  1897. // SetMessageID - bla-bla
  1898. func (b *EditMessageLiveLocationMethod) SetMessageID(value int) *EditMessageLiveLocationMethod {
  1899.     b.MessageID = value
  1900.     return b
  1901. }
  1902.  
  1903. // SetInlineMessageID - bla-bla
  1904. func (b *EditMessageLiveLocationMethod) SetInlineMessageID(value string) *EditMessageLiveLocationMethod {
  1905.     b.InlineMessageID = value
  1906.     return b
  1907. }
  1908.  
  1909. // SetLatitude - bla-bla
  1910. func (b *EditMessageLiveLocationMethod) SetLatitude(value float64) *EditMessageLiveLocationMethod {
  1911.     b.Latitude = value
  1912.     return b
  1913. }
  1914.  
  1915. // SetLongitude - bla-bla
  1916. func (b *EditMessageLiveLocationMethod) SetLongitude(value float64) *EditMessageLiveLocationMethod {
  1917.     b.Longitude = value
  1918.     return b
  1919. }
  1920.  
  1921. // SetReplyMarkup - bla-bla
  1922. func (b *EditMessageLiveLocationMethod) SetReplyMarkup(value *ReplyMarkup) *EditMessageLiveLocationMethod {
  1923.     b.ReplyMarkup = value
  1924.     return b
  1925. }
  1926.  
  1927. // StopMessageLiveLocationMethod - bla-bla
  1928. type StopMessageLiveLocationMethod struct {
  1929.     ChatID          ChatID       `json:"chat_id"`
  1930.     MessageID       int          `json:"message_id"`
  1931.     InlineMessageID string       `json:"inline_message_id"`
  1932.     ReplyMarkup     *ReplyMarkup `json:"reply_markup"`
  1933. }
  1934.  
  1935. // StopMessageLiveLocation creates new Telegram Bot API method stopMessageLiveLocation
  1936. func StopMessageLiveLocation() *StopMessageLiveLocationMethod {
  1937.     return &StopMessageLiveLocationMethod{}
  1938. }
  1939.  
  1940. // SetChatID - bla-bla
  1941. func (b *StopMessageLiveLocationMethod) SetChatID(value ChatID) *StopMessageLiveLocationMethod {
  1942.     b.ChatID = value
  1943.     return b
  1944. }
  1945.  
  1946. // SetMessageID - bla-bla
  1947. func (b *StopMessageLiveLocationMethod) SetMessageID(value int) *StopMessageLiveLocationMethod {
  1948.     b.MessageID = value
  1949.     return b
  1950. }
  1951.  
  1952. // SetInlineMessageID - bla-bla
  1953. func (b *StopMessageLiveLocationMethod) SetInlineMessageID(value string) *StopMessageLiveLocationMethod {
  1954.     b.InlineMessageID = value
  1955.     return b
  1956. }
  1957.  
  1958. // SetReplyMarkup - bla-bla
  1959. func (b *StopMessageLiveLocationMethod) SetReplyMarkup(value *ReplyMarkup) *StopMessageLiveLocationMethod {
  1960.     b.ReplyMarkup = value
  1961.     return b
  1962. }
  1963.  
  1964. // SendVenueMethod - bla-bla
  1965. type SendVenueMethod struct {
  1966.     ChatID              ChatID       `json:"chat_id"`
  1967.     Latitude            float64      `json:"latitude"`
  1968.     Longitude           float64      `json:"longitude"`
  1969.     Title               string       `json:"title"`
  1970.     Address             string       `json:"address"`
  1971.     FoursquareID        string       `json:"foursquare_id"`
  1972.     FoursquareType      string       `json:"foursquare_type"`
  1973.     DisableNotification bool         `json:"disable_notification"`
  1974.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  1975.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  1976. }
  1977.  
  1978. // SendVenue creates new Telegram Bot API method sendVenue
  1979. func SendVenue(chatID ChatID, latitude float64, longitude float64, title string, address string) *SendVenueMethod {
  1980.     return &SendVenueMethod{
  1981.         ChatID:    chatID,
  1982.         Latitude:  latitude,
  1983.         Longitude: longitude,
  1984.         Title:     title,
  1985.         Address:   address,
  1986.     }
  1987. }
  1988.  
  1989. // SetChatID - bla-bla
  1990. func (b *SendVenueMethod) SetChatID(value ChatID) *SendVenueMethod {
  1991.     b.ChatID = value
  1992.     return b
  1993. }
  1994.  
  1995. // SetLatitude - bla-bla
  1996. func (b *SendVenueMethod) SetLatitude(value float64) *SendVenueMethod {
  1997.     b.Latitude = value
  1998.     return b
  1999. }
  2000.  
  2001. // SetLongitude - bla-bla
  2002. func (b *SendVenueMethod) SetLongitude(value float64) *SendVenueMethod {
  2003.     b.Longitude = value
  2004.     return b
  2005. }
  2006.  
  2007. // SetTitle - bla-bla
  2008. func (b *SendVenueMethod) SetTitle(value string) *SendVenueMethod {
  2009.     b.Title = value
  2010.     return b
  2011. }
  2012.  
  2013. // SetAddress - bla-bla
  2014. func (b *SendVenueMethod) SetAddress(value string) *SendVenueMethod {
  2015.     b.Address = value
  2016.     return b
  2017. }
  2018.  
  2019. // SetFoursquareID - bla-bla
  2020. func (b *SendVenueMethod) SetFoursquareID(value string) *SendVenueMethod {
  2021.     b.FoursquareID = value
  2022.     return b
  2023. }
  2024.  
  2025. // SetFoursquareType - bla-bla
  2026. func (b *SendVenueMethod) SetFoursquareType(value string) *SendVenueMethod {
  2027.     b.FoursquareType = value
  2028.     return b
  2029. }
  2030.  
  2031. // SetDisableNotification - bla-bla
  2032. func (b *SendVenueMethod) SetDisableNotification(value bool) *SendVenueMethod {
  2033.     b.DisableNotification = value
  2034.     return b
  2035. }
  2036.  
  2037. // SetReplyToMessageID - bla-bla
  2038. func (b *SendVenueMethod) SetReplyToMessageID(value int) *SendVenueMethod {
  2039.     b.ReplyToMessageID = value
  2040.     return b
  2041. }
  2042.  
  2043. // SetReplyMarkup - bla-bla
  2044. func (b *SendVenueMethod) SetReplyMarkup(value *ReplyMarkup) *SendVenueMethod {
  2045.     b.ReplyMarkup = value
  2046.     return b
  2047. }
  2048.  
  2049. // SendContactMethod - bla-bla
  2050. type SendContactMethod struct {
  2051.     ChatID              ChatID       `json:"chat_id"`
  2052.     PhoneNumber         string       `json:"phone_number"`
  2053.     FirstName           string       `json:"first_name"`
  2054.     LastName            string       `json:"last_name"`
  2055.     Vcard               string       `json:"vcard"`
  2056.     DisableNotification bool         `json:"disable_notification"`
  2057.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  2058.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  2059. }
  2060.  
  2061. // SendContact creates new Telegram Bot API method sendContact
  2062. func SendContact(chatID ChatID, phoneNumber string, firstName string) *SendContactMethod {
  2063.     return &SendContactMethod{
  2064.         ChatID:      chatID,
  2065.         PhoneNumber: phoneNumber,
  2066.         FirstName:   firstName,
  2067.     }
  2068. }
  2069.  
  2070. // SetChatID - bla-bla
  2071. func (b *SendContactMethod) SetChatID(value ChatID) *SendContactMethod {
  2072.     b.ChatID = value
  2073.     return b
  2074. }
  2075.  
  2076. // SetPhoneNumber - bla-bla
  2077. func (b *SendContactMethod) SetPhoneNumber(value string) *SendContactMethod {
  2078.     b.PhoneNumber = value
  2079.     return b
  2080. }
  2081.  
  2082. // SetFirstName - bla-bla
  2083. func (b *SendContactMethod) SetFirstName(value string) *SendContactMethod {
  2084.     b.FirstName = value
  2085.     return b
  2086. }
  2087.  
  2088. // SetLastName - bla-bla
  2089. func (b *SendContactMethod) SetLastName(value string) *SendContactMethod {
  2090.     b.LastName = value
  2091.     return b
  2092. }
  2093.  
  2094. // SetVcard - bla-bla
  2095. func (b *SendContactMethod) SetVcard(value string) *SendContactMethod {
  2096.     b.Vcard = value
  2097.     return b
  2098. }
  2099.  
  2100. // SetDisableNotification - bla-bla
  2101. func (b *SendContactMethod) SetDisableNotification(value bool) *SendContactMethod {
  2102.     b.DisableNotification = value
  2103.     return b
  2104. }
  2105.  
  2106. // SetReplyToMessageID - bla-bla
  2107. func (b *SendContactMethod) SetReplyToMessageID(value int) *SendContactMethod {
  2108.     b.ReplyToMessageID = value
  2109.     return b
  2110. }
  2111.  
  2112. // SetReplyMarkup - bla-bla
  2113. func (b *SendContactMethod) SetReplyMarkup(value *ReplyMarkup) *SendContactMethod {
  2114.     b.ReplyMarkup = value
  2115.     return b
  2116. }
  2117.  
  2118. // SendPollMethod - bla-bla
  2119. type SendPollMethod struct {
  2120.     ChatID                ChatID       `json:"chat_id"`
  2121.     Question              string       `json:"question"`
  2122.     Options               []string     `json:"options"`
  2123.     IsAnonymous           bool         `json:"is_anonymous"`
  2124.     Type                  string       `json:"type"`
  2125.     AllowsMultipleAnswers bool         `json:"allows_multiple_answers"`
  2126.     CorrectOptionID       int          `json:"correct_option_id"`
  2127.     IsClosed              bool         `json:"is_closed"`
  2128.     DisableNotification   bool         `json:"disable_notification"`
  2129.     ReplyToMessageID      int          `json:"reply_to_message_id"`
  2130.     ReplyMarkup           *ReplyMarkup `json:"reply_markup"`
  2131. }
  2132.  
  2133. // SendPoll creates new Telegram Bot API method sendPoll
  2134. func SendPoll(chatID ChatID, question string, options []string) *SendPollMethod {
  2135.     return &SendPollMethod{
  2136.         ChatID:   chatID,
  2137.         Question: question,
  2138.         Options:  options,
  2139.     }
  2140. }
  2141.  
  2142. // SetChatID - bla-bla
  2143. func (b *SendPollMethod) SetChatID(value ChatID) *SendPollMethod {
  2144.     b.ChatID = value
  2145.     return b
  2146. }
  2147.  
  2148. // SetQuestion - bla-bla
  2149. func (b *SendPollMethod) SetQuestion(value string) *SendPollMethod {
  2150.     b.Question = value
  2151.     return b
  2152. }
  2153.  
  2154. // SetOptions - bla-bla
  2155. func (b *SendPollMethod) SetOptions(value []string) *SendPollMethod {
  2156.     b.Options = value
  2157.     return b
  2158. }
  2159.  
  2160. // SetIsAnonymous - bla-bla
  2161. func (b *SendPollMethod) SetIsAnonymous(value bool) *SendPollMethod {
  2162.     b.IsAnonymous = value
  2163.     return b
  2164. }
  2165.  
  2166. // SetType - bla-bla
  2167. func (b *SendPollMethod) SetType(value string) *SendPollMethod {
  2168.     b.Type = value
  2169.     return b
  2170. }
  2171.  
  2172. // SetAllowsMultipleAnswers - bla-bla
  2173. func (b *SendPollMethod) SetAllowsMultipleAnswers(value bool) *SendPollMethod {
  2174.     b.AllowsMultipleAnswers = value
  2175.     return b
  2176. }
  2177.  
  2178. // SetCorrectOptionID - bla-bla
  2179. func (b *SendPollMethod) SetCorrectOptionID(value int) *SendPollMethod {
  2180.     b.CorrectOptionID = value
  2181.     return b
  2182. }
  2183.  
  2184. // SetIsClosed - bla-bla
  2185. func (b *SendPollMethod) SetIsClosed(value bool) *SendPollMethod {
  2186.     b.IsClosed = value
  2187.     return b
  2188. }
  2189.  
  2190. // SetDisableNotification - bla-bla
  2191. func (b *SendPollMethod) SetDisableNotification(value bool) *SendPollMethod {
  2192.     b.DisableNotification = value
  2193.     return b
  2194. }
  2195.  
  2196. // SetReplyToMessageID - bla-bla
  2197. func (b *SendPollMethod) SetReplyToMessageID(value int) *SendPollMethod {
  2198.     b.ReplyToMessageID = value
  2199.     return b
  2200. }
  2201.  
  2202. // SetReplyMarkup - bla-bla
  2203. func (b *SendPollMethod) SetReplyMarkup(value *ReplyMarkup) *SendPollMethod {
  2204.     b.ReplyMarkup = value
  2205.     return b
  2206. }
  2207.  
  2208. // SendChatActionMethod - bla-bla
  2209. type SendChatActionMethod struct {
  2210.     ChatID ChatID `json:"chat_id"`
  2211.     Action string `json:"action"`
  2212. }
  2213.  
  2214. // SendChatAction creates new Telegram Bot API method sendChatAction
  2215. func SendChatAction(chatID ChatID, action string) *SendChatActionMethod {
  2216.     return &SendChatActionMethod{
  2217.         ChatID: chatID,
  2218.         Action: action,
  2219.     }
  2220. }
  2221.  
  2222. // SetChatID - bla-bla
  2223. func (b *SendChatActionMethod) SetChatID(value ChatID) *SendChatActionMethod {
  2224.     b.ChatID = value
  2225.     return b
  2226. }
  2227.  
  2228. // SetAction - bla-bla
  2229. func (b *SendChatActionMethod) SetAction(value string) *SendChatActionMethod {
  2230.     b.Action = value
  2231.     return b
  2232. }
  2233.  
  2234. // GetUserProfilePhotosMethod - bla-bla
  2235. type GetUserProfilePhotosMethod struct {
  2236.     UserID int `json:"user_id"`
  2237.     Offset int `json:"offset"`
  2238.     Limit  int `json:"limit"`
  2239. }
  2240.  
  2241. // GetUserProfilePhotos creates new Telegram Bot API method getUserProfilePhotos
  2242. func GetUserProfilePhotos(userID int) *GetUserProfilePhotosMethod {
  2243.     return &GetUserProfilePhotosMethod{
  2244.         UserID: userID,
  2245.     }
  2246. }
  2247.  
  2248. // SetUserID - bla-bla
  2249. func (b *GetUserProfilePhotosMethod) SetUserID(value int) *GetUserProfilePhotosMethod {
  2250.     b.UserID = value
  2251.     return b
  2252. }
  2253.  
  2254. // SetOffset - bla-bla
  2255. func (b *GetUserProfilePhotosMethod) SetOffset(value int) *GetUserProfilePhotosMethod {
  2256.     b.Offset = value
  2257.     return b
  2258. }
  2259.  
  2260. // SetLimit - bla-bla
  2261. func (b *GetUserProfilePhotosMethod) SetLimit(value int) *GetUserProfilePhotosMethod {
  2262.     b.Limit = value
  2263.     return b
  2264. }
  2265.  
  2266. // GetFileMethod - bla-bla
  2267. type GetFileMethod struct {
  2268.     FileID string `json:"file_id"`
  2269. }
  2270.  
  2271. // GetFile creates new Telegram Bot API method getFile
  2272. func GetFile(fileID string) *GetFileMethod {
  2273.     return &GetFileMethod{
  2274.         FileID: fileID,
  2275.     }
  2276. }
  2277.  
  2278. // SetFileID - bla-bla
  2279. func (b *GetFileMethod) SetFileID(value string) *GetFileMethod {
  2280.     b.FileID = value
  2281.     return b
  2282. }
  2283.  
  2284. // KickChatMemberMethod - bla-bla
  2285. type KickChatMemberMethod struct {
  2286.     ChatID    ChatID `json:"chat_id"`
  2287.     UserID    int    `json:"user_id"`
  2288.     UntilDate int    `json:"until_date"`
  2289. }
  2290.  
  2291. // KickChatMember creates new Telegram Bot API method kickChatMember
  2292. func KickChatMember(chatID ChatID, userID int) *KickChatMemberMethod {
  2293.     return &KickChatMemberMethod{
  2294.         ChatID: chatID,
  2295.         UserID: userID,
  2296.     }
  2297. }
  2298.  
  2299. // SetChatID - bla-bla
  2300. func (b *KickChatMemberMethod) SetChatID(value ChatID) *KickChatMemberMethod {
  2301.     b.ChatID = value
  2302.     return b
  2303. }
  2304.  
  2305. // SetUserID - bla-bla
  2306. func (b *KickChatMemberMethod) SetUserID(value int) *KickChatMemberMethod {
  2307.     b.UserID = value
  2308.     return b
  2309. }
  2310.  
  2311. // SetUntilDate - bla-bla
  2312. func (b *KickChatMemberMethod) SetUntilDate(value int) *KickChatMemberMethod {
  2313.     b.UntilDate = value
  2314.     return b
  2315. }
  2316.  
  2317. // UnbanChatMemberMethod - bla-bla
  2318. type UnbanChatMemberMethod struct {
  2319.     ChatID ChatID `json:"chat_id"`
  2320.     UserID int    `json:"user_id"`
  2321. }
  2322.  
  2323. // UnbanChatMember creates new Telegram Bot API method unbanChatMember
  2324. func UnbanChatMember(chatID ChatID, userID int) *UnbanChatMemberMethod {
  2325.     return &UnbanChatMemberMethod{
  2326.         ChatID: chatID,
  2327.         UserID: userID,
  2328.     }
  2329. }
  2330.  
  2331. // SetChatID - bla-bla
  2332. func (b *UnbanChatMemberMethod) SetChatID(value ChatID) *UnbanChatMemberMethod {
  2333.     b.ChatID = value
  2334.     return b
  2335. }
  2336.  
  2337. // SetUserID - bla-bla
  2338. func (b *UnbanChatMemberMethod) SetUserID(value int) *UnbanChatMemberMethod {
  2339.     b.UserID = value
  2340.     return b
  2341. }
  2342.  
  2343. // RestrictChatMemberMethod - bla-bla
  2344. type RestrictChatMemberMethod struct {
  2345.     ChatID      ChatID           `json:"chat_id"`
  2346.     UserID      int              `json:"user_id"`
  2347.     Permissions *ChatPermissions `json:"permissions"`
  2348.     UntilDate   int              `json:"until_date"`
  2349. }
  2350.  
  2351. // RestrictChatMember creates new Telegram Bot API method restrictChatMember
  2352. func RestrictChatMember(chatID ChatID, userID int, permissions *ChatPermissions) *RestrictChatMemberMethod {
  2353.     return &RestrictChatMemberMethod{
  2354.         ChatID:      chatID,
  2355.         UserID:      userID,
  2356.         Permissions: permissions,
  2357.     }
  2358. }
  2359.  
  2360. // SetChatID - bla-bla
  2361. func (b *RestrictChatMemberMethod) SetChatID(value ChatID) *RestrictChatMemberMethod {
  2362.     b.ChatID = value
  2363.     return b
  2364. }
  2365.  
  2366. // SetUserID - bla-bla
  2367. func (b *RestrictChatMemberMethod) SetUserID(value int) *RestrictChatMemberMethod {
  2368.     b.UserID = value
  2369.     return b
  2370. }
  2371.  
  2372. // SetPermissions - bla-bla
  2373. func (b *RestrictChatMemberMethod) SetPermissions(value *ChatPermissions) *RestrictChatMemberMethod {
  2374.     b.Permissions = value
  2375.     return b
  2376. }
  2377.  
  2378. // SetUntilDate - bla-bla
  2379. func (b *RestrictChatMemberMethod) SetUntilDate(value int) *RestrictChatMemberMethod {
  2380.     b.UntilDate = value
  2381.     return b
  2382. }
  2383.  
  2384. // PromoteChatMemberMethod - bla-bla
  2385. type PromoteChatMemberMethod struct {
  2386.     ChatID             ChatID `json:"chat_id"`
  2387.     UserID             int    `json:"user_id"`
  2388.     CanChangeInfo      bool   `json:"can_change_info"`
  2389.     CanPostMessages    bool   `json:"can_post_messages"`
  2390.     CanEditMessages    bool   `json:"can_edit_messages"`
  2391.     CanDeleteMessages  bool   `json:"can_delete_messages"`
  2392.     CanInviteUsers     bool   `json:"can_invite_users"`
  2393.     CanRestrictMembers bool   `json:"can_restrict_members"`
  2394.     CanPinMessages     bool   `json:"can_pin_messages"`
  2395.     CanPromoteMembers  bool   `json:"can_promote_members"`
  2396. }
  2397.  
  2398. // PromoteChatMember creates new Telegram Bot API method promoteChatMember
  2399. func PromoteChatMember(chatID ChatID, userID int) *PromoteChatMemberMethod {
  2400.     return &PromoteChatMemberMethod{
  2401.         ChatID: chatID,
  2402.         UserID: userID,
  2403.     }
  2404. }
  2405.  
  2406. // SetChatID - bla-bla
  2407. func (b *PromoteChatMemberMethod) SetChatID(value ChatID) *PromoteChatMemberMethod {
  2408.     b.ChatID = value
  2409.     return b
  2410. }
  2411.  
  2412. // SetUserID - bla-bla
  2413. func (b *PromoteChatMemberMethod) SetUserID(value int) *PromoteChatMemberMethod {
  2414.     b.UserID = value
  2415.     return b
  2416. }
  2417.  
  2418. // SetCanChangeInfo - bla-bla
  2419. func (b *PromoteChatMemberMethod) SetCanChangeInfo(value bool) *PromoteChatMemberMethod {
  2420.     b.CanChangeInfo = value
  2421.     return b
  2422. }
  2423.  
  2424. // SetCanPostMessages - bla-bla
  2425. func (b *PromoteChatMemberMethod) SetCanPostMessages(value bool) *PromoteChatMemberMethod {
  2426.     b.CanPostMessages = value
  2427.     return b
  2428. }
  2429.  
  2430. // SetCanEditMessages - bla-bla
  2431. func (b *PromoteChatMemberMethod) SetCanEditMessages(value bool) *PromoteChatMemberMethod {
  2432.     b.CanEditMessages = value
  2433.     return b
  2434. }
  2435.  
  2436. // SetCanDeleteMessages - bla-bla
  2437. func (b *PromoteChatMemberMethod) SetCanDeleteMessages(value bool) *PromoteChatMemberMethod {
  2438.     b.CanDeleteMessages = value
  2439.     return b
  2440. }
  2441.  
  2442. // SetCanInviteUsers - bla-bla
  2443. func (b *PromoteChatMemberMethod) SetCanInviteUsers(value bool) *PromoteChatMemberMethod {
  2444.     b.CanInviteUsers = value
  2445.     return b
  2446. }
  2447.  
  2448. // SetCanRestrictMembers - bla-bla
  2449. func (b *PromoteChatMemberMethod) SetCanRestrictMembers(value bool) *PromoteChatMemberMethod {
  2450.     b.CanRestrictMembers = value
  2451.     return b
  2452. }
  2453.  
  2454. // SetCanPinMessages - bla-bla
  2455. func (b *PromoteChatMemberMethod) SetCanPinMessages(value bool) *PromoteChatMemberMethod {
  2456.     b.CanPinMessages = value
  2457.     return b
  2458. }
  2459.  
  2460. // SetCanPromoteMembers - bla-bla
  2461. func (b *PromoteChatMemberMethod) SetCanPromoteMembers(value bool) *PromoteChatMemberMethod {
  2462.     b.CanPromoteMembers = value
  2463.     return b
  2464. }
  2465.  
  2466. // SetChatAdministratorCustomTitleMethod - bla-bla
  2467. type SetChatAdministratorCustomTitleMethod struct {
  2468.     ChatID      ChatID `json:"chat_id"`
  2469.     UserID      int    `json:"user_id"`
  2470.     CustomTitle string `json:"custom_title"`
  2471. }
  2472.  
  2473. // SetChatAdministratorCustomTitle creates new Telegram Bot API method setChatAdministratorCustomTitle
  2474. func SetChatAdministratorCustomTitle(chatID ChatID, userID int, customTitle string) *SetChatAdministratorCustomTitleMethod {
  2475.     return &SetChatAdministratorCustomTitleMethod{
  2476.         ChatID:      chatID,
  2477.         UserID:      userID,
  2478.         CustomTitle: customTitle,
  2479.     }
  2480. }
  2481.  
  2482. // SetChatID - bla-bla
  2483. func (b *SetChatAdministratorCustomTitleMethod) SetChatID(value ChatID) *SetChatAdministratorCustomTitleMethod {
  2484.     b.ChatID = value
  2485.     return b
  2486. }
  2487.  
  2488. // SetUserID - bla-bla
  2489. func (b *SetChatAdministratorCustomTitleMethod) SetUserID(value int) *SetChatAdministratorCustomTitleMethod {
  2490.     b.UserID = value
  2491.     return b
  2492. }
  2493.  
  2494. // SetCustomTitle - bla-bla
  2495. func (b *SetChatAdministratorCustomTitleMethod) SetCustomTitle(value string) *SetChatAdministratorCustomTitleMethod {
  2496.     b.CustomTitle = value
  2497.     return b
  2498. }
  2499.  
  2500. // SetChatPermissionsMethod - bla-bla
  2501. type SetChatPermissionsMethod struct {
  2502.     ChatID      ChatID           `json:"chat_id"`
  2503.     Permissions *ChatPermissions `json:"permissions"`
  2504. }
  2505.  
  2506. // SetChatPermissions creates new Telegram Bot API method setChatPermissions
  2507. func SetChatPermissions(chatID ChatID, permissions *ChatPermissions) *SetChatPermissionsMethod {
  2508.     return &SetChatPermissionsMethod{
  2509.         ChatID:      chatID,
  2510.         Permissions: permissions,
  2511.     }
  2512. }
  2513.  
  2514. // SetChatID - bla-bla
  2515. func (b *SetChatPermissionsMethod) SetChatID(value ChatID) *SetChatPermissionsMethod {
  2516.     b.ChatID = value
  2517.     return b
  2518. }
  2519.  
  2520. // SetPermissions - bla-bla
  2521. func (b *SetChatPermissionsMethod) SetPermissions(value *ChatPermissions) *SetChatPermissionsMethod {
  2522.     b.Permissions = value
  2523.     return b
  2524. }
  2525.  
  2526. // ExportChatInviteLinkMethod - bla-bla
  2527. type ExportChatInviteLinkMethod struct {
  2528.     ChatID ChatID `json:"chat_id"`
  2529. }
  2530.  
  2531. // ExportChatInviteLink creates new Telegram Bot API method exportChatInviteLink
  2532. func ExportChatInviteLink(chatID ChatID) *ExportChatInviteLinkMethod {
  2533.     return &ExportChatInviteLinkMethod{
  2534.         ChatID: chatID,
  2535.     }
  2536. }
  2537.  
  2538. // SetChatID - bla-bla
  2539. func (b *ExportChatInviteLinkMethod) SetChatID(value ChatID) *ExportChatInviteLinkMethod {
  2540.     b.ChatID = value
  2541.     return b
  2542. }
  2543.  
  2544. // SetChatPhotoMethod - bla-bla
  2545. type SetChatPhotoMethod struct {
  2546.     ChatID ChatID     `json:"chat_id"`
  2547.     Photo  *InputFile `json:"photo"`
  2548. }
  2549.  
  2550. // SetChatPhoto creates new Telegram Bot API method setChatPhoto
  2551. func SetChatPhoto(chatID ChatID, photo *InputFile) *SetChatPhotoMethod {
  2552.     return &SetChatPhotoMethod{
  2553.         ChatID: chatID,
  2554.         Photo:  photo,
  2555.     }
  2556. }
  2557.  
  2558. // SetChatID - bla-bla
  2559. func (b *SetChatPhotoMethod) SetChatID(value ChatID) *SetChatPhotoMethod {
  2560.     b.ChatID = value
  2561.     return b
  2562. }
  2563.  
  2564. // SetPhoto - bla-bla
  2565. func (b *SetChatPhotoMethod) SetPhoto(value *InputFile) *SetChatPhotoMethod {
  2566.     b.Photo = value
  2567.     return b
  2568. }
  2569.  
  2570. // DeleteChatPhotoMethod - bla-bla
  2571. type DeleteChatPhotoMethod struct {
  2572.     ChatID ChatID `json:"chat_id"`
  2573. }
  2574.  
  2575. // DeleteChatPhoto creates new Telegram Bot API method deleteChatPhoto
  2576. func DeleteChatPhoto(chatID ChatID) *DeleteChatPhotoMethod {
  2577.     return &DeleteChatPhotoMethod{
  2578.         ChatID: chatID,
  2579.     }
  2580. }
  2581.  
  2582. // SetChatID - bla-bla
  2583. func (b *DeleteChatPhotoMethod) SetChatID(value ChatID) *DeleteChatPhotoMethod {
  2584.     b.ChatID = value
  2585.     return b
  2586. }
  2587.  
  2588. // SetChatTitleMethod - bla-bla
  2589. type SetChatTitleMethod struct {
  2590.     ChatID ChatID `json:"chat_id"`
  2591.     Title  string `json:"title"`
  2592. }
  2593.  
  2594. // SetChatTitle creates new Telegram Bot API method setChatTitle
  2595. func SetChatTitle(chatID ChatID, title string) *SetChatTitleMethod {
  2596.     return &SetChatTitleMethod{
  2597.         ChatID: chatID,
  2598.         Title:  title,
  2599.     }
  2600. }
  2601.  
  2602. // SetChatID - bla-bla
  2603. func (b *SetChatTitleMethod) SetChatID(value ChatID) *SetChatTitleMethod {
  2604.     b.ChatID = value
  2605.     return b
  2606. }
  2607.  
  2608. // SetTitle - bla-bla
  2609. func (b *SetChatTitleMethod) SetTitle(value string) *SetChatTitleMethod {
  2610.     b.Title = value
  2611.     return b
  2612. }
  2613.  
  2614. // SetChatDescriptionMethod - bla-bla
  2615. type SetChatDescriptionMethod struct {
  2616.     ChatID      ChatID `json:"chat_id"`
  2617.     Description string `json:"description"`
  2618. }
  2619.  
  2620. // SetChatDescription creates new Telegram Bot API method setChatDescription
  2621. func SetChatDescription(chatID ChatID) *SetChatDescriptionMethod {
  2622.     return &SetChatDescriptionMethod{
  2623.         ChatID: chatID,
  2624.     }
  2625. }
  2626.  
  2627. // SetChatID - bla-bla
  2628. func (b *SetChatDescriptionMethod) SetChatID(value ChatID) *SetChatDescriptionMethod {
  2629.     b.ChatID = value
  2630.     return b
  2631. }
  2632.  
  2633. // SetDescription - bla-bla
  2634. func (b *SetChatDescriptionMethod) SetDescription(value string) *SetChatDescriptionMethod {
  2635.     b.Description = value
  2636.     return b
  2637. }
  2638.  
  2639. // PinChatMessageMethod - bla-bla
  2640. type PinChatMessageMethod struct {
  2641.     ChatID              ChatID `json:"chat_id"`
  2642.     MessageID           int    `json:"message_id"`
  2643.     DisableNotification bool   `json:"disable_notification"`
  2644. }
  2645.  
  2646. // PinChatMessage creates new Telegram Bot API method pinChatMessage
  2647. func PinChatMessage(chatID ChatID, messageID int) *PinChatMessageMethod {
  2648.     return &PinChatMessageMethod{
  2649.         ChatID:    chatID,
  2650.         MessageID: messageID,
  2651.     }
  2652. }
  2653.  
  2654. // SetChatID - bla-bla
  2655. func (b *PinChatMessageMethod) SetChatID(value ChatID) *PinChatMessageMethod {
  2656.     b.ChatID = value
  2657.     return b
  2658. }
  2659.  
  2660. // SetMessageID - bla-bla
  2661. func (b *PinChatMessageMethod) SetMessageID(value int) *PinChatMessageMethod {
  2662.     b.MessageID = value
  2663.     return b
  2664. }
  2665.  
  2666. // SetDisableNotification - bla-bla
  2667. func (b *PinChatMessageMethod) SetDisableNotification(value bool) *PinChatMessageMethod {
  2668.     b.DisableNotification = value
  2669.     return b
  2670. }
  2671.  
  2672. // UnpinChatMessageMethod - bla-bla
  2673. type UnpinChatMessageMethod struct {
  2674.     ChatID ChatID `json:"chat_id"`
  2675. }
  2676.  
  2677. // UnpinChatMessage creates new Telegram Bot API method unpinChatMessage
  2678. func UnpinChatMessage(chatID ChatID) *UnpinChatMessageMethod {
  2679.     return &UnpinChatMessageMethod{
  2680.         ChatID: chatID,
  2681.     }
  2682. }
  2683.  
  2684. // SetChatID - bla-bla
  2685. func (b *UnpinChatMessageMethod) SetChatID(value ChatID) *UnpinChatMessageMethod {
  2686.     b.ChatID = value
  2687.     return b
  2688. }
  2689.  
  2690. // LeaveChatMethod - bla-bla
  2691. type LeaveChatMethod struct {
  2692.     ChatID ChatID `json:"chat_id"`
  2693. }
  2694.  
  2695. // LeaveChat creates new Telegram Bot API method leaveChat
  2696. func LeaveChat(chatID ChatID) *LeaveChatMethod {
  2697.     return &LeaveChatMethod{
  2698.         ChatID: chatID,
  2699.     }
  2700. }
  2701.  
  2702. // SetChatID - bla-bla
  2703. func (b *LeaveChatMethod) SetChatID(value ChatID) *LeaveChatMethod {
  2704.     b.ChatID = value
  2705.     return b
  2706. }
  2707.  
  2708. // GetChatMethod - bla-bla
  2709. type GetChatMethod struct {
  2710.     ChatID ChatID `json:"chat_id"`
  2711. }
  2712.  
  2713. // GetChat creates new Telegram Bot API method getChat
  2714. func GetChat(chatID ChatID) *GetChatMethod {
  2715.     return &GetChatMethod{
  2716.         ChatID: chatID,
  2717.     }
  2718. }
  2719.  
  2720. // SetChatID - bla-bla
  2721. func (b *GetChatMethod) SetChatID(value ChatID) *GetChatMethod {
  2722.     b.ChatID = value
  2723.     return b
  2724. }
  2725.  
  2726. // GetChatAdministratorsMethod - bla-bla
  2727. type GetChatAdministratorsMethod struct {
  2728.     ChatID ChatID `json:"chat_id"`
  2729. }
  2730.  
  2731. // GetChatAdministrators creates new Telegram Bot API method getChatAdministrators
  2732. func GetChatAdministrators(chatID ChatID) *GetChatAdministratorsMethod {
  2733.     return &GetChatAdministratorsMethod{
  2734.         ChatID: chatID,
  2735.     }
  2736. }
  2737.  
  2738. // SetChatID - bla-bla
  2739. func (b *GetChatAdministratorsMethod) SetChatID(value ChatID) *GetChatAdministratorsMethod {
  2740.     b.ChatID = value
  2741.     return b
  2742. }
  2743.  
  2744. // GetChatMembersCountMethod - bla-bla
  2745. type GetChatMembersCountMethod struct {
  2746.     ChatID ChatID `json:"chat_id"`
  2747. }
  2748.  
  2749. // GetChatMembersCount creates new Telegram Bot API method getChatMembersCount
  2750. func GetChatMembersCount(chatID ChatID) *GetChatMembersCountMethod {
  2751.     return &GetChatMembersCountMethod{
  2752.         ChatID: chatID,
  2753.     }
  2754. }
  2755.  
  2756. // SetChatID - bla-bla
  2757. func (b *GetChatMembersCountMethod) SetChatID(value ChatID) *GetChatMembersCountMethod {
  2758.     b.ChatID = value
  2759.     return b
  2760. }
  2761.  
  2762. // GetChatMemberMethod - bla-bla
  2763. type GetChatMemberMethod struct {
  2764.     ChatID ChatID `json:"chat_id"`
  2765.     UserID int    `json:"user_id"`
  2766. }
  2767.  
  2768. // GetChatMember creates new Telegram Bot API method getChatMember
  2769. func GetChatMember(chatID ChatID, userID int) *GetChatMemberMethod {
  2770.     return &GetChatMemberMethod{
  2771.         ChatID: chatID,
  2772.         UserID: userID,
  2773.     }
  2774. }
  2775.  
  2776. // SetChatID - bla-bla
  2777. func (b *GetChatMemberMethod) SetChatID(value ChatID) *GetChatMemberMethod {
  2778.     b.ChatID = value
  2779.     return b
  2780. }
  2781.  
  2782. // SetUserID - bla-bla
  2783. func (b *GetChatMemberMethod) SetUserID(value int) *GetChatMemberMethod {
  2784.     b.UserID = value
  2785.     return b
  2786. }
  2787.  
  2788. // SetChatStickerSetMethod - bla-bla
  2789. type SetChatStickerSetMethod struct {
  2790.     ChatID         ChatID `json:"chat_id"`
  2791.     StickerSetName string `json:"sticker_set_name"`
  2792. }
  2793.  
  2794. // SetChatStickerSet creates new Telegram Bot API method setChatStickerSet
  2795. func SetChatStickerSet(chatID ChatID, stickerSetName string) *SetChatStickerSetMethod {
  2796.     return &SetChatStickerSetMethod{
  2797.         ChatID:         chatID,
  2798.         StickerSetName: stickerSetName,
  2799.     }
  2800. }
  2801.  
  2802. // SetChatID - bla-bla
  2803. func (b *SetChatStickerSetMethod) SetChatID(value ChatID) *SetChatStickerSetMethod {
  2804.     b.ChatID = value
  2805.     return b
  2806. }
  2807.  
  2808. // SetStickerSetName - bla-bla
  2809. func (b *SetChatStickerSetMethod) SetStickerSetName(value string) *SetChatStickerSetMethod {
  2810.     b.StickerSetName = value
  2811.     return b
  2812. }
  2813.  
  2814. // DeleteChatStickerSetMethod - bla-bla
  2815. type DeleteChatStickerSetMethod struct {
  2816.     ChatID ChatID `json:"chat_id"`
  2817. }
  2818.  
  2819. // DeleteChatStickerSet creates new Telegram Bot API method deleteChatStickerSet
  2820. func DeleteChatStickerSet(chatID ChatID) *DeleteChatStickerSetMethod {
  2821.     return &DeleteChatStickerSetMethod{
  2822.         ChatID: chatID,
  2823.     }
  2824. }
  2825.  
  2826. // SetChatID - bla-bla
  2827. func (b *DeleteChatStickerSetMethod) SetChatID(value ChatID) *DeleteChatStickerSetMethod {
  2828.     b.ChatID = value
  2829.     return b
  2830. }
  2831.  
  2832. // AnswerCallbackQueryMethod - bla-bla
  2833. type AnswerCallbackQueryMethod struct {
  2834.     CallbackQueryID string `json:"callback_query_id"`
  2835.     Text            string `json:"text"`
  2836.     ShowAlert       bool   `json:"show_alert"`
  2837.     URL             string `json:"url"`
  2838.     CacheTime       int    `json:"cache_time"`
  2839. }
  2840.  
  2841. // AnswerCallbackQuery creates new Telegram Bot API method answerCallbackQuery
  2842. func AnswerCallbackQuery(callbackQueryID string) *AnswerCallbackQueryMethod {
  2843.     return &AnswerCallbackQueryMethod{
  2844.         CallbackQueryID: callbackQueryID,
  2845.     }
  2846. }
  2847.  
  2848. // SetCallbackQueryID - bla-bla
  2849. func (b *AnswerCallbackQueryMethod) SetCallbackQueryID(value string) *AnswerCallbackQueryMethod {
  2850.     b.CallbackQueryID = value
  2851.     return b
  2852. }
  2853.  
  2854. // SetText - bla-bla
  2855. func (b *AnswerCallbackQueryMethod) SetText(value string) *AnswerCallbackQueryMethod {
  2856.     b.Text = value
  2857.     return b
  2858. }
  2859.  
  2860. // SetShowAlert - bla-bla
  2861. func (b *AnswerCallbackQueryMethod) SetShowAlert(value bool) *AnswerCallbackQueryMethod {
  2862.     b.ShowAlert = value
  2863.     return b
  2864. }
  2865.  
  2866. // SetURL - bla-bla
  2867. func (b *AnswerCallbackQueryMethod) SetURL(value string) *AnswerCallbackQueryMethod {
  2868.     b.URL = value
  2869.     return b
  2870. }
  2871.  
  2872. // SetCacheTime - bla-bla
  2873. func (b *AnswerCallbackQueryMethod) SetCacheTime(value int) *AnswerCallbackQueryMethod {
  2874.     b.CacheTime = value
  2875.     return b
  2876. }
  2877.  
  2878. // EditMessageTextMethod - bla-bla
  2879. type EditMessageTextMethod struct {
  2880.     ChatID                ChatID       `json:"chat_id"`
  2881.     MessageID             int          `json:"message_id"`
  2882.     InlineMessageID       string       `json:"inline_message_id"`
  2883.     Text                  string       `json:"text"`
  2884.     ParseMode             string       `json:"parse_mode"`
  2885.     DisableWebPagePreview bool         `json:"disable_web_page_preview"`
  2886.     ReplyMarkup           *ReplyMarkup `json:"reply_markup"`
  2887. }
  2888.  
  2889. // EditMessageText creates new Telegram Bot API method editMessageText
  2890. func EditMessageText(text string) *EditMessageTextMethod {
  2891.     return &EditMessageTextMethod{
  2892.         Text: text,
  2893.     }
  2894. }
  2895.  
  2896. // SetChatID - bla-bla
  2897. func (b *EditMessageTextMethod) SetChatID(value ChatID) *EditMessageTextMethod {
  2898.     b.ChatID = value
  2899.     return b
  2900. }
  2901.  
  2902. // SetMessageID - bla-bla
  2903. func (b *EditMessageTextMethod) SetMessageID(value int) *EditMessageTextMethod {
  2904.     b.MessageID = value
  2905.     return b
  2906. }
  2907.  
  2908. // SetInlineMessageID - bla-bla
  2909. func (b *EditMessageTextMethod) SetInlineMessageID(value string) *EditMessageTextMethod {
  2910.     b.InlineMessageID = value
  2911.     return b
  2912. }
  2913.  
  2914. // SetText - bla-bla
  2915. func (b *EditMessageTextMethod) SetText(value string) *EditMessageTextMethod {
  2916.     b.Text = value
  2917.     return b
  2918. }
  2919.  
  2920. // SetParseMode - bla-bla
  2921. func (b *EditMessageTextMethod) SetParseMode(value string) *EditMessageTextMethod {
  2922.     b.ParseMode = value
  2923.     return b
  2924. }
  2925.  
  2926. // SetDisableWebPagePreview - bla-bla
  2927. func (b *EditMessageTextMethod) SetDisableWebPagePreview(value bool) *EditMessageTextMethod {
  2928.     b.DisableWebPagePreview = value
  2929.     return b
  2930. }
  2931.  
  2932. // SetReplyMarkup - bla-bla
  2933. func (b *EditMessageTextMethod) SetReplyMarkup(value *ReplyMarkup) *EditMessageTextMethod {
  2934.     b.ReplyMarkup = value
  2935.     return b
  2936. }
  2937.  
  2938. // EditMessageCaptionMethod - bla-bla
  2939. type EditMessageCaptionMethod struct {
  2940.     ChatID          ChatID       `json:"chat_id"`
  2941.     MessageID       int          `json:"message_id"`
  2942.     InlineMessageID string       `json:"inline_message_id"`
  2943.     Caption         string       `json:"caption"`
  2944.     ParseMode       string       `json:"parse_mode"`
  2945.     ReplyMarkup     *ReplyMarkup `json:"reply_markup"`
  2946. }
  2947.  
  2948. // EditMessageCaption creates new Telegram Bot API method editMessageCaption
  2949. func EditMessageCaption() *EditMessageCaptionMethod {
  2950.     return &EditMessageCaptionMethod{}
  2951. }
  2952.  
  2953. // SetChatID - bla-bla
  2954. func (b *EditMessageCaptionMethod) SetChatID(value ChatID) *EditMessageCaptionMethod {
  2955.     b.ChatID = value
  2956.     return b
  2957. }
  2958.  
  2959. // SetMessageID - bla-bla
  2960. func (b *EditMessageCaptionMethod) SetMessageID(value int) *EditMessageCaptionMethod {
  2961.     b.MessageID = value
  2962.     return b
  2963. }
  2964.  
  2965. // SetInlineMessageID - bla-bla
  2966. func (b *EditMessageCaptionMethod) SetInlineMessageID(value string) *EditMessageCaptionMethod {
  2967.     b.InlineMessageID = value
  2968.     return b
  2969. }
  2970.  
  2971. // SetCaption - bla-bla
  2972. func (b *EditMessageCaptionMethod) SetCaption(value string) *EditMessageCaptionMethod {
  2973.     b.Caption = value
  2974.     return b
  2975. }
  2976.  
  2977. // SetParseMode - bla-bla
  2978. func (b *EditMessageCaptionMethod) SetParseMode(value string) *EditMessageCaptionMethod {
  2979.     b.ParseMode = value
  2980.     return b
  2981. }
  2982.  
  2983. // SetReplyMarkup - bla-bla
  2984. func (b *EditMessageCaptionMethod) SetReplyMarkup(value *ReplyMarkup) *EditMessageCaptionMethod {
  2985.     b.ReplyMarkup = value
  2986.     return b
  2987. }
  2988.  
  2989. // EditMessageMediaMethod - bla-bla
  2990. type EditMessageMediaMethod struct {
  2991.     ChatID          ChatID       `json:"chat_id"`
  2992.     MessageID       int          `json:"message_id"`
  2993.     InlineMessageID string       `json:"inline_message_id"`
  2994.     Media           *InputMedia  `json:"media"`
  2995.     ReplyMarkup     *ReplyMarkup `json:"reply_markup"`
  2996. }
  2997.  
  2998. // EditMessageMedia creates new Telegram Bot API method editMessageMedia
  2999. func EditMessageMedia(media *InputMedia) *EditMessageMediaMethod {
  3000.     return &EditMessageMediaMethod{
  3001.         Media: media,
  3002.     }
  3003. }
  3004.  
  3005. // SetChatID - bla-bla
  3006. func (b *EditMessageMediaMethod) SetChatID(value ChatID) *EditMessageMediaMethod {
  3007.     b.ChatID = value
  3008.     return b
  3009. }
  3010.  
  3011. // SetMessageID - bla-bla
  3012. func (b *EditMessageMediaMethod) SetMessageID(value int) *EditMessageMediaMethod {
  3013.     b.MessageID = value
  3014.     return b
  3015. }
  3016.  
  3017. // SetInlineMessageID - bla-bla
  3018. func (b *EditMessageMediaMethod) SetInlineMessageID(value string) *EditMessageMediaMethod {
  3019.     b.InlineMessageID = value
  3020.     return b
  3021. }
  3022.  
  3023. // SetMedia - bla-bla
  3024. func (b *EditMessageMediaMethod) SetMedia(value *InputMedia) *EditMessageMediaMethod {
  3025.     b.Media = value
  3026.     return b
  3027. }
  3028.  
  3029. // SetReplyMarkup - bla-bla
  3030. func (b *EditMessageMediaMethod) SetReplyMarkup(value *ReplyMarkup) *EditMessageMediaMethod {
  3031.     b.ReplyMarkup = value
  3032.     return b
  3033. }
  3034.  
  3035. // EditMessageReplyMarkupMethod - bla-bla
  3036. type EditMessageReplyMarkupMethod struct {
  3037.     ChatID          ChatID       `json:"chat_id"`
  3038.     MessageID       int          `json:"message_id"`
  3039.     InlineMessageID string       `json:"inline_message_id"`
  3040.     ReplyMarkup     *ReplyMarkup `json:"reply_markup"`
  3041. }
  3042.  
  3043. // EditMessageReplyMarkup creates new Telegram Bot API method editMessageReplyMarkup
  3044. func EditMessageReplyMarkup() *EditMessageReplyMarkupMethod {
  3045.     return &EditMessageReplyMarkupMethod{}
  3046. }
  3047.  
  3048. // SetChatID - bla-bla
  3049. func (b *EditMessageReplyMarkupMethod) SetChatID(value ChatID) *EditMessageReplyMarkupMethod {
  3050.     b.ChatID = value
  3051.     return b
  3052. }
  3053.  
  3054. // SetMessageID - bla-bla
  3055. func (b *EditMessageReplyMarkupMethod) SetMessageID(value int) *EditMessageReplyMarkupMethod {
  3056.     b.MessageID = value
  3057.     return b
  3058. }
  3059.  
  3060. // SetInlineMessageID - bla-bla
  3061. func (b *EditMessageReplyMarkupMethod) SetInlineMessageID(value string) *EditMessageReplyMarkupMethod {
  3062.     b.InlineMessageID = value
  3063.     return b
  3064. }
  3065.  
  3066. // SetReplyMarkup - bla-bla
  3067. func (b *EditMessageReplyMarkupMethod) SetReplyMarkup(value *ReplyMarkup) *EditMessageReplyMarkupMethod {
  3068.     b.ReplyMarkup = value
  3069.     return b
  3070. }
  3071.  
  3072. // StopPollMethod - bla-bla
  3073. type StopPollMethod struct {
  3074.     ChatID      ChatID       `json:"chat_id"`
  3075.     MessageID   int          `json:"message_id"`
  3076.     ReplyMarkup *ReplyMarkup `json:"reply_markup"`
  3077. }
  3078.  
  3079. // StopPoll creates new Telegram Bot API method stopPoll
  3080. func StopPoll(chatID ChatID, messageID int) *StopPollMethod {
  3081.     return &StopPollMethod{
  3082.         ChatID:    chatID,
  3083.         MessageID: messageID,
  3084.     }
  3085. }
  3086.  
  3087. // SetChatID - bla-bla
  3088. func (b *StopPollMethod) SetChatID(value ChatID) *StopPollMethod {
  3089.     b.ChatID = value
  3090.     return b
  3091. }
  3092.  
  3093. // SetMessageID - bla-bla
  3094. func (b *StopPollMethod) SetMessageID(value int) *StopPollMethod {
  3095.     b.MessageID = value
  3096.     return b
  3097. }
  3098.  
  3099. // SetReplyMarkup - bla-bla
  3100. func (b *StopPollMethod) SetReplyMarkup(value *ReplyMarkup) *StopPollMethod {
  3101.     b.ReplyMarkup = value
  3102.     return b
  3103. }
  3104.  
  3105. // DeleteMessageMethod - bla-bla
  3106. type DeleteMessageMethod struct {
  3107.     ChatID    ChatID `json:"chat_id"`
  3108.     MessageID int    `json:"message_id"`
  3109. }
  3110.  
  3111. // DeleteMessage creates new Telegram Bot API method deleteMessage
  3112. func DeleteMessage(chatID ChatID, messageID int) *DeleteMessageMethod {
  3113.     return &DeleteMessageMethod{
  3114.         ChatID:    chatID,
  3115.         MessageID: messageID,
  3116.     }
  3117. }
  3118.  
  3119. // SetChatID - bla-bla
  3120. func (b *DeleteMessageMethod) SetChatID(value ChatID) *DeleteMessageMethod {
  3121.     b.ChatID = value
  3122.     return b
  3123. }
  3124.  
  3125. // SetMessageID - bla-bla
  3126. func (b *DeleteMessageMethod) SetMessageID(value int) *DeleteMessageMethod {
  3127.     b.MessageID = value
  3128.     return b
  3129. }
  3130.  
  3131. // SendStickerMethod - bla-bla
  3132. type SendStickerMethod struct {
  3133.     ChatID              ChatID       `json:"chat_id"`
  3134.     Sticker             *InputFile   `json:"sticker"`
  3135.     DisableNotification bool         `json:"disable_notification"`
  3136.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  3137.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  3138. }
  3139.  
  3140. // SendSticker creates new Telegram Bot API method sendSticker
  3141. func SendSticker(chatID ChatID, sticker *InputFile) *SendStickerMethod {
  3142.     return &SendStickerMethod{
  3143.         ChatID:  chatID,
  3144.         Sticker: sticker,
  3145.     }
  3146. }
  3147.  
  3148. // SetChatID - bla-bla
  3149. func (b *SendStickerMethod) SetChatID(value ChatID) *SendStickerMethod {
  3150.     b.ChatID = value
  3151.     return b
  3152. }
  3153.  
  3154. // SetSticker - bla-bla
  3155. func (b *SendStickerMethod) SetSticker(value *InputFile) *SendStickerMethod {
  3156.     b.Sticker = value
  3157.     return b
  3158. }
  3159.  
  3160. // SetDisableNotification - bla-bla
  3161. func (b *SendStickerMethod) SetDisableNotification(value bool) *SendStickerMethod {
  3162.     b.DisableNotification = value
  3163.     return b
  3164. }
  3165.  
  3166. // SetReplyToMessageID - bla-bla
  3167. func (b *SendStickerMethod) SetReplyToMessageID(value int) *SendStickerMethod {
  3168.     b.ReplyToMessageID = value
  3169.     return b
  3170. }
  3171.  
  3172. // SetReplyMarkup - bla-bla
  3173. func (b *SendStickerMethod) SetReplyMarkup(value *ReplyMarkup) *SendStickerMethod {
  3174.     b.ReplyMarkup = value
  3175.     return b
  3176. }
  3177.  
  3178. // GetStickerSetMethod - bla-bla
  3179. type GetStickerSetMethod struct {
  3180.     Name string `json:"name"`
  3181. }
  3182.  
  3183. // GetStickerSet creates new Telegram Bot API method getStickerSet
  3184. func GetStickerSet(name string) *GetStickerSetMethod {
  3185.     return &GetStickerSetMethod{
  3186.         Name: name,
  3187.     }
  3188. }
  3189.  
  3190. // SetName - bla-bla
  3191. func (b *GetStickerSetMethod) SetName(value string) *GetStickerSetMethod {
  3192.     b.Name = value
  3193.     return b
  3194. }
  3195.  
  3196. // UploadStickerFileMethod - bla-bla
  3197. type UploadStickerFileMethod struct {
  3198.     UserID     int        `json:"user_id"`
  3199.     PngSticker *InputFile `json:"png_sticker"`
  3200. }
  3201.  
  3202. // UploadStickerFile creates new Telegram Bot API method uploadStickerFile
  3203. func UploadStickerFile(userID int, pngSticker *InputFile) *UploadStickerFileMethod {
  3204.     return &UploadStickerFileMethod{
  3205.         UserID:     userID,
  3206.         PngSticker: pngSticker,
  3207.     }
  3208. }
  3209.  
  3210. // SetUserID - bla-bla
  3211. func (b *UploadStickerFileMethod) SetUserID(value int) *UploadStickerFileMethod {
  3212.     b.UserID = value
  3213.     return b
  3214. }
  3215.  
  3216. // SetPngSticker - bla-bla
  3217. func (b *UploadStickerFileMethod) SetPngSticker(value *InputFile) *UploadStickerFileMethod {
  3218.     b.PngSticker = value
  3219.     return b
  3220. }
  3221.  
  3222. // CreateNewStickerSetMethod - bla-bla
  3223. type CreateNewStickerSetMethod struct {
  3224.     UserID        int           `json:"user_id"`
  3225.     Name          string        `json:"name"`
  3226.     Title         string        `json:"title"`
  3227.     PngSticker    *InputFile    `json:"png_sticker"`
  3228.     Emojis        string        `json:"emojis"`
  3229.     ContainsMasks bool          `json:"contains_masks"`
  3230.     MaskPosition  *MaskPosition `json:"mask_position"`
  3231. }
  3232.  
  3233. // CreateNewStickerSet creates new Telegram Bot API method createNewStickerSet
  3234. func CreateNewStickerSet(userID int, name string, title string, pngSticker *InputFile, emojis string) *CreateNewStickerSetMethod {
  3235.     return &CreateNewStickerSetMethod{
  3236.         UserID:     userID,
  3237.         Name:       name,
  3238.         Title:      title,
  3239.         PngSticker: pngSticker,
  3240.         Emojis:     emojis,
  3241.     }
  3242. }
  3243.  
  3244. // SetUserID - bla-bla
  3245. func (b *CreateNewStickerSetMethod) SetUserID(value int) *CreateNewStickerSetMethod {
  3246.     b.UserID = value
  3247.     return b
  3248. }
  3249.  
  3250. // SetName - bla-bla
  3251. func (b *CreateNewStickerSetMethod) SetName(value string) *CreateNewStickerSetMethod {
  3252.     b.Name = value
  3253.     return b
  3254. }
  3255.  
  3256. // SetTitle - bla-bla
  3257. func (b *CreateNewStickerSetMethod) SetTitle(value string) *CreateNewStickerSetMethod {
  3258.     b.Title = value
  3259.     return b
  3260. }
  3261.  
  3262. // SetPngSticker - bla-bla
  3263. func (b *CreateNewStickerSetMethod) SetPngSticker(value *InputFile) *CreateNewStickerSetMethod {
  3264.     b.PngSticker = value
  3265.     return b
  3266. }
  3267.  
  3268. // SetEmojis - bla-bla
  3269. func (b *CreateNewStickerSetMethod) SetEmojis(value string) *CreateNewStickerSetMethod {
  3270.     b.Emojis = value
  3271.     return b
  3272. }
  3273.  
  3274. // SetContainsMasks - bla-bla
  3275. func (b *CreateNewStickerSetMethod) SetContainsMasks(value bool) *CreateNewStickerSetMethod {
  3276.     b.ContainsMasks = value
  3277.     return b
  3278. }
  3279.  
  3280. // SetMaskPosition - bla-bla
  3281. func (b *CreateNewStickerSetMethod) SetMaskPosition(value *MaskPosition) *CreateNewStickerSetMethod {
  3282.     b.MaskPosition = value
  3283.     return b
  3284. }
  3285.  
  3286. // AddStickerToSetMethod - bla-bla
  3287. type AddStickerToSetMethod struct {
  3288.     UserID       int           `json:"user_id"`
  3289.     Name         string        `json:"name"`
  3290.     PngSticker   *InputFile    `json:"png_sticker"`
  3291.     Emojis       string        `json:"emojis"`
  3292.     MaskPosition *MaskPosition `json:"mask_position"`
  3293. }
  3294.  
  3295. // AddStickerToSet creates new Telegram Bot API method addStickerToSet
  3296. func AddStickerToSet(userID int, name string, pngSticker *InputFile, emojis string) *AddStickerToSetMethod {
  3297.     return &AddStickerToSetMethod{
  3298.         UserID:     userID,
  3299.         Name:       name,
  3300.         PngSticker: pngSticker,
  3301.         Emojis:     emojis,
  3302.     }
  3303. }
  3304.  
  3305. // SetUserID - bla-bla
  3306. func (b *AddStickerToSetMethod) SetUserID(value int) *AddStickerToSetMethod {
  3307.     b.UserID = value
  3308.     return b
  3309. }
  3310.  
  3311. // SetName - bla-bla
  3312. func (b *AddStickerToSetMethod) SetName(value string) *AddStickerToSetMethod {
  3313.     b.Name = value
  3314.     return b
  3315. }
  3316.  
  3317. // SetPngSticker - bla-bla
  3318. func (b *AddStickerToSetMethod) SetPngSticker(value *InputFile) *AddStickerToSetMethod {
  3319.     b.PngSticker = value
  3320.     return b
  3321. }
  3322.  
  3323. // SetEmojis - bla-bla
  3324. func (b *AddStickerToSetMethod) SetEmojis(value string) *AddStickerToSetMethod {
  3325.     b.Emojis = value
  3326.     return b
  3327. }
  3328.  
  3329. // SetMaskPosition - bla-bla
  3330. func (b *AddStickerToSetMethod) SetMaskPosition(value *MaskPosition) *AddStickerToSetMethod {
  3331.     b.MaskPosition = value
  3332.     return b
  3333. }
  3334.  
  3335. // SetStickerPositionInSetMethod - bla-bla
  3336. type SetStickerPositionInSetMethod struct {
  3337.     Sticker  string `json:"sticker"`
  3338.     Position int    `json:"position"`
  3339. }
  3340.  
  3341. // SetStickerPositionInSet creates new Telegram Bot API method setStickerPositionInSet
  3342. func SetStickerPositionInSet(sticker string, position int) *SetStickerPositionInSetMethod {
  3343.     return &SetStickerPositionInSetMethod{
  3344.         Sticker:  sticker,
  3345.         Position: position,
  3346.     }
  3347. }
  3348.  
  3349. // SetSticker - bla-bla
  3350. func (b *SetStickerPositionInSetMethod) SetSticker(value string) *SetStickerPositionInSetMethod {
  3351.     b.Sticker = value
  3352.     return b
  3353. }
  3354.  
  3355. // SetPosition - bla-bla
  3356. func (b *SetStickerPositionInSetMethod) SetPosition(value int) *SetStickerPositionInSetMethod {
  3357.     b.Position = value
  3358.     return b
  3359. }
  3360.  
  3361. // DeleteStickerFromSetMethod - bla-bla
  3362. type DeleteStickerFromSetMethod struct {
  3363.     Sticker string `json:"sticker"`
  3364. }
  3365.  
  3366. // DeleteStickerFromSet creates new Telegram Bot API method deleteStickerFromSet
  3367. func DeleteStickerFromSet(sticker string) *DeleteStickerFromSetMethod {
  3368.     return &DeleteStickerFromSetMethod{
  3369.         Sticker: sticker,
  3370.     }
  3371. }
  3372.  
  3373. // SetSticker - bla-bla
  3374. func (b *DeleteStickerFromSetMethod) SetSticker(value string) *DeleteStickerFromSetMethod {
  3375.     b.Sticker = value
  3376.     return b
  3377. }
  3378.  
  3379. // AnswerInlineQueryMethod - bla-bla
  3380. type AnswerInlineQueryMethod struct {
  3381.     InlineQueryID     string               `json:"inline_query_id"`
  3382.     Results           []*InlineQueryResult `json:"results"`
  3383.     CacheTime         int                  `json:"cache_time"`
  3384.     IsPersonal        bool                 `json:"is_personal"`
  3385.     NextOffset        string               `json:"next_offset"`
  3386.     SwitchPmText      string               `json:"switch_pm_text"`
  3387.     SwitchPmParameter string               `json:"switch_pm_parameter"`
  3388. }
  3389.  
  3390. // AnswerInlineQuery creates new Telegram Bot API method answerInlineQuery
  3391. func AnswerInlineQuery(inlineQueryID string, results []*InlineQueryResult) *AnswerInlineQueryMethod {
  3392.     return &AnswerInlineQueryMethod{
  3393.         InlineQueryID: inlineQueryID,
  3394.         Results:       results,
  3395.     }
  3396. }
  3397.  
  3398. // SetInlineQueryID - bla-bla
  3399. func (b *AnswerInlineQueryMethod) SetInlineQueryID(value string) *AnswerInlineQueryMethod {
  3400.     b.InlineQueryID = value
  3401.     return b
  3402. }
  3403.  
  3404. // SetResults - bla-bla
  3405. func (b *AnswerInlineQueryMethod) SetResults(value []*InlineQueryResult) *AnswerInlineQueryMethod {
  3406.     b.Results = value
  3407.     return b
  3408. }
  3409.  
  3410. // SetCacheTime - bla-bla
  3411. func (b *AnswerInlineQueryMethod) SetCacheTime(value int) *AnswerInlineQueryMethod {
  3412.     b.CacheTime = value
  3413.     return b
  3414. }
  3415.  
  3416. // SetIsPersonal - bla-bla
  3417. func (b *AnswerInlineQueryMethod) SetIsPersonal(value bool) *AnswerInlineQueryMethod {
  3418.     b.IsPersonal = value
  3419.     return b
  3420. }
  3421.  
  3422. // SetNextOffset - bla-bla
  3423. func (b *AnswerInlineQueryMethod) SetNextOffset(value string) *AnswerInlineQueryMethod {
  3424.     b.NextOffset = value
  3425.     return b
  3426. }
  3427.  
  3428. // SetSwitchPmText - bla-bla
  3429. func (b *AnswerInlineQueryMethod) SetSwitchPmText(value string) *AnswerInlineQueryMethod {
  3430.     b.SwitchPmText = value
  3431.     return b
  3432. }
  3433.  
  3434. // SetSwitchPmParameter - bla-bla
  3435. func (b *AnswerInlineQueryMethod) SetSwitchPmParameter(value string) *AnswerInlineQueryMethod {
  3436.     b.SwitchPmParameter = value
  3437.     return b
  3438. }
  3439.  
  3440. // SendInvoiceMethod - bla-bla
  3441. type SendInvoiceMethod struct {
  3442.     ChatID                    int             `json:"chat_id"`
  3443.     Title                     string          `json:"title"`
  3444.     Description               string          `json:"description"`
  3445.     Payload                   string          `json:"payload"`
  3446.     ProviderToken             string          `json:"provider_token"`
  3447.     StartParameter            string          `json:"start_parameter"`
  3448.     Currency                  string          `json:"currency"`
  3449.     Prices                    []*LabeledPrice `json:"prices"`
  3450.     ProviderData              string          `json:"provider_data"`
  3451.     PhotoURL                  string          `json:"photo_url"`
  3452.     PhotoSize                 int             `json:"photo_size"`
  3453.     PhotoWidth                int             `json:"photo_width"`
  3454.     PhotoHeight               int             `json:"photo_height"`
  3455.     NeedName                  bool            `json:"need_name"`
  3456.     NeedPhoneNumber           bool            `json:"need_phone_number"`
  3457.     NeedEmail                 bool            `json:"need_email"`
  3458.     NeedShippingAddress       bool            `json:"need_shipping_address"`
  3459.     SendPhoneNumberToProvider bool            `json:"send_phone_number_to_provider"`
  3460.     SendEmailToProvider       bool            `json:"send_email_to_provider"`
  3461.     IsFlexible                bool            `json:"is_flexible"`
  3462.     DisableNotification       bool            `json:"disable_notification"`
  3463.     ReplyToMessageID          int             `json:"reply_to_message_id"`
  3464.     ReplyMarkup               *ReplyMarkup    `json:"reply_markup"`
  3465. }
  3466.  
  3467. // SendInvoice creates new Telegram Bot API method sendInvoice
  3468. func SendInvoice(chatID int, title string, description string, payload string, providerToken string, startParameter string, currency string, prices []*LabeledPrice) *SendInvoiceMethod {
  3469.     return &SendInvoiceMethod{
  3470.         ChatID:         chatID,
  3471.         Title:          title,
  3472.         Description:    description,
  3473.         Payload:        payload,
  3474.         ProviderToken:  providerToken,
  3475.         StartParameter: startParameter,
  3476.         Currency:       currency,
  3477.         Prices:         prices,
  3478.     }
  3479. }
  3480.  
  3481. // SetChatID - bla-bla
  3482. func (b *SendInvoiceMethod) SetChatID(value int) *SendInvoiceMethod {
  3483.     b.ChatID = value
  3484.     return b
  3485. }
  3486.  
  3487. // SetTitle - bla-bla
  3488. func (b *SendInvoiceMethod) SetTitle(value string) *SendInvoiceMethod {
  3489.     b.Title = value
  3490.     return b
  3491. }
  3492.  
  3493. // SetDescription - bla-bla
  3494. func (b *SendInvoiceMethod) SetDescription(value string) *SendInvoiceMethod {
  3495.     b.Description = value
  3496.     return b
  3497. }
  3498.  
  3499. // SetPayload - bla-bla
  3500. func (b *SendInvoiceMethod) SetPayload(value string) *SendInvoiceMethod {
  3501.     b.Payload = value
  3502.     return b
  3503. }
  3504.  
  3505. // SetProviderToken - bla-bla
  3506. func (b *SendInvoiceMethod) SetProviderToken(value string) *SendInvoiceMethod {
  3507.     b.ProviderToken = value
  3508.     return b
  3509. }
  3510.  
  3511. // SetStartParameter - bla-bla
  3512. func (b *SendInvoiceMethod) SetStartParameter(value string) *SendInvoiceMethod {
  3513.     b.StartParameter = value
  3514.     return b
  3515. }
  3516.  
  3517. // SetCurrency - bla-bla
  3518. func (b *SendInvoiceMethod) SetCurrency(value string) *SendInvoiceMethod {
  3519.     b.Currency = value
  3520.     return b
  3521. }
  3522.  
  3523. // SetPrices - bla-bla
  3524. func (b *SendInvoiceMethod) SetPrices(value []*LabeledPrice) *SendInvoiceMethod {
  3525.     b.Prices = value
  3526.     return b
  3527. }
  3528.  
  3529. // SetProviderData - bla-bla
  3530. func (b *SendInvoiceMethod) SetProviderData(value string) *SendInvoiceMethod {
  3531.     b.ProviderData = value
  3532.     return b
  3533. }
  3534.  
  3535. // SetPhotoURL - bla-bla
  3536. func (b *SendInvoiceMethod) SetPhotoURL(value string) *SendInvoiceMethod {
  3537.     b.PhotoURL = value
  3538.     return b
  3539. }
  3540.  
  3541. // SetPhotoSize - bla-bla
  3542. func (b *SendInvoiceMethod) SetPhotoSize(value int) *SendInvoiceMethod {
  3543.     b.PhotoSize = value
  3544.     return b
  3545. }
  3546.  
  3547. // SetPhotoWidth - bla-bla
  3548. func (b *SendInvoiceMethod) SetPhotoWidth(value int) *SendInvoiceMethod {
  3549.     b.PhotoWidth = value
  3550.     return b
  3551. }
  3552.  
  3553. // SetPhotoHeight - bla-bla
  3554. func (b *SendInvoiceMethod) SetPhotoHeight(value int) *SendInvoiceMethod {
  3555.     b.PhotoHeight = value
  3556.     return b
  3557. }
  3558.  
  3559. // SetNeedName - bla-bla
  3560. func (b *SendInvoiceMethod) SetNeedName(value bool) *SendInvoiceMethod {
  3561.     b.NeedName = value
  3562.     return b
  3563. }
  3564.  
  3565. // SetNeedPhoneNumber - bla-bla
  3566. func (b *SendInvoiceMethod) SetNeedPhoneNumber(value bool) *SendInvoiceMethod {
  3567.     b.NeedPhoneNumber = value
  3568.     return b
  3569. }
  3570.  
  3571. // SetNeedEmail - bla-bla
  3572. func (b *SendInvoiceMethod) SetNeedEmail(value bool) *SendInvoiceMethod {
  3573.     b.NeedEmail = value
  3574.     return b
  3575. }
  3576.  
  3577. // SetNeedShippingAddress - bla-bla
  3578. func (b *SendInvoiceMethod) SetNeedShippingAddress(value bool) *SendInvoiceMethod {
  3579.     b.NeedShippingAddress = value
  3580.     return b
  3581. }
  3582.  
  3583. // SetSendPhoneNumberToProvider - bla-bla
  3584. func (b *SendInvoiceMethod) SetSendPhoneNumberToProvider(value bool) *SendInvoiceMethod {
  3585.     b.SendPhoneNumberToProvider = value
  3586.     return b
  3587. }
  3588.  
  3589. // SetSendEmailToProvider - bla-bla
  3590. func (b *SendInvoiceMethod) SetSendEmailToProvider(value bool) *SendInvoiceMethod {
  3591.     b.SendEmailToProvider = value
  3592.     return b
  3593. }
  3594.  
  3595. // SetIsFlexible - bla-bla
  3596. func (b *SendInvoiceMethod) SetIsFlexible(value bool) *SendInvoiceMethod {
  3597.     b.IsFlexible = value
  3598.     return b
  3599. }
  3600.  
  3601. // SetDisableNotification - bla-bla
  3602. func (b *SendInvoiceMethod) SetDisableNotification(value bool) *SendInvoiceMethod {
  3603.     b.DisableNotification = value
  3604.     return b
  3605. }
  3606.  
  3607. // SetReplyToMessageID - bla-bla
  3608. func (b *SendInvoiceMethod) SetReplyToMessageID(value int) *SendInvoiceMethod {
  3609.     b.ReplyToMessageID = value
  3610.     return b
  3611. }
  3612.  
  3613. // SetReplyMarkup - bla-bla
  3614. func (b *SendInvoiceMethod) SetReplyMarkup(value *ReplyMarkup) *SendInvoiceMethod {
  3615.     b.ReplyMarkup = value
  3616.     return b
  3617. }
  3618.  
  3619. // AnswerShippingQueryMethod - bla-bla
  3620. type AnswerShippingQueryMethod struct {
  3621.     ShippingQueryID string            `json:"shipping_query_id"`
  3622.     Ok              bool              `json:"ok"`
  3623.     ShippingOptions []*ShippingOption `json:"shipping_options"`
  3624.     ErrorMessage    string            `json:"error_message"`
  3625. }
  3626.  
  3627. // AnswerShippingQuery creates new Telegram Bot API method answerShippingQuery
  3628. func AnswerShippingQuery(shippingQueryID string, ok bool) *AnswerShippingQueryMethod {
  3629.     return &AnswerShippingQueryMethod{
  3630.         ShippingQueryID: shippingQueryID,
  3631.         Ok:              ok,
  3632.     }
  3633. }
  3634.  
  3635. // SetShippingQueryID - bla-bla
  3636. func (b *AnswerShippingQueryMethod) SetShippingQueryID(value string) *AnswerShippingQueryMethod {
  3637.     b.ShippingQueryID = value
  3638.     return b
  3639. }
  3640.  
  3641. // SetOk - bla-bla
  3642. func (b *AnswerShippingQueryMethod) SetOk(value bool) *AnswerShippingQueryMethod {
  3643.     b.Ok = value
  3644.     return b
  3645. }
  3646.  
  3647. // SetShippingOptions - bla-bla
  3648. func (b *AnswerShippingQueryMethod) SetShippingOptions(value []*ShippingOption) *AnswerShippingQueryMethod {
  3649.     b.ShippingOptions = value
  3650.     return b
  3651. }
  3652.  
  3653. // SetErrorMessage - bla-bla
  3654. func (b *AnswerShippingQueryMethod) SetErrorMessage(value string) *AnswerShippingQueryMethod {
  3655.     b.ErrorMessage = value
  3656.     return b
  3657. }
  3658.  
  3659. // AnswerPreCheckoutQueryMethod - bla-bla
  3660. type AnswerPreCheckoutQueryMethod struct {
  3661.     PreCheckoutQueryID string `json:"pre_checkout_query_id"`
  3662.     Ok                 bool   `json:"ok"`
  3663.     ErrorMessage       string `json:"error_message"`
  3664. }
  3665.  
  3666. // AnswerPreCheckoutQuery creates new Telegram Bot API method answerPreCheckoutQuery
  3667. func AnswerPreCheckoutQuery(preCheckoutQueryID string, ok bool) *AnswerPreCheckoutQueryMethod {
  3668.     return &AnswerPreCheckoutQueryMethod{
  3669.         PreCheckoutQueryID: preCheckoutQueryID,
  3670.         Ok:                 ok,
  3671.     }
  3672. }
  3673.  
  3674. // SetPreCheckoutQueryID - bla-bla
  3675. func (b *AnswerPreCheckoutQueryMethod) SetPreCheckoutQueryID(value string) *AnswerPreCheckoutQueryMethod {
  3676.     b.PreCheckoutQueryID = value
  3677.     return b
  3678. }
  3679.  
  3680. // SetOk - bla-bla
  3681. func (b *AnswerPreCheckoutQueryMethod) SetOk(value bool) *AnswerPreCheckoutQueryMethod {
  3682.     b.Ok = value
  3683.     return b
  3684. }
  3685.  
  3686. // SetErrorMessage - bla-bla
  3687. func (b *AnswerPreCheckoutQueryMethod) SetErrorMessage(value string) *AnswerPreCheckoutQueryMethod {
  3688.     b.ErrorMessage = value
  3689.     return b
  3690. }
  3691.  
  3692. // SetPassportDataErrorsMethod - bla-bla
  3693. type SetPassportDataErrorsMethod struct {
  3694.     UserID int                     `json:"user_id"`
  3695.     Errors []*PassportElementError `json:"errors"`
  3696. }
  3697.  
  3698. // SetPassportDataErrors creates new Telegram Bot API method setPassportDataErrors
  3699. func SetPassportDataErrors(userID int, errors []*PassportElementError) *SetPassportDataErrorsMethod {
  3700.     return &SetPassportDataErrorsMethod{
  3701.         UserID: userID,
  3702.         Errors: errors,
  3703.     }
  3704. }
  3705.  
  3706. // SetUserID - bla-bla
  3707. func (b *SetPassportDataErrorsMethod) SetUserID(value int) *SetPassportDataErrorsMethod {
  3708.     b.UserID = value
  3709.     return b
  3710. }
  3711.  
  3712. // SetErrors - bla-bla
  3713. func (b *SetPassportDataErrorsMethod) SetErrors(value []*PassportElementError) *SetPassportDataErrorsMethod {
  3714.     b.Errors = value
  3715.     return b
  3716. }
  3717.  
  3718. // SendGameMethod - bla-bla
  3719. type SendGameMethod struct {
  3720.     ChatID              int          `json:"chat_id"`
  3721.     GameShortName       string       `json:"game_short_name"`
  3722.     DisableNotification bool         `json:"disable_notification"`
  3723.     ReplyToMessageID    int          `json:"reply_to_message_id"`
  3724.     ReplyMarkup         *ReplyMarkup `json:"reply_markup"`
  3725. }
  3726.  
  3727. // SendGame creates new Telegram Bot API method sendGame
  3728. func SendGame(chatID int, gameShortName string) *SendGameMethod {
  3729.     return &SendGameMethod{
  3730.         ChatID:        chatID,
  3731.         GameShortName: gameShortName,
  3732.     }
  3733. }
  3734.  
  3735. // SetChatID - bla-bla
  3736. func (b *SendGameMethod) SetChatID(value int) *SendGameMethod {
  3737.     b.ChatID = value
  3738.     return b
  3739. }
  3740.  
  3741. // SetGameShortName - bla-bla
  3742. func (b *SendGameMethod) SetGameShortName(value string) *SendGameMethod {
  3743.     b.GameShortName = value
  3744.     return b
  3745. }
  3746.  
  3747. // SetDisableNotification - bla-bla
  3748. func (b *SendGameMethod) SetDisableNotification(value bool) *SendGameMethod {
  3749.     b.DisableNotification = value
  3750.     return b
  3751. }
  3752.  
  3753. // SetReplyToMessageID - bla-bla
  3754. func (b *SendGameMethod) SetReplyToMessageID(value int) *SendGameMethod {
  3755.     b.ReplyToMessageID = value
  3756.     return b
  3757. }
  3758.  
  3759. // SetReplyMarkup - bla-bla
  3760. func (b *SendGameMethod) SetReplyMarkup(value *ReplyMarkup) *SendGameMethod {
  3761.     b.ReplyMarkup = value
  3762.     return b
  3763. }
  3764.  
  3765. // SetGameScoreMethod - bla-bla
  3766. type SetGameScoreMethod struct {
  3767.     UserID             int    `json:"user_id"`
  3768.     Score              int    `json:"score"`
  3769.     Force              bool   `json:"force"`
  3770.     DisableEditMessage bool   `json:"disable_edit_message"`
  3771.     ChatID             int    `json:"chat_id"`
  3772.     MessageID          int    `json:"message_id"`
  3773.     InlineMessageID    string `json:"inline_message_id"`
  3774. }
  3775.  
  3776. // SetGameScore creates new Telegram Bot API method setGameScore
  3777. func SetGameScore(userID int, score int) *SetGameScoreMethod {
  3778.     return &SetGameScoreMethod{
  3779.         UserID: userID,
  3780.         Score:  score,
  3781.     }
  3782. }
  3783.  
  3784. // SetUserID - bla-bla
  3785. func (b *SetGameScoreMethod) SetUserID(value int) *SetGameScoreMethod {
  3786.     b.UserID = value
  3787.     return b
  3788. }
  3789.  
  3790. // SetScore - bla-bla
  3791. func (b *SetGameScoreMethod) SetScore(value int) *SetGameScoreMethod {
  3792.     b.Score = value
  3793.     return b
  3794. }
  3795.  
  3796. // SetForce - bla-bla
  3797. func (b *SetGameScoreMethod) SetForce(value bool) *SetGameScoreMethod {
  3798.     b.Force = value
  3799.     return b
  3800. }
  3801.  
  3802. // SetDisableEditMessage - bla-bla
  3803. func (b *SetGameScoreMethod) SetDisableEditMessage(value bool) *SetGameScoreMethod {
  3804.     b.DisableEditMessage = value
  3805.     return b
  3806. }
  3807.  
  3808. // SetChatID - bla-bla
  3809. func (b *SetGameScoreMethod) SetChatID(value int) *SetGameScoreMethod {
  3810.     b.ChatID = value
  3811.     return b
  3812. }
  3813.  
  3814. // SetMessageID - bla-bla
  3815. func (b *SetGameScoreMethod) SetMessageID(value int) *SetGameScoreMethod {
  3816.     b.MessageID = value
  3817.     return b
  3818. }
  3819.  
  3820. // SetInlineMessageID - bla-bla
  3821. func (b *SetGameScoreMethod) SetInlineMessageID(value string) *SetGameScoreMethod {
  3822.     b.InlineMessageID = value
  3823.     return b
  3824. }
  3825.  
  3826. // GetGameHighScoresMethod - bla-bla
  3827. type GetGameHighScoresMethod struct {
  3828.     UserID          int    `json:"user_id"`
  3829.     ChatID          int    `json:"chat_id"`
  3830.     MessageID       int    `json:"message_id"`
  3831.     InlineMessageID string `json:"inline_message_id"`
  3832. }
  3833.  
  3834. // GetGameHighScores creates new Telegram Bot API method getGameHighScores
  3835. func GetGameHighScores(userID int) *GetGameHighScoresMethod {
  3836.     return &GetGameHighScoresMethod{
  3837.         UserID: userID,
  3838.     }
  3839. }
  3840.  
  3841. // SetUserID - bla-bla
  3842. func (b *GetGameHighScoresMethod) SetUserID(value int) *GetGameHighScoresMethod {
  3843.     b.UserID = value
  3844.     return b
  3845. }
  3846.  
  3847. // SetChatID - bla-bla
  3848. func (b *GetGameHighScoresMethod) SetChatID(value int) *GetGameHighScoresMethod {
  3849.     b.ChatID = value
  3850.     return b
  3851. }
  3852.  
  3853. // SetMessageID - bla-bla
  3854. func (b *GetGameHighScoresMethod) SetMessageID(value int) *GetGameHighScoresMethod {
  3855.     b.MessageID = value
  3856.     return b
  3857. }
  3858.  
  3859. // SetInlineMessageID - bla-bla
  3860. func (b *GetGameHighScoresMethod) SetInlineMessageID(value string) *GetGameHighScoresMethod {
  3861.     b.InlineMessageID = value
  3862.     return b
  3863. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement