Documentation ¶
Index ¶
- Constants
- func InputFile(filePath string) raw.InputFile
- type Animation
- type Audio
- type BotCommand
- type BotCommandScope
- type BotCommandScopeAllChatAdministrators
- type BotCommandScopeAllGroupChats
- type BotCommandScopeAllPrivateChats
- type BotCommandScopeChat
- type BotCommandScopeChatAdministrators
- type BotCommandScopeChatMember
- type BotCommandScopeDefault
- type BotDescription
- type BotName
- type BotShortDescription
- type CallbackGame
- type CallbackQuery
- type Chat
- type ChatAdministratorRights
- type ChatInviteLink
- type ChatJoinRequest
- type ChatLocation
- type ChatMember
- type ChatMemberUpdated
- type ChatPermissions
- type ChatPhoto
- type ChatShared
- type ChosenInlineResult
- type Contact
- type Dice
- type Document
- type EncryptedCredentials
- type EncryptedPassportElement
- type File
- type ForceReply
- type ForumTopic
- type ForumTopicClosed
- type ForumTopicCreated
- type ForumTopicEdited
- type ForumTopicReopened
- type Game
- type GameHighScore
- type GeneralForumTopicHidden
- type GeneralForumTopicUnhidden
- type InlineKeyboardButton
- type InlineKeyboardMarkup
- type InlineQuery
- type InlineQueryResult
- type InlineQueryResultArticle
- type InlineQueryResultAudio
- type InlineQueryResultCachedAudio
- type InlineQueryResultCachedDocument
- type InlineQueryResultCachedGif
- type InlineQueryResultCachedMpeg4Gif
- type InlineQueryResultCachedPhoto
- type InlineQueryResultCachedSticker
- type InlineQueryResultCachedVideo
- type InlineQueryResultCachedVoice
- type InlineQueryResultContact
- type InlineQueryResultDocument
- type InlineQueryResultGame
- type InlineQueryResultGif
- type InlineQueryResultLocation
- type InlineQueryResultMpeg4Gif
- type InlineQueryResultPhoto
- type InlineQueryResultVenue
- type InlineQueryResultVideo
- type InlineQueryResultVoice
- type InlineQueryResultsButton
- type InputBytes
- type InputContactMessageContent
- type InputInvoiceMessageContent
- type InputLocationMessageContent
- type InputMedia
- type InputMediaAnimation
- type InputMediaAudio
- type InputMediaDocument
- type InputMediaPhoto
- type InputMediaVideo
- type InputMessageContent
- type InputSticker
- type InputTextMessageContent
- type InputURL
- type InputVenueMessageContent
- type Invoice
- type KeyboardButton
- type KeyboardButtonPollType
- type KeyboardButtonRequestChat
- type KeyboardButtonRequestUser
- type LabeledPrice
- type Location
- type LoginUrl
- type MaskPosition
- type MenuButton
- type MenuButtonCommands
- type MenuButtonDefault
- type MenuButtonWebApp
- type Message
- type MessageAutoDeleteTimerChanged
- type MessageEntity
- type MessageId
- type OrderInfo
- type PassportData
- type PassportElementError
- type PassportElementErrorDataField
- type PassportElementErrorFile
- type PassportElementErrorFiles
- type PassportElementErrorFrontSide
- type PassportElementErrorReverseSide
- type PassportElementErrorSelfie
- type PassportElementErrorTranslationFile
- type PassportElementErrorTranslationFiles
- type PassportElementErrorUnspecified
- type PassportFile
- type PhotoSize
- type Poll
- type PollAnswer
- type PollOption
- type PreCheckoutQuery
- type ProximityAlertTriggered
- type ReplyKeyboardMarkup
- type ReplyKeyboardRemove
- type SentWebAppMessage
- type ShippingAddress
- type ShippingOption
- type ShippingQuery
- type Sticker
- type StickerSet
- type SuccessfulPayment
- type SwitchInlineQueryChosenChat
- type Update
- type User
- type UserProfilePhotos
- type UserShared
- type Venue
- type Video
- type VideoChatEnded
- type VideoChatParticipantsInvited
- type VideoChatScheduled
- type VideoChatStarted
- type VideoNote
- type Voice
- type WebAppData
- type WebAppInfo
- type WebhookInfo
- type WriteAccessAllowed
Constants ¶
const ( TypeChatMemberOwner = iota TypeChatMemberAdministrator TypeChatMemberMember TypeChatMemberRestricted TypeChatMemberLeft TypeChatMemberBanned )
CHAT_MEMBER
const ( TypeArrayOfBotCommand = iota TypeArrayOfChatMember TypeArrayOfGameHighScore TypeArrayOfMessage TypeArrayOfSticker TypeArrayOfUpdate TypeBoolean TypeBotDescription TypeBotName TypeBotShortDescription TypeChat TypeChatAdministratorRights TypeChatInviteLink TypeChatMember TypeErrorMessage TypeFile TypeForumTopic TypeInteger TypeMenuButton TypeMessage TypeMessageId TypePoll TypeSentWebAppMessage TypeStickerSet TypeString TypeUser TypeUserProfilePhotos TypeWebhookInfo )
RETURN_TYPES
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Animation ¶
type Animation struct { Duration int `json:"duration"` FileID string `json:"file_id"` FileName string `json:"file_name,omitempty"` FileSize int `json:"file_size,omitempty"` FileUniqueID string `json:"file_unique_id"` Height int `json:"height"` MimeType string `json:"mime_type,omitempty"` Thumbnail *PhotoSize `json:"thumbnail,omitempty"` Width int64 `json:"width"` }
Animation Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
type Audio ¶
type Audio struct { Duration int `json:"duration"` FileID string `json:"file_id"` FileName string `json:"file_name,omitempty"` FileSize int `json:"file_size,omitempty"` FileUniqueID string `json:"file_unique_id"` MimeType string `json:"mime_type,omitempty"` Performer string `json:"performer,omitempty"` Thumbnail *PhotoSize `json:"thumbnail,omitempty"` Title string `json:"title,omitempty"` }
Audio Represents an audio file to be treated as music by the Telegram clients.
type BotCommand ¶
BotCommand Represents a bot command.
type BotCommandScope ¶
type BotCommandScope any
BotCommandScope Represents the scope to which bot commands are applied Currently, the following 7 scopes are supported:
- BotCommandScopeDefault
- BotCommandScopeAllPrivateChats
- BotCommandScopeAllGroupChats
- BotCommandScopeAllChatAdministrators
- BotCommandScopeChat
- BotCommandScopeChatAdministrators
- BotCommandScopeChatMember
type BotCommandScopeAllChatAdministrators ¶
type BotCommandScopeAllChatAdministrators struct {
Type string `json:"type"`
}
BotCommandScopeAllChatAdministrators Represents the scope of bot commands, covering all group and supergroup chat administrators.
type BotCommandScopeAllGroupChats ¶
type BotCommandScopeAllGroupChats struct {
Type string `json:"type"`
}
BotCommandScopeAllGroupChats Represents the scope of bot commands, covering all group and supergroup chats.
type BotCommandScopeAllPrivateChats ¶
type BotCommandScopeAllPrivateChats struct {
Type string `json:"type"`
}
BotCommandScopeAllPrivateChats Represents the scope of bot commands, covering all private chats.
type BotCommandScopeChat ¶
BotCommandScopeChat Represents the scope of bot commands, covering a specific chat.
func (BotCommandScopeChat) MarshalJSON ¶
func (entity BotCommandScopeChat) MarshalJSON() ([]byte, error)
type BotCommandScopeChatAdministrators ¶
type BotCommandScopeChatAdministrators struct { ChatID any `json:"chat_id"` Type string `json:"type"` }
BotCommandScopeChatAdministrators Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
func (BotCommandScopeChatAdministrators) MarshalJSON ¶
func (entity BotCommandScopeChatAdministrators) MarshalJSON() ([]byte, error)
type BotCommandScopeChatMember ¶
type BotCommandScopeChatMember struct { ChatID any `json:"chat_id"` Type string `json:"type"` UserID int64 `json:"user_id"` }
BotCommandScopeChatMember Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
func (BotCommandScopeChatMember) MarshalJSON ¶
func (entity BotCommandScopeChatMember) MarshalJSON() ([]byte, error)
type BotCommandScopeDefault ¶
type BotCommandScopeDefault struct {
Type string `json:"type"`
}
BotCommandScopeDefault Represents the default scope of bot commands Default commands are used if no commands with a narrower scope are specified for the user.
type BotDescription ¶
type BotDescription struct {
Description string `json:"description"`
}
BotDescription Represents the bot's description.
type BotShortDescription ¶
type BotShortDescription struct {
ShortDescription string `json:"short_description"`
}
BotShortDescription Represents the bot's short description.
type CallbackGame ¶
type CallbackGame any
CallbackGame A placeholder, currently holds no information Use BotFather to set up your game.
type CallbackQuery ¶
type CallbackQuery struct { ChatInstance string `json:"chat_instance"` Data string `json:"data,omitempty"` From User `json:"from"` GameShortName string `json:"game_short_name,omitempty"` ID string `json:"id"` InlineMessageID string `json:"inline_message_id,omitempty"` Message *Message `json:"message,omitempty"` }
CallbackQuery Represents an incoming callback query from a callback button in an inline keyboard If the button that originated the query was attached to a message sent by the bot, the field message will be present If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present Exactly one of the fields data or game_short_name will be present.
type Chat ¶
type Chat struct { ActiveUsernames []string `json:"active_usernames,omitempty"` Bio string `json:"bio,omitempty"` CanSetStickerSet bool `json:"can_set_sticker_set,omitempty"` Description string `json:"description,omitempty"` EmojiStatusCustomEmojiID string `json:"emoji_status_custom_emoji_id,omitempty"` FirstName string `json:"first_name,omitempty"` HasAggressiveAntiSpamEnabled bool `json:"has_aggressive_anti_spam_enabled,omitempty"` HasHiddenMembers bool `json:"has_hidden_members,omitempty"` HasPrivateForwards bool `json:"has_private_forwards,omitempty"` HasProtectedContent bool `json:"has_protected_content,omitempty"` HasRestrictedVoiceAndVideoMessages bool `json:"has_restricted_voice_and_video_messages,omitempty"` ID int64 `json:"id"` InviteLink string `json:"invite_link,omitempty"` IsForum bool `json:"is_forum,omitempty"` JoinByRequest bool `json:"join_by_request,omitempty"` JoinToSendMessages bool `json:"join_to_send_messages,omitempty"` LastName string `json:"last_name,omitempty"` LinkedChatID int64 `json:"linked_chat_id,omitempty"` Location *ChatLocation `json:"location,omitempty"` MessageAutoDeleteTime int `json:"message_auto_delete_time,omitempty"` Permissions *ChatPermissions `json:"permissions,omitempty"` Photo *ChatPhoto `json:"photo,omitempty"` PinnedMessage *Message `json:"pinned_message,omitempty"` SlowModeDelay int `json:"slow_mode_delay,omitempty"` StickerSetName string `json:"sticker_set_name,omitempty"` Title string `json:"title,omitempty"` Type string `json:"type"` Username string `json:"username,omitempty"` }
Chat Represents a chat.
type ChatAdministratorRights ¶
type ChatAdministratorRights struct { CanChangeInfo bool `json:"can_change_info"` CanDeleteMessages bool `json:"can_delete_messages"` CanEditMessages bool `json:"can_edit_messages,omitempty"` CanInviteUsers bool `json:"can_invite_users"` CanManageChat bool `json:"can_manage_chat"` CanManageTopics bool `json:"can_manage_topics,omitempty"` CanManageVideoChats bool `json:"can_manage_video_chats"` CanPinMessages bool `json:"can_pin_messages,omitempty"` CanPostMessages bool `json:"can_post_messages,omitempty"` CanPromoteMembers bool `json:"can_promote_members"` CanRestrictMembers bool `json:"can_restrict_members"` IsAnonymous bool `json:"is_anonymous"` }
ChatAdministratorRights Represents the rights of an administrator in a chat.
type ChatInviteLink ¶
type ChatInviteLink struct { CreatesJoinRequest bool `json:"creates_join_request"` Creator User `json:"creator"` ExpireDate int64 `json:"expire_date,omitempty"` InviteLink string `json:"invite_link"` IsPrimary bool `json:"is_primary"` IsRevoked bool `json:"is_revoked"` MemberLimit int `json:"member_limit,omitempty"` Name string `json:"name,omitempty"` PendingJoinRequestCount int `json:"pending_join_request_count,omitempty"` }
ChatInviteLink Represents an invite link for a chat.
type ChatJoinRequest ¶
type ChatJoinRequest struct { Bio string `json:"bio,omitempty"` Chat Chat `json:"chat"` Date int64 `json:"date"` From User `json:"from"` InviteLink *ChatInviteLink `json:"invite_link,omitempty"` UserChatID int64 `json:"user_chat_id"` }
ChatJoinRequest Represents a join request sent to a chat.
type ChatLocation ¶
ChatLocation Represents a location to which a chat is connected.
type ChatMember ¶
type ChatMember struct { CanAddWebPagePreviews bool `json:"can_add_web_page_previews"` CanBeEdited bool `json:"can_be_edited"` CanChangeInfo bool `json:"can_change_info"` CanDeleteMessages bool `json:"can_delete_messages"` CanEditMessages bool `json:"can_edit_messages"` CanInviteUsers bool `json:"can_invite_users"` CanManageChat bool `json:"can_manage_chat"` CanManageTopics bool `json:"can_manage_topics"` CanManageVideoChats bool `json:"can_manage_video_chats"` CanPinMessages bool `json:"can_pin_messages"` CanPostMessages bool `json:"can_post_messages"` CanPromoteMembers bool `json:"can_promote_members"` CanRestrictMembers bool `json:"can_restrict_members"` CanSendAudios bool `json:"can_send_audios"` CanSendDocuments bool `json:"can_send_documents"` CanSendMessages bool `json:"can_send_messages"` CanSendOtherMessages bool `json:"can_send_other_messages"` CanSendPhotos bool `json:"can_send_photos"` CanSendPolls bool `json:"can_send_polls"` CanSendVideoNotes bool `json:"can_send_video_notes"` CanSendVideos bool `json:"can_send_videos"` CanSendVoiceNotes bool `json:"can_send_voice_notes"` CustomTitle string `json:"custom_title"` IsAnonymous bool `json:"is_anonymous"` IsMember bool `json:"is_member"` Status string `json:"status"` UntilDate int64 `json:"until_date"` User User `json:"user"` }
ChatMember This object contains information about one member of a chat Currently, the following 6 types of chat members are supported:
- ChatMemberOwner
- ChatMemberAdministrator
- ChatMemberMember
- ChatMemberRestricted
- ChatMemberLeft
- ChatMemberBanned
func (ChatMember) Kind ¶
func (x ChatMember) Kind() int
type ChatMemberUpdated ¶
type ChatMemberUpdated struct { Chat Chat `json:"chat"` Date int64 `json:"date"` From User `json:"from"` InviteLink *ChatInviteLink `json:"invite_link,omitempty"` NewChatMember ChatMember `json:"new_chat_member"` OldChatMember ChatMember `json:"old_chat_member"` ViaChatFolderInviteLink bool `json:"via_chat_folder_invite_link,omitempty"` }
ChatMemberUpdated Represents changes in the status of a chat member.
type ChatPermissions ¶
type ChatPermissions struct { CanAddWebPagePreviews bool `json:"can_add_web_page_previews,omitempty"` CanChangeInfo bool `json:"can_change_info,omitempty"` CanInviteUsers bool `json:"can_invite_users,omitempty"` CanManageTopics bool `json:"can_manage_topics,omitempty"` CanPinMessages bool `json:"can_pin_messages,omitempty"` CanSendAudios bool `json:"can_send_audios,omitempty"` CanSendDocuments bool `json:"can_send_documents,omitempty"` CanSendMessages bool `json:"can_send_messages,omitempty"` CanSendOtherMessages bool `json:"can_send_other_messages,omitempty"` CanSendPhotos bool `json:"can_send_photos,omitempty"` CanSendPolls bool `json:"can_send_polls,omitempty"` CanSendVideoNotes bool `json:"can_send_video_notes,omitempty"` CanSendVideos bool `json:"can_send_videos,omitempty"` CanSendVoiceNotes bool `json:"can_send_voice_notes,omitempty"` }
ChatPermissions Describes actions that a non-administrator user is allowed to take in a chat.
type ChatPhoto ¶
type ChatPhoto struct { BigFileID string `json:"big_file_id"` BigFileUniqueID string `json:"big_file_unique_id"` SmallFileID string `json:"small_file_id"` SmallFileUniqueID string `json:"small_file_unique_id"` }
ChatPhoto Represents a chat photo.
type ChatShared ¶
type ChatShared struct {}
ChatShared This object contains information about the chat whose identifier was shared with the bot using a KeyboardButtonRequestChat button.
type ChosenInlineResult ¶
type ChosenInlineResult struct { From User `json:"from"` InlineMessageID string `json:"inline_message_id,omitempty"` Location *Location `json:"location,omitempty"` Query string `json:"query"` ResultID string `json:"result_id"` }
ChosenInlineResult Represents a result of an inline query that was chosen by the user and sent to their chat partner. Note: It is necessary to enable inline feedback via @BotFather in order to receive these objects in updates.
type Contact ¶
type Contact struct { FirstName string `json:"first_name"` LastName string `json:"last_name,omitempty"` PhoneNumber string `json:"phone_number"` UserID int64 `json:"user_id,omitempty"` Vcard string `json:"vcard,omitempty"` }
Contact Represents a phone contact.
type Document ¶
type Document struct { FileID string `json:"file_id"` FileName string `json:"file_name,omitempty"` FileSize int `json:"file_size,omitempty"` FileUniqueID string `json:"file_unique_id"` MimeType string `json:"mime_type,omitempty"` Thumbnail *PhotoSize `json:"thumbnail,omitempty"` }
Document Represents a general file (as opposed to photos, voice messages and audio files).
type EncryptedCredentials ¶
type EncryptedCredentials struct { Data string `json:"data"` Hash string `json:"hash"` Secret string `json:"secret"` }
EncryptedCredentials Describes data required for decrypting and authenticating EncryptedPassportElement See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
type EncryptedPassportElement ¶
type EncryptedPassportElement struct { Data string `json:"data,omitempty"` Email string `json:"email,omitempty"` Files []PassportFile `json:"files,omitempty"` FrontSide *PassportFile `json:"front_side,omitempty"` Hash string `json:"hash"` PhoneNumber string `json:"phone_number,omitempty"` ReverseSide *PassportFile `json:"reverse_side,omitempty"` Selfie *PassportFile `json:"selfie,omitempty"` Translation []PassportFile `json:"translation,omitempty"` Type string `json:"type"` }
EncryptedPassportElement Describes documents or other Telegram Passport elements shared with the bot by the user.
type File ¶
type File struct { FileID string `json:"file_id"` FilePath string `json:"file_path,omitempty"` FileSize int `json:"file_size,omitempty"` FileUniqueID string `json:"file_unique_id"` }
File Represents a file ready to be downloaded The file can be downloaded via the link https://api.telegram.org/file/bot<token>/<file_path> It is guaranteed that the link will be valid for at least 1 hour When the link expires, a new one can be requested by calling getFile.
type ForceReply ¶
type ForceReply struct { ForceReply bool `json:"force_reply"` InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"` Selective bool `json:"selective,omitempty"` }
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 ForumTopic ¶
type ForumTopic struct { IconColor int `json:"icon_color"` IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"` MessageThreadID int64 `json:"message_thread_id"` Name string `json:"name"` }
ForumTopic Represents a forum topic.
type ForumTopicClosed ¶
type ForumTopicClosed any
ForumTopicClosed Represents a service message about a forum topic closed in the chat Currently holds no information.
type ForumTopicCreated ¶
type ForumTopicCreated struct { IconColor int `json:"icon_color"` IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"` Name string `json:"name"` }
ForumTopicCreated Represents a service message about a new forum topic created in the chat.
type ForumTopicEdited ¶
type ForumTopicEdited struct { IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"` Name string `json:"name,omitempty"` }
ForumTopicEdited Represents a service message about an edited forum topic.
type ForumTopicReopened ¶
type ForumTopicReopened any
ForumTopicReopened Represents a service message about a forum topic reopened in the chat Currently holds no information.
type Game ¶
type Game struct { Animation *Animation `json:"animation,omitempty"` Description string `json:"description"` Photo []PhotoSize `json:"photo,omitempty"` Text string `json:"text,omitempty"` TextEntities []MessageEntity `json:"text_entities,omitempty"` Title string `json:"title"` }
Game Represents a game Use BotFather to create and edit games, their short names will act as unique identifiers.
type GameHighScore ¶
type GameHighScore struct { Position int `json:"position"` Score int `json:"score"` User User `json:"user"` }
GameHighScore Represents one row of the high scores table for a game.
type GeneralForumTopicHidden ¶
type GeneralForumTopicHidden any
GeneralForumTopicHidden Represents a service message about General forum topic hidden in the chat Currently holds no information.
type GeneralForumTopicUnhidden ¶
type GeneralForumTopicUnhidden any
GeneralForumTopicUnhidden Represents a service message about General forum topic unhidden in the chat Currently holds no information.
type InlineKeyboardButton ¶
type InlineKeyboardButton struct { CallbackData string `json:"callback_data,omitempty"` CallbackGame *CallbackGame `json:"callback_game,omitempty"` LoginURL *LoginUrl `json:"login_url,omitempty"` Pay bool `json:"pay,omitempty"` SwitchInlineQuery string `json:"switch_inline_query,omitempty"` SwitchInlineQueryChosenChat *SwitchInlineQueryChosenChat `json:"switch_inline_query_chosen_chat,omitempty"` SwitchInlineQueryCurrentChat string `json:"switch_inline_query_current_chat,omitempty"` Text string `json:"text"` URL string `json:"url,omitempty"` WebApp *WebAppInfo `json:"web_app,omitempty"` }
InlineKeyboardButton Represents one button of an inline keyboard You must use exactly one of the optional fields.
type InlineKeyboardMarkup ¶
type InlineKeyboardMarkup struct {
InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard,omitempty"`
}
InlineKeyboardMarkup Represents an inline keyboard that appears right next to the message it belongs to. Note: This will only work in Telegram versions released after 9 April, 2016 Older clients will display unsupported message.
type InlineQuery ¶
type InlineQuery struct { ChatType string `json:"chat_type,omitempty"` From User `json:"from"` ID string `json:"id"` Location *Location `json:"location,omitempty"` Offset string `json:"offset"` Query string `json:"query"` }
InlineQuery Represents an incoming inline query When the user sends an empty query, your bot could return some default or trending results.
type InlineQueryResult ¶
type InlineQueryResult any
InlineQueryResult Represents one result of an inline query Telegram clients currently support results of the following 20 types:
- InlineQueryResultCachedAudio
- InlineQueryResultCachedDocument
- InlineQueryResultCachedGif
- InlineQueryResultCachedMpeg4Gif
- InlineQueryResultCachedPhoto
- InlineQueryResultCachedSticker
- InlineQueryResultCachedVideo
- InlineQueryResultCachedVoice
- InlineQueryResultArticle
- InlineQueryResultAudio
- InlineQueryResultContact
- InlineQueryResultGame
- InlineQueryResultDocument
- InlineQueryResultGif
- InlineQueryResultLocation
- InlineQueryResultMpeg4Gif
- InlineQueryResultPhoto
- InlineQueryResultVenue
- InlineQueryResultVideo
- InlineQueryResultVoice
Note: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public.
type InlineQueryResultArticle ¶
type InlineQueryResultArticle struct { Description string `json:"description,omitempty"` HideURL bool `json:"hide_url,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ThumbnailHeight int `json:"thumbnail_height,omitempty"` ThumbnailURL string `json:"thumbnail_url,omitempty"` ThumbnailWidth int64 `json:"thumbnail_width,omitempty"` Title string `json:"title"` URL string `json:"url,omitempty"` }
InlineQueryResultArticle Represents a link to an article or web page.
func (InlineQueryResultArticle) MarshalJSON ¶
func (entity InlineQueryResultArticle) MarshalJSON() ([]byte, error)
type InlineQueryResultAudio ¶
type InlineQueryResultAudio struct { AudioDuration int `json:"audio_duration,omitempty"` AudioURL string `json:"audio_url"` Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ParseMode string `json:"parse_mode,omitempty"` Performer string `json:"performer,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` Title string `json:"title"` }
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. Note: This will only work in Telegram versions released after 9 April, 2016 Older clients will ignore them.
func (InlineQueryResultAudio) MarshalJSON ¶
func (entity InlineQueryResultAudio) MarshalJSON() ([]byte, error)
type InlineQueryResultCachedAudio ¶
type InlineQueryResultCachedAudio struct { AudioFileID string `json:"audio_file_id"` Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` }
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. Note: This will only work in Telegram versions released after 9 April, 2016 Older clients will ignore them.
func (InlineQueryResultCachedAudio) MarshalJSON ¶
func (entity InlineQueryResultCachedAudio) MarshalJSON() ([]byte, error)
type InlineQueryResultCachedDocument ¶
type InlineQueryResultCachedDocument struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` Description string `json:"description,omitempty"` DocumentFileID string `json:"document_file_id"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` Title string `json:"title"` }
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. Note: This will only work in Telegram versions released after 9 April, 2016 Older clients will ignore them.
func (InlineQueryResultCachedDocument) MarshalJSON ¶
func (entity InlineQueryResultCachedDocument) MarshalJSON() ([]byte, error)
type InlineQueryResultCachedGif ¶
type InlineQueryResultCachedGif struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` GifFileID string `json:"gif_file_id"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` Title string `json:"title,omitempty"` }
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.
func (InlineQueryResultCachedGif) MarshalJSON ¶
func (entity InlineQueryResultCachedGif) MarshalJSON() ([]byte, error)
type InlineQueryResultCachedMpeg4Gif ¶
type InlineQueryResultCachedMpeg4Gif struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` Mpeg4FileID string `json:"mpeg4_file_id"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` Title string `json:"title,omitempty"` }
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.
func (InlineQueryResultCachedMpeg4Gif) MarshalJSON ¶
func (entity InlineQueryResultCachedMpeg4Gif) MarshalJSON() ([]byte, error)
type InlineQueryResultCachedPhoto ¶
type InlineQueryResultCachedPhoto struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` Description string `json:"description,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ParseMode string `json:"parse_mode,omitempty"` PhotoFileID string `json:"photo_file_id"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` Title string `json:"title,omitempty"` }
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.
func (InlineQueryResultCachedPhoto) MarshalJSON ¶
func (entity InlineQueryResultCachedPhoto) MarshalJSON() ([]byte, error)
type InlineQueryResultCachedSticker ¶
type InlineQueryResultCachedSticker struct { ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` StickerFileID string `json:"sticker_file_id"` }
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. Note: This will only work in Telegram versions released after 9 April, 2016 for static stickers and after 06 July, 2019 for animated stickers Older clients will ignore them.
func (InlineQueryResultCachedSticker) MarshalJSON ¶
func (entity InlineQueryResultCachedSticker) MarshalJSON() ([]byte, error)
type InlineQueryResultCachedVideo ¶
type InlineQueryResultCachedVideo struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` Description string `json:"description,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` Title string `json:"title"` VideoFileID string `json:"video_file_id"` }
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.
func (InlineQueryResultCachedVideo) MarshalJSON ¶
func (entity InlineQueryResultCachedVideo) MarshalJSON() ([]byte, error)
type InlineQueryResultCachedVoice ¶
type InlineQueryResultCachedVoice struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` Title string `json:"title"` VoiceFileID string `json:"voice_file_id"` }
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. Note: This will only work in Telegram versions released after 9 April, 2016 Older clients will ignore them.
func (InlineQueryResultCachedVoice) MarshalJSON ¶
func (entity InlineQueryResultCachedVoice) MarshalJSON() ([]byte, error)
type InlineQueryResultContact ¶
type InlineQueryResultContact struct { FirstName string `json:"first_name"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` LastName string `json:"last_name,omitempty"` PhoneNumber string `json:"phone_number"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ThumbnailHeight int `json:"thumbnail_height,omitempty"` ThumbnailURL string `json:"thumbnail_url,omitempty"` ThumbnailWidth int64 `json:"thumbnail_width,omitempty"` Vcard string `json:"vcard,omitempty"` }
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. Note: This will only work in Telegram versions released after 9 April, 2016 Older clients will ignore them.
func (InlineQueryResultContact) MarshalJSON ¶
func (entity InlineQueryResultContact) MarshalJSON() ([]byte, error)
type InlineQueryResultDocument ¶
type InlineQueryResultDocument struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` Description string `json:"description,omitempty"` DocumentURL string `json:"document_url"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` MimeType string `json:"mime_type"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ThumbnailHeight int `json:"thumbnail_height,omitempty"` ThumbnailURL string `json:"thumbnail_url,omitempty"` ThumbnailWidth int64 `json:"thumbnail_width,omitempty"` Title string `json:"title"` }
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. Note: This will only work in Telegram versions released after 9 April, 2016 Older clients will ignore them.
func (InlineQueryResultDocument) MarshalJSON ¶
func (entity InlineQueryResultDocument) MarshalJSON() ([]byte, error)
type InlineQueryResultGame ¶
type InlineQueryResultGame struct { GameShortName string `json:"game_short_name"` ID string `json:"id"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` }
InlineQueryResultGame Represents a Game. Note: This will only work in Telegram versions released after October 1, 2016 Older clients will not display any inline results if a game result is among them.
func (InlineQueryResultGame) MarshalJSON ¶
func (entity InlineQueryResultGame) MarshalJSON() ([]byte, error)
type InlineQueryResultGif ¶
type InlineQueryResultGif struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` GifDuration int `json:"gif_duration,omitempty"` GifHeight int `json:"gif_height,omitempty"` GifURL string `json:"gif_url"` GifWidth int64 `json:"gif_width,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ThumbnailMimeType string `json:"thumbnail_mime_type,omitempty"` ThumbnailURL string `json:"thumbnail_url"` Title string `json:"title,omitempty"` }
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.
func (InlineQueryResultGif) MarshalJSON ¶
func (entity InlineQueryResultGif) MarshalJSON() ([]byte, error)
type InlineQueryResultLocation ¶
type InlineQueryResultLocation struct { Heading int `json:"heading,omitempty"` HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` Latitude float64 `json:"latitude"` LivePeriod int `json:"live_period,omitempty"` Longitude float64 `json:"longitude"` ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ThumbnailHeight int `json:"thumbnail_height,omitempty"` ThumbnailURL string `json:"thumbnail_url,omitempty"` ThumbnailWidth int64 `json:"thumbnail_width,omitempty"` Title string `json:"title"` }
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. Note: This will only work in Telegram versions released after 9 April, 2016 Older clients will ignore them.
func (InlineQueryResultLocation) MarshalJSON ¶
func (entity InlineQueryResultLocation) MarshalJSON() ([]byte, error)
type InlineQueryResultMpeg4Gif ¶
type InlineQueryResultMpeg4Gif struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` Mpeg4Duration int `json:"mpeg4_duration,omitempty"` Mpeg4Height int `json:"mpeg4_height,omitempty"` Mpeg4URL string `json:"mpeg4_url"` Mpeg4Width int64 `json:"mpeg4_width,omitempty"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ThumbnailMimeType string `json:"thumbnail_mime_type,omitempty"` ThumbnailURL string `json:"thumbnail_url"` Title string `json:"title,omitempty"` }
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.
func (InlineQueryResultMpeg4Gif) MarshalJSON ¶
func (entity InlineQueryResultMpeg4Gif) MarshalJSON() ([]byte, error)
type InlineQueryResultPhoto ¶
type InlineQueryResultPhoto struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` Description string `json:"description,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ParseMode string `json:"parse_mode,omitempty"` PhotoHeight int `json:"photo_height,omitempty"` PhotoURL string `json:"photo_url"` PhotoWidth int64 `json:"photo_width,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ThumbnailURL string `json:"thumbnail_url"` Title string `json:"title,omitempty"` }
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.
func (InlineQueryResultPhoto) MarshalJSON ¶
func (entity InlineQueryResultPhoto) MarshalJSON() ([]byte, error)
type InlineQueryResultVenue ¶
type InlineQueryResultVenue struct { Address string `json:"address"` FoursquareID string `json:"foursquare_id,omitempty"` FoursquareType string `json:"foursquare_type,omitempty"` GooglePlaceID string `json:"google_place_id,omitempty"` GooglePlaceType string `json:"google_place_type,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ThumbnailHeight int `json:"thumbnail_height,omitempty"` ThumbnailURL string `json:"thumbnail_url,omitempty"` ThumbnailWidth int64 `json:"thumbnail_width,omitempty"` Title string `json:"title"` }
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. Note: This will only work in Telegram versions released after 9 April, 2016 Older clients will ignore them.
func (InlineQueryResultVenue) MarshalJSON ¶
func (entity InlineQueryResultVenue) MarshalJSON() ([]byte, error)
type InlineQueryResultVideo ¶
type InlineQueryResultVideo struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` Description string `json:"description,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` MimeType string `json:"mime_type"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ThumbnailURL string `json:"thumbnail_url"` Title string `json:"title"` VideoDuration int64 `json:"video_duration,omitempty"` VideoHeight int64 `json:"video_height,omitempty"` VideoURL string `json:"video_url"` VideoWidth int64 `json:"video_width,omitempty"` }
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.
func (InlineQueryResultVideo) MarshalJSON ¶
func (entity InlineQueryResultVideo) MarshalJSON() ([]byte, error)
type InlineQueryResultVoice ¶
type InlineQueryResultVoice struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ID string `json:"id"` InputMessageContent any `json:"input_message_content,omitempty"` ParseMode string `json:"parse_mode,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` Title string `json:"title"` VoiceDuration int `json:"voice_duration,omitempty"` VoiceURL string `json:"voice_url"` }
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. Note: This will only work in Telegram versions released after 9 April, 2016 Older clients will ignore them.
func (InlineQueryResultVoice) MarshalJSON ¶
func (entity InlineQueryResultVoice) MarshalJSON() ([]byte, error)
type InlineQueryResultsButton ¶
type InlineQueryResultsButton struct { StartParameter string `json:"start_parameter,omitempty"` Text string `json:"text"` WebApp *WebAppInfo `json:"web_app,omitempty"` }
InlineQueryResultsButton Represents a button to be shown above inline query results You must use exactly one of the optional fields.
type InputBytes ¶
func (InputBytes) Content ¶
func (r InputBytes) Content() []byte
func (InputBytes) FileName ¶
func (r InputBytes) FileName() string
type InputContactMessageContent ¶
type InputContactMessageContent struct { FirstName string `json:"first_name"` LastName string `json:"last_name,omitempty"` PhoneNumber string `json:"phone_number"` Vcard string `json:"vcard,omitempty"` }
InputContactMessageContent Represents the content of a contact message to be sent as the result of an inline query.
type InputInvoiceMessageContent ¶
type InputInvoiceMessageContent struct { Currency string `json:"currency"` Description string `json:"description"` IsFlexible bool `json:"is_flexible,omitempty"` MaxTipAmount int `json:"max_tip_amount,omitempty"` NeedEmail bool `json:"need_email,omitempty"` NeedName bool `json:"need_name,omitempty"` NeedPhoneNumber bool `json:"need_phone_number,omitempty"` NeedShippingAddress bool `json:"need_shipping_address,omitempty"` Payload string `json:"payload"` PhotoHeight int `json:"photo_height,omitempty"` PhotoSize int `json:"photo_size,omitempty"` PhotoURL string `json:"photo_url,omitempty"` PhotoWidth int64 `json:"photo_width,omitempty"` Prices []LabeledPrice `json:"prices,omitempty"` ProviderData string `json:"provider_data,omitempty"` ProviderToken string `json:"provider_token"` SendEmailToProvider bool `json:"send_email_to_provider,omitempty"` SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider,omitempty"` SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"` Title string `json:"title"` }
InputInvoiceMessageContent Represents the content of an invoice message to be sent as the result of an inline query.
type InputLocationMessageContent ¶
type InputLocationMessageContent struct { Heading int `json:"heading,omitempty"` HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"` Latitude float64 `json:"latitude"` LivePeriod int `json:"live_period,omitempty"` Longitude float64 `json:"longitude"` ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"` }
InputLocationMessageContent Represents the content of a location message to be sent as the result of an inline query.
type InputMedia ¶
type InputMediaAnimation ¶
type InputMediaAnimation struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` Duration int `json:"duration,omitempty"` HasSpoiler bool `json:"has_spoiler,omitempty"` Height int `json:"height,omitempty"` Media rawTypes.InputFile `json:"media,omitempty"` ParseMode string `json:"parse_mode,omitempty"` Thumbnail rawTypes.InputFile `json:"thumbnail,omitempty"` Width int64 `json:"width,omitempty"` }
InputMediaAnimation Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
func (*InputMediaAnimation) Files ¶
func (entity *InputMediaAnimation) Files() map[string]rawTypes.InputFile
func (InputMediaAnimation) MarshalJSON ¶
func (entity InputMediaAnimation) MarshalJSON() ([]byte, error)
func (*InputMediaAnimation) SetAttachment ¶
func (entity *InputMediaAnimation) SetAttachment(attach string)
func (*InputMediaAnimation) SetAttachmentThumb ¶
func (entity *InputMediaAnimation) SetAttachmentThumb(_ string)
type InputMediaAudio ¶
type InputMediaAudio struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` Duration int `json:"duration,omitempty"` Media rawTypes.InputFile `json:"media,omitempty"` ParseMode string `json:"parse_mode,omitempty"` Performer string `json:"performer,omitempty"` Thumbnail rawTypes.InputFile `json:"thumbnail,omitempty"` Title string `json:"title,omitempty"` }
InputMediaAudio Represents an audio file to be treated as music to be sent.
func (*InputMediaAudio) Files ¶
func (entity *InputMediaAudio) Files() map[string]rawTypes.InputFile
func (InputMediaAudio) MarshalJSON ¶
func (entity InputMediaAudio) MarshalJSON() ([]byte, error)
func (*InputMediaAudio) SetAttachment ¶
func (entity *InputMediaAudio) SetAttachment(attach string)
func (*InputMediaAudio) SetAttachmentThumb ¶
func (entity *InputMediaAudio) SetAttachmentThumb(_ string)
type InputMediaDocument ¶
type InputMediaDocument struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` DisableContentTypeDetection bool `json:"disable_content_type_detection,omitempty"` Media rawTypes.InputFile `json:"media,omitempty"` ParseMode string `json:"parse_mode,omitempty"` Thumbnail rawTypes.InputFile `json:"thumbnail,omitempty"` }
InputMediaDocument Represents a general file to be sent.
func (*InputMediaDocument) Files ¶
func (entity *InputMediaDocument) Files() map[string]rawTypes.InputFile
func (InputMediaDocument) MarshalJSON ¶
func (entity InputMediaDocument) MarshalJSON() ([]byte, error)
func (*InputMediaDocument) SetAttachment ¶
func (entity *InputMediaDocument) SetAttachment(attach string)
func (*InputMediaDocument) SetAttachmentThumb ¶
func (entity *InputMediaDocument) SetAttachmentThumb(_ string)
type InputMediaPhoto ¶
type InputMediaPhoto struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` HasSpoiler bool `json:"has_spoiler,omitempty"` Media rawTypes.InputFile `json:"media,omitempty"` ParseMode string `json:"parse_mode,omitempty"` }
InputMediaPhoto Represents a photo to be sent.
func (*InputMediaPhoto) Files ¶
func (entity *InputMediaPhoto) Files() map[string]rawTypes.InputFile
func (InputMediaPhoto) MarshalJSON ¶
func (entity InputMediaPhoto) MarshalJSON() ([]byte, error)
func (*InputMediaPhoto) SetAttachment ¶
func (entity *InputMediaPhoto) SetAttachment(attach string)
func (*InputMediaPhoto) SetAttachmentThumb ¶
func (entity *InputMediaPhoto) SetAttachmentThumb(_ string)
type InputMediaVideo ¶
type InputMediaVideo struct { Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` Duration int `json:"duration,omitempty"` HasSpoiler bool `json:"has_spoiler,omitempty"` Height int `json:"height,omitempty"` Media rawTypes.InputFile `json:"media,omitempty"` ParseMode string `json:"parse_mode,omitempty"` SupportsStreaming bool `json:"supports_streaming,omitempty"` Thumbnail rawTypes.InputFile `json:"thumbnail,omitempty"` Width int64 `json:"width,omitempty"` }
InputMediaVideo Represents a video to be sent.
func (*InputMediaVideo) Files ¶
func (entity *InputMediaVideo) Files() map[string]rawTypes.InputFile
func (InputMediaVideo) MarshalJSON ¶
func (entity InputMediaVideo) MarshalJSON() ([]byte, error)
func (*InputMediaVideo) SetAttachment ¶
func (entity *InputMediaVideo) SetAttachment(attach string)
func (*InputMediaVideo) SetAttachmentThumb ¶
func (entity *InputMediaVideo) SetAttachmentThumb(_ string)
type InputMessageContent ¶
type InputMessageContent any
InputMessageContent Represents the content of a message to be sent as a result of an inline query Telegram clients currently support the following 5 types:
- InputTextMessageContent
- InputLocationMessageContent
- InputVenueMessageContent
- InputContactMessageContent
- InputInvoiceMessageContent
type InputSticker ¶
type InputSticker struct { EmojiList []string `json:"emoji_list,omitempty"` Keywords []string `json:"keywords,omitempty"` MaskPosition *MaskPosition `json:"mask_position,omitempty"` Sticker rawTypes.InputFile `json:"sticker,omitempty"` }
InputSticker This object describes a sticker to be added to a sticker set.
type InputTextMessageContent ¶
type InputTextMessageContent struct { DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"` Entities []MessageEntity `json:"entities,omitempty"` MessageText string `json:"message_text"` ParseMode string `json:"parse_mode,omitempty"` }
InputTextMessageContent Represents the content of a text message to be sent as the result of an inline query.
type InputVenueMessageContent ¶
type InputVenueMessageContent struct { Address string `json:"address"` FoursquareID string `json:"foursquare_id,omitempty"` FoursquareType string `json:"foursquare_type,omitempty"` GooglePlaceID string `json:"google_place_id,omitempty"` GooglePlaceType string `json:"google_place_type,omitempty"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Title string `json:"title"` }
InputVenueMessageContent Represents the content of a venue message to be sent as the result of an inline query.
type Invoice ¶
type Invoice struct { Currency string `json:"currency"` Description string `json:"description"` StartParameter string `json:"start_parameter"` Title string `json:"title"` TotalAmount int `json:"total_amount"` }
Invoice This object contains basic information about an invoice.
type KeyboardButton ¶
type KeyboardButton struct { RequestChat *KeyboardButtonRequestChat `json:"request_chat,omitempty"` RequestContact bool `json:"request_contact,omitempty"` RequestLocation bool `json:"request_location,omitempty"` RequestPoll *KeyboardButtonPollType `json:"request_poll,omitempty"` RequestUser *KeyboardButtonRequestUser `json:"request_user,omitempty"` Text string `json:"text"` WebApp *WebAppInfo `json:"web_app,omitempty"` }
KeyboardButton Represents one button of the reply keyboard For simple text buttons, String can be used instead of this object to specify the button text The optional fields web_app, request_user, request_chat, request_contact, request_location, and request_poll are mutually exclusive. Note: request_contact and request_location options will only work in Telegram versions released after 9 April, 2016 Older clients will display unsupported message.Note: request_poll option will only work in Telegram versions released after 23 January, 2020 Older clients will display unsupported message.Note: web_app option will only work in Telegram versions released after 16 April, 2022 Older clients will display unsupported message.Note: request_user and request_chat options will only work in Telegram versions released after 3 February, 2023 Older clients will display unsupported message.
type KeyboardButtonPollType ¶
type KeyboardButtonPollType struct {
Type string `json:"type,omitempty"`
}
KeyboardButtonPollType Represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
type KeyboardButtonRequestChat ¶
type KeyboardButtonRequestChat struct { BotAdministratorRights *ChatAdministratorRights `json:"bot_administrator_rights,omitempty"` BotIsMember bool `json:"bot_is_member,omitempty"` ChatHasUsername bool `json:"chat_has_username,omitempty"` ChatIsChannel bool `json:"chat_is_channel"` ChatIsCreated bool `json:"chat_is_created,omitempty"` ChatIsForum bool `json:"chat_is_forum,omitempty"` RequestID int64 `json:"request_id"` UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"` }
KeyboardButtonRequestChat This object defines the criteria used to request a suitable chat The identifier of the selected chat will be shared with the bot when the corresponding button is pressed More about requesting chats »
type KeyboardButtonRequestUser ¶
type KeyboardButtonRequestUser struct { RequestID int64 `json:"request_id"` UserIsBot bool `json:"user_is_bot,omitempty"` UserIsPremium bool `json:"user_is_premium,omitempty"` }
KeyboardButtonRequestUser This object defines the criteria used to request a suitable user The identifier of the selected user will be shared with the bot when the corresponding button is pressed More about requesting users »
type LabeledPrice ¶
LabeledPrice Represents a portion of the price for goods or services.
type Location ¶
type Location struct { Heading int `json:"heading,omitempty"` HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"` Latitude float64 `json:"latitude"` LivePeriod int `json:"live_period,omitempty"` Longitude float64 `json:"longitude"` ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"` }
Location Represents a point on the map.
type LoginUrl ¶
type LoginUrl struct { BotUsername string `json:"bot_username,omitempty"` ForwardText string `json:"forward_text,omitempty"` RequestWriteAccess bool `json:"request_write_access,omitempty"` URL string `json:"url"` }
LoginUrl 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: Telegram apps support these buttons as of version 5.7.
type MaskPosition ¶
type MaskPosition struct { Point string `json:"point"` Scale float64 `json:"scale"` XShift float64 `json:"x_shift"` YShift float64 `json:"y_shift"` }
MaskPosition This object describes the position on faces where a mask should be placed by default.
type MenuButton ¶
type MenuButton any
MenuButton This object describes the bot's menu button in a private chat It should be one of
- MenuButtonCommands
- MenuButtonWebApp
- MenuButtonDefault
If a menu button other than MenuButtonDefault is set for a private chat, then it is applied in the chat Otherwise the default menu button is applied By default, the menu button opens the list of bot commands.
type MenuButtonCommands ¶
type MenuButtonCommands struct {
Type string `json:"type"`
}
MenuButtonCommands Represents a menu button, which opens the bot's list of commands.
type MenuButtonDefault ¶
type MenuButtonDefault struct {
Type string `json:"type"`
}
MenuButtonDefault Describes that no specific value for the menu button was set.
type MenuButtonWebApp ¶
type MenuButtonWebApp struct { Text string `json:"text"` Type string `json:"type"` WebApp WebAppInfo `json:"web_app"` }
MenuButtonWebApp Represents a menu button, which launches a Web App.
type Message ¶
type Message struct { Animation *Animation `json:"animation,omitempty"` Audio *Audio `json:"audio,omitempty"` AuthorSignature string `json:"author_signature,omitempty"` Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ChannelChatCreated bool `json:"channel_chat_created,omitempty"` Chat Chat `json:"chat"` ConnectedWebsite string `json:"connected_website,omitempty"` Contact *Contact `json:"contact,omitempty"` Date int64 `json:"date"` DeleteChatPhoto bool `json:"delete_chat_photo,omitempty"` Dice *Dice `json:"dice,omitempty"` Document *Document `json:"document,omitempty"` EditDate int64 `json:"edit_date,omitempty"` Entities []MessageEntity `json:"entities,omitempty"` ForumTopicClosed *ForumTopicClosed `json:"forum_topic_closed,omitempty"` ForumTopicCreated *ForumTopicCreated `json:"forum_topic_created,omitempty"` ForumTopicEdited *ForumTopicEdited `json:"forum_topic_edited,omitempty"` ForumTopicReopened *ForumTopicReopened `json:"forum_topic_reopened,omitempty"` ForwardDate int64 `json:"forward_date,omitempty"` ForwardFrom *User `json:"forward_from,omitempty"` ForwardFromChat *Chat `json:"forward_from_chat,omitempty"` ForwardFromMessageID int64 `json:"forward_from_message_id,omitempty"` ForwardSenderName string `json:"forward_sender_name,omitempty"` ForwardSignature string `json:"forward_signature,omitempty"` From *User `json:"from,omitempty"` Game *Game `json:"game,omitempty"` GeneralForumTopicHidden *GeneralForumTopicHidden `json:"general_forum_topic_hidden,omitempty"` GroupChatCreated bool `json:"group_chat_created,omitempty"` HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"` HasProtectedContent bool `json:"has_protected_content,omitempty"` Invoice *Invoice `json:"invoice,omitempty"` IsAutomaticForward bool `json:"is_automatic_forward,omitempty"` IsTopicMessage bool `json:"is_topic_message,omitempty"` LeftChatMember *User `json:"left_chat_member,omitempty"` Location *Location `json:"location,omitempty"` MediaGroupID string `json:"media_group_id,omitempty"` MessageAutoDeleteTimerChanged *MessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed,omitempty"` MessageID int64 `json:"message_id"` MessageThreadID int64 `json:"message_thread_id,omitempty"` MigrateFromChatID int64 `json:"migrate_from_chat_id,omitempty"` MigrateToChatID int64 `json:"migrate_to_chat_id,omitempty"` NewChatMembers []User `json:"new_chat_members,omitempty"` NewChatPhoto []PhotoSize `json:"new_chat_photo,omitempty"` NewChatTitle string `json:"new_chat_title,omitempty"` PassportData *PassportData `json:"passport_data,omitempty"` Photo []PhotoSize `json:"photo,omitempty"` PinnedMessage *Message `json:"pinned_message,omitempty"` Poll *Poll `json:"poll,omitempty"` ProximityAlertTriggered *ProximityAlertTriggered `json:"proximity_alert_triggered,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ReplyToMessage *Message `json:"reply_to_message,omitempty"` SenderChat *Chat `json:"sender_chat,omitempty"` Sticker *Sticker `json:"sticker,omitempty"` SuccessfulPayment *SuccessfulPayment `json:"successful_payment,omitempty"` SupergroupChatCreated bool `json:"supergroup_chat_created,omitempty"` Text string `json:"text,omitempty"` Venue *Venue `json:"venue,omitempty"` ViaBot *User `json:"via_bot,omitempty"` Video *Video `json:"video,omitempty"` VideoChatEnded *VideoChatEnded `json:"video_chat_ended,omitempty"` VideoChatParticipantsInvited *VideoChatParticipantsInvited `json:"video_chat_participants_invited,omitempty"` VideoChatScheduled *VideoChatScheduled `json:"video_chat_scheduled,omitempty"` VideoChatStarted *VideoChatStarted `json:"video_chat_started,omitempty"` VideoNote *VideoNote `json:"video_note,omitempty"` Voice *Voice `json:"voice,omitempty"` WebAppData *WebAppData `json:"web_app_data,omitempty"` WriteAccessAllowed *WriteAccessAllowed `json:"write_access_allowed,omitempty"` }
Message Represents a message.
type MessageAutoDeleteTimerChanged ¶
type MessageAutoDeleteTimerChanged struct {
MessageAutoDeleteTime int `json:"message_auto_delete_time"`
}
MessageAutoDeleteTimerChanged Represents a service message about a change in auto-delete timer settings.
type MessageEntity ¶
type MessageEntity struct { CustomEmojiID string `json:"custom_emoji_id,omitempty"` Language string `json:"language,omitempty"` Length int `json:"length"` Offset int `json:"offset"` Type string `json:"type"` URL string `json:"url,omitempty"` User *User `json:"user,omitempty"` }
MessageEntity Represents one special entity in a text message For example, hashtags, usernames, URLs, etc.
type MessageId ¶
type MessageId struct {
MessageID int64 `json:"message_id"`
}
MessageId Represents a unique message identifier.
type OrderInfo ¶
type OrderInfo struct { Email string `json:"email,omitempty"` Name string `json:"name,omitempty"` PhoneNumber string `json:"phone_number,omitempty"` ShippingAddress *ShippingAddress `json:"shipping_address,omitempty"` }
OrderInfo Represents information about an order.
type PassportData ¶
type PassportData struct { Credentials EncryptedCredentials `json:"credentials"` Data []EncryptedPassportElement `json:"data,omitempty"` }
PassportData Describes Telegram Passport data shared with the bot by the user.
type PassportElementError ¶
type PassportElementError any
PassportElementError Represents an error in the Telegram Passport element which was submitted that should be resolved by the user It should be one of:
- PassportElementErrorDataField
- PassportElementErrorFrontSide
- PassportElementErrorReverseSide
- PassportElementErrorSelfie
- PassportElementErrorFile
- PassportElementErrorFiles
- PassportElementErrorTranslationFile
- PassportElementErrorTranslationFiles
- PassportElementErrorUnspecified
type PassportElementErrorDataField ¶
type PassportElementErrorDataField struct { DataHash string `json:"data_hash"` FieldName string `json:"field_name"` Message string `json:"message"` Source string `json:"source"` Type string `json:"type"` }
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 PassportElementErrorFile ¶
type PassportElementErrorFile struct { FileHash string `json:"file_hash"` Message string `json:"message"` Source string `json:"source"` Type string `json:"type"` }
PassportElementErrorFile Represents an issue with a document scan The error is considered resolved when the file with the document scan changes.
type PassportElementErrorFiles ¶
type PassportElementErrorFiles struct { FileHashes []string `json:"file_hashes,omitempty"` Message string `json:"message"` Source string `json:"source"` Type string `json:"type"` }
PassportElementErrorFiles Represents an issue with a list of scans The error is considered resolved when the list of files containing the scans changes.
type PassportElementErrorFrontSide ¶
type PassportElementErrorFrontSide struct { FileHash string `json:"file_hash"` Message string `json:"message"` Source string `json:"source"` Type string `json:"type"` }
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 PassportElementErrorReverseSide ¶
type PassportElementErrorReverseSide struct { FileHash string `json:"file_hash"` Message string `json:"message"` Source string `json:"source"` Type string `json:"type"` }
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 PassportElementErrorSelfie ¶
type PassportElementErrorSelfie struct { FileHash string `json:"file_hash"` Message string `json:"message"` Source string `json:"source"` Type string `json:"type"` }
PassportElementErrorSelfie Represents an issue with the selfie with a document The error is considered resolved when the file with the selfie changes.
type PassportElementErrorTranslationFile ¶
type PassportElementErrorTranslationFile struct { FileHash string `json:"file_hash"` Message string `json:"message"` Source string `json:"source"` Type string `json:"type"` }
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 PassportElementErrorTranslationFiles ¶
type PassportElementErrorTranslationFiles struct { FileHashes []string `json:"file_hashes,omitempty"` Message string `json:"message"` Source string `json:"source"` Type string `json:"type"` }
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 PassportElementErrorUnspecified ¶
type PassportElementErrorUnspecified struct { ElementHash string `json:"element_hash"` Message string `json:"message"` Source string `json:"source"` Type string `json:"type"` }
PassportElementErrorUnspecified Represents an issue in an unspecified place The error is considered resolved when new data is added.
type PassportFile ¶
type PassportFile struct { FileDate int64 `json:"file_date"` FileID string `json:"file_id"` FileSize int `json:"file_size"` FileUniqueID string `json:"file_unique_id"` }
PassportFile Represents a file uploaded to Telegram Passport Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.
type PhotoSize ¶
type PhotoSize struct { FileID string `json:"file_id"` FileSize int `json:"file_size,omitempty"` FileUniqueID string `json:"file_unique_id"` Height int `json:"height"` Width int64 `json:"width"` }
PhotoSize Represents one size of a photo or a file / sticker thumbnail.
type Poll ¶
type Poll struct { AllowsMultipleAnswers bool `json:"allows_multiple_answers"` CloseDate int64 `json:"close_date,omitempty"` CorrectOptionID int64 `json:"correct_option_id,omitempty"` Explanation string `json:"explanation,omitempty"` ExplanationEntities []MessageEntity `json:"explanation_entities,omitempty"` ID string `json:"id"` IsAnonymous bool `json:"is_anonymous"` IsClosed bool `json:"is_closed"` OpenPeriod int `json:"open_period,omitempty"` Options []PollOption `json:"options,omitempty"` Question string `json:"question"` TotalVoterCount int `json:"total_voter_count"` Type string `json:"type"` }
Poll This object contains information about a poll.
type PollAnswer ¶
type PollAnswer struct { OptionIDs []int64 `json:"option_ids,omitempty"` PollID string `json:"poll_id"` User User `json:"user"` }
PollAnswer Represents an answer of a user in a non-anonymous poll.
type PollOption ¶
PollOption This object contains information about one answer option in a poll.
type PreCheckoutQuery ¶
type PreCheckoutQuery struct { Currency string `json:"currency"` From User `json:"from"` ID string `json:"id"` InvoicePayload string `json:"invoice_payload"` OrderInfo *OrderInfo `json:"order_info,omitempty"` ShippingOptionID string `json:"shipping_option_id,omitempty"` TotalAmount int `json:"total_amount"` }
PreCheckoutQuery This object contains information about an incoming pre-checkout query.
type ProximityAlertTriggered ¶
type ProximityAlertTriggered struct { Distance int `json:"distance"` Traveler User `json:"traveler"` Watcher User `json:"watcher"` }
ProximityAlertTriggered Represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
type ReplyKeyboardMarkup ¶
type ReplyKeyboardMarkup struct { InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"` IsPersistent bool `json:"is_persistent,omitempty"` Keyboard [][]KeyboardButton `json:"keyboard,omitempty"` OneTimeKeyboard bool `json:"one_time_keyboard,omitempty"` ResizeKeyboard bool `json:"resize_keyboard,omitempty"` Selective bool `json:"selective,omitempty"` }
ReplyKeyboardMarkup Represents a custom keyboard with reply options (see Introduction to bots for details and examples).
type ReplyKeyboardRemove ¶
type ReplyKeyboardRemove struct { RemoveKeyboard bool `json:"remove_keyboard"` Selective bool `json:"selective,omitempty"` }
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 SentWebAppMessage ¶
type SentWebAppMessage struct {
InlineMessageID string `json:"inline_message_id,omitempty"`
}
SentWebAppMessage Describes an inline message sent by a Web App on behalf of a user.
type ShippingAddress ¶
type ShippingAddress struct { City string `json:"city"` CountryCode string `json:"country_code"` PostCode string `json:"post_code"` State string `json:"state"` StreetLine1 string `json:"street_line1"` StreetLine2 string `json:"street_line2"` }
ShippingAddress Represents a shipping address.
type ShippingOption ¶
type ShippingOption struct { ID string `json:"id"` Prices []LabeledPrice `json:"prices,omitempty"` Title string `json:"title"` }
ShippingOption Represents one shipping option.
type ShippingQuery ¶
type ShippingQuery struct { From User `json:"from"` ID string `json:"id"` InvoicePayload string `json:"invoice_payload"` ShippingAddress ShippingAddress `json:"shipping_address"` }
ShippingQuery This object contains information about an incoming shipping query.
type Sticker ¶
type Sticker struct { CustomEmojiID string `json:"custom_emoji_id,omitempty"` Emoji string `json:"emoji,omitempty"` FileID string `json:"file_id"` FileSize int `json:"file_size,omitempty"` FileUniqueID string `json:"file_unique_id"` Height int `json:"height"` IsAnimated bool `json:"is_animated"` IsVideo bool `json:"is_video"` MaskPosition *MaskPosition `json:"mask_position,omitempty"` NeedsRepainting bool `json:"needs_repainting,omitempty"` PremiumAnimation *File `json:"premium_animation,omitempty"` SetName string `json:"set_name,omitempty"` Thumbnail *PhotoSize `json:"thumbnail,omitempty"` Type string `json:"type"` Width int64 `json:"width"` }
Sticker Represents a sticker.
type StickerSet ¶
type StickerSet struct { IsAnimated bool `json:"is_animated"` IsVideo bool `json:"is_video"` Name string `json:"name"` StickerType string `json:"sticker_type"` Stickers []Sticker `json:"stickers,omitempty"` Thumbnail *PhotoSize `json:"thumbnail,omitempty"` Title string `json:"title"` }
StickerSet Represents a sticker set.
type SuccessfulPayment ¶
type SuccessfulPayment struct { Currency string `json:"currency"` InvoicePayload string `json:"invoice_payload"` OrderInfo *OrderInfo `json:"order_info,omitempty"` ProviderPaymentChargeID string `json:"provider_payment_charge_id"` ShippingOptionID string `json:"shipping_option_id,omitempty"` TelegramPaymentChargeID string `json:"telegram_payment_charge_id"` TotalAmount int `json:"total_amount"` }
SuccessfulPayment This object contains basic information about a successful payment.
type SwitchInlineQueryChosenChat ¶
type SwitchInlineQueryChosenChat struct { AllowBotChats bool `json:"allow_bot_chats,omitempty"` AllowChannelChats bool `json:"allow_channel_chats,omitempty"` AllowGroupChats bool `json:"allow_group_chats,omitempty"` AllowUserChats bool `json:"allow_user_chats,omitempty"` Query string `json:"query,omitempty"` }
SwitchInlineQueryChosenChat Represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.
type Update ¶
type Update struct { CallbackQuery *CallbackQuery `json:"callback_query,omitempty"` ChannelPost *Message `json:"channel_post,omitempty"` ChatJoinRequest *ChatJoinRequest `json:"chat_join_request,omitempty"` ChatMember *ChatMemberUpdated `json:"chat_member,omitempty"` ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result,omitempty"` EditedChannelPost *Message `json:"edited_channel_post,omitempty"` EditedMessage *Message `json:"edited_message,omitempty"` InlineQuery *InlineQuery `json:"inline_query,omitempty"` Message *Message `json:"message,omitempty"` MyChatMember *ChatMemberUpdated `json:"my_chat_member,omitempty"` Poll *Poll `json:"poll,omitempty"` PollAnswer *PollAnswer `json:"poll_answer,omitempty"` PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query,omitempty"` ShippingQuery *ShippingQuery `json:"shipping_query,omitempty"` UpdateID int64 `json:"update_id"` }
Update Represents an incoming update.At most one of the optional parameters can be present in any given update.
type User ¶
type User struct { AddedToAttachmentMenu bool `json:"added_to_attachment_menu,omitempty"` CanJoinGroups bool `json:"can_join_groups,omitempty"` CanReadAllGroupMessages bool `json:"can_read_all_group_messages,omitempty"` FirstName string `json:"first_name"` ID int64 `json:"id"` IsBot bool `json:"is_bot"` IsPremium bool `json:"is_premium,omitempty"` LanguageCode string `json:"language_code,omitempty"` LastName string `json:"last_name,omitempty"` SupportsInlineQueries bool `json:"supports_inline_queries,omitempty"` Username string `json:"username,omitempty"` }
User Represents a Telegram user or bot.
type UserProfilePhotos ¶
type UserProfilePhotos struct { Photos [][]PhotoSize `json:"photos,omitempty"` TotalCount int `json:"total_count"` }
UserProfilePhotos This object represent a user's profile pictures.
type UserShared ¶
type UserShared struct {}
UserShared This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.
type Venue ¶
type Venue struct { Address string `json:"address"` FoursquareID string `json:"foursquare_id,omitempty"` FoursquareType string `json:"foursquare_type,omitempty"` GooglePlaceID string `json:"google_place_id,omitempty"` GooglePlaceType string `json:"google_place_type,omitempty"` Location Location `json:"location"` Title string `json:"title"` }
Venue Represents a venue.
type Video ¶
type Video struct { Duration int `json:"duration"` FileID string `json:"file_id"` FileName string `json:"file_name,omitempty"` FileSize int `json:"file_size,omitempty"` FileUniqueID string `json:"file_unique_id"` Height int `json:"height"` MimeType string `json:"mime_type,omitempty"` Thumbnail *PhotoSize `json:"thumbnail,omitempty"` Width int64 `json:"width"` }
Video Represents a video file.
type VideoChatEnded ¶
type VideoChatEnded struct {
Duration int `json:"duration"`
}
VideoChatEnded Represents a service message about a video chat ended in the chat.
type VideoChatParticipantsInvited ¶
type VideoChatParticipantsInvited struct {
Users []User `json:"users,omitempty"`
}
VideoChatParticipantsInvited Represents a service message about new members invited to a video chat.
type VideoChatScheduled ¶
type VideoChatScheduled struct {
StartDate int64 `json:"start_date"`
}
VideoChatScheduled Represents a service message about a video chat scheduled in the chat.
type VideoChatStarted ¶
type VideoChatStarted any
VideoChatStarted Represents a service message about a video chat started in the chat Currently holds no information.
type VideoNote ¶
type VideoNote struct { Duration int `json:"duration"` FileID string `json:"file_id"` FileSize int `json:"file_size,omitempty"` FileUniqueID string `json:"file_unique_id"` Length int `json:"length"` Thumbnail *PhotoSize `json:"thumbnail,omitempty"` }
VideoNote Represents a video message (available in Telegram apps as of v.4.0).
type Voice ¶
type Voice struct { Duration int `json:"duration"` FileID string `json:"file_id"` FileSize int `json:"file_size,omitempty"` FileUniqueID string `json:"file_unique_id"` MimeType string `json:"mime_type,omitempty"` }
Voice Represents a voice note.
type WebAppData ¶
WebAppData Describes data sent from a Web App to the bot.
type WebAppInfo ¶
type WebAppInfo struct {
URL string `json:"url"`
}
WebAppInfo Describes a Web App.
type WebhookInfo ¶
type WebhookInfo struct { AllowedUpdates []string `json:"allowed_updates,omitempty"` HasCustomCertificate bool `json:"has_custom_certificate"` IPAddress string `json:"ip_address,omitempty"` LastErrorDate int64 `json:"last_error_date,omitempty"` LastErrorMessage string `json:"last_error_message,omitempty"` LastSynchronizationErrorDate int64 `json:"last_synchronization_error_date,omitempty"` MaxConnections int `json:"max_connections,omitempty"` PendingUpdateCount int64 `json:"pending_update_count"` URL string `json:"url"` }
WebhookInfo Describes the current status of a webhook.
type WriteAccessAllowed ¶
type WriteAccessAllowed struct {
WebAppName string `json:"web_app_name,omitempty"`
}
WriteAccessAllowed Represents a service message about a user allowing a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.
Source Files ¶
- animation.go
- audio.go
- bot_command.go
- bot_command_scope.go
- bot_command_scope_all_chat_administrators.go
- bot_command_scope_all_group_chats.go
- bot_command_scope_all_private_chats.go
- bot_command_scope_chat.go
- bot_command_scope_chat_administrators.go
- bot_command_scope_chat_member.go
- bot_command_scope_default.go
- bot_description.go
- bot_name.go
- bot_short_description.go
- callback_game.go
- callback_query.go
- chat.go
- chat_administrator_rights.go
- chat_invite_link.go
- chat_join_request.go
- chat_location.go
- chat_member.go
- chat_member_updated.go
- chat_permissions.go
- chat_photo.go
- chat_shared.go
- chosen_inline_result.go
- contact.go
- dice.go
- document.go
- encrypted_credentials.go
- encrypted_passport_element.go
- file.go
- force_reply.go
- forum_topic.go
- forum_topic_closed.go
- forum_topic_created.go
- forum_topic_edited.go
- forum_topic_reopened.go
- game.go
- game_high_score.go
- general_forum_topic_hidden.go
- general_forum_topic_unhidden.go
- inline_keyboard_button.go
- inline_keyboard_markup.go
- inline_query.go
- inline_query_result.go
- inline_query_result_article.go
- inline_query_result_audio.go
- inline_query_result_cached_audio.go
- inline_query_result_cached_document.go
- inline_query_result_cached_gif.go
- inline_query_result_cached_mpeg4_gif.go
- inline_query_result_cached_photo.go
- inline_query_result_cached_sticker.go
- inline_query_result_cached_video.go
- inline_query_result_cached_voice.go
- inline_query_result_contact.go
- inline_query_result_document.go
- inline_query_result_game.go
- inline_query_result_gif.go
- inline_query_result_location.go
- inline_query_result_mpeg4_gif.go
- inline_query_result_photo.go
- inline_query_result_venue.go
- inline_query_result_video.go
- inline_query_result_voice.go
- inline_query_results_button.go
- input_bytes.go
- input_contact_message_content.go
- input_file.go
- input_invoice_message_content.go
- input_location_message_content.go
- input_media.go
- input_media_animation.go
- input_media_audio.go
- input_media_document.go
- input_media_photo.go
- input_media_video.go
- input_message_content.go
- input_sticker.go
- input_text_message_content.go
- input_url.go
- input_venue_message_content.go
- invoice.go
- keyboard_button.go
- keyboard_button_poll_type.go
- keyboard_button_request_chat.go
- keyboard_button_request_user.go
- kinds.go
- labeled_price.go
- location.go
- login_url.go
- mask_position.go
- menu_button.go
- menu_button_commands.go
- menu_button_default.go
- menu_button_web_app.go
- message.go
- message_auto_delete_timer_changed.go
- message_entity.go
- message_id.go
- order_info.go
- passport_data.go
- passport_element_error.go
- passport_element_error_data_field.go
- passport_element_error_file.go
- passport_element_error_files.go
- passport_element_error_front_side.go
- passport_element_error_reverse_side.go
- passport_element_error_selfie.go
- passport_element_error_translation_file.go
- passport_element_error_translation_files.go
- passport_element_error_unspecified.go
- passport_file.go
- photo_size.go
- poll.go
- poll_answer.go
- poll_option.go
- pre_checkout_query.go
- proximity_alert_triggered.go
- reply_keyboard_markup.go
- reply_keyboard_remove.go
- sent_web_app_message.go
- shipping_address.go
- shipping_option.go
- shipping_query.go
- sticker.go
- sticker_set.go
- successful_payment.go
- switch_inline_query_chosen_chat.go
- update.go
- user.go
- user_profile_photos.go
- user_shared.go
- venue.go
- video.go
- video_chat_ended.go
- video_chat_participants_invited.go
- video_chat_scheduled.go
- video_chat_started.go
- video_note.go
- voice.go
- web_app_data.go
- web_app_info.go
- webhook_info.go
- write_access_allowed.go