Documentation ¶
Index ¶
- Constants
- func InputFile(filePath string) raw.InputFile
- type AffiliateInfo
- type Animation
- type Audio
- type BackgroundFill
- type BackgroundType
- type Birthdate
- 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 BusinessConnection
- type BusinessIntro
- type BusinessLocation
- type BusinessMessagesDeleted
- type BusinessOpeningHours
- type BusinessOpeningHoursInterval
- type CallbackGame
- type CallbackQuery
- type Chat
- type ChatAdministratorRights
- type ChatBackground
- type ChatBoost
- type ChatBoostAdded
- type ChatBoostRemoved
- type ChatBoostSource
- type ChatBoostUpdated
- type ChatFullInfo
- type ChatInviteLink
- type ChatJoinRequest
- type ChatLocation
- type ChatMember
- type ChatMemberUpdated
- type ChatPermissions
- type ChatPhoto
- type ChatShared
- type ChosenInlineResult
- type Contact
- type CopyTextButton
- type Dice
- type Document
- type EncryptedCredentials
- type EncryptedPassportElement
- type ExternalReplyInfo
- type File
- type ForceReply
- type ForumTopic
- type ForumTopicClosed
- type ForumTopicCreated
- type ForumTopicEdited
- type ForumTopicReopened
- type Game
- type GameHighScore
- type GeneralForumTopicHidden
- type GeneralForumTopicUnhidden
- type Gift
- type Gifts
- type Giveaway
- type GiveawayCompleted
- type GiveawayCreated
- type GiveawayWinners
- 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 InputPaidMedia
- type InputPaidMediaPhoto
- type InputPaidMediaVideo
- type InputPollOption
- type InputSticker
- type InputTextMessageContent
- type InputURL
- type InputVenueMessageContent
- type Invoice
- type KeyboardButton
- type KeyboardButtonPollType
- type KeyboardButtonRequestChat
- type KeyboardButtonRequestUsers
- type LabeledPrice
- type LinkPreviewOptions
- type Location
- type LoginUrl
- type MaskPosition
- type MaybeInaccessibleMessage
- type MenuButton
- type MenuButtonCommands
- type MenuButtonDefault
- type MenuButtonWebApp
- type Message
- type MessageAutoDeleteTimerChanged
- type MessageEntity
- type MessageId
- type MessageOrigin
- type MessageReactionCountUpdated
- type MessageReactionUpdated
- type OrderInfo
- type PaidMedia
- type PaidMediaInfo
- type PaidMediaPurchased
- 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 PreparedInlineMessage
- type ProximityAlertTriggered
- type ReactionCount
- type ReactionType
- type ReactionTypeCustomEmoji
- type ReactionTypeEmoji
- type ReactionTypePaid
- type RefundedPayment
- type ReplyKeyboardMarkup
- type ReplyKeyboardRemove
- type ReplyParameters
- type RevenueWithdrawalState
- type SentWebAppMessage
- type SharedUser
- type ShippingAddress
- type ShippingOption
- type ShippingQuery
- type StarTransaction
- type StarTransactions
- type Sticker
- type StickerSet
- type Story
- type SuccessfulPayment
- type SwitchInlineQueryChosenChat
- type TextQuote
- type TransactionPartner
- type Update
- type User
- type UserChatBoosts
- type UserProfilePhotos
- type UsersShared
- 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 ( TypeBackgroundTypeFill = iota TypeBackgroundTypeWallpaper TypeBackgroundTypePattern TypeBackgroundTypeChatTheme )
BACKGROUND_TYPE
const ( TypeChatBoostSourcePremium = iota TypeChatBoostSourceGiftCode TypeChatBoostSourceGiveaway )
CHAT_BOOST_SOURCE
const ( TypeMessage = iota TypeInaccessibleMessage )
MAYBE_INACCESSIBLE_MESSAGE
const ( TypePaidMediaPreview = iota TypePaidMediaPhoto TypePaidMediaVideo )
PAID_MEDIA
const ( TypeTransactionPartnerUser = iota TypeTransactionPartnerAffiliateProgram TypeTransactionPartnerFragment TypeTransactionPartnerTelegramAds TypeTransactionPartnerTelegramApi TypeTransactionPartnerOther )
TRANSACTION_PARTNER
const ( TypeChatMemberOwner = iota TypeChatMemberAdministrator TypeChatMemberMember TypeChatMemberRestricted TypeChatMemberLeft TypeChatMemberBanned )
CHAT_MEMBER
const ( TypeRevenueWithdrawalStatePending = iota TypeRevenueWithdrawalStateSucceeded TypeRevenueWithdrawalStateFailed )
REVENUE_WITHDRAWAL_STATE
const ( TypeMessageOriginUser = iota TypeMessageOriginHiddenUser TypeMessageOriginChat TypeMessageOriginChannel )
MESSAGE_ORIGIN
const ( TypeBackgroundFillSolid = iota TypeBackgroundFillGradient TypeBackgroundFillFreeformGradient )
BACKGROUND_FILL
const ( TypeArrayOfBotCommand = iota TypeArrayOfChatMember TypeArrayOfGameHighScore TypeArrayOfMessage TypeArrayOfMessageId TypeArrayOfSticker TypeArrayOfUpdate TypeBoolean TypeBotDescription TypeBotName TypeBotShortDescription TypeBusinessConnection TypeChatAdministratorRights TypeChatFullInfo TypeChatInviteLink TypeChatMember TypeErrorMessage TypeFile TypeForumTopic TypeGifts TypeInteger TypeMenuButton TypeMessageId TypePoll TypePreparedInlineMessage TypeSentWebAppMessage TypeStarTransactions TypeStickerSet TypeString TypeUser TypeUserChatBoosts TypeUserProfilePhotos TypeWebhookInfo )
RETURN_TYPES
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AffiliateInfo ¶ added in v1.8.9
type AffiliateInfo struct { AffiliateChat *Chat `json:"affiliate_chat,omitempty"` AffiliateUser *User `json:"affiliate_user,omitempty"` Amount int `json:"amount"` CommissionPerMille int `json:"commission_per_mille"` NanostarAmount int `json:"nanostar_amount,omitempty"` }
AffiliateInfo Contains information about the affiliate that received a commission via this transaction.
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 BackgroundFill ¶ added in v1.6.8
type BackgroundFill struct { BottomColor int `json:"bottom_color"` Color int `json:"color"` Colors []int `json:"colors"` RotationAngle int `json:"rotation_angle"` TopColor int `json:"top_color"` Type string `json:"type"` }
BackgroundFill This object describes the way a background is filled based on the selected colors Currently, it can be one of
- BackgroundFillSolid
- BackgroundFillGradient
- BackgroundFillFreeformGradient
func (BackgroundFill) Kind ¶ added in v1.6.8
func (x BackgroundFill) Kind() int
type BackgroundType ¶ added in v1.6.8
type BackgroundType struct { DarkThemeDimming int `json:"dark_theme_dimming"` Document Document `json:"document"` Fill BackgroundFill `json:"fill"` Intensity int `json:"intensity"` IsBlurred bool `json:"is_blurred"` IsInverted bool `json:"is_inverted"` IsMoving bool `json:"is_moving"` ThemeName string `json:"theme_name"` Type string `json:"type"` }
BackgroundType This object describes the type of a background Currently, it can be one of
- BackgroundTypeFill
- BackgroundTypeWallpaper
- BackgroundTypePattern
- BackgroundTypeChatTheme
func (BackgroundType) Kind ¶ added in v1.6.8
func (x BackgroundType) Kind() int
type Birthdate ¶ added in v1.6.7
type Birthdate struct { Day int `json:"day"` Month int `json:"month"` Year int `json:"year,omitempty"` }
Birthdate Describes the birthdate of a user.
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 BusinessConnection ¶ added in v1.6.7
type BusinessConnection struct { CanReply bool `json:"can_reply"` Date int64 `json:"date"` ID string `json:"id"` IsEnabled bool `json:"is_enabled"` User User `json:"user"` UserChatID int64 `json:"user_chat_id"` }
BusinessConnection Describes the connection of the bot with a business account.
type BusinessIntro ¶ added in v1.6.7
type BusinessIntro struct { Message string `json:"message,omitempty"` Sticker *Sticker `json:"sticker,omitempty"` Title string `json:"title,omitempty"` }
BusinessIntro Contains information about the start page settings of a Telegram Business account.
type BusinessLocation ¶ added in v1.6.7
type BusinessLocation struct { Address string `json:"address"` Location *Location `json:"location,omitempty"` }
BusinessLocation Contains information about the location of a Telegram Business account.
type BusinessMessagesDeleted ¶ added in v1.6.7
type BusinessMessagesDeleted struct { BusinessConnectionID string `json:"business_connection_id"` Chat Chat `json:"chat"` MessageIDs []int64 `json:"message_ids,omitempty"` }
BusinessMessagesDeleted This object is received when messages are deleted from a connected business account.
type BusinessOpeningHours ¶ added in v1.6.7
type BusinessOpeningHours struct { OpeningHours []BusinessOpeningHoursInterval `json:"opening_hours,omitempty"` TimeZoneName string `json:"time_zone_name"` }
BusinessOpeningHours Describes the opening hours of a business.
type BusinessOpeningHoursInterval ¶ added in v1.6.7
type BusinessOpeningHoursInterval struct { ClosingMinute int `json:"closing_minute"` OpeningMinute int `json:"opening_minute"` }
BusinessOpeningHoursInterval Describes an interval of time during which a business is open.
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 *MaybeInaccessibleMessage `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 { FirstName string `json:"first_name,omitempty"` ID int64 `json:"id"` IsForum bool `json:"is_forum,omitempty"` LastName string `json:"last_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"` CanDeleteStories bool `json:"can_delete_stories"` CanEditMessages bool `json:"can_edit_messages,omitempty"` CanEditStories bool `json:"can_edit_stories"` 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"` CanPostStories bool `json:"can_post_stories"` 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 ChatBackground ¶ added in v1.6.8
type ChatBackground struct {
Type BackgroundType `json:"type"`
}
ChatBackground Represents a chat background.
type ChatBoost ¶ added in v1.6.3
type ChatBoost struct { AddDate int64 `json:"add_date"` BoostID string `json:"boost_id"` ExpirationDate int64 `json:"expiration_date"` Source ChatBoostSource `json:"source"` }
ChatBoost This object contains information about a chat boost.
type ChatBoostAdded ¶ added in v1.6.7
type ChatBoostAdded struct {
BoostCount int `json:"boost_count"`
}
ChatBoostAdded Represents a service message about a user boosting a chat.
type ChatBoostRemoved ¶ added in v1.6.3
type ChatBoostRemoved struct { BoostID string `json:"boost_id"` Chat Chat `json:"chat"` RemoveDate int64 `json:"remove_date"` Source ChatBoostSource `json:"source"` }
ChatBoostRemoved Represents a boost removed from a chat.
type ChatBoostSource ¶ added in v1.6.3
type ChatBoostSource struct { GiveawayMessageID int64 `json:"giveaway_message_id"` IsUnclaimed bool `json:"is_unclaimed"` PrizeStarCount int `json:"prize_star_count"` Source string `json:"source"` User User `json:"user"` }
ChatBoostSource This object describes the source of a chat boost It can be one of
- ChatBoostSourcePremium
- ChatBoostSourceGiftCode
- ChatBoostSourceGiveaway
func (ChatBoostSource) Kind ¶ added in v1.6.3
func (x ChatBoostSource) Kind() int
type ChatBoostUpdated ¶ added in v1.6.3
ChatBoostUpdated Represents a boost added to a chat or changed.
type ChatFullInfo ¶ added in v1.6.8
type ChatFullInfo struct { AccentColorID int64 `json:"accent_color_id"` ActiveUsernames []string `json:"active_usernames,omitempty"` AvailableReactions []ReactionType `json:"available_reactions,omitempty"` BackgroundCustomEmojiID string `json:"background_custom_emoji_id,omitempty"` Bio string `json:"bio,omitempty"` Birthdate *Birthdate `json:"birthdate,omitempty"` BusinessIntro *BusinessIntro `json:"business_intro,omitempty"` BusinessLocation *BusinessLocation `json:"business_location,omitempty"` BusinessOpeningHours *BusinessOpeningHours `json:"business_opening_hours,omitempty"` CanSendPaidMedia bool `json:"can_send_paid_media,omitempty"` CanSetStickerSet bool `json:"can_set_sticker_set,omitempty"` CustomEmojiStickerSetName string `json:"custom_emoji_sticker_set_name,omitempty"` Description string `json:"description,omitempty"` EmojiStatusCustomEmojiID string `json:"emoji_status_custom_emoji_id,omitempty"` EmojiStatusExpirationDate int64 `json:"emoji_status_expiration_date,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"` HasVisibleHistory bool `json:"has_visible_history,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"` MaxReactionCount int `json:"max_reaction_count"` MessageAutoDeleteTime int `json:"message_auto_delete_time,omitempty"` Permissions *ChatPermissions `json:"permissions,omitempty"` PersonalChat *Chat `json:"personal_chat,omitempty"` Photo *ChatPhoto `json:"photo,omitempty"` PinnedMessage *Message `json:"pinned_message,omitempty"` ProfileAccentColorID int64 `json:"profile_accent_color_id,omitempty"` ProfileBackgroundCustomEmojiID string `json:"profile_background_custom_emoji_id,omitempty"` SlowModeDelay int `json:"slow_mode_delay,omitempty"` StickerSetName string `json:"sticker_set_name,omitempty"` Title string `json:"title,omitempty"` Type string `json:"type"` UnrestrictBoostCount int `json:"unrestrict_boost_count,omitempty"` Username string `json:"username,omitempty"` }
ChatFullInfo This object contains full information about a chat.
func (ChatFullInfo) MarshalJSON ¶ added in v1.6.8
func (entity ChatFullInfo) MarshalJSON() ([]byte, error)
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"` SubscriptionPeriod int `json:"subscription_period,omitempty"` SubscriptionPrice int `json:"subscription_price,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"` CanDeleteStories bool `json:"can_delete_stories"` CanEditMessages bool `json:"can_edit_messages"` CanEditStories bool `json:"can_edit_stories"` 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"` CanPostStories bool `json:"can_post_stories"` 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"` ViaJoinRequest bool `json:"via_join_request,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 a chat that 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 CopyTextButton ¶ added in v1.8.7
type CopyTextButton struct {
Text string `json:"text"`
}
CopyTextButton Represents an inline keyboard button that copies specified text to the clipboard.
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 ExternalReplyInfo ¶ added in v1.6.3
type ExternalReplyInfo struct { Animation *Animation `json:"animation,omitempty"` Audio *Audio `json:"audio,omitempty"` Chat *Chat `json:"chat,omitempty"` Contact *Contact `json:"contact,omitempty"` Dice *Dice `json:"dice,omitempty"` Document *Document `json:"document,omitempty"` Game *Game `json:"game,omitempty"` Giveaway *Giveaway `json:"giveaway,omitempty"` GiveawayWinners *GiveawayWinners `json:"giveaway_winners,omitempty"` HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"` Invoice *Invoice `json:"invoice,omitempty"` LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"` Location *Location `json:"location,omitempty"` MessageID int64 `json:"message_id,omitempty"` Origin MessageOrigin `json:"origin"` PaidMedia *PaidMediaInfo `json:"paid_media,omitempty"` Photo []PhotoSize `json:"photo,omitempty"` Poll *Poll `json:"poll,omitempty"` Sticker *Sticker `json:"sticker,omitempty"` Story *Story `json:"story,omitempty"` Venue *Venue `json:"venue,omitempty"` Video *Video `json:"video,omitempty"` VideoNote *VideoNote `json:"video_note,omitempty"` Voice *Voice `json:"voice,omitempty"` }
ExternalReplyInfo This object contains information about a message that is being replied to, which may come from another chat or forum topic.
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 Not supported in channels and for messages sent on behalf of a Telegram Business account.
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 Gift ¶ added in v1.8.8
type Gift struct { ID string `json:"id"` RemainingCount int `json:"remaining_count,omitempty"` StarCount int `json:"star_count"` Sticker Sticker `json:"sticker"` TotalCount int `json:"total_count,omitempty"` UpgradeStarCount int `json:"upgrade_star_count,omitempty"` }
Gift Represents a gift that can be sent by the bot.
type Gifts ¶ added in v1.8.8
type Gifts struct {
Gifts []Gift `json:"gifts,omitempty"`
}
Gifts This object represent a list of gifts.
type Giveaway ¶ added in v1.6.3
type Giveaway struct { Chats []Chat `json:"chats,omitempty"` CountryCodes []string `json:"country_codes,omitempty"` HasPublicWinners bool `json:"has_public_winners,omitempty"` OnlyNewMembers bool `json:"only_new_members,omitempty"` PremiumSubscriptionMonthCount int `json:"premium_subscription_month_count,omitempty"` PrizeDescription string `json:"prize_description,omitempty"` PrizeStarCount int `json:"prize_star_count,omitempty"` WinnerCount int `json:"winner_count"` WinnersSelectionDate int64 `json:"winners_selection_date"` }
Giveaway Represents a message about a scheduled giveaway.
type GiveawayCompleted ¶ added in v1.6.3
type GiveawayCompleted struct { GiveawayMessage *Message `json:"giveaway_message,omitempty"` IsStarGiveaway bool `json:"is_star_giveaway,omitempty"` UnclaimedPrizeCount int `json:"unclaimed_prize_count,omitempty"` WinnerCount int `json:"winner_count"` }
GiveawayCompleted Represents a service message about the completion of a giveaway without public winners.
type GiveawayCreated ¶ added in v1.6.3
type GiveawayCreated struct {
PrizeStarCount int `json:"prize_star_count,omitempty"`
}
GiveawayCreated Represents a service message about the creation of a scheduled giveaway.
type GiveawayWinners ¶ added in v1.6.3
type GiveawayWinners struct { AdditionalChatCount int `json:"additional_chat_count,omitempty"` Chat Chat `json:"chat"` GiveawayMessageID int64 `json:"giveaway_message_id"` OnlyNewMembers bool `json:"only_new_members,omitempty"` PremiumSubscriptionMonthCount int `json:"premium_subscription_month_count,omitempty"` PrizeDescription string `json:"prize_description,omitempty"` PrizeStarCount int `json:"prize_star_count,omitempty"` UnclaimedPrizeCount int `json:"unclaimed_prize_count,omitempty"` WasRefunded bool `json:"was_refunded,omitempty"` WinnerCount int `json:"winner_count"` Winners []User `json:"winners,omitempty"` WinnersSelectionDate int64 `json:"winners_selection_date"` }
GiveawayWinners Represents a message about the completion of a giveaway with public winners.
type InlineKeyboardButton ¶
type InlineKeyboardButton struct { CallbackData string `json:"callback_data,omitempty"` CallbackGame *CallbackGame `json:"callback_game,omitempty"` CopyText *CopyTextButton `json:"copy_text,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 Exactly one of the optional fields must be used to specify type of the button.
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.
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"` 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.
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.
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.
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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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.
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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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.
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.
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.
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.
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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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.
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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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.
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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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.
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,omitempty"` 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 ¶
InputMedia Represents the content of a media message to be sent It should be one of
- InputMediaAnimation
- InputMediaDocument
- InputMediaAudio
- InputMediaPhoto
- InputMediaVideo
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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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(attach 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(attach 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(attach 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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,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(attach 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 InputPaidMedia ¶ added in v1.7.4
InputPaidMedia This object describes the paid media to be sent Currently, it can be one of
- InputPaidMediaPhoto
- InputPaidMediaVideo
type InputPaidMediaPhoto ¶ added in v1.7.4
InputPaidMediaPhoto The paid media to send is a photo.
func (*InputPaidMediaPhoto) Files ¶ added in v1.7.7
func (entity *InputPaidMediaPhoto) Files() map[string]rawTypes.InputFile
func (InputPaidMediaPhoto) MarshalJSON ¶ added in v1.7.7
func (entity InputPaidMediaPhoto) MarshalJSON() ([]byte, error)
func (*InputPaidMediaPhoto) SetAttachment ¶ added in v1.7.7
func (entity *InputPaidMediaPhoto) SetAttachment(attach string)
func (*InputPaidMediaPhoto) SetAttachmentThumb ¶ added in v1.7.7
func (entity *InputPaidMediaPhoto) SetAttachmentThumb(_ string)
type InputPaidMediaVideo ¶ added in v1.7.4
type InputPaidMediaVideo struct { Duration int `json:"duration,omitempty"` Height int `json:"height,omitempty"` Media rawTypes.InputFile `json:"media,omitempty"` SupportsStreaming bool `json:"supports_streaming,omitempty"` Thumbnail rawTypes.InputFile `json:"thumbnail,omitempty"` Width int64 `json:"width,omitempty"` }
InputPaidMediaVideo The paid media to send is a video.
func (*InputPaidMediaVideo) Files ¶ added in v1.7.7
func (entity *InputPaidMediaVideo) Files() map[string]rawTypes.InputFile
func (InputPaidMediaVideo) MarshalJSON ¶ added in v1.7.7
func (entity InputPaidMediaVideo) MarshalJSON() ([]byte, error)
func (*InputPaidMediaVideo) SetAttachment ¶ added in v1.7.7
func (entity *InputPaidMediaVideo) SetAttachment(attach string)
func (*InputPaidMediaVideo) SetAttachmentThumb ¶ added in v1.7.7
func (entity *InputPaidMediaVideo) SetAttachmentThumb(attach string)
type InputPollOption ¶ added in v1.6.8
type InputPollOption struct { Text string `json:"text"` TextEntities []MessageEntity `json:"text_entities,omitempty"` TextParseMode string `json:"text_parse_mode,omitempty"` }
InputPollOption This object contains information about one answer option in a poll to be sent.
type InputSticker ¶
type InputSticker struct { EmojiList []string `json:"emoji_list,omitempty"` Format string `json:"format"` 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 { Entities []MessageEntity `json:"entities,omitempty"` LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,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"` RequestUsers *KeyboardButtonRequestUsers `json:"request_users,omitempty"` Text string `json:"text"` WebApp *WebAppInfo `json:"web_app,omitempty"` }
KeyboardButton Represents one button of the reply keyboard At most one of the optional fields must be used to specify type of the button For simple text buttons, String can be used instead of this object to specify the button text. Note: request_users 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"` RequestPhoto bool `json:"request_photo,omitempty"` RequestTitle bool `json:"request_title,omitempty"` RequestUsername bool `json:"request_username,omitempty"` UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"` }
KeyboardButtonRequestChat This object defines the criteria used to request a suitable chat Information about the selected chat will be shared with the bot when the corresponding button is pressed The bot will be granted requested rights in the chat if appropriate More about requesting chats ».
type KeyboardButtonRequestUsers ¶ added in v1.6.3
type KeyboardButtonRequestUsers struct { MaxQuantity int `json:"max_quantity,omitempty"` RequestID int64 `json:"request_id"` RequestName bool `json:"request_name,omitempty"` RequestPhoto bool `json:"request_photo,omitempty"` RequestUsername bool `json:"request_username,omitempty"` UserIsBot bool `json:"user_is_bot,omitempty"` UserIsPremium bool `json:"user_is_premium,omitempty"` }
KeyboardButtonRequestUsers This object defines the criteria used to request suitable users Information about the selected users 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 LinkPreviewOptions ¶ added in v1.6.3
type LinkPreviewOptions struct { IsDisabled bool `json:"is_disabled,omitempty"` PreferLargeMedia bool `json:"prefer_large_media,omitempty"` PreferSmallMedia bool `json:"prefer_small_media,omitempty"` ShowAboveText bool `json:"show_above_text,omitempty"` URL string `json:"url,omitempty"` }
LinkPreviewOptions Describes the options used for link preview generation.
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 MaybeInaccessibleMessage ¶ added in v1.6.3
type MaybeInaccessibleMessage Message
MaybeInaccessibleMessage This object describes a message that can be inaccessible to the bot It can be one of
- Message
- InaccessibleMessage
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 { }
MenuButtonCommands Represents a menu button, which opens the bot's list of commands.
func (MenuButtonCommands) MarshalJSON ¶ added in v1.7.7
func (entity MenuButtonCommands) MarshalJSON() ([]byte, error)
type MenuButtonDefault ¶
type MenuButtonDefault struct { }
MenuButtonDefault Describes that no specific value for the menu button was set.
func (MenuButtonDefault) MarshalJSON ¶ added in v1.7.7
func (entity MenuButtonDefault) MarshalJSON() ([]byte, error)
type MenuButtonWebApp ¶
type MenuButtonWebApp struct { Text string `json:"text"` WebApp WebAppInfo `json:"web_app"` }
MenuButtonWebApp Represents a menu button, which launches a Web App.
func (MenuButtonWebApp) MarshalJSON ¶ added in v1.7.7
func (entity MenuButtonWebApp) MarshalJSON() ([]byte, error)
type Message ¶
type Message struct { Animation *Animation `json:"animation,omitempty"` Audio *Audio `json:"audio,omitempty"` AuthorSignature string `json:"author_signature,omitempty"` BoostAdded *ChatBoostAdded `json:"boost_added,omitempty"` BusinessConnectionID string `json:"business_connection_id,omitempty"` Caption string `json:"caption,omitempty"` CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` ChannelChatCreated bool `json:"channel_chat_created,omitempty"` Chat Chat `json:"chat"` ChatBackgroundSet *ChatBackground `json:"chat_background_set,omitempty"` 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"` EffectID string `json:"effect_id,omitempty"` Entities []MessageEntity `json:"entities,omitempty"` ExternalReply *ExternalReplyInfo `json:"external_reply,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"` ForwardOrigin *MessageOrigin `json:"forward_origin,omitempty"` From *User `json:"from,omitempty"` Game *Game `json:"game,omitempty"` GeneralForumTopicHidden *GeneralForumTopicHidden `json:"general_forum_topic_hidden,omitempty"` Giveaway *Giveaway `json:"giveaway,omitempty"` GiveawayCompleted *GiveawayCompleted `json:"giveaway_completed,omitempty"` GiveawayCreated *GiveawayCreated `json:"giveaway_created,omitempty"` GiveawayWinners *GiveawayWinners `json:"giveaway_winners,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"` IsFromOffline bool `json:"is_from_offline,omitempty"` IsTopicMessage bool `json:"is_topic_message,omitempty"` LeftChatMember *User `json:"left_chat_member,omitempty"` LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,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"` PaidMedia *PaidMediaInfo `json:"paid_media,omitempty"` PassportData *PassportData `json:"passport_data,omitempty"` Photo []PhotoSize `json:"photo,omitempty"` PinnedMessage *MaybeInaccessibleMessage `json:"pinned_message,omitempty"` Poll *Poll `json:"poll,omitempty"` ProximityAlertTriggered *ProximityAlertTriggered `json:"proximity_alert_triggered,omitempty"` Quote *TextQuote `json:"quote,omitempty"` RefundedPayment *RefundedPayment `json:"refunded_payment,omitempty"` ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` ReplyToMessage *Message `json:"reply_to_message,omitempty"` ReplyToStory *Story `json:"reply_to_story,omitempty"` SenderBoostCount int `json:"sender_boost_count,omitempty"` SenderBusinessBot *User `json:"sender_business_bot,omitempty"` SenderChat *Chat `json:"sender_chat,omitempty"` ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"` Sticker *Sticker `json:"sticker,omitempty"` Story *Story `json:"story,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 MessageOrigin ¶ added in v1.6.3
type MessageOrigin struct { AuthorSignature string `json:"author_signature"` Chat Chat `json:"chat"` Date int64 `json:"date"` MessageID int64 `json:"message_id"` SenderChat Chat `json:"sender_chat"` SenderUser User `json:"sender_user"` SenderUserName string `json:"sender_user_name"` Type string `json:"type"` }
MessageOrigin This object describes the origin of a message It can be one of
- MessageOriginUser
- MessageOriginHiddenUser
- MessageOriginChat
- MessageOriginChannel
func (MessageOrigin) Kind ¶ added in v1.6.3
func (x MessageOrigin) Kind() int
type MessageReactionCountUpdated ¶ added in v1.6.3
type MessageReactionCountUpdated struct { Chat Chat `json:"chat"` Date int64 `json:"date"` MessageID int64 `json:"message_id"` Reactions []ReactionCount `json:"reactions,omitempty"` }
MessageReactionCountUpdated Represents reaction changes on a message with anonymous reactions.
type MessageReactionUpdated ¶ added in v1.6.3
type MessageReactionUpdated struct { ActorChat *Chat `json:"actor_chat,omitempty"` Chat Chat `json:"chat"` Date int64 `json:"date"` MessageID int64 `json:"message_id"` NewReaction []ReactionType `json:"new_reaction,omitempty"` OldReaction []ReactionType `json:"old_reaction,omitempty"` User *User `json:"user,omitempty"` }
MessageReactionUpdated Represents a change of a reaction on a message performed by a user.
func (MessageReactionUpdated) MarshalJSON ¶ added in v1.6.3
func (entity MessageReactionUpdated) MarshalJSON() ([]byte, error)
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 PaidMedia ¶ added in v1.7.4
type PaidMedia struct { Duration int `json:"duration"` Height int `json:"height"` Photo []PhotoSize `json:"photo"` Type string `json:"type"` Video Video `json:"video"` Width int64 `json:"width"` }
PaidMedia This object describes paid media Currently, it can be one of
- PaidMediaPreview
- PaidMediaPhoto
- PaidMediaVideo
type PaidMediaInfo ¶ added in v1.7.4
type PaidMediaInfo struct { PaidMedia []PaidMedia `json:"paid_media,omitempty"` StarCount int `json:"star_count"` }
PaidMediaInfo Describes the paid media added to a message.
type PaidMediaPurchased ¶ added in v1.8.6
type PaidMediaPurchased struct { From User `json:"from"` PaidMediaPayload string `json:"paid_media_payload"` }
PaidMediaPurchased This object contains information about a paid media purchase.
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"` QuestionEntities []MessageEntity `json:"question_entities,omitempty"` 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,omitempty"` VoterChat *Chat `json:"voter_chat,omitempty"` }
PollAnswer Represents an answer of a user in a non-anonymous poll.
type PollOption ¶
type PollOption struct { Text string `json:"text"` TextEntities []MessageEntity `json:"text_entities,omitempty"` VoterCount int `json:"voter_count"` }
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 PreparedInlineMessage ¶ added in v1.8.8
type PreparedInlineMessage struct { ExpirationDate int64 `json:"expiration_date"` ID string `json:"id"` }
PreparedInlineMessage Describes an inline message to be sent by a user of a Mini App.
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 ReactionCount ¶ added in v1.6.3
ReactionCount Represents a reaction added to a message along with the number of times it was added.
func (ReactionCount) MarshalJSON ¶ added in v1.6.3
func (entity ReactionCount) MarshalJSON() ([]byte, error)
type ReactionType ¶ added in v1.6.3
type ReactionType any
ReactionType This object describes the type of a reaction Currently, it can be one of
- ReactionTypeEmoji
- ReactionTypeCustomEmoji
- ReactionTypePaid
type ReactionTypeCustomEmoji ¶ added in v1.6.3
type ReactionTypeCustomEmoji struct { CustomEmojiID string `json:"custom_emoji_id"` Type string `json:"type"` }
ReactionTypeCustomEmoji The reaction is based on a custom emoji.
type ReactionTypeEmoji ¶ added in v1.6.3
ReactionTypeEmoji The reaction is based on an emoji.
type ReactionTypePaid ¶ added in v1.7.9
type ReactionTypePaid struct {
Type string `json:"type"`
}
ReactionTypePaid The reaction is paid.
type RefundedPayment ¶ added in v1.7.5
type RefundedPayment struct { Currency string `json:"currency"` InvoicePayload string `json:"invoice_payload"` ProviderPaymentChargeID string `json:"provider_payment_charge_id,omitempty"` TelegramPaymentChargeID string `json:"telegram_payment_charge_id"` TotalAmount int `json:"total_amount"` }
RefundedPayment This object contains basic information about a refunded payment.
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) Not supported in channels and for messages sent on behalf of a Telegram Business account.
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) Not supported in channels and for messages sent on behalf of a Telegram Business account.
type ReplyParameters ¶ added in v1.6.3
type ReplyParameters struct { AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"` ChatID any `json:"chat_id,omitempty"` MessageID int64 `json:"message_id"` Quote string `json:"quote,omitempty"` QuoteEntities []MessageEntity `json:"quote_entities,omitempty"` QuoteParseMode string `json:"quote_parse_mode,omitempty"` QuotePosition int `json:"quote_position,omitempty"` }
ReplyParameters Describes reply parameters for the message that is being sent.
func (ReplyParameters) MarshalJSON ¶ added in v1.6.3
func (entity ReplyParameters) MarshalJSON() ([]byte, error)
type RevenueWithdrawalState ¶ added in v1.7.1
type RevenueWithdrawalState struct { Date int64 `json:"date"` Type string `json:"type"` URL string `json:"url"` }
RevenueWithdrawalState This object describes the state of a revenue withdrawal operation Currently, it can be one of
- RevenueWithdrawalStatePending
- RevenueWithdrawalStateSucceeded
- RevenueWithdrawalStateFailed
func (RevenueWithdrawalState) Kind ¶ added in v1.7.1
func (x RevenueWithdrawalState) Kind() int
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 SharedUser ¶ added in v1.6.7
type SharedUser struct {}
SharedUser This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.
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 StarTransaction ¶ added in v1.7.1
type StarTransaction struct { Amount int `json:"amount"` Date int64 `json:"date"` ID string `json:"id"` NanostarAmount int `json:"nanostar_amount,omitempty"` Receiver *TransactionPartner `json:"receiver,omitempty"` Source *TransactionPartner `json:"source,omitempty"` }
StarTransaction Describes a Telegram Star transaction.
type StarTransactions ¶ added in v1.7.1
type StarTransactions struct {
Transactions []StarTransaction `json:"transactions,omitempty"`
}
StarTransactions Contains a list of Telegram Star transactions.
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 { 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"` IsFirstRecurring bool `json:"is_first_recurring,omitempty"` IsRecurring bool `json:"is_recurring,omitempty"` OrderInfo *OrderInfo `json:"order_info,omitempty"` ProviderPaymentChargeID string `json:"provider_payment_charge_id"` ShippingOptionID string `json:"shipping_option_id,omitempty"` SubscriptionExpirationDate int64 `json:"subscription_expiration_date,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 TextQuote ¶ added in v1.6.3
type TextQuote struct { Entities []MessageEntity `json:"entities,omitempty"` IsManual bool `json:"is_manual,omitempty"` Position int `json:"position"` Text string `json:"text"` }
TextQuote This object contains information about the quoted part of a message that is replied to by the given message.
type TransactionPartner ¶ added in v1.7.1
type TransactionPartner struct { Affiliate *AffiliateInfo `json:"affiliate"` CommissionPerMille int `json:"commission_per_mille"` Gift *Gift `json:"gift"` InvoicePayload string `json:"invoice_payload"` PaidMedia []PaidMedia `json:"paid_media"` PaidMediaPayload string `json:"paid_media_payload"` RequestCount int `json:"request_count"` SponsorUser *User `json:"sponsor_user"` SubscriptionPeriod int `json:"subscription_period"` Type string `json:"type"` User User `json:"user"` WithdrawalState *RevenueWithdrawalState `json:"withdrawal_state"` }
TransactionPartner This object describes the source of a transaction, or its recipient for outgoing transactions Currently, it can be one of
- TransactionPartnerUser
- TransactionPartnerAffiliateProgram
- TransactionPartnerFragment
- TransactionPartnerTelegramAds
- TransactionPartnerTelegramApi
- TransactionPartnerOther
func (TransactionPartner) Kind ¶ added in v1.7.1
func (x TransactionPartner) Kind() int
type Update ¶
type Update struct { BusinessConnection *BusinessConnection `json:"business_connection,omitempty"` BusinessMessage *Message `json:"business_message,omitempty"` CallbackQuery *CallbackQuery `json:"callback_query,omitempty"` ChannelPost *Message `json:"channel_post,omitempty"` ChatBoost *ChatBoostUpdated `json:"chat_boost,omitempty"` ChatJoinRequest *ChatJoinRequest `json:"chat_join_request,omitempty"` ChatMember *ChatMemberUpdated `json:"chat_member,omitempty"` ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result,omitempty"` DeletedBusinessMessages *BusinessMessagesDeleted `json:"deleted_business_messages,omitempty"` EditedBusinessMessage *Message `json:"edited_business_message,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"` MessageReaction *MessageReactionUpdated `json:"message_reaction,omitempty"` MessageReactionCount *MessageReactionCountUpdated `json:"message_reaction_count,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"` PurchasedPaidMedia *PaidMediaPurchased `json:"purchased_paid_media,omitempty"` RemovedChatBoost *ChatBoostRemoved `json:"removed_chat_boost,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"` CanConnectToBusiness bool `json:"can_connect_to_business,omitempty"` CanJoinGroups bool `json:"can_join_groups,omitempty"` CanReadAllGroupMessages bool `json:"can_read_all_group_messages,omitempty"` FirstName string `json:"first_name"` HasMainWebApp bool `json:"has_main_web_app,omitempty"` 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 UserChatBoosts ¶ added in v1.6.3
type UserChatBoosts struct {
Boosts []ChatBoost `json:"boosts,omitempty"`
}
UserChatBoosts Represents a list of boosts added to a chat by a user.
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 UsersShared ¶ added in v1.6.3
type UsersShared struct {}
UsersShared This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers 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 { FromAttachmentMenu bool `json:"from_attachment_menu,omitempty"` FromRequest bool `json:"from_request,omitempty"` WebAppName string `json:"web_app_name,omitempty"` }
WriteAccessAllowed Represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method requestWriteAccess.
Source Files ¶
- affiliate_info.go
- animation.go
- audio.go
- background_fill.go
- background_type.go
- birthdate.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
- business_connection.go
- business_intro.go
- business_location.go
- business_messages_deleted.go
- business_opening_hours.go
- business_opening_hours_interval.go
- callback_game.go
- callback_query.go
- chat.go
- chat_administrator_rights.go
- chat_background.go
- chat_boost.go
- chat_boost_added.go
- chat_boost_removed.go
- chat_boost_source.go
- chat_boost_updated.go
- chat_full_info.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
- copy_text_button.go
- dice.go
- document.go
- encrypted_credentials.go
- encrypted_passport_element.go
- external_reply_info.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
- gift.go
- gifts.go
- giveaway.go
- giveaway_completed.go
- giveaway_created.go
- giveaway_winners.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_paid_media.go
- input_paid_media_photo.go
- input_paid_media_video.go
- input_poll_option.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_users.go
- kinds.go
- labeled_price.go
- link_preview_options.go
- location.go
- login_url.go
- mask_position.go
- maybe_inaccessible_message.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
- message_origin.go
- message_reaction_count_updated.go
- message_reaction_updated.go
- order_info.go
- paid_media.go
- paid_media_info.go
- paid_media_purchased.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
- prepared_inline_message.go
- proximity_alert_triggered.go
- reaction_count.go
- reaction_type.go
- reaction_type_custom_emoji.go
- reaction_type_emoji.go
- reaction_type_paid.go
- refunded_payment.go
- reply_keyboard_markup.go
- reply_keyboard_remove.go
- reply_parameters.go
- revenue_withdrawal_state.go
- sent_web_app_message.go
- shared_user.go
- shipping_address.go
- shipping_option.go
- shipping_query.go
- star_transaction.go
- star_transactions.go
- sticker.go
- sticker_set.go
- story.go
- successful_payment.go
- switch_inline_query_chosen_chat.go
- text_quote.go
- transaction_partner.go
- update.go
- user.go
- user_chat_boosts.go
- user_profile_photos.go
- users_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