Documentation
¶
Index ¶
- Constants
- type AcceptedGiftTypes
- type AffiliateInfo
- type Animation
- type AnswerInlineQuery
- type AreaPosition
- type Audio
- type BackgroundFill
- type BackgroundFillFreeformGradient
- type BackgroundFillGradient
- type BackgroundFillSolid
- type BackgroundFillType
- type BackgroundType
- type BackgroundTypeChatTheme
- type BackgroundTypeFill
- type BackgroundTypePattern
- type BackgroundTypeType
- type BackgroundTypeWallpaper
- type Birthdate
- type BotAccessSettings
- type BotCommand
- type BotCommandScope
- type BotCommandScopeAllChatAdministrators
- type BotCommandScopeAllGroupChats
- type BotCommandScopeAllPrivateChats
- type BotCommandScopeChat
- type BotCommandScopeChatAdministrators
- type BotCommandScopeChatMember
- type BotCommandScopeDefault
- type BotDescription
- type BotFullInfo
- type BotName
- type BotShortDescription
- type BotSubscriptionState
- type BotSubscriptionUpdated
- type BusinessBotRights
- type BusinessConnection
- type BusinessIntro
- type BusinessLocation
- type BusinessMessagesDeleted
- type BusinessOpeningHours
- type BusinessOpeningHoursInterval
- type CallbackGame
- type CallbackQuery
- type Chat
- type ChatAction
- type ChatAdministratorRights
- type ChatBackground
- type ChatBoost
- type ChatBoostAdded
- type ChatBoostRemoved
- type ChatBoostSource
- type ChatBoostSourceGiftCode
- type ChatBoostSourceGiveaway
- type ChatBoostSourcePremium
- type ChatBoostSourceType
- type ChatBoostUpdated
- type ChatFullInfo
- type ChatInviteLink
- type ChatJoinRequest
- type ChatJoinRequestQueryResult
- type ChatLocation
- type ChatMember
- type ChatMemberAdministrator
- type ChatMemberBanned
- type ChatMemberLeft
- type ChatMemberMember
- type ChatMemberOwner
- type ChatMemberRestricted
- type ChatMemberType
- type ChatMemberUpdated
- type ChatOwnerChanged
- type ChatOwnerLeft
- type ChatPermissions
- type ChatPhoto
- type ChatShareTheme
- type ChatShareThemeBackdrop
- type ChatShareThemeBackdrops
- type ChatShareThemeEmoji
- type ChatShareThemeType
- type ChatShareThemeUniqueGift
- type ChatShared
- type ChatType
- type Checklist
- type ChecklistTask
- type ChecklistTasksAdded
- type ChecklistTasksDone
- type ChosenInlineResult
- type Community
- type CommunityChatAdded
- type CommunityChatJoined
- type CommunityChatRemoved
- type Contact
- type CopyTextButton
- type Dice
- type DirectMessagePriceChanged
- type DirectMessagesTopic
- type DisabledButton
- type Document
- type EmojiType
- type EmojiTypeCustomEmoji
- type EmojiTypeEmoji
- type EmojiTypeType
- type EncryptedCredentials
- type EncryptedPassportElement
- type EphemeralMessageParameters
- 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 GiftBackground
- type GiftInfo
- type Gifts
- type Giveaway
- type GiveawayCompleted
- type GiveawayCreated
- type GiveawayWinners
- type InaccessibleMessage
- 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 InputChecklist
- type InputChecklistTask
- type InputContactMessageContent
- type InputFile
- type InputFileString
- type InputFileType
- type InputFileUpload
- type InputInvoiceMessageContent
- type InputLocationMessageContent
- type InputMedia
- type InputMediaAnimation
- type InputMediaAudio
- type InputMediaDocument
- type InputMediaLivePhoto
- type InputMediaLocation
- type InputMediaPhoto
- type InputMediaSticker
- type InputMediaVenue
- type InputMediaVideo
- type InputMediaVoiceNote
- type InputMenuButton
- type InputMessageContent
- type InputPaidMedia
- type InputPaidMediaLivePhoto
- type InputPaidMediaPhoto
- type InputPaidMediaVideo
- type InputPollOption
- type InputProfilePhoto
- type InputProfilePhotoAnimated
- type InputProfilePhotoStatic
- type InputRichBlock
- type InputRichBlockAnchor
- type InputRichBlockAnimation
- type InputRichBlockAudio
- type InputRichBlockBlockQuotation
- type InputRichBlockButtons
- type InputRichBlockCollage
- type InputRichBlockDetails
- type InputRichBlockDivider
- type InputRichBlockDocument
- type InputRichBlockExpandableBlockQuotation
- type InputRichBlockFooter
- type InputRichBlockList
- type InputRichBlockListItem
- type InputRichBlockMap
- type InputRichBlockMathematicalExpression
- type InputRichBlockParagraph
- type InputRichBlockPhoto
- type InputRichBlockPreformatted
- type InputRichBlockPullQuotation
- type InputRichBlockSectionHeading
- type InputRichBlockSlideshow
- type InputRichBlockTable
- type InputRichBlockThinking
- type InputRichBlockVideo
- type InputRichBlockVoiceNote
- type InputRichMessage
- type InputRichMessageContent
- type InputRichMessageMedia
- type InputSharedWidgetMessageContent
- type InputSticker
- type InputStoryContent
- type InputStoryContentPhoto
- type InputStoryContentVideo
- type InputTextMessageContent
- type InputVenueMessageContent
- type InputWidgetMessageContent
- type Invoice
- type KeyboardButton
- type KeyboardButtonPollType
- type KeyboardButtonRequestChat
- type KeyboardButtonRequestManagedBot
- type KeyboardButtonRequestUser
- type KeyboardButtonRequestUsers
- type LabeledPrice
- type LinkPreviewOptions
- type LivePhoto
- type Location
- type LocationAddress
- type LoginURL
- type ManagedBotCreated
- type ManagedBotUpdated
- type MaskPosition
- type MaybeInaccessibleMessage
- type MaybeInaccessibleMessageType
- type MenuButton
- type MenuButtonCommands
- type MenuButtonDefault
- type MenuButtonType
- type MenuButtonWebApp
- type Message
- type MessageAutoDeleteTimerChanged
- type MessageEntity
- type MessageEntityType
- type MessageGenerationStopped
- type MessageID
- type MessageOrigin
- type MessageOriginChannel
- type MessageOriginChat
- type MessageOriginHiddenUser
- type MessageOriginType
- type MessageOriginUser
- type MessageReactionCountUpdated
- type MessageReactionUpdated
- type OrderInfo
- type OwnedGift
- type OwnedGiftRegular
- type OwnedGiftType
- type OwnedGiftUnique
- type OwnedGifts
- type PaidMedia
- type PaidMediaInfo
- type PaidMediaLivePhoto
- type PaidMediaPhoto
- type PaidMediaPreview
- type PaidMediaPurchased
- type PaidMediaType
- type PaidMediaVideo
- type PaidMessagePriceChanged
- type PaidMessagesWaived
- type ParseMode
- 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 PollMedia
- type PollOption
- type PollOptionAdded
- type PollOptionDeleted
- type PreCheckoutQuery
- type PreparedInlineMessage
- type PreparedKeyboardButton
- type ProximityAlertTriggered
- type ReactionCount
- type ReactionType
- type ReactionTypeCustomEmoji
- type ReactionTypeEmoji
- type ReactionTypePaid
- type ReactionTypeType
- type RefundedPayment
- type ReplyKeyboardMarkup
- type ReplyKeyboardRemove
- type ReplyMarkup
- type ReplyParameters
- type RevenueWithdrawalState
- type RevenueWithdrawalStateFailed
- type RevenueWithdrawalStatePending
- type RevenueWithdrawalStateSucceeded
- type RevenueWithdrawalStateType
- type RichBlock
- type RichBlockAnchor
- type RichBlockAnimation
- type RichBlockAudio
- type RichBlockBlockQuotation
- type RichBlockButtons
- type RichBlockCaption
- type RichBlockCollage
- type RichBlockDetails
- type RichBlockDivider
- type RichBlockDocument
- type RichBlockExpandableBlockQuotation
- type RichBlockFooter
- type RichBlockList
- type RichBlockListItem
- type RichBlockMap
- type RichBlockMathematicalExpression
- type RichBlockParagraph
- type RichBlockPhoto
- type RichBlockPreformatted
- type RichBlockPullQuotation
- type RichBlockSectionHeading
- type RichBlockSlideshow
- type RichBlockTable
- type RichBlockTableCell
- type RichBlockThinking
- type RichBlockType
- type RichBlockVideo
- type RichBlockVoiceNote
- type RichMessage
- type RichMessageButton
- type RichText
- type RichTextAnchor
- type RichTextAnchorLink
- type RichTextBankCardNumber
- type RichTextBold
- type RichTextBotCommand
- type RichTextButton
- type RichTextCashtag
- type RichTextCode
- type RichTextCustomEmoji
- type RichTextDateTime
- type RichTextEmailAddress
- type RichTextHashtag
- type RichTextItalic
- type RichTextMarked
- type RichTextMathematicalExpression
- type RichTextMention
- type RichTextPhoneNumber
- type RichTextReference
- type RichTextReferenceLink
- type RichTextSpoiler
- type RichTextStrikethrough
- type RichTextSubscript
- type RichTextSuperscript
- type RichTextTextMention
- type RichTextTonAddress
- type RichTextType
- type RichTextURL
- type RichTextUnderline
- type SentGuestMessage
- type SentWebAppMessage
- type SharedUser
- type SharedWidgetQuery
- type ShippingAddress
- type ShippingOption
- type ShippingQuery
- type StarAmount
- type StarTransaction
- type StarTransactions
- type Sticker
- type StickerSet
- type Story
- type StoryArea
- type StoryAreaPosition
- type StoryAreaType
- type StoryAreaTypeLink
- type StoryAreaTypeLocation
- type StoryAreaTypeSuggestedReaction
- type StoryAreaTypeType
- type StoryAreaTypeUniqueGift
- type StoryAreaTypeWeather
- type SuccessfulPayment
- type SuggestedPostApprovalFailed
- type SuggestedPostApproved
- type SuggestedPostDeclined
- type SuggestedPostInfo
- type SuggestedPostPaid
- type SuggestedPostParameters
- type SuggestedPostPrice
- type SuggestedPostRefunded
- type SwitchInlineQueryChosenChat
- type TextQuote
- type TonNft
- type TonNftAttribute
- type TonWalletCard
- type TonWalletCardSticker
- type TonWalletTransfer
- type TransactionPartner
- type TransactionPartnerAffiliateProgram
- type TransactionPartnerChat
- type TransactionPartnerFragment
- type TransactionPartnerOther
- type TransactionPartnerTelegramAds
- type TransactionPartnerTelegramApi
- type TransactionPartnerType
- type TransactionPartnerUser
- type UniqueGift
- type UniqueGiftBackdrop
- type UniqueGiftBackdropColors
- type UniqueGiftColors
- type UniqueGiftInfo
- type UniqueGiftModel
- type UniqueGiftSymbol
- type Update
- type User
- type UserChatBoosts
- type UserProfileAudios
- type UserProfilePhotos
- type UserRating
- type UserShared
- type UsersShared
- type Venue
- type Video
- type VideoChatEnded
- type VideoChatParticipantsInvited
- type VideoChatScheduled
- type VideoChatStarted
- type VideoNote
- type VideoQuality
- type Voice
- type WebAppData
- type WebAppInfo
- type WebhookInfo
- type Widget
- type WidgetQuery
- type WidgetQueryChatType
- type WidgetQueryType
- type WidgetQueryTypeData
- type WidgetQueryTypeSentTransaction
- type WidgetQueryTypeSignData
- type WidgetQueryTypeType
- type WidgetQueryWallet
- type WriteAccessAllowed
Constants ¶
const ( AllowedUpdateMessage string = "message" AllowedUpdateEditedMessage string = "edited_message" AllowedUpdateChannelPost string = "channel_post" AllowedUpdateEditedChannelPost string = "edited_channel_post" AllowedUpdateBusinessConnection string = "business_connection" AllowedUpdateBusinessMessage string = "business_message" AllowedUpdateEditedBusinessMessage string = "edited_business_message" AllowedUpdateDeletedBusinessMessages string = "deleted_business_messages" AllowedUpdateMessageReaction string = "message_reaction" AllowedUpdateMessageReactionCount string = "message_reaction_count" AllowedUpdateInlineQuery string = "inline_query" AllowedUpdateChosenInlineResult string = "chosen_inline_result" AllowedUpdateCallbackQuery string = "callback_query" AllowedUpdateWidgetQuery string = "widget_query" AllowedUpdateShippingQuery string = "shipping_query" AllowedUpdatePreCheckoutQuery string = "pre_checkout_query" AllowedUpdatePurchasedPaidMedia string = "purchased_paid_media" AllowedUpdatePoll string = "poll" AllowedUpdatePollAnswer string = "poll_answer" AllowedUpdateMyChatMember string = "my_chat_member" AllowedUpdateChatMember string = "chat_member" AllowedUpdateChatJoinRequest string = "chat_join_request" AllowedUpdateChatBoost string = "chat_boost" AllowedUpdateRemovedChatBoost string = "removed_chat_boost" AllowedUpdateManagedBot string = "managed_bot" AllowedUpdateGuestMessage string = "guest_message" AllowedUpdateSubscription string = "subscription" AllowedUpdateStoppedMessageGeneration string = "stopped_message_generation" )
allowed_updates https://core.telegram.org/bots/api#update
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptedGiftTypes ¶ added in v1.15.0
type AcceptedGiftTypes struct {
UnlimitedGifts bool `json:"unlimited_gifts"`
LimitedGifts bool `json:"limited_gifts"`
UniqueGifts bool `json:"unique_gifts"`
GiftsFromChannels bool `json:"gifts_from_channels,omitempty"`
}
AcceptedGiftTypes https://core.telegram.org/bots/api#acceptedgifttypes
type AffiliateInfo ¶ added in v1.12.0
type AffiliateInfo struct {
AffiliateUser *User `json:"affiliate_user,omitempty"`
AffiliateChat *Chat `json:"affiliate_chat,omitempty"`
CommissionPerMille int `json:"commission_per_mille"`
Amount int `json:"amount"`
NanostarAmount int `json:"nanostar_amount"`
}
AffiliateInfo https://core.telegram.org/bots/api#affiliateinfo
type Animation ¶
type Animation struct {
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
Width int `json:"width"`
Height int `json:"height"`
Duration int `json:"duration"`
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
FileName string `json:"file_name,omitempty"`
MimeType string `json:"mime_type,omitempty"`
FileSize int64 `json:"file_size,omitempty"`
}
type AnswerInlineQuery ¶
type AnswerInlineQuery struct {
InlineQueryID string `json:"inline_query_id"`
Results []InlineQueryResult `json:"results"`
CacheTime int `json:"cache_time,omitempty"`
IsPersonal bool `json:"is_personal,omitempty"`
NextOffset string `json:"next_offset,omitempty"`
SwitchPmText string `json:"switch_pm_text,omitempty"`
SwitchPmParameter string `json:"switch_pm_parameter,omitempty"`
}
AnswerInlineQuery https://core.telegram.org/bots/api#answerinlinequery
type AreaPosition ¶ added in v1.28.0
type AreaPosition struct {
XPercentage float64 `json:"x_percentage"`
YPercentage float64 `json:"y_percentage"`
WidthPercentage float64 `json:"width_percentage"`
HeightPercentage float64 `json:"height_percentage"`
RotationAngle float64 `json:"rotation_angle"`
CornerRadiusPercentage float64 `json:"corner_radius_percentage"`
}
AreaPosition https://core.telegram.org/bots/api#areaposition
type Audio ¶
type Audio struct {
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
Duration int `json:"duration"`
Performer string `json:"performer,omitempty"`
Title string `json:"title,omitempty"`
FileName string `json:"file_name,omitempty"`
MimeType string `json:"mime_type,omitempty"`
FileSize int64 `json:"file_size,omitempty"`
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
}
type BackgroundFill ¶ added in v1.3.0
type BackgroundFill struct {
Type BackgroundFillType
Solid *BackgroundFillSolid
Gradient *BackgroundFillGradient
FreeformGradient *BackgroundFillFreeformGradient
}
func (*BackgroundFill) MarshalJSON ¶ added in v1.3.1
func (bf *BackgroundFill) MarshalJSON() ([]byte, error)
func (*BackgroundFill) UnmarshalJSON ¶ added in v1.3.0
func (bf *BackgroundFill) UnmarshalJSON(data []byte) error
type BackgroundFillFreeformGradient ¶ added in v1.3.0
type BackgroundFillFreeformGradient struct {
Type BackgroundFillType `json:"type"`
Colors []int `json:"colors"`
}
BackgroundFillFreeformGradient https://core.telegram.org/bots/api#backgroundfillfreeformgradient
type BackgroundFillGradient ¶ added in v1.3.0
type BackgroundFillGradient struct {
Type BackgroundFillType `json:"type"`
TopColor int `json:"top_color"`
BottomColor int `json:"bottom_color"`
RotationAngle int `json:"rotation_angle"`
}
BackgroundFillGradient https://core.telegram.org/bots/api#backgroundfillgradient
type BackgroundFillSolid ¶ added in v1.3.0
type BackgroundFillSolid struct {
Type BackgroundFillType `json:"type"`
Color int `json:"color"`
}
BackgroundFillSolid https://core.telegram.org/bots/api#backgroundfillsolid
type BackgroundFillType ¶ added in v1.3.0
type BackgroundFillType string
const ( BackgroundFillTypeSolid BackgroundFillType = "solid" BackgroundFillTypeGradient BackgroundFillType = "gradient" BackgroundFillTypeFreeformGradient BackgroundFillType = "freeform_gradient" )
type BackgroundType ¶ added in v1.3.0
type BackgroundType struct {
Type BackgroundTypeType
Fill *BackgroundTypeFill
Wallpaper *BackgroundTypeWallpaper
Pattern *BackgroundTypePattern
Theme *BackgroundTypeChatTheme
}
BackgroundType https://core.telegram.org/bots/api#backgroundtype
func (*BackgroundType) MarshalJSON ¶ added in v1.13.0
func (cb *BackgroundType) MarshalJSON() ([]byte, error)
func (*BackgroundType) UnmarshalJSON ¶ added in v1.13.0
func (cb *BackgroundType) UnmarshalJSON(data []byte) error
type BackgroundTypeChatTheme ¶ added in v1.3.0
type BackgroundTypeChatTheme struct {
Type BackgroundTypeType `json:"type"`
ThemeName string `json:"theme_name"`
}
BackgroundTypeChatTheme https://core.telegram.org/bots/api#backgroundtypechattheme
type BackgroundTypeFill ¶ added in v1.3.0
type BackgroundTypeFill struct {
Type BackgroundTypeType `json:"type"`
Fill BackgroundFill `json:"fill"`
DarkThemeDimming int `json:"dark_theme_dimming"`
}
BackgroundTypeFill https://core.telegram.org/bots/api#backgroundtypefill
type BackgroundTypePattern ¶ added in v1.3.0
type BackgroundTypePattern struct {
Type BackgroundTypeType `json:"type"`
Document Document `json:"document"`
Fill BackgroundFill `json:"fill"`
Intensity int `json:"intensity"`
IsInverted bool `json:"is_inverted,omitempty"`
IsMoving bool `json:"is_moving,omitempty"`
}
BackgroundTypePattern https://core.telegram.org/bots/api#backgroundtypepattern
type BackgroundTypeType ¶ added in v1.13.0
type BackgroundTypeType string
const ( ChatBackgroundTypeFill BackgroundTypeType = "fill" ChatBackgroundTypeWallpaper BackgroundTypeType = "wallpaper" ChatBackgroundTypePattern BackgroundTypeType = "pattern" ChatBackgroundTypeChatTheme BackgroundTypeType = "chat_theme" )
type BackgroundTypeWallpaper ¶ added in v1.3.0
type BackgroundTypeWallpaper struct {
Type BackgroundTypeType `json:"type"`
Document Document `json:"document"`
DarkThemeDimming int `json:"dark_theme_dimming"`
IsBlurred bool `json:"is_blurred,omitempty"`
IsMoving bool `json:"is_moving,omitempty"`
}
BackgroundTypeWallpaper https://core.telegram.org/bots/api#backgroundtypewallpaper
type BotAccessSettings ¶ added in v1.21.0
type BotAccessSettings struct {
IsAccessRestricted bool `json:"is_access_restricted"`
AddedUsers []User `json:"added_users,omitempty"`
}
BotAccessSettings https://core.telegram.org/bots/api#botaccesssettings
type BotCommand ¶
type BotCommandScope ¶
BotCommandScope https://core.telegram.org/bots/api#botcommandscope
type BotCommandScopeAllChatAdministrators ¶
type BotCommandScopeAllChatAdministrators struct{}
BotCommandScopeAllChatAdministrators https://core.telegram.org/bots/api#botcommandscopeallchatadministrators
func (*BotCommandScopeAllChatAdministrators) MarshalCustom ¶
func (m *BotCommandScopeAllChatAdministrators) MarshalCustom() ([]byte, error)
type BotCommandScopeAllGroupChats ¶
type BotCommandScopeAllGroupChats struct{}
BotCommandScopeAllGroupChats https://core.telegram.org/bots/api#botcommandscopeallgroupchats
func (*BotCommandScopeAllGroupChats) MarshalCustom ¶
func (m *BotCommandScopeAllGroupChats) MarshalCustom() ([]byte, error)
type BotCommandScopeAllPrivateChats ¶
type BotCommandScopeAllPrivateChats struct{}
BotCommandScopeAllPrivateChats https://core.telegram.org/bots/api#botcommandscopeallprivatechats
func (*BotCommandScopeAllPrivateChats) MarshalCustom ¶
func (m *BotCommandScopeAllPrivateChats) MarshalCustom() ([]byte, error)
type BotCommandScopeChat ¶
type BotCommandScopeChat struct {
ChatID any `json:"chat_id"`
}
BotCommandScopeChat https://core.telegram.org/bots/api#botcommandscopechat
func (*BotCommandScopeChat) MarshalCustom ¶
func (m *BotCommandScopeChat) MarshalCustom() ([]byte, error)
type BotCommandScopeChatAdministrators ¶
type BotCommandScopeChatAdministrators struct {
ChatID any `json:"chat_id"`
}
BotCommandScopeChatAdministrators https://core.telegram.org/bots/api#botcommandscopechatadministrators
func (*BotCommandScopeChatAdministrators) MarshalCustom ¶ added in v0.7.11
func (m *BotCommandScopeChatAdministrators) MarshalCustom() ([]byte, error)
type BotCommandScopeChatMember ¶
BotCommandScopeChatMember https://core.telegram.org/bots/api#botcommandscopechatmember
func (*BotCommandScopeChatMember) MarshalCustom ¶
func (m *BotCommandScopeChatMember) MarshalCustom() ([]byte, error)
type BotCommandScopeDefault ¶
type BotCommandScopeDefault struct{}
BotCommandScopeDefault https://core.telegram.org/bots/api#botcommandscopedefault
func (*BotCommandScopeDefault) MarshalCustom ¶
func (m *BotCommandScopeDefault) MarshalCustom() ([]byte, error)
type BotDescription ¶ added in v0.7.0
type BotDescription struct {
Description string `json:"description"`
}
BotDescription https://core.telegram.org/bots/api#botdescription
type BotFullInfo ¶ added in v1.31.0
type BotFullInfo struct {
ID int64 `json:"id"`
IsBot bool `json:"is_bot"`
FirstName string `json:"first_name"`
Username string `json:"username,omitempty"`
ActiveUsernames []string `json:"active_usernames,omitempty"`
CanJoinGroups bool `json:"can_join_groups"`
CanReadAllGroupMessages bool `json:"can_read_all_group_messages"`
SupportsGuestQueries bool `json:"supports_guest_queries"`
SupportsInlineQueries bool `json:"supports_inline_queries"`
InlineQueryPlaceholder string `json:"inline_query_placeholder,omitempty"`
NeedsInlineQueryLocation bool `json:"needs_inline_query_location"`
CanConnectToBusiness bool `json:"can_connect_to_business"`
HasMainWebApp bool `json:"has_main_web_app"`
HasTopicsEnabled bool `json:"has_topics_enabled"`
AllowsUsersToCreateTopics bool `json:"allows_users_to_create_topics"`
HasTopicSidebar bool `json:"has_topic_sidebar"`
CanManageBots bool `json:"can_manage_bots"`
SupportsJoinRequestQueries bool `json:"supports_join_request_queries"`
}
BotFullInfo https://core.telegram.org/bots/api#botfullinfo
type BotShortDescription ¶ added in v0.7.0
type BotShortDescription struct {
ShortDescription string `json:"short_description"`
}
BotShortDescription https://core.telegram.org/bots/api#botshortdescription
type BotSubscriptionState ¶ added in v1.23.0
type BotSubscriptionState string
BotSubscriptionState https://core.telegram.org/bots/api#botsubscriptionupdated
const ( BotSubscriptionStateCanceled BotSubscriptionState = "canceled" BotSubscriptionStateActive BotSubscriptionState = "active" BotSubscriptionStateFailed BotSubscriptionState = "failed" )
type BotSubscriptionUpdated ¶ added in v1.23.0
type BotSubscriptionUpdated struct {
User User `json:"user"`
InvoicePayload string `json:"invoice_payload"`
State BotSubscriptionState `json:"state"`
}
BotSubscriptionUpdated https://core.telegram.org/bots/api#botsubscriptionupdated
Contains information about changes to a user payment subscription toward the current bot.
type BusinessBotRights ¶ added in v1.15.0
type BusinessBotRights struct {
CanReply bool `json:"can_reply,omitempty"`
CanReadMessages bool `json:"can_read_messages,omitempty"`
CanDeleteSentMessages bool `json:"can_delete_sent_messages,omitempty"`
CanDeleteAllMessages bool `json:"can_delete_all_messages,omitempty"`
CanEditName bool `json:"can_edit_name,omitempty"`
CanEditBio bool `json:"can_edit_bio,omitempty"`
CanEditProfilePhoto bool `json:"can_edit_profile_photo,omitempty"`
CanEditUsername bool `json:"can_edit_username,omitempty"`
CanChangeGiftSettings bool `json:"can_change_gift_settings,omitempty"`
CanViewGiftsAndStars bool `json:"can_view_gifts_and_stars,omitempty"`
CanConvertGiftsToStars bool `json:"can_convert_gifts_to_stars,omitempty"`
CanTransferAndUpgradeGifts bool `json:"can_transfer_and_upgrade_gifts,omitempty"`
CanTransferStars bool `json:"can_transfer_stars,omitempty"`
CanManageStories bool `json:"can_manage_stories,omitempty"`
}
type BusinessConnection ¶ added in v1.2.0
type BusinessConnection struct {
ID string `json:"id"`
User User `json:"user"`
UserChatID int64 `json:"user_chat_id"`
Date int64 `json:"date"`
Rights *BusinessBotRights `json:"rights,omitempty"`
IsEnabled bool `json:"is_enabled"`
}
BusinessConnection https://core.telegram.org/bots/api#businessconnection
type BusinessIntro ¶ added in v1.2.0
type BusinessIntro struct {
Title string `json:"title,omitempty"`
Message string `json:"message,omitempty"`
Sticker *Sticker `json:"sticker,omitempty"`
}
BusinessIntro https://core.telegram.org/bots/api#businessintro
type BusinessLocation ¶ added in v1.2.0
type BusinessLocation struct {
Address string `json:"address"`
Location *Location `json:"location,omitempty"`
}
BusinessLocation https://core.telegram.org/bots/api#businesslocation
type BusinessMessagesDeleted ¶ added in v1.2.0
type BusinessMessagesDeleted struct {
BusinessConnectionID string `json:"business_connection_id"`
Chat Chat `json:"chat"`
MessageIDs []int `json:"message_ids"`
}
BusinessMessagesDeleted https://core.telegram.org/bots/api#businessmessagesdeleted
type BusinessOpeningHours ¶ added in v1.2.0
type BusinessOpeningHours struct {
TimeZoneName string `json:"time_zone_name"`
OpeningHours []BusinessOpeningHoursInterval `json:"opening_hours"`
}
BusinessOpeningHours https://core.telegram.org/bots/api#businessopeninghours
type BusinessOpeningHoursInterval ¶ added in v1.2.0
type BusinessOpeningHoursInterval struct {
OpeningMinute int `json:"opening_minute"`
ClosingMinute int `json:"closing_minute"`
}
BusinessOpeningHoursInterval https://core.telegram.org/bots/api#businessopeninghoursinterval
type CallbackGame ¶
type CallbackGame struct {
UserID int64 `json:"user_id"`
Score int `json:"score"`
Force bool `json:"force,omitempty"`
DisableEditMessage bool `json:"disable_edit_message,omitempty"`
ChatID int `json:"chat_id,omitempty"`
MessageID int `json:"message_id,omitempty"`
InlineMessageID int `json:"inline_message_id,omitempty"`
}
type CallbackQuery ¶
type CallbackQuery struct {
ID string `json:"id"`
From User `json:"from,omitempty"`
Message MaybeInaccessibleMessage `json:"message,omitempty"`
InlineMessageID string `json:"inline_message_id,omitempty"`
ChatInstance string `json:"chat_instance,omitempty"`
Data string `json:"data,omitempty"`
GameShortName string `json:"game_short_name,omitempty"`
}
CallbackQuery https://core.telegram.org/bots/api#callbackquery
For a button on a message sent by the bot, Message is set unless callback_query_mode of setMySettings uses inline_message_id instead. InlineMessageID is set for a message sent via the bot in inline mode, and can also be set for the bot's own messages in that mode.
type Chat ¶
type Chat struct {
ID int64 `json:"id"`
Type ChatType `json:"type"`
Title string `json:"title,omitempty"`
Username string `json:"username,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
IsForum bool `json:"is_forum,omitempty"`
IsDirectMessages bool `json:"is_direct_messages,omitempty"`
}
type ChatAction ¶ added in v0.7.10
type ChatAction string
const ( ChatActionTyping ChatAction = "typing" ChatActionUploadPhoto ChatAction = "upload_photo" ChatActionRecordVideo ChatAction = "record_video" ChatActionUploadVideo ChatAction = "upload_video" ChatActionRecordVoice ChatAction = "record_voice" ChatActionUploadVoice ChatAction = "upload_voice" ChatActionUploadDocument ChatAction = "upload_document" ChatActionChooseSticker ChatAction = "choose_sticker" ChatActionFindLocation ChatAction = "find_location" ChatActionRecordVideoNote ChatAction = "record_video_note" ChatActionUploadVideoNote ChatAction = "upload_video_note" )
type ChatAdministratorRights ¶
type ChatAdministratorRights struct {
IsAnonymous bool `json:"is_anonymous"`
CanManageChat bool `json:"can_manage_chat"`
CanDeleteMessages bool `json:"can_delete_messages"`
CanManageVideoChats bool `json:"can_manage_video_chats"`
CanRestrictMembers bool `json:"can_restrict_members"`
CanPromoteMembers bool `json:"can_promote_members"`
CanChangeInfo bool `json:"can_change_info"`
CanInviteUsers bool `json:"can_invite_users"`
CanPostMessages bool `json:"can_post_messages,omitempty"`
CanEditMessages bool `json:"can_edit_messages,omitempty"`
CanPinMessages bool `json:"can_pin_messages,omitempty"`
CanPostStories bool `json:"can_post_stories"`
CanEditStories bool `json:"can_edit_stories"`
CanDeleteStories bool `json:"can_delete_stories"`
CanManageTopics bool `json:"can_manage_topics,omitempty"`
CanManageDirectMessages bool `json:"can_manage_direct_messages,omitempty"`
CanManageTags bool `json:"can_manage_tags,omitempty"`
CanSendWelcomeMessages bool `json:"can_send_welcome_messages"`
}
ChatAdministratorRights https://core.telegram.org/bots/api#chatadministratorrights
type ChatBackground ¶ added in v1.3.0
type ChatBackground struct {
Type BackgroundType `json:"type"`
}
ChatBackground https://core.telegram.org/bots/api#chatbackground
type ChatBoost ¶ added in v1.0.0
type ChatBoost struct {
BoostID string `json:"boost_id"`
AddDate int `json:"add_date"`
ExpirationDate int `json:"expiration_date"`
Source ChatBoostSource `json:"source"`
}
type ChatBoostAdded ¶ added in v1.1.0
type ChatBoostAdded struct {
BoostCount int `json:"boost_count"`
}
ChatBoostAdded https://core.telegram.org/bots/api#chatboostadded
type ChatBoostRemoved ¶ added in v1.0.0
type ChatBoostRemoved struct {
Chat Chat `json:"chat"`
BoostID string `json:"boost_id"`
RemoveDate int `json:"remove_date"`
Source ChatBoostSource `json:"source"`
}
ChatBoostRemoved https://core.telegram.org/bots/api#chatboostremoved
type ChatBoostSource ¶ added in v1.0.0
type ChatBoostSource struct {
Source ChatBoostSourceType
ChatBoostSourcePremium *ChatBoostSourcePremium
ChatBoostSourceGiftCode *ChatBoostSourceGiftCode
ChatBoostSourceGiveaway *ChatBoostSourceGiveaway
}
ChatBoostSource https://core.telegram.org/bots/api#chatboostsource
func (*ChatBoostSource) MarshalJSON ¶ added in v1.3.1
func (cbs *ChatBoostSource) MarshalJSON() ([]byte, error)
func (*ChatBoostSource) UnmarshalJSON ¶ added in v1.0.0
func (cbs *ChatBoostSource) UnmarshalJSON(data []byte) error
type ChatBoostSourceGiftCode ¶ added in v1.0.0
type ChatBoostSourceGiftCode struct {
Source ChatBoostSourceType `json:"source"` // always “gift_code”
User User `json:"user"`
}
ChatBoostSourceGiftCode https://core.telegram.org/bots/api#chatboostsourcegiftcode
type ChatBoostSourceGiveaway ¶ added in v1.0.0
type ChatBoostSourceGiveaway struct {
Source ChatBoostSourceType `json:"source"` // always “giveaway”
GiveawayMessageID int `json:"giveaway_message_id"`
User User `json:"user"`
PrizeStarCount int `json:"prize_star_count,omitempty"`
IsUnclaimed bool `json:"is_unclaimed,omitempty"`
}
ChatBoostSourceGiveaway https://core.telegram.org/bots/api#chatboostsourcegiveaway
type ChatBoostSourcePremium ¶ added in v1.0.0
type ChatBoostSourcePremium struct {
Source ChatBoostSourceType `json:"source"` // always “premium”
User User `json:"user"`
}
ChatBoostSourcePremium https://core.telegram.org/bots/api#chatboostsourcepremium
type ChatBoostSourceType ¶ added in v1.0.0
type ChatBoostSourceType string
ChatBoostSourceType https://core.telegram.org/bots/api#chatboostsource
const ( ChatBoostSourceTypePremium ChatBoostSourceType = "premium" ChatBoostSourceTypeGiftCode ChatBoostSourceType = "gift_code" ChatBoostSourceTypeGiveaway ChatBoostSourceType = "giveaway" )
type ChatBoostUpdated ¶ added in v1.0.0
ChatBoostUpdated https://core.telegram.org/bots/api#chatboostupdated
type ChatFullInfo ¶ added in v1.3.0
type ChatFullInfo struct {
ID int64 `json:"id"`
Type ChatType `json:"type"`
Title string `json:"title,omitempty"`
Username string `json:"username,omitempty"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
IsForum bool `json:"is_forum,omitempty"`
IsDirectMessages bool `json:"is_direct_messages,omitempty"`
Community *Community `json:"community,omitempty"`
Photo *ChatPhoto `json:"photo,omitempty"`
ActiveUsernames []string `json:"active_usernames,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"`
PersonalChat *Chat `json:"personal_chat,omitempty"`
ParentChat *Chat `json:"parent_chat,omitempty"`
AvailableReactions []ReactionType `json:"available_reactions,omitempty"`
AccentColorID int `json:"accent_color_id,omitempty"`
MaxReactionCount int `json:"max_reaction_count"`
BackgroundCustomEmojiID string `json:"background_custom_emoji_id,omitempty"`
ProfileAccentColorID int `json:"profile_accent_color_id,omitempty"`
ProfileBackgroundCustomEmojiID string `json:"profile_background_custom_emoji_id,omitempty"`
EmojiStatusCustomEmojiID string `json:"emoji_status_custom_emoji_id,omitempty"`
EmojiStatusExpirationDate int `json:"emoji_status_expiration_date,omitempty"`
UniqueGiftColors *UniqueGiftColors `json:"unique_gift_colors,omitempty"`
Bio string `json:"bio"`
HasPrivateForwards bool `json:"has_private_forwards,omitempty"`
HasRestrictedVoiceAndVideoMessages bool `json:"has_restricted_voice_and_video_messages,omitempty"`
JoinToSendMessages bool `json:"join_to_send_messages"`
JoinByRequest bool `json:"join_by_request"`
Description string `json:"description,omitempty"`
InviteLink string `json:"invite_link,omitempty"`
PinnedMessage *Message `json:"pinned_message,omitempty"`
Permissions *ChatPermissions `json:"permissions,omitempty"`
AcceptedGiftTypes AcceptedGiftTypes `json:"accepted_gift_types"`
CanSendPaidMedia bool `json:"can_send_paid_media,omitempty"`
SlowModeDelay int `json:"slow_mode_delay,omitempty"`
UnrestrictBoostCount int `json:"unrestrict_boost_count,omitempty"`
MessageAutoDeleteTime int `json:"message_auto_delete_time,omitempty"`
HasAggressiveAntiSpamEnabled bool `json:"has_aggressive_anti_spam_enabled,omitempty"`
HasHiddenMembers bool `json:"has_hidden_members,omitempty"`
HasProtectedContent bool `json:"has_protected_content,omitempty"`
HasVisibleHistory bool `json:"has_visible_history,omitempty"`
StickerSetName string `json:"sticker_set_name,omitempty"`
CanSetStickerSet bool `json:"can_set_sticker_set,omitempty"`
CustomEmojiStickerSetName string `json:"custom_emoji_sticker_set_name,omitempty"`
LinkedChatID int64 `json:"linked_chat_id,omitempty"`
Location *ChatLocation `json:"location,omitempty"`
PaidMessageStarCount int `json:"paid_message_star_count,omitempty"`
GuardBot *User `json:"guard_bot,omitempty"`
Rating *UserRating `json:"rating,omitempty"`
FirstProfileAudio *Audio `json:"first_profile_audio,omitempty"`
TonWalletCard *TonWalletCard `json:"ton_wallet_card,omitempty"`
}
ChatFullInfo https://core.telegram.org/bots/api#chatfullinfo
type ChatInviteLink ¶
type ChatInviteLink struct {
InviteLink string `json:"invite_link"`
Creator User `json:"creator"`
CreatesJoinRequest bool `json:"creates_join_request"`
IsPrimary bool `json:"is_primary"`
IsRevoked bool `json:"is_revoked"`
Name string `json:"name,omitempty"`
ExpireDate int `json:"expire_date,omitempty"`
MemberLimit int `json:"member_limit,omitempty"`
PendingJoinRequestCount int `json:"pending_join_request_count,omitempty"`
}
ChatInviteLink https://core.telegram.org/bots/api#chatinvitelink
type ChatJoinRequest ¶
type ChatJoinRequest struct {
Chat Chat `json:"chat"`
From User `json:"from"`
UserChatID int64 `json:"user_chat_id"`
Date int `json:"date"`
Bio string `json:"bio,omitempty"`
InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
QueryID string `json:"query_id,omitempty"`
}
ChatJoinRequest https://core.telegram.org/bots/api#chatjoinrequest
type ChatJoinRequestQueryResult ¶ added in v1.31.0
type ChatJoinRequestQueryResult string
ChatJoinRequestQueryResult https://core.telegram.org/bots/api#answerchatjoinrequestquery
const ( ChatJoinRequestQueryResultApprove ChatJoinRequestQueryResult = "approve" ChatJoinRequestQueryResultDecline ChatJoinRequestQueryResult = "decline" ChatJoinRequestQueryResultQueue ChatJoinRequestQueryResult = "queue" )
type ChatLocation ¶
ChatLocation https://core.telegram.org/bots/api#chatlocation
type ChatMember ¶
type ChatMember struct {
Type ChatMemberType
Owner *ChatMemberOwner
Administrator *ChatMemberAdministrator
Member *ChatMemberMember
Restricted *ChatMemberRestricted
Left *ChatMemberLeft
Banned *ChatMemberBanned
}
ChatMember https://core.telegram.org/bots/api#chatmember
func (*ChatMember) MarshalJSON ¶ added in v1.3.1
func (c *ChatMember) MarshalJSON() ([]byte, error)
func (*ChatMember) UnmarshalJSON ¶
func (c *ChatMember) UnmarshalJSON(data []byte) error
type ChatMemberAdministrator ¶
type ChatMemberAdministrator struct {
Status ChatMemberType `json:"status"` // The member's status in the chat, always "administrator"
User User `json:"user"`
CanBeEdited bool `json:"can_be_edited"`
IsAnonymous bool `json:"is_anonymous"`
CanManageChat bool `json:"can_manage_chat"`
CanDeleteMessages bool `json:"can_delete_messages"`
CanManageVideoChats bool `json:"can_manage_video_chats"`
CanRestrictMembers bool `json:"can_restrict_members"`
CanPromoteMembers bool `json:"can_promote_members"`
CanChangeInfo bool `json:"can_change_info"`
CanInviteUsers bool `json:"can_invite_users"`
CanPostMessages bool `json:"can_post_messages,omitempty"`
CanEditMessages bool `json:"can_edit_messages,omitempty"`
CanPinMessages bool `json:"can_pin_messages,omitempty"`
CanPostStories bool `json:"can_post_stories"`
CanEditStories bool `json:"can_edit_stories"`
CanDeleteStories bool `json:"can_delete_stories"`
CanManageTopics bool `json:"can_manage_topics,omitempty"`
CanManageDirectMessages bool `json:"can_manage_direct_messages,omitempty"`
CanManageTags bool `json:"can_manage_tags,omitempty"`
CanSendWelcomeMessages bool `json:"can_send_welcome_messages"`
CustomTitle string `json:"custom_title,omitempty"`
}
ChatMemberAdministrator https://core.telegram.org/bots/api#chatmemberadministrator
type ChatMemberBanned ¶
type ChatMemberBanned struct {
Status ChatMemberType `json:"status"` // The member's status in the chat, always "kicked"
User *User `json:"user"`
UntilDate int `json:"until_date"`
}
ChatMemberBanned https://core.telegram.org/bots/api#chatmemberbanned
type ChatMemberLeft ¶
type ChatMemberLeft struct {
Status ChatMemberType `json:"status"` // The member's status in the chat, always "left"
User *User `json:"user"`
}
ChatMemberLeft https://core.telegram.org/bots/api#chatmemberleft
type ChatMemberMember ¶
type ChatMemberMember struct {
Status ChatMemberType `json:"status"` // The member's status in the chat, always "member"
User *User `json:"user"`
UntilDate int `json:"until_date,omitempty"`
Tag string `json:"tag,omitempty"`
}
ChatMemberMember https://core.telegram.org/bots/api#chatmembermember
type ChatMemberOwner ¶
type ChatMemberOwner struct {
Status ChatMemberType `json:"status"` // The member's status in the chat, always "creator"
User *User `json:"user"`
IsAnonymous bool `json:"is_anonymous"`
CustomTitle string `json:"custom_title,omitempty"`
}
ChatMemberOwner https://core.telegram.org/bots/api#chatmemberowner
type ChatMemberRestricted ¶
type ChatMemberRestricted struct {
Status ChatMemberType `json:"status"` // The member's status in the chat, always "restricted"
User *User `json:"user"`
IsMember bool `json:"is_member"`
CanSendMessages bool `json:"can_send_messages"`
CanSendAudios bool `json:"can_send_audios"`
CanSendDocuments bool `json:"can_send_documents"`
CanSendPhotos bool `json:"can_send_photos"`
CanSendVideos bool `json:"can_send_videos"`
CanSendVideoNotes bool `json:"can_send_video_notes"`
CanSendVoiceNotes bool `json:"can_send_voice_notes"`
CanSendPolls bool `json:"can_send_polls"`
CanSendOtherMessages bool `json:"can_send_other_messages"`
CanAddWebPagePreviews bool `json:"can_add_web_page_previews"`
CanChangeInfo bool `json:"can_change_info"`
CanInviteUsers bool `json:"can_invite_users"`
CanPinMessages bool `json:"can_pin_messages"`
CanManageTopics bool `json:"can_manage_topics,omitempty"`
CanEditTag bool `json:"can_edit_tag,omitempty"`
CanReactToMessages bool `json:"can_react_to_messages,omitempty"`
UntilDate int `json:"until_date"`
Tag string `json:"tag,omitempty"`
}
ChatMemberRestricted https://core.telegram.org/bots/api#chatmemberrestricted
type ChatMemberType ¶
type ChatMemberType string
const ( ChatMemberTypeOwner ChatMemberType = "creator" ChatMemberTypeAdministrator ChatMemberType = "administrator" ChatMemberTypeMember ChatMemberType = "member" ChatMemberTypeRestricted ChatMemberType = "restricted" ChatMemberTypeLeft ChatMemberType = "left" ChatMemberTypeBanned ChatMemberType = "kicked" )
type ChatMemberUpdated ¶
type ChatMemberUpdated struct {
Chat Chat `json:"chat"`
From User `json:"from"`
Date int `json:"date"`
OldChatMember ChatMember `json:"old_chat_member"`
NewChatMember ChatMember `json:"new_chat_member"`
InviteLink *ChatInviteLink `json:"invite_link,omitempty"`
ViaJoinRequest bool `json:"via_join_request,omitempty"`
ViaChatFolderInviteLink bool `json:"via_chat_folder_invite_link,omitempty"`
}
ChatMemberUpdated https://core.telegram.org/bots/api#chatmemberupdated
type ChatOwnerChanged ¶ added in v1.19.0
type ChatOwnerChanged struct {
NewOwner User `json:"new_owner"`
}
ChatOwnerChanged https://core.telegram.org/bots/api#chatownerchanged
type ChatOwnerLeft ¶ added in v1.19.0
type ChatOwnerLeft struct {
NewOwner *User `json:"new_owner,omitempty"`
}
ChatOwnerLeft https://core.telegram.org/bots/api#chatownerleft
type ChatPermissions ¶
type ChatPermissions struct {
CanSendMessages bool `json:"can_send_messages"`
CanSendAudios bool `json:"can_send_audios"`
CanSendDocuments bool `json:"can_send_documents"`
CanSendPhotos bool `json:"can_send_photos"`
CanSendVideos bool `json:"can_send_videos"`
CanSendVideoNotes bool `json:"can_send_video_notes"`
CanSendVoiceNotes bool `json:"can_send_voice_notes"`
CanSendPolls bool `json:"can_send_polls,omitempty"`
CanSendOtherMessages bool `json:"can_send_other_messages,omitempty"`
CanAddWebPagePreviews bool `json:"can_add_web_page_previews,omitempty"`
CanChangeInfo bool `json:"can_change_info,omitempty"`
CanInviteUsers bool `json:"can_invite_users,omitempty"`
CanPinMessages bool `json:"can_pin_messages,omitempty"`
CanManageTopics bool `json:"can_manage_topics,omitempty"`
CanEditTag bool `json:"can_edit_tag,omitempty"`
CanReactToMessages bool `json:"can_react_to_messages,omitempty"`
}
ChatPermissions https://core.telegram.org/bots/api#chatpermissions
type ChatPhoto ¶
type ChatShareTheme ¶ added in v1.28.0
type ChatShareTheme struct {
}
ChatShareTheme https://core.telegram.org/bots/api#chatsharetheme
func (ChatShareTheme) MarshalJSON ¶ added in v1.28.0
func (t ChatShareTheme) MarshalJSON() ([]byte, error)
func (*ChatShareTheme) UnmarshalJSON ¶ added in v1.28.0
func (t *ChatShareTheme) UnmarshalJSON(data []byte) error
type ChatShareThemeBackdrop ¶ added in v1.28.0
type ChatShareThemeBackdrop struct {
}
ChatShareThemeBackdrop https://core.telegram.org/bots/api#chatsharethemebackdrop
type ChatShareThemeBackdrops ¶ added in v1.28.0
type ChatShareThemeBackdrops struct {
}
ChatShareThemeBackdrops https://core.telegram.org/bots/api#chatsharethemebackdrops
type ChatShareThemeEmoji ¶ added in v1.28.0
type ChatShareThemeEmoji struct {
}
ChatShareThemeEmoji https://core.telegram.org/bots/api#chatsharethemeemoji
type ChatShareThemeType ¶ added in v1.28.0
type ChatShareThemeType string
ChatShareThemeType https://core.telegram.org/bots/api#chatsharetheme
const ( )
type ChatShareThemeUniqueGift ¶ added in v1.28.0
type ChatShareThemeUniqueGift struct {
}
ChatShareThemeUniqueGift https://core.telegram.org/bots/api#chatsharethemeuniquegift
type ChatShared ¶ added in v0.5.0
type ChatShared struct {
}
type Checklist ¶ added in v1.16.0
type Checklist struct {
Title string `json:"title"`
TitleEntities []MessageEntity `json:"title_entities,omitempty"`
Tasks []ChecklistTask `json:"tasks"`
OthersCanAddTasks bool `json:"others_can_add_tasks,omitempty"`
OthersCanMarkTasksAsDone bool `json:"others_can_mark_tasks_as_done,omitempty"`
}
type ChecklistTask ¶ added in v1.16.0
type ChecklistTask struct {
ID int `json:"id"`
Text string `json:"text"`
TextEntities []MessageEntity `json:"text_entities,omitempty"`
CompletedByUser *User `json:"completed_by_user,omitempty"`
CompletedByChat *Chat `json:"completed_by_chat,omitempty"`
CompletionDate int `json:"completion_date,omitempty"`
}
ChecklistTask https://core.telegram.org/bots/api#checklisttask
type ChecklistTasksAdded ¶ added in v1.16.0
type ChecklistTasksAdded struct {
ChecklistMessage *Message `json:"checklist_message,omitempty"`
Tasks []ChecklistTask `json:"tasks"`
}
ChecklistTasksAdded https://core.telegram.org/bots/api#checklisttasksadded
type ChecklistTasksDone ¶ added in v1.16.0
type ChecklistTasksDone struct {
ChecklistMessage *Message `json:"checklist_message,omitempty"`
MarkedAsDoneTaskIDs []int `json:"marked_as_done_task_ids,omitempty"`
MarkedAsNotDoneTaskIDs []int `json:"marked_as_not_done_task_ids,omitempty"`
}
ChecklistTasksDone https://core.telegram.org/bots/api#checklisttasksdone
type ChosenInlineResult ¶
type ChosenInlineResult struct {
ResultID string `json:"result_id"`
From User `json:"from"`
Location *Location `json:"location,omitempty"`
InlineMessageID string `json:"inline_message_id,omitempty"`
Query string `json:"query"`
}
ChosenInlineResult https://core.telegram.org/bots/api#choseninlineresult
type Community ¶ added in v1.23.0
Community https://core.telegram.org/bots/api#community
Represents a community (a group of chats).
type CommunityChatAdded ¶ added in v1.23.0
type CommunityChatAdded struct {
Community Community `json:"community"`
}
CommunityChatAdded https://core.telegram.org/bots/api#communitychatadded
Describes a service message about a chat being added to a community.
type CommunityChatJoined ¶ added in v1.24.0
type CommunityChatJoined struct {
Community Community `json:"community"`
}
CommunityChatJoined https://core.telegram.org/bots/api#communitychatjoined
Describes a service message about a chat being joined by a user from a community.
type CommunityChatRemoved ¶ added in v1.23.0
type CommunityChatRemoved struct{}
CommunityChatRemoved https://core.telegram.org/bots/api#communitychatremoved
Describes a service message about a chat being removed from a community. Currently holds no information.
type Contact ¶
type CopyTextButton ¶ added in v1.10.0
type CopyTextButton struct {
Text string `json:"text"`
}
CopyTextButton https://core.telegram.org/bots/api#copytextbutton
type DirectMessagePriceChanged ¶ added in v1.16.0
type DirectMessagePriceChanged struct {
AreDirectMessagesEnabled bool `json:"are_direct_messages_enabled"`
DirectMessageStarCount int `json:"direct_message_star_count,omitempty"`
}
DirectMessagePriceChanged https://core.telegram.org/bots/api#directmessagepricechanged
type DirectMessagesTopic ¶ added in v1.17.0
type DirectMessagesTopic struct {
TopicID int `json:"topic_id"`
User *User `json:"user,omitempty"`
}
DirectMessagesTopic https://core.telegram.org/bots/api#directmessagestopic
type DisabledButton ¶ added in v1.24.0
type DisabledButton struct{}
DisabledButton https://core.telegram.org/bots/api#disabledbutton
Represents a disabled button which does nothing. Currently holds no information.
type Document ¶
type EmojiType ¶ added in v1.28.0
type EmojiType struct {
Type EmojiTypeType
EmojiTypeEmoji *EmojiTypeEmoji
EmojiTypeCustomEmoji *EmojiTypeCustomEmoji
}
EmojiType https://core.telegram.org/bots/api#emojitype
func (EmojiType) MarshalJSON ¶ added in v1.28.0
func (*EmojiType) UnmarshalJSON ¶ added in v1.28.0
type EmojiTypeCustomEmoji ¶ added in v1.28.0
type EmojiTypeCustomEmoji struct {
Type EmojiTypeType `json:"type"`
CustomEmojiID string `json:"custom_emoji_id"`
}
EmojiTypeCustomEmoji https://core.telegram.org/bots/api#emojitypecustomemoji
type EmojiTypeEmoji ¶ added in v1.28.0
type EmojiTypeEmoji struct {
Type EmojiTypeType `json:"type"`
Emoji string `json:"emoji"`
}
EmojiTypeEmoji https://core.telegram.org/bots/api#emojitypeemoji
type EmojiTypeType ¶ added in v1.28.0
type EmojiTypeType string
EmojiTypeType https://core.telegram.org/bots/api#emojitype
const ( EmojiTypeTypeEmoji EmojiTypeType = "emoji" EmojiTypeTypeCustomEmoji EmojiTypeType = "custom_emoji" )
type EncryptedCredentials ¶
type EncryptedCredentials struct {
Data string `json:"data"`
Hash string `json:"hash"`
Secret string `json:"secret"`
}
EncryptedCredentials https://core.telegram.org/bots/api#encryptedcredentials
type EncryptedPassportElement ¶
type EncryptedPassportElement struct {
Type string `json:"type"`
Data string `json:"data,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
Email string `json:"email,omitempty"`
Files []PassportFile `json:"files,omitempty"`
FrontSide *PassportFile `json:"front_side,omitempty"`
ReverseSide *PassportFile `json:"reverse_side,omitempty"`
Selfie *PassportFile `json:"selfie,omitempty"`
Translation []PassportFile `json:"translation,omitempty"`
Hash string `json:"hash"`
}
EncryptedPassportElement https://core.telegram.org/bots/api#encryptedpassportelement
type EphemeralMessageParameters ¶ added in v1.24.0
type EphemeralMessageParameters struct {
ReceiverUserID int64 `json:"receiver_user_id,omitempty"`
CallbackQueryID string `json:"callback_query_id,omitempty"`
ReplaceCallbackQueryMessage bool `json:"replace_callback_query_message,omitempty"`
}
EphemeralMessageParameters https://core.telegram.org/bots/api#ephemeralmessageparameters
Describes the parameters of an ephemeral message to send.
type ExternalReplyInfo ¶ added in v1.0.0
type ExternalReplyInfo struct {
Origin MessageOrigin `json:"origin"`
Chat *Chat `json:"chat,omitempty"`
MessageID int `json:"message_id,omitempty"`
LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
Animation *Animation `json:"animation,omitempty"`
Audio *Audio `json:"audio,omitempty"`
Document *Document `json:"document,omitempty"`
PaidMedia *PaidMediaInfo `json:"paid_media,omitempty"`
Photo []PhotoSize `json:"photo,omitempty"`
Sticker *Sticker `json:"sticker,omitempty"`
Story *Story `json:"story,omitempty"`
Video *Video `json:"video,omitempty"`
VideoNote *VideoNote `json:"video_note,omitempty"`
Voice *Voice `json:"voice,omitempty"`
Widget *Widget `json:"widget,omitempty"`
HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"`
Checklist *Checklist `json:"checklist,omitempty"`
Contact *Contact `json:"contact,omitempty"`
Dice *Dice `json:"dice,omitempty"`
Game *Game `json:"game,omitempty"`
Giveaway *Giveaway `json:"giveaway,omitempty"`
GiveawayWinners *GiveawayWinners `json:"giveaway_winners,omitempty"`
Invoice *Invoice `json:"invoice,omitempty"`
Location *Location `json:"location,omitempty"`
Poll *Poll `json:"poll,omitempty"`
Venue *Venue `json:"venue,omitempty"`
LivePhoto *LivePhoto `json:"live_photo,omitempty"`
}
ExternalReplyInfo https://core.telegram.org/bots/api#externalreplyinfo
type File ¶
type ForceReply ¶
type ForumTopic ¶ added in v0.3.1
type ForumTopicClosed ¶ added in v0.3.1
type ForumTopicClosed struct {
}
ForumTopicClosed https://core.telegram.org/bots/api#forumtopicclosed
type ForumTopicCreated ¶ added in v0.3.1
type ForumTopicCreated struct {
Name string `json:"name"`
IconColor int `json:"icon_color"`
IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
IsNameImplicit bool `json:"is_name_implicit,omitempty"`
}
ForumTopicCreated https://core.telegram.org/bots/api#forumtopiccreated
type ForumTopicEdited ¶ added in v0.3.4
type ForumTopicEdited struct {
Name string `json:"name,omitempty"`
IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
}
ForumTopicEdited https://core.telegram.org/bots/api#forumtopicedited
type ForumTopicReopened ¶ added in v0.3.1
type ForumTopicReopened struct {
}
ForumTopicReopened https://core.telegram.org/bots/api#forumtopicreopened
type Game ¶
type GameHighScore ¶
type GameHighScore struct {
Position int `json:"position"`
User User `json:"user"`
Score int `json:"score"`
}
GameHighScore https://core.telegram.org/bots/api#gamehighscore
type GeneralForumTopicHidden ¶ added in v0.3.4
type GeneralForumTopicHidden struct {
}
GeneralForumTopicHidden https://core.telegram.org/bots/api#generalforumtopichidden
type GeneralForumTopicUnhidden ¶ added in v0.3.4
type GeneralForumTopicUnhidden struct {
}
GeneralForumTopicUnhidden https://core.telegram.org/bots/api#generalforumtopicunhidden
type Gift ¶ added in v1.11.0
type Gift struct {
ID string `json:"id"`
Sticker Sticker `json:"sticker"`
StarCount int `json:"star_count"`
UpgradeStarCount int `json:"upgrade_star_count,omitempty"`
IsPremium bool `json:"is_premium,omitempty"`
HasColors bool `json:"has_colors,omitempty"`
TotalCount int `json:"total_count,omitempty"`
RemainingCount int `json:"remaining_count,omitempty"`
PersonalTotalCount int `json:"personal_total_count,omitempty"`
PersonalRemainingCount int `json:"personal_remaining_count,omitempty"`
Background *GiftBackground `json:"background,omitempty"`
UniqueGiftVariantCount int `json:"unique_gift_variant_count,omitempty"`
PublisherChat *Chat `json:"publisher_chat,omitempty"`
}
type GiftBackground ¶ added in v1.18.0
type GiftBackground struct {
CenterColor int `json:"center_color"`
EdgeColor int `json:"edge_color"`
TextColor int `json:"text_color"`
}
GiftBackground https://core.telegram.org/bots/api#giftbackground
type GiftInfo ¶ added in v1.15.0
type GiftInfo struct {
Gift Gift `json:"gift"`
OwnedGiftID string `json:"owned_gift_id,omitempty"`
ConvertStarCount int `json:"convert_star_count,omitempty"`
PrepaidUpgradeStarCount int `json:"prepaid_upgrade_star_count,omitempty"`
IsUpgradeSeparate bool `json:"is_upgrade_separate,omitempty"`
CanBeUpgraded bool `json:"can_be_upgraded,omitempty"`
Text string `json:"text,omitempty"`
Entities []MessageEntity `json:"entities,omitempty"`
IsPrivate bool `json:"is_private,omitempty"`
UniqueGiftNumber int `json:"unique_gift_number,omitempty"`
}
type Giveaway ¶ added in v1.0.0
type Giveaway struct {
Chats []Chat `json:"chats"`
WinnersSelectionDate int `json:"winners_selection_date"`
WinnerCount int `json:"winner_count"`
OnlyNewMembers bool `json:"only_new_members,omitempty"`
HasPublicWinners bool `json:"has_public_winners,omitempty"`
PrizeDescription string `json:"prize_description,omitempty"`
CountryCodes []string `json:"country_codes,omitempty"`
PrizeStarCount int `json:"prize_star_count,omitempty"`
PremiumSubscriptionMonthCount int `json:"premium_subscription_month_count,omitempty"`
}
type GiveawayCompleted ¶ added in v1.0.0
type GiveawayCompleted struct {
WinnerCount int `json:"winner_count"`
UnclaimedPrizeCount int `json:"unclaimed_prize_count,omitempty"`
GiveawayMessage *Message `json:"giveaway_message,omitempty"`
IsStarGiveaway bool `json:"is_star_giveaway,omitempty"`
}
GiveawayCompleted https://core.telegram.org/bots/api#giveawaycompleted
type GiveawayCreated ¶ added in v1.0.0
type GiveawayCreated struct {
PrizeStarCount int `json:"prize_star_count,omitempty"`
}
GiveawayCreated https://core.telegram.org/bots/api#giveawaycreated
type GiveawayWinners ¶ added in v1.0.0
type GiveawayWinners struct {
Chat Chat `json:"chat"`
GiveawayMessageID int `json:"giveaway_message_id"`
WinnersSelectionDate int `json:"winners_selection_date"`
WinnerCount int `json:"winner_count"`
Winners []User `json:"winners"`
AdditionalChatCount int `json:"additional_chat_count,omitempty"`
PremiumSubscriptionMonthCount int `json:"premium_subscription_month_count,omitempty"`
UnclaimedPrizeCount int `json:"unclaimed_prize_count,omitempty"`
PrizeStarCount int `json:"prize_star_count,omitempty"`
OnlyNewMembers bool `json:"only_new_members,omitempty"`
WasRefunded bool `json:"was_refunded,omitempty"`
PrizeDescription string `json:"prize_description,omitempty"`
}
GiveawayWinners https://core.telegram.org/bots/api#giveawaywinners
type InaccessibleMessage ¶ added in v1.0.0
type InaccessibleMessage struct {
Chat Chat `json:"chat"`
MessageID int `json:"message_id"`
Date int `json:"date"`
}
InaccessibleMessage https://core.telegram.org/bots/api#inaccessiblemessage
type InlineKeyboardButton ¶
type InlineKeyboardButton struct {
Text string `json:"text"`
IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
Style string `json:"style,omitempty"`
URL string `json:"url,omitempty"`
CallbackData string `json:"callback_data,omitempty"`
WebApp *WebAppInfo `json:"web_app,omitempty"`
LoginURL *LoginURL `json:"login_url,omitempty"`
SwitchInlineQuery *string `json:"switch_inline_query,omitempty"`
SwitchInlineQueryCurrentChat *string `json:"switch_inline_query_current_chat,omitempty"`
SwitchInlineQueryChosenChat *SwitchInlineQueryChosenChat `json:"switch_inline_query_chosen_chat,omitempty"`
CopyText *CopyTextButton `json:"copy_text,omitempty"`
CallbackGame *CallbackGame `json:"callback_game,omitempty"`
Pay bool `json:"pay,omitempty"`
Disabled *DisabledButton `json:"disabled,omitempty"`
}
InlineKeyboardButton https://core.telegram.org/bots/api#inlinekeyboardbutton
type InlineKeyboardMarkup ¶
type InlineKeyboardMarkup struct {
InlineKeyboard [][]InlineKeyboardButton `json:"inline_keyboard"`
ForceReply bool `json:"force_reply,omitempty"`
}
InlineKeyboardMarkup https://core.telegram.org/bots/api#inlinekeyboardmarkup
type InlineQuery ¶
type InlineQuery struct {
ID string `json:"id"`
From *User `json:"from"`
Query string `json:"query"`
Offset string `json:"offset"`
ChatType string `json:"chat_type,omitempty"`
Location *Location `json:"location,omitempty"`
}
InlineQuery https://core.telegram.org/bots/api#inlinequery
type InlineQueryResult ¶
type InlineQueryResult interface {
MarshalCustom() ([]byte, error)
// contains filtered or unexported methods
}
InlineQueryResult https://core.telegram.org/bots/api#inlinequeryresult
type InlineQueryResultArticle ¶
type InlineQueryResultArticle struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
URL string `json:"url,omitempty"`
Description string `json:"description,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
}
InlineQueryResultArticle https://core.telegram.org/bots/api#inlinequeryresultarticle
func (*InlineQueryResultArticle) MarshalCustom ¶
func (m *InlineQueryResultArticle) MarshalCustom() ([]byte, error)
type InlineQueryResultAudio ¶
type InlineQueryResultAudio struct {
ID string `json:"id"`
AudioURL string `json:"audio_url"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
Performer string `json:"performer,omitempty"`
AudioDuration int `json:"audio_duration,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultAudio https://core.telegram.org/bots/api#inlinequeryresultaudio
func (*InlineQueryResultAudio) MarshalCustom ¶
func (m *InlineQueryResultAudio) MarshalCustom() ([]byte, error)
type InlineQueryResultCachedAudio ¶
type InlineQueryResultCachedAudio struct {
ID string `json:"id"`
AudioFileID string `json:"audio_file_id"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedAudio https://core.telegram.org/bots/api#inlinequeryresultcachedaudio
func (*InlineQueryResultCachedAudio) MarshalCustom ¶
func (m *InlineQueryResultCachedAudio) MarshalCustom() ([]byte, error)
type InlineQueryResultCachedDocument ¶
type InlineQueryResultCachedDocument struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
DocumentFileID string `json:"document_file_id"`
Description string `json:"description,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedDocument https://core.telegram.org/bots/api#inlinequeryresultcacheddocument
func (*InlineQueryResultCachedDocument) MarshalCustom ¶
func (m *InlineQueryResultCachedDocument) MarshalCustom() ([]byte, error)
type InlineQueryResultCachedGif ¶
type InlineQueryResultCachedGif struct {
ID string `json:"id"`
GifFileID string `json:"gif_file_id"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedGif https://core.telegram.org/bots/api#inlinequeryresultcachedgif
func (*InlineQueryResultCachedGif) MarshalCustom ¶
func (m *InlineQueryResultCachedGif) MarshalCustom() ([]byte, error)
type InlineQueryResultCachedMpeg4Gif ¶
type InlineQueryResultCachedMpeg4Gif struct {
ID string `json:"id"`
Mpeg4FileID string `json:"mpeg4_file_id"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedMpeg4Gif https://core.telegram.org/bots/api#inlinequeryresultcachedmpeg4gif
func (*InlineQueryResultCachedMpeg4Gif) MarshalCustom ¶
func (m *InlineQueryResultCachedMpeg4Gif) MarshalCustom() ([]byte, error)
type InlineQueryResultCachedPhoto ¶
type InlineQueryResultCachedPhoto struct {
ID string `json:"id"`
PhotoFileID string `json:"photo_file_id"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedPhoto https://core.telegram.org/bots/api#inlinequeryresultcachedphoto
func (*InlineQueryResultCachedPhoto) MarshalCustom ¶
func (m *InlineQueryResultCachedPhoto) MarshalCustom() ([]byte, error)
type InlineQueryResultCachedSticker ¶
type InlineQueryResultCachedSticker struct {
ID string `json:"id"`
StickerFileID string `json:"sticker_file_id"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedSticker https://core.telegram.org/bots/api#inlinequeryresultcachedsticker
func (*InlineQueryResultCachedSticker) MarshalCustom ¶
func (m *InlineQueryResultCachedSticker) MarshalCustom() ([]byte, error)
type InlineQueryResultCachedVideo ¶
type InlineQueryResultCachedVideo struct {
ID string `json:"id"`
VideoFileID string `json:"video_file_id"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedVideo https://core.telegram.org/bots/api#inlinequeryresultcachedvideo
func (*InlineQueryResultCachedVideo) MarshalCustom ¶
func (m *InlineQueryResultCachedVideo) MarshalCustom() ([]byte, error)
type InlineQueryResultCachedVoice ¶
type InlineQueryResultCachedVoice struct {
ID string `json:"id"`
VoiceFileID string `json:"voice_file_id"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultCachedVoice https://core.telegram.org/bots/api#inlinequeryresultcachedvoice
func (*InlineQueryResultCachedVoice) MarshalCustom ¶
func (m *InlineQueryResultCachedVoice) MarshalCustom() ([]byte, error)
type InlineQueryResultContact ¶
type InlineQueryResultContact struct {
ID string `json:"id"`
PhoneNumber string `json:"phone_number"`
FirstName string `json:"first_name"`
LastName string `json:"last_name,omitempty"`
VCard string `json:"vcard,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
}
InlineQueryResultContact https://core.telegram.org/bots/api#inlinequeryresultcontact
func (*InlineQueryResultContact) MarshalCustom ¶
func (m *InlineQueryResultContact) MarshalCustom() ([]byte, error)
type InlineQueryResultDocument ¶
type InlineQueryResultDocument struct {
ID string `json:"id"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
DocumentURL string `json:"document_url"`
MimeType string `json:"mime_type"`
Description string `json:"description,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
}
InlineQueryResultDocument https://core.telegram.org/bots/api#inlinequeryresultdocument
func (*InlineQueryResultDocument) MarshalCustom ¶
func (m *InlineQueryResultDocument) MarshalCustom() ([]byte, error)
type InlineQueryResultGame ¶
type InlineQueryResultGame struct {
ID string `json:"id"`
GameShortName string `json:"game_short_name"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
}
InlineQueryResultGame https://core.telegram.org/bots/api#inlinequeryresultgame
func (*InlineQueryResultGame) MarshalCustom ¶
func (m *InlineQueryResultGame) MarshalCustom() ([]byte, error)
type InlineQueryResultGif ¶
type InlineQueryResultGif struct {
ID string `json:"id"`
GifURL string `json:"gif_url"`
GifWidth int `json:"gif_width,omitempty"`
GifHeight int `json:"gif_height,omitempty"`
GifDuration int `json:"gif_duration,omitempty"`
ThumbnailURL string `json:"thumbnail_url"`
ThumbnailMimeType string `json:"thumbnail_mime_type,omitempty"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultGif https://core.telegram.org/bots/api#inlinequeryresultgif
func (*InlineQueryResultGif) MarshalCustom ¶
func (m *InlineQueryResultGif) MarshalCustom() ([]byte, error)
type InlineQueryResultLocation ¶
type InlineQueryResultLocation struct {
ID string `json:"id"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Title string `json:"title,omitempty"`
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
LivePeriod int `json:"live_period,omitempty"`
Heading int `json:"heading,omitempty"`
ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
}
InlineQueryResultLocation https://core.telegram.org/bots/api#inlinequeryresultlocation
func (*InlineQueryResultLocation) MarshalCustom ¶
func (m *InlineQueryResultLocation) MarshalCustom() ([]byte, error)
type InlineQueryResultMpeg4Gif ¶
type InlineQueryResultMpeg4Gif struct {
ID string `json:"id"`
Mpeg4URL string `json:"mpeg4_url"`
Mpeg4Width int `json:"mpeg4_width,omitempty"`
Mpeg4Height int `json:"mpeg4_height,omitempty"`
Mpeg4Duration int `json:"mpeg4_duration,omitempty"`
ThumbnailURL string `json:"thumbnail_url"`
ThumbnailMimeType string `json:"thumbnail_mime_type,omitempty"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultMpeg4Gif https://core.telegram.org/bots/api#inlinequeryresultmpeg4gif
func (*InlineQueryResultMpeg4Gif) MarshalCustom ¶
func (m *InlineQueryResultMpeg4Gif) MarshalCustom() ([]byte, error)
type InlineQueryResultPhoto ¶
type InlineQueryResultPhoto struct {
ID string `json:"id"`
PhotoURL string `json:"photo_url"`
ThumbnailURL string `json:"thumbnail_url"`
PhotoWidth int `json:"photo_width,omitempty"`
PhotoHeight int `json:"photo_height,omitempty"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultPhoto https://core.telegram.org/bots/api#inlinequeryresultphoto
func (*InlineQueryResultPhoto) MarshalCustom ¶
func (m *InlineQueryResultPhoto) MarshalCustom() ([]byte, error)
type InlineQueryResultVenue ¶
type InlineQueryResultVenue struct {
ID string `json:"id"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Title string `json:"title,omitempty"`
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"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
ThumbnailURL string `json:"thumbnail_url,omitempty"`
ThumbnailWidth int `json:"thumbnail_width,omitempty"`
ThumbnailHeight int `json:"thumbnail_height,omitempty"`
}
InlineQueryResultVenue https://core.telegram.org/bots/api#inlinequeryresultvenue
func (*InlineQueryResultVenue) MarshalCustom ¶
func (m *InlineQueryResultVenue) MarshalCustom() ([]byte, error)
type InlineQueryResultVideo ¶
type InlineQueryResultVideo struct {
ID string `json:"id"`
VideoURL string `json:"video_url"`
MimeType string `json:"mime_type,omitempty"`
ThumbnailURL string `json:"thumbnail_url"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
VideoWidth int `json:"video_width,omitempty"`
VideoHeight int `json:"video_height,omitempty"`
VideoDuration int `json:"video_duration,omitempty"`
Description string `json:"description,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultVideo https://core.telegram.org/bots/api#inlinequeryresultvideo
func (*InlineQueryResultVideo) MarshalCustom ¶
func (m *InlineQueryResultVideo) MarshalCustom() ([]byte, error)
type InlineQueryResultVoice ¶
type InlineQueryResultVoice struct {
ID string `json:"id"`
VoiceURL string `json:"voice_url"`
Title string `json:"title,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
VoiceDuration int `json:"voice_duration,omitempty"`
ReplyMarkup ReplyMarkup `json:"reply_markup,omitempty"`
InputMessageContent InputMessageContent `json:"input_message_content,omitempty"`
}
InlineQueryResultVoice https://core.telegram.org/bots/api#inlinequeryresultvoice
func (*InlineQueryResultVoice) MarshalCustom ¶
func (m *InlineQueryResultVoice) MarshalCustom() ([]byte, error)
type InlineQueryResultsButton ¶ added in v0.7.6
type InlineQueryResultsButton struct {
Text string `json:"text"`
WebApp *WebAppInfo `json:"web_app"`
StartParameter string `json:"start_parameter,omitempty"`
}
InlineQueryResultsButton https://core.telegram.org/bots/api#inlinequeryresultsbutton
type InputChecklist ¶ added in v1.16.0
type InputChecklist struct {
Title string `json:"title"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
TitleEntities []MessageEntity `json:"title_entities,omitempty"`
Tasks []InputChecklistTask `json:"tasks"`
OthersCanAddTasks bool `json:"others_can_add_tasks,omitempty"`
OthersCanMarkTasksAsDone bool `json:"others_can_mark_tasks_as_done,omitempty"`
}
InputChecklist https://core.telegram.org/bots/api#inputchecklist
type InputChecklistTask ¶ added in v1.16.0
type InputChecklistTask struct {
ID int `json:"id"`
Text string `json:"text"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
TextEntities []MessageEntity `json:"text_entities,omitempty"`
}
InputChecklistTask https://core.telegram.org/bots/api#inputchecklisttask
type InputContactMessageContent ¶
type InputContactMessageContent struct {
PhoneNumber string `json:"phone_number"`
FirstName string `json:"first_name"`
LastName string `json:"last_name,omitempty"`
VCard string `json:"vcard,omitempty"`
}
InputContactMessageContent https://core.telegram.org/bots/api#inputcontactmessagecontent
type InputFileString ¶
type InputFileString struct {
Data string
}
func (*InputFileString) MarshalJSON ¶
func (i *InputFileString) MarshalJSON() ([]byte, error)
func (*InputFileString) UnmarshalJSON ¶ added in v1.2.2
func (i *InputFileString) UnmarshalJSON(data []byte) error
type InputFileType ¶
type InputFileType int
type InputFileUpload ¶
func (*InputFileUpload) MarshalJSON ¶
func (i *InputFileUpload) MarshalJSON() ([]byte, error)
MarshalJSON encodes the upload as its attach:// reference, for the places the value is marshalled instead of becoming a form field of its own, e.g. the thumbnail of an InputMedia. Filename doubles as the name of the form part.
type InputInvoiceMessageContent ¶
type InputInvoiceMessageContent struct {
Title string `json:"title"`
Description string `json:"description"`
Payload string `json:"payload"`
ProviderToken string `json:"provider_token,omitempty"`
Currency string `json:"currency"`
Prices []LabeledPrice `json:"prices"`
MaxTipAmount int `json:"max_tip_amount,omitempty"`
SuggestedTipAmounts []int `json:"suggested_tip_amounts,omitempty"`
ProviderData string `json:"provider_data,omitempty"`
PhotoURL string `json:"photo_url,omitempty"`
PhotoSize int `json:"photo_size,omitempty"`
PhotoWidth int `json:"photo_width,omitempty"`
PhotoHeight int `json:"photo_height,omitempty"`
NeedName bool `json:"need_name,omitempty"`
NeedPhoneNumber bool `json:"need_phone_number,omitempty"`
NeedEmail bool `json:"need_email,omitempty"`
NeedShippingAddress bool `json:"need_shipping_address,omitempty"`
SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider,omitempty"`
SendEmailToProvider bool `json:"send_email_to_provider,omitempty"`
IsFlexible bool `json:"is_flexible,omitempty"`
}
InputInvoiceMessageContent https://core.telegram.org/bots/api#inputinvoicemessagecontent
type InputLocationMessageContent ¶
type InputLocationMessageContent struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
LivePeriod int `json:"live_period,omitempty"`
Heading int `json:"heading,omitempty"`
ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"`
}
InputLocationMessageContent https://core.telegram.org/bots/api#inputlocationmessagecontent
type InputMedia ¶
type InputMediaAnimation ¶
type InputMediaAnimation struct {
Media string `json:"media"`
Thumbnail InputFile `json:"thumbnail,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
Duration int `json:"duration,omitempty"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
MediaAttachment io.Reader `json:"-"`
}
InputMediaAnimation https://core.telegram.org/bots/api#inputmediaanimation
func (*InputMediaAnimation) Attachment ¶
func (m *InputMediaAnimation) Attachment() io.Reader
func (*InputMediaAnimation) GetMedia ¶
func (m *InputMediaAnimation) GetMedia() string
func (*InputMediaAnimation) GetThumbnail ¶ added in v1.25.0
func (m *InputMediaAnimation) GetThumbnail() InputFile
func (InputMediaAnimation) MarshalInputMedia ¶
func (m InputMediaAnimation) MarshalInputMedia() ([]byte, error)
func (InputMediaAnimation) MarshalJSON ¶ added in v1.23.0
func (m InputMediaAnimation) MarshalJSON() ([]byte, error)
MarshalJSON keeps the required "type" discriminator when the value is reached through a plain json.Marshal, e.g. nested inside a rich message.
type InputMediaAudio ¶
type InputMediaAudio struct {
Media string `json:"media"`
Thumbnail InputFile `json:"thumbnail,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
Duration int `json:"duration,omitempty"`
Performer string `json:"performer,omitempty"`
Title string `json:"title,omitempty"`
MediaAttachment io.Reader `json:"-"`
}
InputMediaAudio https://core.telegram.org/bots/api#inputmediaaudio
func (*InputMediaAudio) Attachment ¶
func (m *InputMediaAudio) Attachment() io.Reader
func (*InputMediaAudio) GetMedia ¶
func (m *InputMediaAudio) GetMedia() string
func (*InputMediaAudio) GetThumbnail ¶ added in v1.25.0
func (m *InputMediaAudio) GetThumbnail() InputFile
func (InputMediaAudio) MarshalInputMedia ¶
func (m InputMediaAudio) MarshalInputMedia() ([]byte, error)
func (InputMediaAudio) MarshalJSON ¶ added in v1.23.0
func (m InputMediaAudio) MarshalJSON() ([]byte, error)
MarshalJSON keeps the required "type" discriminator when the value is reached through a plain json.Marshal, e.g. nested inside a rich message.
type InputMediaDocument ¶
type InputMediaDocument struct {
Media string `json:"media"`
Thumbnail InputFile `json:"thumbnail,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
DisableContentTypeDetection bool `json:"disable_content_type_detection,omitempty"`
MediaAttachment io.Reader `json:"-"`
}
InputMediaDocument https://core.telegram.org/bots/api#inputmediadocument
func (*InputMediaDocument) Attachment ¶
func (m *InputMediaDocument) Attachment() io.Reader
func (*InputMediaDocument) GetMedia ¶
func (m *InputMediaDocument) GetMedia() string
func (*InputMediaDocument) GetThumbnail ¶ added in v1.25.0
func (m *InputMediaDocument) GetThumbnail() InputFile
func (InputMediaDocument) MarshalInputMedia ¶
func (m InputMediaDocument) MarshalInputMedia() ([]byte, error)
func (InputMediaDocument) MarshalJSON ¶ added in v1.23.0
func (m InputMediaDocument) MarshalJSON() ([]byte, error)
MarshalJSON keeps the required "type" discriminator when the value is reached through a plain json.Marshal, e.g. nested inside a rich message.
type InputMediaLivePhoto ¶ added in v1.21.0
type InputMediaLivePhoto struct {
Media string `json:"media"`
Photo string `json:"photo"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
MediaAttachment io.Reader `json:"-"`
PhotoAttachment io.Reader `json:"-"`
}
InputMediaLivePhoto https://core.telegram.org/bots/api#inputmedialivephoto
func (*InputMediaLivePhoto) Attachment ¶ added in v1.21.0
func (m *InputMediaLivePhoto) Attachment() io.Reader
func (*InputMediaLivePhoto) GetMedia ¶ added in v1.21.0
func (m *InputMediaLivePhoto) GetMedia() string
func (InputMediaLivePhoto) MarshalInputMedia ¶ added in v1.21.0
func (m InputMediaLivePhoto) MarshalInputMedia() ([]byte, error)
func (InputMediaLivePhoto) MarshalJSON ¶ added in v1.23.0
func (m InputMediaLivePhoto) MarshalJSON() ([]byte, error)
MarshalJSON keeps the required "type" discriminator when the value is reached through a plain json.Marshal, e.g. nested inside a rich message.
type InputMediaLocation ¶ added in v1.21.0
type InputMediaLocation struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
}
InputMediaLocation https://core.telegram.org/bots/api#inputmedialocation
func (*InputMediaLocation) Attachment ¶ added in v1.21.0
func (m *InputMediaLocation) Attachment() io.Reader
func (*InputMediaLocation) GetMedia ¶ added in v1.21.0
func (m *InputMediaLocation) GetMedia() string
func (InputMediaLocation) MarshalInputMedia ¶ added in v1.21.0
func (m InputMediaLocation) MarshalInputMedia() ([]byte, error)
func (InputMediaLocation) MarshalJSON ¶ added in v1.23.0
func (m InputMediaLocation) MarshalJSON() ([]byte, error)
MarshalJSON keeps the required "type" discriminator when the value is reached through a plain json.Marshal, e.g. nested inside a rich message.
type InputMediaPhoto ¶
type InputMediaPhoto struct {
Media string `json:"media"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
MediaAttachment io.Reader `json:"-"`
}
InputMediaPhoto https://core.telegram.org/bots/api#inputmediaphoto
func (*InputMediaPhoto) Attachment ¶
func (m *InputMediaPhoto) Attachment() io.Reader
func (*InputMediaPhoto) GetMedia ¶
func (m *InputMediaPhoto) GetMedia() string
func (InputMediaPhoto) MarshalInputMedia ¶
func (m InputMediaPhoto) MarshalInputMedia() ([]byte, error)
func (InputMediaPhoto) MarshalJSON ¶ added in v1.23.0
func (m InputMediaPhoto) MarshalJSON() ([]byte, error)
MarshalJSON keeps the required "type" discriminator when the value is reached through a plain json.Marshal, e.g. nested inside a rich message.
type InputMediaSticker ¶ added in v1.21.0
type InputMediaSticker struct {
Media string `json:"media"`
Emoji string `json:"emoji,omitempty"`
MediaAttachment io.Reader `json:"-"`
}
InputMediaSticker https://core.telegram.org/bots/api#inputmediasticker
func (*InputMediaSticker) Attachment ¶ added in v1.21.0
func (m *InputMediaSticker) Attachment() io.Reader
func (*InputMediaSticker) GetMedia ¶ added in v1.21.0
func (m *InputMediaSticker) GetMedia() string
func (InputMediaSticker) MarshalInputMedia ¶ added in v1.21.0
func (m InputMediaSticker) MarshalInputMedia() ([]byte, error)
func (InputMediaSticker) MarshalJSON ¶ added in v1.23.0
func (m InputMediaSticker) MarshalJSON() ([]byte, error)
MarshalJSON keeps the required "type" discriminator when the value is reached through a plain json.Marshal, e.g. nested inside a rich message.
type InputMediaVenue ¶ added in v1.21.0
type InputMediaVenue struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Title string `json:"title"`
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"`
}
InputMediaVenue https://core.telegram.org/bots/api#inputmediavenue
func (*InputMediaVenue) Attachment ¶ added in v1.21.0
func (m *InputMediaVenue) Attachment() io.Reader
func (*InputMediaVenue) GetMedia ¶ added in v1.21.0
func (m *InputMediaVenue) GetMedia() string
func (InputMediaVenue) MarshalInputMedia ¶ added in v1.21.0
func (m InputMediaVenue) MarshalInputMedia() ([]byte, error)
func (InputMediaVenue) MarshalJSON ¶ added in v1.23.0
func (m InputMediaVenue) MarshalJSON() ([]byte, error)
MarshalJSON keeps the required "type" discriminator when the value is reached through a plain json.Marshal, e.g. nested inside a rich message.
type InputMediaVideo ¶
type InputMediaVideo struct {
Media string `json:"media"`
Thumbnail InputFile `json:"thumbnail,omitempty"`
Cover string `json:"cover,omitempty"`
StartTimestamp int `json:"start_timestamp,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
Duration int `json:"duration,omitempty"`
SupportsStreaming bool `json:"supports_streaming,omitempty"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
MediaAttachment io.Reader `json:"-"`
}
InputMediaVideo https://core.telegram.org/bots/api#inputmediavideo
func (*InputMediaVideo) Attachment ¶
func (m *InputMediaVideo) Attachment() io.Reader
func (*InputMediaVideo) GetMedia ¶
func (m *InputMediaVideo) GetMedia() string
func (*InputMediaVideo) GetThumbnail ¶ added in v1.25.0
func (m *InputMediaVideo) GetThumbnail() InputFile
func (InputMediaVideo) MarshalInputMedia ¶
func (m InputMediaVideo) MarshalInputMedia() ([]byte, error)
func (InputMediaVideo) MarshalJSON ¶ added in v1.23.0
func (m InputMediaVideo) MarshalJSON() ([]byte, error)
MarshalJSON keeps the required "type" discriminator when the value is reached through a plain json.Marshal, e.g. nested inside a rich message.
type InputMediaVoiceNote ¶ added in v1.23.0
type InputMediaVoiceNote struct {
Media string `json:"media"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
Duration int `json:"duration,omitempty"`
MediaAttachment io.Reader `json:"-"`
}
InputMediaVoiceNote https://core.telegram.org/bots/api#inputmediavoicenote
func (*InputMediaVoiceNote) Attachment ¶ added in v1.23.0
func (m *InputMediaVoiceNote) Attachment() io.Reader
func (*InputMediaVoiceNote) GetMedia ¶ added in v1.23.0
func (m *InputMediaVoiceNote) GetMedia() string
func (InputMediaVoiceNote) MarshalInputMedia ¶ added in v1.23.0
func (m InputMediaVoiceNote) MarshalInputMedia() ([]byte, error)
func (InputMediaVoiceNote) MarshalJSON ¶ added in v1.23.0
func (m InputMediaVoiceNote) MarshalJSON() ([]byte, error)
MarshalJSON keeps the required "type" discriminator when the value is reached through a plain json.Marshal, e.g. nested inside a rich message.
type InputMenuButton ¶
type InputMenuButton interface {
// contains filtered or unexported methods
}
type InputMessageContent ¶
type InputMessageContent interface {
// contains filtered or unexported methods
}
InputMessageContent https://core.telegram.org/bots/api#inputmessagecontent
type InputPaidMedia ¶ added in v1.6.0
type InputPaidMediaLivePhoto ¶ added in v1.21.0
type InputPaidMediaLivePhoto struct {
Type string `json:"type"`
Media string `json:"media"`
Photo string `json:"photo"`
}
InputPaidMediaLivePhoto https://core.telegram.org/bots/api#inputpaidmedialivephoto
type InputPaidMediaPhoto ¶ added in v1.6.0
type InputPaidMediaPhoto struct {
Media string `json:"media"`
MediaAttachment io.Reader `json:"-"`
}
InputPaidMediaPhoto https://core.telegram.org/bots/api#inputpaidmediaphoto
func (*InputPaidMediaPhoto) Attachment ¶ added in v1.6.0
func (m *InputPaidMediaPhoto) Attachment() io.Reader
func (*InputPaidMediaPhoto) GetMedia ¶ added in v1.6.0
func (m *InputPaidMediaPhoto) GetMedia() string
func (*InputPaidMediaPhoto) MarshalInputMedia ¶ added in v1.6.0
func (m *InputPaidMediaPhoto) MarshalInputMedia() ([]byte, error)
type InputPaidMediaVideo ¶ added in v1.6.0
type InputPaidMediaVideo struct {
Media string `json:"media"`
Thumbnail InputFile `json:"thumbnail,omitempty"`
Cover string `json:"cover,omitempty"`
StartTimestamp int `json:"start_timestamp,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
Duration int `json:"duration,omitempty"`
SupportsStreaming bool `json:"supports_streaming,omitempty"`
MediaAttachment io.Reader `json:"-"`
}
InputPaidMediaVideo https://core.telegram.org/bots/api#inputpaidmediavideo
func (*InputPaidMediaVideo) Attachment ¶ added in v1.6.0
func (m *InputPaidMediaVideo) Attachment() io.Reader
func (*InputPaidMediaVideo) GetMedia ¶ added in v1.6.0
func (m *InputPaidMediaVideo) GetMedia() string
func (*InputPaidMediaVideo) GetThumbnail ¶ added in v1.25.0
func (m *InputPaidMediaVideo) GetThumbnail() InputFile
func (*InputPaidMediaVideo) MarshalInputMedia ¶ added in v1.6.0
func (m *InputPaidMediaVideo) MarshalInputMedia() ([]byte, error)
type InputPollOption ¶ added in v1.3.0
type InputPollOption struct {
Text string `json:"text"`
TextParseMode ParseMode `json:"text_parse_mode,omitempty"`
TextEntities []MessageEntity `json:"text_entities,omitempty"`
Media InputMedia `json:"media,omitempty"`
}
InputPollOption https://core.telegram.org/bots/api#inputpolloption
func (InputPollOption) MarshalJSON ¶ added in v1.21.0
func (o InputPollOption) MarshalJSON() ([]byte, error)
type InputProfilePhoto ¶ added in v1.15.0
type InputProfilePhoto interface {
// contains filtered or unexported methods
}
InputProfilePhoto https://core.telegram.org/bots/api#inputprofilephoto
type InputProfilePhotoAnimated ¶ added in v1.15.0
type InputProfilePhotoAnimated struct {
Animation string `json:"animation"`
MainFrameTimestamp float64 `json:"main_frame_timestamp,omitempty"`
MediaAttachment io.Reader `json:"-"`
}
InputProfilePhotoAnimated https://core.telegram.org/bots/api#inputprofilephotoanimated
func (InputProfilePhotoAnimated) Attachment ¶ added in v1.15.0
func (i InputProfilePhotoAnimated) Attachment() io.Reader
func (InputProfilePhotoAnimated) GetMedia ¶ added in v1.15.0
func (i InputProfilePhotoAnimated) GetMedia() string
func (InputProfilePhotoAnimated) MarshalInputMedia ¶ added in v1.15.0
func (i InputProfilePhotoAnimated) MarshalInputMedia() ([]byte, error)
type InputProfilePhotoStatic ¶ added in v1.15.0
type InputProfilePhotoStatic struct {
Photo string `json:"photo"`
MediaAttachment io.Reader `json:"-"`
}
InputProfilePhotoStatic https://core.telegram.org/bots/api#inputprofilephotostatic
func (InputProfilePhotoStatic) Attachment ¶ added in v1.15.0
func (i InputProfilePhotoStatic) Attachment() io.Reader
func (InputProfilePhotoStatic) GetMedia ¶ added in v1.15.0
func (i InputProfilePhotoStatic) GetMedia() string
func (InputProfilePhotoStatic) MarshalInputMedia ¶ added in v1.15.0
func (i InputProfilePhotoStatic) MarshalInputMedia() ([]byte, error)
type InputRichBlock ¶ added in v1.23.0
type InputRichBlock struct {
Type RichBlockType
InputRichBlockParagraph *InputRichBlockParagraph
InputRichBlockSectionHeading *InputRichBlockSectionHeading
InputRichBlockPreformatted *InputRichBlockPreformatted
InputRichBlockDivider *InputRichBlockDivider
InputRichBlockMathematicalExpression *InputRichBlockMathematicalExpression
InputRichBlockAnchor *InputRichBlockAnchor
InputRichBlockList *InputRichBlockList
InputRichBlockBlockQuotation *InputRichBlockBlockQuotation
InputRichBlockExpandableBlockQuotation *InputRichBlockExpandableBlockQuotation
InputRichBlockPullQuotation *InputRichBlockPullQuotation
InputRichBlockCollage *InputRichBlockCollage
InputRichBlockSlideshow *InputRichBlockSlideshow
InputRichBlockTable *InputRichBlockTable
InputRichBlockDetails *InputRichBlockDetails
InputRichBlockMap *InputRichBlockMap
InputRichBlockButtons *InputRichBlockButtons
InputRichBlockAnimation *InputRichBlockAnimation
InputRichBlockAudio *InputRichBlockAudio
InputRichBlockDocument *InputRichBlockDocument
InputRichBlockPhoto *InputRichBlockPhoto
InputRichBlockVideo *InputRichBlockVideo
InputRichBlockVoiceNote *InputRichBlockVoiceNote
InputRichBlockThinking *InputRichBlockThinking
}
InputRichBlock https://core.telegram.org/bots/api#inputrichblock
InputRichBlock is a tagged union describing a single block of an outgoing rich message. Type holds the discriminator (reusing the RichBlockType values) and the matching variant pointer is populated.
func (InputRichBlock) MarshalJSON ¶ added in v1.23.0
func (rb InputRichBlock) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler. The value receiver ensures the encoding is applied even when an InputRichBlock is reached as a (non-pointer) struct field.
func (*InputRichBlock) UnmarshalJSON ¶ added in v1.23.0
func (rb *InputRichBlock) UnmarshalJSON(data []byte) error
type InputRichBlockAnchor ¶ added in v1.23.0
type InputRichBlockAnchor struct {
Type RichBlockType `json:"type"` // always "anchor"
Name string `json:"name"`
}
InputRichBlockAnchor https://core.telegram.org/bots/api#inputrichblockanchor
type InputRichBlockAnimation ¶ added in v1.23.0
type InputRichBlockAnimation struct {
Type RichBlockType `json:"type"` // always "animation"
Animation InputMediaAnimation `json:"animation"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
InputRichBlockAnimation https://core.telegram.org/bots/api#inputrichblockanimation
type InputRichBlockAudio ¶ added in v1.23.0
type InputRichBlockAudio struct {
Type RichBlockType `json:"type"` // always "audio"
Audio InputMediaAudio `json:"audio"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
InputRichBlockAudio https://core.telegram.org/bots/api#inputrichblockaudio
type InputRichBlockBlockQuotation ¶ added in v1.23.0
type InputRichBlockBlockQuotation struct {
Type RichBlockType `json:"type"` // always "blockquote"
Blocks []InputRichBlock `json:"blocks"`
Credit *RichText `json:"credit,omitempty"`
}
InputRichBlockBlockQuotation https://core.telegram.org/bots/api#inputrichblockblockquotation
type InputRichBlockButtons ¶ added in v1.24.0
type InputRichBlockButtons struct {
Type RichBlockType `json:"type"` // always "buttons"
Buttons []RichMessageButton `json:"buttons"`
Align string `json:"align,omitempty"`
}
InputRichBlockButtons https://core.telegram.org/bots/api#inputrichblockbuttons
type InputRichBlockCollage ¶ added in v1.23.0
type InputRichBlockCollage struct {
Type RichBlockType `json:"type"` // always "collage"
Blocks []InputRichBlock `json:"blocks"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
InputRichBlockCollage https://core.telegram.org/bots/api#inputrichblockcollage
type InputRichBlockDetails ¶ added in v1.23.0
type InputRichBlockDetails struct {
Type RichBlockType `json:"type"` // always "details"
Summary RichText `json:"summary"`
Blocks []InputRichBlock `json:"blocks"`
IsOpen bool `json:"is_open,omitempty"`
}
InputRichBlockDetails https://core.telegram.org/bots/api#inputrichblockdetails
type InputRichBlockDivider ¶ added in v1.23.0
type InputRichBlockDivider struct {
Type RichBlockType `json:"type"` // always "divider"
}
InputRichBlockDivider https://core.telegram.org/bots/api#inputrichblockdivider
type InputRichBlockDocument ¶ added in v1.24.0
type InputRichBlockDocument struct {
Type RichBlockType `json:"type"` // always "document"
Document InputMediaDocument `json:"document"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
InputRichBlockDocument https://core.telegram.org/bots/api#inputrichblockdocument
type InputRichBlockExpandableBlockQuotation ¶ added in v1.24.0
type InputRichBlockExpandableBlockQuotation struct {
Type RichBlockType `json:"type"` // always "expandable_blockquote"
Blocks []InputRichBlock `json:"blocks"`
Credit *RichText `json:"credit,omitempty"`
// Deprecated: Use Blocks. Text is not decoded or sent.
Text RichText `json:"-"`
}
InputRichBlockExpandableBlockQuotation https://core.telegram.org/bots/api#inputrichblockexpandableblockquotation
func (InputRichBlockExpandableBlockQuotation) MarshalJSON ¶ added in v1.31.0
func (q InputRichBlockExpandableBlockQuotation) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
type InputRichBlockFooter ¶ added in v1.23.0
type InputRichBlockFooter struct {
}
InputRichBlockFooter https://core.telegram.org/bots/api#inputrichblockfooter
type InputRichBlockList ¶ added in v1.23.0
type InputRichBlockList struct {
Type RichBlockType `json:"type"` // always "list"
Items []InputRichBlockListItem `json:"items"`
}
InputRichBlockList https://core.telegram.org/bots/api#inputrichblocklist
type InputRichBlockListItem ¶ added in v1.23.0
type InputRichBlockListItem struct {
Blocks []InputRichBlock `json:"blocks"`
HasCheckbox bool `json:"has_checkbox,omitempty"`
IsChecked bool `json:"is_checked,omitempty"`
Value int `json:"value,omitempty"`
Type string `json:"type,omitempty"`
}
InputRichBlockListItem https://core.telegram.org/bots/api#inputrichblocklistitem
An item in a list to be sent.
type InputRichBlockMap ¶ added in v1.23.0
type InputRichBlockMap struct {
Type RichBlockType `json:"type"` // always "map"
Location Location `json:"location"`
Zoom int `json:"zoom"`
Width int `json:"width"`
Height int `json:"height"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
InputRichBlockMap https://core.telegram.org/bots/api#inputrichblockmap
type InputRichBlockMathematicalExpression ¶ added in v1.23.0
type InputRichBlockMathematicalExpression struct {
Type RichBlockType `json:"type"` // always "mathematical_expression"
Expression string `json:"expression"`
}
InputRichBlockMathematicalExpression https://core.telegram.org/bots/api#inputrichblockmathematicalexpression
type InputRichBlockParagraph ¶ added in v1.23.0
type InputRichBlockParagraph struct {
Type RichBlockType `json:"type"` // always "paragraph"
Text RichText `json:"text"`
}
InputRichBlockParagraph https://core.telegram.org/bots/api#inputrichblockparagraph
type InputRichBlockPhoto ¶ added in v1.23.0
type InputRichBlockPhoto struct {
Type RichBlockType `json:"type"` // always "photo"
Photo InputMediaPhoto `json:"photo"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
InputRichBlockPhoto https://core.telegram.org/bots/api#inputrichblockphoto
type InputRichBlockPreformatted ¶ added in v1.23.0
type InputRichBlockPreformatted struct {
Type RichBlockType `json:"type"` // always "pre"
Text RichText `json:"text"`
Language string `json:"language,omitempty"`
}
InputRichBlockPreformatted https://core.telegram.org/bots/api#inputrichblockpreformatted
type InputRichBlockPullQuotation ¶ added in v1.23.0
type InputRichBlockPullQuotation struct {
Type RichBlockType `json:"type"` // always "pullquote"
Text RichText `json:"text"`
Credit *RichText `json:"credit,omitempty"`
}
InputRichBlockPullQuotation https://core.telegram.org/bots/api#inputrichblockpullquotation
type InputRichBlockSectionHeading ¶ added in v1.23.0
type InputRichBlockSectionHeading struct {
Type RichBlockType `json:"type"` // always "heading"
Text RichText `json:"text"`
Size int `json:"size"`
}
InputRichBlockSectionHeading https://core.telegram.org/bots/api#inputrichblocksectionheading
type InputRichBlockSlideshow ¶ added in v1.23.0
type InputRichBlockSlideshow struct {
Type RichBlockType `json:"type"` // always "slideshow"
Blocks []InputRichBlock `json:"blocks"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
InputRichBlockSlideshow https://core.telegram.org/bots/api#inputrichblockslideshow
type InputRichBlockTable ¶ added in v1.23.0
type InputRichBlockTable struct {
Type RichBlockType `json:"type"` // always "table"
Cells [][]RichBlockTableCell `json:"cells"`
IsBordered bool `json:"is_bordered,omitempty"`
IsStriped bool `json:"is_striped,omitempty"`
IsCompact bool `json:"is_compact,omitempty"`
Caption *RichText `json:"caption,omitempty"`
}
InputRichBlockTable https://core.telegram.org/bots/api#inputrichblocktable
type InputRichBlockThinking ¶ added in v1.23.0
type InputRichBlockThinking struct {
Type RichBlockType `json:"type"` // always "thinking"
Text RichText `json:"text"`
}
InputRichBlockThinking https://core.telegram.org/bots/api#inputrichblockthinking
type InputRichBlockVideo ¶ added in v1.23.0
type InputRichBlockVideo struct {
Type RichBlockType `json:"type"` // always "video"
Video InputMediaVideo `json:"video"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
InputRichBlockVideo https://core.telegram.org/bots/api#inputrichblockvideo
type InputRichBlockVoiceNote ¶ added in v1.23.0
type InputRichBlockVoiceNote struct {
Type RichBlockType `json:"type"` // always "voice_note"
VoiceNote InputMediaVoiceNote `json:"voice_note"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
InputRichBlockVoiceNote https://core.telegram.org/bots/api#inputrichblockvoicenote
type InputRichMessage ¶ added in v1.22.0
type InputRichMessage struct {
Blocks []InputRichBlock `json:"blocks,omitempty"`
HTML string `json:"html,omitempty"`
Markdown string `json:"markdown,omitempty"`
Media []InputRichMessageMedia `json:"media,omitempty"`
IsRTL bool `json:"is_rtl,omitempty"`
SkipEntityDetection bool `json:"skip_entity_detection,omitempty"`
}
InputRichMessage https://core.telegram.org/bots/api#inputrichmessage
Describes a rich formatted message to be sent. The thinking block is expressed by the custom HTML tag <tg-thinking> within HTML.
type InputRichMessageContent ¶ added in v1.22.0
type InputRichMessageContent struct {
RichMessage InputRichMessage `json:"rich_message"`
}
InputRichMessageContent https://core.telegram.org/bots/api#inputrichmessagecontent
Represents the content of a rich message to be sent as the result of an inline query.
type InputRichMessageMedia ¶ added in v1.23.0
type InputRichMessageMedia struct {
ID string `json:"id"`
Media InputMedia `json:"media"`
}
InputRichMessageMedia https://core.telegram.org/bots/api#inputrichmessagemedia
Media referenced from the markdown or html fields of an InputRichMessage via tg://photo?id=, tg://video?id=, tg://audio?id= and tg://document?id= links.
type InputSharedWidgetMessageContent ¶ added in v1.28.0
type InputSharedWidgetMessageContent struct {
}
InputSharedWidgetMessageContent https://core.telegram.org/bots/api#inputsharedwidgetmessagecontent
type InputSticker ¶ added in v0.7.0
type InputSticker struct {
Sticker string `json:"sticker"`
Format string `json:"format"`
EmojiList []string `json:"emoji_list"`
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
Keywords []string `json:"keywords,omitempty"`
StickerAttachment io.Reader `json:"-"`
}
InputSticker https://core.telegram.org/bots/api#inputsticker
type InputStoryContent ¶ added in v1.15.0
type InputStoryContent interface {
// contains filtered or unexported methods
}
type InputStoryContentPhoto ¶ added in v1.15.0
type InputStoryContentPhoto struct {
Photo string `json:"photo"`
MediaAttachment io.Reader `json:"-"`
}
InputStoryContentPhoto https://core.telegram.org/bots/api#inputstorycontentphoto
func (InputStoryContentPhoto) Attachment ¶ added in v1.15.0
func (i InputStoryContentPhoto) Attachment() io.Reader
func (InputStoryContentPhoto) GetMedia ¶ added in v1.15.0
func (i InputStoryContentPhoto) GetMedia() string
func (InputStoryContentPhoto) MarshalInputMedia ¶ added in v1.15.0
func (i InputStoryContentPhoto) MarshalInputMedia() ([]byte, error)
type InputStoryContentVideo ¶ added in v1.15.0
type InputStoryContentVideo struct {
Video string `json:"video"`
Duration float64 `json:"duration,omitempty"`
CoverFrameTimestamp float64 `json:"cover_frame_timestamp,omitempty"`
IsAnimation bool `json:"is_animation,omitempty"`
MediaAttachment io.Reader `json:"-"`
}
InputStoryContentVideo https://core.telegram.org/bots/api#inputstorycontentvideo
func (InputStoryContentVideo) Attachment ¶ added in v1.15.0
func (i InputStoryContentVideo) Attachment() io.Reader
func (InputStoryContentVideo) GetMedia ¶ added in v1.15.0
func (i InputStoryContentVideo) GetMedia() string
func (InputStoryContentVideo) MarshalInputMedia ¶ added in v1.15.0
func (i InputStoryContentVideo) MarshalInputMedia() ([]byte, error)
type InputTextMessageContent ¶
type InputTextMessageContent struct {
MessageText string `json:"message_text"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
Entities []MessageEntity `json:"entities,omitempty"`
LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
}
InputTextMessageContent https://core.telegram.org/bots/api#inputtextmessagecontent
type InputVenueMessageContent ¶
type InputVenueMessageContent struct {
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Title string `json:"title"`
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"`
}
InputVenueMessageContent https://core.telegram.org/bots/api#inputvenuemessagecontent
type InputWidgetMessageContent ¶ added in v1.28.0
type InputWidgetMessageContent struct {
HTML string `json:"html"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
PublicData string `json:"public_data,omitempty"`
ChatData string `json:"chat_data,omitempty"`
Caption string `json:"caption,omitempty"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
AllowQueries bool `json:"allow_queries,omitempty"`
}
InputWidgetMessageContent https://core.telegram.org/bots/api#inputwidgetmessagecontent
type Invoice ¶
type KeyboardButton ¶
type KeyboardButton struct {
Text string `json:"text"`
IconCustomEmojiID string `json:"icon_custom_emoji_id,omitempty"`
Style string `json:"style,omitempty"`
RequestUser *KeyboardButtonRequestUser `json:"request_user,omitempty"`
RequestUsers *KeyboardButtonRequestUsers `json:"request_users,omitempty"`
RequestChat *KeyboardButtonRequestChat `json:"request_chat,omitempty"`
RequestContact bool `json:"request_contact,omitempty"`
RequestLocation bool `json:"request_location,omitempty"`
RequestPoll *KeyboardButtonPollType `json:"request_poll,omitempty"`
RequestManagedBot *KeyboardButtonRequestManagedBot `json:"request_managed_bot,omitempty"`
WebApp *WebAppInfo `json:"web_app,omitempty"`
}
KeyboardButton https://core.telegram.org/bots/api#keyboardbutton
type KeyboardButtonPollType ¶
type KeyboardButtonPollType struct {
Type string `json:"type,omitempty"`
}
KeyboardButtonPollType https://core.telegram.org/bots/api#keyboardbuttonpolltype
type KeyboardButtonRequestChat ¶ added in v0.5.0
type KeyboardButtonRequestChat struct {
RequestID int32 `json:"request_id"`
ChatIsChannel bool `json:"chat_is_channel"`
ChatIsForum bool `json:"chat_is_forum,omitempty"`
ChatHasUsername bool `json:"chat_has_username,omitempty"`
ChatIsCreated bool `json:"chat_is_created,omitempty"`
UserAdministratorRights *ChatAdministratorRights `json:"user_administrator_rights,omitempty"`
BotAdministratorRights *ChatAdministratorRights `json:"bot_administrator_rights,omitempty"`
BotIsMember bool `json:"bot_is_member,omitempty"`
RequestTitle bool `json:"request_title,omitempty"`
RequestUsername bool `json:"request_username,omitempty"`
RequestPhoto bool `json:"request_photo,omitempty"`
}
KeyboardButtonRequestChat https://core.telegram.org/bots/api#keyboardbuttonrequestchat
type KeyboardButtonRequestManagedBot ¶ added in v1.21.0
type KeyboardButtonRequestManagedBot struct {
RequestID int32 `json:"request_id"`
SuggestedName string `json:"suggested_name,omitempty"`
// SuggestedUsername must end with "bot". A Premium user may instead suggest a secondary username ending with "agent", "ai", "app", "game", or "gay".
SuggestedUsername string `json:"suggested_username,omitempty"`
}
KeyboardButtonRequestManagedBot https://core.telegram.org/bots/api#keyboardbuttonrequestmanagedbot
type KeyboardButtonRequestUser ¶ added in v0.5.0
type KeyboardButtonRequestUser struct {
RequestID int32 `json:"request_id"`
UserIsBot *bool `json:"user_is_bot,omitempty"`
UserIsPremium *bool `json:"user_is_premium,omitempty"`
}
KeyboardButtonRequestUser https://core.telegram.org/bots/api#keyboardbuttonrequestuser
type KeyboardButtonRequestUsers ¶ added in v1.0.0
type KeyboardButtonRequestUsers struct {
RequestID int32 `json:"request_id"`
UserIsBot bool `json:"user_is_bot,omitempty"`
UserIsPremium bool `json:"user_is_premium,omitempty"`
MaxQuantity int `json:"max_quantity,omitempty"`
RequestName bool `json:"request_name,omitempty"`
RequestUsername bool `json:"request_username,omitempty"`
RequestPhoto bool `json:"request_photo,omitempty"`
}
KeyboardButtonRequestUsers https://core.telegram.org/bots/api#keyboardbuttonrequestusers
type LabeledPrice ¶
LabeledPrice https://core.telegram.org/bots/api#labeledprice
type LinkPreviewOptions ¶ added in v1.0.0
type LinkPreviewOptions struct {
IsDisabled *bool `json:"is_disabled,omitempty"`
URL *string `json:"url,omitempty"`
PreferSmallMedia *bool `json:"prefer_small_media,omitempty"`
PreferLargeMedia *bool `json:"prefer_large_media,omitempty"`
ShowAboveText *bool `json:"show_above_text,omitempty"`
}
LinkPreviewOptions https://core.telegram.org/bots/api#linkpreviewoptions
type LivePhoto ¶ added in v1.21.0
type LivePhoto struct {
Photo []PhotoSize `json:"photo,omitempty"`
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
Width int `json:"width"`
Height int `json:"height"`
Duration int `json:"duration"`
MimeType string `json:"mime_type,omitempty"`
FileSize int `json:"file_size,omitempty"`
}
type Location ¶
type Location struct {
Longitude float64 `json:"longitude"`
Latitude float64 `json:"latitude"`
HorizontalAccuracy float64 `json:"horizontal_accuracy,omitempty"`
LivePeriod int `json:"live_period,omitempty"`
Heading int `json:"heading,omitempty"`
ProximityAlertRadius int `json:"proximity_alert_radius,omitempty"`
}
type LocationAddress ¶ added in v1.15.0
type LocationAddress struct {
CountryCode string `json:"country_code"`
State string `json:"state,omitempty"`
City string `json:"city,omitempty"`
Street string `json:"street,omitempty"`
}
LocationAddress https://core.telegram.org/bots/api#locationaddress
type LoginURL ¶
type ManagedBotCreated ¶ added in v1.21.0
type ManagedBotCreated struct {
Bot *User `json:"bot,omitempty"`
}
ManagedBotCreated https://core.telegram.org/bots/api#managedbotcreated
type ManagedBotUpdated ¶ added in v1.21.0
type ManagedBotUpdated struct {
User *User `json:"user,omitempty"`
Bot *User `json:"bot,omitempty"`
}
ManagedBotUpdated https://core.telegram.org/bots/api#managedbotupdated
type MaskPosition ¶
type MaskPosition struct {
Point string `json:"point"`
XShift float64 `json:"x_shift"`
YShift float64 `json:"y_shift"`
Scale float64 `json:"scale"`
}
MaskPosition https://core.telegram.org/bots/api#maskposition
type MaybeInaccessibleMessage ¶ added in v1.0.0
type MaybeInaccessibleMessage struct {
Type MaybeInaccessibleMessageType
Message *Message
InaccessibleMessage *InaccessibleMessage
}
MaybeInaccessibleMessage https://core.telegram.org/bots/api#maybeinaccessiblemessage
func (*MaybeInaccessibleMessage) MarshalJSON ¶ added in v1.3.1
func (mim *MaybeInaccessibleMessage) MarshalJSON() ([]byte, error)
func (*MaybeInaccessibleMessage) UnmarshalJSON ¶ added in v1.0.0
func (mim *MaybeInaccessibleMessage) UnmarshalJSON(data []byte) error
type MaybeInaccessibleMessageType ¶ added in v1.0.0
type MaybeInaccessibleMessageType int
MaybeInaccessibleMessageType https://core.telegram.org/bots/api#maybeinaccessiblemessage
const ( MaybeInaccessibleMessageTypeMessage MaybeInaccessibleMessageType = iota MaybeInaccessibleMessageTypeInaccessibleMessage )
type MenuButton ¶
type MenuButton struct {
Type MenuButtonType
Commands *MenuButtonCommands
WebApp *MenuButtonWebApp
Default *MenuButtonDefault
}
MenuButton https://core.telegram.org/bots/api#menubutton
func (*MenuButton) MarshalJSON ¶ added in v1.3.1
func (c *MenuButton) MarshalJSON() ([]byte, error)
func (*MenuButton) UnmarshalJSON ¶
func (c *MenuButton) UnmarshalJSON(data []byte) error
type MenuButtonCommands ¶
type MenuButtonCommands struct {
Type MenuButtonType `json:"type" rules:"required,equals:commands"`
}
MenuButtonCommands https://core.telegram.org/bots/api#menubuttoncommands
type MenuButtonDefault ¶
type MenuButtonDefault struct {
Type MenuButtonType `json:"type" rules:"required,equals:default"`
}
MenuButtonDefault https://core.telegram.org/bots/api#menubuttondefault
type MenuButtonType ¶
type MenuButtonType string
const ( MenuButtonTypeCommands MenuButtonType = "commands" MenuButtonTypeWebApp MenuButtonType = "web_app" MenuButtonTypeDefault MenuButtonType = "default" )
type MenuButtonWebApp ¶
type MenuButtonWebApp struct {
Type MenuButtonType `json:"type" rules:"required,equals:web_app"`
Text string `json:"text" rules:"required"`
WebApp WebAppInfo `json:"web_app" rules:"required"`
}
MenuButtonWebApp https://core.telegram.org/bots/api#menubuttonwebapp
type Message ¶
type Message struct {
ID int `json:"message_id"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DirectMessagesTopic *DirectMessagesTopic `json:"direct_messages_topic,omitempty"`
From *User `json:"from,omitempty"`
SenderChat *Chat `json:"sender_chat,omitempty"`
SenderBoostCount int `json:"sender_boost_count,omitempty"`
SenderBusinessBot *User `json:"sender_business_bot,omitempty"`
SenderTag string `json:"sender_tag,omitempty"`
ReceiverUser *User `json:"receiver_user,omitempty"`
EphemeralMessageID int `json:"ephemeral_message_id,omitempty"`
Date int `json:"date"`
BusinessConnectionID string `json:"business_connection_id,omitempty"`
Chat Chat `json:"chat"`
ForwardOrigin *MessageOrigin `json:"forward_origin,omitempty"`
IsTopicMessage bool `json:"is_topic_message,omitempty"`
IsAutomaticForward bool `json:"is_automatic_forward,omitempty"`
ReplyToMessage *Message `json:"reply_to_message,omitempty"`
ExternalReply *ExternalReplyInfo `json:"external_reply,omitempty"`
Quote *TextQuote `json:"quote,omitempty"`
ReplyToStory *Story `json:"reply_to_story,omitempty"`
ReplyToChecklistTaskID int `json:"reply_to_checklist_task_id,omitempty"`
ViaBot *User `json:"via_bot,omitempty"`
EditDate int `json:"edit_date,omitempty"`
HasProtectedContent bool `json:"has_protected_content,omitempty"`
IsFromOffline bool `json:"is_from_offline,omitempty"`
IsPaidPost bool `json:"is_paid_post,omitempty"`
MediaGroupID string `json:"media_group_id,omitempty"`
AuthorSignature string `json:"author_signature,omitempty"`
PaidStarCount int `json:"paid_star_count,omitempty"`
Text string `json:"text,omitempty"`
Entities []MessageEntity `json:"entities,omitempty"`
RichMessage *RichMessage `json:"rich_message,omitempty"`
LinkPreviewOptions *LinkPreviewOptions `json:"link_preview_options,omitempty"`
SuggestedPostInfo *SuggestedPostInfo `json:"suggested_post_info,omitempty"`
EffectID string `json:"effect_id,omitempty"`
Animation *Animation `json:"animation,omitempty"`
Audio *Audio `json:"audio,omitempty"`
Document *Document `json:"document,omitempty"`
PaidMedia *PaidMediaInfo `json:"paid_media,omitempty"`
Photo []PhotoSize `json:"photo,omitempty"`
Sticker *Sticker `json:"sticker,omitempty"`
Story *Story `json:"story,omitempty"`
Video *Video `json:"video,omitempty"`
VideoNote *VideoNote `json:"video_note,omitempty"`
Voice *Voice `json:"voice,omitempty"`
Widget *Widget `json:"widget,omitempty"`
Caption string `json:"caption,omitempty"`
CaptionEntities []MessageEntity `json:"caption_entities,omitempty"`
ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"`
HasMediaSpoiler bool `json:"has_media_spoiler,omitempty"`
Checklist *Checklist `json:"checklist,omitempty"`
Contact *Contact `json:"contact,omitempty"`
Dice *Dice `json:"dice,omitempty"`
Game *Game `json:"game,omitempty"`
Poll *Poll `json:"poll,omitempty"`
Venue *Venue `json:"venue,omitempty"`
Location *Location `json:"location,omitempty"`
NewChatMembers []User `json:"new_chat_members,omitempty"`
LeftChatMember *User `json:"left_chat_member,omitempty"`
NewChatTitle string `json:"new_chat_title,omitempty"`
NewChatPhoto []PhotoSize `json:"new_chat_photo,omitempty"`
DeleteChatPhoto bool `json:"delete_chat_photo,omitempty"`
GroupChatCreated bool `json:"group_chat_created,omitempty"`
SupergroupChatCreated bool `json:"supergroup_chat_created,omitempty"`
ChannelChatCreated bool `json:"channel_chat_created,omitempty"`
MessageAutoDeleteTimerChanged *MessageAutoDeleteTimerChanged `json:"message_auto_delete_timer_changed,omitempty"`
MigrateToChatID int64 `json:"migrate_to_chat_id,omitempty"`
MigrateFromChatID int64 `json:"migrate_from_chat_id,omitempty"`
PinnedMessage *MaybeInaccessibleMessage `json:"pinned_message,omitempty"`
Invoice *Invoice `json:"invoice,omitempty"`
SuccessfulPayment *SuccessfulPayment `json:"successful_payment,omitempty"`
RefundedPayment *RefundedPayment `json:"refunded_payment,omitempty"`
Gift *GiftInfo `json:"gift,omitempty"`
UniqueGift *UniqueGiftInfo `json:"unique_gift,omitempty"`
GiftUpgradeSent *GiftInfo `json:"gift_upgrade_sent,omitempty"`
ConnectedWebsite string `json:"connected_website,omitempty"`
WriteAccessAllowed *WriteAccessAllowed `json:"write_access_allowed,omitempty"`
PassportData *PassportData `json:"passport_data,omitempty"`
ProximityAlertTriggered *ProximityAlertTriggered `json:"proximity_alert_triggered,omitempty"`
BoostAdded *ChatBoostAdded `json:"boost_added,omitempty"`
ChatBackgroundSet *ChatBackground `json:"chat_background_set,omitempty"`
ChecklistTasksDone *ChecklistTasksDone `json:"checklist_tasks_done,omitempty"`
ChecklistTasksAdded *ChecklistTasksAdded `json:"checklist_tasks_added,omitempty"`
DirectMessagePriceChanged *DirectMessagePriceChanged `json:"direct_message_price_changed,omitempty"`
ForumTopicCreated *ForumTopicCreated `json:"forum_topic_created,omitempty"`
ForumTopicEdited *ForumTopicEdited `json:"forum_topic_edited,omitempty"`
ForumTopicClosed *ForumTopicClosed `json:"forum_topic_closed,omitempty"`
ForumTopicReopened *ForumTopicReopened `json:"forum_topic_reopened,omitempty"`
GeneralForumTopicHidden *GeneralForumTopicHidden `json:"general_forum_topic_hidden,omitempty"`
GiveawayCreated *GiveawayCreated `json:"giveaway_created,omitempty"`
Giveaway *Giveaway `json:"giveaway,omitempty"`
GiveawayWinners *GiveawayWinners `json:"giveaway_winners,omitempty"`
GiveawayCompleted *GiveawayCompleted `json:"giveaway_completed,omitempty"`
PaidMessagePriceChanged *PaidMessagePriceChanged `json:"paid_message_price_changed,omitempty"`
PaidMessagesWaived *PaidMessagesWaived `json:"paid_messages_waived,omitempty"`
ChatOwnerLeft *ChatOwnerLeft `json:"chat_owner_left,omitempty"`
ChatOwnerChanged *ChatOwnerChanged `json:"chat_owner_changed,omitempty"`
CommunityChatAdded *CommunityChatAdded `json:"community_chat_added,omitempty"`
CommunityChatJoined *CommunityChatJoined `json:"community_chat_joined,omitempty"`
CommunityChatRemoved *CommunityChatRemoved `json:"community_chat_removed,omitempty"`
SuggestedPostApproved *SuggestedPostApproved `json:"suggested_post_approved,omitempty"`
SuggestedPostApprovalFailed *SuggestedPostApprovalFailed `json:"suggested_post_approval_failed,omitempty"`
SuggestedPostDeclined *SuggestedPostDeclined `json:"suggested_post_declined,omitempty"`
SuggestedPostPaid *SuggestedPostPaid `json:"suggested_post_paid,omitempty"`
SuggestedPostRefunded *SuggestedPostRefunded `json:"suggested_post_refunded,omitempty"`
TonWalletTransfer *TonWalletTransfer `json:"ton_wallet_transfer,omitempty"`
VideoChatScheduled *VideoChatScheduled `json:"video_chat_scheduled,omitempty"`
VideoChatStarted *VideoChatStarted `json:"video_chat_started,omitempty"`
VideoChatEnded *VideoChatEnded `json:"video_chat_ended,omitempty"`
VideoChatParticipantsInvited *VideoChatParticipantsInvited `json:"video_chat_participants_invited,omitempty"`
WebAppData *WebAppData `json:"web_app_data,omitempty"`
ManagedBotCreated *ManagedBotCreated `json:"managed_bot_created,omitempty"`
PollOptionAdded *PollOptionAdded `json:"poll_option_added,omitempty"`
PollOptionDeleted *PollOptionDeleted `json:"poll_option_deleted,omitempty"`
GuestBotCallerUser *User `json:"guest_bot_caller_user,omitempty"`
GuestBotCallerChat *Chat `json:"guest_bot_caller_chat,omitempty"`
GuestQueryID string `json:"guest_query_id,omitempty"`
ReplyToPollOptionID string `json:"reply_to_poll_option_id,omitempty"`
LivePhoto *LivePhoto `json:"live_photo,omitempty"`
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
}
type MessageAutoDeleteTimerChanged ¶
type MessageAutoDeleteTimerChanged struct {
MessageAutoDeleteTime int `json:"message_auto_delete_time"`
}
MessageAutoDeleteTimerChanged https://core.telegram.org/bots/api#messageautodeletetimerchanged
type MessageEntity ¶
type MessageEntity struct {
Type MessageEntityType `json:"type"`
Offset int `json:"offset"`
Length int `json:"length"`
URL string `json:"url,omitempty"`
User *User `json:"user,omitempty"`
Language string `json:"language,omitempty"`
CustomEmojiID string `json:"custom_emoji_id,omitempty"`
UnixTime int `json:"unix_time,omitempty"`
DateTimeFormat string `json:"date_time_format,omitempty"`
}
MessageEntity https://core.telegram.org/bots/api#messageentity
type MessageEntityType ¶
type MessageEntityType string
const ( MessageEntityTypeMention MessageEntityType = "mention" MessageEntityTypeHashtag MessageEntityType = "hashtag" MessageEntityTypeCashtag MessageEntityType = "cashtag" MessageEntityTypeBotCommand MessageEntityType = "bot_command" MessageEntityTypeURL MessageEntityType = "url" MessageEntityTypeEmail MessageEntityType = "email" MessageEntityTypePhoneNumber MessageEntityType = "phone_number" MessageEntityTypeBankCardNumber MessageEntityType = "bank_card_number" MessageEntityTypeTonAddress MessageEntityType = "ton_address" MessageEntityTypeBold MessageEntityType = "bold" MessageEntityTypeItalic MessageEntityType = "italic" MessageEntityTypeUnderline MessageEntityType = "underline" MessageEntityTypeStrikethrough MessageEntityType = "strikethrough" MessageEntityTypeSpoiler MessageEntityType = "spoiler" MessageEntityTypeBlockquote MessageEntityType = "blockquote" MessageEntityTypeExpandableBlockquote MessageEntityType = "expandable_blockquote" MessageEntityTypeCode MessageEntityType = "code" MessageEntityTypePre MessageEntityType = "pre" MessageEntityTypeTextLink MessageEntityType = "text_link" MessageEntityTypeTextMention MessageEntityType = "text_mention" MessageEntityTypeCustomEmoji MessageEntityType = "custom_emoji" MessageEntityTypeDateTime MessageEntityType = "date_time" )
type MessageGenerationStopped ¶ added in v1.24.0
type MessageGenerationStopped struct {
Chat Chat `json:"chat"`
MessageThreadID int `json:"message_thread_id,omitempty"`
DraftID int `json:"draft_id"`
}
MessageGenerationStopped https://core.telegram.org/bots/api#messagegenerationstopped
Describes an update about a user stopping message generation.
func (*MessageGenerationStopped) UnmarshalJSON ¶ added in v1.29.0
func (m *MessageGenerationStopped) UnmarshalJSON(data []byte) error
type MessageOrigin ¶ added in v1.0.0
type MessageOrigin struct {
Type MessageOriginType
MessageOriginUser *MessageOriginUser
MessageOriginHiddenUser *MessageOriginHiddenUser
MessageOriginChat *MessageOriginChat
MessageOriginChannel *MessageOriginChannel
}
MessageOrigin https://core.telegram.org/bots/api#messageorigin
func (*MessageOrigin) MarshalJSON ¶ added in v1.3.1
func (mo *MessageOrigin) MarshalJSON() ([]byte, error)
func (*MessageOrigin) UnmarshalJSON ¶ added in v1.0.0
func (mo *MessageOrigin) UnmarshalJSON(data []byte) error
type MessageOriginChannel ¶ added in v1.0.0
type MessageOriginChannel struct {
Type MessageOriginType `json:"type"` // always “channel”
Date int `json:"date"`
Chat Chat `json:"chat"`
MessageID int `json:"message_id"`
AuthorSignature *string `json:"author_signature,omitempty"`
}
MessageOriginChannel https://core.telegram.org/bots/api#messageoriginchannel
type MessageOriginChat ¶ added in v1.0.0
type MessageOriginChat struct {
Type MessageOriginType `json:"type"` // always “chat”
Date int `json:"date"`
SenderChat Chat `json:"sender_chat"`
AuthorSignature *string `json:"author_signature,omitempty"`
}
MessageOriginChat https://core.telegram.org/bots/api#messageoriginchat
type MessageOriginHiddenUser ¶ added in v1.0.0
type MessageOriginHiddenUser struct {
Type MessageOriginType `json:"type"` // always “hidden_user”
Date int `json:"date"`
SenderUserName string `json:"sender_user_name"`
}
MessageOriginHiddenUser https://core.telegram.org/bots/api#messageoriginhiddenuser
type MessageOriginType ¶ added in v1.0.0
type MessageOriginType string
MessageOriginType https://core.telegram.org/bots/api#messageorigin
const ( MessageOriginTypeUser MessageOriginType = "user" MessageOriginTypeHiddenUser MessageOriginType = "hidden_user" MessageOriginTypeChat MessageOriginType = "chat" MessageOriginTypeChannel MessageOriginType = "channel" )
type MessageOriginUser ¶ added in v1.0.0
type MessageOriginUser struct {
Type MessageOriginType `json:"type"` // always “user”
Date int `json:"date"`
SenderUser User `json:"sender_user"`
}
MessageOriginUser https://core.telegram.org/bots/api#messageoriginuser
type MessageReactionCountUpdated ¶ added in v1.0.0
type MessageReactionCountUpdated struct {
Chat Chat `json:"chat"`
MessageID int `json:"message_id"`
Date int `json:"date"`
Reactions []ReactionCount `json:"reactions"`
}
MessageReactionCountUpdated https://core.telegram.org/bots/api#messagereactioncountupdated
type MessageReactionUpdated ¶ added in v1.0.0
type MessageReactionUpdated struct {
Chat Chat `json:"chat"`
MessageID int `json:"message_id"`
User *User `json:"user,omitempty"`
ActorChat *Chat `json:"actor_chat,omitempty"`
Date int `json:"date"`
OldReaction []ReactionType `json:"old_reaction"`
NewReaction []ReactionType `json:"new_reaction"`
}
MessageReactionUpdated https://core.telegram.org/bots/api#messagereactionupdated
type OrderInfo ¶
type OrderInfo struct {
Name string `json:"name,omitempty"`
PhoneNumber string `json:"phone_number,omitempty"`
Email string `json:"email,omitempty"`
ShippingAddress *ShippingAddress `json:"shipping_address,omitempty"`
}
type OwnedGift ¶ added in v1.15.0
type OwnedGift struct {
Type OwnedGiftType `json:"type"`
OwnedGiftRegular *OwnedGiftRegular
OwnedGiftUnique *OwnedGiftUnique
}
OwnedGift https://core.telegram.org/bots/api#ownedgift
func (*OwnedGift) UnmarshalJSON ¶ added in v1.15.0
type OwnedGiftRegular ¶ added in v1.15.0
type OwnedGiftRegular struct {
Type OwnedGiftType `json:"type"`
Gift Gift `json:"gift"`
OwnedGiftID string `json:"owned_gift_id,omitempty"`
SenderUser *User `json:"sender_user,omitempty"`
SendDate int `json:"send_date"`
Text string `json:"text,omitempty"`
Entities []MessageEntity `json:"entities,omitempty"`
IsPrivate bool `json:"is_private,omitempty"`
IsSaved bool `json:"is_saved,omitempty"`
CanBeUpgraded bool `json:"can_be_upgraded,omitempty"`
WasRefunded bool `json:"was_refunded,omitempty"`
ConvertStarCount int `json:"convert_star_count,omitempty"`
PrepaidUpgradeStarCount int `json:"prepaid_upgrade_star_count,omitempty"`
IsUpgradeSeparate bool `json:"is_upgrade_separate,omitempty"`
UniqueGiftNumber int `json:"unique_gift_number,omitempty"`
CanBeTransferred bool `json:"can_be_transferred,omitempty"`
TransferStarCount int `json:"transfer_star_count,omitempty"`
}
OwnedGiftRegular https://core.telegram.org/bots/api#ownedgiftregular
type OwnedGiftType ¶ added in v1.15.0
type OwnedGiftType string
OwnedGiftType https://core.telegram.org/bots/api#ownedgift
const ( OwnedGiftTypeRegular OwnedGiftType = "regular" OwnedGiftTypeUnique OwnedGiftType = "unique" )
type OwnedGiftUnique ¶ added in v1.15.0
type OwnedGiftUnique struct {
Type OwnedGiftType `json:"type"`
Gift UniqueGift `json:"gift"`
OwnedGiftID string `json:"owned_gift_id,omitempty"`
SenderUser *User `json:"sender_user,omitempty"`
SendDate int `json:"send_date"`
IsSaved bool `json:"is_saved,omitempty"`
CanBeTransferred bool `json:"can_be_transferred,omitempty"`
TransferStarCount int `json:"transfer_star_count,omitempty"`
NextTransferDate int `json:"next_transfer_date,omitempty"`
}
OwnedGiftUnique https://core.telegram.org/bots/api#ownedgiftunique
type OwnedGifts ¶ added in v1.15.0
type PaidMedia ¶ added in v1.6.0
type PaidMedia struct {
Type PaidMediaType
Preview *PaidMediaPreview
Photo *PaidMediaPhoto
Video *PaidMediaVideo
}
PaidMedia https://core.telegram.org/bots/api#paidmedia
func (*PaidMedia) UnmarshalJSON ¶ added in v1.6.0
type PaidMediaInfo ¶ added in v1.6.0
type PaidMediaInfo struct {
StarCount int `json:"star_count"`
PaidMedia []PaidMedia `json:"paid_media"`
}
PaidMediaInfo https://core.telegram.org/bots/api#paidmediainfo
type PaidMediaLivePhoto ¶ added in v1.21.0
type PaidMediaLivePhoto struct {
Type string `json:"type"`
LivePhoto LivePhoto `json:"live_photo"`
}
PaidMediaLivePhoto https://core.telegram.org/bots/api#paidmedialivephoto
type PaidMediaPhoto ¶ added in v1.6.0
type PaidMediaPhoto struct {
Type PaidMediaType
Photo []PhotoSize `json:"photo"`
}
PaidMediaPhoto https://core.telegram.org/bots/api#paidmediaphoto
type PaidMediaPreview ¶ added in v1.6.0
type PaidMediaPreview struct {
Type PaidMediaType
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
Duration int `json:"duration,omitempty"`
}
PaidMediaPreview https://core.telegram.org/bots/api#paidmediapreview
type PaidMediaPurchased ¶ added in v1.8.0
type PaidMediaPurchased struct {
From User `json:"from"`
PaidMediaPayload string `json:"paid_media_payload"`
}
PaidMediaPurchased https://core.telegram.org/bots/api#paidmediapurchased
type PaidMediaType ¶ added in v1.6.0
type PaidMediaType string
const ( PaidMediaTypePreview PaidMediaType = "preview" PaidMediaTypePhoto PaidMediaType = "photo" PaidMediaTypeVideo PaidMediaType = "video" )
type PaidMediaVideo ¶ added in v1.6.0
type PaidMediaVideo struct {
Type PaidMediaType
Video Video `json:"video"`
}
PaidMediaVideo https://core.telegram.org/bots/api#paidmediavideo
type PaidMessagePriceChanged ¶ added in v1.15.0
type PaidMessagePriceChanged struct {
PaidMessageStarCount int `json:"paid_message_star_count"`
}
PaidMessagePriceChanged https://core.telegram.org/bots/api#paidmessagepricechanged
type PaidMessagesWaived ¶ added in v1.28.0
type PaidMessagesWaived struct{}
PaidMessagesWaived https://core.telegram.org/bots/api#paidmessageswaived
type PassportData ¶
type PassportData struct {
Data []EncryptedPassportElement `json:"data"`
Credentials EncryptedCredentials `json:"credentials"`
}
PassportData https://core.telegram.org/bots/api#passportdata
type PassportElementError ¶
type PassportElementError interface {
MarshalCustom() ([]byte, error)
// contains filtered or unexported methods
}
PassportElementError https://core.telegram.org/bots/api#passportelementerror
type PassportElementErrorDataField ¶
type PassportElementErrorDataField struct {
Type string `json:"type"`
FieldName string `json:"field_name"`
DataHash string `json:"data_hash"`
Message string `json:"message"`
}
PassportElementErrorDataField https://core.telegram.org/bots/api#passportelementerrordatafield
func (*PassportElementErrorDataField) MarshalCustom ¶
func (m *PassportElementErrorDataField) MarshalCustom() ([]byte, error)
type PassportElementErrorFile ¶
type PassportElementErrorFile struct {
Type string `json:"type"`
FileHash string `json:"file_hash"`
Message string `json:"message"`
}
PassportElementErrorFile https://core.telegram.org/bots/api#passportelementerrorfile
func (*PassportElementErrorFile) MarshalCustom ¶
func (m *PassportElementErrorFile) MarshalCustom() ([]byte, error)
type PassportElementErrorFiles ¶
type PassportElementErrorFiles struct {
Type string `json:"type"`
FileHashes []string `json:"file_hashes"`
Message string `json:"message"`
}
PassportElementErrorFiles https://core.telegram.org/bots/api#passportelementerrorfiles
func (*PassportElementErrorFiles) MarshalCustom ¶
func (m *PassportElementErrorFiles) MarshalCustom() ([]byte, error)
type PassportElementErrorFrontSide ¶
type PassportElementErrorFrontSide struct {
Type string `json:"type"`
FileHash string `json:"file_hash"`
Message string `json:"message"`
}
PassportElementErrorFrontSide https://core.telegram.org/bots/api#passportelementerrorfrontside
func (*PassportElementErrorFrontSide) MarshalCustom ¶
func (m *PassportElementErrorFrontSide) MarshalCustom() ([]byte, error)
type PassportElementErrorReverseSide ¶
type PassportElementErrorReverseSide struct {
Type string `json:"type"`
FileHash string `json:"file_hash"`
Message string `json:"message"`
}
PassportElementErrorReverseSide https://core.telegram.org/bots/api#passportelementerrorreverseside
func (*PassportElementErrorReverseSide) MarshalCustom ¶
func (m *PassportElementErrorReverseSide) MarshalCustom() ([]byte, error)
type PassportElementErrorSelfie ¶
type PassportElementErrorSelfie struct {
Type string `json:"type"`
FileHash string `json:"file_hash"`
Message string `json:"message"`
}
PassportElementErrorSelfie https://core.telegram.org/bots/api#passportelementerrorselfie
func (*PassportElementErrorSelfie) MarshalCustom ¶
func (m *PassportElementErrorSelfie) MarshalCustom() ([]byte, error)
type PassportElementErrorTranslationFile ¶
type PassportElementErrorTranslationFile struct {
Type string `json:"type"`
FileHash string `json:"file_hash"`
Message string `json:"message"`
}
PassportElementErrorTranslationFile https://core.telegram.org/bots/api#passportelementerrortranslationfile
func (*PassportElementErrorTranslationFile) MarshalCustom ¶
func (m *PassportElementErrorTranslationFile) MarshalCustom() ([]byte, error)
type PassportElementErrorTranslationFiles ¶
type PassportElementErrorTranslationFiles struct {
Type string `json:"type"`
FileHashes []string `json:"file_hashes"`
Message string `json:"message"`
}
PassportElementErrorTranslationFiles https://core.telegram.org/bots/api#passportelementerrortranslationfiles
func (*PassportElementErrorTranslationFiles) MarshalCustom ¶
func (m *PassportElementErrorTranslationFiles) MarshalCustom() ([]byte, error)
type PassportElementErrorUnspecified ¶
type PassportElementErrorUnspecified struct {
Type string `json:"type"`
ElementHash string `json:"element_hash"`
Message string `json:"message"`
}
PassportElementErrorUnspecified https://core.telegram.org/bots/api#passportelementerrorunspecified
func (*PassportElementErrorUnspecified) MarshalCustom ¶
func (m *PassportElementErrorUnspecified) MarshalCustom() ([]byte, error)
type PassportFile ¶
type PassportFile struct {
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
FileSize int `json:"file_size"`
FileDate int `json:"file_date"`
}
PassportFile https://core.telegram.org/bots/api#passportfile
type PhotoSize ¶
type Poll ¶
type Poll struct {
ID string `json:"id"`
Question string `json:"question"`
QuestionEntities []MessageEntity `json:"question_entities,omitempty"`
Options []PollOption `json:"options"`
TotalVoterCount int `json:"total_voter_count"`
IsClosed bool `json:"is_closed"`
IsAnonymous bool `json:"is_anonymous"`
Type string `json:"type"`
AllowsMultipleAnswers bool `json:"allows_multiple_answers"`
CorrectOptionIDs []int `json:"correct_option_ids,omitempty"`
Explanation string `json:"explanation,omitempty"`
ExplanationEntities []MessageEntity `json:"explanation_entities,omitempty"`
Description string `json:"description,omitempty"`
DescriptionEntities []MessageEntity `json:"description_entities,omitempty"`
Media *PollMedia `json:"media,omitempty"`
ExplanationMedia *PollMedia `json:"explanation_media,omitempty"`
MembersOnly bool `json:"members_only,omitempty"`
CountryCodes []string `json:"country_codes,omitempty"`
AllowsRevoting bool `json:"allows_revoting,omitempty"`
OpenPeriod int `json:"open_period,omitempty"`
CloseDate int `json:"close_date,omitempty"`
}
type PollAnswer ¶
type PollMedia ¶ added in v1.21.0
type PollMedia struct {
Animation *Animation `json:"animation,omitempty"`
Audio *Audio `json:"audio,omitempty"`
Document *Document `json:"document,omitempty"`
LivePhoto *LivePhoto `json:"live_photo,omitempty"`
Location *Location `json:"location,omitempty"`
Photo []PhotoSize `json:"photo,omitempty"`
Sticker *Sticker `json:"sticker,omitempty"`
Venue *Venue `json:"venue,omitempty"`
Video *Video `json:"video,omitempty"`
}
type PollOption ¶
type PollOption struct {
Text string `json:"text"`
TextEntities []MessageEntity `json:"text_entities,omitempty"`
VoterCount int `json:"voter_count"`
PersistentID string `json:"persistent_id,omitempty"`
Media *PollMedia `json:"media,omitempty"`
AddedByUser *User `json:"added_by_user,omitempty"`
AddedByChat *Chat `json:"added_by_chat,omitempty"`
AdditionDate int `json:"addition_date,omitempty"`
}
type PollOptionAdded ¶ added in v1.21.0
type PollOptionAdded struct {
PollMessage *MaybeInaccessibleMessage `json:"poll_message,omitempty"`
OptionPersistentID string `json:"option_persistent_id"`
OptionText string `json:"option_text"`
OptionTextEntities []MessageEntity `json:"option_text_entities,omitempty"`
}
PollOptionAdded https://core.telegram.org/bots/api#polloptionadded
type PollOptionDeleted ¶ added in v1.21.0
type PollOptionDeleted struct {
PollMessage *MaybeInaccessibleMessage `json:"poll_message,omitempty"`
OptionPersistentID string `json:"option_persistent_id"`
OptionText string `json:"option_text"`
OptionTextEntities []MessageEntity `json:"option_text_entities,omitempty"`
}
PollOptionDeleted https://core.telegram.org/bots/api#polloptiondeleted
type PreCheckoutQuery ¶
type PreCheckoutQuery struct {
ID string `json:"id"`
From *User `json:"from"`
Currency string `json:"currency"`
TotalAmount int `json:"total_amount"`
InvoicePayload string `json:"invoice_payload"`
ShippingOptionID string `json:"shipping_option_id,omitempty"`
OrderInfo *OrderInfo `json:"order_info,omitempty"`
}
PreCheckoutQuery https://core.telegram.org/bots/api#precheckoutquery
type PreparedInlineMessage ¶ added in v1.11.0
type PreparedInlineMessage struct {
ID string `json:"id"`
ExpirationDate int `json:"expiration_date"`
}
PreparedInlineMessage https://core.telegram.org/bots/api#preparedinlinemessage
type PreparedKeyboardButton ¶ added in v1.21.0
type PreparedKeyboardButton struct {
ID string `json:"id"`
}
PreparedKeyboardButton https://core.telegram.org/bots/api#preparedkeyboardbutton
type ProximityAlertTriggered ¶
type ProximityAlertTriggered struct {
Traveler User `json:"traveler"`
Watcher User `json:"watcher"`
Distance int `json:"distance"`
}
ProximityAlertTriggered https://core.telegram.org/bots/api#proximityalerttriggered
type ReactionCount ¶ added in v1.0.0
type ReactionCount struct {
Type ReactionType `json:"type"`
TotalCount int `json:"total_count"`
}
ReactionCount https://core.telegram.org/bots/api#reactioncount
type ReactionType ¶ added in v1.0.0
type ReactionType struct {
Type ReactionTypeType
ReactionTypeEmoji *ReactionTypeEmoji
ReactionTypeCustomEmoji *ReactionTypeCustomEmoji
ReactionTypePaid *ReactionTypePaid
}
ReactionType https://core.telegram.org/bots/api#reactiontype
func (*ReactionType) MarshalJSON ¶ added in v1.1.2
func (rt *ReactionType) MarshalJSON() ([]byte, error)
func (*ReactionType) UnmarshalJSON ¶ added in v1.0.0
func (rt *ReactionType) UnmarshalJSON(data []byte) error
type ReactionTypeCustomEmoji ¶ added in v1.0.0
type ReactionTypeCustomEmoji struct {
Type ReactionTypeType `json:"type"`
CustomEmojiID string `json:"custom_emoji_id"`
}
ReactionTypeCustomEmoji https://core.telegram.org/bots/api#reactiontypecustomemoji
type ReactionTypeEmoji ¶ added in v1.0.0
type ReactionTypeEmoji struct {
Type ReactionTypeType `json:"type"`
Emoji string `json:"emoji"`
}
ReactionTypeEmoji https://core.telegram.org/bots/api#reactiontypeemoji
type ReactionTypePaid ¶ added in v1.7.0
type ReactionTypePaid struct {
Type string `json:"type"`
}
ReactionTypePaid https://core.telegram.org/bots/api#reactiontypepaid
type ReactionTypeType ¶ added in v1.0.0
type ReactionTypeType string
ReactionTypeType https://core.telegram.org/bots/api#reactiontype
const ( ReactionTypeTypeEmoji ReactionTypeType = "emoji" ReactionTypeTypeCustomEmoji ReactionTypeType = "custom_emoji" ReactionTypeTypePaid ReactionTypeType = "paid" )
type RefundedPayment ¶ added in v1.6.0
type RefundedPayment struct {
Currency string `json:"currency"`
TotalAmount int `json:"total_amount"`
InvoicePayload string `json:"invoice_payload"`
TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
ProviderPaymentChargeID string `json:"provider_payment_charge_id,omitempty"`
}
RefundedPayment https://core.telegram.org/bots/api#refundedpayment
type ReplyKeyboardMarkup ¶
type ReplyKeyboardMarkup struct {
Keyboard [][]KeyboardButton `json:"keyboard"`
IsPersistent bool `json:"is_persistent,omitempty"`
ResizeKeyboard bool `json:"resize_keyboard,omitempty"`
OneTimeKeyboard bool `json:"one_time_keyboard,omitempty"`
InputFieldPlaceholder string `json:"input_field_placeholder,omitempty"`
Selective bool `json:"selective,omitempty"`
ForceReply bool `json:"force_reply,omitempty"`
}
ReplyKeyboardMarkup https://core.telegram.org/bots/api#replykeyboardmarkup
type ReplyKeyboardRemove ¶
type ReplyKeyboardRemove struct {
RemoveKeyboard bool `json:"remove_keyboard"`
Selective bool `json:"selective,omitempty"`
}
ReplyKeyboardRemove https://core.telegram.org/bots/api#replykeyboardremove
type ReplyMarkup ¶
type ReplyMarkup any
type ReplyParameters ¶ added in v1.0.0
type ReplyParameters struct {
MessageID int `json:"message_id,omitempty"`
EphemeralMessageID int `json:"ephemeral_message_id,omitempty"`
ChatID any `json:"chat_id,omitempty"`
AllowSendingWithoutReply bool `json:"allow_sending_without_reply,omitempty"`
Quote string `json:"quote,omitempty"`
QuoteParseMode ParseMode `json:"quote_parse_mode,omitempty"`
QuoteEntities []MessageEntity `json:"quote_entities,omitempty"`
QuoteRichTexts []RichText `json:"quote_rich_texts,omitempty"`
QuotePosition int `json:"quote_position,omitempty"`
ChecklistTaskID int `json:"checklist_task_id,omitempty"`
PollOptionID string `json:"poll_option_id,omitempty"`
}
ReplyParameters https://core.telegram.org/bots/api#replyparameters
type RevenueWithdrawalState ¶ added in v1.5.0
type RevenueWithdrawalState struct {
Type RevenueWithdrawalStateType `json:"type"`
Pending *RevenueWithdrawalStatePending `json:"pending,omitempty"`
Succeeded *RevenueWithdrawalStateSucceeded `json:"succeeded,omitempty"`
Failed *RevenueWithdrawalStateFailed `json:"failed,omitempty"`
}
RevenueWithdrawalState https://core.telegram.org/bots/api#revenuewithdrawalstate
func (*RevenueWithdrawalState) UnmarshalJSON ¶ added in v1.5.0
func (m *RevenueWithdrawalState) UnmarshalJSON(data []byte) error
type RevenueWithdrawalStateFailed ¶ added in v1.5.0
type RevenueWithdrawalStateFailed struct {
Type RevenueWithdrawalStateType `json:"type"`
}
RevenueWithdrawalStateFailed https://core.telegram.org/bots/api#revenuewithdrawalstatefailed
type RevenueWithdrawalStatePending ¶ added in v1.5.0
type RevenueWithdrawalStatePending struct {
Type RevenueWithdrawalStateType `json:"type"`
}
RevenueWithdrawalStatePending https://core.telegram.org/bots/api#revenuewithdrawalstatepending
type RevenueWithdrawalStateSucceeded ¶ added in v1.5.0
type RevenueWithdrawalStateSucceeded struct {
Type RevenueWithdrawalStateType `json:"type"`
Date int `json:"date"`
URL string `json:"url"`
}
RevenueWithdrawalStateSucceeded https://core.telegram.org/bots/api#revenuewithdrawalstatesucceeded
type RevenueWithdrawalStateType ¶ added in v1.5.0
type RevenueWithdrawalStateType string
const ( RevenueWithdrawalStateTypePending RevenueWithdrawalStateType = "pending" RevenueWithdrawalStateTypeSucceeded RevenueWithdrawalStateType = "succeeded" RevenueWithdrawalStateTypeFailed RevenueWithdrawalStateType = "failed" )
type RichBlock ¶ added in v1.22.0
type RichBlock struct {
Type RichBlockType
RichBlockParagraph *RichBlockParagraph
RichBlockSectionHeading *RichBlockSectionHeading
RichBlockPreformatted *RichBlockPreformatted
RichBlockDivider *RichBlockDivider
RichBlockMathematicalExpression *RichBlockMathematicalExpression
RichBlockAnchor *RichBlockAnchor
RichBlockList *RichBlockList
RichBlockBlockQuotation *RichBlockBlockQuotation
RichBlockExpandableBlockQuotation *RichBlockExpandableBlockQuotation
RichBlockPullQuotation *RichBlockPullQuotation
RichBlockCollage *RichBlockCollage
RichBlockSlideshow *RichBlockSlideshow
RichBlockTable *RichBlockTable
RichBlockDetails *RichBlockDetails
RichBlockMap *RichBlockMap
RichBlockButtons *RichBlockButtons
RichBlockAnimation *RichBlockAnimation
RichBlockAudio *RichBlockAudio
RichBlockDocument *RichBlockDocument
RichBlockPhoto *RichBlockPhoto
RichBlockVideo *RichBlockVideo
RichBlockVoiceNote *RichBlockVoiceNote
RichBlockThinking *RichBlockThinking
}
RichBlock https://core.telegram.org/bots/api#richblock
RichBlock is a tagged union; Type holds the discriminator and the matching variant pointer is populated.
func (RichBlock) MarshalJSON ¶ added in v1.22.0
MarshalJSON implements json.Marshaler. The value receiver ensures the encoding is applied even when a RichBlock is reached as a (non-pointer) struct field.
func (*RichBlock) UnmarshalJSON ¶ added in v1.22.0
type RichBlockAnchor ¶ added in v1.22.0
type RichBlockAnchor struct {
Type RichBlockType `json:"type"`
Name string `json:"name"`
}
RichBlockAnchor https://core.telegram.org/bots/api#richblockanchor
type RichBlockAnimation ¶ added in v1.22.0
type RichBlockAnimation struct {
Type RichBlockType `json:"type"`
Animation Animation `json:"animation"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
RichBlockAnimation https://core.telegram.org/bots/api#richblockanimation
type RichBlockAudio ¶ added in v1.22.0
type RichBlockAudio struct {
Type RichBlockType `json:"type"`
Audio Audio `json:"audio"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
RichBlockAudio https://core.telegram.org/bots/api#richblockaudio
type RichBlockBlockQuotation ¶ added in v1.22.0
type RichBlockBlockQuotation struct {
Type RichBlockType `json:"type"`
Blocks []RichBlock `json:"blocks"`
Credit *RichText `json:"credit,omitempty"`
}
RichBlockBlockQuotation https://core.telegram.org/bots/api#richblockblockquotation
type RichBlockButtons ¶ added in v1.24.0
type RichBlockButtons struct {
Type RichBlockType `json:"type"`
Buttons []RichMessageButton `json:"buttons"`
Align string `json:"align,omitempty"`
}
RichBlockButtons https://core.telegram.org/bots/api#richblockbuttons
type RichBlockCaption ¶ added in v1.22.0
type RichBlockCaption struct {
Text RichText `json:"text"`
Credit *RichText `json:"credit,omitempty"`
}
RichBlockCaption https://core.telegram.org/bots/api#richblockcaption
Caption of a rich formatted block.
type RichBlockCollage ¶ added in v1.22.0
type RichBlockCollage struct {
Type RichBlockType `json:"type"`
Blocks []RichBlock `json:"blocks"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
RichBlockCollage https://core.telegram.org/bots/api#richblockcollage
type RichBlockDetails ¶ added in v1.22.0
type RichBlockDetails struct {
Type RichBlockType `json:"type"`
Summary RichText `json:"summary"`
Blocks []RichBlock `json:"blocks"`
IsOpen bool `json:"is_open,omitempty"`
}
RichBlockDetails https://core.telegram.org/bots/api#richblockdetails
type RichBlockDivider ¶ added in v1.22.0
type RichBlockDivider struct {
Type RichBlockType `json:"type"`
}
RichBlockDivider https://core.telegram.org/bots/api#richblockdivider
type RichBlockDocument ¶ added in v1.24.0
type RichBlockDocument struct {
Type RichBlockType `json:"type"`
Document Document `json:"document"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
RichBlockDocument https://core.telegram.org/bots/api#richblockdocument
type RichBlockExpandableBlockQuotation ¶ added in v1.24.0
type RichBlockExpandableBlockQuotation struct {
Type RichBlockType `json:"type"`
Blocks []RichBlock `json:"blocks"`
Credit *RichText `json:"credit,omitempty"`
// Deprecated: Use Blocks. Text is not decoded from JSON.
Text RichText `json:"-"`
}
RichBlockExpandableBlockQuotation https://core.telegram.org/bots/api#richblockexpandableblockquotation
func (RichBlockExpandableBlockQuotation) MarshalJSON ¶ added in v1.31.0
func (q RichBlockExpandableBlockQuotation) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
type RichBlockFooter ¶ added in v1.22.0
type RichBlockFooter struct {
}
RichBlockFooter https://core.telegram.org/bots/api#richblockfooter
type RichBlockList ¶ added in v1.22.0
type RichBlockList struct {
Type RichBlockType `json:"type"`
Items []RichBlockListItem `json:"items"`
}
RichBlockList https://core.telegram.org/bots/api#richblocklist
type RichBlockListItem ¶ added in v1.22.0
type RichBlockListItem struct {
Label string `json:"label"`
Blocks []RichBlock `json:"blocks"`
HasCheckbox bool `json:"has_checkbox,omitempty"`
IsChecked bool `json:"is_checked,omitempty"`
Value int `json:"value,omitempty"`
Type string `json:"type,omitempty"`
}
RichBlockListItem https://core.telegram.org/bots/api#richblocklistitem
An item of a list.
type RichBlockMap ¶ added in v1.22.0
type RichBlockMap struct {
Type RichBlockType `json:"type"`
Location Location `json:"location"`
Zoom int `json:"zoom"`
Width int `json:"width"`
Height int `json:"height"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
RichBlockMap https://core.telegram.org/bots/api#richblockmap
type RichBlockMathematicalExpression ¶ added in v1.22.0
type RichBlockMathematicalExpression struct {
Type RichBlockType `json:"type"`
Expression string `json:"expression"`
}
RichBlockMathematicalExpression https://core.telegram.org/bots/api#richblockmathematicalexpression
type RichBlockParagraph ¶ added in v1.22.0
type RichBlockParagraph struct {
Type RichBlockType `json:"type"`
Text RichText `json:"text"`
}
RichBlockParagraph https://core.telegram.org/bots/api#richblockparagraph
type RichBlockPhoto ¶ added in v1.22.0
type RichBlockPhoto struct {
Type RichBlockType `json:"type"`
Photo []PhotoSize `json:"photo"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
RichBlockPhoto https://core.telegram.org/bots/api#richblockphoto
type RichBlockPreformatted ¶ added in v1.22.0
type RichBlockPreformatted struct {
Type RichBlockType `json:"type"`
Text RichText `json:"text"`
Language string `json:"language,omitempty"`
}
RichBlockPreformatted https://core.telegram.org/bots/api#richblockpreformatted
type RichBlockPullQuotation ¶ added in v1.22.0
type RichBlockPullQuotation struct {
Type RichBlockType `json:"type"`
Text RichText `json:"text"`
Credit *RichText `json:"credit,omitempty"`
}
RichBlockPullQuotation https://core.telegram.org/bots/api#richblockpullquotation
type RichBlockSectionHeading ¶ added in v1.22.0
type RichBlockSectionHeading struct {
Type RichBlockType `json:"type"`
Text RichText `json:"text"`
Size int `json:"size"`
}
RichBlockSectionHeading https://core.telegram.org/bots/api#richblocksectionheading
type RichBlockSlideshow ¶ added in v1.22.0
type RichBlockSlideshow struct {
Type RichBlockType `json:"type"`
Blocks []RichBlock `json:"blocks"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
RichBlockSlideshow https://core.telegram.org/bots/api#richblockslideshow
type RichBlockTable ¶ added in v1.22.0
type RichBlockTable struct {
Type RichBlockType `json:"type"`
Cells [][]RichBlockTableCell `json:"cells"`
IsBordered bool `json:"is_bordered,omitempty"`
IsStriped bool `json:"is_striped,omitempty"`
IsCompact bool `json:"is_compact,omitempty"`
Caption *RichText `json:"caption,omitempty"`
}
RichBlockTable https://core.telegram.org/bots/api#richblocktable
type RichBlockTableCell ¶ added in v1.22.0
type RichBlockTableCell struct {
Text *RichText `json:"text,omitempty"`
IsHeader bool `json:"is_header,omitempty"`
Colspan int `json:"colspan,omitempty"`
Rowspan int `json:"rowspan,omitempty"`
Align string `json:"align"`
Valign string `json:"valign"`
}
RichBlockTableCell https://core.telegram.org/bots/api#richblocktablecell
Cell in a table.
type RichBlockThinking ¶ added in v1.22.0
type RichBlockThinking struct {
Type RichBlockType `json:"type"`
Text RichText `json:"text"`
}
RichBlockThinking https://core.telegram.org/bots/api#richblockthinking
A block with a "Thinking..." placeholder, corresponding to the custom HTML tag <tg-thinking>.
type RichBlockType ¶ added in v1.22.0
type RichBlockType string
RichBlockType https://core.telegram.org/bots/api#richblock
const ( RichBlockTypeParagraph RichBlockType = "paragraph" RichBlockTypeSectionHeading RichBlockType = "heading" RichBlockTypePreformatted RichBlockType = "pre" RichBlockTypeDivider RichBlockType = "divider" RichBlockTypeMathematicalExpression RichBlockType = "mathematical_expression" RichBlockTypeAnchor RichBlockType = "anchor" RichBlockTypeList RichBlockType = "list" RichBlockTypeBlockQuotation RichBlockType = "blockquote" RichBlockTypeExpandableBlockQuotation RichBlockType = "expandable_blockquote" RichBlockTypePullQuotation RichBlockType = "pullquote" RichBlockTypeCollage RichBlockType = "collage" RichBlockTypeSlideshow RichBlockType = "slideshow" RichBlockTypeTable RichBlockType = "table" RichBlockTypeDetails RichBlockType = "details" RichBlockTypeMap RichBlockType = "map" RichBlockTypeButtons RichBlockType = "buttons" RichBlockTypeAnimation RichBlockType = "animation" RichBlockTypeAudio RichBlockType = "audio" RichBlockTypeDocument RichBlockType = "document" RichBlockTypePhoto RichBlockType = "photo" RichBlockTypeVideo RichBlockType = "video" RichBlockTypeVoiceNote RichBlockType = "voice_note" RichBlockTypeThinking RichBlockType = "thinking" )
type RichBlockVideo ¶ added in v1.22.0
type RichBlockVideo struct {
Type RichBlockType `json:"type"`
Video Video `json:"video"`
HasSpoiler bool `json:"has_spoiler,omitempty"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
RichBlockVideo https://core.telegram.org/bots/api#richblockvideo
type RichBlockVoiceNote ¶ added in v1.22.0
type RichBlockVoiceNote struct {
Type RichBlockType `json:"type"`
VoiceNote Voice `json:"voice_note"`
Caption *RichBlockCaption `json:"caption,omitempty"`
}
RichBlockVoiceNote https://core.telegram.org/bots/api#richblockvoicenote
type RichMessage ¶ added in v1.22.0
RichMessage https://core.telegram.org/bots/api#richmessage
Describes a rich formatted message.
type RichMessageButton ¶ added in v1.24.0
type RichMessageButton struct {
Text RichText `json:"text"`
Style string `json:"style,omitempty"`
URL string `json:"url,omitempty"`
CallbackData string `json:"callback_data,omitempty"`
WebApp *WebAppInfo `json:"web_app,omitempty"`
LoginURL *LoginURL `json:"login_url,omitempty"`
SwitchInlineQuery *string `json:"switch_inline_query,omitempty"`
SwitchInlineQueryCurrentChat *string `json:"switch_inline_query_current_chat,omitempty"`
SwitchInlineQueryChosenChat *SwitchInlineQueryChosenChat `json:"switch_inline_query_chosen_chat,omitempty"`
CopyText *CopyTextButton `json:"copy_text,omitempty"`
Disabled *DisabledButton `json:"disabled,omitempty"`
}
RichMessageButton https://core.telegram.org/bots/api#richmessagebutton
A button in a RichMessage. Exactly one of the fields other than Text and Style must be set to specify the type of the button.
type RichText ¶ added in v1.22.0
type RichText struct {
Type RichTextType
PlainText string
Array []RichText
RichTextBold *RichTextBold
RichTextItalic *RichTextItalic
RichTextUnderline *RichTextUnderline
RichTextStrikethrough *RichTextStrikethrough
RichTextSpoiler *RichTextSpoiler
RichTextDateTime *RichTextDateTime
RichTextTextMention *RichTextTextMention
RichTextSubscript *RichTextSubscript
RichTextSuperscript *RichTextSuperscript
RichTextMarked *RichTextMarked
RichTextCode *RichTextCode
RichTextCustomEmoji *RichTextCustomEmoji
RichTextMathematicalExpression *RichTextMathematicalExpression
RichTextURL *RichTextURL
RichTextEmailAddress *RichTextEmailAddress
RichTextPhoneNumber *RichTextPhoneNumber
RichTextBankCardNumber *RichTextBankCardNumber
RichTextTonAddress *RichTextTonAddress
RichTextMention *RichTextMention
RichTextHashtag *RichTextHashtag
RichTextCashtag *RichTextCashtag
RichTextBotCommand *RichTextBotCommand
RichTextButton *RichTextButton
RichTextAnchor *RichTextAnchor
RichTextAnchorLink *RichTextAnchorLink
RichTextReference *RichTextReference
RichTextReferenceLink *RichTextReferenceLink
}
RichText https://core.telegram.org/bots/api#richtext
RichText is polymorphic: a rich text value is encoded by Telegram as a bare JSON string, a JSON array of RichText (a sequence), or a tagged object with a "type" discriminator. The form is recorded in Type: it is the empty string for the plain-string and array forms, set in PlainText and Array respectively, and otherwise holds the discriminator with the matching variant pointer populated.
func (RichText) MarshalJSON ¶ added in v1.22.0
MarshalJSON implements json.Marshaler. The value receiver ensures the encoding is applied even when a RichText is reached as a (non-pointer) struct field.
func (*RichText) UnmarshalJSON ¶ added in v1.22.0
type RichTextAnchor ¶ added in v1.22.0
type RichTextAnchor struct {
Type RichTextType `json:"type"`
Name string `json:"name"`
}
RichTextAnchor https://core.telegram.org/bots/api#richtextanchor
type RichTextAnchorLink ¶ added in v1.22.0
type RichTextAnchorLink struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
AnchorName string `json:"anchor_name"`
}
RichTextAnchorLink https://core.telegram.org/bots/api#richtextanchorlink
type RichTextBankCardNumber ¶ added in v1.22.0
type RichTextBankCardNumber struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
BankCardNumber string `json:"bank_card_number"`
}
RichTextBankCardNumber https://core.telegram.org/bots/api#richtextbankcardnumber
type RichTextBold ¶ added in v1.22.0
type RichTextBold struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
}
RichTextBold https://core.telegram.org/bots/api#richtextbold
type RichTextBotCommand ¶ added in v1.22.0
type RichTextBotCommand struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
BotCommand string `json:"bot_command"`
}
RichTextBotCommand https://core.telegram.org/bots/api#richtextbotcommand
type RichTextButton ¶ added in v1.24.0
type RichTextButton struct {
Type RichTextType `json:"type"`
Button RichMessageButton `json:"button"`
}
RichTextButton https://core.telegram.org/bots/api#richtextbutton
type RichTextCashtag ¶ added in v1.22.0
type RichTextCashtag struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
Cashtag string `json:"cashtag"`
}
RichTextCashtag https://core.telegram.org/bots/api#richtextcashtag
type RichTextCode ¶ added in v1.22.0
type RichTextCode struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
}
RichTextCode https://core.telegram.org/bots/api#richtextcode
type RichTextCustomEmoji ¶ added in v1.22.0
type RichTextCustomEmoji struct {
Type RichTextType `json:"type"`
CustomEmojiID string `json:"custom_emoji_id"`
AlternativeText string `json:"alternative_text"`
}
RichTextCustomEmoji https://core.telegram.org/bots/api#richtextcustomemoji
type RichTextDateTime ¶ added in v1.22.0
type RichTextDateTime struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
UnixTime int `json:"unix_time"`
DateTimeFormat string `json:"date_time_format"`
}
RichTextDateTime https://core.telegram.org/bots/api#richtextdatetime
type RichTextEmailAddress ¶ added in v1.22.0
type RichTextEmailAddress struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
EmailAddress string `json:"email_address"`
}
RichTextEmailAddress https://core.telegram.org/bots/api#richtextemailaddress
type RichTextHashtag ¶ added in v1.22.0
type RichTextHashtag struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
Hashtag string `json:"hashtag"`
}
RichTextHashtag https://core.telegram.org/bots/api#richtexthashtag
type RichTextItalic ¶ added in v1.22.0
type RichTextItalic struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
}
RichTextItalic https://core.telegram.org/bots/api#richtextitalic
type RichTextMarked ¶ added in v1.22.0
type RichTextMarked struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
}
RichTextMarked https://core.telegram.org/bots/api#richtextmarked
type RichTextMathematicalExpression ¶ added in v1.22.0
type RichTextMathematicalExpression struct {
Type RichTextType `json:"type"`
Expression string `json:"expression"`
}
RichTextMathematicalExpression https://core.telegram.org/bots/api#richtextmathematicalexpression
type RichTextMention ¶ added in v1.22.0
type RichTextMention struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
Username string `json:"username"`
}
RichTextMention https://core.telegram.org/bots/api#richtextmention
type RichTextPhoneNumber ¶ added in v1.22.0
type RichTextPhoneNumber struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
PhoneNumber string `json:"phone_number"`
}
RichTextPhoneNumber https://core.telegram.org/bots/api#richtextphonenumber
type RichTextReference ¶ added in v1.22.0
type RichTextReference struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
Name string `json:"name"`
}
RichTextReference https://core.telegram.org/bots/api#richtextreference
type RichTextReferenceLink ¶ added in v1.22.0
type RichTextReferenceLink struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
ReferenceName string `json:"reference_name"`
}
RichTextReferenceLink https://core.telegram.org/bots/api#richtextreferencelink
type RichTextSpoiler ¶ added in v1.22.0
type RichTextSpoiler struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
}
RichTextSpoiler https://core.telegram.org/bots/api#richtextspoiler
type RichTextStrikethrough ¶ added in v1.22.0
type RichTextStrikethrough struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
}
RichTextStrikethrough https://core.telegram.org/bots/api#richtextstrikethrough
type RichTextSubscript ¶ added in v1.22.0
type RichTextSubscript struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
}
RichTextSubscript https://core.telegram.org/bots/api#richtextsubscript
type RichTextSuperscript ¶ added in v1.22.0
type RichTextSuperscript struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
}
RichTextSuperscript https://core.telegram.org/bots/api#richtextsuperscript
type RichTextTextMention ¶ added in v1.22.0
type RichTextTextMention struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
User *User `json:"user"`
}
RichTextTextMention https://core.telegram.org/bots/api#richtexttextmention
type RichTextTonAddress ¶ added in v1.28.0
type RichTextTonAddress struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
Address string `json:"address"`
}
RichTextTonAddress https://core.telegram.org/bots/api#richtexttonaddress
type RichTextType ¶ added in v1.22.0
type RichTextType string
RichTextType https://core.telegram.org/bots/api#richtext
const ( RichTextTypeBold RichTextType = "bold" RichTextTypeItalic RichTextType = "italic" RichTextTypeUnderline RichTextType = "underline" RichTextTypeStrikethrough RichTextType = "strikethrough" RichTextTypeSpoiler RichTextType = "spoiler" RichTextTypeDateTime RichTextType = "date_time" RichTextTypeTextMention RichTextType = "text_mention" RichTextTypeSubscript RichTextType = "subscript" RichTextTypeSuperscript RichTextType = "superscript" RichTextTypeMarked RichTextType = "marked" RichTextTypeCode RichTextType = "code" RichTextTypeCustomEmoji RichTextType = "custom_emoji" RichTextTypeMathematicalExpression RichTextType = "mathematical_expression" RichTextTypeURL RichTextType = "url" RichTextTypeEmailAddress RichTextType = "email_address" RichTextTypePhoneNumber RichTextType = "phone_number" RichTextTypeBankCardNumber RichTextType = "bank_card_number" RichTextTypeTonAddress RichTextType = "ton_address" RichTextTypeMention RichTextType = "mention" RichTextTypeHashtag RichTextType = "hashtag" RichTextTypeCashtag RichTextType = "cashtag" RichTextTypeBotCommand RichTextType = "bot_command" RichTextTypeButton RichTextType = "button" RichTextTypeAnchor RichTextType = "anchor" RichTextTypeAnchorLink RichTextType = "anchor_link" RichTextTypeReference RichTextType = "reference" RichTextTypeReferenceLink RichTextType = "reference_link" )
type RichTextURL ¶ added in v1.22.0
type RichTextURL struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
URL string `json:"url"`
}
RichTextURL https://core.telegram.org/bots/api#richtexturl
type RichTextUnderline ¶ added in v1.22.0
type RichTextUnderline struct {
Type RichTextType `json:"type"`
Text RichText `json:"text"`
}
RichTextUnderline https://core.telegram.org/bots/api#richtextunderline
type SentGuestMessage ¶ added in v1.21.0
type SentGuestMessage struct {
InlineMessageID string `json:"inline_message_id"`
}
SentGuestMessage https://core.telegram.org/bots/api#sentguestmessage
type SentWebAppMessage ¶
type SentWebAppMessage struct {
InlineMessageID string `json:"inline_message_id"`
}
SentWebAppMessage https://core.telegram.org/bots/api#sentwebappmessage
type SharedUser ¶ added in v1.2.0
type SharedUser struct {
}
type SharedWidgetQuery ¶ added in v1.28.0
type SharedWidgetQuery struct {
}
SharedWidgetQuery https://core.telegram.org/bots/api#sharedwidgetquery
type ShippingAddress ¶
type ShippingAddress struct {
CountryCode string `json:"country_code"`
State string `json:"state"`
City string `json:"city"`
StreetLine1 string `json:"street_line1"`
StreetLine2 string `json:"street_line2"`
PostCode string `json:"post_code"`
}
ShippingAddress https://core.telegram.org/bots/api#shippingaddress
type ShippingOption ¶
type ShippingOption struct {
ID string `json:"id"`
Title string `json:"title"`
Prices []LabeledPrice `json:"prices"`
}
ShippingOption https://core.telegram.org/bots/api#shippingoption
type ShippingQuery ¶
type ShippingQuery struct {
ID string `json:"id"`
From *User `json:"from"`
InvoicePayload string `json:"invoice_payload"`
ShippingAddress ShippingAddress `json:"shipping_address"`
}
ShippingQuery https://core.telegram.org/bots/api#shippingquery
type StarAmount ¶ added in v1.15.0
type StarTransaction ¶ added in v1.5.0
type StarTransaction struct {
ID string `json:"id"`
Amount int `json:"amount"`
NanostarAmount int `json:"nanostar_amount,omitempty"`
Date int `json:"date"`
Source *TransactionPartner `json:"source,omitempty"`
Receiver *TransactionPartner `json:"receiver,omitempty"`
}
StarTransaction https://core.telegram.org/bots/api#startransaction
type StarTransactions ¶ added in v1.5.0
type StarTransactions struct {
Transactions []StarTransaction `json:"transactions"`
}
StarTransactions https://core.telegram.org/bots/api#startransactions
type Sticker ¶
type Sticker struct {
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
Type string `json:"type"`
Width int `json:"width"`
Height int `json:"height"`
IsAnimated bool `json:"is_animated"`
IsVideo bool `json:"is_video"`
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
Emoji string `json:"emoji,omitempty"`
SetName string `json:"set_name,omitempty"`
PremiumAnimation *File `json:"premium_animation,omitempty"`
MaskPosition *MaskPosition `json:"mask_position,omitempty"`
CustomEmojiID string `json:"custom_emoji_id"`
NeedsRepainting bool `json:"needs_repainting,omitempty"`
FileSize int `json:"file_size,omitempty"`
}
type StickerSet ¶
type StoryArea ¶ added in v1.15.0
type StoryArea struct {
Position AreaPosition `json:"position"`
Type StoryAreaType `json:"type"`
}
type StoryAreaPosition ¶ added in v1.15.0
type StoryAreaPosition = AreaPosition
StoryAreaPosition is AreaPosition, the name this type had before Bot API 10.4.
type StoryAreaType ¶ added in v1.15.0
type StoryAreaType struct {
Type StoryAreaTypeType
StoryAreaTypeLocation *StoryAreaTypeLocation
StoryAreaTypeSuggestedReaction *StoryAreaTypeSuggestedReaction
StoryAreaTypeLink *StoryAreaTypeLink
StoryAreaTypeWeather *StoryAreaTypeWeather
StoryAreaTypeUniqueGift *StoryAreaTypeUniqueGift
}
StoryAreaType https://core.telegram.org/bots/api#storyareatype
func (*StoryAreaType) UnmarshalJSON ¶ added in v1.15.0
func (s *StoryAreaType) UnmarshalJSON(data []byte) error
type StoryAreaTypeLink ¶ added in v1.15.0
type StoryAreaTypeLink struct {
Type StoryAreaTypeType `json:"type"`
URL string `json:"url"`
}
StoryAreaTypeLink https://core.telegram.org/bots/api#storyareatypelink
type StoryAreaTypeLocation ¶ added in v1.15.0
type StoryAreaTypeLocation struct {
Type StoryAreaTypeType `json:"type"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
Address *LocationAddress `json:"address,omitempty"`
}
StoryAreaTypeLocation https://core.telegram.org/bots/api#storyareatypelocation
type StoryAreaTypeSuggestedReaction ¶ added in v1.15.0
type StoryAreaTypeSuggestedReaction struct {
Type StoryAreaTypeType `json:"type"`
ReactionType ReactionType `json:"reaction_type"`
IsDark bool `json:"is_dark,omitempty"`
IsFlipped bool `json:"is_flipped,omitempty"`
}
StoryAreaTypeSuggestedReaction https://core.telegram.org/bots/api#storyareatypesuggestedreaction
type StoryAreaTypeType ¶ added in v1.15.0
type StoryAreaTypeType string
var ( StoryAreaTypeTypeLocation StoryAreaTypeType = "location" StoryAreaTypeTypeSuggestedReaction StoryAreaTypeType = "suggested_reaction" StoryAreaTypeTypeLink StoryAreaTypeType = "link" StoryAreaTypeTypeWeather StoryAreaTypeType = "weather" StoryAreaTypeTypeUniqueGift StoryAreaTypeType = "unique_gift" )
type StoryAreaTypeUniqueGift ¶ added in v1.15.0
type StoryAreaTypeUniqueGift struct {
Type StoryAreaTypeType `json:"type"`
Name string `json:"name"`
}
StoryAreaTypeUniqueGift https://core.telegram.org/bots/api#storyareatypeuniquegift
type StoryAreaTypeWeather ¶ added in v1.15.0
type StoryAreaTypeWeather struct {
Type StoryAreaTypeType `json:"type"`
Temperature float64 `json:"temperature"`
Emoji string `json:"emoji"`
BackgroundColor int `json:"background_color"`
}
StoryAreaTypeWeather https://core.telegram.org/bots/api#storyareatypeweather
type SuccessfulPayment ¶
type SuccessfulPayment struct {
Currency string `json:"currency"`
TotalAmount int `json:"total_amount"`
InvoicePayload string `json:"invoice_payload"`
SubscriptionExpirationDate int `json:"subscription_expiration_date,omitempty"`
IsRecurring bool `json:"is_recurring,omitempty"`
IsFirstRecurring bool `json:"is_first_recurring,omitempty"`
ShippingOptionID string `json:"shipping_option_id,omitempty"`
OrderInfo *OrderInfo `json:"order_info,omitempty"`
TelegramPaymentChargeID string `json:"telegram_payment_charge_id"`
ProviderPaymentChargeID string `json:"provider_payment_charge_id"`
}
SuccessfulPayment https://core.telegram.org/bots/api#successfulpayment
type SuggestedPostApprovalFailed ¶ added in v1.17.0
type SuggestedPostApprovalFailed struct {
SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
Price *SuggestedPostPrice `json:"price,omitempty"`
}
SuggestedPostApprovalFailed https://core.telegram.org/bots/api#suggestedpostapprovalfailed
type SuggestedPostApproved ¶ added in v1.17.0
type SuggestedPostApproved struct {
SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
Price *SuggestedPostPrice `json:"price,omitempty"`
SendDate int `json:"send_date,omitempty"`
}
SuggestedPostApproved https://core.telegram.org/bots/api#suggestedpostapproved
type SuggestedPostDeclined ¶ added in v1.17.0
type SuggestedPostDeclined struct {
SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
Comment string `json:"comment,omitempty"`
}
SuggestedPostDeclined https://core.telegram.org/bots/api#suggestedpostdeclined
type SuggestedPostInfo ¶ added in v1.17.0
type SuggestedPostInfo struct {
State string `json:"state"`
Price *SuggestedPostPrice `json:"price,omitempty"`
SendDate int `json:"send_date,omitempty"`
}
SuggestedPostInfo https://core.telegram.org/bots/api#suggestedpostinfo
type SuggestedPostPaid ¶ added in v1.17.0
type SuggestedPostPaid struct {
SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
Currency string `json:"currency"`
Amount int `json:"amount,omitempty"`
StarAmount *StarAmount `json:"star_amount,omitempty"`
}
SuggestedPostPaid https://core.telegram.org/bots/api#suggestedpostpaid
type SuggestedPostParameters ¶ added in v1.17.0
type SuggestedPostParameters struct {
Price *SuggestedPostPrice `json:"price,omitempty"`
SendDate int `json:"send_date,omitempty"`
}
SuggestedPostParameters https://core.telegram.org/bots/api#suggestedpostparameters
type SuggestedPostPrice ¶ added in v1.17.0
SuggestedPostPrice https://core.telegram.org/bots/api#suggestedpostprice
type SuggestedPostRefunded ¶ added in v1.17.0
type SuggestedPostRefunded struct {
SuggestedPostMessage *Message `json:"suggested_post_message,omitempty"`
Reason string `json:"reason"`
}
SuggestedPostRefunded https://core.telegram.org/bots/api#suggestedpostrefunded
type SwitchInlineQueryChosenChat ¶ added in v0.7.6
type SwitchInlineQueryChosenChat struct {
Query string `json:"query,omitempty"`
AllowUserChats bool `json:"allow_user_chats,omitempty"`
AllowBotChats bool `json:"allow_bot_chats,omitempty"`
AllowGroupChats bool `json:"allow_group_chats,omitempty"`
AllowChannelChats bool `json:"allow_channel_chats,omitempty"`
}
SwitchInlineQueryChosenChat https://core.telegram.org/bots/api#switchinlinequerychosenchat
type TextQuote ¶ added in v1.0.0
type TextQuote struct {
Text string `json:"text"`
Entities []MessageEntity `json:"entities,omitempty"`
RichTexts []RichText `json:"rich_texts,omitempty"`
Position int `json:"position"`
IsManual bool `json:"is_manual,omitempty"`
}
type TonNft ¶ added in v1.28.0
type TonNft struct {
Address string `json:"address"`
CollectionAddress string `json:"collection_address,omitempty"`
Index string `json:"index"`
Name string `json:"name"`
Description string `json:"description"`
Attributes []TonNftAttribute `json:"attributes,omitempty"`
Gift *UniqueGift `json:"gift,omitempty"`
}
type TonNftAttribute ¶ added in v1.28.0
TonNftAttribute https://core.telegram.org/bots/api#tonnftattribute
type TonWalletCard ¶ added in v1.28.0
type TonWalletCard struct {
Address string `json:"address"`
Amount string `json:"amount"`
Stickers []TonWalletCardSticker `json:"stickers"`
BackgroundNftAddress string `json:"background_nft_address,omitempty"`
}
TonWalletCard https://core.telegram.org/bots/api#tonwalletcard
type TonWalletCardSticker ¶ added in v1.28.0
type TonWalletCardSticker struct {
Position AreaPosition `json:"position"`
Nft TonNft `json:"nft"`
}
TonWalletCardSticker https://core.telegram.org/bots/api#tonwalletcardsticker
type TonWalletTransfer ¶ added in v1.28.0
type TonWalletTransfer struct {
TransactionID string `json:"transaction_id"`
PeerAddress string `json:"peer_address"`
Amount string `json:"amount"`
Comment string `json:"comment,omitempty"`
}
TonWalletTransfer https://core.telegram.org/bots/api#tonwallettransfer
type TransactionPartner ¶ added in v1.5.0
type TransactionPartner struct {
Type TransactionPartnerType
User *TransactionPartnerUser `json:"user,omitempty"`
Chat *TransactionPartnerChat `json:"chat,omitempty"`
AffiliateProgram *TransactionPartnerAffiliateProgram `json:"affiliate_program,omitempty"`
Fragment *TransactionPartnerFragment `json:"fragment,omitempty"`
TelegramAds *TransactionPartnerTelegramAds `json:"telegram_ads,omitempty"`
TelegramApi *TransactionPartnerTelegramApi `json:"telegram_api,omitempty"`
Other *TransactionPartnerOther `json:"other,omitempty"`
}
TransactionPartner https://core.telegram.org/bots/api#transactionpartner
func (*TransactionPartner) UnmarshalJSON ¶ added in v1.5.0
func (m *TransactionPartner) UnmarshalJSON(data []byte) error
type TransactionPartnerAffiliateProgram ¶ added in v1.12.0
type TransactionPartnerAffiliateProgram struct {
Type TransactionPartnerType `json:"type"`
SponsorUser *User `json:"sponsor_user,omitempty"`
CommissionPerMille int `json:"commission_per_mille"`
}
TransactionPartnerAffiliateProgram https://core.telegram.org/bots/api#transactionpartneraffiliateprogram
type TransactionPartnerChat ¶ added in v1.14.0
type TransactionPartnerChat struct {
Type TransactionPartnerType `json:"type"`
Chat Chat `json:"chat"`
Gift *Gift `json:"gift,omitempty"`
}
TransactionPartnerChat https://core.telegram.org/bots/api#transactionpartnerchat
type TransactionPartnerFragment ¶ added in v1.5.0
type TransactionPartnerFragment struct {
Type TransactionPartnerType `json:"type"`
WithdrawalState *RevenueWithdrawalState `json:"withdrawal_state,omitempty"`
}
TransactionPartnerFragment https://core.telegram.org/bots/api#transactionpartnerfragment
type TransactionPartnerOther ¶ added in v1.5.0
type TransactionPartnerOther struct {
Type TransactionPartnerType `json:"type"`
}
TransactionPartnerOther https://core.telegram.org/bots/api#transactionpartnerother
type TransactionPartnerTelegramAds ¶ added in v1.6.0
type TransactionPartnerTelegramAds struct {
Type TransactionPartnerType `json:"type"`
}
TransactionPartnerTelegramAds https://core.telegram.org/bots/api#transactionpartnertelegramads
type TransactionPartnerTelegramApi ¶ added in v1.10.0
type TransactionPartnerTelegramApi struct {
Type TransactionPartnerType `json:"type"`
RequestCount int `json:"request_count"`
}
TransactionPartnerTelegramApi https://core.telegram.org/bots/api#transactionpartnertelegramapi
type TransactionPartnerType ¶ added in v1.5.0
type TransactionPartnerType string
const ( TransactionPartnerTypeUser TransactionPartnerType = "user" TransactionPartnerTypeChat TransactionPartnerType = "chat" TransactionPartnerTypeAffiliateProgram TransactionPartnerType = "affiliate_program" TransactionPartnerTypeFragment TransactionPartnerType = "fragment" TransactionPartnerTypeTelegramAds TransactionPartnerType = "telegram_ads" TransactionPartnerTypeTelegramApi TransactionPartnerType = "telegram_api" TransactionPartnerTypeOther TransactionPartnerType = "other" )
type TransactionPartnerUser ¶ added in v1.5.0
type TransactionPartnerUser struct {
Type TransactionPartnerType `json:"type"`
TransactionType string `json:"transaction_type"`
User User `json:"user"`
Affiliate *AffiliateInfo `json:"affiliate,omitempty"`
InvoicePayload string `json:"invoice_payload,omitempty"`
SubscriptionPeriod int `json:"subscription_period,omitempty"`
PaidMedia []*PaidMedia `json:"paid_media,omitempty"`
PaidMediaPayload string `json:"paid_media_payload,omitempty"`
Gift string `json:"gift,omitempty"`
PremiumSubscriptionDuration int `json:"premium_subscription_duration,omitempty"`
}
TransactionPartnerUser https://core.telegram.org/bots/api#transactionpartneruser
type UniqueGift ¶ added in v1.15.0
type UniqueGift struct {
GiftID string `json:"gift_id"`
BaseName string `json:"base_name"`
Name string `json:"name"`
Number int `json:"number"`
Model UniqueGiftModel `json:"model"`
Symbol UniqueGiftSymbol `json:"symbol"`
Backdrop UniqueGiftBackdrop `json:"backdrop"`
IsPremium bool `json:"is_premium,omitempty"`
IsFromBlockchain bool `json:"is_from_blockchain,omitempty"`
IsBurned bool `json:"is_burned,omitempty"`
Colors *UniqueGiftColors `json:"colors,omitempty"`
PublisherChat *Chat `json:"publisher_chat,omitempty"`
}
type UniqueGiftBackdrop ¶ added in v1.15.0
type UniqueGiftBackdrop struct {
Name string `json:"name"`
Colors UniqueGiftBackdropColors `json:"colors"`
RarityPerMille int `json:"rarity_per_mille"`
}
UniqueGiftBackdrop https://core.telegram.org/bots/api#uniquegiftbackdrop
type UniqueGiftBackdropColors ¶ added in v1.15.0
type UniqueGiftBackdropColors struct {
CenterColor int `json:"center_color"`
EdgeColor int `json:"edge_color"`
SymbolColor int `json:"symbol_color"`
TextColor int `json:"text_color"`
}
UniqueGiftBackdropColors https://core.telegram.org/bots/api#uniquegiftbackdropcolors
type UniqueGiftColors ¶ added in v1.18.0
type UniqueGiftColors struct {
ModelCustomEmojiID string `json:"model_custom_emoji_id"`
SymbolCustomEmojiID string `json:"symbol_custom_emoji_id"`
LightThemeMainColor int `json:"light_theme_main_color"`
LightThemeOtherColors []int `json:"light_theme_other_colors"`
DarkThemeMainColor int `json:"dark_theme_main_color"`
DarkThemeOtherColors []int `json:"dark_theme_other_colors"`
}
UniqueGiftColors https://core.telegram.org/bots/api#uniquegiftcolors
type UniqueGiftInfo ¶ added in v1.15.0
type UniqueGiftInfo struct {
Gift UniqueGift `json:"gift"`
Origin string `json:"origin"`
Text string `json:"text,omitempty"`
Entities []MessageEntity `json:"entities,omitempty"`
IsPrivate bool `json:"is_private,omitempty"`
LastResaleCurrency string `json:"last_resale_currency,omitempty"`
LastResaleAmount int `json:"last_resale_amount,omitempty"`
OwnedGiftID string `json:"owned_gift_id,omitempty"`
TransferStarCount int `json:"transfer_star_count,omitempty"`
NextTransferDate int `json:"next_transfer_date,omitempty"`
}
UniqueGiftInfo https://core.telegram.org/bots/api#uniquegiftinfo
type UniqueGiftModel ¶ added in v1.15.0
type UniqueGiftModel struct {
Name string `json:"name"`
Sticker Sticker `json:"sticker"`
RarityPerMille int `json:"rarity_per_mille"`
Rarity string `json:"rarity,omitempty"`
}
UniqueGiftModel https://core.telegram.org/bots/api#uniquegiftmodel
type UniqueGiftSymbol ¶ added in v1.15.0
type UniqueGiftSymbol struct {
Name string `json:"name"`
Sticker Sticker `json:"sticker"`
RarityPerMille int `json:"rarity_per_mille"`
}
UniqueGiftSymbol https://core.telegram.org/bots/api#uniquegiftsymbol
type Update ¶
type Update struct {
ID int64 `json:"update_id"`
Message *Message `json:"message,omitempty"`
EditedMessage *Message `json:"edited_message,omitempty"`
ChannelPost *Message `json:"channel_post,omitempty"`
EditedChannelPost *Message `json:"edited_channel_post,omitempty"`
BusinessConnection *BusinessConnection `json:"business_connection,omitempty"`
BusinessMessage *Message `json:"business_message,omitempty"`
EditedBusinessMessage *Message `json:"edited_business_message,omitempty"`
DeletedBusinessMessages *BusinessMessagesDeleted `json:"deleted_business_messages,omitempty"`
MessageReaction *MessageReactionUpdated `json:"message_reaction,omitempty"`
MessageReactionCount *MessageReactionCountUpdated `json:"message_reaction_count,omitempty"`
InlineQuery *InlineQuery `json:"inline_query,omitempty"`
ChosenInlineResult *ChosenInlineResult `json:"chosen_inline_result,omitempty"`
CallbackQuery *CallbackQuery `json:"callback_query,omitempty"`
WidgetQuery *WidgetQuery `json:"widget_query,omitempty"`
ShippingQuery *ShippingQuery `json:"shipping_query,omitempty"`
PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query,omitempty"`
PurchasedPaidMedia *PaidMediaPurchased `json:"purchased_paid_media,omitempty"`
Poll *Poll `json:"poll,omitempty"`
PollAnswer *PollAnswer `json:"poll_answer,omitempty"`
ManagedBot *ManagedBotUpdated `json:"managed_bot,omitempty"`
GuestMessage *Message `json:"guest_message,omitempty"`
MyChatMember *ChatMemberUpdated `json:"my_chat_member,omitempty"`
ChatMember *ChatMemberUpdated `json:"chat_member,omitempty"`
ChatJoinRequest *ChatJoinRequest `json:"chat_join_request,omitempty"`
ChatBoost *ChatBoostUpdated `json:"chat_boost,omitempty"`
RemovedChatBoost *ChatBoostRemoved `json:"removed_chat_boost,omitempty"`
Subscription *BotSubscriptionUpdated `json:"subscription,omitempty"`
StoppedMessageGeneration *MessageGenerationStopped `json:"stopped_message_generation,omitempty"`
}
Update https://core.telegram.org/bots/api#update
func (*Update) EffectiveChat ¶ added in v1.28.0
EffectiveChat returns the chat where the event occurred, or nil if none is available or u is nil. The result points into the update; it is not a copy. Callback queries support both accessible and inaccessible messages; inline callbacks without a message have no chat. SenderChat, reaction ActorChat and PollAnswer.VoterChat identify actors, not the event's chat, and are not used. A chat is never synthesized from a user ID or BusinessConnection.UserChatID.
func (*Update) EffectiveUser ¶ added in v1.28.0
EffectiveUser returns the user associated with the update, or nil if none is available or u is nil. The result points into the update; it is not a copy. For messages it returns From (including channel posts), for callbacks and widget queries the user who triggered them, and for membership changes the initiating user. Business connections return their owner, subscriptions their subscriber, managed bot updates their User (not Bot), and boosts their source user. Anonymous actors are not inferred from chats or message contents.
type User ¶
type User struct {
ID int64 `json:"id"`
IsBot bool `json:"is_bot"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
Username string `json:"username,omitempty"`
LanguageCode string `json:"language_code,omitempty"`
IsPremium bool `json:"is_premium,omitempty"`
AddedToAttachmentMenu bool `json:"added_to_attachment_menu,omitempty"`
// Deprecated: Use BotFullInfo.CanJoinGroups.
CanJoinGroups bool `json:"can_join_groups,omitempty"`
// Deprecated: Use BotFullInfo.CanReadAllGroupMessages.
CanReadAllGroupMessages bool `json:"can_read_all_group_messages,omitempty"`
// Deprecated: Use BotFullInfo.SupportsInlineQueries.
SupportInlineQueries bool `json:"supports_inline_queries,omitempty"`
// Deprecated: Use BotFullInfo.CanConnectToBusiness.
CanConnectToBusiness bool `json:"can_connect_to_business,omitempty"`
// Deprecated: Use BotFullInfo.HasTopicsEnabled.
HasTopicsEnabled bool `json:"has_topics_enabled,omitempty"`
// Deprecated: Use BotFullInfo.AllowsUsersToCreateTopics.
AllowsUsersToCreateTopics bool `json:"allows_users_to_create_topics,omitempty"`
// Deprecated: Use BotFullInfo.CanManageBots.
CanManageBots bool `json:"can_manage_bots,omitempty"`
// Deprecated: Use BotFullInfo.SupportsJoinRequestQueries.
SupportsJoinRequestQueries bool `json:"supports_join_request_queries,omitempty"`
// Deprecated: Use BotFullInfo.SupportsGuestQueries.
SupportsGuestQueries bool `json:"supports_guest_queries,omitempty"`
}
type UserChatBoosts ¶ added in v1.0.0
type UserChatBoosts struct {
Boosts []ChatBoost `json:"boosts"`
}
UserChatBoosts https://core.telegram.org/bots/api#userchatboosts
type UserProfileAudios ¶ added in v1.19.0
type UserProfileAudios struct {
TotalCount int `json:"total_count"`
Audios []Audio `json:"audios"`
}
UserProfileAudios https://core.telegram.org/bots/api#userprofileaudios
type UserProfilePhotos ¶
type UserProfilePhotos struct {
TotalCount int `json:"total_count"`
Photos [][]PhotoSize `json:"photos"`
}
UserProfilePhotos https://core.telegram.org/bots/api#userprofilephotos
type UserRating ¶ added in v1.19.0
type UserShared ¶ added in v0.5.0
type UserShared struct {
}
type UsersShared ¶ added in v1.0.0
type UsersShared struct {
}
UsersShared https://core.telegram.org/bots/api#usersshared
type Venue ¶
type Venue struct {
Location Location `json:"location"`
Title string `json:"title"`
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"`
}
type Video ¶
type Video struct {
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
Width int `json:"width"`
Height int `json:"height"`
Duration int `json:"duration"`
Thumbnail *PhotoSize `json:"thumbnail,omitempty"`
Cover []PhotoSize `json:"cover,omitempty"`
StartTimestamp int `json:"start_timestamp,omitempty"`
FileName string `json:"file_name,omitempty"`
MimeType string `json:"mime_type,omitempty"`
FileSize int64 `json:"file_size,omitempty"`
Qualities []VideoQuality `json:"qualities,omitempty"`
}
type VideoChatEnded ¶
type VideoChatEnded struct {
Duration int `json:"duration"`
}
VideoChatEnded https://core.telegram.org/bots/api#videochatended
type VideoChatParticipantsInvited ¶
type VideoChatParticipantsInvited struct {
Users []User `json:"users"`
}
VideoChatParticipantsInvited https://core.telegram.org/bots/api#videochatparticipantsinvited
type VideoChatScheduled ¶
type VideoChatScheduled struct {
StartDate int `json:"start_date"`
}
VideoChatScheduled https://core.telegram.org/bots/api#videochatscheduled
type VideoChatStarted ¶
type VideoChatStarted struct {
Duration int `json:"duration"`
}
VideoChatStarted https://core.telegram.org/bots/api#videochatstarted
type VideoNote ¶
type VideoQuality ¶ added in v1.19.0
type VideoQuality struct {
FileID string `json:"file_id"`
FileUniqueID string `json:"file_unique_id"`
Width int `json:"width"`
Height int `json:"height"`
Codec string `json:"codec"`
FileSize int64 `json:"file_size,omitempty"`
}
VideoQuality https://core.telegram.org/bots/api#videoquality
type Voice ¶
type WebAppData ¶
type WebAppInfo ¶
type WebAppInfo struct {
URL string `json:"url"`
}
type WebhookInfo ¶
type WebhookInfo struct {
URL string `json:"url"`
HasCustomCertificate bool `json:"has_custom_certificate"`
PendingUpdateCount int `json:"pending_update_count"`
IPAddress string `json:"ip_address,omitempty"`
LastErrorDate int `json:"last_error_date,omitempty"`
LastErrorMessage string `json:"last_error_message,omitempty"`
LastSynchronizationErrorDate int `json:"last_synchronization_error_date,omitempty"`
MaxConnections int `json:"max_connections,omitempty"`
AllowedUpdates []string `json:"allowed_updates,omitempty"`
}
WebhookInfo https://core.telegram.org/bots/api#webhookinfo
type Widget ¶ added in v1.28.0
type WidgetQuery ¶ added in v1.28.0
type WidgetQuery struct {
ID string `json:"id"`
From User `json:"from"`
Chat *Chat `json:"chat,omitempty"`
MessageID int `json:"message_id,omitempty"`
InlineMessageID string `json:"inline_message_id,omitempty"`
ChatInstance string `json:"chat_instance"`
ChatType WidgetQueryChatType `json:"chat_type,omitempty"`
Type WidgetQueryType `json:"type"`
Data string `json:"data"`
WidgetID string `json:"widget_id,omitempty"`
}
WidgetQuery https://core.telegram.org/bots/api#widgetquery
type WidgetQueryChatType ¶ added in v1.28.0
type WidgetQueryChatType string
WidgetQueryChatType is the chat a widget in an inline message was sent to.
const ( WidgetQueryChatTypeSender WidgetQueryChatType = "sender" WidgetQueryChatTypePrivate WidgetQueryChatType = "private" WidgetQueryChatTypeGroup WidgetQueryChatType = "group" WidgetQueryChatTypeSupergroup WidgetQueryChatType = "supergroup" WidgetQueryChatTypeChannel WidgetQueryChatType = "channel" )
type WidgetQueryType ¶ added in v1.28.0
type WidgetQueryType struct {
Type WidgetQueryTypeType
WidgetQueryTypeData *WidgetQueryTypeData
WidgetQueryTypeSignData *WidgetQueryTypeSignData
WidgetQueryTypeSentTransaction *WidgetQueryTypeSentTransaction
}
WidgetQueryType https://core.telegram.org/bots/api#widgetquerytype
func (WidgetQueryType) MarshalJSON ¶ added in v1.28.0
func (q WidgetQueryType) MarshalJSON() ([]byte, error)
func (*WidgetQueryType) UnmarshalJSON ¶ added in v1.28.0
func (q *WidgetQueryType) UnmarshalJSON(data []byte) error
type WidgetQueryTypeData ¶ added in v1.28.0
type WidgetQueryTypeData struct {
Type WidgetQueryTypeType `json:"type"`
WalletCard *TonWalletCard `json:"wallet_card,omitempty"`
}
WidgetQueryTypeData https://core.telegram.org/bots/api#widgetquerytypedata
type WidgetQueryTypeSentTransaction ¶ added in v1.28.0
type WidgetQueryTypeSentTransaction struct {
Type WidgetQueryTypeType `json:"type"`
Wallet WidgetQueryWallet `json:"wallet"`
MsgHash string `json:"msg_hash"`
}
WidgetQueryTypeSentTransaction https://core.telegram.org/bots/api#widgetquerytypesenttransaction
type WidgetQueryTypeSignData ¶ added in v1.28.0
type WidgetQueryTypeSignData struct {
Type WidgetQueryTypeType `json:"type"`
Wallet WidgetQueryWallet `json:"wallet"`
SignData string `json:"sign_data"`
}
WidgetQueryTypeSignData https://core.telegram.org/bots/api#widgetquerytypesigndata
type WidgetQueryTypeType ¶ added in v1.28.0
type WidgetQueryTypeType string
WidgetQueryTypeType https://core.telegram.org/bots/api#widgetquerytype
const ( WidgetQueryTypeTypeData WidgetQueryTypeType = "data" WidgetQueryTypeTypeSignData WidgetQueryTypeType = "sign_data" WidgetQueryTypeTypeSentTransaction WidgetQueryTypeType = "sent_transaction" )
type WidgetQueryWallet ¶ added in v1.28.0
type WidgetQueryWallet struct {
Address string `json:"address"`
Amount string `json:"amount"`
PublicKey string `json:"public_key,omitempty"`
StateInit string `json:"state_init,omitempty"`
}
WidgetQueryWallet https://core.telegram.org/bots/api#widgetquerywallet
type WriteAccessAllowed ¶ added in v0.3.4
type WriteAccessAllowed struct {
FromRequest bool `json:"from_request,omitempty"`
WebAppName string `json:"web_app_name,omitempty"`
FromAttachmentMenu bool `json:"from_attachment_menu,omitempty"`
Inviter *User `json:"inviter,omitempty"`
}
WriteAccessAllowed https://core.telegram.org/bots/api#writeaccessallowed
Inviter is the owner of the bot when that owner invited the user to the private chat.
Source Files
¶
- animation.go
- audio.go
- boost.go
- bot_command.go
- bot_commands_scope.go
- business.go
- callback_query.go
- chat.go
- chat_action.go
- chat_background.go
- chat_member.go
- checklist.go
- chosen_inline_result.go
- community.go
- contact.go
- dice.go
- document.go
- ephemeral.go
- file.go
- forum.go
- game.go
- gift.go
- giveaway.go
- guest_live.go
- inline_query.go
- input_file.go
- input_media.go
- input_profile.go
- input_rich_block.go
- invoice.go
- link_preview.go
- location.go
- managed_bot.go
- menu_button.go
- message.go
- message_entity.go
- message_generation.go
- order_info.go
- paid.go
- parse_mode.go
- passport_data.go
- passport_element_error.go
- photo_size.go
- poll.go
- pre_checkout_query.go
- proximity_alert_triggered.go
- reaction.go
- reply.go
- reply_markup.go
- rich_block.go
- rich_message.go
- rich_text.go
- share_theme.go
- shipping_query.go
- star.go
- sticker.go
- sticker_set.go
- story.go
- subscription.go
- successful_payment.go
- suggested_post.go
- ton.go
- union.go
- update.go
- update_effective.go
- user.go
- user_rating.go
- venue.go
- video.go
- video_chat.go
- video_note.go
- voice.go
- web_app.go
- web_hook_info.go
- widget.go