Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package bot
- // ReplyMarkup - This object represents one row of the high scores table for a game.
- type ReplyMarkup interface {
- ReplyMarkup()
- }
- // ChatID - This object represents one row of the high scores table for a game.
- type ChatID interface {
- ChatID()
- }
- // InputMedia - This object represents one row of the high scores table for a game.
- type InputMedia interface {
- InputMedia()
- }
- // InlineQueryResult - This object represents one row of the high scores table for a game.
- type InlineQueryResult interface {
- InlineQueryResult()
- }
- // InputMessageContent - This object represents one row of the high scores table for a game.
- type InputMessageContent interface {
- InputMessageContent()
- }
- // PassportElementError - This object represents one row of the high scores table for a game.
- type PassportElementError interface {
- PassportElementError()
- }
- // Update - This object represents an incoming update.At most one of the optional parameters can be present in any given update.
- type Update struct {
- UpdateID int `json:"update_id"`
- Message *Message `json:"message"`
- EditedMessage *Message `json:"edited_message"`
- ChannelPost *Message `json:"channel_post"`
- EditedChannelPost *Message `json:"edited_channel_post"`
- InlineQuery *InlineQuery `json:"inline_query"`
- ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result"`
- CallbackQuery *CallbackQuery `json:"callback_query"`
- ShippingQuery *ShippingQuery `json:"shipping_query"`
- PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query"`
- Poll *Poll `json:"poll"`
- PollAnswer *PollAnswer `json:"poll_answer"`
- }
- // WebhookInfo - Contains information about the current status of a webhook.
- type WebhookInfo struct {
- URL string `json:"url"`
- HasCustomCertificate bool `json:"has_custom_certificate"`
- PendingUpdateCount int `json:"pending_update_count"`
- LastErrorDate int `json:"last_error_date"`
- LastErrorMessage string `json:"last_error_message"`
- MaxConnections int `json:"max_connections"`
- AllowedUpdates []string `json:"allowed_updates"`
- }
- // User - This object represents a Telegram user or bot.
- type User struct {
- ID int `json:"id"`
- IsBot bool `json:"is_bot"`
- FirstName string `json:"first_name"`
- LastName string `json:"last_name"`
- Username string `json:"username"`
- LanguageCode string `json:"language_code"`
- CanJoinGroups bool `json:"can_join_groups"`
- CanReadAllGroupMessages bool `json:"can_read_all_group_messages"`
- SupportsInlineQueries bool `json:"supports_inline_queries"`
- }
- // Chat - This object represents a chat.
- type Chat struct {
- ID int64 `json:"id"`
- Type string `json:"type"`
- Title string `json:"title"`
- Username string `json:"username"`
- FirstName string `json:"first_name"`
- LastName string `json:"last_name"`
- Photo *ChatPhoto `json:"photo"`
- Description string `json:"description"`
- InviteLink string `json:"invite_link"`
- PinnedMessage *Message `json:"pinned_message"`
- Permissions *ChatPermissions `json:"permissions"`
- SlowModeDelay int `json:"slow_mode_delay"`
- StickerSetName string `json:"sticker_set_name"`
- CanSetStickerSet bool `json:"can_set_sticker_set"`
- }
- // Message - This object represents a message.
- type Message struct {
- MessageID int `json:"message_id"`
- From *User `json:"from"`
- Date int `json:"date"`
- Chat *Chat `json:"chat"`
- ForwardFrom *User `json:"forward_from"`
- ForwardFromChat *Chat `json:"forward_from_chat"`
- ForwardFromMessageID int `json:"forward_from_message_id"`
- ForwardSignature string `json:"forward_signature"`
- ForwardSenderName string `json:"forward_sender_name"`
- ForwardDate int `json:"forward_date"`
- ReplyToMessage *Message `json:"reply_to_message"`
- EditDate int `json:"edit_date"`
- MediaGroupID string `json:"media_group_id"`
- AuthorSignature string `json:"author_signature"`
- Text string `json:"text"`
- Entities []*MessageEntity `json:"entities"`
- CaptionEntities []*MessageEntity `json:"caption_entities"`
- Audio *Audio `json:"audio"`
- Document *Document `json:"document"`
- Animation *Animation `json:"animation"`
- Game *Game `json:"game"`
- Photo []*PhotoSize `json:"photo"`
- Sticker *Sticker `json:"sticker"`
- Video *Video `json:"video"`
- Voice *Voice `json:"voice"`
- VideoNote *VideoNote `json:"video_note"`
- Caption string `json:"caption"`
- Contact *Contact `json:"contact"`
- Location *Location `json:"location"`
- Venue *Venue `json:"venue"`
- Poll *Poll `json:"poll"`
- NewChatMembers []*User `json:"new_chat_members"`
- LeftChatMember *User `json:"left_chat_member"`
- NewChatTitle string `json:"new_chat_title"`
- NewChatPhoto []*PhotoSize `json:"new_chat_photo"`
- DeleteChatPhoto bool `json:"delete_chat_photo"`
- GroupChatCreated bool `json:"group_chat_created"`
- SupergroupChatCreated bool `json:"supergroup_chat_created"`
- ChannelChatCreated bool `json:"channel_chat_created"`
- MigrateToChatID int64 `json:"migrate_to_chat_id"`
- MigrateFromChatID int64 `json:"migrate_from_chat_id"`
- PinnedMessage *Message `json:"pinned_message"`
- Invoice *Invoice `json:"invoice"`
- SuccessfulPayment *SuccessfulPayment `json:"successful_payment"`
- ConnectedWebsite string `json:"connected_website"`
- PassportData *PassportData `json:"passport_data"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // MessageEntity - This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
- type MessageEntity struct {
- Type string `json:"type"`
- Offset int `json:"offset"`
- Length int `json:"length"`
- URL string `json:"url"`
- User *User `json:"user"`
- Language string `json:"language"`
- }
- // PhotoSize - This object represents one size of a photo or a file / sticker thumbnail.
- type PhotoSize struct {
- FileID string `json:"file_id"`
- FileUniqueID string `json:"file_unique_id"`
- Width int `json:"width"`
- Height int `json:"height"`
- FileSize int `json:"file_size"`
- }
- // Audio - This object represents an audio file to be treated as music by the Telegram clients.
- type Audio struct {
- FileID string `json:"file_id"`
- FileUniqueID string `json:"file_unique_id"`
- Duration int `json:"duration"`
- Performer string `json:"performer"`
- Title string `json:"title"`
- MimeType string `json:"mime_type"`
- FileSize int `json:"file_size"`
- Thumb *PhotoSize `json:"thumb"`
- }
- // Document - This object represents a general file (as opposed to photos, voice messages and audio files).
- type Document struct {
- FileID string `json:"file_id"`
- FileUniqueID string `json:"file_unique_id"`
- Thumb *PhotoSize `json:"thumb"`
- FileName string `json:"file_name"`
- MimeType string `json:"mime_type"`
- FileSize int `json:"file_size"`
- }
- // Video - This object represents a video file.
- type Video struct {
- FileID string `json:"file_id"`
- FileUniqueID string `json:"file_unique_id"`
- Width int `json:"width"`
- Height int `json:"height"`
- Duration int `json:"duration"`
- Thumb *PhotoSize `json:"thumb"`
- MimeType string `json:"mime_type"`
- FileSize int `json:"file_size"`
- }
- // Animation - This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
- type Animation struct {
- FileID string `json:"file_id"`
- FileUniqueID string `json:"file_unique_id"`
- Width int `json:"width"`
- Height int `json:"height"`
- Duration int `json:"duration"`
- Thumb *PhotoSize `json:"thumb"`
- FileName string `json:"file_name"`
- MimeType string `json:"mime_type"`
- FileSize int `json:"file_size"`
- }
- // Voice - This object represents a voice note.
- type Voice struct {
- FileID string `json:"file_id"`
- FileUniqueID string `json:"file_unique_id"`
- Duration int `json:"duration"`
- MimeType string `json:"mime_type"`
- FileSize int `json:"file_size"`
- }
- // VideoNote - This object represents a video message (available in Telegram apps as of v.4.0).
- type VideoNote struct {
- FileID string `json:"file_id"`
- FileUniqueID string `json:"file_unique_id"`
- Length int `json:"length"`
- Duration int `json:"duration"`
- Thumb *PhotoSize `json:"thumb"`
- FileSize int `json:"file_size"`
- }
- // Contact - This object represents a phone contact.
- type Contact struct {
- PhoneNumber string `json:"phone_number"`
- FirstName string `json:"first_name"`
- LastName string `json:"last_name"`
- UserID int `json:"user_id"`
- Vcard string `json:"vcard"`
- }
- // Location - This object represents a point on the map.
- type Location struct {
- Longitude float64 `json:"longitude"`
- Latitude float64 `json:"latitude"`
- }
- // Venue - This object represents a venue.
- type Venue struct {
- Location *Location `json:"location"`
- Title string `json:"title"`
- Address string `json:"address"`
- FoursquareID string `json:"foursquare_id"`
- FoursquareType string `json:"foursquare_type"`
- }
- // PollOption - This object contains information about one answer option in a poll.
- type PollOption struct {
- Text string `json:"text"`
- VoterCount int `json:"voter_count"`
- }
- // PollAnswer - This object represents an answer of a user in a non-anonymous poll.
- type PollAnswer struct {
- PollID string `json:"poll_id"`
- User *User `json:"user"`
- OptionIds []int `json:"option_ids"`
- }
- // Poll - This object contains information about a poll.
- type Poll struct {
- ID string `json:"id"`
- Question string `json:"question"`
- Options []*PollOption `json:"options"`
- TotalVoterCount int `json:"total_voter_count"`
- IsClosed bool `json:"is_closed"`
- IsAnonymous bool `json:"is_anonymous"`
- Type string `json:"type"`
- AllowsMultipleAnswers bool `json:"allows_multiple_answers"`
- CorrectOptionID int `json:"correct_option_id"`
- }
- // UserProfilePhotos - This object represent a user's profile pictures.
- type UserProfilePhotos struct {
- TotalCount int `json:"total_count"`
- Photos [][]*PhotoSize `json:"photos"`
- }
- // 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.
- type File struct {
- FileID string `json:"file_id"`
- FileUniqueID string `json:"file_unique_id"`
- FileSize int `json:"file_size"`
- FilePath string `json:"file_path"`
- }
- // ReplyKeyboardMarkup - This object represents a custom keyboard with reply options (see Introduction to bots for details and examples).
- type ReplyKeyboardMarkup struct {
- Keyboard [][]*KeyboardButton `json:"keyboard"`
- ResizeKeyboard bool `json:"resize_keyboard"`
- OneTimeKeyboard bool `json:"one_time_keyboard"`
- Selective bool `json:"selective"`
- }
- // 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.
- type KeyboardButton struct {
- Text string `json:"text"`
- RequestContact bool `json:"request_contact"`
- RequestLocation bool `json:"request_location"`
- RequestPoll *KeyboardButtonPollType `json:"request_poll"`
- }
- // KeyboardButtonPollType - This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
- type KeyboardButtonPollType struct {
- Type string `json:"type"`
- }
- // 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).
- type ReplyKeyboardRemove struct {
- RemoveKeyboard bool `json:"remove_keyboard"`
- Selective bool `json:"selective"`
- }
- // InlineKeyboardMarkup - This object represents an inline keyboard that appears right next to the message it belongs to.
- type InlineKeyboardMarkup struct {
- InlineKeyboard [][]*InlineKeyboardButton `json:"inline_keyboard"`
- }
- // InlineKeyboardButton - This object represents one button of an inline keyboard. You must use exactly one of the optional fields.
- type InlineKeyboardButton struct {
- Text string `json:"text"`
- URL string `json:"url"`
- LoginURL *LoginURL `json:"login_url"`
- CallbackData string `json:"callback_data"`
- SwitchInlineQuery string `json:"switch_inline_query"`
- SwitchInlineQueryCurrentChat string `json:"switch_inline_query_current_chat"`
- CallbackGame *CallbackGame `json:"callback_game"`
- Pay bool `json:"pay"`
- }
- // 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:
- type LoginURL struct {
- URL string `json:"url"`
- ForwardText string `json:"forward_text"`
- BotUsername string `json:"bot_username"`
- RequestWriteAccess bool `json:"request_write_access"`
- }
- // 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.
- type CallbackQuery struct {
- ID string `json:"id"`
- From *User `json:"from"`
- Message *Message `json:"message"`
- InlineMessageID string `json:"inline_message_id"`
- ChatInstance string `json:"chat_instance"`
- Data string `json:"data"`
- GameShortName string `json:"game_short_name"`
- }
- // 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.
- type ForceReply struct {
- ForceReply bool `json:"force_reply"`
- Selective bool `json:"selective"`
- }
- // ChatPhoto - This object represents a chat photo.
- type ChatPhoto struct {
- SmallFileID string `json:"small_file_id"`
- SmallFileUniqueID string `json:"small_file_unique_id"`
- BigFileID string `json:"big_file_id"`
- BigFileUniqueID string `json:"big_file_unique_id"`
- }
- // ChatMember - This object contains information about one member of a chat.
- type ChatMember struct {
- User *User `json:"user"`
- Status string `json:"status"`
- CustomTitle string `json:"custom_title"`
- UntilDate int `json:"until_date"`
- CanBeEdited bool `json:"can_be_edited"`
- CanPostMessages bool `json:"can_post_messages"`
- CanEditMessages bool `json:"can_edit_messages"`
- CanDeleteMessages bool `json:"can_delete_messages"`
- CanRestrictMembers bool `json:"can_restrict_members"`
- CanPromoteMembers bool `json:"can_promote_members"`
- CanChangeInfo bool `json:"can_change_info"`
- CanInviteUsers bool `json:"can_invite_users"`
- CanPinMessages bool `json:"can_pin_messages"`
- IsMember bool `json:"is_member"`
- CanSendMessages bool `json:"can_send_messages"`
- CanSendMediaMessages bool `json:"can_send_media_messages"`
- CanSendPolls bool `json:"can_send_polls"`
- CanSendOtherMessages bool `json:"can_send_other_messages"`
- CanAddWebPagePreviews bool `json:"can_add_web_page_previews"`
- }
- // ChatPermissions - Describes actions that a non-administrator user is allowed to take in a chat.
- type ChatPermissions struct {
- CanSendMessages bool `json:"can_send_messages"`
- CanSendMediaMessages bool `json:"can_send_media_messages"`
- CanSendPolls bool `json:"can_send_polls"`
- CanSendOtherMessages bool `json:"can_send_other_messages"`
- CanAddWebPagePreviews bool `json:"can_add_web_page_previews"`
- CanChangeInfo bool `json:"can_change_info"`
- CanInviteUsers bool `json:"can_invite_users"`
- CanPinMessages bool `json:"can_pin_messages"`
- }
- // ResponseParameters - Contains information about why a request was unsuccessful.
- type ResponseParameters struct {
- MigrateToChatID int64 `json:"migrate_to_chat_id"`
- RetryAfter int `json:"retry_after"`
- }
- // InputMediaPhoto - Represents a photo to be sent.
- type InputMediaPhoto struct {
- Type string `json:"type"`
- Media string `json:"media"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- }
- // InputMediaVideo - Represents a video to be sent.
- type InputMediaVideo struct {
- Type string `json:"type"`
- Media string `json:"media"`
- Thumb *InputFile `json:"thumb"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- Width int `json:"width"`
- Height int `json:"height"`
- Duration int `json:"duration"`
- SupportsStreaming bool `json:"supports_streaming"`
- }
- // InputMediaAnimation - Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
- type InputMediaAnimation struct {
- Type string `json:"type"`
- Media string `json:"media"`
- Thumb *InputFile `json:"thumb"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- Width int `json:"width"`
- Height int `json:"height"`
- Duration int `json:"duration"`
- }
- // InputMediaAudio - Represents an audio file to be treated as music to be sent.
- type InputMediaAudio struct {
- Type string `json:"type"`
- Media string `json:"media"`
- Thumb *InputFile `json:"thumb"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- Duration int `json:"duration"`
- Performer string `json:"performer"`
- Title string `json:"title"`
- }
- // InputMediaDocument - Represents a general file to be sent.
- type InputMediaDocument struct {
- Type string `json:"type"`
- Media string `json:"media"`
- Thumb *InputFile `json:"thumb"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- }
- // 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.
- type InputFile struct {
- }
- // Sticker - This object represents a sticker.
- type Sticker struct {
- FileID string `json:"file_id"`
- FileUniqueID string `json:"file_unique_id"`
- Width int `json:"width"`
- Height int `json:"height"`
- IsAnimated bool `json:"is_animated"`
- Thumb *PhotoSize `json:"thumb"`
- Emoji string `json:"emoji"`
- SetName string `json:"set_name"`
- MaskPosition *MaskPosition `json:"mask_position"`
- FileSize int `json:"file_size"`
- }
- // StickerSet - This object represents a sticker set.
- type StickerSet struct {
- Name string `json:"name"`
- Title string `json:"title"`
- IsAnimated bool `json:"is_animated"`
- ContainsMasks bool `json:"contains_masks"`
- Stickers []*Sticker `json:"stickers"`
- }
- // MaskPosition - This object describes the position on faces where a mask should be placed by default.
- type MaskPosition struct {
- Point string `json:"point"`
- XShift float64 `json:"x_shift"`
- YShift float64 `json:"y_shift"`
- Scale float64 `json:"scale"`
- }
- // InlineQuery - This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
- type InlineQuery struct {
- ID string `json:"id"`
- From *User `json:"from"`
- Location *Location `json:"location"`
- Query string `json:"query"`
- Offset string `json:"offset"`
- }
- // InlineQueryResultArticle - Represents a link to an article or web page.
- type InlineQueryResultArticle struct {
- Type string `json:"type"`
- ID string `json:"id"`
- Title string `json:"title"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- URL string `json:"url"`
- HideURL bool `json:"hide_url"`
- Description string `json:"description"`
- ThumbURL string `json:"thumb_url"`
- ThumbWidth int `json:"thumb_width"`
- ThumbHeight int `json:"thumb_height"`
- }
- // 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.
- type InlineQueryResultPhoto struct {
- Type string `json:"type"`
- ID string `json:"id"`
- PhotoURL string `json:"photo_url"`
- ThumbURL string `json:"thumb_url"`
- PhotoWidth int `json:"photo_width"`
- PhotoHeight int `json:"photo_height"`
- Title string `json:"title"`
- Description string `json:"description"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultGif struct {
- Type string `json:"type"`
- ID string `json:"id"`
- GifURL string `json:"gif_url"`
- GifWidth int `json:"gif_width"`
- GifHeight int `json:"gif_height"`
- GifDuration int `json:"gif_duration"`
- ThumbURL string `json:"thumb_url"`
- Title string `json:"title"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultMpeg4Gif struct {
- Type string `json:"type"`
- ID string `json:"id"`
- Mpeg4URL string `json:"mpeg4_url"`
- Mpeg4Width int `json:"mpeg4_width"`
- Mpeg4Height int `json:"mpeg4_height"`
- Mpeg4Duration int `json:"mpeg4_duration"`
- ThumbURL string `json:"thumb_url"`
- Title string `json:"title"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultVideo struct {
- Type string `json:"type"`
- ID string `json:"id"`
- VideoURL string `json:"video_url"`
- MimeType string `json:"mime_type"`
- ThumbURL string `json:"thumb_url"`
- Title string `json:"title"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- VideoWidth int `json:"video_width"`
- VideoHeight int `json:"video_height"`
- VideoDuration int `json:"video_duration"`
- Description string `json:"description"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultAudio struct {
- Type string `json:"type"`
- ID string `json:"id"`
- AudioURL string `json:"audio_url"`
- Title string `json:"title"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- Performer string `json:"performer"`
- AudioDuration int `json:"audio_duration"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultVoice struct {
- Type string `json:"type"`
- ID string `json:"id"`
- VoiceURL string `json:"voice_url"`
- Title string `json:"title"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- VoiceDuration int `json:"voice_duration"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultDocument struct {
- Type string `json:"type"`
- ID string `json:"id"`
- Title string `json:"title"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- DocumentURL string `json:"document_url"`
- MimeType string `json:"mime_type"`
- Description string `json:"description"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- ThumbURL string `json:"thumb_url"`
- ThumbWidth int `json:"thumb_width"`
- ThumbHeight int `json:"thumb_height"`
- }
- // 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.
- type InlineQueryResultLocation struct {
- Type string `json:"type"`
- ID string `json:"id"`
- Latitude float64 `json:"latitude"`
- Longitude float64 `json:"longitude"`
- Title string `json:"title"`
- LivePeriod int `json:"live_period"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- ThumbURL string `json:"thumb_url"`
- ThumbWidth int `json:"thumb_width"`
- ThumbHeight int `json:"thumb_height"`
- }
- // 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.
- type InlineQueryResultVenue struct {
- Type string `json:"type"`
- ID string `json:"id"`
- Latitude float64 `json:"latitude"`
- Longitude float64 `json:"longitude"`
- Title string `json:"title"`
- Address string `json:"address"`
- FoursquareID string `json:"foursquare_id"`
- FoursquareType string `json:"foursquare_type"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- ThumbURL string `json:"thumb_url"`
- ThumbWidth int `json:"thumb_width"`
- ThumbHeight int `json:"thumb_height"`
- }
- // 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.
- type InlineQueryResultContact struct {
- Type string `json:"type"`
- ID string `json:"id"`
- PhoneNumber string `json:"phone_number"`
- FirstName string `json:"first_name"`
- LastName string `json:"last_name"`
- Vcard string `json:"vcard"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- ThumbURL string `json:"thumb_url"`
- ThumbWidth int `json:"thumb_width"`
- ThumbHeight int `json:"thumb_height"`
- }
- // InlineQueryResultGame - Represents a Game.
- type InlineQueryResultGame struct {
- Type string `json:"type"`
- ID string `json:"id"`
- GameShortName string `json:"game_short_name"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // 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.
- type InlineQueryResultCachedPhoto struct {
- Type string `json:"type"`
- ID string `json:"id"`
- PhotoFileID string `json:"photo_file_id"`
- Title string `json:"title"`
- Description string `json:"description"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultCachedGif struct {
- Type string `json:"type"`
- ID string `json:"id"`
- GifFileID string `json:"gif_file_id"`
- Title string `json:"title"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultCachedMpeg4Gif struct {
- Type string `json:"type"`
- ID string `json:"id"`
- Mpeg4FileID string `json:"mpeg4_file_id"`
- Title string `json:"title"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultCachedSticker struct {
- Type string `json:"type"`
- ID string `json:"id"`
- StickerFileID string `json:"sticker_file_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultCachedDocument struct {
- Type string `json:"type"`
- ID string `json:"id"`
- Title string `json:"title"`
- DocumentFileID string `json:"document_file_id"`
- Description string `json:"description"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultCachedVideo struct {
- Type string `json:"type"`
- ID string `json:"id"`
- VideoFileID string `json:"video_file_id"`
- Title string `json:"title"`
- Description string `json:"description"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultCachedVoice struct {
- Type string `json:"type"`
- ID string `json:"id"`
- VoiceFileID string `json:"voice_file_id"`
- Title string `json:"title"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // 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.
- type InlineQueryResultCachedAudio struct {
- Type string `json:"type"`
- ID string `json:"id"`
- AudioFileID string `json:"audio_file_id"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- InputMessageContent *InputMessageContent `json:"input_message_content"`
- }
- // InputTextMessageContent - Represents the content of a text message to be sent as the result of an inline query.
- type InputTextMessageContent struct {
- MessageText string `json:"message_text"`
- ParseMode string `json:"parse_mode"`
- DisableWebPagePreview bool `json:"disable_web_page_preview"`
- }
- // InputLocationMessageContent - Represents the content of a location message to be sent as the result of an inline query.
- type InputLocationMessageContent struct {
- Latitude float64 `json:"latitude"`
- Longitude float64 `json:"longitude"`
- LivePeriod int `json:"live_period"`
- }
- // InputVenueMessageContent - Represents the content of a venue message to be sent as the result of an inline query.
- type InputVenueMessageContent struct {
- Latitude float64 `json:"latitude"`
- Longitude float64 `json:"longitude"`
- Title string `json:"title"`
- Address string `json:"address"`
- FoursquareID string `json:"foursquare_id"`
- FoursquareType string `json:"foursquare_type"`
- }
- // InputContactMessageContent - Represents the content of a contact message to be sent as the result of an inline query.
- type InputContactMessageContent struct {
- PhoneNumber string `json:"phone_number"`
- FirstName string `json:"first_name"`
- LastName string `json:"last_name"`
- Vcard string `json:"vcard"`
- }
- // ChosenInlineResult - Represents a result of an inline query that was chosen by the user and sent to their chat partner.
- type ChosenInlineResult struct {
- ResultID string `json:"result_id"`
- From *User `json:"from"`
- Location *Location `json:"location"`
- InlineMessageID string `json:"inline_message_id"`
- Query string `json:"query"`
- }
- // LabeledPrice - This object represents a portion of the price for goods or services.
- type LabeledPrice struct {
- Label string `json:"label"`
- Amount int `json:"amount"`
- }
- // Invoice - This object contains basic information about an invoice.
- type Invoice struct {
- Title string `json:"title"`
- Description string `json:"description"`
- StartParameter string `json:"start_parameter"`
- Currency string `json:"currency"`
- TotalAmount int `json:"total_amount"`
- }
- // ShippingAddress - This object represents a shipping address.
- type ShippingAddress struct {
- CountryCode string `json:"country_code"`
- State string `json:"state"`
- City string `json:"city"`
- StreetLine1 string `json:"street_line1"`
- StreetLine2 string `json:"street_line2"`
- PostCode string `json:"post_code"`
- }
- // OrderInfo - This object represents information about an order.
- type OrderInfo struct {
- Name string `json:"name"`
- PhoneNumber string `json:"phone_number"`
- Email string `json:"email"`
- ShippingAddress *ShippingAddress `json:"shipping_address"`
- }
- // ShippingOption - This object represents one shipping option.
- type ShippingOption struct {
- ID string `json:"id"`
- Title string `json:"title"`
- Prices []*LabeledPrice `json:"prices"`
- }
- // SuccessfulPayment - This object contains basic information about a successful payment.
- type SuccessfulPayment struct {
- Currency string `json:"currency"`
- TotalAmount int `json:"total_amount"`
- InvoicePayload string `json:"invoice_payload"`
- ShippingOptionID string `json:"shipping_option_id"`
- OrderInfo *OrderInfo `json:"order_info"`
- TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
- ProviderPaymentChargeID string `json:"provider_payment_charge_id"`
- }
- // ShippingQuery - This object contains information about an incoming shipping query.
- type ShippingQuery struct {
- ID string `json:"id"`
- From *User `json:"from"`
- InvoicePayload string `json:"invoice_payload"`
- ShippingAddress *ShippingAddress `json:"shipping_address"`
- }
- // PreCheckoutQuery - This object contains information about an incoming pre-checkout query.
- type PreCheckoutQuery struct {
- ID string `json:"id"`
- From *User `json:"from"`
- Currency string `json:"currency"`
- TotalAmount int `json:"total_amount"`
- InvoicePayload string `json:"invoice_payload"`
- ShippingOptionID string `json:"shipping_option_id"`
- OrderInfo *OrderInfo `json:"order_info"`
- }
- // PassportData - Contains information about Telegram Passport data shared with the bot by the user.
- type PassportData struct {
- Data []*EncryptedPassportElement `json:"data"`
- Credentials *EncryptedCredentials `json:"credentials"`
- }
- // 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.
- type PassportFile struct {
- FileID string `json:"file_id"`
- FileUniqueID string `json:"file_unique_id"`
- FileSize int `json:"file_size"`
- FileDate int `json:"file_date"`
- }
- // EncryptedPassportElement - Contains information about documents or other Telegram Passport elements shared with the bot by the user.
- type EncryptedPassportElement struct {
- Type string `json:"type"`
- Data string `json:"data"`
- PhoneNumber string `json:"phone_number"`
- Email string `json:"email"`
- Files []*PassportFile `json:"files"`
- FrontSide *PassportFile `json:"front_side"`
- ReverseSide *PassportFile `json:"reverse_side"`
- Selfie *PassportFile `json:"selfie"`
- Translation []*PassportFile `json:"translation"`
- Hash string `json:"hash"`
- }
- // 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.
- type EncryptedCredentials struct {
- Data string `json:"data"`
- Hash string `json:"hash"`
- Secret string `json:"secret"`
- }
- // 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.
- type PassportElementErrorDataField struct {
- Source string `json:"source"`
- Type string `json:"type"`
- FieldName string `json:"field_name"`
- DataHash string `json:"data_hash"`
- Message string `json:"message"`
- }
- // 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.
- type PassportElementErrorFrontSide struct {
- Source string `json:"source"`
- Type string `json:"type"`
- FileHash string `json:"file_hash"`
- Message string `json:"message"`
- }
- // 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.
- type PassportElementErrorReverseSide struct {
- Source string `json:"source"`
- Type string `json:"type"`
- FileHash string `json:"file_hash"`
- Message string `json:"message"`
- }
- // PassportElementErrorSelfie - Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
- type PassportElementErrorSelfie struct {
- Source string `json:"source"`
- Type string `json:"type"`
- FileHash string `json:"file_hash"`
- Message string `json:"message"`
- }
- // PassportElementErrorFile - Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
- type PassportElementErrorFile struct {
- Source string `json:"source"`
- Type string `json:"type"`
- FileHash string `json:"file_hash"`
- Message string `json:"message"`
- }
- // PassportElementErrorFiles - Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
- type PassportElementErrorFiles struct {
- Source string `json:"source"`
- Type string `json:"type"`
- FileHashes []string `json:"file_hashes"`
- Message string `json:"message"`
- }
- // 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.
- type PassportElementErrorTranslationFile struct {
- Source string `json:"source"`
- Type string `json:"type"`
- FileHash string `json:"file_hash"`
- Message string `json:"message"`
- }
- // PassportElementErrorTranslationFiles - Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
- type PassportElementErrorTranslationFiles struct {
- Source string `json:"source"`
- Type string `json:"type"`
- FileHashes []string `json:"file_hashes"`
- Message string `json:"message"`
- }
- // PassportElementErrorUnspecified - Represents an issue in an unspecified place. The error is considered resolved when new data is added.
- type PassportElementErrorUnspecified struct {
- Source string `json:"source"`
- Type string `json:"type"`
- ElementHash string `json:"element_hash"`
- Message string `json:"message"`
- }
- // Game - This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
- type Game struct {
- Title string `json:"title"`
- Description string `json:"description"`
- Photo []*PhotoSize `json:"photo"`
- Text string `json:"text"`
- TextEntities []*MessageEntity `json:"text_entities"`
- Animation *Animation `json:"animation"`
- }
- // CallbackGame - A placeholder, currently holds no information. Use BotFather to set up your game.
- type CallbackGame struct {
- }
- // GameHighScore - This object represents one row of the high scores table for a game.
- type GameHighScore struct {
- Position int `json:"position"`
- User *User `json:"user"`
- Score int `json:"score"`
- }
- // Client represents telegram bot client
- type Client interface {
- Request(string, interface{}, interface{})
- }
- // GetUpdatesMethod - bla-bla
- type GetUpdatesMethod struct {
- Offset int `json:"offset"`
- Limit int `json:"limit"`
- Timeout int `json:"timeout"`
- AllowedUpdates []string `json:"allowed_updates"`
- }
- // GetUpdates creates new Telegram Bot API method getUpdates
- func GetUpdates() *GetUpdatesMethod {
- return &GetUpdatesMethod{}
- }
- // SetOffset - bla-bla
- func (b *GetUpdatesMethod) SetOffset(value int) *GetUpdatesMethod {
- b.Offset = value
- return b
- }
- // SetLimit - bla-bla
- func (b *GetUpdatesMethod) SetLimit(value int) *GetUpdatesMethod {
- b.Limit = value
- return b
- }
- // SetTimeout - bla-bla
- func (b *GetUpdatesMethod) SetTimeout(value int) *GetUpdatesMethod {
- b.Timeout = value
- return b
- }
- // SetAllowedUpdates - bla-bla
- func (b *GetUpdatesMethod) SetAllowedUpdates(value []string) *GetUpdatesMethod {
- b.AllowedUpdates = value
- return b
- }
- // SetWebhookMethod - bla-bla
- type SetWebhookMethod struct {
- URL string `json:"url"`
- Certificate *InputFile `json:"certificate"`
- MaxConnections int `json:"max_connections"`
- AllowedUpdates []string `json:"allowed_updates"`
- }
- // SetWebhook creates new Telegram Bot API method setWebhook
- func SetWebhook(uRL string) *SetWebhookMethod {
- return &SetWebhookMethod{
- URL: uRL,
- }
- }
- // SetURL - bla-bla
- func (b *SetWebhookMethod) SetURL(value string) *SetWebhookMethod {
- b.URL = value
- return b
- }
- // SetCertificate - bla-bla
- func (b *SetWebhookMethod) SetCertificate(value *InputFile) *SetWebhookMethod {
- b.Certificate = value
- return b
- }
- // SetMaxConnections - bla-bla
- func (b *SetWebhookMethod) SetMaxConnections(value int) *SetWebhookMethod {
- b.MaxConnections = value
- return b
- }
- // SetAllowedUpdates - bla-bla
- func (b *SetWebhookMethod) SetAllowedUpdates(value []string) *SetWebhookMethod {
- b.AllowedUpdates = value
- return b
- }
- // DeleteWebhookMethod - bla-bla
- type DeleteWebhookMethod struct {
- }
- // DeleteWebhook creates new Telegram Bot API method deleteWebhook
- func DeleteWebhook() *DeleteWebhookMethod {
- return &DeleteWebhookMethod{}
- }
- // GetWebhookInfoMethod - bla-bla
- type GetWebhookInfoMethod struct {
- }
- // GetWebhookInfo creates new Telegram Bot API method getWebhookInfo
- func GetWebhookInfo() *GetWebhookInfoMethod {
- return &GetWebhookInfoMethod{}
- }
- // GetMeMethod - bla-bla
- type GetMeMethod struct {
- }
- // GetMe creates new Telegram Bot API method getMe
- func GetMe() *GetMeMethod {
- return &GetMeMethod{}
- }
- // SendMessageMethod - bla-bla
- type SendMessageMethod struct {
- ChatID ChatID `json:"chat_id"`
- Text string `json:"text"`
- ParseMode string `json:"parse_mode"`
- DisableWebPagePreview bool `json:"disable_web_page_preview"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendMessage creates new Telegram Bot API method sendMessage
- func SendMessage(chatID ChatID, text string) *SendMessageMethod {
- return &SendMessageMethod{
- ChatID: chatID,
- Text: text,
- }
- }
- // SetChatID - bla-bla
- func (b *SendMessageMethod) SetChatID(value ChatID) *SendMessageMethod {
- b.ChatID = value
- return b
- }
- // SetText - bla-bla
- func (b *SendMessageMethod) SetText(value string) *SendMessageMethod {
- b.Text = value
- return b
- }
- // SetParseMode - bla-bla
- func (b *SendMessageMethod) SetParseMode(value string) *SendMessageMethod {
- b.ParseMode = value
- return b
- }
- // SetDisableWebPagePreview - bla-bla
- func (b *SendMessageMethod) SetDisableWebPagePreview(value bool) *SendMessageMethod {
- b.DisableWebPagePreview = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendMessageMethod) SetDisableNotification(value bool) *SendMessageMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendMessageMethod) SetReplyToMessageID(value int) *SendMessageMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendMessageMethod) SetReplyMarkup(value *ReplyMarkup) *SendMessageMethod {
- b.ReplyMarkup = value
- return b
- }
- // ForwardMessageMethod - bla-bla
- type ForwardMessageMethod struct {
- ChatID ChatID `json:"chat_id"`
- FromChatID ChatID `json:"from_chat_id"`
- DisableNotification bool `json:"disable_notification"`
- MessageID int `json:"message_id"`
- }
- // ForwardMessage creates new Telegram Bot API method forwardMessage
- func ForwardMessage(chatID ChatID, fromChatID ChatID, messageID int) *ForwardMessageMethod {
- return &ForwardMessageMethod{
- ChatID: chatID,
- FromChatID: fromChatID,
- MessageID: messageID,
- }
- }
- // SetChatID - bla-bla
- func (b *ForwardMessageMethod) SetChatID(value ChatID) *ForwardMessageMethod {
- b.ChatID = value
- return b
- }
- // SetFromChatID - bla-bla
- func (b *ForwardMessageMethod) SetFromChatID(value ChatID) *ForwardMessageMethod {
- b.FromChatID = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *ForwardMessageMethod) SetDisableNotification(value bool) *ForwardMessageMethod {
- b.DisableNotification = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *ForwardMessageMethod) SetMessageID(value int) *ForwardMessageMethod {
- b.MessageID = value
- return b
- }
- // SendPhotoMethod - bla-bla
- type SendPhotoMethod struct {
- ChatID ChatID `json:"chat_id"`
- Photo *InputFile `json:"photo"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendPhoto creates new Telegram Bot API method sendPhoto
- func SendPhoto(chatID ChatID, photo *InputFile) *SendPhotoMethod {
- return &SendPhotoMethod{
- ChatID: chatID,
- Photo: photo,
- }
- }
- // SetChatID - bla-bla
- func (b *SendPhotoMethod) SetChatID(value ChatID) *SendPhotoMethod {
- b.ChatID = value
- return b
- }
- // SetPhoto - bla-bla
- func (b *SendPhotoMethod) SetPhoto(value *InputFile) *SendPhotoMethod {
- b.Photo = value
- return b
- }
- // SetCaption - bla-bla
- func (b *SendPhotoMethod) SetCaption(value string) *SendPhotoMethod {
- b.Caption = value
- return b
- }
- // SetParseMode - bla-bla
- func (b *SendPhotoMethod) SetParseMode(value string) *SendPhotoMethod {
- b.ParseMode = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendPhotoMethod) SetDisableNotification(value bool) *SendPhotoMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendPhotoMethod) SetReplyToMessageID(value int) *SendPhotoMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendPhotoMethod) SetReplyMarkup(value *ReplyMarkup) *SendPhotoMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendAudioMethod - bla-bla
- type SendAudioMethod struct {
- ChatID ChatID `json:"chat_id"`
- Audio *InputFile `json:"audio"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- Duration int `json:"duration"`
- Performer string `json:"performer"`
- Title string `json:"title"`
- Thumb *InputFile `json:"thumb"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendAudio creates new Telegram Bot API method sendAudio
- func SendAudio(chatID ChatID, audio *InputFile) *SendAudioMethod {
- return &SendAudioMethod{
- ChatID: chatID,
- Audio: audio,
- }
- }
- // SetChatID - bla-bla
- func (b *SendAudioMethod) SetChatID(value ChatID) *SendAudioMethod {
- b.ChatID = value
- return b
- }
- // SetAudio - bla-bla
- func (b *SendAudioMethod) SetAudio(value *InputFile) *SendAudioMethod {
- b.Audio = value
- return b
- }
- // SetCaption - bla-bla
- func (b *SendAudioMethod) SetCaption(value string) *SendAudioMethod {
- b.Caption = value
- return b
- }
- // SetParseMode - bla-bla
- func (b *SendAudioMethod) SetParseMode(value string) *SendAudioMethod {
- b.ParseMode = value
- return b
- }
- // SetDuration - bla-bla
- func (b *SendAudioMethod) SetDuration(value int) *SendAudioMethod {
- b.Duration = value
- return b
- }
- // SetPerformer - bla-bla
- func (b *SendAudioMethod) SetPerformer(value string) *SendAudioMethod {
- b.Performer = value
- return b
- }
- // SetTitle - bla-bla
- func (b *SendAudioMethod) SetTitle(value string) *SendAudioMethod {
- b.Title = value
- return b
- }
- // SetThumb - bla-bla
- func (b *SendAudioMethod) SetThumb(value *InputFile) *SendAudioMethod {
- b.Thumb = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendAudioMethod) SetDisableNotification(value bool) *SendAudioMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendAudioMethod) SetReplyToMessageID(value int) *SendAudioMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendAudioMethod) SetReplyMarkup(value *ReplyMarkup) *SendAudioMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendDocumentMethod - bla-bla
- type SendDocumentMethod struct {
- ChatID ChatID `json:"chat_id"`
- Document *InputFile `json:"document"`
- Thumb *InputFile `json:"thumb"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendDocument creates new Telegram Bot API method sendDocument
- func SendDocument(chatID ChatID, document *InputFile) *SendDocumentMethod {
- return &SendDocumentMethod{
- ChatID: chatID,
- Document: document,
- }
- }
- // SetChatID - bla-bla
- func (b *SendDocumentMethod) SetChatID(value ChatID) *SendDocumentMethod {
- b.ChatID = value
- return b
- }
- // SetDocument - bla-bla
- func (b *SendDocumentMethod) SetDocument(value *InputFile) *SendDocumentMethod {
- b.Document = value
- return b
- }
- // SetThumb - bla-bla
- func (b *SendDocumentMethod) SetThumb(value *InputFile) *SendDocumentMethod {
- b.Thumb = value
- return b
- }
- // SetCaption - bla-bla
- func (b *SendDocumentMethod) SetCaption(value string) *SendDocumentMethod {
- b.Caption = value
- return b
- }
- // SetParseMode - bla-bla
- func (b *SendDocumentMethod) SetParseMode(value string) *SendDocumentMethod {
- b.ParseMode = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendDocumentMethod) SetDisableNotification(value bool) *SendDocumentMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendDocumentMethod) SetReplyToMessageID(value int) *SendDocumentMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendDocumentMethod) SetReplyMarkup(value *ReplyMarkup) *SendDocumentMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendVideoMethod - bla-bla
- type SendVideoMethod struct {
- ChatID ChatID `json:"chat_id"`
- Video *InputFile `json:"video"`
- Duration int `json:"duration"`
- Width int `json:"width"`
- Height int `json:"height"`
- Thumb *InputFile `json:"thumb"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- SupportsStreaming bool `json:"supports_streaming"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendVideo creates new Telegram Bot API method sendVideo
- func SendVideo(chatID ChatID, video *InputFile) *SendVideoMethod {
- return &SendVideoMethod{
- ChatID: chatID,
- Video: video,
- }
- }
- // SetChatID - bla-bla
- func (b *SendVideoMethod) SetChatID(value ChatID) *SendVideoMethod {
- b.ChatID = value
- return b
- }
- // SetVideo - bla-bla
- func (b *SendVideoMethod) SetVideo(value *InputFile) *SendVideoMethod {
- b.Video = value
- return b
- }
- // SetDuration - bla-bla
- func (b *SendVideoMethod) SetDuration(value int) *SendVideoMethod {
- b.Duration = value
- return b
- }
- // SetWidth - bla-bla
- func (b *SendVideoMethod) SetWidth(value int) *SendVideoMethod {
- b.Width = value
- return b
- }
- // SetHeight - bla-bla
- func (b *SendVideoMethod) SetHeight(value int) *SendVideoMethod {
- b.Height = value
- return b
- }
- // SetThumb - bla-bla
- func (b *SendVideoMethod) SetThumb(value *InputFile) *SendVideoMethod {
- b.Thumb = value
- return b
- }
- // SetCaption - bla-bla
- func (b *SendVideoMethod) SetCaption(value string) *SendVideoMethod {
- b.Caption = value
- return b
- }
- // SetParseMode - bla-bla
- func (b *SendVideoMethod) SetParseMode(value string) *SendVideoMethod {
- b.ParseMode = value
- return b
- }
- // SetSupportsStreaming - bla-bla
- func (b *SendVideoMethod) SetSupportsStreaming(value bool) *SendVideoMethod {
- b.SupportsStreaming = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendVideoMethod) SetDisableNotification(value bool) *SendVideoMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendVideoMethod) SetReplyToMessageID(value int) *SendVideoMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendVideoMethod) SetReplyMarkup(value *ReplyMarkup) *SendVideoMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendAnimationMethod - bla-bla
- type SendAnimationMethod struct {
- ChatID ChatID `json:"chat_id"`
- Animation *InputFile `json:"animation"`
- Duration int `json:"duration"`
- Width int `json:"width"`
- Height int `json:"height"`
- Thumb *InputFile `json:"thumb"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendAnimation creates new Telegram Bot API method sendAnimation
- func SendAnimation(chatID ChatID, animation *InputFile) *SendAnimationMethod {
- return &SendAnimationMethod{
- ChatID: chatID,
- Animation: animation,
- }
- }
- // SetChatID - bla-bla
- func (b *SendAnimationMethod) SetChatID(value ChatID) *SendAnimationMethod {
- b.ChatID = value
- return b
- }
- // SetAnimation - bla-bla
- func (b *SendAnimationMethod) SetAnimation(value *InputFile) *SendAnimationMethod {
- b.Animation = value
- return b
- }
- // SetDuration - bla-bla
- func (b *SendAnimationMethod) SetDuration(value int) *SendAnimationMethod {
- b.Duration = value
- return b
- }
- // SetWidth - bla-bla
- func (b *SendAnimationMethod) SetWidth(value int) *SendAnimationMethod {
- b.Width = value
- return b
- }
- // SetHeight - bla-bla
- func (b *SendAnimationMethod) SetHeight(value int) *SendAnimationMethod {
- b.Height = value
- return b
- }
- // SetThumb - bla-bla
- func (b *SendAnimationMethod) SetThumb(value *InputFile) *SendAnimationMethod {
- b.Thumb = value
- return b
- }
- // SetCaption - bla-bla
- func (b *SendAnimationMethod) SetCaption(value string) *SendAnimationMethod {
- b.Caption = value
- return b
- }
- // SetParseMode - bla-bla
- func (b *SendAnimationMethod) SetParseMode(value string) *SendAnimationMethod {
- b.ParseMode = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendAnimationMethod) SetDisableNotification(value bool) *SendAnimationMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendAnimationMethod) SetReplyToMessageID(value int) *SendAnimationMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendAnimationMethod) SetReplyMarkup(value *ReplyMarkup) *SendAnimationMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendVoiceMethod - bla-bla
- type SendVoiceMethod struct {
- ChatID ChatID `json:"chat_id"`
- Voice *InputFile `json:"voice"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- Duration int `json:"duration"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendVoice creates new Telegram Bot API method sendVoice
- func SendVoice(chatID ChatID, voice *InputFile) *SendVoiceMethod {
- return &SendVoiceMethod{
- ChatID: chatID,
- Voice: voice,
- }
- }
- // SetChatID - bla-bla
- func (b *SendVoiceMethod) SetChatID(value ChatID) *SendVoiceMethod {
- b.ChatID = value
- return b
- }
- // SetVoice - bla-bla
- func (b *SendVoiceMethod) SetVoice(value *InputFile) *SendVoiceMethod {
- b.Voice = value
- return b
- }
- // SetCaption - bla-bla
- func (b *SendVoiceMethod) SetCaption(value string) *SendVoiceMethod {
- b.Caption = value
- return b
- }
- // SetParseMode - bla-bla
- func (b *SendVoiceMethod) SetParseMode(value string) *SendVoiceMethod {
- b.ParseMode = value
- return b
- }
- // SetDuration - bla-bla
- func (b *SendVoiceMethod) SetDuration(value int) *SendVoiceMethod {
- b.Duration = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendVoiceMethod) SetDisableNotification(value bool) *SendVoiceMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendVoiceMethod) SetReplyToMessageID(value int) *SendVoiceMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendVoiceMethod) SetReplyMarkup(value *ReplyMarkup) *SendVoiceMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendVideoNoteMethod - bla-bla
- type SendVideoNoteMethod struct {
- ChatID ChatID `json:"chat_id"`
- VideoNote *InputFile `json:"video_note"`
- Duration int `json:"duration"`
- Length int `json:"length"`
- Thumb *InputFile `json:"thumb"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendVideoNote creates new Telegram Bot API method sendVideoNote
- func SendVideoNote(chatID ChatID, videoNote *InputFile) *SendVideoNoteMethod {
- return &SendVideoNoteMethod{
- ChatID: chatID,
- VideoNote: videoNote,
- }
- }
- // SetChatID - bla-bla
- func (b *SendVideoNoteMethod) SetChatID(value ChatID) *SendVideoNoteMethod {
- b.ChatID = value
- return b
- }
- // SetVideoNote - bla-bla
- func (b *SendVideoNoteMethod) SetVideoNote(value *InputFile) *SendVideoNoteMethod {
- b.VideoNote = value
- return b
- }
- // SetDuration - bla-bla
- func (b *SendVideoNoteMethod) SetDuration(value int) *SendVideoNoteMethod {
- b.Duration = value
- return b
- }
- // SetLength - bla-bla
- func (b *SendVideoNoteMethod) SetLength(value int) *SendVideoNoteMethod {
- b.Length = value
- return b
- }
- // SetThumb - bla-bla
- func (b *SendVideoNoteMethod) SetThumb(value *InputFile) *SendVideoNoteMethod {
- b.Thumb = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendVideoNoteMethod) SetDisableNotification(value bool) *SendVideoNoteMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendVideoNoteMethod) SetReplyToMessageID(value int) *SendVideoNoteMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendVideoNoteMethod) SetReplyMarkup(value *ReplyMarkup) *SendVideoNoteMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendMediaGroupMethod - bla-bla
- type SendMediaGroupMethod struct {
- ChatID ChatID `json:"chat_id"`
- Media InputMedia `json:"media"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- }
- // SendMediaGroup creates new Telegram Bot API method sendMediaGroup
- func SendMediaGroup(chatID ChatID, media InputMedia) *SendMediaGroupMethod {
- return &SendMediaGroupMethod{
- ChatID: chatID,
- Media: media,
- }
- }
- // SetChatID - bla-bla
- func (b *SendMediaGroupMethod) SetChatID(value ChatID) *SendMediaGroupMethod {
- b.ChatID = value
- return b
- }
- // SetMedia - bla-bla
- func (b *SendMediaGroupMethod) SetMedia(value InputMedia) *SendMediaGroupMethod {
- b.Media = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendMediaGroupMethod) SetDisableNotification(value bool) *SendMediaGroupMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendMediaGroupMethod) SetReplyToMessageID(value int) *SendMediaGroupMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SendLocationMethod - bla-bla
- type SendLocationMethod struct {
- ChatID ChatID `json:"chat_id"`
- Latitude float64 `json:"latitude"`
- Longitude float64 `json:"longitude"`
- LivePeriod int `json:"live_period"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendLocation creates new Telegram Bot API method sendLocation
- func SendLocation(chatID ChatID, latitude float64, longitude float64) *SendLocationMethod {
- return &SendLocationMethod{
- ChatID: chatID,
- Latitude: latitude,
- Longitude: longitude,
- }
- }
- // SetChatID - bla-bla
- func (b *SendLocationMethod) SetChatID(value ChatID) *SendLocationMethod {
- b.ChatID = value
- return b
- }
- // SetLatitude - bla-bla
- func (b *SendLocationMethod) SetLatitude(value float64) *SendLocationMethod {
- b.Latitude = value
- return b
- }
- // SetLongitude - bla-bla
- func (b *SendLocationMethod) SetLongitude(value float64) *SendLocationMethod {
- b.Longitude = value
- return b
- }
- // SetLivePeriod - bla-bla
- func (b *SendLocationMethod) SetLivePeriod(value int) *SendLocationMethod {
- b.LivePeriod = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendLocationMethod) SetDisableNotification(value bool) *SendLocationMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendLocationMethod) SetReplyToMessageID(value int) *SendLocationMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendLocationMethod) SetReplyMarkup(value *ReplyMarkup) *SendLocationMethod {
- b.ReplyMarkup = value
- return b
- }
- // EditMessageLiveLocationMethod - bla-bla
- type EditMessageLiveLocationMethod struct {
- ChatID ChatID `json:"chat_id"`
- MessageID int `json:"message_id"`
- InlineMessageID string `json:"inline_message_id"`
- Latitude float64 `json:"latitude"`
- Longitude float64 `json:"longitude"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // EditMessageLiveLocation creates new Telegram Bot API method editMessageLiveLocation
- func EditMessageLiveLocation(latitude float64, longitude float64) *EditMessageLiveLocationMethod {
- return &EditMessageLiveLocationMethod{
- Latitude: latitude,
- Longitude: longitude,
- }
- }
- // SetChatID - bla-bla
- func (b *EditMessageLiveLocationMethod) SetChatID(value ChatID) *EditMessageLiveLocationMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *EditMessageLiveLocationMethod) SetMessageID(value int) *EditMessageLiveLocationMethod {
- b.MessageID = value
- return b
- }
- // SetInlineMessageID - bla-bla
- func (b *EditMessageLiveLocationMethod) SetInlineMessageID(value string) *EditMessageLiveLocationMethod {
- b.InlineMessageID = value
- return b
- }
- // SetLatitude - bla-bla
- func (b *EditMessageLiveLocationMethod) SetLatitude(value float64) *EditMessageLiveLocationMethod {
- b.Latitude = value
- return b
- }
- // SetLongitude - bla-bla
- func (b *EditMessageLiveLocationMethod) SetLongitude(value float64) *EditMessageLiveLocationMethod {
- b.Longitude = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *EditMessageLiveLocationMethod) SetReplyMarkup(value *ReplyMarkup) *EditMessageLiveLocationMethod {
- b.ReplyMarkup = value
- return b
- }
- // StopMessageLiveLocationMethod - bla-bla
- type StopMessageLiveLocationMethod struct {
- ChatID ChatID `json:"chat_id"`
- MessageID int `json:"message_id"`
- InlineMessageID string `json:"inline_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // StopMessageLiveLocation creates new Telegram Bot API method stopMessageLiveLocation
- func StopMessageLiveLocation() *StopMessageLiveLocationMethod {
- return &StopMessageLiveLocationMethod{}
- }
- // SetChatID - bla-bla
- func (b *StopMessageLiveLocationMethod) SetChatID(value ChatID) *StopMessageLiveLocationMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *StopMessageLiveLocationMethod) SetMessageID(value int) *StopMessageLiveLocationMethod {
- b.MessageID = value
- return b
- }
- // SetInlineMessageID - bla-bla
- func (b *StopMessageLiveLocationMethod) SetInlineMessageID(value string) *StopMessageLiveLocationMethod {
- b.InlineMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *StopMessageLiveLocationMethod) SetReplyMarkup(value *ReplyMarkup) *StopMessageLiveLocationMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendVenueMethod - bla-bla
- type SendVenueMethod struct {
- ChatID ChatID `json:"chat_id"`
- Latitude float64 `json:"latitude"`
- Longitude float64 `json:"longitude"`
- Title string `json:"title"`
- Address string `json:"address"`
- FoursquareID string `json:"foursquare_id"`
- FoursquareType string `json:"foursquare_type"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendVenue creates new Telegram Bot API method sendVenue
- func SendVenue(chatID ChatID, latitude float64, longitude float64, title string, address string) *SendVenueMethod {
- return &SendVenueMethod{
- ChatID: chatID,
- Latitude: latitude,
- Longitude: longitude,
- Title: title,
- Address: address,
- }
- }
- // SetChatID - bla-bla
- func (b *SendVenueMethod) SetChatID(value ChatID) *SendVenueMethod {
- b.ChatID = value
- return b
- }
- // SetLatitude - bla-bla
- func (b *SendVenueMethod) SetLatitude(value float64) *SendVenueMethod {
- b.Latitude = value
- return b
- }
- // SetLongitude - bla-bla
- func (b *SendVenueMethod) SetLongitude(value float64) *SendVenueMethod {
- b.Longitude = value
- return b
- }
- // SetTitle - bla-bla
- func (b *SendVenueMethod) SetTitle(value string) *SendVenueMethod {
- b.Title = value
- return b
- }
- // SetAddress - bla-bla
- func (b *SendVenueMethod) SetAddress(value string) *SendVenueMethod {
- b.Address = value
- return b
- }
- // SetFoursquareID - bla-bla
- func (b *SendVenueMethod) SetFoursquareID(value string) *SendVenueMethod {
- b.FoursquareID = value
- return b
- }
- // SetFoursquareType - bla-bla
- func (b *SendVenueMethod) SetFoursquareType(value string) *SendVenueMethod {
- b.FoursquareType = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendVenueMethod) SetDisableNotification(value bool) *SendVenueMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendVenueMethod) SetReplyToMessageID(value int) *SendVenueMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendVenueMethod) SetReplyMarkup(value *ReplyMarkup) *SendVenueMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendContactMethod - bla-bla
- type SendContactMethod struct {
- ChatID ChatID `json:"chat_id"`
- PhoneNumber string `json:"phone_number"`
- FirstName string `json:"first_name"`
- LastName string `json:"last_name"`
- Vcard string `json:"vcard"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendContact creates new Telegram Bot API method sendContact
- func SendContact(chatID ChatID, phoneNumber string, firstName string) *SendContactMethod {
- return &SendContactMethod{
- ChatID: chatID,
- PhoneNumber: phoneNumber,
- FirstName: firstName,
- }
- }
- // SetChatID - bla-bla
- func (b *SendContactMethod) SetChatID(value ChatID) *SendContactMethod {
- b.ChatID = value
- return b
- }
- // SetPhoneNumber - bla-bla
- func (b *SendContactMethod) SetPhoneNumber(value string) *SendContactMethod {
- b.PhoneNumber = value
- return b
- }
- // SetFirstName - bla-bla
- func (b *SendContactMethod) SetFirstName(value string) *SendContactMethod {
- b.FirstName = value
- return b
- }
- // SetLastName - bla-bla
- func (b *SendContactMethod) SetLastName(value string) *SendContactMethod {
- b.LastName = value
- return b
- }
- // SetVcard - bla-bla
- func (b *SendContactMethod) SetVcard(value string) *SendContactMethod {
- b.Vcard = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendContactMethod) SetDisableNotification(value bool) *SendContactMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendContactMethod) SetReplyToMessageID(value int) *SendContactMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendContactMethod) SetReplyMarkup(value *ReplyMarkup) *SendContactMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendPollMethod - bla-bla
- type SendPollMethod struct {
- ChatID ChatID `json:"chat_id"`
- Question string `json:"question"`
- Options []string `json:"options"`
- IsAnonymous bool `json:"is_anonymous"`
- Type string `json:"type"`
- AllowsMultipleAnswers bool `json:"allows_multiple_answers"`
- CorrectOptionID int `json:"correct_option_id"`
- IsClosed bool `json:"is_closed"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendPoll creates new Telegram Bot API method sendPoll
- func SendPoll(chatID ChatID, question string, options []string) *SendPollMethod {
- return &SendPollMethod{
- ChatID: chatID,
- Question: question,
- Options: options,
- }
- }
- // SetChatID - bla-bla
- func (b *SendPollMethod) SetChatID(value ChatID) *SendPollMethod {
- b.ChatID = value
- return b
- }
- // SetQuestion - bla-bla
- func (b *SendPollMethod) SetQuestion(value string) *SendPollMethod {
- b.Question = value
- return b
- }
- // SetOptions - bla-bla
- func (b *SendPollMethod) SetOptions(value []string) *SendPollMethod {
- b.Options = value
- return b
- }
- // SetIsAnonymous - bla-bla
- func (b *SendPollMethod) SetIsAnonymous(value bool) *SendPollMethod {
- b.IsAnonymous = value
- return b
- }
- // SetType - bla-bla
- func (b *SendPollMethod) SetType(value string) *SendPollMethod {
- b.Type = value
- return b
- }
- // SetAllowsMultipleAnswers - bla-bla
- func (b *SendPollMethod) SetAllowsMultipleAnswers(value bool) *SendPollMethod {
- b.AllowsMultipleAnswers = value
- return b
- }
- // SetCorrectOptionID - bla-bla
- func (b *SendPollMethod) SetCorrectOptionID(value int) *SendPollMethod {
- b.CorrectOptionID = value
- return b
- }
- // SetIsClosed - bla-bla
- func (b *SendPollMethod) SetIsClosed(value bool) *SendPollMethod {
- b.IsClosed = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendPollMethod) SetDisableNotification(value bool) *SendPollMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendPollMethod) SetReplyToMessageID(value int) *SendPollMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendPollMethod) SetReplyMarkup(value *ReplyMarkup) *SendPollMethod {
- b.ReplyMarkup = value
- return b
- }
- // SendChatActionMethod - bla-bla
- type SendChatActionMethod struct {
- ChatID ChatID `json:"chat_id"`
- Action string `json:"action"`
- }
- // SendChatAction creates new Telegram Bot API method sendChatAction
- func SendChatAction(chatID ChatID, action string) *SendChatActionMethod {
- return &SendChatActionMethod{
- ChatID: chatID,
- Action: action,
- }
- }
- // SetChatID - bla-bla
- func (b *SendChatActionMethod) SetChatID(value ChatID) *SendChatActionMethod {
- b.ChatID = value
- return b
- }
- // SetAction - bla-bla
- func (b *SendChatActionMethod) SetAction(value string) *SendChatActionMethod {
- b.Action = value
- return b
- }
- // GetUserProfilePhotosMethod - bla-bla
- type GetUserProfilePhotosMethod struct {
- UserID int `json:"user_id"`
- Offset int `json:"offset"`
- Limit int `json:"limit"`
- }
- // GetUserProfilePhotos creates new Telegram Bot API method getUserProfilePhotos
- func GetUserProfilePhotos(userID int) *GetUserProfilePhotosMethod {
- return &GetUserProfilePhotosMethod{
- UserID: userID,
- }
- }
- // SetUserID - bla-bla
- func (b *GetUserProfilePhotosMethod) SetUserID(value int) *GetUserProfilePhotosMethod {
- b.UserID = value
- return b
- }
- // SetOffset - bla-bla
- func (b *GetUserProfilePhotosMethod) SetOffset(value int) *GetUserProfilePhotosMethod {
- b.Offset = value
- return b
- }
- // SetLimit - bla-bla
- func (b *GetUserProfilePhotosMethod) SetLimit(value int) *GetUserProfilePhotosMethod {
- b.Limit = value
- return b
- }
- // GetFileMethod - bla-bla
- type GetFileMethod struct {
- FileID string `json:"file_id"`
- }
- // GetFile creates new Telegram Bot API method getFile
- func GetFile(fileID string) *GetFileMethod {
- return &GetFileMethod{
- FileID: fileID,
- }
- }
- // SetFileID - bla-bla
- func (b *GetFileMethod) SetFileID(value string) *GetFileMethod {
- b.FileID = value
- return b
- }
- // KickChatMemberMethod - bla-bla
- type KickChatMemberMethod struct {
- ChatID ChatID `json:"chat_id"`
- UserID int `json:"user_id"`
- UntilDate int `json:"until_date"`
- }
- // KickChatMember creates new Telegram Bot API method kickChatMember
- func KickChatMember(chatID ChatID, userID int) *KickChatMemberMethod {
- return &KickChatMemberMethod{
- ChatID: chatID,
- UserID: userID,
- }
- }
- // SetChatID - bla-bla
- func (b *KickChatMemberMethod) SetChatID(value ChatID) *KickChatMemberMethod {
- b.ChatID = value
- return b
- }
- // SetUserID - bla-bla
- func (b *KickChatMemberMethod) SetUserID(value int) *KickChatMemberMethod {
- b.UserID = value
- return b
- }
- // SetUntilDate - bla-bla
- func (b *KickChatMemberMethod) SetUntilDate(value int) *KickChatMemberMethod {
- b.UntilDate = value
- return b
- }
- // UnbanChatMemberMethod - bla-bla
- type UnbanChatMemberMethod struct {
- ChatID ChatID `json:"chat_id"`
- UserID int `json:"user_id"`
- }
- // UnbanChatMember creates new Telegram Bot API method unbanChatMember
- func UnbanChatMember(chatID ChatID, userID int) *UnbanChatMemberMethod {
- return &UnbanChatMemberMethod{
- ChatID: chatID,
- UserID: userID,
- }
- }
- // SetChatID - bla-bla
- func (b *UnbanChatMemberMethod) SetChatID(value ChatID) *UnbanChatMemberMethod {
- b.ChatID = value
- return b
- }
- // SetUserID - bla-bla
- func (b *UnbanChatMemberMethod) SetUserID(value int) *UnbanChatMemberMethod {
- b.UserID = value
- return b
- }
- // RestrictChatMemberMethod - bla-bla
- type RestrictChatMemberMethod struct {
- ChatID ChatID `json:"chat_id"`
- UserID int `json:"user_id"`
- Permissions *ChatPermissions `json:"permissions"`
- UntilDate int `json:"until_date"`
- }
- // RestrictChatMember creates new Telegram Bot API method restrictChatMember
- func RestrictChatMember(chatID ChatID, userID int, permissions *ChatPermissions) *RestrictChatMemberMethod {
- return &RestrictChatMemberMethod{
- ChatID: chatID,
- UserID: userID,
- Permissions: permissions,
- }
- }
- // SetChatID - bla-bla
- func (b *RestrictChatMemberMethod) SetChatID(value ChatID) *RestrictChatMemberMethod {
- b.ChatID = value
- return b
- }
- // SetUserID - bla-bla
- func (b *RestrictChatMemberMethod) SetUserID(value int) *RestrictChatMemberMethod {
- b.UserID = value
- return b
- }
- // SetPermissions - bla-bla
- func (b *RestrictChatMemberMethod) SetPermissions(value *ChatPermissions) *RestrictChatMemberMethod {
- b.Permissions = value
- return b
- }
- // SetUntilDate - bla-bla
- func (b *RestrictChatMemberMethod) SetUntilDate(value int) *RestrictChatMemberMethod {
- b.UntilDate = value
- return b
- }
- // PromoteChatMemberMethod - bla-bla
- type PromoteChatMemberMethod struct {
- ChatID ChatID `json:"chat_id"`
- UserID int `json:"user_id"`
- CanChangeInfo bool `json:"can_change_info"`
- CanPostMessages bool `json:"can_post_messages"`
- CanEditMessages bool `json:"can_edit_messages"`
- CanDeleteMessages bool `json:"can_delete_messages"`
- CanInviteUsers bool `json:"can_invite_users"`
- CanRestrictMembers bool `json:"can_restrict_members"`
- CanPinMessages bool `json:"can_pin_messages"`
- CanPromoteMembers bool `json:"can_promote_members"`
- }
- // PromoteChatMember creates new Telegram Bot API method promoteChatMember
- func PromoteChatMember(chatID ChatID, userID int) *PromoteChatMemberMethod {
- return &PromoteChatMemberMethod{
- ChatID: chatID,
- UserID: userID,
- }
- }
- // SetChatID - bla-bla
- func (b *PromoteChatMemberMethod) SetChatID(value ChatID) *PromoteChatMemberMethod {
- b.ChatID = value
- return b
- }
- // SetUserID - bla-bla
- func (b *PromoteChatMemberMethod) SetUserID(value int) *PromoteChatMemberMethod {
- b.UserID = value
- return b
- }
- // SetCanChangeInfo - bla-bla
- func (b *PromoteChatMemberMethod) SetCanChangeInfo(value bool) *PromoteChatMemberMethod {
- b.CanChangeInfo = value
- return b
- }
- // SetCanPostMessages - bla-bla
- func (b *PromoteChatMemberMethod) SetCanPostMessages(value bool) *PromoteChatMemberMethod {
- b.CanPostMessages = value
- return b
- }
- // SetCanEditMessages - bla-bla
- func (b *PromoteChatMemberMethod) SetCanEditMessages(value bool) *PromoteChatMemberMethod {
- b.CanEditMessages = value
- return b
- }
- // SetCanDeleteMessages - bla-bla
- func (b *PromoteChatMemberMethod) SetCanDeleteMessages(value bool) *PromoteChatMemberMethod {
- b.CanDeleteMessages = value
- return b
- }
- // SetCanInviteUsers - bla-bla
- func (b *PromoteChatMemberMethod) SetCanInviteUsers(value bool) *PromoteChatMemberMethod {
- b.CanInviteUsers = value
- return b
- }
- // SetCanRestrictMembers - bla-bla
- func (b *PromoteChatMemberMethod) SetCanRestrictMembers(value bool) *PromoteChatMemberMethod {
- b.CanRestrictMembers = value
- return b
- }
- // SetCanPinMessages - bla-bla
- func (b *PromoteChatMemberMethod) SetCanPinMessages(value bool) *PromoteChatMemberMethod {
- b.CanPinMessages = value
- return b
- }
- // SetCanPromoteMembers - bla-bla
- func (b *PromoteChatMemberMethod) SetCanPromoteMembers(value bool) *PromoteChatMemberMethod {
- b.CanPromoteMembers = value
- return b
- }
- // SetChatAdministratorCustomTitleMethod - bla-bla
- type SetChatAdministratorCustomTitleMethod struct {
- ChatID ChatID `json:"chat_id"`
- UserID int `json:"user_id"`
- CustomTitle string `json:"custom_title"`
- }
- // SetChatAdministratorCustomTitle creates new Telegram Bot API method setChatAdministratorCustomTitle
- func SetChatAdministratorCustomTitle(chatID ChatID, userID int, customTitle string) *SetChatAdministratorCustomTitleMethod {
- return &SetChatAdministratorCustomTitleMethod{
- ChatID: chatID,
- UserID: userID,
- CustomTitle: customTitle,
- }
- }
- // SetChatID - bla-bla
- func (b *SetChatAdministratorCustomTitleMethod) SetChatID(value ChatID) *SetChatAdministratorCustomTitleMethod {
- b.ChatID = value
- return b
- }
- // SetUserID - bla-bla
- func (b *SetChatAdministratorCustomTitleMethod) SetUserID(value int) *SetChatAdministratorCustomTitleMethod {
- b.UserID = value
- return b
- }
- // SetCustomTitle - bla-bla
- func (b *SetChatAdministratorCustomTitleMethod) SetCustomTitle(value string) *SetChatAdministratorCustomTitleMethod {
- b.CustomTitle = value
- return b
- }
- // SetChatPermissionsMethod - bla-bla
- type SetChatPermissionsMethod struct {
- ChatID ChatID `json:"chat_id"`
- Permissions *ChatPermissions `json:"permissions"`
- }
- // SetChatPermissions creates new Telegram Bot API method setChatPermissions
- func SetChatPermissions(chatID ChatID, permissions *ChatPermissions) *SetChatPermissionsMethod {
- return &SetChatPermissionsMethod{
- ChatID: chatID,
- Permissions: permissions,
- }
- }
- // SetChatID - bla-bla
- func (b *SetChatPermissionsMethod) SetChatID(value ChatID) *SetChatPermissionsMethod {
- b.ChatID = value
- return b
- }
- // SetPermissions - bla-bla
- func (b *SetChatPermissionsMethod) SetPermissions(value *ChatPermissions) *SetChatPermissionsMethod {
- b.Permissions = value
- return b
- }
- // ExportChatInviteLinkMethod - bla-bla
- type ExportChatInviteLinkMethod struct {
- ChatID ChatID `json:"chat_id"`
- }
- // ExportChatInviteLink creates new Telegram Bot API method exportChatInviteLink
- func ExportChatInviteLink(chatID ChatID) *ExportChatInviteLinkMethod {
- return &ExportChatInviteLinkMethod{
- ChatID: chatID,
- }
- }
- // SetChatID - bla-bla
- func (b *ExportChatInviteLinkMethod) SetChatID(value ChatID) *ExportChatInviteLinkMethod {
- b.ChatID = value
- return b
- }
- // SetChatPhotoMethod - bla-bla
- type SetChatPhotoMethod struct {
- ChatID ChatID `json:"chat_id"`
- Photo *InputFile `json:"photo"`
- }
- // SetChatPhoto creates new Telegram Bot API method setChatPhoto
- func SetChatPhoto(chatID ChatID, photo *InputFile) *SetChatPhotoMethod {
- return &SetChatPhotoMethod{
- ChatID: chatID,
- Photo: photo,
- }
- }
- // SetChatID - bla-bla
- func (b *SetChatPhotoMethod) SetChatID(value ChatID) *SetChatPhotoMethod {
- b.ChatID = value
- return b
- }
- // SetPhoto - bla-bla
- func (b *SetChatPhotoMethod) SetPhoto(value *InputFile) *SetChatPhotoMethod {
- b.Photo = value
- return b
- }
- // DeleteChatPhotoMethod - bla-bla
- type DeleteChatPhotoMethod struct {
- ChatID ChatID `json:"chat_id"`
- }
- // DeleteChatPhoto creates new Telegram Bot API method deleteChatPhoto
- func DeleteChatPhoto(chatID ChatID) *DeleteChatPhotoMethod {
- return &DeleteChatPhotoMethod{
- ChatID: chatID,
- }
- }
- // SetChatID - bla-bla
- func (b *DeleteChatPhotoMethod) SetChatID(value ChatID) *DeleteChatPhotoMethod {
- b.ChatID = value
- return b
- }
- // SetChatTitleMethod - bla-bla
- type SetChatTitleMethod struct {
- ChatID ChatID `json:"chat_id"`
- Title string `json:"title"`
- }
- // SetChatTitle creates new Telegram Bot API method setChatTitle
- func SetChatTitle(chatID ChatID, title string) *SetChatTitleMethod {
- return &SetChatTitleMethod{
- ChatID: chatID,
- Title: title,
- }
- }
- // SetChatID - bla-bla
- func (b *SetChatTitleMethod) SetChatID(value ChatID) *SetChatTitleMethod {
- b.ChatID = value
- return b
- }
- // SetTitle - bla-bla
- func (b *SetChatTitleMethod) SetTitle(value string) *SetChatTitleMethod {
- b.Title = value
- return b
- }
- // SetChatDescriptionMethod - bla-bla
- type SetChatDescriptionMethod struct {
- ChatID ChatID `json:"chat_id"`
- Description string `json:"description"`
- }
- // SetChatDescription creates new Telegram Bot API method setChatDescription
- func SetChatDescription(chatID ChatID) *SetChatDescriptionMethod {
- return &SetChatDescriptionMethod{
- ChatID: chatID,
- }
- }
- // SetChatID - bla-bla
- func (b *SetChatDescriptionMethod) SetChatID(value ChatID) *SetChatDescriptionMethod {
- b.ChatID = value
- return b
- }
- // SetDescription - bla-bla
- func (b *SetChatDescriptionMethod) SetDescription(value string) *SetChatDescriptionMethod {
- b.Description = value
- return b
- }
- // PinChatMessageMethod - bla-bla
- type PinChatMessageMethod struct {
- ChatID ChatID `json:"chat_id"`
- MessageID int `json:"message_id"`
- DisableNotification bool `json:"disable_notification"`
- }
- // PinChatMessage creates new Telegram Bot API method pinChatMessage
- func PinChatMessage(chatID ChatID, messageID int) *PinChatMessageMethod {
- return &PinChatMessageMethod{
- ChatID: chatID,
- MessageID: messageID,
- }
- }
- // SetChatID - bla-bla
- func (b *PinChatMessageMethod) SetChatID(value ChatID) *PinChatMessageMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *PinChatMessageMethod) SetMessageID(value int) *PinChatMessageMethod {
- b.MessageID = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *PinChatMessageMethod) SetDisableNotification(value bool) *PinChatMessageMethod {
- b.DisableNotification = value
- return b
- }
- // UnpinChatMessageMethod - bla-bla
- type UnpinChatMessageMethod struct {
- ChatID ChatID `json:"chat_id"`
- }
- // UnpinChatMessage creates new Telegram Bot API method unpinChatMessage
- func UnpinChatMessage(chatID ChatID) *UnpinChatMessageMethod {
- return &UnpinChatMessageMethod{
- ChatID: chatID,
- }
- }
- // SetChatID - bla-bla
- func (b *UnpinChatMessageMethod) SetChatID(value ChatID) *UnpinChatMessageMethod {
- b.ChatID = value
- return b
- }
- // LeaveChatMethod - bla-bla
- type LeaveChatMethod struct {
- ChatID ChatID `json:"chat_id"`
- }
- // LeaveChat creates new Telegram Bot API method leaveChat
- func LeaveChat(chatID ChatID) *LeaveChatMethod {
- return &LeaveChatMethod{
- ChatID: chatID,
- }
- }
- // SetChatID - bla-bla
- func (b *LeaveChatMethod) SetChatID(value ChatID) *LeaveChatMethod {
- b.ChatID = value
- return b
- }
- // GetChatMethod - bla-bla
- type GetChatMethod struct {
- ChatID ChatID `json:"chat_id"`
- }
- // GetChat creates new Telegram Bot API method getChat
- func GetChat(chatID ChatID) *GetChatMethod {
- return &GetChatMethod{
- ChatID: chatID,
- }
- }
- // SetChatID - bla-bla
- func (b *GetChatMethod) SetChatID(value ChatID) *GetChatMethod {
- b.ChatID = value
- return b
- }
- // GetChatAdministratorsMethod - bla-bla
- type GetChatAdministratorsMethod struct {
- ChatID ChatID `json:"chat_id"`
- }
- // GetChatAdministrators creates new Telegram Bot API method getChatAdministrators
- func GetChatAdministrators(chatID ChatID) *GetChatAdministratorsMethod {
- return &GetChatAdministratorsMethod{
- ChatID: chatID,
- }
- }
- // SetChatID - bla-bla
- func (b *GetChatAdministratorsMethod) SetChatID(value ChatID) *GetChatAdministratorsMethod {
- b.ChatID = value
- return b
- }
- // GetChatMembersCountMethod - bla-bla
- type GetChatMembersCountMethod struct {
- ChatID ChatID `json:"chat_id"`
- }
- // GetChatMembersCount creates new Telegram Bot API method getChatMembersCount
- func GetChatMembersCount(chatID ChatID) *GetChatMembersCountMethod {
- return &GetChatMembersCountMethod{
- ChatID: chatID,
- }
- }
- // SetChatID - bla-bla
- func (b *GetChatMembersCountMethod) SetChatID(value ChatID) *GetChatMembersCountMethod {
- b.ChatID = value
- return b
- }
- // GetChatMemberMethod - bla-bla
- type GetChatMemberMethod struct {
- ChatID ChatID `json:"chat_id"`
- UserID int `json:"user_id"`
- }
- // GetChatMember creates new Telegram Bot API method getChatMember
- func GetChatMember(chatID ChatID, userID int) *GetChatMemberMethod {
- return &GetChatMemberMethod{
- ChatID: chatID,
- UserID: userID,
- }
- }
- // SetChatID - bla-bla
- func (b *GetChatMemberMethod) SetChatID(value ChatID) *GetChatMemberMethod {
- b.ChatID = value
- return b
- }
- // SetUserID - bla-bla
- func (b *GetChatMemberMethod) SetUserID(value int) *GetChatMemberMethod {
- b.UserID = value
- return b
- }
- // SetChatStickerSetMethod - bla-bla
- type SetChatStickerSetMethod struct {
- ChatID ChatID `json:"chat_id"`
- StickerSetName string `json:"sticker_set_name"`
- }
- // SetChatStickerSet creates new Telegram Bot API method setChatStickerSet
- func SetChatStickerSet(chatID ChatID, stickerSetName string) *SetChatStickerSetMethod {
- return &SetChatStickerSetMethod{
- ChatID: chatID,
- StickerSetName: stickerSetName,
- }
- }
- // SetChatID - bla-bla
- func (b *SetChatStickerSetMethod) SetChatID(value ChatID) *SetChatStickerSetMethod {
- b.ChatID = value
- return b
- }
- // SetStickerSetName - bla-bla
- func (b *SetChatStickerSetMethod) SetStickerSetName(value string) *SetChatStickerSetMethod {
- b.StickerSetName = value
- return b
- }
- // DeleteChatStickerSetMethod - bla-bla
- type DeleteChatStickerSetMethod struct {
- ChatID ChatID `json:"chat_id"`
- }
- // DeleteChatStickerSet creates new Telegram Bot API method deleteChatStickerSet
- func DeleteChatStickerSet(chatID ChatID) *DeleteChatStickerSetMethod {
- return &DeleteChatStickerSetMethod{
- ChatID: chatID,
- }
- }
- // SetChatID - bla-bla
- func (b *DeleteChatStickerSetMethod) SetChatID(value ChatID) *DeleteChatStickerSetMethod {
- b.ChatID = value
- return b
- }
- // AnswerCallbackQueryMethod - bla-bla
- type AnswerCallbackQueryMethod struct {
- CallbackQueryID string `json:"callback_query_id"`
- Text string `json:"text"`
- ShowAlert bool `json:"show_alert"`
- URL string `json:"url"`
- CacheTime int `json:"cache_time"`
- }
- // AnswerCallbackQuery creates new Telegram Bot API method answerCallbackQuery
- func AnswerCallbackQuery(callbackQueryID string) *AnswerCallbackQueryMethod {
- return &AnswerCallbackQueryMethod{
- CallbackQueryID: callbackQueryID,
- }
- }
- // SetCallbackQueryID - bla-bla
- func (b *AnswerCallbackQueryMethod) SetCallbackQueryID(value string) *AnswerCallbackQueryMethod {
- b.CallbackQueryID = value
- return b
- }
- // SetText - bla-bla
- func (b *AnswerCallbackQueryMethod) SetText(value string) *AnswerCallbackQueryMethod {
- b.Text = value
- return b
- }
- // SetShowAlert - bla-bla
- func (b *AnswerCallbackQueryMethod) SetShowAlert(value bool) *AnswerCallbackQueryMethod {
- b.ShowAlert = value
- return b
- }
- // SetURL - bla-bla
- func (b *AnswerCallbackQueryMethod) SetURL(value string) *AnswerCallbackQueryMethod {
- b.URL = value
- return b
- }
- // SetCacheTime - bla-bla
- func (b *AnswerCallbackQueryMethod) SetCacheTime(value int) *AnswerCallbackQueryMethod {
- b.CacheTime = value
- return b
- }
- // EditMessageTextMethod - bla-bla
- type EditMessageTextMethod struct {
- ChatID ChatID `json:"chat_id"`
- MessageID int `json:"message_id"`
- InlineMessageID string `json:"inline_message_id"`
- Text string `json:"text"`
- ParseMode string `json:"parse_mode"`
- DisableWebPagePreview bool `json:"disable_web_page_preview"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // EditMessageText creates new Telegram Bot API method editMessageText
- func EditMessageText(text string) *EditMessageTextMethod {
- return &EditMessageTextMethod{
- Text: text,
- }
- }
- // SetChatID - bla-bla
- func (b *EditMessageTextMethod) SetChatID(value ChatID) *EditMessageTextMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *EditMessageTextMethod) SetMessageID(value int) *EditMessageTextMethod {
- b.MessageID = value
- return b
- }
- // SetInlineMessageID - bla-bla
- func (b *EditMessageTextMethod) SetInlineMessageID(value string) *EditMessageTextMethod {
- b.InlineMessageID = value
- return b
- }
- // SetText - bla-bla
- func (b *EditMessageTextMethod) SetText(value string) *EditMessageTextMethod {
- b.Text = value
- return b
- }
- // SetParseMode - bla-bla
- func (b *EditMessageTextMethod) SetParseMode(value string) *EditMessageTextMethod {
- b.ParseMode = value
- return b
- }
- // SetDisableWebPagePreview - bla-bla
- func (b *EditMessageTextMethod) SetDisableWebPagePreview(value bool) *EditMessageTextMethod {
- b.DisableWebPagePreview = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *EditMessageTextMethod) SetReplyMarkup(value *ReplyMarkup) *EditMessageTextMethod {
- b.ReplyMarkup = value
- return b
- }
- // EditMessageCaptionMethod - bla-bla
- type EditMessageCaptionMethod struct {
- ChatID ChatID `json:"chat_id"`
- MessageID int `json:"message_id"`
- InlineMessageID string `json:"inline_message_id"`
- Caption string `json:"caption"`
- ParseMode string `json:"parse_mode"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // EditMessageCaption creates new Telegram Bot API method editMessageCaption
- func EditMessageCaption() *EditMessageCaptionMethod {
- return &EditMessageCaptionMethod{}
- }
- // SetChatID - bla-bla
- func (b *EditMessageCaptionMethod) SetChatID(value ChatID) *EditMessageCaptionMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *EditMessageCaptionMethod) SetMessageID(value int) *EditMessageCaptionMethod {
- b.MessageID = value
- return b
- }
- // SetInlineMessageID - bla-bla
- func (b *EditMessageCaptionMethod) SetInlineMessageID(value string) *EditMessageCaptionMethod {
- b.InlineMessageID = value
- return b
- }
- // SetCaption - bla-bla
- func (b *EditMessageCaptionMethod) SetCaption(value string) *EditMessageCaptionMethod {
- b.Caption = value
- return b
- }
- // SetParseMode - bla-bla
- func (b *EditMessageCaptionMethod) SetParseMode(value string) *EditMessageCaptionMethod {
- b.ParseMode = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *EditMessageCaptionMethod) SetReplyMarkup(value *ReplyMarkup) *EditMessageCaptionMethod {
- b.ReplyMarkup = value
- return b
- }
- // EditMessageMediaMethod - bla-bla
- type EditMessageMediaMethod struct {
- ChatID ChatID `json:"chat_id"`
- MessageID int `json:"message_id"`
- InlineMessageID string `json:"inline_message_id"`
- Media *InputMedia `json:"media"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // EditMessageMedia creates new Telegram Bot API method editMessageMedia
- func EditMessageMedia(media *InputMedia) *EditMessageMediaMethod {
- return &EditMessageMediaMethod{
- Media: media,
- }
- }
- // SetChatID - bla-bla
- func (b *EditMessageMediaMethod) SetChatID(value ChatID) *EditMessageMediaMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *EditMessageMediaMethod) SetMessageID(value int) *EditMessageMediaMethod {
- b.MessageID = value
- return b
- }
- // SetInlineMessageID - bla-bla
- func (b *EditMessageMediaMethod) SetInlineMessageID(value string) *EditMessageMediaMethod {
- b.InlineMessageID = value
- return b
- }
- // SetMedia - bla-bla
- func (b *EditMessageMediaMethod) SetMedia(value *InputMedia) *EditMessageMediaMethod {
- b.Media = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *EditMessageMediaMethod) SetReplyMarkup(value *ReplyMarkup) *EditMessageMediaMethod {
- b.ReplyMarkup = value
- return b
- }
- // EditMessageReplyMarkupMethod - bla-bla
- type EditMessageReplyMarkupMethod struct {
- ChatID ChatID `json:"chat_id"`
- MessageID int `json:"message_id"`
- InlineMessageID string `json:"inline_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // EditMessageReplyMarkup creates new Telegram Bot API method editMessageReplyMarkup
- func EditMessageReplyMarkup() *EditMessageReplyMarkupMethod {
- return &EditMessageReplyMarkupMethod{}
- }
- // SetChatID - bla-bla
- func (b *EditMessageReplyMarkupMethod) SetChatID(value ChatID) *EditMessageReplyMarkupMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *EditMessageReplyMarkupMethod) SetMessageID(value int) *EditMessageReplyMarkupMethod {
- b.MessageID = value
- return b
- }
- // SetInlineMessageID - bla-bla
- func (b *EditMessageReplyMarkupMethod) SetInlineMessageID(value string) *EditMessageReplyMarkupMethod {
- b.InlineMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *EditMessageReplyMarkupMethod) SetReplyMarkup(value *ReplyMarkup) *EditMessageReplyMarkupMethod {
- b.ReplyMarkup = value
- return b
- }
- // StopPollMethod - bla-bla
- type StopPollMethod struct {
- ChatID ChatID `json:"chat_id"`
- MessageID int `json:"message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // StopPoll creates new Telegram Bot API method stopPoll
- func StopPoll(chatID ChatID, messageID int) *StopPollMethod {
- return &StopPollMethod{
- ChatID: chatID,
- MessageID: messageID,
- }
- }
- // SetChatID - bla-bla
- func (b *StopPollMethod) SetChatID(value ChatID) *StopPollMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *StopPollMethod) SetMessageID(value int) *StopPollMethod {
- b.MessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *StopPollMethod) SetReplyMarkup(value *ReplyMarkup) *StopPollMethod {
- b.ReplyMarkup = value
- return b
- }
- // DeleteMessageMethod - bla-bla
- type DeleteMessageMethod struct {
- ChatID ChatID `json:"chat_id"`
- MessageID int `json:"message_id"`
- }
- // DeleteMessage creates new Telegram Bot API method deleteMessage
- func DeleteMessage(chatID ChatID, messageID int) *DeleteMessageMethod {
- return &DeleteMessageMethod{
- ChatID: chatID,
- MessageID: messageID,
- }
- }
- // SetChatID - bla-bla
- func (b *DeleteMessageMethod) SetChatID(value ChatID) *DeleteMessageMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *DeleteMessageMethod) SetMessageID(value int) *DeleteMessageMethod {
- b.MessageID = value
- return b
- }
- // SendStickerMethod - bla-bla
- type SendStickerMethod struct {
- ChatID ChatID `json:"chat_id"`
- Sticker *InputFile `json:"sticker"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendSticker creates new Telegram Bot API method sendSticker
- func SendSticker(chatID ChatID, sticker *InputFile) *SendStickerMethod {
- return &SendStickerMethod{
- ChatID: chatID,
- Sticker: sticker,
- }
- }
- // SetChatID - bla-bla
- func (b *SendStickerMethod) SetChatID(value ChatID) *SendStickerMethod {
- b.ChatID = value
- return b
- }
- // SetSticker - bla-bla
- func (b *SendStickerMethod) SetSticker(value *InputFile) *SendStickerMethod {
- b.Sticker = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendStickerMethod) SetDisableNotification(value bool) *SendStickerMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendStickerMethod) SetReplyToMessageID(value int) *SendStickerMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendStickerMethod) SetReplyMarkup(value *ReplyMarkup) *SendStickerMethod {
- b.ReplyMarkup = value
- return b
- }
- // GetStickerSetMethod - bla-bla
- type GetStickerSetMethod struct {
- Name string `json:"name"`
- }
- // GetStickerSet creates new Telegram Bot API method getStickerSet
- func GetStickerSet(name string) *GetStickerSetMethod {
- return &GetStickerSetMethod{
- Name: name,
- }
- }
- // SetName - bla-bla
- func (b *GetStickerSetMethod) SetName(value string) *GetStickerSetMethod {
- b.Name = value
- return b
- }
- // UploadStickerFileMethod - bla-bla
- type UploadStickerFileMethod struct {
- UserID int `json:"user_id"`
- PngSticker *InputFile `json:"png_sticker"`
- }
- // UploadStickerFile creates new Telegram Bot API method uploadStickerFile
- func UploadStickerFile(userID int, pngSticker *InputFile) *UploadStickerFileMethod {
- return &UploadStickerFileMethod{
- UserID: userID,
- PngSticker: pngSticker,
- }
- }
- // SetUserID - bla-bla
- func (b *UploadStickerFileMethod) SetUserID(value int) *UploadStickerFileMethod {
- b.UserID = value
- return b
- }
- // SetPngSticker - bla-bla
- func (b *UploadStickerFileMethod) SetPngSticker(value *InputFile) *UploadStickerFileMethod {
- b.PngSticker = value
- return b
- }
- // CreateNewStickerSetMethod - bla-bla
- type CreateNewStickerSetMethod struct {
- UserID int `json:"user_id"`
- Name string `json:"name"`
- Title string `json:"title"`
- PngSticker *InputFile `json:"png_sticker"`
- Emojis string `json:"emojis"`
- ContainsMasks bool `json:"contains_masks"`
- MaskPosition *MaskPosition `json:"mask_position"`
- }
- // CreateNewStickerSet creates new Telegram Bot API method createNewStickerSet
- func CreateNewStickerSet(userID int, name string, title string, pngSticker *InputFile, emojis string) *CreateNewStickerSetMethod {
- return &CreateNewStickerSetMethod{
- UserID: userID,
- Name: name,
- Title: title,
- PngSticker: pngSticker,
- Emojis: emojis,
- }
- }
- // SetUserID - bla-bla
- func (b *CreateNewStickerSetMethod) SetUserID(value int) *CreateNewStickerSetMethod {
- b.UserID = value
- return b
- }
- // SetName - bla-bla
- func (b *CreateNewStickerSetMethod) SetName(value string) *CreateNewStickerSetMethod {
- b.Name = value
- return b
- }
- // SetTitle - bla-bla
- func (b *CreateNewStickerSetMethod) SetTitle(value string) *CreateNewStickerSetMethod {
- b.Title = value
- return b
- }
- // SetPngSticker - bla-bla
- func (b *CreateNewStickerSetMethod) SetPngSticker(value *InputFile) *CreateNewStickerSetMethod {
- b.PngSticker = value
- return b
- }
- // SetEmojis - bla-bla
- func (b *CreateNewStickerSetMethod) SetEmojis(value string) *CreateNewStickerSetMethod {
- b.Emojis = value
- return b
- }
- // SetContainsMasks - bla-bla
- func (b *CreateNewStickerSetMethod) SetContainsMasks(value bool) *CreateNewStickerSetMethod {
- b.ContainsMasks = value
- return b
- }
- // SetMaskPosition - bla-bla
- func (b *CreateNewStickerSetMethod) SetMaskPosition(value *MaskPosition) *CreateNewStickerSetMethod {
- b.MaskPosition = value
- return b
- }
- // AddStickerToSetMethod - bla-bla
- type AddStickerToSetMethod struct {
- UserID int `json:"user_id"`
- Name string `json:"name"`
- PngSticker *InputFile `json:"png_sticker"`
- Emojis string `json:"emojis"`
- MaskPosition *MaskPosition `json:"mask_position"`
- }
- // AddStickerToSet creates new Telegram Bot API method addStickerToSet
- func AddStickerToSet(userID int, name string, pngSticker *InputFile, emojis string) *AddStickerToSetMethod {
- return &AddStickerToSetMethod{
- UserID: userID,
- Name: name,
- PngSticker: pngSticker,
- Emojis: emojis,
- }
- }
- // SetUserID - bla-bla
- func (b *AddStickerToSetMethod) SetUserID(value int) *AddStickerToSetMethod {
- b.UserID = value
- return b
- }
- // SetName - bla-bla
- func (b *AddStickerToSetMethod) SetName(value string) *AddStickerToSetMethod {
- b.Name = value
- return b
- }
- // SetPngSticker - bla-bla
- func (b *AddStickerToSetMethod) SetPngSticker(value *InputFile) *AddStickerToSetMethod {
- b.PngSticker = value
- return b
- }
- // SetEmojis - bla-bla
- func (b *AddStickerToSetMethod) SetEmojis(value string) *AddStickerToSetMethod {
- b.Emojis = value
- return b
- }
- // SetMaskPosition - bla-bla
- func (b *AddStickerToSetMethod) SetMaskPosition(value *MaskPosition) *AddStickerToSetMethod {
- b.MaskPosition = value
- return b
- }
- // SetStickerPositionInSetMethod - bla-bla
- type SetStickerPositionInSetMethod struct {
- Sticker string `json:"sticker"`
- Position int `json:"position"`
- }
- // SetStickerPositionInSet creates new Telegram Bot API method setStickerPositionInSet
- func SetStickerPositionInSet(sticker string, position int) *SetStickerPositionInSetMethod {
- return &SetStickerPositionInSetMethod{
- Sticker: sticker,
- Position: position,
- }
- }
- // SetSticker - bla-bla
- func (b *SetStickerPositionInSetMethod) SetSticker(value string) *SetStickerPositionInSetMethod {
- b.Sticker = value
- return b
- }
- // SetPosition - bla-bla
- func (b *SetStickerPositionInSetMethod) SetPosition(value int) *SetStickerPositionInSetMethod {
- b.Position = value
- return b
- }
- // DeleteStickerFromSetMethod - bla-bla
- type DeleteStickerFromSetMethod struct {
- Sticker string `json:"sticker"`
- }
- // DeleteStickerFromSet creates new Telegram Bot API method deleteStickerFromSet
- func DeleteStickerFromSet(sticker string) *DeleteStickerFromSetMethod {
- return &DeleteStickerFromSetMethod{
- Sticker: sticker,
- }
- }
- // SetSticker - bla-bla
- func (b *DeleteStickerFromSetMethod) SetSticker(value string) *DeleteStickerFromSetMethod {
- b.Sticker = value
- return b
- }
- // AnswerInlineQueryMethod - bla-bla
- type AnswerInlineQueryMethod struct {
- InlineQueryID string `json:"inline_query_id"`
- Results []*InlineQueryResult `json:"results"`
- CacheTime int `json:"cache_time"`
- IsPersonal bool `json:"is_personal"`
- NextOffset string `json:"next_offset"`
- SwitchPmText string `json:"switch_pm_text"`
- SwitchPmParameter string `json:"switch_pm_parameter"`
- }
- // AnswerInlineQuery creates new Telegram Bot API method answerInlineQuery
- func AnswerInlineQuery(inlineQueryID string, results []*InlineQueryResult) *AnswerInlineQueryMethod {
- return &AnswerInlineQueryMethod{
- InlineQueryID: inlineQueryID,
- Results: results,
- }
- }
- // SetInlineQueryID - bla-bla
- func (b *AnswerInlineQueryMethod) SetInlineQueryID(value string) *AnswerInlineQueryMethod {
- b.InlineQueryID = value
- return b
- }
- // SetResults - bla-bla
- func (b *AnswerInlineQueryMethod) SetResults(value []*InlineQueryResult) *AnswerInlineQueryMethod {
- b.Results = value
- return b
- }
- // SetCacheTime - bla-bla
- func (b *AnswerInlineQueryMethod) SetCacheTime(value int) *AnswerInlineQueryMethod {
- b.CacheTime = value
- return b
- }
- // SetIsPersonal - bla-bla
- func (b *AnswerInlineQueryMethod) SetIsPersonal(value bool) *AnswerInlineQueryMethod {
- b.IsPersonal = value
- return b
- }
- // SetNextOffset - bla-bla
- func (b *AnswerInlineQueryMethod) SetNextOffset(value string) *AnswerInlineQueryMethod {
- b.NextOffset = value
- return b
- }
- // SetSwitchPmText - bla-bla
- func (b *AnswerInlineQueryMethod) SetSwitchPmText(value string) *AnswerInlineQueryMethod {
- b.SwitchPmText = value
- return b
- }
- // SetSwitchPmParameter - bla-bla
- func (b *AnswerInlineQueryMethod) SetSwitchPmParameter(value string) *AnswerInlineQueryMethod {
- b.SwitchPmParameter = value
- return b
- }
- // SendInvoiceMethod - bla-bla
- type SendInvoiceMethod struct {
- ChatID int `json:"chat_id"`
- Title string `json:"title"`
- Description string `json:"description"`
- Payload string `json:"payload"`
- ProviderToken string `json:"provider_token"`
- StartParameter string `json:"start_parameter"`
- Currency string `json:"currency"`
- Prices []*LabeledPrice `json:"prices"`
- ProviderData string `json:"provider_data"`
- PhotoURL string `json:"photo_url"`
- PhotoSize int `json:"photo_size"`
- PhotoWidth int `json:"photo_width"`
- PhotoHeight int `json:"photo_height"`
- NeedName bool `json:"need_name"`
- NeedPhoneNumber bool `json:"need_phone_number"`
- NeedEmail bool `json:"need_email"`
- NeedShippingAddress bool `json:"need_shipping_address"`
- SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider"`
- SendEmailToProvider bool `json:"send_email_to_provider"`
- IsFlexible bool `json:"is_flexible"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendInvoice creates new Telegram Bot API method sendInvoice
- func SendInvoice(chatID int, title string, description string, payload string, providerToken string, startParameter string, currency string, prices []*LabeledPrice) *SendInvoiceMethod {
- return &SendInvoiceMethod{
- ChatID: chatID,
- Title: title,
- Description: description,
- Payload: payload,
- ProviderToken: providerToken,
- StartParameter: startParameter,
- Currency: currency,
- Prices: prices,
- }
- }
- // SetChatID - bla-bla
- func (b *SendInvoiceMethod) SetChatID(value int) *SendInvoiceMethod {
- b.ChatID = value
- return b
- }
- // SetTitle - bla-bla
- func (b *SendInvoiceMethod) SetTitle(value string) *SendInvoiceMethod {
- b.Title = value
- return b
- }
- // SetDescription - bla-bla
- func (b *SendInvoiceMethod) SetDescription(value string) *SendInvoiceMethod {
- b.Description = value
- return b
- }
- // SetPayload - bla-bla
- func (b *SendInvoiceMethod) SetPayload(value string) *SendInvoiceMethod {
- b.Payload = value
- return b
- }
- // SetProviderToken - bla-bla
- func (b *SendInvoiceMethod) SetProviderToken(value string) *SendInvoiceMethod {
- b.ProviderToken = value
- return b
- }
- // SetStartParameter - bla-bla
- func (b *SendInvoiceMethod) SetStartParameter(value string) *SendInvoiceMethod {
- b.StartParameter = value
- return b
- }
- // SetCurrency - bla-bla
- func (b *SendInvoiceMethod) SetCurrency(value string) *SendInvoiceMethod {
- b.Currency = value
- return b
- }
- // SetPrices - bla-bla
- func (b *SendInvoiceMethod) SetPrices(value []*LabeledPrice) *SendInvoiceMethod {
- b.Prices = value
- return b
- }
- // SetProviderData - bla-bla
- func (b *SendInvoiceMethod) SetProviderData(value string) *SendInvoiceMethod {
- b.ProviderData = value
- return b
- }
- // SetPhotoURL - bla-bla
- func (b *SendInvoiceMethod) SetPhotoURL(value string) *SendInvoiceMethod {
- b.PhotoURL = value
- return b
- }
- // SetPhotoSize - bla-bla
- func (b *SendInvoiceMethod) SetPhotoSize(value int) *SendInvoiceMethod {
- b.PhotoSize = value
- return b
- }
- // SetPhotoWidth - bla-bla
- func (b *SendInvoiceMethod) SetPhotoWidth(value int) *SendInvoiceMethod {
- b.PhotoWidth = value
- return b
- }
- // SetPhotoHeight - bla-bla
- func (b *SendInvoiceMethod) SetPhotoHeight(value int) *SendInvoiceMethod {
- b.PhotoHeight = value
- return b
- }
- // SetNeedName - bla-bla
- func (b *SendInvoiceMethod) SetNeedName(value bool) *SendInvoiceMethod {
- b.NeedName = value
- return b
- }
- // SetNeedPhoneNumber - bla-bla
- func (b *SendInvoiceMethod) SetNeedPhoneNumber(value bool) *SendInvoiceMethod {
- b.NeedPhoneNumber = value
- return b
- }
- // SetNeedEmail - bla-bla
- func (b *SendInvoiceMethod) SetNeedEmail(value bool) *SendInvoiceMethod {
- b.NeedEmail = value
- return b
- }
- // SetNeedShippingAddress - bla-bla
- func (b *SendInvoiceMethod) SetNeedShippingAddress(value bool) *SendInvoiceMethod {
- b.NeedShippingAddress = value
- return b
- }
- // SetSendPhoneNumberToProvider - bla-bla
- func (b *SendInvoiceMethod) SetSendPhoneNumberToProvider(value bool) *SendInvoiceMethod {
- b.SendPhoneNumberToProvider = value
- return b
- }
- // SetSendEmailToProvider - bla-bla
- func (b *SendInvoiceMethod) SetSendEmailToProvider(value bool) *SendInvoiceMethod {
- b.SendEmailToProvider = value
- return b
- }
- // SetIsFlexible - bla-bla
- func (b *SendInvoiceMethod) SetIsFlexible(value bool) *SendInvoiceMethod {
- b.IsFlexible = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendInvoiceMethod) SetDisableNotification(value bool) *SendInvoiceMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendInvoiceMethod) SetReplyToMessageID(value int) *SendInvoiceMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendInvoiceMethod) SetReplyMarkup(value *ReplyMarkup) *SendInvoiceMethod {
- b.ReplyMarkup = value
- return b
- }
- // AnswerShippingQueryMethod - bla-bla
- type AnswerShippingQueryMethod struct {
- ShippingQueryID string `json:"shipping_query_id"`
- Ok bool `json:"ok"`
- ShippingOptions []*ShippingOption `json:"shipping_options"`
- ErrorMessage string `json:"error_message"`
- }
- // AnswerShippingQuery creates new Telegram Bot API method answerShippingQuery
- func AnswerShippingQuery(shippingQueryID string, ok bool) *AnswerShippingQueryMethod {
- return &AnswerShippingQueryMethod{
- ShippingQueryID: shippingQueryID,
- Ok: ok,
- }
- }
- // SetShippingQueryID - bla-bla
- func (b *AnswerShippingQueryMethod) SetShippingQueryID(value string) *AnswerShippingQueryMethod {
- b.ShippingQueryID = value
- return b
- }
- // SetOk - bla-bla
- func (b *AnswerShippingQueryMethod) SetOk(value bool) *AnswerShippingQueryMethod {
- b.Ok = value
- return b
- }
- // SetShippingOptions - bla-bla
- func (b *AnswerShippingQueryMethod) SetShippingOptions(value []*ShippingOption) *AnswerShippingQueryMethod {
- b.ShippingOptions = value
- return b
- }
- // SetErrorMessage - bla-bla
- func (b *AnswerShippingQueryMethod) SetErrorMessage(value string) *AnswerShippingQueryMethod {
- b.ErrorMessage = value
- return b
- }
- // AnswerPreCheckoutQueryMethod - bla-bla
- type AnswerPreCheckoutQueryMethod struct {
- PreCheckoutQueryID string `json:"pre_checkout_query_id"`
- Ok bool `json:"ok"`
- ErrorMessage string `json:"error_message"`
- }
- // AnswerPreCheckoutQuery creates new Telegram Bot API method answerPreCheckoutQuery
- func AnswerPreCheckoutQuery(preCheckoutQueryID string, ok bool) *AnswerPreCheckoutQueryMethod {
- return &AnswerPreCheckoutQueryMethod{
- PreCheckoutQueryID: preCheckoutQueryID,
- Ok: ok,
- }
- }
- // SetPreCheckoutQueryID - bla-bla
- func (b *AnswerPreCheckoutQueryMethod) SetPreCheckoutQueryID(value string) *AnswerPreCheckoutQueryMethod {
- b.PreCheckoutQueryID = value
- return b
- }
- // SetOk - bla-bla
- func (b *AnswerPreCheckoutQueryMethod) SetOk(value bool) *AnswerPreCheckoutQueryMethod {
- b.Ok = value
- return b
- }
- // SetErrorMessage - bla-bla
- func (b *AnswerPreCheckoutQueryMethod) SetErrorMessage(value string) *AnswerPreCheckoutQueryMethod {
- b.ErrorMessage = value
- return b
- }
- // SetPassportDataErrorsMethod - bla-bla
- type SetPassportDataErrorsMethod struct {
- UserID int `json:"user_id"`
- Errors []*PassportElementError `json:"errors"`
- }
- // SetPassportDataErrors creates new Telegram Bot API method setPassportDataErrors
- func SetPassportDataErrors(userID int, errors []*PassportElementError) *SetPassportDataErrorsMethod {
- return &SetPassportDataErrorsMethod{
- UserID: userID,
- Errors: errors,
- }
- }
- // SetUserID - bla-bla
- func (b *SetPassportDataErrorsMethod) SetUserID(value int) *SetPassportDataErrorsMethod {
- b.UserID = value
- return b
- }
- // SetErrors - bla-bla
- func (b *SetPassportDataErrorsMethod) SetErrors(value []*PassportElementError) *SetPassportDataErrorsMethod {
- b.Errors = value
- return b
- }
- // SendGameMethod - bla-bla
- type SendGameMethod struct {
- ChatID int `json:"chat_id"`
- GameShortName string `json:"game_short_name"`
- DisableNotification bool `json:"disable_notification"`
- ReplyToMessageID int `json:"reply_to_message_id"`
- ReplyMarkup *ReplyMarkup `json:"reply_markup"`
- }
- // SendGame creates new Telegram Bot API method sendGame
- func SendGame(chatID int, gameShortName string) *SendGameMethod {
- return &SendGameMethod{
- ChatID: chatID,
- GameShortName: gameShortName,
- }
- }
- // SetChatID - bla-bla
- func (b *SendGameMethod) SetChatID(value int) *SendGameMethod {
- b.ChatID = value
- return b
- }
- // SetGameShortName - bla-bla
- func (b *SendGameMethod) SetGameShortName(value string) *SendGameMethod {
- b.GameShortName = value
- return b
- }
- // SetDisableNotification - bla-bla
- func (b *SendGameMethod) SetDisableNotification(value bool) *SendGameMethod {
- b.DisableNotification = value
- return b
- }
- // SetReplyToMessageID - bla-bla
- func (b *SendGameMethod) SetReplyToMessageID(value int) *SendGameMethod {
- b.ReplyToMessageID = value
- return b
- }
- // SetReplyMarkup - bla-bla
- func (b *SendGameMethod) SetReplyMarkup(value *ReplyMarkup) *SendGameMethod {
- b.ReplyMarkup = value
- return b
- }
- // SetGameScoreMethod - bla-bla
- type SetGameScoreMethod struct {
- UserID int `json:"user_id"`
- Score int `json:"score"`
- Force bool `json:"force"`
- DisableEditMessage bool `json:"disable_edit_message"`
- ChatID int `json:"chat_id"`
- MessageID int `json:"message_id"`
- InlineMessageID string `json:"inline_message_id"`
- }
- // SetGameScore creates new Telegram Bot API method setGameScore
- func SetGameScore(userID int, score int) *SetGameScoreMethod {
- return &SetGameScoreMethod{
- UserID: userID,
- Score: score,
- }
- }
- // SetUserID - bla-bla
- func (b *SetGameScoreMethod) SetUserID(value int) *SetGameScoreMethod {
- b.UserID = value
- return b
- }
- // SetScore - bla-bla
- func (b *SetGameScoreMethod) SetScore(value int) *SetGameScoreMethod {
- b.Score = value
- return b
- }
- // SetForce - bla-bla
- func (b *SetGameScoreMethod) SetForce(value bool) *SetGameScoreMethod {
- b.Force = value
- return b
- }
- // SetDisableEditMessage - bla-bla
- func (b *SetGameScoreMethod) SetDisableEditMessage(value bool) *SetGameScoreMethod {
- b.DisableEditMessage = value
- return b
- }
- // SetChatID - bla-bla
- func (b *SetGameScoreMethod) SetChatID(value int) *SetGameScoreMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *SetGameScoreMethod) SetMessageID(value int) *SetGameScoreMethod {
- b.MessageID = value
- return b
- }
- // SetInlineMessageID - bla-bla
- func (b *SetGameScoreMethod) SetInlineMessageID(value string) *SetGameScoreMethod {
- b.InlineMessageID = value
- return b
- }
- // GetGameHighScoresMethod - bla-bla
- type GetGameHighScoresMethod struct {
- UserID int `json:"user_id"`
- ChatID int `json:"chat_id"`
- MessageID int `json:"message_id"`
- InlineMessageID string `json:"inline_message_id"`
- }
- // GetGameHighScores creates new Telegram Bot API method getGameHighScores
- func GetGameHighScores(userID int) *GetGameHighScoresMethod {
- return &GetGameHighScoresMethod{
- UserID: userID,
- }
- }
- // SetUserID - bla-bla
- func (b *GetGameHighScoresMethod) SetUserID(value int) *GetGameHighScoresMethod {
- b.UserID = value
- return b
- }
- // SetChatID - bla-bla
- func (b *GetGameHighScoresMethod) SetChatID(value int) *GetGameHighScoresMethod {
- b.ChatID = value
- return b
- }
- // SetMessageID - bla-bla
- func (b *GetGameHighScoresMethod) SetMessageID(value int) *GetGameHighScoresMethod {
- b.MessageID = value
- return b
- }
- // SetInlineMessageID - bla-bla
- func (b *GetGameHighScoresMethod) SetInlineMessageID(value string) *GetGameHighScoresMethod {
- b.InlineMessageID = value
- return b
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement