client

package
v1.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClassAuthenticationCodeType                 = "AuthenticationCodeType"
	ClassAuthorizationState                     = "AuthorizationState"
	ClassInputFile                              = "InputFile"
	ClassThumbnailFormat                        = "ThumbnailFormat"
	ClassMaskPoint                              = "MaskPoint"
	ClassStickerType                            = "StickerType"
	ClassPollType                               = "PollType"
	ClassUserType                               = "UserType"
	ClassInputChatPhoto                         = "InputChatPhoto"
	ClassChatMemberStatus                       = "ChatMemberStatus"
	ClassChatMembersFilter                      = "ChatMembersFilter"
	ClassSupergroupMembersFilter                = "SupergroupMembersFilter"
	ClassSecretChatState                        = "SecretChatState"
	ClassMessageSender                          = "MessageSender"
	ClassMessageForwardOrigin                   = "MessageForwardOrigin"
	ClassMessageSendingState                    = "MessageSendingState"
	ClassNotificationSettingsScope              = "NotificationSettingsScope"
	ClassChatType                               = "ChatType"
	ClassChatList                               = "ChatList"
	ClassChatSource                             = "ChatSource"
	ClassPublicChatType                         = "PublicChatType"
	ClassChatActionBar                          = "ChatActionBar"
	ClassKeyboardButtonType                     = "KeyboardButtonType"
	ClassInlineKeyboardButtonType               = "InlineKeyboardButtonType"
	ClassReplyMarkup                            = "ReplyMarkup"
	ClassLoginUrlInfo                           = "LoginUrlInfo"
	ClassRichText                               = "RichText"
	ClassPageBlockHorizontalAlignment           = "PageBlockHorizontalAlignment"
	ClassPageBlockVerticalAlignment             = "PageBlockVerticalAlignment"
	ClassPageBlock                              = "PageBlock"
	ClassInputCredentials                       = "InputCredentials"
	ClassPassportElementType                    = "PassportElementType"
	ClassPassportElement                        = "PassportElement"
	ClassInputPassportElement                   = "InputPassportElement"
	ClassPassportElementErrorSource             = "PassportElementErrorSource"
	ClassInputPassportElementErrorSource        = "InputPassportElementErrorSource"
	ClassMessageContent                         = "MessageContent"
	ClassTextEntityType                         = "TextEntityType"
	ClassMessageSchedulingState                 = "MessageSchedulingState"
	ClassInputMessageContent                    = "InputMessageContent"
	ClassSearchMessagesFilter                   = "SearchMessagesFilter"
	ClassChatAction                             = "ChatAction"
	ClassUserStatus                             = "UserStatus"
	ClassCallDiscardReason                      = "CallDiscardReason"
	ClassCallServerType                         = "CallServerType"
	ClassCallState                              = "CallState"
	ClassGroupCallVideoQuality                  = "GroupCallVideoQuality"
	ClassCallProblem                            = "CallProblem"
	ClassDiceStickers                           = "DiceStickers"
	ClassInputInlineQueryResult                 = "InputInlineQueryResult"
	ClassInlineQueryResult                      = "InlineQueryResult"
	ClassCallbackQueryPayload                   = "CallbackQueryPayload"
	ClassChatEventAction                        = "ChatEventAction"
	ClassLanguagePackStringValue                = "LanguagePackStringValue"
	ClassDeviceToken                            = "DeviceToken"
	ClassBackgroundFill                         = "BackgroundFill"
	ClassBackgroundType                         = "BackgroundType"
	ClassInputBackground                        = "InputBackground"
	ClassCanTransferOwnershipResult             = "CanTransferOwnershipResult"
	ClassCheckChatUsernameResult                = "CheckChatUsernameResult"
	ClassCheckStickerSetNameResult              = "CheckStickerSetNameResult"
	ClassResetPasswordResult                    = "ResetPasswordResult"
	ClassMessageFileType                        = "MessageFileType"
	ClassPushMessageContent                     = "PushMessageContent"
	ClassNotificationType                       = "NotificationType"
	ClassNotificationGroupType                  = "NotificationGroupType"
	ClassOptionValue                            = "OptionValue"
	ClassJsonValue                              = "JsonValue"
	ClassUserPrivacySettingRule                 = "UserPrivacySettingRule"
	ClassUserPrivacySetting                     = "UserPrivacySetting"
	ClassChatReportReason                       = "ChatReportReason"
	ClassInternalLinkType                       = "InternalLinkType"
	ClassFileType                               = "FileType"
	ClassNetworkType                            = "NetworkType"
	ClassNetworkStatisticsEntry                 = "NetworkStatisticsEntry"
	ClassConnectionState                        = "ConnectionState"
	ClassTopChatCategory                        = "TopChatCategory"
	ClassTMeUrlType                             = "TMeUrlType"
	ClassSuggestedAction                        = "SuggestedAction"
	ClassTextParseMode                          = "TextParseMode"
	ClassProxyType                              = "ProxyType"
	ClassStatisticalGraph                       = "StatisticalGraph"
	ClassChatStatistics                         = "ChatStatistics"
	ClassVectorPathCommand                      = "VectorPathCommand"
	ClassBotCommandScope                        = "BotCommandScope"
	ClassUpdate                                 = "Update"
	ClassLogStream                              = "LogStream"
	ClassError                                  = "Error"
	ClassOk                                     = "Ok"
	ClassTdlibParameters                        = "TdlibParameters"
	ClassAuthenticationCodeInfo                 = "AuthenticationCodeInfo"
	ClassEmailAddressAuthenticationCodeInfo     = "EmailAddressAuthenticationCodeInfo"
	ClassTextEntity                             = "TextEntity"
	ClassTextEntities                           = "TextEntities"
	ClassFormattedText                          = "FormattedText"
	ClassTermsOfService                         = "TermsOfService"
	ClassPasswordState                          = "PasswordState"
	ClassRecoveryEmailAddress                   = "RecoveryEmailAddress"
	ClassTemporaryPasswordState                 = "TemporaryPasswordState"
	ClassLocalFile                              = "LocalFile"
	ClassRemoteFile                             = "RemoteFile"
	ClassFile                                   = "File"
	ClassPhotoSize                              = "PhotoSize"
	ClassMinithumbnail                          = "Minithumbnail"
	ClassThumbnail                              = "Thumbnail"
	ClassMaskPosition                           = "MaskPosition"
	ClassClosedVectorPath                       = "ClosedVectorPath"
	ClassPollOption                             = "PollOption"
	ClassAnimation                              = "Animation"
	ClassAudio                                  = "Audio"
	ClassDocument                               = "Document"
	ClassPhoto                                  = "Photo"
	ClassSticker                                = "Sticker"
	ClassVideo                                  = "Video"
	ClassVideoNote                              = "VideoNote"
	ClassVoiceNote                              = "VoiceNote"
	ClassAnimatedEmoji                          = "AnimatedEmoji"
	ClassContact                                = "Contact"
	ClassLocation                               = "Location"
	ClassVenue                                  = "Venue"
	ClassGame                                   = "Game"
	ClassPoll                                   = "Poll"
	ClassProfilePhoto                           = "ProfilePhoto"
	ClassChatPhotoInfo                          = "ChatPhotoInfo"
	ClassBotCommand                             = "BotCommand"
	ClassBotCommands                            = "BotCommands"
	ClassBotMenuButton                          = "BotMenuButton"
	ClassChatLocation                           = "ChatLocation"
	ClassAnimatedChatPhoto                      = "AnimatedChatPhoto"
	ClassChatPhoto                              = "ChatPhoto"
	ClassChatPhotos                             = "ChatPhotos"
	ClassChatPermissions                        = "ChatPermissions"
	ClassChatAdministratorRights                = "ChatAdministratorRights"
	ClassUser                                   = "User"
	ClassBotInfo                                = "BotInfo"
	ClassUserFullInfo                           = "UserFullInfo"
	ClassUsers                                  = "Users"
	ClassChatAdministrator                      = "ChatAdministrator"
	ClassChatAdministrators                     = "ChatAdministrators"
	ClassChatMember                             = "ChatMember"
	ClassChatMembers                            = "ChatMembers"
	ClassChatInviteLink                         = "ChatInviteLink"
	ClassChatInviteLinks                        = "ChatInviteLinks"
	ClassChatInviteLinkCount                    = "ChatInviteLinkCount"
	ClassChatInviteLinkCounts                   = "ChatInviteLinkCounts"
	ClassChatInviteLinkMember                   = "ChatInviteLinkMember"
	ClassChatInviteLinkMembers                  = "ChatInviteLinkMembers"
	ClassChatInviteLinkInfo                     = "ChatInviteLinkInfo"
	ClassChatJoinRequest                        = "ChatJoinRequest"
	ClassChatJoinRequests                       = "ChatJoinRequests"
	ClassChatJoinRequestsInfo                   = "ChatJoinRequestsInfo"
	ClassBasicGroup                             = "BasicGroup"
	ClassBasicGroupFullInfo                     = "BasicGroupFullInfo"
	ClassSupergroup                             = "Supergroup"
	ClassSupergroupFullInfo                     = "SupergroupFullInfo"
	ClassSecretChat                             = "SecretChat"
	ClassMessageSenders                         = "MessageSenders"
	ClassMessageForwardInfo                     = "MessageForwardInfo"
	ClassMessageReplyInfo                       = "MessageReplyInfo"
	ClassMessageReaction                        = "MessageReaction"
	ClassMessageInteractionInfo                 = "MessageInteractionInfo"
	ClassUnreadReaction                         = "UnreadReaction"
	ClassMessage                                = "Message"
	ClassMessages                               = "Messages"
	ClassFoundMessages                          = "FoundMessages"
	ClassMessagePosition                        = "MessagePosition"
	ClassMessagePositions                       = "MessagePositions"
	ClassMessageCalendarDay                     = "MessageCalendarDay"
	ClassMessageCalendar                        = "MessageCalendar"
	ClassSponsoredMessage                       = "SponsoredMessage"
	ClassFileDownload                           = "FileDownload"
	ClassDownloadedFileCounts                   = "DownloadedFileCounts"
	ClassFoundFileDownloads                     = "FoundFileDownloads"
	ClassChatNotificationSettings               = "ChatNotificationSettings"
	ClassScopeNotificationSettings              = "ScopeNotificationSettings"
	ClassDraftMessage                           = "DraftMessage"
	ClassChatFilter                             = "ChatFilter"
	ClassChatFilterInfo                         = "ChatFilterInfo"
	ClassRecommendedChatFilter                  = "RecommendedChatFilter"
	ClassRecommendedChatFilters                 = "RecommendedChatFilters"
	ClassChatLists                              = "ChatLists"
	ClassChatPosition                           = "ChatPosition"
	ClassVideoChat                              = "VideoChat"
	ClassChat                                   = "Chat"
	ClassChats                                  = "Chats"
	ClassChatNearby                             = "ChatNearby"
	ClassChatsNearby                            = "ChatsNearby"
	ClassKeyboardButton                         = "KeyboardButton"
	ClassInlineKeyboardButton                   = "InlineKeyboardButton"
	ClassWebAppInfo                             = "WebAppInfo"
	ClassMessageThreadInfo                      = "MessageThreadInfo"
	ClassPageBlockCaption                       = "PageBlockCaption"
	ClassPageBlockListItem                      = "PageBlockListItem"
	ClassPageBlockTableCell                     = "PageBlockTableCell"
	ClassPageBlockRelatedArticle                = "PageBlockRelatedArticle"
	ClassWebPageInstantView                     = "WebPageInstantView"
	ClassWebPage                                = "WebPage"
	ClassCountryInfo                            = "CountryInfo"
	ClassCountries                              = "Countries"
	ClassPhoneNumberInfo                        = "PhoneNumberInfo"
	ClassBankCardActionOpenUrl                  = "BankCardActionOpenUrl"
	ClassBankCardInfo                           = "BankCardInfo"
	ClassAddress                                = "Address"
	ClassThemeParameters                        = "ThemeParameters"
	ClassLabeledPricePart                       = "LabeledPricePart"
	ClassInvoice                                = "Invoice"
	ClassOrderInfo                              = "OrderInfo"
	ClassShippingOption                         = "ShippingOption"
	ClassSavedCredentials                       = "SavedCredentials"
	ClassPaymentsProviderStripe                 = "PaymentsProviderStripe"
	ClassPaymentForm                            = "PaymentForm"
	ClassValidatedOrderInfo                     = "ValidatedOrderInfo"
	ClassPaymentResult                          = "PaymentResult"
	ClassPaymentReceipt                         = "PaymentReceipt"
	ClassDatedFile                              = "DatedFile"
	ClassDate                                   = "Date"
	ClassPersonalDetails                        = "PersonalDetails"
	ClassIdentityDocument                       = "IdentityDocument"
	ClassInputIdentityDocument                  = "InputIdentityDocument"
	ClassPersonalDocument                       = "PersonalDocument"
	ClassInputPersonalDocument                  = "InputPersonalDocument"
	ClassPassportElements                       = "PassportElements"
	ClassPassportElementError                   = "PassportElementError"
	ClassPassportSuitableElement                = "PassportSuitableElement"
	ClassPassportRequiredElement                = "PassportRequiredElement"
	ClassPassportAuthorizationForm              = "PassportAuthorizationForm"
	ClassPassportElementsWithErrors             = "PassportElementsWithErrors"
	ClassEncryptedCredentials                   = "EncryptedCredentials"
	ClassEncryptedPassportElement               = "EncryptedPassportElement"
	ClassInputPassportElementError              = "InputPassportElementError"
	ClassInputThumbnail                         = "InputThumbnail"
	ClassMessageSendOptions                     = "MessageSendOptions"
	ClassMessageCopyOptions                     = "MessageCopyOptions"
	ClassStickers                               = "Stickers"
	ClassEmojis                                 = "Emojis"
	ClassStickerSet                             = "StickerSet"
	ClassStickerSetInfo                         = "StickerSetInfo"
	ClassStickerSets                            = "StickerSets"
	ClassCallProtocol                           = "CallProtocol"
	ClassCallServer                             = "CallServer"
	ClassCallId                                 = "CallId"
	ClassGroupCallId                            = "GroupCallId"
	ClassGroupCallStream                        = "GroupCallStream"
	ClassGroupCallStreams                       = "GroupCallStreams"
	ClassRtmpUrl                                = "RtmpUrl"
	ClassGroupCallRecentSpeaker                 = "GroupCallRecentSpeaker"
	ClassGroupCall                              = "GroupCall"
	ClassGroupCallVideoSourceGroup              = "GroupCallVideoSourceGroup"
	ClassGroupCallParticipantVideoInfo          = "GroupCallParticipantVideoInfo"
	ClassGroupCallParticipant                   = "GroupCallParticipant"
	ClassCall                                   = "Call"
	ClassPhoneNumberAuthenticationSettings      = "PhoneNumberAuthenticationSettings"
	ClassAddedReaction                          = "AddedReaction"
	ClassAddedReactions                         = "AddedReactions"
	ClassAvailableReactions                     = "AvailableReactions"
	ClassReaction                               = "Reaction"
	ClassAnimations                             = "Animations"
	ClassImportedContacts                       = "ImportedContacts"
	ClassAttachmentMenuBotColor                 = "AttachmentMenuBotColor"
	ClassAttachmentMenuBot                      = "AttachmentMenuBot"
	ClassSentWebAppMessage                      = "SentWebAppMessage"
	ClassHttpUrl                                = "HttpUrl"
	ClassInlineQueryResults                     = "InlineQueryResults"
	ClassCallbackQueryAnswer                    = "CallbackQueryAnswer"
	ClassCustomRequestResult                    = "CustomRequestResult"
	ClassGameHighScore                          = "GameHighScore"
	ClassGameHighScores                         = "GameHighScores"
	ClassChatEvent                              = "ChatEvent"
	ClassChatEvents                             = "ChatEvents"
	ClassChatEventLogFilters                    = "ChatEventLogFilters"
	ClassLanguagePackString                     = "LanguagePackString"
	ClassLanguagePackStrings                    = "LanguagePackStrings"
	ClassLanguagePackInfo                       = "LanguagePackInfo"
	ClassLocalizationTargetInfo                 = "LocalizationTargetInfo"
	ClassPushReceiverId                         = "PushReceiverId"
	ClassBackground                             = "Background"
	ClassBackgrounds                            = "Backgrounds"
	ClassThemeSettings                          = "ThemeSettings"
	ClassChatTheme                              = "ChatTheme"
	ClassHashtags                               = "Hashtags"
	ClassNotificationSound                      = "NotificationSound"
	ClassNotificationSounds                     = "NotificationSounds"
	ClassNotification                           = "Notification"
	ClassNotificationGroup                      = "NotificationGroup"
	ClassJsonObjectMember                       = "JsonObjectMember"
	ClassUserPrivacySettingRules                = "UserPrivacySettingRules"
	ClassAccountTtl                             = "AccountTtl"
	ClassSession                                = "Session"
	ClassSessions                               = "Sessions"
	ClassConnectedWebsite                       = "ConnectedWebsite"
	ClassConnectedWebsites                      = "ConnectedWebsites"
	ClassMessageLink                            = "MessageLink"
	ClassMessageLinkInfo                        = "MessageLinkInfo"
	ClassFilePart                               = "FilePart"
	ClassStorageStatisticsByFileType            = "StorageStatisticsByFileType"
	ClassStorageStatisticsByChat                = "StorageStatisticsByChat"
	ClassStorageStatistics                      = "StorageStatistics"
	ClassStorageStatisticsFast                  = "StorageStatisticsFast"
	ClassDatabaseStatistics                     = "DatabaseStatistics"
	ClassNetworkStatistics                      = "NetworkStatistics"
	ClassAutoDownloadSettings                   = "AutoDownloadSettings"
	ClassAutoDownloadSettingsPresets            = "AutoDownloadSettingsPresets"
	ClassTMeUrl                                 = "TMeUrl"
	ClassTMeUrls                                = "TMeUrls"
	ClassCount                                  = "Count"
	ClassText                                   = "Text"
	ClassSeconds                                = "Seconds"
	ClassDeepLinkInfo                           = "DeepLinkInfo"
	ClassProxy                                  = "Proxy"
	ClassProxies                                = "Proxies"
	ClassInputSticker                           = "InputSticker"
	ClassDateRange                              = "DateRange"
	ClassStatisticalValue                       = "StatisticalValue"
	ClassChatStatisticsMessageInteractionInfo   = "ChatStatisticsMessageInteractionInfo"
	ClassChatStatisticsMessageSenderInfo        = "ChatStatisticsMessageSenderInfo"
	ClassChatStatisticsAdministratorActionsInfo = "ChatStatisticsAdministratorActionsInfo"
	ClassChatStatisticsInviterInfo              = "ChatStatisticsInviterInfo"
	ClassMessageStatistics                      = "MessageStatistics"
	ClassPoint                                  = "Point"
	ClassUpdates                                = "Updates"
	ClassLogVerbosityLevel                      = "LogVerbosityLevel"
	ClassLogTags                                = "LogTags"
	ClassTestInt                                = "TestInt"
	ClassTestString                             = "TestString"
	ClassTestBytes                              = "TestBytes"
	ClassTestVectorInt                          = "TestVectorInt"
	ClassTestVectorIntObject                    = "TestVectorIntObject"
	ClassTestVectorString                       = "TestVectorString"
	ClassTestVectorStringObject                 = "TestVectorStringObject"
)
View Source
const (
	TypeError                                           = "error"
	TypeOk                                              = "ok"
	TypeTdlibParameters                                 = "tdlibParameters"
	TypeAuthenticationCodeTypeTelegramMessage           = "authenticationCodeTypeTelegramMessage"
	TypeAuthenticationCodeTypeSms                       = "authenticationCodeTypeSms"
	TypeAuthenticationCodeTypeCall                      = "authenticationCodeTypeCall"
	TypeAuthenticationCodeTypeFlashCall                 = "authenticationCodeTypeFlashCall"
	TypeAuthenticationCodeTypeMissedCall                = "authenticationCodeTypeMissedCall"
	TypeAuthenticationCodeInfo                          = "authenticationCodeInfo"
	TypeEmailAddressAuthenticationCodeInfo              = "emailAddressAuthenticationCodeInfo"
	TypeTextEntity                                      = "textEntity"
	TypeTextEntities                                    = "textEntities"
	TypeFormattedText                                   = "formattedText"
	TypeTermsOfService                                  = "termsOfService"
	TypeAuthorizationStateWaitTdlibParameters           = "authorizationStateWaitTdlibParameters"
	TypeAuthorizationStateWaitEncryptionKey             = "authorizationStateWaitEncryptionKey"
	TypeAuthorizationStateWaitPhoneNumber               = "authorizationStateWaitPhoneNumber"
	TypeAuthorizationStateWaitCode                      = "authorizationStateWaitCode"
	TypeAuthorizationStateWaitOtherDeviceConfirmation   = "authorizationStateWaitOtherDeviceConfirmation"
	TypeAuthorizationStateWaitRegistration              = "authorizationStateWaitRegistration"
	TypeAuthorizationStateWaitPassword                  = "authorizationStateWaitPassword"
	TypeAuthorizationStateReady                         = "authorizationStateReady"
	TypeAuthorizationStateLoggingOut                    = "authorizationStateLoggingOut"
	TypeAuthorizationStateClosing                       = "authorizationStateClosing"
	TypeAuthorizationStateClosed                        = "authorizationStateClosed"
	TypePasswordState                                   = "passwordState"
	TypeRecoveryEmailAddress                            = "recoveryEmailAddress"
	TypeTemporaryPasswordState                          = "temporaryPasswordState"
	TypeLocalFile                                       = "localFile"
	TypeRemoteFile                                      = "remoteFile"
	TypeFile                                            = "file"
	TypeInputFileId                                     = "inputFileId"
	TypeInputFileRemote                                 = "inputFileRemote"
	TypeInputFileLocal                                  = "inputFileLocal"
	TypeInputFileGenerated                              = "inputFileGenerated"
	TypePhotoSize                                       = "photoSize"
	TypeMinithumbnail                                   = "minithumbnail"
	TypeThumbnailFormatJpeg                             = "thumbnailFormatJpeg"
	TypeThumbnailFormatGif                              = "thumbnailFormatGif"
	TypeThumbnailFormatMpeg4                            = "thumbnailFormatMpeg4"
	TypeThumbnailFormatPng                              = "thumbnailFormatPng"
	TypeThumbnailFormatTgs                              = "thumbnailFormatTgs"
	TypeThumbnailFormatWebm                             = "thumbnailFormatWebm"
	TypeThumbnailFormatWebp                             = "thumbnailFormatWebp"
	TypeThumbnail                                       = "thumbnail"
	TypeMaskPointForehead                               = "maskPointForehead"
	TypeMaskPointEyes                                   = "maskPointEyes"
	TypeMaskPointMouth                                  = "maskPointMouth"
	TypeMaskPointChin                                   = "maskPointChin"
	TypeMaskPosition                                    = "maskPosition"
	TypeStickerTypeStatic                               = "stickerTypeStatic"
	TypeStickerTypeAnimated                             = "stickerTypeAnimated"
	TypeStickerTypeVideo                                = "stickerTypeVideo"
	TypeStickerTypeMask                                 = "stickerTypeMask"
	TypeClosedVectorPath                                = "closedVectorPath"
	TypePollOption                                      = "pollOption"
	TypePollTypeRegular                                 = "pollTypeRegular"
	TypePollTypeQuiz                                    = "pollTypeQuiz"
	TypeAnimation                                       = "animation"
	TypeAudio                                           = "audio"
	TypeDocument                                        = "document"
	TypePhoto                                           = "photo"
	TypeSticker                                         = "sticker"
	TypeVideo                                           = "video"
	TypeVideoNote                                       = "videoNote"
	TypeVoiceNote                                       = "voiceNote"
	TypeAnimatedEmoji                                   = "animatedEmoji"
	TypeContact                                         = "contact"
	TypeLocation                                        = "location"
	TypeVenue                                           = "venue"
	TypeGame                                            = "game"
	TypePoll                                            = "poll"
	TypeProfilePhoto                                    = "profilePhoto"
	TypeChatPhotoInfo                                   = "chatPhotoInfo"
	TypeUserTypeRegular                                 = "userTypeRegular"
	TypeUserTypeDeleted                                 = "userTypeDeleted"
	TypeUserTypeBot                                     = "userTypeBot"
	TypeUserTypeUnknown                                 = "userTypeUnknown"
	TypeBotCommand                                      = "botCommand"
	TypeBotCommands                                     = "botCommands"
	TypeBotMenuButton                                   = "botMenuButton"
	TypeChatLocation                                    = "chatLocation"
	TypeAnimatedChatPhoto                               = "animatedChatPhoto"
	TypeChatPhoto                                       = "chatPhoto"
	TypeChatPhotos                                      = "chatPhotos"
	TypeInputChatPhotoPrevious                          = "inputChatPhotoPrevious"
	TypeInputChatPhotoStatic                            = "inputChatPhotoStatic"
	TypeInputChatPhotoAnimation                         = "inputChatPhotoAnimation"
	TypeChatPermissions                                 = "chatPermissions"
	TypeChatAdministratorRights                         = "chatAdministratorRights"
	TypeUser                                            = "user"
	TypeBotInfo                                         = "botInfo"
	TypeUserFullInfo                                    = "userFullInfo"
	TypeUsers                                           = "users"
	TypeChatAdministrator                               = "chatAdministrator"
	TypeChatAdministrators                              = "chatAdministrators"
	TypeChatMemberStatusCreator                         = "chatMemberStatusCreator"
	TypeChatMemberStatusAdministrator                   = "chatMemberStatusAdministrator"
	TypeChatMemberStatusMember                          = "chatMemberStatusMember"
	TypeChatMemberStatusRestricted                      = "chatMemberStatusRestricted"
	TypeChatMemberStatusLeft                            = "chatMemberStatusLeft"
	TypeChatMemberStatusBanned                          = "chatMemberStatusBanned"
	TypeChatMember                                      = "chatMember"
	TypeChatMembers                                     = "chatMembers"
	TypeChatMembersFilterContacts                       = "chatMembersFilterContacts"
	TypeChatMembersFilterAdministrators                 = "chatMembersFilterAdministrators"
	TypeChatMembersFilterMembers                        = "chatMembersFilterMembers"
	TypeChatMembersFilterMention                        = "chatMembersFilterMention"
	TypeChatMembersFilterRestricted                     = "chatMembersFilterRestricted"
	TypeChatMembersFilterBanned                         = "chatMembersFilterBanned"
	TypeChatMembersFilterBots                           = "chatMembersFilterBots"
	TypeSupergroupMembersFilterRecent                   = "supergroupMembersFilterRecent"
	TypeSupergroupMembersFilterContacts                 = "supergroupMembersFilterContacts"
	TypeSupergroupMembersFilterAdministrators           = "supergroupMembersFilterAdministrators"
	TypeSupergroupMembersFilterSearch                   = "supergroupMembersFilterSearch"
	TypeSupergroupMembersFilterRestricted               = "supergroupMembersFilterRestricted"
	TypeSupergroupMembersFilterBanned                   = "supergroupMembersFilterBanned"
	TypeSupergroupMembersFilterMention                  = "supergroupMembersFilterMention"
	TypeSupergroupMembersFilterBots                     = "supergroupMembersFilterBots"
	TypeChatInviteLink                                  = "chatInviteLink"
	TypeChatInviteLinks                                 = "chatInviteLinks"
	TypeChatInviteLinkCount                             = "chatInviteLinkCount"
	TypeChatInviteLinkCounts                            = "chatInviteLinkCounts"
	TypeChatInviteLinkMember                            = "chatInviteLinkMember"
	TypeChatInviteLinkMembers                           = "chatInviteLinkMembers"
	TypeChatInviteLinkInfo                              = "chatInviteLinkInfo"
	TypeChatJoinRequest                                 = "chatJoinRequest"
	TypeChatJoinRequests                                = "chatJoinRequests"
	TypeChatJoinRequestsInfo                            = "chatJoinRequestsInfo"
	TypeBasicGroup                                      = "basicGroup"
	TypeBasicGroupFullInfo                              = "basicGroupFullInfo"
	TypeSupergroup                                      = "supergroup"
	TypeSupergroupFullInfo                              = "supergroupFullInfo"
	TypeSecretChatStatePending                          = "secretChatStatePending"
	TypeSecretChatStateReady                            = "secretChatStateReady"
	TypeSecretChatStateClosed                           = "secretChatStateClosed"
	TypeSecretChat                                      = "secretChat"
	TypeMessageSenderUser                               = "messageSenderUser"
	TypeMessageSenderChat                               = "messageSenderChat"
	TypeMessageSenders                                  = "messageSenders"
	TypeMessageForwardOriginUser                        = "messageForwardOriginUser"
	TypeMessageForwardOriginChat                        = "messageForwardOriginChat"
	TypeMessageForwardOriginHiddenUser                  = "messageForwardOriginHiddenUser"
	TypeMessageForwardOriginChannel                     = "messageForwardOriginChannel"
	TypeMessageForwardOriginMessageImport               = "messageForwardOriginMessageImport"
	TypeMessageForwardInfo                              = "messageForwardInfo"
	TypeMessageReplyInfo                                = "messageReplyInfo"
	TypeMessageReaction                                 = "messageReaction"
	TypeMessageInteractionInfo                          = "messageInteractionInfo"
	TypeUnreadReaction                                  = "unreadReaction"
	TypeMessageSendingStatePending                      = "messageSendingStatePending"
	TypeMessageSendingStateFailed                       = "messageSendingStateFailed"
	TypeMessage                                         = "message"
	TypeMessages                                        = "messages"
	TypeFoundMessages                                   = "foundMessages"
	TypeMessagePosition                                 = "messagePosition"
	TypeMessagePositions                                = "messagePositions"
	TypeMessageCalendarDay                              = "messageCalendarDay"
	TypeMessageCalendar                                 = "messageCalendar"
	TypeSponsoredMessage                                = "sponsoredMessage"
	TypeFileDownload                                    = "fileDownload"
	TypeDownloadedFileCounts                            = "downloadedFileCounts"
	TypeFoundFileDownloads                              = "foundFileDownloads"
	TypeNotificationSettingsScopePrivateChats           = "notificationSettingsScopePrivateChats"
	TypeNotificationSettingsScopeGroupChats             = "notificationSettingsScopeGroupChats"
	TypeNotificationSettingsScopeChannelChats           = "notificationSettingsScopeChannelChats"
	TypeChatNotificationSettings                        = "chatNotificationSettings"
	TypeScopeNotificationSettings                       = "scopeNotificationSettings"
	TypeDraftMessage                                    = "draftMessage"
	TypeChatTypePrivate                                 = "chatTypePrivate"
	TypeChatTypeBasicGroup                              = "chatTypeBasicGroup"
	TypeChatTypeSupergroup                              = "chatTypeSupergroup"
	TypeChatTypeSecret                                  = "chatTypeSecret"
	TypeChatFilter                                      = "chatFilter"
	TypeChatFilterInfo                                  = "chatFilterInfo"
	TypeRecommendedChatFilter                           = "recommendedChatFilter"
	TypeRecommendedChatFilters                          = "recommendedChatFilters"
	TypeChatListMain                                    = "chatListMain"
	TypeChatListArchive                                 = "chatListArchive"
	TypeChatListFilter                                  = "chatListFilter"
	TypeChatLists                                       = "chatLists"
	TypeChatSourceMtprotoProxy                          = "chatSourceMtprotoProxy"
	TypeChatSourcePublicServiceAnnouncement             = "chatSourcePublicServiceAnnouncement"
	TypeChatPosition                                    = "chatPosition"
	TypeVideoChat                                       = "videoChat"
	TypeChat                                            = "chat"
	TypeChats                                           = "chats"
	TypeChatNearby                                      = "chatNearby"
	TypeChatsNearby                                     = "chatsNearby"
	TypePublicChatTypeHasUsername                       = "publicChatTypeHasUsername"
	TypePublicChatTypeIsLocationBased                   = "publicChatTypeIsLocationBased"
	TypeChatActionBarReportSpam                         = "chatActionBarReportSpam"
	TypeChatActionBarReportUnrelatedLocation            = "chatActionBarReportUnrelatedLocation"
	TypeChatActionBarInviteMembers                      = "chatActionBarInviteMembers"
	TypeChatActionBarReportAddBlock                     = "chatActionBarReportAddBlock"
	TypeChatActionBarAddContact                         = "chatActionBarAddContact"
	TypeChatActionBarSharePhoneNumber                   = "chatActionBarSharePhoneNumber"
	TypeChatActionBarJoinRequest                        = "chatActionBarJoinRequest"
	TypeKeyboardButtonTypeText                          = "keyboardButtonTypeText"
	TypeKeyboardButtonTypeRequestPhoneNumber            = "keyboardButtonTypeRequestPhoneNumber"
	TypeKeyboardButtonTypeRequestLocation               = "keyboardButtonTypeRequestLocation"
	TypeKeyboardButtonTypeRequestPoll                   = "keyboardButtonTypeRequestPoll"
	TypeKeyboardButtonTypeWebApp                        = "keyboardButtonTypeWebApp"
	TypeKeyboardButton                                  = "keyboardButton"
	TypeInlineKeyboardButtonTypeUrl                     = "inlineKeyboardButtonTypeUrl"
	TypeInlineKeyboardButtonTypeLoginUrl                = "inlineKeyboardButtonTypeLoginUrl"
	TypeInlineKeyboardButtonTypeWebApp                  = "inlineKeyboardButtonTypeWebApp"
	TypeInlineKeyboardButtonTypeCallback                = "inlineKeyboardButtonTypeCallback"
	TypeInlineKeyboardButtonTypeCallbackWithPassword    = "inlineKeyboardButtonTypeCallbackWithPassword"
	TypeInlineKeyboardButtonTypeCallbackGame            = "inlineKeyboardButtonTypeCallbackGame"
	TypeInlineKeyboardButtonTypeSwitchInline            = "inlineKeyboardButtonTypeSwitchInline"
	TypeInlineKeyboardButtonTypeBuy                     = "inlineKeyboardButtonTypeBuy"
	TypeInlineKeyboardButtonTypeUser                    = "inlineKeyboardButtonTypeUser"
	TypeInlineKeyboardButton                            = "inlineKeyboardButton"
	TypeReplyMarkupRemoveKeyboard                       = "replyMarkupRemoveKeyboard"
	TypeReplyMarkupForceReply                           = "replyMarkupForceReply"
	TypeReplyMarkupShowKeyboard                         = "replyMarkupShowKeyboard"
	TypeReplyMarkupInlineKeyboard                       = "replyMarkupInlineKeyboard"
	TypeLoginUrlInfoOpen                                = "loginUrlInfoOpen"
	TypeLoginUrlInfoRequestConfirmation                 = "loginUrlInfoRequestConfirmation"
	TypeWebAppInfo                                      = "webAppInfo"
	TypeMessageThreadInfo                               = "messageThreadInfo"
	TypeRichTextPlain                                   = "richTextPlain"
	TypeRichTextBold                                    = "richTextBold"
	TypeRichTextItalic                                  = "richTextItalic"
	TypeRichTextUnderline                               = "richTextUnderline"
	TypeRichTextStrikethrough                           = "richTextStrikethrough"
	TypeRichTextFixed                                   = "richTextFixed"
	TypeRichTextUrl                                     = "richTextUrl"
	TypeRichTextEmailAddress                            = "richTextEmailAddress"
	TypeRichTextSubscript                               = "richTextSubscript"
	TypeRichTextSuperscript                             = "richTextSuperscript"
	TypeRichTextMarked                                  = "richTextMarked"
	TypeRichTextPhoneNumber                             = "richTextPhoneNumber"
	TypeRichTextIcon                                    = "richTextIcon"
	TypeRichTextReference                               = "richTextReference"
	TypeRichTextAnchor                                  = "richTextAnchor"
	TypeRichTextAnchorLink                              = "richTextAnchorLink"
	TypeRichTexts                                       = "richTexts"
	TypePageBlockCaption                                = "pageBlockCaption"
	TypePageBlockListItem                               = "pageBlockListItem"
	TypePageBlockHorizontalAlignmentLeft                = "pageBlockHorizontalAlignmentLeft"
	TypePageBlockHorizontalAlignmentCenter              = "pageBlockHorizontalAlignmentCenter"
	TypePageBlockHorizontalAlignmentRight               = "pageBlockHorizontalAlignmentRight"
	TypePageBlockVerticalAlignmentTop                   = "pageBlockVerticalAlignmentTop"
	TypePageBlockVerticalAlignmentMiddle                = "pageBlockVerticalAlignmentMiddle"
	TypePageBlockVerticalAlignmentBottom                = "pageBlockVerticalAlignmentBottom"
	TypePageBlockTableCell                              = "pageBlockTableCell"
	TypePageBlockRelatedArticle                         = "pageBlockRelatedArticle"
	TypePageBlockTitle                                  = "pageBlockTitle"
	TypePageBlockSubtitle                               = "pageBlockSubtitle"
	TypePageBlockAuthorDate                             = "pageBlockAuthorDate"
	TypePageBlockHeader                                 = "pageBlockHeader"
	TypePageBlockSubheader                              = "pageBlockSubheader"
	TypePageBlockKicker                                 = "pageBlockKicker"
	TypePageBlockParagraph                              = "pageBlockParagraph"
	TypePageBlockPreformatted                           = "pageBlockPreformatted"
	TypePageBlockFooter                                 = "pageBlockFooter"
	TypePageBlockDivider                                = "pageBlockDivider"
	TypePageBlockAnchor                                 = "pageBlockAnchor"
	TypePageBlockList                                   = "pageBlockList"
	TypePageBlockBlockQuote                             = "pageBlockBlockQuote"
	TypePageBlockPullQuote                              = "pageBlockPullQuote"
	TypePageBlockAnimation                              = "pageBlockAnimation"
	TypePageBlockAudio                                  = "pageBlockAudio"
	TypePageBlockPhoto                                  = "pageBlockPhoto"
	TypePageBlockVideo                                  = "pageBlockVideo"
	TypePageBlockVoiceNote                              = "pageBlockVoiceNote"
	TypePageBlockCover                                  = "pageBlockCover"
	TypePageBlockEmbedded                               = "pageBlockEmbedded"
	TypePageBlockEmbeddedPost                           = "pageBlockEmbeddedPost"
	TypePageBlockCollage                                = "pageBlockCollage"
	TypePageBlockSlideshow                              = "pageBlockSlideshow"
	TypePageBlockChatLink                               = "pageBlockChatLink"
	TypePageBlockTable                                  = "pageBlockTable"
	TypePageBlockDetails                                = "pageBlockDetails"
	TypePageBlockRelatedArticles                        = "pageBlockRelatedArticles"
	TypePageBlockMap                                    = "pageBlockMap"
	TypeWebPageInstantView                              = "webPageInstantView"
	TypeWebPage                                         = "webPage"
	TypeCountryInfo                                     = "countryInfo"
	TypeCountries                                       = "countries"
	TypePhoneNumberInfo                                 = "phoneNumberInfo"
	TypeBankCardActionOpenUrl                           = "bankCardActionOpenUrl"
	TypeBankCardInfo                                    = "bankCardInfo"
	TypeAddress                                         = "address"
	TypeThemeParameters                                 = "themeParameters"
	TypeLabeledPricePart                                = "labeledPricePart"
	TypeInvoice                                         = "invoice"
	TypeOrderInfo                                       = "orderInfo"
	TypeShippingOption                                  = "shippingOption"
	TypeSavedCredentials                                = "savedCredentials"
	TypeInputCredentialsSaved                           = "inputCredentialsSaved"
	TypeInputCredentialsNew                             = "inputCredentialsNew"
	TypeInputCredentialsApplePay                        = "inputCredentialsApplePay"
	TypeInputCredentialsGooglePay                       = "inputCredentialsGooglePay"
	TypePaymentsProviderStripe                          = "paymentsProviderStripe"
	TypePaymentForm                                     = "paymentForm"
	TypeValidatedOrderInfo                              = "validatedOrderInfo"
	TypePaymentResult                                   = "paymentResult"
	TypePaymentReceipt                                  = "paymentReceipt"
	TypeDatedFile                                       = "datedFile"
	TypePassportElementTypePersonalDetails              = "passportElementTypePersonalDetails"
	TypePassportElementTypePassport                     = "passportElementTypePassport"
	TypePassportElementTypeDriverLicense                = "passportElementTypeDriverLicense"
	TypePassportElementTypeIdentityCard                 = "passportElementTypeIdentityCard"
	TypePassportElementTypeInternalPassport             = "passportElementTypeInternalPassport"
	TypePassportElementTypeAddress                      = "passportElementTypeAddress"
	TypePassportElementTypeUtilityBill                  = "passportElementTypeUtilityBill"
	TypePassportElementTypeBankStatement                = "passportElementTypeBankStatement"
	TypePassportElementTypeRentalAgreement              = "passportElementTypeRentalAgreement"
	TypePassportElementTypePassportRegistration         = "passportElementTypePassportRegistration"
	TypePassportElementTypeTemporaryRegistration        = "passportElementTypeTemporaryRegistration"
	TypePassportElementTypePhoneNumber                  = "passportElementTypePhoneNumber"
	TypePassportElementTypeEmailAddress                 = "passportElementTypeEmailAddress"
	TypeDate                                            = "date"
	TypePersonalDetails                                 = "personalDetails"
	TypeIdentityDocument                                = "identityDocument"
	TypeInputIdentityDocument                           = "inputIdentityDocument"
	TypePersonalDocument                                = "personalDocument"
	TypeInputPersonalDocument                           = "inputPersonalDocument"
	TypePassportElementPersonalDetails                  = "passportElementPersonalDetails"
	TypePassportElementPassport                         = "passportElementPassport"
	TypePassportElementDriverLicense                    = "passportElementDriverLicense"
	TypePassportElementIdentityCard                     = "passportElementIdentityCard"
	TypePassportElementInternalPassport                 = "passportElementInternalPassport"
	TypePassportElementAddress                          = "passportElementAddress"
	TypePassportElementUtilityBill                      = "passportElementUtilityBill"
	TypePassportElementBankStatement                    = "passportElementBankStatement"
	TypePassportElementRentalAgreement                  = "passportElementRentalAgreement"
	TypePassportElementPassportRegistration             = "passportElementPassportRegistration"
	TypePassportElementTemporaryRegistration            = "passportElementTemporaryRegistration"
	TypePassportElementPhoneNumber                      = "passportElementPhoneNumber"
	TypePassportElementEmailAddress                     = "passportElementEmailAddress"
	TypeInputPassportElementPersonalDetails             = "inputPassportElementPersonalDetails"
	TypeInputPassportElementPassport                    = "inputPassportElementPassport"
	TypeInputPassportElementDriverLicense               = "inputPassportElementDriverLicense"
	TypeInputPassportElementIdentityCard                = "inputPassportElementIdentityCard"
	TypeInputPassportElementInternalPassport            = "inputPassportElementInternalPassport"
	TypeInputPassportElementAddress                     = "inputPassportElementAddress"
	TypeInputPassportElementUtilityBill                 = "inputPassportElementUtilityBill"
	TypeInputPassportElementBankStatement               = "inputPassportElementBankStatement"
	TypeInputPassportElementRentalAgreement             = "inputPassportElementRentalAgreement"
	TypeInputPassportElementPassportRegistration        = "inputPassportElementPassportRegistration"
	TypeInputPassportElementTemporaryRegistration       = "inputPassportElementTemporaryRegistration"
	TypeInputPassportElementPhoneNumber                 = "inputPassportElementPhoneNumber"
	TypeInputPassportElementEmailAddress                = "inputPassportElementEmailAddress"
	TypePassportElements                                = "passportElements"
	TypePassportElementErrorSourceUnspecified           = "passportElementErrorSourceUnspecified"
	TypePassportElementErrorSourceDataField             = "passportElementErrorSourceDataField"
	TypePassportElementErrorSourceFrontSide             = "passportElementErrorSourceFrontSide"
	TypePassportElementErrorSourceReverseSide           = "passportElementErrorSourceReverseSide"
	TypePassportElementErrorSourceSelfie                = "passportElementErrorSourceSelfie"
	TypePassportElementErrorSourceTranslationFile       = "passportElementErrorSourceTranslationFile"
	TypePassportElementErrorSourceTranslationFiles      = "passportElementErrorSourceTranslationFiles"
	TypePassportElementErrorSourceFile                  = "passportElementErrorSourceFile"
	TypePassportElementErrorSourceFiles                 = "passportElementErrorSourceFiles"
	TypePassportElementError                            = "passportElementError"
	TypePassportSuitableElement                         = "passportSuitableElement"
	TypePassportRequiredElement                         = "passportRequiredElement"
	TypePassportAuthorizationForm                       = "passportAuthorizationForm"
	TypePassportElementsWithErrors                      = "passportElementsWithErrors"
	TypeEncryptedCredentials                            = "encryptedCredentials"
	TypeEncryptedPassportElement                        = "encryptedPassportElement"
	TypeInputPassportElementErrorSourceUnspecified      = "inputPassportElementErrorSourceUnspecified"
	TypeInputPassportElementErrorSourceDataField        = "inputPassportElementErrorSourceDataField"
	TypeInputPassportElementErrorSourceFrontSide        = "inputPassportElementErrorSourceFrontSide"
	TypeInputPassportElementErrorSourceReverseSide      = "inputPassportElementErrorSourceReverseSide"
	TypeInputPassportElementErrorSourceSelfie           = "inputPassportElementErrorSourceSelfie"
	TypeInputPassportElementErrorSourceTranslationFile  = "inputPassportElementErrorSourceTranslationFile"
	TypeInputPassportElementErrorSourceTranslationFiles = "inputPassportElementErrorSourceTranslationFiles"
	TypeInputPassportElementErrorSourceFile             = "inputPassportElementErrorSourceFile"
	TypeInputPassportElementErrorSourceFiles            = "inputPassportElementErrorSourceFiles"
	TypeInputPassportElementError                       = "inputPassportElementError"
	TypeMessageText                                     = "messageText"
	TypeMessageAnimation                                = "messageAnimation"
	TypeMessageAudio                                    = "messageAudio"
	TypeMessageDocument                                 = "messageDocument"
	TypeMessagePhoto                                    = "messagePhoto"
	TypeMessageExpiredPhoto                             = "messageExpiredPhoto"
	TypeMessageSticker                                  = "messageSticker"
	TypeMessageVideo                                    = "messageVideo"
	TypeMessageExpiredVideo                             = "messageExpiredVideo"
	TypeMessageVideoNote                                = "messageVideoNote"
	TypeMessageVoiceNote                                = "messageVoiceNote"
	TypeMessageLocation                                 = "messageLocation"
	TypeMessageVenue                                    = "messageVenue"
	TypeMessageContact                                  = "messageContact"
	TypeMessageAnimatedEmoji                            = "messageAnimatedEmoji"
	TypeMessageDice                                     = "messageDice"
	TypeMessageGame                                     = "messageGame"
	TypeMessagePoll                                     = "messagePoll"
	TypeMessageInvoice                                  = "messageInvoice"
	TypeMessageCall                                     = "messageCall"
	TypeMessageVideoChatScheduled                       = "messageVideoChatScheduled"
	TypeMessageVideoChatStarted                         = "messageVideoChatStarted"
	TypeMessageVideoChatEnded                           = "messageVideoChatEnded"
	TypeMessageInviteVideoChatParticipants              = "messageInviteVideoChatParticipants"
	TypeMessageBasicGroupChatCreate                     = "messageBasicGroupChatCreate"
	TypeMessageSupergroupChatCreate                     = "messageSupergroupChatCreate"
	TypeMessageChatChangeTitle                          = "messageChatChangeTitle"
	TypeMessageChatChangePhoto                          = "messageChatChangePhoto"
	TypeMessageChatDeletePhoto                          = "messageChatDeletePhoto"
	TypeMessageChatAddMembers                           = "messageChatAddMembers"
	TypeMessageChatJoinByLink                           = "messageChatJoinByLink"
	TypeMessageChatJoinByRequest                        = "messageChatJoinByRequest"
	TypeMessageChatDeleteMember                         = "messageChatDeleteMember"
	TypeMessageChatUpgradeTo                            = "messageChatUpgradeTo"
	TypeMessageChatUpgradeFrom                          = "messageChatUpgradeFrom"
	TypeMessagePinMessage                               = "messagePinMessage"
	TypeMessageScreenshotTaken                          = "messageScreenshotTaken"
	TypeMessageChatSetTheme                             = "messageChatSetTheme"
	TypeMessageChatSetTtl                               = "messageChatSetTtl"
	TypeMessageCustomServiceAction                      = "messageCustomServiceAction"
	TypeMessageGameScore                                = "messageGameScore"
	TypeMessagePaymentSuccessful                        = "messagePaymentSuccessful"
	TypeMessagePaymentSuccessfulBot                     = "messagePaymentSuccessfulBot"
	TypeMessageContactRegistered                        = "messageContactRegistered"
	TypeMessageWebsiteConnected                         = "messageWebsiteConnected"
	TypeMessageWebAppDataSent                           = "messageWebAppDataSent"
	TypeMessageWebAppDataReceived                       = "messageWebAppDataReceived"
	TypeMessagePassportDataSent                         = "messagePassportDataSent"
	TypeMessagePassportDataReceived                     = "messagePassportDataReceived"
	TypeMessageProximityAlertTriggered                  = "messageProximityAlertTriggered"
	TypeMessageUnsupported                              = "messageUnsupported"
	TypeTextEntityTypeMention                           = "textEntityTypeMention"
	TypeTextEntityTypeHashtag                           = "textEntityTypeHashtag"
	TypeTextEntityTypeCashtag                           = "textEntityTypeCashtag"
	TypeTextEntityTypeBotCommand                        = "textEntityTypeBotCommand"
	TypeTextEntityTypeUrl                               = "textEntityTypeUrl"
	TypeTextEntityTypeEmailAddress                      = "textEntityTypeEmailAddress"
	TypeTextEntityTypePhoneNumber                       = "textEntityTypePhoneNumber"
	TypeTextEntityTypeBankCardNumber                    = "textEntityTypeBankCardNumber"
	TypeTextEntityTypeBold                              = "textEntityTypeBold"
	TypeTextEntityTypeItalic                            = "textEntityTypeItalic"
	TypeTextEntityTypeUnderline                         = "textEntityTypeUnderline"
	TypeTextEntityTypeStrikethrough                     = "textEntityTypeStrikethrough"
	TypeTextEntityTypeSpoiler                           = "textEntityTypeSpoiler"
	TypeTextEntityTypeCode                              = "textEntityTypeCode"
	TypeTextEntityTypePre                               = "textEntityTypePre"
	TypeTextEntityTypePreCode                           = "textEntityTypePreCode"
	TypeTextEntityTypeTextUrl                           = "textEntityTypeTextUrl"
	TypeTextEntityTypeMentionName                       = "textEntityTypeMentionName"
	TypeTextEntityTypeMediaTimestamp                    = "textEntityTypeMediaTimestamp"
	TypeInputThumbnail                                  = "inputThumbnail"
	TypeMessageSchedulingStateSendAtDate                = "messageSchedulingStateSendAtDate"
	TypeMessageSchedulingStateSendWhenOnline            = "messageSchedulingStateSendWhenOnline"
	TypeMessageSendOptions                              = "messageSendOptions"
	TypeMessageCopyOptions                              = "messageCopyOptions"
	TypeInputMessageText                                = "inputMessageText"
	TypeInputMessageAnimation                           = "inputMessageAnimation"
	TypeInputMessageAudio                               = "inputMessageAudio"
	TypeInputMessageDocument                            = "inputMessageDocument"
	TypeInputMessagePhoto                               = "inputMessagePhoto"
	TypeInputMessageSticker                             = "inputMessageSticker"
	TypeInputMessageVideo                               = "inputMessageVideo"
	TypeInputMessageVideoNote                           = "inputMessageVideoNote"
	TypeInputMessageVoiceNote                           = "inputMessageVoiceNote"
	TypeInputMessageLocation                            = "inputMessageLocation"
	TypeInputMessageVenue                               = "inputMessageVenue"
	TypeInputMessageContact                             = "inputMessageContact"
	TypeInputMessageDice                                = "inputMessageDice"
	TypeInputMessageGame                                = "inputMessageGame"
	TypeInputMessageInvoice                             = "inputMessageInvoice"
	TypeInputMessagePoll                                = "inputMessagePoll"
	TypeInputMessageForwarded                           = "inputMessageForwarded"
	TypeSearchMessagesFilterEmpty                       = "searchMessagesFilterEmpty"
	TypeSearchMessagesFilterAnimation                   = "searchMessagesFilterAnimation"
	TypeSearchMessagesFilterAudio                       = "searchMessagesFilterAudio"
	TypeSearchMessagesFilterDocument                    = "searchMessagesFilterDocument"
	TypeSearchMessagesFilterPhoto                       = "searchMessagesFilterPhoto"
	TypeSearchMessagesFilterVideo                       = "searchMessagesFilterVideo"
	TypeSearchMessagesFilterVoiceNote                   = "searchMessagesFilterVoiceNote"
	TypeSearchMessagesFilterPhotoAndVideo               = "searchMessagesFilterPhotoAndVideo"
	TypeSearchMessagesFilterUrl                         = "searchMessagesFilterUrl"
	TypeSearchMessagesFilterChatPhoto                   = "searchMessagesFilterChatPhoto"
	TypeSearchMessagesFilterVideoNote                   = "searchMessagesFilterVideoNote"
	TypeSearchMessagesFilterVoiceAndVideoNote           = "searchMessagesFilterVoiceAndVideoNote"
	TypeSearchMessagesFilterMention                     = "searchMessagesFilterMention"
	TypeSearchMessagesFilterUnreadMention               = "searchMessagesFilterUnreadMention"
	TypeSearchMessagesFilterUnreadReaction              = "searchMessagesFilterUnreadReaction"
	TypeSearchMessagesFilterFailedToSend                = "searchMessagesFilterFailedToSend"
	TypeSearchMessagesFilterPinned                      = "searchMessagesFilterPinned"
	TypeChatActionTyping                                = "chatActionTyping"
	TypeChatActionRecordingVideo                        = "chatActionRecordingVideo"
	TypeChatActionUploadingVideo                        = "chatActionUploadingVideo"
	TypeChatActionRecordingVoiceNote                    = "chatActionRecordingVoiceNote"
	TypeChatActionUploadingVoiceNote                    = "chatActionUploadingVoiceNote"
	TypeChatActionUploadingPhoto                        = "chatActionUploadingPhoto"
	TypeChatActionUploadingDocument                     = "chatActionUploadingDocument"
	TypeChatActionChoosingSticker                       = "chatActionChoosingSticker"
	TypeChatActionChoosingLocation                      = "chatActionChoosingLocation"
	TypeChatActionChoosingContact                       = "chatActionChoosingContact"
	TypeChatActionStartPlayingGame                      = "chatActionStartPlayingGame"
	TypeChatActionRecordingVideoNote                    = "chatActionRecordingVideoNote"
	TypeChatActionUploadingVideoNote                    = "chatActionUploadingVideoNote"
	TypeChatActionWatchingAnimations                    = "chatActionWatchingAnimations"
	TypeChatActionCancel                                = "chatActionCancel"
	TypeUserStatusEmpty                                 = "userStatusEmpty"
	TypeUserStatusOnline                                = "userStatusOnline"
	TypeUserStatusOffline                               = "userStatusOffline"
	TypeUserStatusRecently                              = "userStatusRecently"
	TypeUserStatusLastWeek                              = "userStatusLastWeek"
	TypeUserStatusLastMonth                             = "userStatusLastMonth"
	TypeStickers                                        = "stickers"
	TypeEmojis                                          = "emojis"
	TypeStickerSet                                      = "stickerSet"
	TypeStickerSetInfo                                  = "stickerSetInfo"
	TypeStickerSets                                     = "stickerSets"
	TypeCallDiscardReasonEmpty                          = "callDiscardReasonEmpty"
	TypeCallDiscardReasonMissed                         = "callDiscardReasonMissed"
	TypeCallDiscardReasonDeclined                       = "callDiscardReasonDeclined"
	TypeCallDiscardReasonDisconnected                   = "callDiscardReasonDisconnected"
	TypeCallDiscardReasonHungUp                         = "callDiscardReasonHungUp"
	TypeCallProtocol                                    = "callProtocol"
	TypeCallServerTypeTelegramReflector                 = "callServerTypeTelegramReflector"
	TypeCallServerTypeWebrtc                            = "callServerTypeWebrtc"
	TypeCallServer                                      = "callServer"
	TypeCallId                                          = "callId"
	TypeGroupCallId                                     = "groupCallId"
	TypeCallStatePending                                = "callStatePending"
	TypeCallStateExchangingKeys                         = "callStateExchangingKeys"
	TypeCallStateReady                                  = "callStateReady"
	TypeCallStateHangingUp                              = "callStateHangingUp"
	TypeCallStateDiscarded                              = "callStateDiscarded"
	TypeCallStateError                                  = "callStateError"
	TypeGroupCallVideoQualityThumbnail                  = "groupCallVideoQualityThumbnail"
	TypeGroupCallVideoQualityMedium                     = "groupCallVideoQualityMedium"
	TypeGroupCallVideoQualityFull                       = "groupCallVideoQualityFull"
	TypeGroupCallStream                                 = "groupCallStream"
	TypeGroupCallStreams                                = "groupCallStreams"
	TypeRtmpUrl                                         = "rtmpUrl"
	TypeGroupCallRecentSpeaker                          = "groupCallRecentSpeaker"
	TypeGroupCall                                       = "groupCall"
	TypeGroupCallVideoSourceGroup                       = "groupCallVideoSourceGroup"
	TypeGroupCallParticipantVideoInfo                   = "groupCallParticipantVideoInfo"
	TypeGroupCallParticipant                            = "groupCallParticipant"
	TypeCallProblemEcho                                 = "callProblemEcho"
	TypeCallProblemNoise                                = "callProblemNoise"
	TypeCallProblemInterruptions                        = "callProblemInterruptions"
	TypeCallProblemDistortedSpeech                      = "callProblemDistortedSpeech"
	TypeCallProblemSilentLocal                          = "callProblemSilentLocal"
	TypeCallProblemSilentRemote                         = "callProblemSilentRemote"
	TypeCallProblemDropped                              = "callProblemDropped"
	TypeCallProblemDistortedVideo                       = "callProblemDistortedVideo"
	TypeCallProblemPixelatedVideo                       = "callProblemPixelatedVideo"
	TypeCall                                            = "call"
	TypePhoneNumberAuthenticationSettings               = "phoneNumberAuthenticationSettings"
	TypeAddedReaction                                   = "addedReaction"
	TypeAddedReactions                                  = "addedReactions"
	TypeAvailableReactions                              = "availableReactions"
	TypeReaction                                        = "reaction"
	TypeAnimations                                      = "animations"
	TypeDiceStickersRegular                             = "diceStickersRegular"
	TypeDiceStickersSlotMachine                         = "diceStickersSlotMachine"
	TypeImportedContacts                                = "importedContacts"
	TypeAttachmentMenuBotColor                          = "attachmentMenuBotColor"
	TypeAttachmentMenuBot                               = "attachmentMenuBot"
	TypeSentWebAppMessage                               = "sentWebAppMessage"
	TypeHttpUrl                                         = "httpUrl"
	TypeInputInlineQueryResultAnimation                 = "inputInlineQueryResultAnimation"
	TypeInputInlineQueryResultArticle                   = "inputInlineQueryResultArticle"
	TypeInputInlineQueryResultAudio                     = "inputInlineQueryResultAudio"
	TypeInputInlineQueryResultContact                   = "inputInlineQueryResultContact"
	TypeInputInlineQueryResultDocument                  = "inputInlineQueryResultDocument"
	TypeInputInlineQueryResultGame                      = "inputInlineQueryResultGame"
	TypeInputInlineQueryResultLocation                  = "inputInlineQueryResultLocation"
	TypeInputInlineQueryResultPhoto                     = "inputInlineQueryResultPhoto"
	TypeInputInlineQueryResultSticker                   = "inputInlineQueryResultSticker"
	TypeInputInlineQueryResultVenue                     = "inputInlineQueryResultVenue"
	TypeInputInlineQueryResultVideo                     = "inputInlineQueryResultVideo"
	TypeInputInlineQueryResultVoiceNote                 = "inputInlineQueryResultVoiceNote"
	TypeInlineQueryResultArticle                        = "inlineQueryResultArticle"
	TypeInlineQueryResultContact                        = "inlineQueryResultContact"
	TypeInlineQueryResultLocation                       = "inlineQueryResultLocation"
	TypeInlineQueryResultVenue                          = "inlineQueryResultVenue"
	TypeInlineQueryResultGame                           = "inlineQueryResultGame"
	TypeInlineQueryResultAnimation                      = "inlineQueryResultAnimation"
	TypeInlineQueryResultAudio                          = "inlineQueryResultAudio"
	TypeInlineQueryResultDocument                       = "inlineQueryResultDocument"
	TypeInlineQueryResultPhoto                          = "inlineQueryResultPhoto"
	TypeInlineQueryResultSticker                        = "inlineQueryResultSticker"
	TypeInlineQueryResultVideo                          = "inlineQueryResultVideo"
	TypeInlineQueryResultVoiceNote                      = "inlineQueryResultVoiceNote"
	TypeInlineQueryResults                              = "inlineQueryResults"
	TypeCallbackQueryPayloadData                        = "callbackQueryPayloadData"
	TypeCallbackQueryPayloadDataWithPassword            = "callbackQueryPayloadDataWithPassword"
	TypeCallbackQueryPayloadGame                        = "callbackQueryPayloadGame"
	TypeCallbackQueryAnswer                             = "callbackQueryAnswer"
	TypeCustomRequestResult                             = "customRequestResult"
	TypeGameHighScore                                   = "gameHighScore"
	TypeGameHighScores                                  = "gameHighScores"
	TypeChatEventMessageEdited                          = "chatEventMessageEdited"
	TypeChatEventMessageDeleted                         = "chatEventMessageDeleted"
	TypeChatEventMessagePinned                          = "chatEventMessagePinned"
	TypeChatEventMessageUnpinned                        = "chatEventMessageUnpinned"
	TypeChatEventPollStopped                            = "chatEventPollStopped"
	TypeChatEventMemberJoined                           = "chatEventMemberJoined"
	TypeChatEventMemberJoinedByInviteLink               = "chatEventMemberJoinedByInviteLink"
	TypeChatEventMemberJoinedByRequest                  = "chatEventMemberJoinedByRequest"
	TypeChatEventMemberInvited                          = "chatEventMemberInvited"
	TypeChatEventMemberLeft                             = "chatEventMemberLeft"
	TypeChatEventMemberPromoted                         = "chatEventMemberPromoted"
	TypeChatEventMemberRestricted                       = "chatEventMemberRestricted"
	TypeChatEventAvailableReactionsChanged              = "chatEventAvailableReactionsChanged"
	TypeChatEventDescriptionChanged                     = "chatEventDescriptionChanged"
	TypeChatEventLinkedChatChanged                      = "chatEventLinkedChatChanged"
	TypeChatEventLocationChanged                        = "chatEventLocationChanged"
	TypeChatEventMessageTtlChanged                      = "chatEventMessageTtlChanged"
	TypeChatEventPermissionsChanged                     = "chatEventPermissionsChanged"
	TypeChatEventPhotoChanged                           = "chatEventPhotoChanged"
	TypeChatEventSlowModeDelayChanged                   = "chatEventSlowModeDelayChanged"
	TypeChatEventStickerSetChanged                      = "chatEventStickerSetChanged"
	TypeChatEventTitleChanged                           = "chatEventTitleChanged"
	TypeChatEventUsernameChanged                        = "chatEventUsernameChanged"
	TypeChatEventHasProtectedContentToggled             = "chatEventHasProtectedContentToggled"
	TypeChatEventInvitesToggled                         = "chatEventInvitesToggled"
	TypeChatEventIsAllHistoryAvailableToggled           = "chatEventIsAllHistoryAvailableToggled"
	TypeChatEventSignMessagesToggled                    = "chatEventSignMessagesToggled"
	TypeChatEventInviteLinkEdited                       = "chatEventInviteLinkEdited"
	TypeChatEventInviteLinkRevoked                      = "chatEventInviteLinkRevoked"
	TypeChatEventInviteLinkDeleted                      = "chatEventInviteLinkDeleted"
	TypeChatEventVideoChatCreated                       = "chatEventVideoChatCreated"
	TypeChatEventVideoChatEnded                         = "chatEventVideoChatEnded"
	TypeChatEventVideoChatMuteNewParticipantsToggled    = "chatEventVideoChatMuteNewParticipantsToggled"
	TypeChatEventVideoChatParticipantIsMutedToggled     = "chatEventVideoChatParticipantIsMutedToggled"
	TypeChatEventVideoChatParticipantVolumeLevelChanged = "chatEventVideoChatParticipantVolumeLevelChanged"
	TypeChatEvent                                       = "chatEvent"
	TypeChatEvents                                      = "chatEvents"
	TypeChatEventLogFilters                             = "chatEventLogFilters"
	TypeLanguagePackStringValueOrdinary                 = "languagePackStringValueOrdinary"
	TypeLanguagePackStringValuePluralized               = "languagePackStringValuePluralized"
	TypeLanguagePackStringValueDeleted                  = "languagePackStringValueDeleted"
	TypeLanguagePackString                              = "languagePackString"
	TypeLanguagePackStrings                             = "languagePackStrings"
	TypeLanguagePackInfo                                = "languagePackInfo"
	TypeLocalizationTargetInfo                          = "localizationTargetInfo"
	TypeDeviceTokenFirebaseCloudMessaging               = "deviceTokenFirebaseCloudMessaging"
	TypeDeviceTokenApplePush                            = "deviceTokenApplePush"
	TypeDeviceTokenApplePushVoIP                        = "deviceTokenApplePushVoIP"
	TypeDeviceTokenWindowsPush                          = "deviceTokenWindowsPush"
	TypeDeviceTokenMicrosoftPush                        = "deviceTokenMicrosoftPush"
	TypeDeviceTokenMicrosoftPushVoIP                    = "deviceTokenMicrosoftPushVoIP"
	TypeDeviceTokenWebPush                              = "deviceTokenWebPush"
	TypeDeviceTokenSimplePush                           = "deviceTokenSimplePush"
	TypeDeviceTokenUbuntuPush                           = "deviceTokenUbuntuPush"
	TypeDeviceTokenBlackBerryPush                       = "deviceTokenBlackBerryPush"
	TypeDeviceTokenTizenPush                            = "deviceTokenTizenPush"
	TypePushReceiverId                                  = "pushReceiverId"
	TypeBackgroundFillSolid                             = "backgroundFillSolid"
	TypeBackgroundFillGradient                          = "backgroundFillGradient"
	TypeBackgroundFillFreeformGradient                  = "backgroundFillFreeformGradient"
	TypeBackgroundTypeWallpaper                         = "backgroundTypeWallpaper"
	TypeBackgroundTypePattern                           = "backgroundTypePattern"
	TypeBackgroundTypeFill                              = "backgroundTypeFill"
	TypeBackground                                      = "background"
	TypeBackgrounds                                     = "backgrounds"
	TypeInputBackgroundLocal                            = "inputBackgroundLocal"
	TypeInputBackgroundRemote                           = "inputBackgroundRemote"
	TypeThemeSettings                                   = "themeSettings"
	TypeChatTheme                                       = "chatTheme"
	TypeHashtags                                        = "hashtags"
	TypeCanTransferOwnershipResultOk                    = "canTransferOwnershipResultOk"
	TypeCanTransferOwnershipResultPasswordNeeded        = "canTransferOwnershipResultPasswordNeeded"
	TypeCanTransferOwnershipResultPasswordTooFresh      = "canTransferOwnershipResultPasswordTooFresh"
	TypeCanTransferOwnershipResultSessionTooFresh       = "canTransferOwnershipResultSessionTooFresh"
	TypeCheckChatUsernameResultOk                       = "checkChatUsernameResultOk"
	TypeCheckChatUsernameResultUsernameInvalid          = "checkChatUsernameResultUsernameInvalid"
	TypeCheckChatUsernameResultUsernameOccupied         = "checkChatUsernameResultUsernameOccupied"
	TypeCheckChatUsernameResultPublicChatsTooMuch       = "checkChatUsernameResultPublicChatsTooMuch"
	TypeCheckChatUsernameResultPublicGroupsUnavailable  = "checkChatUsernameResultPublicGroupsUnavailable"
	TypeCheckStickerSetNameResultOk                     = "checkStickerSetNameResultOk"
	TypeCheckStickerSetNameResultNameInvalid            = "checkStickerSetNameResultNameInvalid"
	TypeCheckStickerSetNameResultNameOccupied           = "checkStickerSetNameResultNameOccupied"
	TypeResetPasswordResultOk                           = "resetPasswordResultOk"
	TypeResetPasswordResultPending                      = "resetPasswordResultPending"
	TypeResetPasswordResultDeclined                     = "resetPasswordResultDeclined"
	TypeMessageFileTypePrivate                          = "messageFileTypePrivate"
	TypeMessageFileTypeGroup                            = "messageFileTypeGroup"
	TypeMessageFileTypeUnknown                          = "messageFileTypeUnknown"
	TypePushMessageContentHidden                        = "pushMessageContentHidden"
	TypePushMessageContentAnimation                     = "pushMessageContentAnimation"
	TypePushMessageContentAudio                         = "pushMessageContentAudio"
	TypePushMessageContentContact                       = "pushMessageContentContact"
	TypePushMessageContentContactRegistered             = "pushMessageContentContactRegistered"
	TypePushMessageContentDocument                      = "pushMessageContentDocument"
	TypePushMessageContentGame                          = "pushMessageContentGame"
	TypePushMessageContentGameScore                     = "pushMessageContentGameScore"
	TypePushMessageContentInvoice                       = "pushMessageContentInvoice"
	TypePushMessageContentLocation                      = "pushMessageContentLocation"
	TypePushMessageContentPhoto                         = "pushMessageContentPhoto"
	TypePushMessageContentPoll                          = "pushMessageContentPoll"
	TypePushMessageContentScreenshotTaken               = "pushMessageContentScreenshotTaken"
	TypePushMessageContentSticker                       = "pushMessageContentSticker"
	TypePushMessageContentText                          = "pushMessageContentText"
	TypePushMessageContentVideo                         = "pushMessageContentVideo"
	TypePushMessageContentVideoNote                     = "pushMessageContentVideoNote"
	TypePushMessageContentVoiceNote                     = "pushMessageContentVoiceNote"
	TypePushMessageContentBasicGroupChatCreate          = "pushMessageContentBasicGroupChatCreate"
	TypePushMessageContentChatAddMembers                = "pushMessageContentChatAddMembers"
	TypePushMessageContentChatChangePhoto               = "pushMessageContentChatChangePhoto"
	TypePushMessageContentChatChangeTitle               = "pushMessageContentChatChangeTitle"
	TypePushMessageContentChatSetTheme                  = "pushMessageContentChatSetTheme"
	TypePushMessageContentChatDeleteMember              = "pushMessageContentChatDeleteMember"
	TypePushMessageContentChatJoinByLink                = "pushMessageContentChatJoinByLink"
	TypePushMessageContentChatJoinByRequest             = "pushMessageContentChatJoinByRequest"
	TypePushMessageContentMessageForwards               = "pushMessageContentMessageForwards"
	TypePushMessageContentMediaAlbum                    = "pushMessageContentMediaAlbum"
	TypeNotificationTypeNewMessage                      = "notificationTypeNewMessage"
	TypeNotificationTypeNewSecretChat                   = "notificationTypeNewSecretChat"
	TypeNotificationTypeNewCall                         = "notificationTypeNewCall"
	TypeNotificationTypeNewPushMessage                  = "notificationTypeNewPushMessage"
	TypeNotificationGroupTypeMessages                   = "notificationGroupTypeMessages"
	TypeNotificationGroupTypeMentions                   = "notificationGroupTypeMentions"
	TypeNotificationGroupTypeSecretChat                 = "notificationGroupTypeSecretChat"
	TypeNotificationGroupTypeCalls                      = "notificationGroupTypeCalls"
	TypeNotificationSound                               = "notificationSound"
	TypeNotificationSounds                              = "notificationSounds"
	TypeNotification                                    = "notification"
	TypeNotificationGroup                               = "notificationGroup"
	TypeOptionValueBoolean                              = "optionValueBoolean"
	TypeOptionValueEmpty                                = "optionValueEmpty"
	TypeOptionValueInteger                              = "optionValueInteger"
	TypeOptionValueString                               = "optionValueString"
	TypeJsonObjectMember                                = "jsonObjectMember"
	TypeJsonValueNull                                   = "jsonValueNull"
	TypeJsonValueBoolean                                = "jsonValueBoolean"
	TypeJsonValueNumber                                 = "jsonValueNumber"
	TypeJsonValueString                                 = "jsonValueString"
	TypeJsonValueArray                                  = "jsonValueArray"
	TypeJsonValueObject                                 = "jsonValueObject"
	TypeUserPrivacySettingRuleAllowAll                  = "userPrivacySettingRuleAllowAll"
	TypeUserPrivacySettingRuleAllowContacts             = "userPrivacySettingRuleAllowContacts"
	TypeUserPrivacySettingRuleAllowUsers                = "userPrivacySettingRuleAllowUsers"
	TypeUserPrivacySettingRuleAllowChatMembers          = "userPrivacySettingRuleAllowChatMembers"
	TypeUserPrivacySettingRuleRestrictAll               = "userPrivacySettingRuleRestrictAll"
	TypeUserPrivacySettingRuleRestrictContacts          = "userPrivacySettingRuleRestrictContacts"
	TypeUserPrivacySettingRuleRestrictUsers             = "userPrivacySettingRuleRestrictUsers"
	TypeUserPrivacySettingRuleRestrictChatMembers       = "userPrivacySettingRuleRestrictChatMembers"
	TypeUserPrivacySettingRules                         = "userPrivacySettingRules"
	TypeUserPrivacySettingShowStatus                    = "userPrivacySettingShowStatus"
	TypeUserPrivacySettingShowProfilePhoto              = "userPrivacySettingShowProfilePhoto"
	TypeUserPrivacySettingShowLinkInForwardedMessages   = "userPrivacySettingShowLinkInForwardedMessages"
	TypeUserPrivacySettingShowPhoneNumber               = "userPrivacySettingShowPhoneNumber"
	TypeUserPrivacySettingAllowChatInvites              = "userPrivacySettingAllowChatInvites"
	TypeUserPrivacySettingAllowCalls                    = "userPrivacySettingAllowCalls"
	TypeUserPrivacySettingAllowPeerToPeerCalls          = "userPrivacySettingAllowPeerToPeerCalls"
	TypeUserPrivacySettingAllowFindingByPhoneNumber     = "userPrivacySettingAllowFindingByPhoneNumber"
	TypeAccountTtl                                      = "accountTtl"
	TypeSession                                         = "session"
	TypeSessions                                        = "sessions"
	TypeConnectedWebsite                                = "connectedWebsite"
	TypeConnectedWebsites                               = "connectedWebsites"
	TypeChatReportReasonSpam                            = "chatReportReasonSpam"
	TypeChatReportReasonViolence                        = "chatReportReasonViolence"
	TypeChatReportReasonPornography                     = "chatReportReasonPornography"
	TypeChatReportReasonChildAbuse                      = "chatReportReasonChildAbuse"
	TypeChatReportReasonCopyright                       = "chatReportReasonCopyright"
	TypeChatReportReasonUnrelatedLocation               = "chatReportReasonUnrelatedLocation"
	TypeChatReportReasonFake                            = "chatReportReasonFake"
	TypeChatReportReasonIllegalDrugs                    = "chatReportReasonIllegalDrugs"
	TypeChatReportReasonPersonalDetails                 = "chatReportReasonPersonalDetails"
	TypeChatReportReasonCustom                          = "chatReportReasonCustom"
	TypeInternalLinkTypeActiveSessions                  = "internalLinkTypeActiveSessions"
	TypeInternalLinkTypeAttachmentMenuBot               = "internalLinkTypeAttachmentMenuBot"
	TypeInternalLinkTypeAuthenticationCode              = "internalLinkTypeAuthenticationCode"
	TypeInternalLinkTypeBackground                      = "internalLinkTypeBackground"
	TypeInternalLinkTypeBotStart                        = "internalLinkTypeBotStart"
	TypeInternalLinkTypeBotStartInGroup                 = "internalLinkTypeBotStartInGroup"
	TypeInternalLinkTypeBotAddToChannel                 = "internalLinkTypeBotAddToChannel"
	TypeInternalLinkTypeChangePhoneNumber               = "internalLinkTypeChangePhoneNumber"
	TypeInternalLinkTypeChatInvite                      = "internalLinkTypeChatInvite"
	TypeInternalLinkTypeFilterSettings                  = "internalLinkTypeFilterSettings"
	TypeInternalLinkTypeGame                            = "internalLinkTypeGame"
	TypeInternalLinkTypeLanguagePack                    = "internalLinkTypeLanguagePack"
	TypeInternalLinkTypeLanguageSettings                = "internalLinkTypeLanguageSettings"
	TypeInternalLinkTypeMessage                         = "internalLinkTypeMessage"
	TypeInternalLinkTypeMessageDraft                    = "internalLinkTypeMessageDraft"
	TypeInternalLinkTypePassportDataRequest             = "internalLinkTypePassportDataRequest"
	TypeInternalLinkTypePhoneNumberConfirmation         = "internalLinkTypePhoneNumberConfirmation"
	TypeInternalLinkTypePrivacyAndSecuritySettings      = "internalLinkTypePrivacyAndSecuritySettings"
	TypeInternalLinkTypeProxy                           = "internalLinkTypeProxy"
	TypeInternalLinkTypePublicChat                      = "internalLinkTypePublicChat"
	TypeInternalLinkTypeQrCodeAuthentication            = "internalLinkTypeQrCodeAuthentication"
	TypeInternalLinkTypeSettings                        = "internalLinkTypeSettings"
	TypeInternalLinkTypeStickerSet                      = "internalLinkTypeStickerSet"
	TypeInternalLinkTypeTheme                           = "internalLinkTypeTheme"
	TypeInternalLinkTypeThemeSettings                   = "internalLinkTypeThemeSettings"
	TypeInternalLinkTypeUnknownDeepLink                 = "internalLinkTypeUnknownDeepLink"
	TypeInternalLinkTypeUnsupportedProxy                = "internalLinkTypeUnsupportedProxy"
	TypeInternalLinkTypeUserPhoneNumber                 = "internalLinkTypeUserPhoneNumber"
	TypeInternalLinkTypeVideoChat                       = "internalLinkTypeVideoChat"
	TypeMessageLink                                     = "messageLink"
	TypeMessageLinkInfo                                 = "messageLinkInfo"
	TypeFilePart                                        = "filePart"
	TypeFileTypeNone                                    = "fileTypeNone"
	TypeFileTypeAnimation                               = "fileTypeAnimation"
	TypeFileTypeAudio                                   = "fileTypeAudio"
	TypeFileTypeDocument                                = "fileTypeDocument"
	TypeFileTypeNotificationSound                       = "fileTypeNotificationSound"
	TypeFileTypePhoto                                   = "fileTypePhoto"
	TypeFileTypeProfilePhoto                            = "fileTypeProfilePhoto"
	TypeFileTypeSecret                                  = "fileTypeSecret"
	TypeFileTypeSecretThumbnail                         = "fileTypeSecretThumbnail"
	TypeFileTypeSecure                                  = "fileTypeSecure"
	TypeFileTypeSticker                                 = "fileTypeSticker"
	TypeFileTypeThumbnail                               = "fileTypeThumbnail"
	TypeFileTypeUnknown                                 = "fileTypeUnknown"
	TypeFileTypeVideo                                   = "fileTypeVideo"
	TypeFileTypeVideoNote                               = "fileTypeVideoNote"
	TypeFileTypeVoiceNote                               = "fileTypeVoiceNote"
	TypeFileTypeWallpaper                               = "fileTypeWallpaper"
	TypeStorageStatisticsByFileType                     = "storageStatisticsByFileType"
	TypeStorageStatisticsByChat                         = "storageStatisticsByChat"
	TypeStorageStatistics                               = "storageStatistics"
	TypeStorageStatisticsFast                           = "storageStatisticsFast"
	TypeDatabaseStatistics                              = "databaseStatistics"
	TypeNetworkTypeNone                                 = "networkTypeNone"
	TypeNetworkTypeMobile                               = "networkTypeMobile"
	TypeNetworkTypeMobileRoaming                        = "networkTypeMobileRoaming"
	TypeNetworkTypeWiFi                                 = "networkTypeWiFi"
	TypeNetworkTypeOther                                = "networkTypeOther"
	TypeNetworkStatisticsEntryFile                      = "networkStatisticsEntryFile"
	TypeNetworkStatisticsEntryCall                      = "networkStatisticsEntryCall"
	TypeNetworkStatistics                               = "networkStatistics"
	TypeAutoDownloadSettings                            = "autoDownloadSettings"
	TypeAutoDownloadSettingsPresets                     = "autoDownloadSettingsPresets"
	TypeConnectionStateWaitingForNetwork                = "connectionStateWaitingForNetwork"
	TypeConnectionStateConnectingToProxy                = "connectionStateConnectingToProxy"
	TypeConnectionStateConnecting                       = "connectionStateConnecting"
	TypeConnectionStateUpdating                         = "connectionStateUpdating"
	TypeConnectionStateReady                            = "connectionStateReady"
	TypeTopChatCategoryUsers                            = "topChatCategoryUsers"
	TypeTopChatCategoryBots                             = "topChatCategoryBots"
	TypeTopChatCategoryGroups                           = "topChatCategoryGroups"
	TypeTopChatCategoryChannels                         = "topChatCategoryChannels"
	TypeTopChatCategoryInlineBots                       = "topChatCategoryInlineBots"
	TypeTopChatCategoryCalls                            = "topChatCategoryCalls"
	TypeTopChatCategoryForwardChats                     = "topChatCategoryForwardChats"
	TypeTMeUrlTypeUser                                  = "tMeUrlTypeUser"
	TypeTMeUrlTypeSupergroup                            = "tMeUrlTypeSupergroup"
	TypeTMeUrlTypeChatInvite                            = "tMeUrlTypeChatInvite"
	TypeTMeUrlTypeStickerSet                            = "tMeUrlTypeStickerSet"
	TypeTMeUrl                                          = "tMeUrl"
	TypeTMeUrls                                         = "tMeUrls"
	TypeSuggestedActionEnableArchiveAndMuteNewChats     = "suggestedActionEnableArchiveAndMuteNewChats"
	TypeSuggestedActionCheckPassword                    = "suggestedActionCheckPassword"
	TypeSuggestedActionCheckPhoneNumber                 = "suggestedActionCheckPhoneNumber"
	TypeSuggestedActionViewChecksHint                   = "suggestedActionViewChecksHint"
	TypeSuggestedActionConvertToBroadcastGroup          = "suggestedActionConvertToBroadcastGroup"
	TypeSuggestedActionSetPassword                      = "suggestedActionSetPassword"
	TypeCount                                           = "count"
	TypeText                                            = "text"
	TypeSeconds                                         = "seconds"
	TypeDeepLinkInfo                                    = "deepLinkInfo"
	TypeTextParseModeMarkdown                           = "textParseModeMarkdown"
	TypeTextParseModeHTML                               = "textParseModeHTML"
	TypeProxyTypeSocks5                                 = "proxyTypeSocks5"
	TypeProxyTypeHttp                                   = "proxyTypeHttp"
	TypeProxyTypeMtproto                                = "proxyTypeMtproto"
	TypeProxy                                           = "proxy"
	TypeProxies                                         = "proxies"
	TypeInputSticker                                    = "inputSticker"
	TypeDateRange                                       = "dateRange"
	TypeStatisticalValue                                = "statisticalValue"
	TypeStatisticalGraphData                            = "statisticalGraphData"
	TypeStatisticalGraphAsync                           = "statisticalGraphAsync"
	TypeStatisticalGraphError                           = "statisticalGraphError"
	TypeChatStatisticsMessageInteractionInfo            = "chatStatisticsMessageInteractionInfo"
	TypeChatStatisticsMessageSenderInfo                 = "chatStatisticsMessageSenderInfo"
	TypeChatStatisticsAdministratorActionsInfo          = "chatStatisticsAdministratorActionsInfo"
	TypeChatStatisticsInviterInfo                       = "chatStatisticsInviterInfo"
	TypeChatStatisticsSupergroup                        = "chatStatisticsSupergroup"
	TypeChatStatisticsChannel                           = "chatStatisticsChannel"
	TypeMessageStatistics                               = "messageStatistics"
	TypePoint                                           = "point"
	TypeVectorPathCommandLine                           = "vectorPathCommandLine"
	TypeVectorPathCommandCubicBezierCurve               = "vectorPathCommandCubicBezierCurve"
	TypeBotCommandScopeDefault                          = "botCommandScopeDefault"
	TypeBotCommandScopeAllPrivateChats                  = "botCommandScopeAllPrivateChats"
	TypeBotCommandScopeAllGroupChats                    = "botCommandScopeAllGroupChats"
	TypeBotCommandScopeAllChatAdministrators            = "botCommandScopeAllChatAdministrators"
	TypeBotCommandScopeChat                             = "botCommandScopeChat"
	TypeBotCommandScopeChatAdministrators               = "botCommandScopeChatAdministrators"
	TypeBotCommandScopeChatMember                       = "botCommandScopeChatMember"
	TypeUpdateAuthorizationState                        = "updateAuthorizationState"
	TypeUpdateNewMessage                                = "updateNewMessage"
	TypeUpdateMessageSendAcknowledged                   = "updateMessageSendAcknowledged"
	TypeUpdateMessageSendSucceeded                      = "updateMessageSendSucceeded"
	TypeUpdateMessageSendFailed                         = "updateMessageSendFailed"
	TypeUpdateMessageContent                            = "updateMessageContent"
	TypeUpdateMessageEdited                             = "updateMessageEdited"
	TypeUpdateMessageIsPinned                           = "updateMessageIsPinned"
	TypeUpdateMessageInteractionInfo                    = "updateMessageInteractionInfo"
	TypeUpdateMessageContentOpened                      = "updateMessageContentOpened"
	TypeUpdateMessageMentionRead                        = "updateMessageMentionRead"
	TypeUpdateMessageUnreadReactions                    = "updateMessageUnreadReactions"
	TypeUpdateMessageLiveLocationViewed                 = "updateMessageLiveLocationViewed"
	TypeUpdateNewChat                                   = "updateNewChat"
	TypeUpdateChatTitle                                 = "updateChatTitle"
	TypeUpdateChatPhoto                                 = "updateChatPhoto"
	TypeUpdateChatPermissions                           = "updateChatPermissions"
	TypeUpdateChatLastMessage                           = "updateChatLastMessage"
	TypeUpdateChatPosition                              = "updateChatPosition"
	TypeUpdateChatReadInbox                             = "updateChatReadInbox"
	TypeUpdateChatReadOutbox                            = "updateChatReadOutbox"
	TypeUpdateChatActionBar                             = "updateChatActionBar"
	TypeUpdateChatAvailableReactions                    = "updateChatAvailableReactions"
	TypeUpdateChatDraftMessage                          = "updateChatDraftMessage"
	TypeUpdateChatMessageSender                         = "updateChatMessageSender"
	TypeUpdateChatMessageTtl                            = "updateChatMessageTtl"
	TypeUpdateChatNotificationSettings                  = "updateChatNotificationSettings"
	TypeUpdateChatPendingJoinRequests                   = "updateChatPendingJoinRequests"
	TypeUpdateChatReplyMarkup                           = "updateChatReplyMarkup"
	TypeUpdateChatTheme                                 = "updateChatTheme"
	TypeUpdateChatUnreadMentionCount                    = "updateChatUnreadMentionCount"
	TypeUpdateChatUnreadReactionCount                   = "updateChatUnreadReactionCount"
	TypeUpdateChatVideoChat                             = "updateChatVideoChat"
	TypeUpdateChatDefaultDisableNotification            = "updateChatDefaultDisableNotification"
	TypeUpdateChatHasProtectedContent                   = "updateChatHasProtectedContent"
	TypeUpdateChatHasScheduledMessages                  = "updateChatHasScheduledMessages"
	TypeUpdateChatIsBlocked                             = "updateChatIsBlocked"
	TypeUpdateChatIsMarkedAsUnread                      = "updateChatIsMarkedAsUnread"
	TypeUpdateChatFilters                               = "updateChatFilters"
	TypeUpdateChatOnlineMemberCount                     = "updateChatOnlineMemberCount"
	TypeUpdateScopeNotificationSettings                 = "updateScopeNotificationSettings"
	TypeUpdateNotification                              = "updateNotification"
	TypeUpdateNotificationGroup                         = "updateNotificationGroup"
	TypeUpdateActiveNotifications                       = "updateActiveNotifications"
	TypeUpdateHavePendingNotifications                  = "updateHavePendingNotifications"
	TypeUpdateDeleteMessages                            = "updateDeleteMessages"
	TypeUpdateChatAction                                = "updateChatAction"
	TypeUpdateUserStatus                                = "updateUserStatus"
	TypeUpdateUser                                      = "updateUser"
	TypeUpdateBasicGroup                                = "updateBasicGroup"
	TypeUpdateSupergroup                                = "updateSupergroup"
	TypeUpdateSecretChat                                = "updateSecretChat"
	TypeUpdateUserFullInfo                              = "updateUserFullInfo"
	TypeUpdateBasicGroupFullInfo                        = "updateBasicGroupFullInfo"
	TypeUpdateSupergroupFullInfo                        = "updateSupergroupFullInfo"
	TypeUpdateServiceNotification                       = "updateServiceNotification"
	TypeUpdateFile                                      = "updateFile"
	TypeUpdateFileGenerationStart                       = "updateFileGenerationStart"
	TypeUpdateFileGenerationStop                        = "updateFileGenerationStop"
	TypeUpdateFileDownloads                             = "updateFileDownloads"
	TypeUpdateFileAddedToDownloads                      = "updateFileAddedToDownloads"
	TypeUpdateFileDownload                              = "updateFileDownload"
	TypeUpdateFileRemovedFromDownloads                  = "updateFileRemovedFromDownloads"
	TypeUpdateCall                                      = "updateCall"
	TypeUpdateGroupCall                                 = "updateGroupCall"
	TypeUpdateGroupCallParticipant                      = "updateGroupCallParticipant"
	TypeUpdateNewCallSignalingData                      = "updateNewCallSignalingData"
	TypeUpdateUserPrivacySettingRules                   = "updateUserPrivacySettingRules"
	TypeUpdateUnreadMessageCount                        = "updateUnreadMessageCount"
	TypeUpdateUnreadChatCount                           = "updateUnreadChatCount"
	TypeUpdateOption                                    = "updateOption"
	TypeUpdateStickerSet                                = "updateStickerSet"
	TypeUpdateInstalledStickerSets                      = "updateInstalledStickerSets"
	TypeUpdateTrendingStickerSets                       = "updateTrendingStickerSets"
	TypeUpdateRecentStickers                            = "updateRecentStickers"
	TypeUpdateFavoriteStickers                          = "updateFavoriteStickers"
	TypeUpdateSavedAnimations                           = "updateSavedAnimations"
	TypeUpdateSavedNotificationSounds                   = "updateSavedNotificationSounds"
	TypeUpdateSelectedBackground                        = "updateSelectedBackground"
	TypeUpdateChatThemes                                = "updateChatThemes"
	TypeUpdateLanguagePackStrings                       = "updateLanguagePackStrings"
	TypeUpdateConnectionState                           = "updateConnectionState"
	TypeUpdateTermsOfService                            = "updateTermsOfService"
	TypeUpdateUsersNearby                               = "updateUsersNearby"
	TypeUpdateAttachmentMenuBots                        = "updateAttachmentMenuBots"
	TypeUpdateWebAppMessageSent                         = "updateWebAppMessageSent"
	TypeUpdateReactions                                 = "updateReactions"
	TypeUpdateDiceEmojis                                = "updateDiceEmojis"
	TypeUpdateAnimatedEmojiMessageClicked               = "updateAnimatedEmojiMessageClicked"
	TypeUpdateAnimationSearchParameters                 = "updateAnimationSearchParameters"
	TypeUpdateSuggestedActions                          = "updateSuggestedActions"
	TypeUpdateNewInlineQuery                            = "updateNewInlineQuery"
	TypeUpdateNewChosenInlineResult                     = "updateNewChosenInlineResult"
	TypeUpdateNewCallbackQuery                          = "updateNewCallbackQuery"
	TypeUpdateNewInlineCallbackQuery                    = "updateNewInlineCallbackQuery"
	TypeUpdateNewShippingQuery                          = "updateNewShippingQuery"
	TypeUpdateNewPreCheckoutQuery                       = "updateNewPreCheckoutQuery"
	TypeUpdateNewCustomEvent                            = "updateNewCustomEvent"
	TypeUpdateNewCustomQuery                            = "updateNewCustomQuery"
	TypeUpdatePoll                                      = "updatePoll"
	TypeUpdatePollAnswer                                = "updatePollAnswer"
	TypeUpdateChatMember                                = "updateChatMember"
	TypeUpdateNewChatJoinRequest                        = "updateNewChatJoinRequest"
	TypeUpdates                                         = "updates"
	TypeLogStreamDefault                                = "logStreamDefault"
	TypeLogStreamFile                                   = "logStreamFile"
	TypeLogStreamEmpty                                  = "logStreamEmpty"
	TypeLogVerbosityLevel                               = "logVerbosityLevel"
	TypeLogTags                                         = "logTags"
	TypeTestInt                                         = "testInt"
	TypeTestString                                      = "testString"
	TypeTestBytes                                       = "testBytes"
	TypeTestVectorInt                                   = "testVectorInt"
	TypeTestVectorIntObject                             = "testVectorIntObject"
	TypeTestVectorString                                = "testVectorString"
	TypeTestVectorStringObject                          = "testVectorStringObject"
)

Variables

View Source
var ErrNotSupportedAuthorizationState = errors.New("not supported state")

Functions

func Authorize

func Authorize(client *Client, authorizationStateHandler AuthorizationStateHandler) error

func BotAuthorizer

func BotAuthorizer(token string) *botAuthorizer

func CliInteractor

func CliInteractor(clientAuthorizer *clientAuthorizer)

func ClientAuthorizer

func ClientAuthorizer() *clientAuthorizer

Types

type AcceptCallRequest

type AcceptCallRequest struct {
	// Call identifier
	CallId int32 `json:"call_id"`
	// The call protocols supported by the application
	Protocol *CallProtocol `json:"protocol"`
}

type AcceptTermsOfServiceRequest

type AcceptTermsOfServiceRequest struct {
	// Terms of service identifier
	TermsOfServiceId string `json:"terms_of_service_id"`
}

type AccountTtl

type AccountTtl struct {

	// Number of days of inactivity before the account will be flagged for deletion; 30-366 days
	Days int32 `json:"days"`
	// contains filtered or unexported fields
}

Contains information about the period of inactivity after which the current user's account will automatically be deleted

func UnmarshalAccountTtl

func UnmarshalAccountTtl(data json.RawMessage) (*AccountTtl, error)

func (*AccountTtl) GetClass

func (*AccountTtl) GetClass() string

func (*AccountTtl) GetType

func (*AccountTtl) GetType() string

func (*AccountTtl) MarshalJSON

func (entity *AccountTtl) MarshalJSON() ([]byte, error)

type AddChatMemberRequest

type AddChatMemberRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the user
	UserId int64 `json:"user_id"`
	// The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels, or if the added user is a bot
	ForwardLimit int32 `json:"forward_limit"`
}

type AddChatMembersRequest

type AddChatMembersRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifiers of the users to be added to the chat. The maximum number of added users is 20 for supergroups and 100 for channels
	UserIds []int64 `json:"user_ids"`
}

type AddChatToListRequest

type AddChatToListRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The chat list. Use getChatListsToAddChat to get suitable chat lists
	ChatList ChatList `json:"chat_list"`
}

type AddContactRequest

type AddContactRequest struct {
	// The contact to add or edit; phone number may be empty and needs to be specified only if known, vCard is ignored
	Contact *Contact `json:"contact"`
	// Pass true to share the current user's phone number with the new contact. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field userFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number
	SharePhoneNumber bool `json:"share_phone_number"`
}

type AddCustomServerLanguagePackRequest

type AddCustomServerLanguagePackRequest struct {
	// Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link
	LanguagePackId string `json:"language_pack_id"`
}

type AddFavoriteStickerRequest

type AddFavoriteStickerRequest struct {
	// Sticker file to add
	Sticker InputFile `json:"sticker"`
}

type AddFileToDownloadsRequest added in v1.8.3

type AddFileToDownloadsRequest struct {
	// Identifier of the file to download
	FileId int32 `json:"file_id"`
	// Chat identifier of the message with the file
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first
	Priority int32 `json:"priority"`
}

type AddLocalMessageRequest

type AddLocalMessageRequest struct {
	// Target chat
	ChatId int64 `json:"chat_id"`
	// Identifier of the sender of the message
	SenderId MessageSender `json:"sender_id"`
	// Identifier of the replied message; 0 if none
	ReplyToMessageId int64 `json:"reply_to_message_id"`
	// Pass true to disable notification for the message
	DisableNotification bool `json:"disable_notification"`
	// The content of the message to be added
	InputMessageContent InputMessageContent `json:"input_message_content"`
}

type AddLogMessageRequest

type AddLogMessageRequest struct {
	// The minimum verbosity level needed for the message to be logged; 0-1023
	VerbosityLevel int32 `json:"verbosity_level"`
	// Text of a message to log
	Text string `json:"text"`
}

type AddNetworkStatisticsRequest

type AddNetworkStatisticsRequest struct {
	// The network statistics entry with the data to be added to statistics
	Entry NetworkStatisticsEntry `json:"entry"`
}

type AddProxyRequest

type AddProxyRequest struct {
	// Proxy server IP address
	Server string `json:"server"`
	// Proxy server port
	Port int32 `json:"port"`
	// Pass true to immediately enable the proxy
	Enable bool `json:"enable"`
	// Proxy type
	Type ProxyType `json:"type"`
}

type AddRecentStickerRequest

type AddRecentStickerRequest struct {
	// Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers
	IsAttached bool `json:"is_attached"`
	// Sticker file to add
	Sticker InputFile `json:"sticker"`
}

type AddRecentlyFoundChatRequest

type AddRecentlyFoundChatRequest struct {
	// Identifier of the chat to add
	ChatId int64 `json:"chat_id"`
}

type AddSavedAnimationRequest

type AddSavedAnimationRequest struct {
	// The animation file to be added. Only animations known to the server (i.e., successfully sent via a message) can be added to the list
	Animation InputFile `json:"animation"`
}

type AddSavedNotificationSoundRequest added in v1.8.3

type AddSavedNotificationSoundRequest struct {
	// Notification sound file to add
	Sound InputFile `json:"sound"`
}

type AddStickerToSetRequest

type AddStickerToSetRequest struct {
	// Sticker set owner
	UserId int64 `json:"user_id"`
	// Sticker set name
	Name string `json:"name"`
	// Sticker to add to the set
	Sticker *InputSticker `json:"sticker"`
}

type AddedReaction added in v1.8.3

type AddedReaction struct {

	// Text representation of the reaction
	Reaction string `json:"reaction"`
	// Identifier of the chat member, applied the reaction
	SenderId MessageSender `json:"sender_id"`
	// contains filtered or unexported fields
}

Represents a reaction applied to a message

func UnmarshalAddedReaction added in v1.8.3

func UnmarshalAddedReaction(data json.RawMessage) (*AddedReaction, error)

func (*AddedReaction) GetClass added in v1.8.3

func (*AddedReaction) GetClass() string

func (*AddedReaction) GetType added in v1.8.3

func (*AddedReaction) GetType() string

func (*AddedReaction) MarshalJSON added in v1.8.3

func (entity *AddedReaction) MarshalJSON() ([]byte, error)

func (*AddedReaction) UnmarshalJSON added in v1.8.3

func (addedReaction *AddedReaction) UnmarshalJSON(data []byte) error

type AddedReactions added in v1.8.3

type AddedReactions struct {

	// The total number of found reactions
	TotalCount int32 `json:"total_count"`
	// The list of added reactions
	Reactions []*AddedReaction `json:"reactions"`
	// The offset for the next request. If empty, there are no more results
	NextOffset string `json:"next_offset"`
	// contains filtered or unexported fields
}

Represents a list of reactions added to a message

func UnmarshalAddedReactions added in v1.8.3

func UnmarshalAddedReactions(data json.RawMessage) (*AddedReactions, error)

func (*AddedReactions) GetClass added in v1.8.3

func (*AddedReactions) GetClass() string

func (*AddedReactions) GetType added in v1.8.3

func (*AddedReactions) GetType() string

func (*AddedReactions) MarshalJSON added in v1.8.3

func (entity *AddedReactions) MarshalJSON() ([]byte, error)

type Address

type Address struct {

	// A two-letter ISO 3166-1 alpha-2 country code
	CountryCode string `json:"country_code"`
	// State, if applicable
	State string `json:"state"`
	// City
	City string `json:"city"`
	// First line of the address
	StreetLine1 string `json:"street_line1"`
	// Second line of the address
	StreetLine2 string `json:"street_line2"`
	// Address postal code
	PostalCode string `json:"postal_code"`
	// contains filtered or unexported fields
}

Describes an address

func UnmarshalAddress

func UnmarshalAddress(data json.RawMessage) (*Address, error)

func (*Address) GetClass

func (*Address) GetClass() string

func (*Address) GetType

func (*Address) GetType() string

func (*Address) MarshalJSON

func (entity *Address) MarshalJSON() ([]byte, error)

type AnimatedChatPhoto

type AnimatedChatPhoto struct {

	// Animation width and height
	Length int32 `json:"length"`
	// Information about the animation file
	File *File `json:"file"`
	// Timestamp of the frame, used as a static chat photo
	MainFrameTimestamp float64 `json:"main_frame_timestamp"`
	// contains filtered or unexported fields
}

Animated variant of a chat photo in MPEG4 format

func UnmarshalAnimatedChatPhoto

func UnmarshalAnimatedChatPhoto(data json.RawMessage) (*AnimatedChatPhoto, error)

func (*AnimatedChatPhoto) GetClass

func (*AnimatedChatPhoto) GetClass() string

func (*AnimatedChatPhoto) GetType

func (*AnimatedChatPhoto) GetType() string

func (*AnimatedChatPhoto) MarshalJSON

func (entity *AnimatedChatPhoto) MarshalJSON() ([]byte, error)

type AnimatedEmoji added in v1.7.10

type AnimatedEmoji struct {

	// Animated sticker for the emoji
	Sticker *Sticker `json:"sticker"`
	// Emoji modifier fitzpatrick type; 0-6; 0 if none
	FitzpatrickType int32 `json:"fitzpatrick_type"`
	// File containing the sound to be played when the animated emoji is clicked; may be null. The sound is encoded with the Opus codec, and stored inside an OGG container
	Sound *File `json:"sound"`
	// contains filtered or unexported fields
}

Describes an animated representation of an emoji

func UnmarshalAnimatedEmoji added in v1.7.10

func UnmarshalAnimatedEmoji(data json.RawMessage) (*AnimatedEmoji, error)

func (*AnimatedEmoji) GetClass added in v1.7.10

func (*AnimatedEmoji) GetClass() string

func (*AnimatedEmoji) GetType added in v1.7.10

func (*AnimatedEmoji) GetType() string

func (*AnimatedEmoji) MarshalJSON added in v1.7.10

func (entity *AnimatedEmoji) MarshalJSON() ([]byte, error)

type Animation

type Animation struct {

	// Duration of the animation, in seconds; as defined by the sender
	Duration int32 `json:"duration"`
	// Width of the animation
	Width int32 `json:"width"`
	// Height of the animation
	Height int32 `json:"height"`
	// Original name of the file; as defined by the sender
	FileName string `json:"file_name"`
	// MIME type of the file, usually "image/gif" or "video/mp4"
	MimeType string `json:"mime_type"`
	// True, if stickers were added to the animation. The list of corresponding sticker set can be received using getAttachedStickerSets
	HasStickers bool `json:"has_stickers"`
	// Animation minithumbnail; may be null
	Minithumbnail *Minithumbnail `json:"minithumbnail"`
	// Animation thumbnail in JPEG or MPEG4 format; may be null
	Thumbnail *Thumbnail `json:"thumbnail"`
	// File containing the animation
	Animation *File `json:"animation"`
	// contains filtered or unexported fields
}

Describes an animation file. The animation must be encoded in GIF or MPEG4 format

func UnmarshalAnimation

func UnmarshalAnimation(data json.RawMessage) (*Animation, error)

func (*Animation) GetClass

func (*Animation) GetClass() string

func (*Animation) GetType

func (*Animation) GetType() string

func (*Animation) MarshalJSON

func (entity *Animation) MarshalJSON() ([]byte, error)

type Animations

type Animations struct {

	// List of animations
	Animations []*Animation `json:"animations"`
	// contains filtered or unexported fields
}

Represents a list of animations

func UnmarshalAnimations

func UnmarshalAnimations(data json.RawMessage) (*Animations, error)

func (*Animations) GetClass

func (*Animations) GetClass() string

func (*Animations) GetType

func (*Animations) GetType() string

func (*Animations) MarshalJSON

func (entity *Animations) MarshalJSON() ([]byte, error)

type AnswerCallbackQueryRequest

type AnswerCallbackQueryRequest struct {
	// Identifier of the callback query
	CallbackQueryId JsonInt64 `json:"callback_query_id"`
	// Text of the answer
	Text string `json:"text"`
	// Pass true to show an alert to the user instead of a toast notification
	ShowAlert bool `json:"show_alert"`
	// URL to be opened
	Url string `json:"url"`
	// Time during which the result of the query can be cached, in seconds
	CacheTime int32 `json:"cache_time"`
}

type AnswerCustomQueryRequest

type AnswerCustomQueryRequest struct {
	// Identifier of a custom query
	CustomQueryId JsonInt64 `json:"custom_query_id"`
	// JSON-serialized answer to the query
	Data string `json:"data"`
}

type AnswerInlineQueryRequest

type AnswerInlineQueryRequest struct {
	// Identifier of the inline query
	InlineQueryId JsonInt64 `json:"inline_query_id"`
	// Pass true if results may be cached and returned only for the user that sent the query. By default, results may be returned to any user who sends the same query
	IsPersonal bool `json:"is_personal"`
	// The results of the query
	Results []InputInlineQueryResult `json:"results"`
	// Allowed time to cache the results of the query, in seconds
	CacheTime int32 `json:"cache_time"`
	// Offset for the next inline query; pass an empty string if there are no more results
	NextOffset string `json:"next_offset"`
	// If non-empty, this text must be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter
	SwitchPmText string `json:"switch_pm_text"`
	// The parameter for the bot start message
	SwitchPmParameter string `json:"switch_pm_parameter"`
}

type AnswerPreCheckoutQueryRequest

type AnswerPreCheckoutQueryRequest struct {
	// Identifier of the pre-checkout query
	PreCheckoutQueryId JsonInt64 `json:"pre_checkout_query_id"`
	// An error message, empty on success
	ErrorMessage string `json:"error_message"`
}

type AnswerShippingQueryRequest

type AnswerShippingQueryRequest struct {
	// Identifier of the shipping query
	ShippingQueryId JsonInt64 `json:"shipping_query_id"`
	// Available shipping options
	ShippingOptions []*ShippingOption `json:"shipping_options"`
	// An error message, empty on success
	ErrorMessage string `json:"error_message"`
}

type AnswerWebAppQueryRequest added in v1.8.3

type AnswerWebAppQueryRequest struct {
	// Identifier of the web app query
	WebAppQueryId string `json:"web_app_query_id"`
	// The result of the query
	Result InputInlineQueryResult `json:"result"`
}

type AttachmentMenuBot added in v1.8.3

type AttachmentMenuBot struct {

	// User identifier of the bot added to attachment menu
	BotUserId int64 `json:"bot_user_id"`
	// Name for the bot in attachment menu
	Name string `json:"name"`
	// Color to highlight selected name of the bot if appropriate; may be null
	NameColor *AttachmentMenuBotColor `json:"name_color"`
	// Default attachment menu icon for the bot in SVG format; may be null
	DefaultIcon *File `json:"default_icon"`
	// Attachment menu icon for the bot in SVG format for the official iOS app; may be null
	IosStaticIcon *File `json:"ios_static_icon"`
	// Attachment menu icon for the bot in TGS format for the official iOS app; may be null
	IosAnimatedIcon *File `json:"ios_animated_icon"`
	// Attachment menu icon for the bot in TGS format for the official Android app; may be null
	AndroidIcon *File `json:"android_icon"`
	// Attachment menu icon for the bot in TGS format for the official native macOS app; may be null
	MacosIcon *File `json:"macos_icon"`
	// Color to highlight selected icon of the bot if appropriate; may be null
	IconColor *AttachmentMenuBotColor `json:"icon_color"`
	// contains filtered or unexported fields
}

Represents a bot added to attachment menu

func UnmarshalAttachmentMenuBot added in v1.8.3

func UnmarshalAttachmentMenuBot(data json.RawMessage) (*AttachmentMenuBot, error)

func (*AttachmentMenuBot) GetClass added in v1.8.3

func (*AttachmentMenuBot) GetClass() string

func (*AttachmentMenuBot) GetType added in v1.8.3

func (*AttachmentMenuBot) GetType() string

func (*AttachmentMenuBot) MarshalJSON added in v1.8.3

func (entity *AttachmentMenuBot) MarshalJSON() ([]byte, error)

type AttachmentMenuBotColor added in v1.8.3

type AttachmentMenuBotColor struct {

	// Color in the RGB24 format for light themes
	LightColor int32 `json:"light_color"`
	// Color in the RGB24 format for dark themes
	DarkColor int32 `json:"dark_color"`
	// contains filtered or unexported fields
}

Describes a color to highlight a bot added to attachment menu

func UnmarshalAttachmentMenuBotColor added in v1.8.3

func UnmarshalAttachmentMenuBotColor(data json.RawMessage) (*AttachmentMenuBotColor, error)

func (*AttachmentMenuBotColor) GetClass added in v1.8.3

func (*AttachmentMenuBotColor) GetClass() string

func (*AttachmentMenuBotColor) GetType added in v1.8.3

func (*AttachmentMenuBotColor) GetType() string

func (*AttachmentMenuBotColor) MarshalJSON added in v1.8.3

func (entity *AttachmentMenuBotColor) MarshalJSON() ([]byte, error)

type Audio

type Audio struct {

	// Duration of the audio, in seconds; as defined by the sender
	Duration int32 `json:"duration"`
	// Title of the audio; as defined by the sender
	Title string `json:"title"`
	// Performer of the audio; as defined by the sender
	Performer string `json:"performer"`
	// Original name of the file; as defined by the sender
	FileName string `json:"file_name"`
	// The MIME type of the file; as defined by the sender
	MimeType string `json:"mime_type"`
	// The minithumbnail of the album cover; may be null
	AlbumCoverMinithumbnail *Minithumbnail `json:"album_cover_minithumbnail"`
	// The thumbnail of the album cover in JPEG format; as defined by the sender. The full size thumbnail is supposed to be extracted from the downloaded file; may be null
	AlbumCoverThumbnail *Thumbnail `json:"album_cover_thumbnail"`
	// File containing the audio
	Audio *File `json:"audio"`
	// contains filtered or unexported fields
}

Describes an audio file. Audio is usually in MP3 or M4A format

func UnmarshalAudio

func UnmarshalAudio(data json.RawMessage) (*Audio, error)

func (*Audio) GetClass

func (*Audio) GetClass() string

func (*Audio) GetType

func (*Audio) GetType() string

func (*Audio) MarshalJSON

func (entity *Audio) MarshalJSON() ([]byte, error)

type AuthenticationCodeInfo

type AuthenticationCodeInfo struct {

	// A phone number that is being authenticated
	PhoneNumber string `json:"phone_number"`
	// The way the code was sent to the user
	Type AuthenticationCodeType `json:"type"`
	// The way the next code will be sent to the user; may be null
	NextType AuthenticationCodeType `json:"next_type"`
	// Timeout before the code can be re-sent, in seconds
	Timeout int32 `json:"timeout"`
	// contains filtered or unexported fields
}

Information about the authentication code that was sent

func UnmarshalAuthenticationCodeInfo

func UnmarshalAuthenticationCodeInfo(data json.RawMessage) (*AuthenticationCodeInfo, error)

func (*AuthenticationCodeInfo) GetClass

func (*AuthenticationCodeInfo) GetClass() string

func (*AuthenticationCodeInfo) GetType

func (*AuthenticationCodeInfo) GetType() string

func (*AuthenticationCodeInfo) MarshalJSON

func (entity *AuthenticationCodeInfo) MarshalJSON() ([]byte, error)

func (*AuthenticationCodeInfo) UnmarshalJSON

func (authenticationCodeInfo *AuthenticationCodeInfo) UnmarshalJSON(data []byte) error

type AuthenticationCodeType

type AuthenticationCodeType interface {
	AuthenticationCodeTypeType() string
}

Provides information about the method by which an authentication code is delivered to the user

func UnmarshalAuthenticationCodeType

func UnmarshalAuthenticationCodeType(data json.RawMessage) (AuthenticationCodeType, error)

func UnmarshalListOfAuthenticationCodeType

func UnmarshalListOfAuthenticationCodeType(dataList []json.RawMessage) ([]AuthenticationCodeType, error)

type AuthenticationCodeTypeCall

type AuthenticationCodeTypeCall struct {

	// Length of the code
	Length int32 `json:"length"`
	// contains filtered or unexported fields
}

An authentication code is delivered via a phone call to the specified phone number

func UnmarshalAuthenticationCodeTypeCall

func UnmarshalAuthenticationCodeTypeCall(data json.RawMessage) (*AuthenticationCodeTypeCall, error)

func (*AuthenticationCodeTypeCall) AuthenticationCodeTypeType

func (*AuthenticationCodeTypeCall) AuthenticationCodeTypeType() string

func (*AuthenticationCodeTypeCall) GetClass

func (*AuthenticationCodeTypeCall) GetClass() string

func (*AuthenticationCodeTypeCall) GetType

func (*AuthenticationCodeTypeCall) MarshalJSON

func (entity *AuthenticationCodeTypeCall) MarshalJSON() ([]byte, error)

type AuthenticationCodeTypeFlashCall

type AuthenticationCodeTypeFlashCall struct {

	// Pattern of the phone number from which the call will be made
	Pattern string `json:"pattern"`
	// contains filtered or unexported fields
}

An authentication code is delivered by an immediately canceled call to the specified phone number. The phone number that calls is the code that must be entered automatically

func UnmarshalAuthenticationCodeTypeFlashCall

func UnmarshalAuthenticationCodeTypeFlashCall(data json.RawMessage) (*AuthenticationCodeTypeFlashCall, error)

func (*AuthenticationCodeTypeFlashCall) AuthenticationCodeTypeType

func (*AuthenticationCodeTypeFlashCall) AuthenticationCodeTypeType() string

func (*AuthenticationCodeTypeFlashCall) GetClass

func (*AuthenticationCodeTypeFlashCall) GetType

func (*AuthenticationCodeTypeFlashCall) MarshalJSON

func (entity *AuthenticationCodeTypeFlashCall) MarshalJSON() ([]byte, error)

type AuthenticationCodeTypeMissedCall added in v1.7.10

type AuthenticationCodeTypeMissedCall struct {

	// Prefix of the phone number from which the call will be made
	PhoneNumberPrefix string `json:"phone_number_prefix"`
	// Number of digits in the code, excluding the prefix
	Length int32 `json:"length"`
	// contains filtered or unexported fields
}

An authentication code is delivered by an immediately canceled call to the specified phone number. The last digits of the phone number that calls are the code that must be entered manually by the user

func UnmarshalAuthenticationCodeTypeMissedCall added in v1.7.10

func UnmarshalAuthenticationCodeTypeMissedCall(data json.RawMessage) (*AuthenticationCodeTypeMissedCall, error)

func (*AuthenticationCodeTypeMissedCall) AuthenticationCodeTypeType added in v1.7.10

func (*AuthenticationCodeTypeMissedCall) AuthenticationCodeTypeType() string

func (*AuthenticationCodeTypeMissedCall) GetClass added in v1.7.10

func (*AuthenticationCodeTypeMissedCall) GetType added in v1.7.10

func (*AuthenticationCodeTypeMissedCall) MarshalJSON added in v1.7.10

func (entity *AuthenticationCodeTypeMissedCall) MarshalJSON() ([]byte, error)

type AuthenticationCodeTypeSms

type AuthenticationCodeTypeSms struct {

	// Length of the code
	Length int32 `json:"length"`
	// contains filtered or unexported fields
}

An authentication code is delivered via an SMS message to the specified phone number

func UnmarshalAuthenticationCodeTypeSms

func UnmarshalAuthenticationCodeTypeSms(data json.RawMessage) (*AuthenticationCodeTypeSms, error)

func (*AuthenticationCodeTypeSms) AuthenticationCodeTypeType

func (*AuthenticationCodeTypeSms) AuthenticationCodeTypeType() string

func (*AuthenticationCodeTypeSms) GetClass

func (*AuthenticationCodeTypeSms) GetClass() string

func (*AuthenticationCodeTypeSms) GetType

func (*AuthenticationCodeTypeSms) GetType() string

func (*AuthenticationCodeTypeSms) MarshalJSON

func (entity *AuthenticationCodeTypeSms) MarshalJSON() ([]byte, error)

type AuthenticationCodeTypeTelegramMessage

type AuthenticationCodeTypeTelegramMessage struct {

	// Length of the code
	Length int32 `json:"length"`
	// contains filtered or unexported fields
}

An authentication code is delivered via a private Telegram message, which can be viewed from another active session

func UnmarshalAuthenticationCodeTypeTelegramMessage

func UnmarshalAuthenticationCodeTypeTelegramMessage(data json.RawMessage) (*AuthenticationCodeTypeTelegramMessage, error)

func (*AuthenticationCodeTypeTelegramMessage) AuthenticationCodeTypeType

func (*AuthenticationCodeTypeTelegramMessage) AuthenticationCodeTypeType() string

func (*AuthenticationCodeTypeTelegramMessage) GetClass

func (*AuthenticationCodeTypeTelegramMessage) GetType

func (*AuthenticationCodeTypeTelegramMessage) MarshalJSON

func (entity *AuthenticationCodeTypeTelegramMessage) MarshalJSON() ([]byte, error)

type AuthorizationState

type AuthorizationState interface {
	AuthorizationStateType() string
}

Represents the current authorization state of the TDLib client

func UnmarshalAuthorizationState

func UnmarshalAuthorizationState(data json.RawMessage) (AuthorizationState, error)

func UnmarshalListOfAuthorizationState

func UnmarshalListOfAuthorizationState(dataList []json.RawMessage) ([]AuthorizationState, error)

type AuthorizationStateClosed

type AuthorizationStateClosed struct {
	// contains filtered or unexported fields
}

TDLib client is in its final state. All databases are closed and all resources are released. No other updates will be received after this. All queries will be responded to with error code 500. To continue working, one must create a new instance of the TDLib client

func UnmarshalAuthorizationStateClosed

func UnmarshalAuthorizationStateClosed(data json.RawMessage) (*AuthorizationStateClosed, error)

func (*AuthorizationStateClosed) AuthorizationStateType

func (*AuthorizationStateClosed) AuthorizationStateType() string

func (*AuthorizationStateClosed) GetClass

func (*AuthorizationStateClosed) GetClass() string

func (*AuthorizationStateClosed) GetType

func (*AuthorizationStateClosed) GetType() string

func (*AuthorizationStateClosed) MarshalJSON

func (entity *AuthorizationStateClosed) MarshalJSON() ([]byte, error)

type AuthorizationStateClosing

type AuthorizationStateClosing struct {
	// contains filtered or unexported fields
}

TDLib is closing, all subsequent queries will be answered with the error 500. Note that closing TDLib can take a while. All resources will be freed only after authorizationStateClosed has been received

func UnmarshalAuthorizationStateClosing

func UnmarshalAuthorizationStateClosing(data json.RawMessage) (*AuthorizationStateClosing, error)

func (*AuthorizationStateClosing) AuthorizationStateType

func (*AuthorizationStateClosing) AuthorizationStateType() string

func (*AuthorizationStateClosing) GetClass

func (*AuthorizationStateClosing) GetClass() string

func (*AuthorizationStateClosing) GetType

func (*AuthorizationStateClosing) GetType() string

func (*AuthorizationStateClosing) MarshalJSON

func (entity *AuthorizationStateClosing) MarshalJSON() ([]byte, error)

type AuthorizationStateHandler

type AuthorizationStateHandler interface {
	Handle(client *Client, state AuthorizationState) error
	Close()
}

type AuthorizationStateLoggingOut

type AuthorizationStateLoggingOut struct {
	// contains filtered or unexported fields
}

The user is currently logging out

func UnmarshalAuthorizationStateLoggingOut

func UnmarshalAuthorizationStateLoggingOut(data json.RawMessage) (*AuthorizationStateLoggingOut, error)

func (*AuthorizationStateLoggingOut) AuthorizationStateType

func (*AuthorizationStateLoggingOut) AuthorizationStateType() string

func (*AuthorizationStateLoggingOut) GetClass

func (*AuthorizationStateLoggingOut) GetType

func (*AuthorizationStateLoggingOut) MarshalJSON

func (entity *AuthorizationStateLoggingOut) MarshalJSON() ([]byte, error)

type AuthorizationStateReady

type AuthorizationStateReady struct {
	// contains filtered or unexported fields
}

The user has been successfully authorized. TDLib is now ready to answer queries

func UnmarshalAuthorizationStateReady

func UnmarshalAuthorizationStateReady(data json.RawMessage) (*AuthorizationStateReady, error)

func (*AuthorizationStateReady) AuthorizationStateType

func (*AuthorizationStateReady) AuthorizationStateType() string

func (*AuthorizationStateReady) GetClass

func (*AuthorizationStateReady) GetClass() string

func (*AuthorizationStateReady) GetType

func (*AuthorizationStateReady) GetType() string

func (*AuthorizationStateReady) MarshalJSON

func (entity *AuthorizationStateReady) MarshalJSON() ([]byte, error)

type AuthorizationStateWaitCode

type AuthorizationStateWaitCode struct {

	// Information about the authorization code that was sent
	CodeInfo *AuthenticationCodeInfo `json:"code_info"`
	// contains filtered or unexported fields
}

TDLib needs the user's authentication code to authorize

func UnmarshalAuthorizationStateWaitCode

func UnmarshalAuthorizationStateWaitCode(data json.RawMessage) (*AuthorizationStateWaitCode, error)

func (*AuthorizationStateWaitCode) AuthorizationStateType

func (*AuthorizationStateWaitCode) AuthorizationStateType() string

func (*AuthorizationStateWaitCode) GetClass

func (*AuthorizationStateWaitCode) GetClass() string

func (*AuthorizationStateWaitCode) GetType

func (*AuthorizationStateWaitCode) MarshalJSON

func (entity *AuthorizationStateWaitCode) MarshalJSON() ([]byte, error)

type AuthorizationStateWaitEncryptionKey

type AuthorizationStateWaitEncryptionKey struct {

	// True, if the database is currently encrypted
	IsEncrypted bool `json:"is_encrypted"`
	// contains filtered or unexported fields
}

TDLib needs an encryption key to decrypt the local database

func UnmarshalAuthorizationStateWaitEncryptionKey

func UnmarshalAuthorizationStateWaitEncryptionKey(data json.RawMessage) (*AuthorizationStateWaitEncryptionKey, error)

func (*AuthorizationStateWaitEncryptionKey) AuthorizationStateType

func (*AuthorizationStateWaitEncryptionKey) AuthorizationStateType() string

func (*AuthorizationStateWaitEncryptionKey) GetClass

func (*AuthorizationStateWaitEncryptionKey) GetType

func (*AuthorizationStateWaitEncryptionKey) MarshalJSON

func (entity *AuthorizationStateWaitEncryptionKey) MarshalJSON() ([]byte, error)

type AuthorizationStateWaitOtherDeviceConfirmation

type AuthorizationStateWaitOtherDeviceConfirmation struct {

	// A tg:// URL for the QR code. The link will be updated frequently
	Link string `json:"link"`
	// contains filtered or unexported fields
}

The user needs to confirm authorization on another logged in device by scanning a QR code with the provided link

func UnmarshalAuthorizationStateWaitOtherDeviceConfirmation

func UnmarshalAuthorizationStateWaitOtherDeviceConfirmation(data json.RawMessage) (*AuthorizationStateWaitOtherDeviceConfirmation, error)

func (*AuthorizationStateWaitOtherDeviceConfirmation) AuthorizationStateType

func (*AuthorizationStateWaitOtherDeviceConfirmation) AuthorizationStateType() string

func (*AuthorizationStateWaitOtherDeviceConfirmation) GetClass

func (*AuthorizationStateWaitOtherDeviceConfirmation) GetType

func (*AuthorizationStateWaitOtherDeviceConfirmation) MarshalJSON

func (entity *AuthorizationStateWaitOtherDeviceConfirmation) MarshalJSON() ([]byte, error)

type AuthorizationStateWaitPassword

type AuthorizationStateWaitPassword struct {

	// Hint for the password; may be empty
	PasswordHint string `json:"password_hint"`
	// True, if a recovery email address has been set up
	HasRecoveryEmailAddress bool `json:"has_recovery_email_address"`
	// Pattern of the email address to which the recovery email was sent; empty until a recovery email has been sent
	RecoveryEmailAddressPattern string `json:"recovery_email_address_pattern"`
	// contains filtered or unexported fields
}

The user has been authorized, but needs to enter a password to start using the application

func UnmarshalAuthorizationStateWaitPassword

func UnmarshalAuthorizationStateWaitPassword(data json.RawMessage) (*AuthorizationStateWaitPassword, error)

func (*AuthorizationStateWaitPassword) AuthorizationStateType

func (*AuthorizationStateWaitPassword) AuthorizationStateType() string

func (*AuthorizationStateWaitPassword) GetClass

func (*AuthorizationStateWaitPassword) GetType

func (*AuthorizationStateWaitPassword) MarshalJSON

func (entity *AuthorizationStateWaitPassword) MarshalJSON() ([]byte, error)

type AuthorizationStateWaitPhoneNumber

type AuthorizationStateWaitPhoneNumber struct {
	// contains filtered or unexported fields
}

TDLib needs the user's phone number to authorize. Call `setAuthenticationPhoneNumber` to provide the phone number, or use `requestQrCodeAuthentication`, or `checkAuthenticationBotToken` for other authentication options

func UnmarshalAuthorizationStateWaitPhoneNumber

func UnmarshalAuthorizationStateWaitPhoneNumber(data json.RawMessage) (*AuthorizationStateWaitPhoneNumber, error)

func (*AuthorizationStateWaitPhoneNumber) AuthorizationStateType

func (*AuthorizationStateWaitPhoneNumber) AuthorizationStateType() string

func (*AuthorizationStateWaitPhoneNumber) GetClass

func (*AuthorizationStateWaitPhoneNumber) GetType

func (*AuthorizationStateWaitPhoneNumber) MarshalJSON

func (entity *AuthorizationStateWaitPhoneNumber) MarshalJSON() ([]byte, error)

type AuthorizationStateWaitRegistration

type AuthorizationStateWaitRegistration struct {

	// Telegram terms of service
	TermsOfService *TermsOfService `json:"terms_of_service"`
	// contains filtered or unexported fields
}

The user is unregistered and need to accept terms of service and enter their first name and last name to finish registration

func UnmarshalAuthorizationStateWaitRegistration

func UnmarshalAuthorizationStateWaitRegistration(data json.RawMessage) (*AuthorizationStateWaitRegistration, error)

func (*AuthorizationStateWaitRegistration) AuthorizationStateType

func (*AuthorizationStateWaitRegistration) AuthorizationStateType() string

func (*AuthorizationStateWaitRegistration) GetClass

func (*AuthorizationStateWaitRegistration) GetType

func (*AuthorizationStateWaitRegistration) MarshalJSON

func (entity *AuthorizationStateWaitRegistration) MarshalJSON() ([]byte, error)

type AuthorizationStateWaitTdlibParameters

type AuthorizationStateWaitTdlibParameters struct {
	// contains filtered or unexported fields
}

TDLib needs TdlibParameters for initialization

func UnmarshalAuthorizationStateWaitTdlibParameters

func UnmarshalAuthorizationStateWaitTdlibParameters(data json.RawMessage) (*AuthorizationStateWaitTdlibParameters, error)

func (*AuthorizationStateWaitTdlibParameters) AuthorizationStateType

func (*AuthorizationStateWaitTdlibParameters) AuthorizationStateType() string

func (*AuthorizationStateWaitTdlibParameters) GetClass

func (*AuthorizationStateWaitTdlibParameters) GetType

func (*AuthorizationStateWaitTdlibParameters) MarshalJSON

func (entity *AuthorizationStateWaitTdlibParameters) MarshalJSON() ([]byte, error)

type AutoDownloadSettings

type AutoDownloadSettings struct {

	// True, if the auto-download is enabled
	IsAutoDownloadEnabled bool `json:"is_auto_download_enabled"`
	// The maximum size of a photo file to be auto-downloaded, in bytes
	MaxPhotoFileSize int32 `json:"max_photo_file_size"`
	// The maximum size of a video file to be auto-downloaded, in bytes
	MaxVideoFileSize int32 `json:"max_video_file_size"`
	// The maximum size of other file types to be auto-downloaded, in bytes
	MaxOtherFileSize int32 `json:"max_other_file_size"`
	// The maximum suggested bitrate for uploaded videos, in kbit/s
	VideoUploadBitrate int32 `json:"video_upload_bitrate"`
	// True, if the beginning of video files needs to be preloaded for instant playback
	PreloadLargeVideos bool `json:"preload_large_videos"`
	// True, if the next audio track needs to be preloaded while the user is listening to an audio file
	PreloadNextAudio bool `json:"preload_next_audio"`
	// True, if "use less data for calls" option needs to be enabled
	UseLessDataForCalls bool `json:"use_less_data_for_calls"`
	// contains filtered or unexported fields
}

Contains auto-download settings

func UnmarshalAutoDownloadSettings

func UnmarshalAutoDownloadSettings(data json.RawMessage) (*AutoDownloadSettings, error)

func (*AutoDownloadSettings) GetClass

func (*AutoDownloadSettings) GetClass() string

func (*AutoDownloadSettings) GetType

func (*AutoDownloadSettings) GetType() string

func (*AutoDownloadSettings) MarshalJSON

func (entity *AutoDownloadSettings) MarshalJSON() ([]byte, error)

type AutoDownloadSettingsPresets

type AutoDownloadSettingsPresets struct {

	// Preset with lowest settings; supposed to be used by default when roaming
	Low *AutoDownloadSettings `json:"low"`
	// Preset with medium settings; supposed to be used by default when using mobile data
	Medium *AutoDownloadSettings `json:"medium"`
	// Preset with highest settings; supposed to be used by default when connected on Wi-Fi
	High *AutoDownloadSettings `json:"high"`
	// contains filtered or unexported fields
}

Contains auto-download settings presets for the current user

func UnmarshalAutoDownloadSettingsPresets

func UnmarshalAutoDownloadSettingsPresets(data json.RawMessage) (*AutoDownloadSettingsPresets, error)

func (*AutoDownloadSettingsPresets) GetClass

func (*AutoDownloadSettingsPresets) GetClass() string

func (*AutoDownloadSettingsPresets) GetType

func (*AutoDownloadSettingsPresets) MarshalJSON

func (entity *AutoDownloadSettingsPresets) MarshalJSON() ([]byte, error)

type AvailableReactions added in v1.8.3

type AvailableReactions struct {

	// List of reactions
	Reactions []string `json:"reactions"`
	// contains filtered or unexported fields
}

Represents a list of available reactions

func UnmarshalAvailableReactions added in v1.8.3

func UnmarshalAvailableReactions(data json.RawMessage) (*AvailableReactions, error)

func (*AvailableReactions) GetClass added in v1.8.3

func (*AvailableReactions) GetClass() string

func (*AvailableReactions) GetType added in v1.8.3

func (*AvailableReactions) GetType() string

func (*AvailableReactions) MarshalJSON added in v1.8.3

func (entity *AvailableReactions) MarshalJSON() ([]byte, error)

type Background

type Background struct {

	// Unique background identifier
	Id JsonInt64 `json:"id"`
	// True, if this is one of default backgrounds
	IsDefault bool `json:"is_default"`
	// True, if the background is dark and is recommended to be used with dark theme
	IsDark bool `json:"is_dark"`
	// Unique background name
	Name string `json:"name"`
	// Document with the background; may be null. Null only for filled backgrounds
	Document *Document `json:"document"`
	// Type of the background
	Type BackgroundType `json:"type"`
	// contains filtered or unexported fields
}

Describes a chat background

func UnmarshalBackground

func UnmarshalBackground(data json.RawMessage) (*Background, error)

func (*Background) GetClass

func (*Background) GetClass() string

func (*Background) GetType

func (*Background) GetType() string

func (*Background) MarshalJSON

func (entity *Background) MarshalJSON() ([]byte, error)

func (*Background) UnmarshalJSON

func (background *Background) UnmarshalJSON(data []byte) error

type BackgroundFill

type BackgroundFill interface {
	BackgroundFillType() string
}

Describes a fill of a background

func UnmarshalBackgroundFill

func UnmarshalBackgroundFill(data json.RawMessage) (BackgroundFill, error)

func UnmarshalListOfBackgroundFill

func UnmarshalListOfBackgroundFill(dataList []json.RawMessage) ([]BackgroundFill, error)

type BackgroundFillFreeformGradient added in v1.7.10

type BackgroundFillFreeformGradient struct {

	// A list of 3 or 4 colors of the freeform gradients in the RGB24 format
	Colors []int32 `json:"colors"`
	// contains filtered or unexported fields
}

Describes a freeform gradient fill of a background

func UnmarshalBackgroundFillFreeformGradient added in v1.7.10

func UnmarshalBackgroundFillFreeformGradient(data json.RawMessage) (*BackgroundFillFreeformGradient, error)

func (*BackgroundFillFreeformGradient) BackgroundFillType added in v1.7.10

func (*BackgroundFillFreeformGradient) BackgroundFillType() string

func (*BackgroundFillFreeformGradient) GetClass added in v1.7.10

func (*BackgroundFillFreeformGradient) GetType added in v1.7.10

func (*BackgroundFillFreeformGradient) MarshalJSON added in v1.7.10

func (entity *BackgroundFillFreeformGradient) MarshalJSON() ([]byte, error)

type BackgroundFillGradient

type BackgroundFillGradient struct {

	// A top color of the background in the RGB24 format
	TopColor int32 `json:"top_color"`
	// A bottom color of the background in the RGB24 format
	BottomColor int32 `json:"bottom_color"`
	// Clockwise rotation angle of the gradient, in degrees; 0-359. Must be always divisible by 45
	RotationAngle int32 `json:"rotation_angle"`
	// contains filtered or unexported fields
}

Describes a gradient fill of a background

func UnmarshalBackgroundFillGradient

func UnmarshalBackgroundFillGradient(data json.RawMessage) (*BackgroundFillGradient, error)

func (*BackgroundFillGradient) BackgroundFillType

func (*BackgroundFillGradient) BackgroundFillType() string

func (*BackgroundFillGradient) GetClass

func (*BackgroundFillGradient) GetClass() string

func (*BackgroundFillGradient) GetType

func (*BackgroundFillGradient) GetType() string

func (*BackgroundFillGradient) MarshalJSON

func (entity *BackgroundFillGradient) MarshalJSON() ([]byte, error)

type BackgroundFillSolid

type BackgroundFillSolid struct {

	// A color of the background in the RGB24 format
	Color int32 `json:"color"`
	// contains filtered or unexported fields
}

Describes a solid fill of a background

func UnmarshalBackgroundFillSolid

func UnmarshalBackgroundFillSolid(data json.RawMessage) (*BackgroundFillSolid, error)

func (*BackgroundFillSolid) BackgroundFillType

func (*BackgroundFillSolid) BackgroundFillType() string

func (*BackgroundFillSolid) GetClass

func (*BackgroundFillSolid) GetClass() string

func (*BackgroundFillSolid) GetType

func (*BackgroundFillSolid) GetType() string

func (*BackgroundFillSolid) MarshalJSON

func (entity *BackgroundFillSolid) MarshalJSON() ([]byte, error)

type BackgroundType

type BackgroundType interface {
	BackgroundTypeType() string
}

Describes the type of a background

func UnmarshalBackgroundType

func UnmarshalBackgroundType(data json.RawMessage) (BackgroundType, error)

func UnmarshalListOfBackgroundType

func UnmarshalListOfBackgroundType(dataList []json.RawMessage) ([]BackgroundType, error)

type BackgroundTypeFill

type BackgroundTypeFill struct {

	// The background fill
	Fill BackgroundFill `json:"fill"`
	// contains filtered or unexported fields
}

A filled background

func UnmarshalBackgroundTypeFill

func UnmarshalBackgroundTypeFill(data json.RawMessage) (*BackgroundTypeFill, error)

func (*BackgroundTypeFill) BackgroundTypeType

func (*BackgroundTypeFill) BackgroundTypeType() string

func (*BackgroundTypeFill) GetClass

func (*BackgroundTypeFill) GetClass() string

func (*BackgroundTypeFill) GetType

func (*BackgroundTypeFill) GetType() string

func (*BackgroundTypeFill) MarshalJSON

func (entity *BackgroundTypeFill) MarshalJSON() ([]byte, error)

func (*BackgroundTypeFill) UnmarshalJSON

func (backgroundTypeFill *BackgroundTypeFill) UnmarshalJSON(data []byte) error

type BackgroundTypePattern

type BackgroundTypePattern struct {

	// Fill of the background
	Fill BackgroundFill `json:"fill"`
	// Intensity of the pattern when it is shown above the filled background; 0-100.
	Intensity int32 `json:"intensity"`
	// True, if the background fill must be applied only to the pattern itself. All other pixels are black in this case. For dark themes only
	IsInverted bool `json:"is_inverted"`
	// True, if the background needs to be slightly moved when device is tilted
	IsMoving bool `json:"is_moving"`
	// contains filtered or unexported fields
}

A PNG or TGV (gzipped subset of SVG with MIME type "application/x-tgwallpattern") pattern to be combined with the background fill chosen by the user

func UnmarshalBackgroundTypePattern

func UnmarshalBackgroundTypePattern(data json.RawMessage) (*BackgroundTypePattern, error)

func (*BackgroundTypePattern) BackgroundTypeType

func (*BackgroundTypePattern) BackgroundTypeType() string

func (*BackgroundTypePattern) GetClass

func (*BackgroundTypePattern) GetClass() string

func (*BackgroundTypePattern) GetType

func (*BackgroundTypePattern) GetType() string

func (*BackgroundTypePattern) MarshalJSON

func (entity *BackgroundTypePattern) MarshalJSON() ([]byte, error)

func (*BackgroundTypePattern) UnmarshalJSON

func (backgroundTypePattern *BackgroundTypePattern) UnmarshalJSON(data []byte) error

type BackgroundTypeWallpaper

type BackgroundTypeWallpaper struct {

	// True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12
	IsBlurred bool `json:"is_blurred"`
	// True, if the background needs to be slightly moved when device is tilted
	IsMoving bool `json:"is_moving"`
	// contains filtered or unexported fields
}

A wallpaper in JPEG format

func UnmarshalBackgroundTypeWallpaper

func UnmarshalBackgroundTypeWallpaper(data json.RawMessage) (*BackgroundTypeWallpaper, error)

func (*BackgroundTypeWallpaper) BackgroundTypeType

func (*BackgroundTypeWallpaper) BackgroundTypeType() string

func (*BackgroundTypeWallpaper) GetClass

func (*BackgroundTypeWallpaper) GetClass() string

func (*BackgroundTypeWallpaper) GetType

func (*BackgroundTypeWallpaper) GetType() string

func (*BackgroundTypeWallpaper) MarshalJSON

func (entity *BackgroundTypeWallpaper) MarshalJSON() ([]byte, error)

type Backgrounds

type Backgrounds struct {

	// A list of backgrounds
	Backgrounds []*Background `json:"backgrounds"`
	// contains filtered or unexported fields
}

Contains a list of backgrounds

func UnmarshalBackgrounds

func UnmarshalBackgrounds(data json.RawMessage) (*Backgrounds, error)

func (*Backgrounds) GetClass

func (*Backgrounds) GetClass() string

func (*Backgrounds) GetType

func (*Backgrounds) GetType() string

func (*Backgrounds) MarshalJSON

func (entity *Backgrounds) MarshalJSON() ([]byte, error)

type BanChatMemberRequest added in v1.7.10

type BanChatMemberRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Member identifier
	MemberId MessageSender `json:"member_id"`
	// Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned
	BannedUntilDate int32 `json:"banned_until_date"`
	// Pass true to delete all messages in the chat for the user that is being removed. Always true for supergroups and channels
	RevokeMessages bool `json:"revoke_messages"`
}

type BankCardActionOpenUrl

type BankCardActionOpenUrl struct {

	// Action text
	Text string `json:"text"`
	// The URL to be opened
	Url string `json:"url"`
	// contains filtered or unexported fields
}

Describes an action associated with a bank card number

func UnmarshalBankCardActionOpenUrl

func UnmarshalBankCardActionOpenUrl(data json.RawMessage) (*BankCardActionOpenUrl, error)

func (*BankCardActionOpenUrl) GetClass

func (*BankCardActionOpenUrl) GetClass() string

func (*BankCardActionOpenUrl) GetType

func (*BankCardActionOpenUrl) GetType() string

func (*BankCardActionOpenUrl) MarshalJSON

func (entity *BankCardActionOpenUrl) MarshalJSON() ([]byte, error)

type BankCardInfo

type BankCardInfo struct {

	// Title of the bank card description
	Title string `json:"title"`
	// Actions that can be done with the bank card number
	Actions []*BankCardActionOpenUrl `json:"actions"`
	// contains filtered or unexported fields
}

Information about a bank card

func UnmarshalBankCardInfo

func UnmarshalBankCardInfo(data json.RawMessage) (*BankCardInfo, error)

func (*BankCardInfo) GetClass

func (*BankCardInfo) GetClass() string

func (*BankCardInfo) GetType

func (*BankCardInfo) GetType() string

func (*BankCardInfo) MarshalJSON

func (entity *BankCardInfo) MarshalJSON() ([]byte, error)

type BasicGroup

type BasicGroup struct {

	// Group identifier
	Id int64 `json:"id"`
	// Number of members in the group
	MemberCount int32 `json:"member_count"`
	// Status of the current user in the group
	Status ChatMemberStatus `json:"status"`
	// True, if the group is active
	IsActive bool `json:"is_active"`
	// Identifier of the supergroup to which this group was upgraded; 0 if none
	UpgradedToSupergroupId int64 `json:"upgraded_to_supergroup_id"`
	// contains filtered or unexported fields
}

Represents a basic group of 0-200 users (must be upgraded to a supergroup to accommodate more than 200 users)

func UnmarshalBasicGroup

func UnmarshalBasicGroup(data json.RawMessage) (*BasicGroup, error)

func (*BasicGroup) GetClass

func (*BasicGroup) GetClass() string

func (*BasicGroup) GetType

func (*BasicGroup) GetType() string

func (*BasicGroup) MarshalJSON

func (entity *BasicGroup) MarshalJSON() ([]byte, error)

func (*BasicGroup) UnmarshalJSON

func (basicGroup *BasicGroup) UnmarshalJSON(data []byte) error

type BasicGroupFullInfo

type BasicGroupFullInfo struct {

	// Chat photo; may be null
	Photo *ChatPhoto `json:"photo"`
	// Group description. Updated only after the basic group is opened
	Description string `json:"description"`
	// User identifier of the creator of the group; 0 if unknown
	CreatorUserId int64 `json:"creator_user_id"`
	// Group members
	Members []*ChatMember `json:"members"`
	// Primary invite link for this group; may be null. For chat administrators with can_invite_users right only. Updated only after the basic group is opened
	InviteLink *ChatInviteLink `json:"invite_link"`
	// List of commands of bots in the group
	BotCommands []*BotCommands `json:"bot_commands"`
	// contains filtered or unexported fields
}

Contains full information about a basic group

func UnmarshalBasicGroupFullInfo

func UnmarshalBasicGroupFullInfo(data json.RawMessage) (*BasicGroupFullInfo, error)

func (*BasicGroupFullInfo) GetClass

func (*BasicGroupFullInfo) GetClass() string

func (*BasicGroupFullInfo) GetType

func (*BasicGroupFullInfo) GetType() string

func (*BasicGroupFullInfo) MarshalJSON

func (entity *BasicGroupFullInfo) MarshalJSON() ([]byte, error)

type BlockMessageSenderFromRepliesRequest

type BlockMessageSenderFromRepliesRequest struct {
	// The identifier of an incoming message in the Replies chat
	MessageId int64 `json:"message_id"`
	// Pass true to delete the message
	DeleteMessage bool `json:"delete_message"`
	// Pass true to delete all messages from the same sender
	DeleteAllMessages bool `json:"delete_all_messages"`
	// Pass true to report the sender to the Telegram moderators
	ReportSpam bool `json:"report_spam"`
}

type BotCommand

type BotCommand struct {

	// Text of the bot command
	Command string `json:"command"`
	// Description of the bot command
	Description string `json:"description"`
	// contains filtered or unexported fields
}

Represents a command supported by a bot

func UnmarshalBotCommand

func UnmarshalBotCommand(data json.RawMessage) (*BotCommand, error)

func (*BotCommand) GetClass

func (*BotCommand) GetClass() string

func (*BotCommand) GetType

func (*BotCommand) GetType() string

func (*BotCommand) MarshalJSON

func (entity *BotCommand) MarshalJSON() ([]byte, error)

type BotCommandScope added in v1.7.10

type BotCommandScope interface {
	BotCommandScopeType() string
}

Represents the scope to which bot commands are relevant

func UnmarshalBotCommandScope added in v1.7.10

func UnmarshalBotCommandScope(data json.RawMessage) (BotCommandScope, error)

func UnmarshalListOfBotCommandScope added in v1.7.10

func UnmarshalListOfBotCommandScope(dataList []json.RawMessage) ([]BotCommandScope, error)

type BotCommandScopeAllChatAdministrators added in v1.7.10

type BotCommandScopeAllChatAdministrators struct {
	// contains filtered or unexported fields
}

A scope covering all group and supergroup chat administrators

func UnmarshalBotCommandScopeAllChatAdministrators added in v1.7.10

func UnmarshalBotCommandScopeAllChatAdministrators(data json.RawMessage) (*BotCommandScopeAllChatAdministrators, error)

func (*BotCommandScopeAllChatAdministrators) BotCommandScopeType added in v1.7.10

func (*BotCommandScopeAllChatAdministrators) BotCommandScopeType() string

func (*BotCommandScopeAllChatAdministrators) GetClass added in v1.7.10

func (*BotCommandScopeAllChatAdministrators) GetType added in v1.7.10

func (*BotCommandScopeAllChatAdministrators) MarshalJSON added in v1.7.10

func (entity *BotCommandScopeAllChatAdministrators) MarshalJSON() ([]byte, error)

type BotCommandScopeAllGroupChats added in v1.7.10

type BotCommandScopeAllGroupChats struct {
	// contains filtered or unexported fields
}

A scope covering all group and supergroup chats

func UnmarshalBotCommandScopeAllGroupChats added in v1.7.10

func UnmarshalBotCommandScopeAllGroupChats(data json.RawMessage) (*BotCommandScopeAllGroupChats, error)

func (*BotCommandScopeAllGroupChats) BotCommandScopeType added in v1.7.10

func (*BotCommandScopeAllGroupChats) BotCommandScopeType() string

func (*BotCommandScopeAllGroupChats) GetClass added in v1.7.10

func (*BotCommandScopeAllGroupChats) GetType added in v1.7.10

func (*BotCommandScopeAllGroupChats) MarshalJSON added in v1.7.10

func (entity *BotCommandScopeAllGroupChats) MarshalJSON() ([]byte, error)

type BotCommandScopeAllPrivateChats added in v1.7.10

type BotCommandScopeAllPrivateChats struct {
	// contains filtered or unexported fields
}

A scope covering all private chats

func UnmarshalBotCommandScopeAllPrivateChats added in v1.7.10

func UnmarshalBotCommandScopeAllPrivateChats(data json.RawMessage) (*BotCommandScopeAllPrivateChats, error)

func (*BotCommandScopeAllPrivateChats) BotCommandScopeType added in v1.7.10

func (*BotCommandScopeAllPrivateChats) BotCommandScopeType() string

func (*BotCommandScopeAllPrivateChats) GetClass added in v1.7.10

func (*BotCommandScopeAllPrivateChats) GetType added in v1.7.10

func (*BotCommandScopeAllPrivateChats) MarshalJSON added in v1.7.10

func (entity *BotCommandScopeAllPrivateChats) MarshalJSON() ([]byte, error)

type BotCommandScopeChat added in v1.7.10

type BotCommandScopeChat struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// contains filtered or unexported fields
}

A scope covering all members of a chat

func UnmarshalBotCommandScopeChat added in v1.7.10

func UnmarshalBotCommandScopeChat(data json.RawMessage) (*BotCommandScopeChat, error)

func (*BotCommandScopeChat) BotCommandScopeType added in v1.7.10

func (*BotCommandScopeChat) BotCommandScopeType() string

func (*BotCommandScopeChat) GetClass added in v1.7.10

func (*BotCommandScopeChat) GetClass() string

func (*BotCommandScopeChat) GetType added in v1.7.10

func (*BotCommandScopeChat) GetType() string

func (*BotCommandScopeChat) MarshalJSON added in v1.7.10

func (entity *BotCommandScopeChat) MarshalJSON() ([]byte, error)

type BotCommandScopeChatAdministrators added in v1.7.10

type BotCommandScopeChatAdministrators struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// contains filtered or unexported fields
}

A scope covering all administrators of a chat

func UnmarshalBotCommandScopeChatAdministrators added in v1.7.10

func UnmarshalBotCommandScopeChatAdministrators(data json.RawMessage) (*BotCommandScopeChatAdministrators, error)

func (*BotCommandScopeChatAdministrators) BotCommandScopeType added in v1.7.10

func (*BotCommandScopeChatAdministrators) BotCommandScopeType() string

func (*BotCommandScopeChatAdministrators) GetClass added in v1.7.10

func (*BotCommandScopeChatAdministrators) GetType added in v1.7.10

func (*BotCommandScopeChatAdministrators) MarshalJSON added in v1.7.10

func (entity *BotCommandScopeChatAdministrators) MarshalJSON() ([]byte, error)

type BotCommandScopeChatMember added in v1.7.10

type BotCommandScopeChatMember struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// User identifier
	UserId int64 `json:"user_id"`
	// contains filtered or unexported fields
}

A scope covering a member of a chat

func UnmarshalBotCommandScopeChatMember added in v1.7.10

func UnmarshalBotCommandScopeChatMember(data json.RawMessage) (*BotCommandScopeChatMember, error)

func (*BotCommandScopeChatMember) BotCommandScopeType added in v1.7.10

func (*BotCommandScopeChatMember) BotCommandScopeType() string

func (*BotCommandScopeChatMember) GetClass added in v1.7.10

func (*BotCommandScopeChatMember) GetClass() string

func (*BotCommandScopeChatMember) GetType added in v1.7.10

func (*BotCommandScopeChatMember) GetType() string

func (*BotCommandScopeChatMember) MarshalJSON added in v1.7.10

func (entity *BotCommandScopeChatMember) MarshalJSON() ([]byte, error)

type BotCommandScopeDefault added in v1.7.10

type BotCommandScopeDefault struct {
	// contains filtered or unexported fields
}

A scope covering all users

func UnmarshalBotCommandScopeDefault added in v1.7.10

func UnmarshalBotCommandScopeDefault(data json.RawMessage) (*BotCommandScopeDefault, error)

func (*BotCommandScopeDefault) BotCommandScopeType added in v1.7.10

func (*BotCommandScopeDefault) BotCommandScopeType() string

func (*BotCommandScopeDefault) GetClass added in v1.7.10

func (*BotCommandScopeDefault) GetClass() string

func (*BotCommandScopeDefault) GetType added in v1.7.10

func (*BotCommandScopeDefault) GetType() string

func (*BotCommandScopeDefault) MarshalJSON added in v1.7.10

func (entity *BotCommandScopeDefault) MarshalJSON() ([]byte, error)

type BotCommands added in v1.7.10

type BotCommands struct {

	// Bot's user identifier
	BotUserId int64 `json:"bot_user_id"`
	// List of bot commands
	Commands []*BotCommand `json:"commands"`
	// contains filtered or unexported fields
}

Contains a list of bot commands

func UnmarshalBotCommands added in v1.7.10

func UnmarshalBotCommands(data json.RawMessage) (*BotCommands, error)

func (*BotCommands) GetClass added in v1.7.10

func (*BotCommands) GetClass() string

func (*BotCommands) GetType added in v1.7.10

func (*BotCommands) GetType() string

func (*BotCommands) MarshalJSON added in v1.7.10

func (entity *BotCommands) MarshalJSON() ([]byte, error)

type BotInfo

type BotInfo struct {

	// The text that is shown on the bot's profile page and is sent together with the link when users share the bot
	ShareText string `json:"share_text"`
	// The text shown in the chat with the bot if the chat is empty
	Description string `json:"description"`
	// Information about a button to show instead of the bot commands menu button; may be null if ordinary bot commands menu must be shown
	MenuButton *BotMenuButton `json:"menu_button"`
	// List of the bot commands
	Commands []*BotCommand `json:"commands"`
	// Default administrator rights for adding the bot to basic group and supergroup chats; may be null
	DefaultGroupAdministratorRights *ChatAdministratorRights `json:"default_group_administrator_rights"`
	// Default administrator rights for adding the bot to channels; may be null
	DefaultChannelAdministratorRights *ChatAdministratorRights `json:"default_channel_administrator_rights"`
	// contains filtered or unexported fields
}

Contains information about a bot

func UnmarshalBotInfo

func UnmarshalBotInfo(data json.RawMessage) (*BotInfo, error)

func (*BotInfo) GetClass

func (*BotInfo) GetClass() string

func (*BotInfo) GetType

func (*BotInfo) GetType() string

func (*BotInfo) MarshalJSON

func (entity *BotInfo) MarshalJSON() ([]byte, error)

type BotMenuButton added in v1.8.3

type BotMenuButton struct {

	// Text of the button
	Text string `json:"text"`
	// URL to be passed to openWebApp
	Url string `json:"url"`
	// contains filtered or unexported fields
}

Describes a button to be shown instead of bot commands menu button

func UnmarshalBotMenuButton added in v1.8.3

func UnmarshalBotMenuButton(data json.RawMessage) (*BotMenuButton, error)

func (*BotMenuButton) GetClass added in v1.8.3

func (*BotMenuButton) GetClass() string

func (*BotMenuButton) GetType added in v1.8.3

func (*BotMenuButton) GetType() string

func (*BotMenuButton) MarshalJSON added in v1.8.3

func (entity *BotMenuButton) MarshalJSON() ([]byte, error)

type Call

type Call struct {

	// Call identifier, not persistent
	Id int32 `json:"id"`
	// Peer user identifier
	UserId int64 `json:"user_id"`
	// True, if the call is outgoing
	IsOutgoing bool `json:"is_outgoing"`
	// True, if the call is a video call
	IsVideo bool `json:"is_video"`
	// Call state
	State CallState `json:"state"`
	// contains filtered or unexported fields
}

Describes a call

func UnmarshalCall

func UnmarshalCall(data json.RawMessage) (*Call, error)

func (*Call) GetClass

func (*Call) GetClass() string

func (*Call) GetType

func (*Call) GetType() string

func (*Call) MarshalJSON

func (entity *Call) MarshalJSON() ([]byte, error)

func (*Call) UnmarshalJSON

func (call *Call) UnmarshalJSON(data []byte) error

type CallDiscardReason

type CallDiscardReason interface {
	CallDiscardReasonType() string
}

Describes the reason why a call was discarded

func UnmarshalCallDiscardReason

func UnmarshalCallDiscardReason(data json.RawMessage) (CallDiscardReason, error)

func UnmarshalListOfCallDiscardReason

func UnmarshalListOfCallDiscardReason(dataList []json.RawMessage) ([]CallDiscardReason, error)

type CallDiscardReasonDeclined

type CallDiscardReasonDeclined struct {
	// contains filtered or unexported fields
}

The call was ended before the conversation started. It was declined by the other party

func UnmarshalCallDiscardReasonDeclined

func UnmarshalCallDiscardReasonDeclined(data json.RawMessage) (*CallDiscardReasonDeclined, error)

func (*CallDiscardReasonDeclined) CallDiscardReasonType

func (*CallDiscardReasonDeclined) CallDiscardReasonType() string

func (*CallDiscardReasonDeclined) GetClass

func (*CallDiscardReasonDeclined) GetClass() string

func (*CallDiscardReasonDeclined) GetType

func (*CallDiscardReasonDeclined) GetType() string

func (*CallDiscardReasonDeclined) MarshalJSON

func (entity *CallDiscardReasonDeclined) MarshalJSON() ([]byte, error)

type CallDiscardReasonDisconnected

type CallDiscardReasonDisconnected struct {
	// contains filtered or unexported fields
}

The call was ended during the conversation because the users were disconnected

func UnmarshalCallDiscardReasonDisconnected

func UnmarshalCallDiscardReasonDisconnected(data json.RawMessage) (*CallDiscardReasonDisconnected, error)

func (*CallDiscardReasonDisconnected) CallDiscardReasonType

func (*CallDiscardReasonDisconnected) CallDiscardReasonType() string

func (*CallDiscardReasonDisconnected) GetClass

func (*CallDiscardReasonDisconnected) GetType

func (*CallDiscardReasonDisconnected) MarshalJSON

func (entity *CallDiscardReasonDisconnected) MarshalJSON() ([]byte, error)

type CallDiscardReasonEmpty

type CallDiscardReasonEmpty struct {
	// contains filtered or unexported fields
}

The call wasn't discarded, or the reason is unknown

func UnmarshalCallDiscardReasonEmpty

func UnmarshalCallDiscardReasonEmpty(data json.RawMessage) (*CallDiscardReasonEmpty, error)

func (*CallDiscardReasonEmpty) CallDiscardReasonType

func (*CallDiscardReasonEmpty) CallDiscardReasonType() string

func (*CallDiscardReasonEmpty) GetClass

func (*CallDiscardReasonEmpty) GetClass() string

func (*CallDiscardReasonEmpty) GetType

func (*CallDiscardReasonEmpty) GetType() string

func (*CallDiscardReasonEmpty) MarshalJSON

func (entity *CallDiscardReasonEmpty) MarshalJSON() ([]byte, error)

type CallDiscardReasonHungUp

type CallDiscardReasonHungUp struct {
	// contains filtered or unexported fields
}

The call was ended because one of the parties hung up

func UnmarshalCallDiscardReasonHungUp

func UnmarshalCallDiscardReasonHungUp(data json.RawMessage) (*CallDiscardReasonHungUp, error)

func (*CallDiscardReasonHungUp) CallDiscardReasonType

func (*CallDiscardReasonHungUp) CallDiscardReasonType() string

func (*CallDiscardReasonHungUp) GetClass

func (*CallDiscardReasonHungUp) GetClass() string

func (*CallDiscardReasonHungUp) GetType

func (*CallDiscardReasonHungUp) GetType() string

func (*CallDiscardReasonHungUp) MarshalJSON

func (entity *CallDiscardReasonHungUp) MarshalJSON() ([]byte, error)

type CallDiscardReasonMissed

type CallDiscardReasonMissed struct {
	// contains filtered or unexported fields
}

The call was ended before the conversation started. It was canceled by the caller or missed by the other party

func UnmarshalCallDiscardReasonMissed

func UnmarshalCallDiscardReasonMissed(data json.RawMessage) (*CallDiscardReasonMissed, error)

func (*CallDiscardReasonMissed) CallDiscardReasonType

func (*CallDiscardReasonMissed) CallDiscardReasonType() string

func (*CallDiscardReasonMissed) GetClass

func (*CallDiscardReasonMissed) GetClass() string

func (*CallDiscardReasonMissed) GetType

func (*CallDiscardReasonMissed) GetType() string

func (*CallDiscardReasonMissed) MarshalJSON

func (entity *CallDiscardReasonMissed) MarshalJSON() ([]byte, error)

type CallId

type CallId struct {

	// Call identifier
	Id int32 `json:"id"`
	// contains filtered or unexported fields
}

Contains the call identifier

func UnmarshalCallId

func UnmarshalCallId(data json.RawMessage) (*CallId, error)

func (*CallId) GetClass

func (*CallId) GetClass() string

func (*CallId) GetType

func (*CallId) GetType() string

func (*CallId) MarshalJSON

func (entity *CallId) MarshalJSON() ([]byte, error)

type CallProblem

type CallProblem interface {
	CallProblemType() string
}

Describes the exact type of a problem with a call

func UnmarshalCallProblem

func UnmarshalCallProblem(data json.RawMessage) (CallProblem, error)

func UnmarshalListOfCallProblem

func UnmarshalListOfCallProblem(dataList []json.RawMessage) ([]CallProblem, error)

type CallProblemDistortedSpeech

type CallProblemDistortedSpeech struct {
	// contains filtered or unexported fields
}

The speech was distorted

func UnmarshalCallProblemDistortedSpeech

func UnmarshalCallProblemDistortedSpeech(data json.RawMessage) (*CallProblemDistortedSpeech, error)

func (*CallProblemDistortedSpeech) CallProblemType

func (*CallProblemDistortedSpeech) CallProblemType() string

func (*CallProblemDistortedSpeech) GetClass

func (*CallProblemDistortedSpeech) GetClass() string

func (*CallProblemDistortedSpeech) GetType

func (*CallProblemDistortedSpeech) MarshalJSON

func (entity *CallProblemDistortedSpeech) MarshalJSON() ([]byte, error)

type CallProblemDistortedVideo

type CallProblemDistortedVideo struct {
	// contains filtered or unexported fields
}

The video was distorted

func UnmarshalCallProblemDistortedVideo

func UnmarshalCallProblemDistortedVideo(data json.RawMessage) (*CallProblemDistortedVideo, error)

func (*CallProblemDistortedVideo) CallProblemType

func (*CallProblemDistortedVideo) CallProblemType() string

func (*CallProblemDistortedVideo) GetClass

func (*CallProblemDistortedVideo) GetClass() string

func (*CallProblemDistortedVideo) GetType

func (*CallProblemDistortedVideo) GetType() string

func (*CallProblemDistortedVideo) MarshalJSON

func (entity *CallProblemDistortedVideo) MarshalJSON() ([]byte, error)

type CallProblemDropped

type CallProblemDropped struct {
	// contains filtered or unexported fields
}

The call ended unexpectedly

func UnmarshalCallProblemDropped

func UnmarshalCallProblemDropped(data json.RawMessage) (*CallProblemDropped, error)

func (*CallProblemDropped) CallProblemType

func (*CallProblemDropped) CallProblemType() string

func (*CallProblemDropped) GetClass

func (*CallProblemDropped) GetClass() string

func (*CallProblemDropped) GetType

func (*CallProblemDropped) GetType() string

func (*CallProblemDropped) MarshalJSON

func (entity *CallProblemDropped) MarshalJSON() ([]byte, error)

type CallProblemEcho

type CallProblemEcho struct {
	// contains filtered or unexported fields
}

The user heard their own voice

func UnmarshalCallProblemEcho

func UnmarshalCallProblemEcho(data json.RawMessage) (*CallProblemEcho, error)

func (*CallProblemEcho) CallProblemType

func (*CallProblemEcho) CallProblemType() string

func (*CallProblemEcho) GetClass

func (*CallProblemEcho) GetClass() string

func (*CallProblemEcho) GetType

func (*CallProblemEcho) GetType() string

func (*CallProblemEcho) MarshalJSON

func (entity *CallProblemEcho) MarshalJSON() ([]byte, error)

type CallProblemInterruptions

type CallProblemInterruptions struct {
	// contains filtered or unexported fields
}

The other side kept disappearing

func UnmarshalCallProblemInterruptions

func UnmarshalCallProblemInterruptions(data json.RawMessage) (*CallProblemInterruptions, error)

func (*CallProblemInterruptions) CallProblemType

func (*CallProblemInterruptions) CallProblemType() string

func (*CallProblemInterruptions) GetClass

func (*CallProblemInterruptions) GetClass() string

func (*CallProblemInterruptions) GetType

func (*CallProblemInterruptions) GetType() string

func (*CallProblemInterruptions) MarshalJSON

func (entity *CallProblemInterruptions) MarshalJSON() ([]byte, error)

type CallProblemNoise

type CallProblemNoise struct {
	// contains filtered or unexported fields
}

The user heard background noise

func UnmarshalCallProblemNoise

func UnmarshalCallProblemNoise(data json.RawMessage) (*CallProblemNoise, error)

func (*CallProblemNoise) CallProblemType

func (*CallProblemNoise) CallProblemType() string

func (*CallProblemNoise) GetClass

func (*CallProblemNoise) GetClass() string

func (*CallProblemNoise) GetType

func (*CallProblemNoise) GetType() string

func (*CallProblemNoise) MarshalJSON

func (entity *CallProblemNoise) MarshalJSON() ([]byte, error)

type CallProblemPixelatedVideo

type CallProblemPixelatedVideo struct {
	// contains filtered or unexported fields
}

The video was pixelated

func UnmarshalCallProblemPixelatedVideo

func UnmarshalCallProblemPixelatedVideo(data json.RawMessage) (*CallProblemPixelatedVideo, error)

func (*CallProblemPixelatedVideo) CallProblemType

func (*CallProblemPixelatedVideo) CallProblemType() string

func (*CallProblemPixelatedVideo) GetClass

func (*CallProblemPixelatedVideo) GetClass() string

func (*CallProblemPixelatedVideo) GetType

func (*CallProblemPixelatedVideo) GetType() string

func (*CallProblemPixelatedVideo) MarshalJSON

func (entity *CallProblemPixelatedVideo) MarshalJSON() ([]byte, error)

type CallProblemSilentLocal

type CallProblemSilentLocal struct {
	// contains filtered or unexported fields
}

The user couldn't hear the other side

func UnmarshalCallProblemSilentLocal

func UnmarshalCallProblemSilentLocal(data json.RawMessage) (*CallProblemSilentLocal, error)

func (*CallProblemSilentLocal) CallProblemType

func (*CallProblemSilentLocal) CallProblemType() string

func (*CallProblemSilentLocal) GetClass

func (*CallProblemSilentLocal) GetClass() string

func (*CallProblemSilentLocal) GetType

func (*CallProblemSilentLocal) GetType() string

func (*CallProblemSilentLocal) MarshalJSON

func (entity *CallProblemSilentLocal) MarshalJSON() ([]byte, error)

type CallProblemSilentRemote

type CallProblemSilentRemote struct {
	// contains filtered or unexported fields
}

The other side couldn't hear the user

func UnmarshalCallProblemSilentRemote

func UnmarshalCallProblemSilentRemote(data json.RawMessage) (*CallProblemSilentRemote, error)

func (*CallProblemSilentRemote) CallProblemType

func (*CallProblemSilentRemote) CallProblemType() string

func (*CallProblemSilentRemote) GetClass

func (*CallProblemSilentRemote) GetClass() string

func (*CallProblemSilentRemote) GetType

func (*CallProblemSilentRemote) GetType() string

func (*CallProblemSilentRemote) MarshalJSON

func (entity *CallProblemSilentRemote) MarshalJSON() ([]byte, error)

type CallProtocol

type CallProtocol struct {

	// True, if UDP peer-to-peer connections are supported
	UdpP2p bool `json:"udp_p2p"`
	// True, if connection through UDP reflectors is supported
	UdpReflector bool `json:"udp_reflector"`
	// The minimum supported API layer; use 65
	MinLayer int32 `json:"min_layer"`
	// The maximum supported API layer; use 65
	MaxLayer int32 `json:"max_layer"`
	// List of supported tgcalls versions
	LibraryVersions []string `json:"library_versions"`
	// contains filtered or unexported fields
}

Specifies the supported call protocols

func UnmarshalCallProtocol

func UnmarshalCallProtocol(data json.RawMessage) (*CallProtocol, error)

func (*CallProtocol) GetClass

func (*CallProtocol) GetClass() string

func (*CallProtocol) GetType

func (*CallProtocol) GetType() string

func (*CallProtocol) MarshalJSON

func (entity *CallProtocol) MarshalJSON() ([]byte, error)

type CallServer

type CallServer struct {

	// Server identifier
	Id JsonInt64 `json:"id"`
	// Server IPv4 address
	IpAddress string `json:"ip_address"`
	// Server IPv6 address
	Ipv6Address string `json:"ipv6_address"`
	// Server port number
	Port int32 `json:"port"`
	// Server type
	Type CallServerType `json:"type"`
	// contains filtered or unexported fields
}

Describes a server for relaying call data

func UnmarshalCallServer

func UnmarshalCallServer(data json.RawMessage) (*CallServer, error)

func (*CallServer) GetClass

func (*CallServer) GetClass() string

func (*CallServer) GetType

func (*CallServer) GetType() string

func (*CallServer) MarshalJSON

func (entity *CallServer) MarshalJSON() ([]byte, error)

func (*CallServer) UnmarshalJSON

func (callServer *CallServer) UnmarshalJSON(data []byte) error

type CallServerType

type CallServerType interface {
	CallServerTypeType() string
}

Describes the type of a call server

func UnmarshalCallServerType

func UnmarshalCallServerType(data json.RawMessage) (CallServerType, error)

func UnmarshalListOfCallServerType

func UnmarshalListOfCallServerType(dataList []json.RawMessage) ([]CallServerType, error)

type CallServerTypeTelegramReflector

type CallServerTypeTelegramReflector struct {

	// A peer tag to be used with the reflector
	PeerTag []byte `json:"peer_tag"`
	// contains filtered or unexported fields
}

A Telegram call reflector

func UnmarshalCallServerTypeTelegramReflector

func UnmarshalCallServerTypeTelegramReflector(data json.RawMessage) (*CallServerTypeTelegramReflector, error)

func (*CallServerTypeTelegramReflector) CallServerTypeType

func (*CallServerTypeTelegramReflector) CallServerTypeType() string

func (*CallServerTypeTelegramReflector) GetClass

func (*CallServerTypeTelegramReflector) GetType

func (*CallServerTypeTelegramReflector) MarshalJSON

func (entity *CallServerTypeTelegramReflector) MarshalJSON() ([]byte, error)

type CallServerTypeWebrtc

type CallServerTypeWebrtc struct {

	// Username to be used for authentication
	Username string `json:"username"`
	// Authentication password
	Password string `json:"password"`
	// True, if the server supports TURN
	SupportsTurn bool `json:"supports_turn"`
	// True, if the server supports STUN
	SupportsStun bool `json:"supports_stun"`
	// contains filtered or unexported fields
}

A WebRTC server

func UnmarshalCallServerTypeWebrtc

func UnmarshalCallServerTypeWebrtc(data json.RawMessage) (*CallServerTypeWebrtc, error)

func (*CallServerTypeWebrtc) CallServerTypeType

func (*CallServerTypeWebrtc) CallServerTypeType() string

func (*CallServerTypeWebrtc) GetClass

func (*CallServerTypeWebrtc) GetClass() string

func (*CallServerTypeWebrtc) GetType

func (*CallServerTypeWebrtc) GetType() string

func (*CallServerTypeWebrtc) MarshalJSON

func (entity *CallServerTypeWebrtc) MarshalJSON() ([]byte, error)

type CallState

type CallState interface {
	CallStateType() string
}

Describes the current call state

func UnmarshalCallState

func UnmarshalCallState(data json.RawMessage) (CallState, error)

func UnmarshalListOfCallState

func UnmarshalListOfCallState(dataList []json.RawMessage) ([]CallState, error)

type CallStateDiscarded

type CallStateDiscarded struct {

	// The reason, why the call has ended
	Reason CallDiscardReason `json:"reason"`
	// True, if the call rating must be sent to the server
	NeedRating bool `json:"need_rating"`
	// True, if the call debug information must be sent to the server
	NeedDebugInformation bool `json:"need_debug_information"`
	// contains filtered or unexported fields
}

The call has ended successfully

func UnmarshalCallStateDiscarded

func UnmarshalCallStateDiscarded(data json.RawMessage) (*CallStateDiscarded, error)

func (*CallStateDiscarded) CallStateType

func (*CallStateDiscarded) CallStateType() string

func (*CallStateDiscarded) GetClass

func (*CallStateDiscarded) GetClass() string

func (*CallStateDiscarded) GetType

func (*CallStateDiscarded) GetType() string

func (*CallStateDiscarded) MarshalJSON

func (entity *CallStateDiscarded) MarshalJSON() ([]byte, error)

func (*CallStateDiscarded) UnmarshalJSON

func (callStateDiscarded *CallStateDiscarded) UnmarshalJSON(data []byte) error

type CallStateError

type CallStateError struct {

	// Error. An error with the code 4005000 will be returned if an outgoing call is missed because of an expired timeout
	Error *Error `json:"error"`
	// contains filtered or unexported fields
}

The call has ended with an error

func UnmarshalCallStateError

func UnmarshalCallStateError(data json.RawMessage) (*CallStateError, error)

func (*CallStateError) CallStateType

func (*CallStateError) CallStateType() string

func (*CallStateError) GetClass

func (*CallStateError) GetClass() string

func (*CallStateError) GetType

func (*CallStateError) GetType() string

func (*CallStateError) MarshalJSON

func (entity *CallStateError) MarshalJSON() ([]byte, error)

type CallStateExchangingKeys

type CallStateExchangingKeys struct {
	// contains filtered or unexported fields
}

The call has been answered and encryption keys are being exchanged

func UnmarshalCallStateExchangingKeys

func UnmarshalCallStateExchangingKeys(data json.RawMessage) (*CallStateExchangingKeys, error)

func (*CallStateExchangingKeys) CallStateType

func (*CallStateExchangingKeys) CallStateType() string

func (*CallStateExchangingKeys) GetClass

func (*CallStateExchangingKeys) GetClass() string

func (*CallStateExchangingKeys) GetType

func (*CallStateExchangingKeys) GetType() string

func (*CallStateExchangingKeys) MarshalJSON

func (entity *CallStateExchangingKeys) MarshalJSON() ([]byte, error)

type CallStateHangingUp

type CallStateHangingUp struct {
	// contains filtered or unexported fields
}

The call is hanging up after discardCall has been called

func UnmarshalCallStateHangingUp

func UnmarshalCallStateHangingUp(data json.RawMessage) (*CallStateHangingUp, error)

func (*CallStateHangingUp) CallStateType

func (*CallStateHangingUp) CallStateType() string

func (*CallStateHangingUp) GetClass

func (*CallStateHangingUp) GetClass() string

func (*CallStateHangingUp) GetType

func (*CallStateHangingUp) GetType() string

func (*CallStateHangingUp) MarshalJSON

func (entity *CallStateHangingUp) MarshalJSON() ([]byte, error)

type CallStatePending

type CallStatePending struct {

	// True, if the call has already been created by the server
	IsCreated bool `json:"is_created"`
	// True, if the call has already been received by the other party
	IsReceived bool `json:"is_received"`
	// contains filtered or unexported fields
}

The call is pending, waiting to be accepted by a user

func UnmarshalCallStatePending

func UnmarshalCallStatePending(data json.RawMessage) (*CallStatePending, error)

func (*CallStatePending) CallStateType

func (*CallStatePending) CallStateType() string

func (*CallStatePending) GetClass

func (*CallStatePending) GetClass() string

func (*CallStatePending) GetType

func (*CallStatePending) GetType() string

func (*CallStatePending) MarshalJSON

func (entity *CallStatePending) MarshalJSON() ([]byte, error)

type CallStateReady

type CallStateReady struct {

	// Call protocols supported by the peer
	Protocol *CallProtocol `json:"protocol"`
	// List of available call servers
	Servers []*CallServer `json:"servers"`
	// A JSON-encoded call config
	Config string `json:"config"`
	// Call encryption key
	EncryptionKey []byte `json:"encryption_key"`
	// Encryption key emojis fingerprint
	Emojis []string `json:"emojis"`
	// True, if peer-to-peer connection is allowed by users privacy settings
	AllowP2p bool `json:"allow_p2p"`
	// contains filtered or unexported fields
}

The call is ready to use

func UnmarshalCallStateReady

func UnmarshalCallStateReady(data json.RawMessage) (*CallStateReady, error)

func (*CallStateReady) CallStateType

func (*CallStateReady) CallStateType() string

func (*CallStateReady) GetClass

func (*CallStateReady) GetClass() string

func (*CallStateReady) GetType

func (*CallStateReady) GetType() string

func (*CallStateReady) MarshalJSON

func (entity *CallStateReady) MarshalJSON() ([]byte, error)

type CallbackQueryAnswer

type CallbackQueryAnswer struct {

	// Text of the answer
	Text string `json:"text"`
	// True, if an alert must be shown to the user instead of a toast notification
	ShowAlert bool `json:"show_alert"`
	// URL to be opened
	Url string `json:"url"`
	// contains filtered or unexported fields
}

Contains a bot's answer to a callback query

func UnmarshalCallbackQueryAnswer

func UnmarshalCallbackQueryAnswer(data json.RawMessage) (*CallbackQueryAnswer, error)

func (*CallbackQueryAnswer) GetClass

func (*CallbackQueryAnswer) GetClass() string

func (*CallbackQueryAnswer) GetType

func (*CallbackQueryAnswer) GetType() string

func (*CallbackQueryAnswer) MarshalJSON

func (entity *CallbackQueryAnswer) MarshalJSON() ([]byte, error)

type CallbackQueryPayload

type CallbackQueryPayload interface {
	CallbackQueryPayloadType() string
}

Represents a payload of a callback query

func UnmarshalCallbackQueryPayload

func UnmarshalCallbackQueryPayload(data json.RawMessage) (CallbackQueryPayload, error)

func UnmarshalListOfCallbackQueryPayload

func UnmarshalListOfCallbackQueryPayload(dataList []json.RawMessage) ([]CallbackQueryPayload, error)

type CallbackQueryPayloadData

type CallbackQueryPayloadData struct {

	// Data that was attached to the callback button
	Data []byte `json:"data"`
	// contains filtered or unexported fields
}

The payload for a general callback button

func UnmarshalCallbackQueryPayloadData

func UnmarshalCallbackQueryPayloadData(data json.RawMessage) (*CallbackQueryPayloadData, error)

func (*CallbackQueryPayloadData) CallbackQueryPayloadType

func (*CallbackQueryPayloadData) CallbackQueryPayloadType() string

func (*CallbackQueryPayloadData) GetClass

func (*CallbackQueryPayloadData) GetClass() string

func (*CallbackQueryPayloadData) GetType

func (*CallbackQueryPayloadData) GetType() string

func (*CallbackQueryPayloadData) MarshalJSON

func (entity *CallbackQueryPayloadData) MarshalJSON() ([]byte, error)

type CallbackQueryPayloadDataWithPassword

type CallbackQueryPayloadDataWithPassword struct {

	// The password for the current user
	Password string `json:"password"`
	// Data that was attached to the callback button
	Data []byte `json:"data"`
	// contains filtered or unexported fields
}

The payload for a callback button requiring password

func UnmarshalCallbackQueryPayloadDataWithPassword

func UnmarshalCallbackQueryPayloadDataWithPassword(data json.RawMessage) (*CallbackQueryPayloadDataWithPassword, error)

func (*CallbackQueryPayloadDataWithPassword) CallbackQueryPayloadType

func (*CallbackQueryPayloadDataWithPassword) CallbackQueryPayloadType() string

func (*CallbackQueryPayloadDataWithPassword) GetClass

func (*CallbackQueryPayloadDataWithPassword) GetType

func (*CallbackQueryPayloadDataWithPassword) MarshalJSON

func (entity *CallbackQueryPayloadDataWithPassword) MarshalJSON() ([]byte, error)

type CallbackQueryPayloadGame

type CallbackQueryPayloadGame struct {

	// A short name of the game that was attached to the callback button
	GameShortName string `json:"game_short_name"`
	// contains filtered or unexported fields
}

The payload for a game callback button

func UnmarshalCallbackQueryPayloadGame

func UnmarshalCallbackQueryPayloadGame(data json.RawMessage) (*CallbackQueryPayloadGame, error)

func (*CallbackQueryPayloadGame) CallbackQueryPayloadType

func (*CallbackQueryPayloadGame) CallbackQueryPayloadType() string

func (*CallbackQueryPayloadGame) GetClass

func (*CallbackQueryPayloadGame) GetClass() string

func (*CallbackQueryPayloadGame) GetType

func (*CallbackQueryPayloadGame) GetType() string

func (*CallbackQueryPayloadGame) MarshalJSON

func (entity *CallbackQueryPayloadGame) MarshalJSON() ([]byte, error)

type CanTransferOwnershipResult

type CanTransferOwnershipResult interface {
	CanTransferOwnershipResultType() string
}

Represents result of checking whether the current session can be used to transfer a chat ownership to another user

func UnmarshalCanTransferOwnershipResult

func UnmarshalCanTransferOwnershipResult(data json.RawMessage) (CanTransferOwnershipResult, error)

func UnmarshalListOfCanTransferOwnershipResult

func UnmarshalListOfCanTransferOwnershipResult(dataList []json.RawMessage) ([]CanTransferOwnershipResult, error)

type CanTransferOwnershipResultOk

type CanTransferOwnershipResultOk struct {
	// contains filtered or unexported fields
}

The session can be used

func UnmarshalCanTransferOwnershipResultOk

func UnmarshalCanTransferOwnershipResultOk(data json.RawMessage) (*CanTransferOwnershipResultOk, error)

func (*CanTransferOwnershipResultOk) CanTransferOwnershipResultType

func (*CanTransferOwnershipResultOk) CanTransferOwnershipResultType() string

func (*CanTransferOwnershipResultOk) GetClass

func (*CanTransferOwnershipResultOk) GetType

func (*CanTransferOwnershipResultOk) MarshalJSON

func (entity *CanTransferOwnershipResultOk) MarshalJSON() ([]byte, error)

type CanTransferOwnershipResultPasswordNeeded

type CanTransferOwnershipResultPasswordNeeded struct {
	// contains filtered or unexported fields
}

The 2-step verification needs to be enabled first

func UnmarshalCanTransferOwnershipResultPasswordNeeded

func UnmarshalCanTransferOwnershipResultPasswordNeeded(data json.RawMessage) (*CanTransferOwnershipResultPasswordNeeded, error)

func (*CanTransferOwnershipResultPasswordNeeded) CanTransferOwnershipResultType

func (*CanTransferOwnershipResultPasswordNeeded) CanTransferOwnershipResultType() string

func (*CanTransferOwnershipResultPasswordNeeded) GetClass

func (*CanTransferOwnershipResultPasswordNeeded) GetType

func (*CanTransferOwnershipResultPasswordNeeded) MarshalJSON

func (entity *CanTransferOwnershipResultPasswordNeeded) MarshalJSON() ([]byte, error)

type CanTransferOwnershipResultPasswordTooFresh

type CanTransferOwnershipResultPasswordTooFresh struct {

	// Time left before the session can be used to transfer ownership of a chat, in seconds
	RetryAfter int32 `json:"retry_after"`
	// contains filtered or unexported fields
}

The 2-step verification was enabled recently, user needs to wait

func UnmarshalCanTransferOwnershipResultPasswordTooFresh

func UnmarshalCanTransferOwnershipResultPasswordTooFresh(data json.RawMessage) (*CanTransferOwnershipResultPasswordTooFresh, error)

func (*CanTransferOwnershipResultPasswordTooFresh) CanTransferOwnershipResultType

func (*CanTransferOwnershipResultPasswordTooFresh) CanTransferOwnershipResultType() string

func (*CanTransferOwnershipResultPasswordTooFresh) GetClass

func (*CanTransferOwnershipResultPasswordTooFresh) GetType

func (*CanTransferOwnershipResultPasswordTooFresh) MarshalJSON

func (entity *CanTransferOwnershipResultPasswordTooFresh) MarshalJSON() ([]byte, error)

type CanTransferOwnershipResultSessionTooFresh

type CanTransferOwnershipResultSessionTooFresh struct {

	// Time left before the session can be used to transfer ownership of a chat, in seconds
	RetryAfter int32 `json:"retry_after"`
	// contains filtered or unexported fields
}

The session was created recently, user needs to wait

func UnmarshalCanTransferOwnershipResultSessionTooFresh

func UnmarshalCanTransferOwnershipResultSessionTooFresh(data json.RawMessage) (*CanTransferOwnershipResultSessionTooFresh, error)

func (*CanTransferOwnershipResultSessionTooFresh) CanTransferOwnershipResultType

func (*CanTransferOwnershipResultSessionTooFresh) CanTransferOwnershipResultType() string

func (*CanTransferOwnershipResultSessionTooFresh) GetClass

func (*CanTransferOwnershipResultSessionTooFresh) GetType

func (*CanTransferOwnershipResultSessionTooFresh) MarshalJSON

func (entity *CanTransferOwnershipResultSessionTooFresh) MarshalJSON() ([]byte, error)

type CancelDownloadFileRequest

type CancelDownloadFileRequest struct {
	// Identifier of a file to stop downloading
	FileId int32 `json:"file_id"`
	// Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server
	OnlyIfPending bool `json:"only_if_pending"`
}

type CancelUploadFileRequest

type CancelUploadFileRequest struct {
	// Identifier of the file to stop uploading
	FileId int32 `json:"file_id"`
}

type ChangeImportedContactsRequest

type ChangeImportedContactsRequest struct {
	// The new list of contacts, contact's vCard are ignored and are not imported
	Contacts []*Contact `json:"contacts"`
}

type ChangePhoneNumberRequest

type ChangePhoneNumberRequest struct {
	// The new phone number of the user in international format
	PhoneNumber string `json:"phone_number"`
	// Settings for the authentication of the user's phone number; pass null to use default settings
	Settings *PhoneNumberAuthenticationSettings `json:"settings"`
}

type ChangeStickerSetRequest

type ChangeStickerSetRequest struct {
	// Identifier of the sticker set
	SetId JsonInt64 `json:"set_id"`
	// The new value of is_installed
	IsInstalled bool `json:"is_installed"`
	// The new value of is_archived. A sticker set can't be installed and archived simultaneously
	IsArchived bool `json:"is_archived"`
}

type Chat

type Chat struct {

	// Chat unique identifier
	Id int64 `json:"id"`
	// Type of the chat
	Type ChatType `json:"type"`
	// Chat title
	Title string `json:"title"`
	// Chat photo; may be null
	Photo *ChatPhotoInfo `json:"photo"`
	// Actions that non-administrator chat members are allowed to take in the chat
	Permissions *ChatPermissions `json:"permissions"`
	// Last message in the chat; may be null
	LastMessage *Message `json:"last_message"`
	// Positions of the chat in chat lists
	Positions []*ChatPosition `json:"positions"`
	// Identifier of a user or chat that is selected to send messages in the chat; may be null if the user can't change message sender
	MessageSenderId MessageSender `json:"message_sender_id"`
	// True, if chat content can't be saved locally, forwarded, or copied
	HasProtectedContent bool `json:"has_protected_content"`
	// True, if the chat is marked as unread
	IsMarkedAsUnread bool `json:"is_marked_as_unread"`
	// True, if the chat is blocked by the current user and private messages from the chat can't be received
	IsBlocked bool `json:"is_blocked"`
	// True, if the chat has scheduled messages
	HasScheduledMessages bool `json:"has_scheduled_messages"`
	// True, if the chat messages can be deleted only for the current user while other users will continue to see the messages
	CanBeDeletedOnlyForSelf bool `json:"can_be_deleted_only_for_self"`
	// True, if the chat messages can be deleted for all users
	CanBeDeletedForAllUsers bool `json:"can_be_deleted_for_all_users"`
	// True, if the chat can be reported to Telegram moderators through reportChat or reportChatPhoto
	CanBeReported bool `json:"can_be_reported"`
	// Default value of the disable_notification parameter, used when a message is sent to the chat
	DefaultDisableNotification bool `json:"default_disable_notification"`
	// Number of unread messages in the chat
	UnreadCount int32 `json:"unread_count"`
	// Identifier of the last read incoming message
	LastReadInboxMessageId int64 `json:"last_read_inbox_message_id"`
	// Identifier of the last read outgoing message
	LastReadOutboxMessageId int64 `json:"last_read_outbox_message_id"`
	// Number of unread messages with a mention/reply in the chat
	UnreadMentionCount int32 `json:"unread_mention_count"`
	// Number of messages with unread reactions in the chat
	UnreadReactionCount int32 `json:"unread_reaction_count"`
	// Notification settings for the chat
	NotificationSettings *ChatNotificationSettings `json:"notification_settings"`
	// List of reactions, available in the chat
	AvailableReactions []string `json:"available_reactions"`
	// Current message Time To Live setting (self-destruct timer) for the chat; 0 if not defined. TTL is counted from the time message or its content is viewed in secret chats and from the send date in other chats
	MessageTtl int32 `json:"message_ttl"`
	// If non-empty, name of a theme, set for the chat
	ThemeName string `json:"theme_name"`
	// Information about actions which must be possible to do through the chat action bar; may be null
	ActionBar ChatActionBar `json:"action_bar"`
	// Information about video chat of the chat
	VideoChat *VideoChat `json:"video_chat"`
	// Information about pending join requests; may be null
	PendingJoinRequests *ChatJoinRequestsInfo `json:"pending_join_requests"`
	// Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
	ReplyMarkupMessageId int64 `json:"reply_markup_message_id"`
	// A draft of a message in the chat; may be null
	DraftMessage *DraftMessage `json:"draft_message"`
	// Application-specific data associated with the chat. (For example, the chat scroll position or local chat notification settings can be stored here.) Persistent if the message database is used
	ClientData string `json:"client_data"`
	// contains filtered or unexported fields
}

A chat. (Can be a private chat, basic group, supergroup, or secret chat)

func UnmarshalChat

func UnmarshalChat(data json.RawMessage) (*Chat, error)

func (*Chat) GetClass

func (*Chat) GetClass() string

func (*Chat) GetType

func (*Chat) GetType() string

func (*Chat) MarshalJSON

func (entity *Chat) MarshalJSON() ([]byte, error)

func (*Chat) UnmarshalJSON

func (chat *Chat) UnmarshalJSON(data []byte) error

type ChatAction

type ChatAction interface {
	ChatActionType() string
}

Describes the different types of activity in a chat

func UnmarshalChatAction

func UnmarshalChatAction(data json.RawMessage) (ChatAction, error)

func UnmarshalListOfChatAction

func UnmarshalListOfChatAction(dataList []json.RawMessage) ([]ChatAction, error)

type ChatActionBar

type ChatActionBar interface {
	ChatActionBarType() string
}

Describes actions which must be possible to do through a chat action bar

func UnmarshalChatActionBar

func UnmarshalChatActionBar(data json.RawMessage) (ChatActionBar, error)

func UnmarshalListOfChatActionBar

func UnmarshalListOfChatActionBar(dataList []json.RawMessage) ([]ChatActionBar, error)

type ChatActionBarAddContact

type ChatActionBarAddContact struct {
	// contains filtered or unexported fields
}

The chat is a private or secret chat and the other user can be added to the contact list using the method addContact

func UnmarshalChatActionBarAddContact

func UnmarshalChatActionBarAddContact(data json.RawMessage) (*ChatActionBarAddContact, error)

func (*ChatActionBarAddContact) ChatActionBarType

func (*ChatActionBarAddContact) ChatActionBarType() string

func (*ChatActionBarAddContact) GetClass

func (*ChatActionBarAddContact) GetClass() string

func (*ChatActionBarAddContact) GetType

func (*ChatActionBarAddContact) GetType() string

func (*ChatActionBarAddContact) MarshalJSON

func (entity *ChatActionBarAddContact) MarshalJSON() ([]byte, error)

type ChatActionBarInviteMembers added in v1.7.10

type ChatActionBarInviteMembers struct {
	// contains filtered or unexported fields
}

The chat is a recently created group chat to which new members can be invited

func UnmarshalChatActionBarInviteMembers added in v1.7.10

func UnmarshalChatActionBarInviteMembers(data json.RawMessage) (*ChatActionBarInviteMembers, error)

func (*ChatActionBarInviteMembers) ChatActionBarType added in v1.7.10

func (*ChatActionBarInviteMembers) ChatActionBarType() string

func (*ChatActionBarInviteMembers) GetClass added in v1.7.10

func (*ChatActionBarInviteMembers) GetClass() string

func (*ChatActionBarInviteMembers) GetType added in v1.7.10

func (*ChatActionBarInviteMembers) MarshalJSON added in v1.7.10

func (entity *ChatActionBarInviteMembers) MarshalJSON() ([]byte, error)

type ChatActionBarJoinRequest added in v1.7.10

type ChatActionBarJoinRequest struct {

	// Title of the chat to which the join request was sent
	Title string `json:"title"`
	// True, if the join request was sent to a channel chat
	IsChannel bool `json:"is_channel"`
	// Point in time (Unix timestamp) when the join request was sent
	RequestDate int32 `json:"request_date"`
	// contains filtered or unexported fields
}

The chat is a private chat with an administrator of a chat to which the user sent join request

func UnmarshalChatActionBarJoinRequest added in v1.7.10

func UnmarshalChatActionBarJoinRequest(data json.RawMessage) (*ChatActionBarJoinRequest, error)

func (*ChatActionBarJoinRequest) ChatActionBarType added in v1.7.10

func (*ChatActionBarJoinRequest) ChatActionBarType() string

func (*ChatActionBarJoinRequest) GetClass added in v1.7.10

func (*ChatActionBarJoinRequest) GetClass() string

func (*ChatActionBarJoinRequest) GetType added in v1.7.10

func (*ChatActionBarJoinRequest) GetType() string

func (*ChatActionBarJoinRequest) MarshalJSON added in v1.7.10

func (entity *ChatActionBarJoinRequest) MarshalJSON() ([]byte, error)

type ChatActionBarReportAddBlock

type ChatActionBarReportAddBlock struct {

	// If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings
	CanUnarchive bool `json:"can_unarchive"`
	// If non-negative, the current user was found by the peer through searchChatsNearby and this is the distance between the users
	Distance int32 `json:"distance"`
	// contains filtered or unexported fields
}

The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be blocked using the method toggleMessageSenderIsBlocked, or the other user can be added to the contact list using the method addContact

func UnmarshalChatActionBarReportAddBlock

func UnmarshalChatActionBarReportAddBlock(data json.RawMessage) (*ChatActionBarReportAddBlock, error)

func (*ChatActionBarReportAddBlock) ChatActionBarType

func (*ChatActionBarReportAddBlock) ChatActionBarType() string

func (*ChatActionBarReportAddBlock) GetClass

func (*ChatActionBarReportAddBlock) GetClass() string

func (*ChatActionBarReportAddBlock) GetType

func (*ChatActionBarReportAddBlock) MarshalJSON

func (entity *ChatActionBarReportAddBlock) MarshalJSON() ([]byte, error)

type ChatActionBarReportSpam

type ChatActionBarReportSpam struct {

	// If true, the chat was automatically archived and can be moved back to the main chat list using addChatToList simultaneously with setting chat notification settings to default using setChatNotificationSettings
	CanUnarchive bool `json:"can_unarchive"`
	// contains filtered or unexported fields
}

The chat can be reported as spam using the method reportChat with the reason chatReportReasonSpam

func UnmarshalChatActionBarReportSpam

func UnmarshalChatActionBarReportSpam(data json.RawMessage) (*ChatActionBarReportSpam, error)

func (*ChatActionBarReportSpam) ChatActionBarType

func (*ChatActionBarReportSpam) ChatActionBarType() string

func (*ChatActionBarReportSpam) GetClass

func (*ChatActionBarReportSpam) GetClass() string

func (*ChatActionBarReportSpam) GetType

func (*ChatActionBarReportSpam) GetType() string

func (*ChatActionBarReportSpam) MarshalJSON

func (entity *ChatActionBarReportSpam) MarshalJSON() ([]byte, error)

type ChatActionBarReportUnrelatedLocation

type ChatActionBarReportUnrelatedLocation struct {
	// contains filtered or unexported fields
}

The chat is a location-based supergroup, which can be reported as having unrelated location using the method reportChat with the reason chatReportReasonUnrelatedLocation

func UnmarshalChatActionBarReportUnrelatedLocation

func UnmarshalChatActionBarReportUnrelatedLocation(data json.RawMessage) (*ChatActionBarReportUnrelatedLocation, error)

func (*ChatActionBarReportUnrelatedLocation) ChatActionBarType

func (*ChatActionBarReportUnrelatedLocation) ChatActionBarType() string

func (*ChatActionBarReportUnrelatedLocation) GetClass

func (*ChatActionBarReportUnrelatedLocation) GetType

func (*ChatActionBarReportUnrelatedLocation) MarshalJSON

func (entity *ChatActionBarReportUnrelatedLocation) MarshalJSON() ([]byte, error)

type ChatActionBarSharePhoneNumber

type ChatActionBarSharePhoneNumber struct {
	// contains filtered or unexported fields
}

The chat is a private or secret chat with a mutual contact and the user's phone number can be shared with the other user using the method sharePhoneNumber

func UnmarshalChatActionBarSharePhoneNumber

func UnmarshalChatActionBarSharePhoneNumber(data json.RawMessage) (*ChatActionBarSharePhoneNumber, error)

func (*ChatActionBarSharePhoneNumber) ChatActionBarType

func (*ChatActionBarSharePhoneNumber) ChatActionBarType() string

func (*ChatActionBarSharePhoneNumber) GetClass

func (*ChatActionBarSharePhoneNumber) GetType

func (*ChatActionBarSharePhoneNumber) MarshalJSON

func (entity *ChatActionBarSharePhoneNumber) MarshalJSON() ([]byte, error)

type ChatActionCancel

type ChatActionCancel struct {
	// contains filtered or unexported fields
}

The user has canceled the previous action

func UnmarshalChatActionCancel

func UnmarshalChatActionCancel(data json.RawMessage) (*ChatActionCancel, error)

func (*ChatActionCancel) ChatActionType

func (*ChatActionCancel) ChatActionType() string

func (*ChatActionCancel) GetClass

func (*ChatActionCancel) GetClass() string

func (*ChatActionCancel) GetType

func (*ChatActionCancel) GetType() string

func (*ChatActionCancel) MarshalJSON

func (entity *ChatActionCancel) MarshalJSON() ([]byte, error)

type ChatActionChoosingContact

type ChatActionChoosingContact struct {
	// contains filtered or unexported fields
}

The user is picking a contact to send

func UnmarshalChatActionChoosingContact

func UnmarshalChatActionChoosingContact(data json.RawMessage) (*ChatActionChoosingContact, error)

func (*ChatActionChoosingContact) ChatActionType

func (*ChatActionChoosingContact) ChatActionType() string

func (*ChatActionChoosingContact) GetClass

func (*ChatActionChoosingContact) GetClass() string

func (*ChatActionChoosingContact) GetType

func (*ChatActionChoosingContact) GetType() string

func (*ChatActionChoosingContact) MarshalJSON

func (entity *ChatActionChoosingContact) MarshalJSON() ([]byte, error)

type ChatActionChoosingLocation

type ChatActionChoosingLocation struct {
	// contains filtered or unexported fields
}

The user is picking a location or venue to send

func UnmarshalChatActionChoosingLocation

func UnmarshalChatActionChoosingLocation(data json.RawMessage) (*ChatActionChoosingLocation, error)

func (*ChatActionChoosingLocation) ChatActionType

func (*ChatActionChoosingLocation) ChatActionType() string

func (*ChatActionChoosingLocation) GetClass

func (*ChatActionChoosingLocation) GetClass() string

func (*ChatActionChoosingLocation) GetType

func (*ChatActionChoosingLocation) MarshalJSON

func (entity *ChatActionChoosingLocation) MarshalJSON() ([]byte, error)

type ChatActionChoosingSticker added in v1.7.10

type ChatActionChoosingSticker struct {
	// contains filtered or unexported fields
}

The user is picking a sticker to send

func UnmarshalChatActionChoosingSticker added in v1.7.10

func UnmarshalChatActionChoosingSticker(data json.RawMessage) (*ChatActionChoosingSticker, error)

func (*ChatActionChoosingSticker) ChatActionType added in v1.7.10

func (*ChatActionChoosingSticker) ChatActionType() string

func (*ChatActionChoosingSticker) GetClass added in v1.7.10

func (*ChatActionChoosingSticker) GetClass() string

func (*ChatActionChoosingSticker) GetType added in v1.7.10

func (*ChatActionChoosingSticker) GetType() string

func (*ChatActionChoosingSticker) MarshalJSON added in v1.7.10

func (entity *ChatActionChoosingSticker) MarshalJSON() ([]byte, error)

type ChatActionRecordingVideo

type ChatActionRecordingVideo struct {
	// contains filtered or unexported fields
}

The user is recording a video

func UnmarshalChatActionRecordingVideo

func UnmarshalChatActionRecordingVideo(data json.RawMessage) (*ChatActionRecordingVideo, error)

func (*ChatActionRecordingVideo) ChatActionType

func (*ChatActionRecordingVideo) ChatActionType() string

func (*ChatActionRecordingVideo) GetClass

func (*ChatActionRecordingVideo) GetClass() string

func (*ChatActionRecordingVideo) GetType

func (*ChatActionRecordingVideo) GetType() string

func (*ChatActionRecordingVideo) MarshalJSON

func (entity *ChatActionRecordingVideo) MarshalJSON() ([]byte, error)

type ChatActionRecordingVideoNote

type ChatActionRecordingVideoNote struct {
	// contains filtered or unexported fields
}

The user is recording a video note

func UnmarshalChatActionRecordingVideoNote

func UnmarshalChatActionRecordingVideoNote(data json.RawMessage) (*ChatActionRecordingVideoNote, error)

func (*ChatActionRecordingVideoNote) ChatActionType

func (*ChatActionRecordingVideoNote) ChatActionType() string

func (*ChatActionRecordingVideoNote) GetClass

func (*ChatActionRecordingVideoNote) GetType

func (*ChatActionRecordingVideoNote) MarshalJSON

func (entity *ChatActionRecordingVideoNote) MarshalJSON() ([]byte, error)

type ChatActionRecordingVoiceNote

type ChatActionRecordingVoiceNote struct {
	// contains filtered or unexported fields
}

The user is recording a voice note

func UnmarshalChatActionRecordingVoiceNote

func UnmarshalChatActionRecordingVoiceNote(data json.RawMessage) (*ChatActionRecordingVoiceNote, error)

func (*ChatActionRecordingVoiceNote) ChatActionType

func (*ChatActionRecordingVoiceNote) ChatActionType() string

func (*ChatActionRecordingVoiceNote) GetClass

func (*ChatActionRecordingVoiceNote) GetType

func (*ChatActionRecordingVoiceNote) MarshalJSON

func (entity *ChatActionRecordingVoiceNote) MarshalJSON() ([]byte, error)

type ChatActionStartPlayingGame

type ChatActionStartPlayingGame struct {
	// contains filtered or unexported fields
}

The user has started to play a game

func UnmarshalChatActionStartPlayingGame

func UnmarshalChatActionStartPlayingGame(data json.RawMessage) (*ChatActionStartPlayingGame, error)

func (*ChatActionStartPlayingGame) ChatActionType

func (*ChatActionStartPlayingGame) ChatActionType() string

func (*ChatActionStartPlayingGame) GetClass

func (*ChatActionStartPlayingGame) GetClass() string

func (*ChatActionStartPlayingGame) GetType

func (*ChatActionStartPlayingGame) MarshalJSON

func (entity *ChatActionStartPlayingGame) MarshalJSON() ([]byte, error)

type ChatActionTyping

type ChatActionTyping struct {
	// contains filtered or unexported fields
}

The user is typing a message

func UnmarshalChatActionTyping

func UnmarshalChatActionTyping(data json.RawMessage) (*ChatActionTyping, error)

func (*ChatActionTyping) ChatActionType

func (*ChatActionTyping) ChatActionType() string

func (*ChatActionTyping) GetClass

func (*ChatActionTyping) GetClass() string

func (*ChatActionTyping) GetType

func (*ChatActionTyping) GetType() string

func (*ChatActionTyping) MarshalJSON

func (entity *ChatActionTyping) MarshalJSON() ([]byte, error)

type ChatActionUploadingDocument

type ChatActionUploadingDocument struct {

	// Upload progress, as a percentage
	Progress int32 `json:"progress"`
	// contains filtered or unexported fields
}

The user is uploading a document

func UnmarshalChatActionUploadingDocument

func UnmarshalChatActionUploadingDocument(data json.RawMessage) (*ChatActionUploadingDocument, error)

func (*ChatActionUploadingDocument) ChatActionType

func (*ChatActionUploadingDocument) ChatActionType() string

func (*ChatActionUploadingDocument) GetClass

func (*ChatActionUploadingDocument) GetClass() string

func (*ChatActionUploadingDocument) GetType

func (*ChatActionUploadingDocument) MarshalJSON

func (entity *ChatActionUploadingDocument) MarshalJSON() ([]byte, error)

type ChatActionUploadingPhoto

type ChatActionUploadingPhoto struct {

	// Upload progress, as a percentage
	Progress int32 `json:"progress"`
	// contains filtered or unexported fields
}

The user is uploading a photo

func UnmarshalChatActionUploadingPhoto

func UnmarshalChatActionUploadingPhoto(data json.RawMessage) (*ChatActionUploadingPhoto, error)

func (*ChatActionUploadingPhoto) ChatActionType

func (*ChatActionUploadingPhoto) ChatActionType() string

func (*ChatActionUploadingPhoto) GetClass

func (*ChatActionUploadingPhoto) GetClass() string

func (*ChatActionUploadingPhoto) GetType

func (*ChatActionUploadingPhoto) GetType() string

func (*ChatActionUploadingPhoto) MarshalJSON

func (entity *ChatActionUploadingPhoto) MarshalJSON() ([]byte, error)

type ChatActionUploadingVideo

type ChatActionUploadingVideo struct {

	// Upload progress, as a percentage
	Progress int32 `json:"progress"`
	// contains filtered or unexported fields
}

The user is uploading a video

func UnmarshalChatActionUploadingVideo

func UnmarshalChatActionUploadingVideo(data json.RawMessage) (*ChatActionUploadingVideo, error)

func (*ChatActionUploadingVideo) ChatActionType

func (*ChatActionUploadingVideo) ChatActionType() string

func (*ChatActionUploadingVideo) GetClass

func (*ChatActionUploadingVideo) GetClass() string

func (*ChatActionUploadingVideo) GetType

func (*ChatActionUploadingVideo) GetType() string

func (*ChatActionUploadingVideo) MarshalJSON

func (entity *ChatActionUploadingVideo) MarshalJSON() ([]byte, error)

type ChatActionUploadingVideoNote

type ChatActionUploadingVideoNote struct {

	// Upload progress, as a percentage
	Progress int32 `json:"progress"`
	// contains filtered or unexported fields
}

The user is uploading a video note

func UnmarshalChatActionUploadingVideoNote

func UnmarshalChatActionUploadingVideoNote(data json.RawMessage) (*ChatActionUploadingVideoNote, error)

func (*ChatActionUploadingVideoNote) ChatActionType

func (*ChatActionUploadingVideoNote) ChatActionType() string

func (*ChatActionUploadingVideoNote) GetClass

func (*ChatActionUploadingVideoNote) GetType

func (*ChatActionUploadingVideoNote) MarshalJSON

func (entity *ChatActionUploadingVideoNote) MarshalJSON() ([]byte, error)

type ChatActionUploadingVoiceNote

type ChatActionUploadingVoiceNote struct {

	// Upload progress, as a percentage
	Progress int32 `json:"progress"`
	// contains filtered or unexported fields
}

The user is uploading a voice note

func UnmarshalChatActionUploadingVoiceNote

func UnmarshalChatActionUploadingVoiceNote(data json.RawMessage) (*ChatActionUploadingVoiceNote, error)

func (*ChatActionUploadingVoiceNote) ChatActionType

func (*ChatActionUploadingVoiceNote) ChatActionType() string

func (*ChatActionUploadingVoiceNote) GetClass

func (*ChatActionUploadingVoiceNote) GetType

func (*ChatActionUploadingVoiceNote) MarshalJSON

func (entity *ChatActionUploadingVoiceNote) MarshalJSON() ([]byte, error)

type ChatActionWatchingAnimations added in v1.7.10

type ChatActionWatchingAnimations struct {

	// The animated emoji
	Emoji string `json:"emoji"`
	// contains filtered or unexported fields
}

The user is watching animations sent by the other party by clicking on an animated emoji

func UnmarshalChatActionWatchingAnimations added in v1.7.10

func UnmarshalChatActionWatchingAnimations(data json.RawMessage) (*ChatActionWatchingAnimations, error)

func (*ChatActionWatchingAnimations) ChatActionType added in v1.7.10

func (*ChatActionWatchingAnimations) ChatActionType() string

func (*ChatActionWatchingAnimations) GetClass added in v1.7.10

func (*ChatActionWatchingAnimations) GetType added in v1.7.10

func (*ChatActionWatchingAnimations) MarshalJSON added in v1.7.10

func (entity *ChatActionWatchingAnimations) MarshalJSON() ([]byte, error)

type ChatAdministrator

type ChatAdministrator struct {

	// User identifier of the administrator
	UserId int64 `json:"user_id"`
	// Custom title of the administrator
	CustomTitle string `json:"custom_title"`
	// True, if the user is the owner of the chat
	IsOwner bool `json:"is_owner"`
	// contains filtered or unexported fields
}

Contains information about a chat administrator

func UnmarshalChatAdministrator

func UnmarshalChatAdministrator(data json.RawMessage) (*ChatAdministrator, error)

func (*ChatAdministrator) GetClass

func (*ChatAdministrator) GetClass() string

func (*ChatAdministrator) GetType

func (*ChatAdministrator) GetType() string

func (*ChatAdministrator) MarshalJSON

func (entity *ChatAdministrator) MarshalJSON() ([]byte, error)

type ChatAdministratorRights added in v1.8.3

type ChatAdministratorRights struct {

	// True, if the administrator can get chat event log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other privilege; applicable to supergroups and channels only
	CanManageChat bool `json:"can_manage_chat"`
	// True, if the administrator can change the chat title, photo, and other settings
	CanChangeInfo bool `json:"can_change_info"`
	// True, if the administrator can create channel posts; applicable to channels only
	CanPostMessages bool `json:"can_post_messages"`
	// True, if the administrator can edit messages of other users and pin messages; applicable to channels only
	CanEditMessages bool `json:"can_edit_messages"`
	// True, if the administrator can delete messages of other users
	CanDeleteMessages bool `json:"can_delete_messages"`
	// True, if the administrator can invite new users to the chat
	CanInviteUsers bool `json:"can_invite_users"`
	// True, if the administrator can restrict, ban, or unban chat members; always true for channels
	CanRestrictMembers bool `json:"can_restrict_members"`
	// True, if the administrator can pin messages; applicable to basic groups and supergroups only
	CanPinMessages bool `json:"can_pin_messages"`
	// True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that were directly or indirectly promoted by them
	CanPromoteMembers bool `json:"can_promote_members"`
	// True, if the administrator can manage video chats
	CanManageVideoChats bool `json:"can_manage_video_chats"`
	// True, if the administrator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
	IsAnonymous bool `json:"is_anonymous"`
	// contains filtered or unexported fields
}

Describes rights of the administrator

func UnmarshalChatAdministratorRights added in v1.8.3

func UnmarshalChatAdministratorRights(data json.RawMessage) (*ChatAdministratorRights, error)

func (*ChatAdministratorRights) GetClass added in v1.8.3

func (*ChatAdministratorRights) GetClass() string

func (*ChatAdministratorRights) GetType added in v1.8.3

func (*ChatAdministratorRights) GetType() string

func (*ChatAdministratorRights) MarshalJSON added in v1.8.3

func (entity *ChatAdministratorRights) MarshalJSON() ([]byte, error)

type ChatAdministrators

type ChatAdministrators struct {

	// A list of chat administrators
	Administrators []*ChatAdministrator `json:"administrators"`
	// contains filtered or unexported fields
}

Represents a list of chat administrators

func UnmarshalChatAdministrators

func UnmarshalChatAdministrators(data json.RawMessage) (*ChatAdministrators, error)

func (*ChatAdministrators) GetClass

func (*ChatAdministrators) GetClass() string

func (*ChatAdministrators) GetType

func (*ChatAdministrators) GetType() string

func (*ChatAdministrators) MarshalJSON

func (entity *ChatAdministrators) MarshalJSON() ([]byte, error)

type ChatEvent

type ChatEvent struct {

	// Chat event identifier
	Id JsonInt64 `json:"id"`
	// Point in time (Unix timestamp) when the event happened
	Date int32 `json:"date"`
	// Identifier of the user or chat who performed the action
	MemberId MessageSender `json:"member_id"`
	// The action
	Action ChatEventAction `json:"action"`
	// contains filtered or unexported fields
}

Represents a chat event

func UnmarshalChatEvent

func UnmarshalChatEvent(data json.RawMessage) (*ChatEvent, error)

func (*ChatEvent) GetClass

func (*ChatEvent) GetClass() string

func (*ChatEvent) GetType

func (*ChatEvent) GetType() string

func (*ChatEvent) MarshalJSON

func (entity *ChatEvent) MarshalJSON() ([]byte, error)

func (*ChatEvent) UnmarshalJSON

func (chatEvent *ChatEvent) UnmarshalJSON(data []byte) error

type ChatEventAction

type ChatEventAction interface {
	ChatEventActionType() string
}

Represents a chat event

func UnmarshalChatEventAction

func UnmarshalChatEventAction(data json.RawMessage) (ChatEventAction, error)

func UnmarshalListOfChatEventAction

func UnmarshalListOfChatEventAction(dataList []json.RawMessage) ([]ChatEventAction, error)

type ChatEventAvailableReactionsChanged added in v1.8.3

type ChatEventAvailableReactionsChanged struct {

	// Previous chat available reactions
	OldAvailableReactions []string `json:"old_available_reactions"`
	// New chat available reactions
	NewAvailableReactions []string `json:"new_available_reactions"`
	// contains filtered or unexported fields
}

The chat available reactions were changed

func UnmarshalChatEventAvailableReactionsChanged added in v1.8.3

func UnmarshalChatEventAvailableReactionsChanged(data json.RawMessage) (*ChatEventAvailableReactionsChanged, error)

func (*ChatEventAvailableReactionsChanged) ChatEventActionType added in v1.8.3

func (*ChatEventAvailableReactionsChanged) ChatEventActionType() string

func (*ChatEventAvailableReactionsChanged) GetClass added in v1.8.3

func (*ChatEventAvailableReactionsChanged) GetType added in v1.8.3

func (*ChatEventAvailableReactionsChanged) MarshalJSON added in v1.8.3

func (entity *ChatEventAvailableReactionsChanged) MarshalJSON() ([]byte, error)

type ChatEventDescriptionChanged

type ChatEventDescriptionChanged struct {

	// Previous chat description
	OldDescription string `json:"old_description"`
	// New chat description
	NewDescription string `json:"new_description"`
	// contains filtered or unexported fields
}

The chat description was changed

func UnmarshalChatEventDescriptionChanged

func UnmarshalChatEventDescriptionChanged(data json.RawMessage) (*ChatEventDescriptionChanged, error)

func (*ChatEventDescriptionChanged) ChatEventActionType

func (*ChatEventDescriptionChanged) ChatEventActionType() string

func (*ChatEventDescriptionChanged) GetClass

func (*ChatEventDescriptionChanged) GetClass() string

func (*ChatEventDescriptionChanged) GetType

func (*ChatEventDescriptionChanged) MarshalJSON

func (entity *ChatEventDescriptionChanged) MarshalJSON() ([]byte, error)

type ChatEventHasProtectedContentToggled added in v1.7.10

type ChatEventHasProtectedContentToggled struct {

	// New value of has_protected_content
	HasProtectedContent bool `json:"has_protected_content"`
	// contains filtered or unexported fields
}

The has_protected_content setting of a channel was toggled

func UnmarshalChatEventHasProtectedContentToggled added in v1.7.10

func UnmarshalChatEventHasProtectedContentToggled(data json.RawMessage) (*ChatEventHasProtectedContentToggled, error)

func (*ChatEventHasProtectedContentToggled) ChatEventActionType added in v1.7.10

func (*ChatEventHasProtectedContentToggled) ChatEventActionType() string

func (*ChatEventHasProtectedContentToggled) GetClass added in v1.7.10

func (*ChatEventHasProtectedContentToggled) GetType added in v1.7.10

func (*ChatEventHasProtectedContentToggled) MarshalJSON added in v1.7.10

func (entity *ChatEventHasProtectedContentToggled) MarshalJSON() ([]byte, error)

type ChatEventInviteLinkDeleted added in v1.7.10

type ChatEventInviteLinkDeleted struct {

	// The invite link
	InviteLink *ChatInviteLink `json:"invite_link"`
	// contains filtered or unexported fields
}

A revoked chat invite link was deleted

func UnmarshalChatEventInviteLinkDeleted added in v1.7.10

func UnmarshalChatEventInviteLinkDeleted(data json.RawMessage) (*ChatEventInviteLinkDeleted, error)

func (*ChatEventInviteLinkDeleted) ChatEventActionType added in v1.7.10

func (*ChatEventInviteLinkDeleted) ChatEventActionType() string

func (*ChatEventInviteLinkDeleted) GetClass added in v1.7.10

func (*ChatEventInviteLinkDeleted) GetClass() string

func (*ChatEventInviteLinkDeleted) GetType added in v1.7.10

func (*ChatEventInviteLinkDeleted) MarshalJSON added in v1.7.10

func (entity *ChatEventInviteLinkDeleted) MarshalJSON() ([]byte, error)

type ChatEventInviteLinkEdited added in v1.7.10

type ChatEventInviteLinkEdited struct {

	// Previous information about the invite link
	OldInviteLink *ChatInviteLink `json:"old_invite_link"`
	// New information about the invite link
	NewInviteLink *ChatInviteLink `json:"new_invite_link"`
	// contains filtered or unexported fields
}

A chat invite link was edited

func UnmarshalChatEventInviteLinkEdited added in v1.7.10

func UnmarshalChatEventInviteLinkEdited(data json.RawMessage) (*ChatEventInviteLinkEdited, error)

func (*ChatEventInviteLinkEdited) ChatEventActionType added in v1.7.10

func (*ChatEventInviteLinkEdited) ChatEventActionType() string

func (*ChatEventInviteLinkEdited) GetClass added in v1.7.10

func (*ChatEventInviteLinkEdited) GetClass() string

func (*ChatEventInviteLinkEdited) GetType added in v1.7.10

func (*ChatEventInviteLinkEdited) GetType() string

func (*ChatEventInviteLinkEdited) MarshalJSON added in v1.7.10

func (entity *ChatEventInviteLinkEdited) MarshalJSON() ([]byte, error)

type ChatEventInviteLinkRevoked added in v1.7.10

type ChatEventInviteLinkRevoked struct {

	// The invite link
	InviteLink *ChatInviteLink `json:"invite_link"`
	// contains filtered or unexported fields
}

A chat invite link was revoked

func UnmarshalChatEventInviteLinkRevoked added in v1.7.10

func UnmarshalChatEventInviteLinkRevoked(data json.RawMessage) (*ChatEventInviteLinkRevoked, error)

func (*ChatEventInviteLinkRevoked) ChatEventActionType added in v1.7.10

func (*ChatEventInviteLinkRevoked) ChatEventActionType() string

func (*ChatEventInviteLinkRevoked) GetClass added in v1.7.10

func (*ChatEventInviteLinkRevoked) GetClass() string

func (*ChatEventInviteLinkRevoked) GetType added in v1.7.10

func (*ChatEventInviteLinkRevoked) MarshalJSON added in v1.7.10

func (entity *ChatEventInviteLinkRevoked) MarshalJSON() ([]byte, error)

type ChatEventInvitesToggled

type ChatEventInvitesToggled struct {

	// New value of can_invite_users permission
	CanInviteUsers bool `json:"can_invite_users"`
	// contains filtered or unexported fields
}

The can_invite_users permission of a supergroup chat was toggled

func UnmarshalChatEventInvitesToggled

func UnmarshalChatEventInvitesToggled(data json.RawMessage) (*ChatEventInvitesToggled, error)

func (*ChatEventInvitesToggled) ChatEventActionType

func (*ChatEventInvitesToggled) ChatEventActionType() string

func (*ChatEventInvitesToggled) GetClass

func (*ChatEventInvitesToggled) GetClass() string

func (*ChatEventInvitesToggled) GetType

func (*ChatEventInvitesToggled) GetType() string

func (*ChatEventInvitesToggled) MarshalJSON

func (entity *ChatEventInvitesToggled) MarshalJSON() ([]byte, error)

type ChatEventIsAllHistoryAvailableToggled

type ChatEventIsAllHistoryAvailableToggled struct {

	// New value of is_all_history_available
	IsAllHistoryAvailable bool `json:"is_all_history_available"`
	// contains filtered or unexported fields
}

The is_all_history_available setting of a supergroup was toggled

func UnmarshalChatEventIsAllHistoryAvailableToggled

func UnmarshalChatEventIsAllHistoryAvailableToggled(data json.RawMessage) (*ChatEventIsAllHistoryAvailableToggled, error)

func (*ChatEventIsAllHistoryAvailableToggled) ChatEventActionType

func (*ChatEventIsAllHistoryAvailableToggled) ChatEventActionType() string

func (*ChatEventIsAllHistoryAvailableToggled) GetClass

func (*ChatEventIsAllHistoryAvailableToggled) GetType

func (*ChatEventIsAllHistoryAvailableToggled) MarshalJSON

func (entity *ChatEventIsAllHistoryAvailableToggled) MarshalJSON() ([]byte, error)

type ChatEventLinkedChatChanged

type ChatEventLinkedChatChanged struct {

	// Previous supergroup linked chat identifier
	OldLinkedChatId int64 `json:"old_linked_chat_id"`
	// New supergroup linked chat identifier
	NewLinkedChatId int64 `json:"new_linked_chat_id"`
	// contains filtered or unexported fields
}

The linked chat of a supergroup was changed

func UnmarshalChatEventLinkedChatChanged

func UnmarshalChatEventLinkedChatChanged(data json.RawMessage) (*ChatEventLinkedChatChanged, error)

func (*ChatEventLinkedChatChanged) ChatEventActionType

func (*ChatEventLinkedChatChanged) ChatEventActionType() string

func (*ChatEventLinkedChatChanged) GetClass

func (*ChatEventLinkedChatChanged) GetClass() string

func (*ChatEventLinkedChatChanged) GetType

func (*ChatEventLinkedChatChanged) MarshalJSON

func (entity *ChatEventLinkedChatChanged) MarshalJSON() ([]byte, error)

type ChatEventLocationChanged

type ChatEventLocationChanged struct {

	// Previous location; may be null
	OldLocation *ChatLocation `json:"old_location"`
	// New location; may be null
	NewLocation *ChatLocation `json:"new_location"`
	// contains filtered or unexported fields
}

The supergroup location was changed

func UnmarshalChatEventLocationChanged

func UnmarshalChatEventLocationChanged(data json.RawMessage) (*ChatEventLocationChanged, error)

func (*ChatEventLocationChanged) ChatEventActionType

func (*ChatEventLocationChanged) ChatEventActionType() string

func (*ChatEventLocationChanged) GetClass

func (*ChatEventLocationChanged) GetClass() string

func (*ChatEventLocationChanged) GetType

func (*ChatEventLocationChanged) GetType() string

func (*ChatEventLocationChanged) MarshalJSON

func (entity *ChatEventLocationChanged) MarshalJSON() ([]byte, error)

type ChatEventLogFilters

type ChatEventLogFilters struct {

	// True, if message edits need to be returned
	MessageEdits bool `json:"message_edits"`
	// True, if message deletions need to be returned
	MessageDeletions bool `json:"message_deletions"`
	// True, if pin/unpin events need to be returned
	MessagePins bool `json:"message_pins"`
	// True, if members joining events need to be returned
	MemberJoins bool `json:"member_joins"`
	// True, if members leaving events need to be returned
	MemberLeaves bool `json:"member_leaves"`
	// True, if invited member events need to be returned
	MemberInvites bool `json:"member_invites"`
	// True, if member promotion/demotion events need to be returned
	MemberPromotions bool `json:"member_promotions"`
	// True, if member restricted/unrestricted/banned/unbanned events need to be returned
	MemberRestrictions bool `json:"member_restrictions"`
	// True, if changes in chat information need to be returned
	InfoChanges bool `json:"info_changes"`
	// True, if changes in chat settings need to be returned
	SettingChanges bool `json:"setting_changes"`
	// True, if changes to invite links need to be returned
	InviteLinkChanges bool `json:"invite_link_changes"`
	// True, if video chat actions need to be returned
	VideoChatChanges bool `json:"video_chat_changes"`
	// contains filtered or unexported fields
}

Represents a set of filters used to obtain a chat event log

func UnmarshalChatEventLogFilters

func UnmarshalChatEventLogFilters(data json.RawMessage) (*ChatEventLogFilters, error)

func (*ChatEventLogFilters) GetClass

func (*ChatEventLogFilters) GetClass() string

func (*ChatEventLogFilters) GetType

func (*ChatEventLogFilters) GetType() string

func (*ChatEventLogFilters) MarshalJSON

func (entity *ChatEventLogFilters) MarshalJSON() ([]byte, error)

type ChatEventMemberInvited

type ChatEventMemberInvited struct {

	// New member user identifier
	UserId int64 `json:"user_id"`
	// New member status
	Status ChatMemberStatus `json:"status"`
	// contains filtered or unexported fields
}

A new chat member was invited

func UnmarshalChatEventMemberInvited

func UnmarshalChatEventMemberInvited(data json.RawMessage) (*ChatEventMemberInvited, error)

func (*ChatEventMemberInvited) ChatEventActionType

func (*ChatEventMemberInvited) ChatEventActionType() string

func (*ChatEventMemberInvited) GetClass

func (*ChatEventMemberInvited) GetClass() string

func (*ChatEventMemberInvited) GetType

func (*ChatEventMemberInvited) GetType() string

func (*ChatEventMemberInvited) MarshalJSON

func (entity *ChatEventMemberInvited) MarshalJSON() ([]byte, error)

func (*ChatEventMemberInvited) UnmarshalJSON

func (chatEventMemberInvited *ChatEventMemberInvited) UnmarshalJSON(data []byte) error

type ChatEventMemberJoined

type ChatEventMemberJoined struct {
	// contains filtered or unexported fields
}

A new member joined the chat

func UnmarshalChatEventMemberJoined

func UnmarshalChatEventMemberJoined(data json.RawMessage) (*ChatEventMemberJoined, error)

func (*ChatEventMemberJoined) ChatEventActionType

func (*ChatEventMemberJoined) ChatEventActionType() string

func (*ChatEventMemberJoined) GetClass

func (*ChatEventMemberJoined) GetClass() string

func (*ChatEventMemberJoined) GetType

func (*ChatEventMemberJoined) GetType() string

func (*ChatEventMemberJoined) MarshalJSON

func (entity *ChatEventMemberJoined) MarshalJSON() ([]byte, error)
type ChatEventMemberJoinedByInviteLink struct {

	// Invite link used to join the chat
	InviteLink *ChatInviteLink `json:"invite_link"`
	// contains filtered or unexported fields
}

A new member joined the chat via an invite link

func UnmarshalChatEventMemberJoinedByInviteLink(data json.RawMessage) (*ChatEventMemberJoinedByInviteLink, error)

func (*ChatEventMemberJoinedByInviteLink) ChatEventActionType added in v1.7.10

func (*ChatEventMemberJoinedByInviteLink) ChatEventActionType() string

func (*ChatEventMemberJoinedByInviteLink) GetClass added in v1.7.10

func (*ChatEventMemberJoinedByInviteLink) GetType added in v1.7.10

func (*ChatEventMemberJoinedByInviteLink) MarshalJSON added in v1.7.10

func (entity *ChatEventMemberJoinedByInviteLink) MarshalJSON() ([]byte, error)

type ChatEventMemberJoinedByRequest added in v1.7.10

type ChatEventMemberJoinedByRequest struct {

	// User identifier of the chat administrator, approved user join request
	ApproverUserId int64 `json:"approver_user_id"`
	// Invite link used to join the chat; may be null
	InviteLink *ChatInviteLink `json:"invite_link"`
	// contains filtered or unexported fields
}

A new member was accepted to the chat by an administrator

func UnmarshalChatEventMemberJoinedByRequest added in v1.7.10

func UnmarshalChatEventMemberJoinedByRequest(data json.RawMessage) (*ChatEventMemberJoinedByRequest, error)

func (*ChatEventMemberJoinedByRequest) ChatEventActionType added in v1.7.10

func (*ChatEventMemberJoinedByRequest) ChatEventActionType() string

func (*ChatEventMemberJoinedByRequest) GetClass added in v1.7.10

func (*ChatEventMemberJoinedByRequest) GetType added in v1.7.10

func (*ChatEventMemberJoinedByRequest) MarshalJSON added in v1.7.10

func (entity *ChatEventMemberJoinedByRequest) MarshalJSON() ([]byte, error)

type ChatEventMemberLeft

type ChatEventMemberLeft struct {
	// contains filtered or unexported fields
}

A member left the chat

func UnmarshalChatEventMemberLeft

func UnmarshalChatEventMemberLeft(data json.RawMessage) (*ChatEventMemberLeft, error)

func (*ChatEventMemberLeft) ChatEventActionType

func (*ChatEventMemberLeft) ChatEventActionType() string

func (*ChatEventMemberLeft) GetClass

func (*ChatEventMemberLeft) GetClass() string

func (*ChatEventMemberLeft) GetType

func (*ChatEventMemberLeft) GetType() string

func (*ChatEventMemberLeft) MarshalJSON

func (entity *ChatEventMemberLeft) MarshalJSON() ([]byte, error)

type ChatEventMemberPromoted

type ChatEventMemberPromoted struct {

	// Affected chat member user identifier
	UserId int64 `json:"user_id"`
	// Previous status of the chat member
	OldStatus ChatMemberStatus `json:"old_status"`
	// New status of the chat member
	NewStatus ChatMemberStatus `json:"new_status"`
	// contains filtered or unexported fields
}

A chat member has gained/lost administrator status, or the list of their administrator privileges has changed

func UnmarshalChatEventMemberPromoted

func UnmarshalChatEventMemberPromoted(data json.RawMessage) (*ChatEventMemberPromoted, error)

func (*ChatEventMemberPromoted) ChatEventActionType

func (*ChatEventMemberPromoted) ChatEventActionType() string

func (*ChatEventMemberPromoted) GetClass

func (*ChatEventMemberPromoted) GetClass() string

func (*ChatEventMemberPromoted) GetType

func (*ChatEventMemberPromoted) GetType() string

func (*ChatEventMemberPromoted) MarshalJSON

func (entity *ChatEventMemberPromoted) MarshalJSON() ([]byte, error)

func (*ChatEventMemberPromoted) UnmarshalJSON

func (chatEventMemberPromoted *ChatEventMemberPromoted) UnmarshalJSON(data []byte) error

type ChatEventMemberRestricted

type ChatEventMemberRestricted struct {

	// Affected chat member identifier
	MemberId MessageSender `json:"member_id"`
	// Previous status of the chat member
	OldStatus ChatMemberStatus `json:"old_status"`
	// New status of the chat member
	NewStatus ChatMemberStatus `json:"new_status"`
	// contains filtered or unexported fields
}

A chat member was restricted/unrestricted or banned/unbanned, or the list of their restrictions has changed

func UnmarshalChatEventMemberRestricted

func UnmarshalChatEventMemberRestricted(data json.RawMessage) (*ChatEventMemberRestricted, error)

func (*ChatEventMemberRestricted) ChatEventActionType

func (*ChatEventMemberRestricted) ChatEventActionType() string

func (*ChatEventMemberRestricted) GetClass

func (*ChatEventMemberRestricted) GetClass() string

func (*ChatEventMemberRestricted) GetType

func (*ChatEventMemberRestricted) GetType() string

func (*ChatEventMemberRestricted) MarshalJSON

func (entity *ChatEventMemberRestricted) MarshalJSON() ([]byte, error)

func (*ChatEventMemberRestricted) UnmarshalJSON

func (chatEventMemberRestricted *ChatEventMemberRestricted) UnmarshalJSON(data []byte) error

type ChatEventMessageDeleted

type ChatEventMessageDeleted struct {

	// Deleted message
	Message *Message `json:"message"`
	// contains filtered or unexported fields
}

A message was deleted

func UnmarshalChatEventMessageDeleted

func UnmarshalChatEventMessageDeleted(data json.RawMessage) (*ChatEventMessageDeleted, error)

func (*ChatEventMessageDeleted) ChatEventActionType

func (*ChatEventMessageDeleted) ChatEventActionType() string

func (*ChatEventMessageDeleted) GetClass

func (*ChatEventMessageDeleted) GetClass() string

func (*ChatEventMessageDeleted) GetType

func (*ChatEventMessageDeleted) GetType() string

func (*ChatEventMessageDeleted) MarshalJSON

func (entity *ChatEventMessageDeleted) MarshalJSON() ([]byte, error)

type ChatEventMessageEdited

type ChatEventMessageEdited struct {

	// The original message before the edit
	OldMessage *Message `json:"old_message"`
	// The message after it was edited
	NewMessage *Message `json:"new_message"`
	// contains filtered or unexported fields
}

A message was edited

func UnmarshalChatEventMessageEdited

func UnmarshalChatEventMessageEdited(data json.RawMessage) (*ChatEventMessageEdited, error)

func (*ChatEventMessageEdited) ChatEventActionType

func (*ChatEventMessageEdited) ChatEventActionType() string

func (*ChatEventMessageEdited) GetClass

func (*ChatEventMessageEdited) GetClass() string

func (*ChatEventMessageEdited) GetType

func (*ChatEventMessageEdited) GetType() string

func (*ChatEventMessageEdited) MarshalJSON

func (entity *ChatEventMessageEdited) MarshalJSON() ([]byte, error)

type ChatEventMessagePinned

type ChatEventMessagePinned struct {

	// Pinned message
	Message *Message `json:"message"`
	// contains filtered or unexported fields
}

A message was pinned

func UnmarshalChatEventMessagePinned

func UnmarshalChatEventMessagePinned(data json.RawMessage) (*ChatEventMessagePinned, error)

func (*ChatEventMessagePinned) ChatEventActionType

func (*ChatEventMessagePinned) ChatEventActionType() string

func (*ChatEventMessagePinned) GetClass

func (*ChatEventMessagePinned) GetClass() string

func (*ChatEventMessagePinned) GetType

func (*ChatEventMessagePinned) GetType() string

func (*ChatEventMessagePinned) MarshalJSON

func (entity *ChatEventMessagePinned) MarshalJSON() ([]byte, error)

type ChatEventMessageTtlChanged added in v1.8.3

type ChatEventMessageTtlChanged struct {

	// Previous value of message_ttl
	OldMessageTtl int32 `json:"old_message_ttl"`
	// New value of message_ttl
	NewMessageTtl int32 `json:"new_message_ttl"`
	// contains filtered or unexported fields
}

The message TTL was changed

func UnmarshalChatEventMessageTtlChanged added in v1.8.3

func UnmarshalChatEventMessageTtlChanged(data json.RawMessage) (*ChatEventMessageTtlChanged, error)

func (*ChatEventMessageTtlChanged) ChatEventActionType added in v1.8.3

func (*ChatEventMessageTtlChanged) ChatEventActionType() string

func (*ChatEventMessageTtlChanged) GetClass added in v1.8.3

func (*ChatEventMessageTtlChanged) GetClass() string

func (*ChatEventMessageTtlChanged) GetType added in v1.8.3

func (*ChatEventMessageTtlChanged) MarshalJSON added in v1.8.3

func (entity *ChatEventMessageTtlChanged) MarshalJSON() ([]byte, error)

type ChatEventMessageUnpinned

type ChatEventMessageUnpinned struct {

	// Unpinned message
	Message *Message `json:"message"`
	// contains filtered or unexported fields
}

A message was unpinned

func UnmarshalChatEventMessageUnpinned

func UnmarshalChatEventMessageUnpinned(data json.RawMessage) (*ChatEventMessageUnpinned, error)

func (*ChatEventMessageUnpinned) ChatEventActionType

func (*ChatEventMessageUnpinned) ChatEventActionType() string

func (*ChatEventMessageUnpinned) GetClass

func (*ChatEventMessageUnpinned) GetClass() string

func (*ChatEventMessageUnpinned) GetType

func (*ChatEventMessageUnpinned) GetType() string

func (*ChatEventMessageUnpinned) MarshalJSON

func (entity *ChatEventMessageUnpinned) MarshalJSON() ([]byte, error)

type ChatEventPermissionsChanged

type ChatEventPermissionsChanged struct {

	// Previous chat permissions
	OldPermissions *ChatPermissions `json:"old_permissions"`
	// New chat permissions
	NewPermissions *ChatPermissions `json:"new_permissions"`
	// contains filtered or unexported fields
}

The chat permissions was changed

func UnmarshalChatEventPermissionsChanged

func UnmarshalChatEventPermissionsChanged(data json.RawMessage) (*ChatEventPermissionsChanged, error)

func (*ChatEventPermissionsChanged) ChatEventActionType

func (*ChatEventPermissionsChanged) ChatEventActionType() string

func (*ChatEventPermissionsChanged) GetClass

func (*ChatEventPermissionsChanged) GetClass() string

func (*ChatEventPermissionsChanged) GetType

func (*ChatEventPermissionsChanged) MarshalJSON

func (entity *ChatEventPermissionsChanged) MarshalJSON() ([]byte, error)

type ChatEventPhotoChanged

type ChatEventPhotoChanged struct {

	// Previous chat photo value; may be null
	OldPhoto *ChatPhoto `json:"old_photo"`
	// New chat photo value; may be null
	NewPhoto *ChatPhoto `json:"new_photo"`
	// contains filtered or unexported fields
}

The chat photo was changed

func UnmarshalChatEventPhotoChanged

func UnmarshalChatEventPhotoChanged(data json.RawMessage) (*ChatEventPhotoChanged, error)

func (*ChatEventPhotoChanged) ChatEventActionType

func (*ChatEventPhotoChanged) ChatEventActionType() string

func (*ChatEventPhotoChanged) GetClass

func (*ChatEventPhotoChanged) GetClass() string

func (*ChatEventPhotoChanged) GetType

func (*ChatEventPhotoChanged) GetType() string

func (*ChatEventPhotoChanged) MarshalJSON

func (entity *ChatEventPhotoChanged) MarshalJSON() ([]byte, error)

type ChatEventPollStopped

type ChatEventPollStopped struct {

	// The message with the poll
	Message *Message `json:"message"`
	// contains filtered or unexported fields
}

A poll in a message was stopped

func UnmarshalChatEventPollStopped

func UnmarshalChatEventPollStopped(data json.RawMessage) (*ChatEventPollStopped, error)

func (*ChatEventPollStopped) ChatEventActionType

func (*ChatEventPollStopped) ChatEventActionType() string

func (*ChatEventPollStopped) GetClass

func (*ChatEventPollStopped) GetClass() string

func (*ChatEventPollStopped) GetType

func (*ChatEventPollStopped) GetType() string

func (*ChatEventPollStopped) MarshalJSON

func (entity *ChatEventPollStopped) MarshalJSON() ([]byte, error)

type ChatEventSignMessagesToggled

type ChatEventSignMessagesToggled struct {

	// New value of sign_messages
	SignMessages bool `json:"sign_messages"`
	// contains filtered or unexported fields
}

The sign_messages setting of a channel was toggled

func UnmarshalChatEventSignMessagesToggled

func UnmarshalChatEventSignMessagesToggled(data json.RawMessage) (*ChatEventSignMessagesToggled, error)

func (*ChatEventSignMessagesToggled) ChatEventActionType

func (*ChatEventSignMessagesToggled) ChatEventActionType() string

func (*ChatEventSignMessagesToggled) GetClass

func (*ChatEventSignMessagesToggled) GetType

func (*ChatEventSignMessagesToggled) MarshalJSON

func (entity *ChatEventSignMessagesToggled) MarshalJSON() ([]byte, error)

type ChatEventSlowModeDelayChanged

type ChatEventSlowModeDelayChanged struct {

	// Previous value of slow_mode_delay, in seconds
	OldSlowModeDelay int32 `json:"old_slow_mode_delay"`
	// New value of slow_mode_delay, in seconds
	NewSlowModeDelay int32 `json:"new_slow_mode_delay"`
	// contains filtered or unexported fields
}

The slow_mode_delay setting of a supergroup was changed

func UnmarshalChatEventSlowModeDelayChanged

func UnmarshalChatEventSlowModeDelayChanged(data json.RawMessage) (*ChatEventSlowModeDelayChanged, error)

func (*ChatEventSlowModeDelayChanged) ChatEventActionType

func (*ChatEventSlowModeDelayChanged) ChatEventActionType() string

func (*ChatEventSlowModeDelayChanged) GetClass

func (*ChatEventSlowModeDelayChanged) GetType

func (*ChatEventSlowModeDelayChanged) MarshalJSON

func (entity *ChatEventSlowModeDelayChanged) MarshalJSON() ([]byte, error)

type ChatEventStickerSetChanged

type ChatEventStickerSetChanged struct {

	// Previous identifier of the chat sticker set; 0 if none
	OldStickerSetId JsonInt64 `json:"old_sticker_set_id"`
	// New identifier of the chat sticker set; 0 if none
	NewStickerSetId JsonInt64 `json:"new_sticker_set_id"`
	// contains filtered or unexported fields
}

The supergroup sticker set was changed

func UnmarshalChatEventStickerSetChanged

func UnmarshalChatEventStickerSetChanged(data json.RawMessage) (*ChatEventStickerSetChanged, error)

func (*ChatEventStickerSetChanged) ChatEventActionType

func (*ChatEventStickerSetChanged) ChatEventActionType() string

func (*ChatEventStickerSetChanged) GetClass

func (*ChatEventStickerSetChanged) GetClass() string

func (*ChatEventStickerSetChanged) GetType

func (*ChatEventStickerSetChanged) MarshalJSON

func (entity *ChatEventStickerSetChanged) MarshalJSON() ([]byte, error)

type ChatEventTitleChanged

type ChatEventTitleChanged struct {

	// Previous chat title
	OldTitle string `json:"old_title"`
	// New chat title
	NewTitle string `json:"new_title"`
	// contains filtered or unexported fields
}

The chat title was changed

func UnmarshalChatEventTitleChanged

func UnmarshalChatEventTitleChanged(data json.RawMessage) (*ChatEventTitleChanged, error)

func (*ChatEventTitleChanged) ChatEventActionType

func (*ChatEventTitleChanged) ChatEventActionType() string

func (*ChatEventTitleChanged) GetClass

func (*ChatEventTitleChanged) GetClass() string

func (*ChatEventTitleChanged) GetType

func (*ChatEventTitleChanged) GetType() string

func (*ChatEventTitleChanged) MarshalJSON

func (entity *ChatEventTitleChanged) MarshalJSON() ([]byte, error)

type ChatEventUsernameChanged

type ChatEventUsernameChanged struct {

	// Previous chat username
	OldUsername string `json:"old_username"`
	// New chat username
	NewUsername string `json:"new_username"`
	// contains filtered or unexported fields
}

The chat username was changed

func UnmarshalChatEventUsernameChanged

func UnmarshalChatEventUsernameChanged(data json.RawMessage) (*ChatEventUsernameChanged, error)

func (*ChatEventUsernameChanged) ChatEventActionType

func (*ChatEventUsernameChanged) ChatEventActionType() string

func (*ChatEventUsernameChanged) GetClass

func (*ChatEventUsernameChanged) GetClass() string

func (*ChatEventUsernameChanged) GetType

func (*ChatEventUsernameChanged) GetType() string

func (*ChatEventUsernameChanged) MarshalJSON

func (entity *ChatEventUsernameChanged) MarshalJSON() ([]byte, error)

type ChatEventVideoChatCreated added in v1.7.10

type ChatEventVideoChatCreated struct {

	// Identifier of the video chat. The video chat can be received through the method getGroupCall
	GroupCallId int32 `json:"group_call_id"`
	// contains filtered or unexported fields
}

A video chat was created

func UnmarshalChatEventVideoChatCreated added in v1.7.10

func UnmarshalChatEventVideoChatCreated(data json.RawMessage) (*ChatEventVideoChatCreated, error)

func (*ChatEventVideoChatCreated) ChatEventActionType added in v1.7.10

func (*ChatEventVideoChatCreated) ChatEventActionType() string

func (*ChatEventVideoChatCreated) GetClass added in v1.7.10

func (*ChatEventVideoChatCreated) GetClass() string

func (*ChatEventVideoChatCreated) GetType added in v1.7.10

func (*ChatEventVideoChatCreated) GetType() string

func (*ChatEventVideoChatCreated) MarshalJSON added in v1.7.10

func (entity *ChatEventVideoChatCreated) MarshalJSON() ([]byte, error)

type ChatEventVideoChatEnded added in v1.8.3

type ChatEventVideoChatEnded struct {

	// Identifier of the video chat. The video chat can be received through the method getGroupCall
	GroupCallId int32 `json:"group_call_id"`
	// contains filtered or unexported fields
}

A video chat was ended

func UnmarshalChatEventVideoChatEnded added in v1.8.3

func UnmarshalChatEventVideoChatEnded(data json.RawMessage) (*ChatEventVideoChatEnded, error)

func (*ChatEventVideoChatEnded) ChatEventActionType added in v1.8.3

func (*ChatEventVideoChatEnded) ChatEventActionType() string

func (*ChatEventVideoChatEnded) GetClass added in v1.8.3

func (*ChatEventVideoChatEnded) GetClass() string

func (*ChatEventVideoChatEnded) GetType added in v1.8.3

func (*ChatEventVideoChatEnded) GetType() string

func (*ChatEventVideoChatEnded) MarshalJSON added in v1.8.3

func (entity *ChatEventVideoChatEnded) MarshalJSON() ([]byte, error)

type ChatEventVideoChatMuteNewParticipantsToggled added in v1.7.10

type ChatEventVideoChatMuteNewParticipantsToggled struct {

	// New value of the mute_new_participants setting
	MuteNewParticipants bool `json:"mute_new_participants"`
	// contains filtered or unexported fields
}

The mute_new_participants setting of a video chat was toggled

func UnmarshalChatEventVideoChatMuteNewParticipantsToggled added in v1.7.10

func UnmarshalChatEventVideoChatMuteNewParticipantsToggled(data json.RawMessage) (*ChatEventVideoChatMuteNewParticipantsToggled, error)

func (*ChatEventVideoChatMuteNewParticipantsToggled) ChatEventActionType added in v1.7.10

func (*ChatEventVideoChatMuteNewParticipantsToggled) GetClass added in v1.7.10

func (*ChatEventVideoChatMuteNewParticipantsToggled) GetType added in v1.7.10

func (*ChatEventVideoChatMuteNewParticipantsToggled) MarshalJSON added in v1.7.10

func (entity *ChatEventVideoChatMuteNewParticipantsToggled) MarshalJSON() ([]byte, error)

type ChatEventVideoChatParticipantIsMutedToggled added in v1.7.10

type ChatEventVideoChatParticipantIsMutedToggled struct {

	// Identifier of the affected group call participant
	ParticipantId MessageSender `json:"participant_id"`
	// New value of is_muted
	IsMuted bool `json:"is_muted"`
	// contains filtered or unexported fields
}

A video chat participant was muted or unmuted

func UnmarshalChatEventVideoChatParticipantIsMutedToggled added in v1.7.10

func UnmarshalChatEventVideoChatParticipantIsMutedToggled(data json.RawMessage) (*ChatEventVideoChatParticipantIsMutedToggled, error)

func (*ChatEventVideoChatParticipantIsMutedToggled) ChatEventActionType added in v1.7.10

func (*ChatEventVideoChatParticipantIsMutedToggled) ChatEventActionType() string

func (*ChatEventVideoChatParticipantIsMutedToggled) GetClass added in v1.7.10

func (*ChatEventVideoChatParticipantIsMutedToggled) GetType added in v1.7.10

func (*ChatEventVideoChatParticipantIsMutedToggled) MarshalJSON added in v1.7.10

func (entity *ChatEventVideoChatParticipantIsMutedToggled) MarshalJSON() ([]byte, error)

func (*ChatEventVideoChatParticipantIsMutedToggled) UnmarshalJSON added in v1.7.10

func (chatEventVideoChatParticipantIsMutedToggled *ChatEventVideoChatParticipantIsMutedToggled) UnmarshalJSON(data []byte) error

type ChatEventVideoChatParticipantVolumeLevelChanged added in v1.7.10

type ChatEventVideoChatParticipantVolumeLevelChanged struct {

	// Identifier of the affected group call participant
	ParticipantId MessageSender `json:"participant_id"`
	// New value of volume_level; 1-20000 in hundreds of percents
	VolumeLevel int32 `json:"volume_level"`
	// contains filtered or unexported fields
}

A video chat participant volume level was changed

func UnmarshalChatEventVideoChatParticipantVolumeLevelChanged added in v1.7.10

func UnmarshalChatEventVideoChatParticipantVolumeLevelChanged(data json.RawMessage) (*ChatEventVideoChatParticipantVolumeLevelChanged, error)

func (*ChatEventVideoChatParticipantVolumeLevelChanged) ChatEventActionType added in v1.7.10

func (*ChatEventVideoChatParticipantVolumeLevelChanged) GetClass added in v1.7.10

func (*ChatEventVideoChatParticipantVolumeLevelChanged) GetType added in v1.7.10

func (*ChatEventVideoChatParticipantVolumeLevelChanged) MarshalJSON added in v1.7.10

func (entity *ChatEventVideoChatParticipantVolumeLevelChanged) MarshalJSON() ([]byte, error)

func (*ChatEventVideoChatParticipantVolumeLevelChanged) UnmarshalJSON added in v1.7.10

func (chatEventVideoChatParticipantVolumeLevelChanged *ChatEventVideoChatParticipantVolumeLevelChanged) UnmarshalJSON(data []byte) error

type ChatEvents

type ChatEvents struct {

	// List of events
	Events []*ChatEvent `json:"events"`
	// contains filtered or unexported fields
}

Contains a list of chat events

func UnmarshalChatEvents

func UnmarshalChatEvents(data json.RawMessage) (*ChatEvents, error)

func (*ChatEvents) GetClass

func (*ChatEvents) GetClass() string

func (*ChatEvents) GetType

func (*ChatEvents) GetType() string

func (*ChatEvents) MarshalJSON

func (entity *ChatEvents) MarshalJSON() ([]byte, error)

type ChatFilter

type ChatFilter struct {

	// The title of the filter; 1-12 characters without line feeds
	Title string `json:"title"`
	// The chosen icon name for short filter representation. If non-empty, must be one of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work". If empty, use getChatFilterDefaultIconName to get default icon name for the filter
	IconName string `json:"icon_name"`
	// The chat identifiers of pinned chats in the filtered chat list
	PinnedChatIds []int64 `json:"pinned_chat_ids"`
	// The chat identifiers of always included chats in the filtered chat list
	IncludedChatIds []int64 `json:"included_chat_ids"`
	// The chat identifiers of always excluded chats in the filtered chat list
	ExcludedChatIds []int64 `json:"excluded_chat_ids"`
	// True, if muted chats need to be excluded
	ExcludeMuted bool `json:"exclude_muted"`
	// True, if read chats need to be excluded
	ExcludeRead bool `json:"exclude_read"`
	// True, if archived chats need to be excluded
	ExcludeArchived bool `json:"exclude_archived"`
	// True, if contacts need to be included
	IncludeContacts bool `json:"include_contacts"`
	// True, if non-contact users need to be included
	IncludeNonContacts bool `json:"include_non_contacts"`
	// True, if bots need to be included
	IncludeBots bool `json:"include_bots"`
	// True, if basic groups and supergroups need to be included
	IncludeGroups bool `json:"include_groups"`
	// True, if channels need to be included
	IncludeChannels bool `json:"include_channels"`
	// contains filtered or unexported fields
}

Represents a filter of user chats

func UnmarshalChatFilter

func UnmarshalChatFilter(data json.RawMessage) (*ChatFilter, error)

func (*ChatFilter) GetClass

func (*ChatFilter) GetClass() string

func (*ChatFilter) GetType

func (*ChatFilter) GetType() string

func (*ChatFilter) MarshalJSON

func (entity *ChatFilter) MarshalJSON() ([]byte, error)

type ChatFilterInfo

type ChatFilterInfo struct {

	// Unique chat filter identifier
	Id int32 `json:"id"`
	// The title of the filter; 1-12 characters without line feeds
	Title string `json:"title"`
	// The chosen or default icon name for short filter representation. One of "All", "Unread", "Unmuted", "Bots", "Channels", "Groups", "Private", "Custom", "Setup", "Cat", "Crown", "Favorite", "Flower", "Game", "Home", "Love", "Mask", "Party", "Sport", "Study", "Trade", "Travel", "Work"
	IconName string `json:"icon_name"`
	// contains filtered or unexported fields
}

Contains basic information about a chat filter

func UnmarshalChatFilterInfo

func UnmarshalChatFilterInfo(data json.RawMessage) (*ChatFilterInfo, error)

func (*ChatFilterInfo) GetClass

func (*ChatFilterInfo) GetClass() string

func (*ChatFilterInfo) GetType

func (*ChatFilterInfo) GetType() string

func (*ChatFilterInfo) MarshalJSON

func (entity *ChatFilterInfo) MarshalJSON() ([]byte, error)
type ChatInviteLink struct {

	// Chat invite link
	InviteLink string `json:"invite_link"`
	// Name of the link
	Name string `json:"name"`
	// User identifier of an administrator created the link
	CreatorUserId int64 `json:"creator_user_id"`
	// Point in time (Unix timestamp) when the link was created
	Date int32 `json:"date"`
	// Point in time (Unix timestamp) when the link was last edited; 0 if never or unknown
	EditDate int32 `json:"edit_date"`
	// Point in time (Unix timestamp) when the link will expire; 0 if never
	ExpirationDate int32 `json:"expiration_date"`
	// The maximum number of members, which can join the chat using the link simultaneously; 0 if not limited. Always 0 if the link requires approval
	MemberLimit int32 `json:"member_limit"`
	// Number of chat members, which joined the chat using the link
	MemberCount int32 `json:"member_count"`
	// Number of pending join requests created using this link
	PendingJoinRequestCount int32 `json:"pending_join_request_count"`
	// True, if the link only creates join request. If true, total number of joining members will be unlimited
	CreatesJoinRequest bool `json:"creates_join_request"`
	// True, if the link is primary. Primary invite link can't have name, expiration date, or usage limit. There is exactly one primary invite link for each administrator with can_invite_users right at a given time
	IsPrimary bool `json:"is_primary"`
	// True, if the link was revoked
	IsRevoked bool `json:"is_revoked"`
	// contains filtered or unexported fields
}

Contains a chat invite link

func UnmarshalChatInviteLink(data json.RawMessage) (*ChatInviteLink, error)

func (*ChatInviteLink) GetClass

func (*ChatInviteLink) GetClass() string

func (*ChatInviteLink) GetType

func (*ChatInviteLink) GetType() string

func (*ChatInviteLink) MarshalJSON

func (entity *ChatInviteLink) MarshalJSON() ([]byte, error)

type ChatInviteLinkCount added in v1.7.10

type ChatInviteLinkCount struct {

	// Administrator's user identifier
	UserId int64 `json:"user_id"`
	// Number of active invite links
	InviteLinkCount int32 `json:"invite_link_count"`
	// Number of revoked invite links
	RevokedInviteLinkCount int32 `json:"revoked_invite_link_count"`
	// contains filtered or unexported fields
}

Describes a chat administrator with a number of active and revoked chat invite links

func UnmarshalChatInviteLinkCount added in v1.7.10

func UnmarshalChatInviteLinkCount(data json.RawMessage) (*ChatInviteLinkCount, error)

func (*ChatInviteLinkCount) GetClass added in v1.7.10

func (*ChatInviteLinkCount) GetClass() string

func (*ChatInviteLinkCount) GetType added in v1.7.10

func (*ChatInviteLinkCount) GetType() string

func (*ChatInviteLinkCount) MarshalJSON added in v1.7.10

func (entity *ChatInviteLinkCount) MarshalJSON() ([]byte, error)

type ChatInviteLinkCounts added in v1.7.10

type ChatInviteLinkCounts struct {

	// List of invite link counts
	InviteLinkCounts []*ChatInviteLinkCount `json:"invite_link_counts"`
	// contains filtered or unexported fields
}

Contains a list of chat invite link counts

func UnmarshalChatInviteLinkCounts added in v1.7.10

func UnmarshalChatInviteLinkCounts(data json.RawMessage) (*ChatInviteLinkCounts, error)

func (*ChatInviteLinkCounts) GetClass added in v1.7.10

func (*ChatInviteLinkCounts) GetClass() string

func (*ChatInviteLinkCounts) GetType added in v1.7.10

func (*ChatInviteLinkCounts) GetType() string

func (*ChatInviteLinkCounts) MarshalJSON added in v1.7.10

func (entity *ChatInviteLinkCounts) MarshalJSON() ([]byte, error)

type ChatInviteLinkInfo

type ChatInviteLinkInfo struct {

	// Chat identifier of the invite link; 0 if the user has no access to the chat before joining
	ChatId int64 `json:"chat_id"`
	// If non-zero, the amount of time for which read access to the chat will remain available, in seconds
	AccessibleFor int32 `json:"accessible_for"`
	// Type of the chat
	Type ChatType `json:"type"`
	// Title of the chat
	Title string `json:"title"`
	// Chat photo; may be null
	Photo *ChatPhotoInfo `json:"photo"`
	// Chat description
	Description string `json:"description"`
	// Number of members in the chat
	MemberCount int32 `json:"member_count"`
	// User identifiers of some chat members that may be known to the current user
	MemberUserIds []int64 `json:"member_user_ids"`
	// True, if the link only creates join request
	CreatesJoinRequest bool `json:"creates_join_request"`
	// True, if the chat is a public supergroup or channel, i.e. it has a username or it is a location-based supergroup
	IsPublic bool `json:"is_public"`
	// contains filtered or unexported fields
}

Contains information about a chat invite link

func UnmarshalChatInviteLinkInfo

func UnmarshalChatInviteLinkInfo(data json.RawMessage) (*ChatInviteLinkInfo, error)

func (*ChatInviteLinkInfo) GetClass

func (*ChatInviteLinkInfo) GetClass() string

func (*ChatInviteLinkInfo) GetType

func (*ChatInviteLinkInfo) GetType() string

func (*ChatInviteLinkInfo) MarshalJSON

func (entity *ChatInviteLinkInfo) MarshalJSON() ([]byte, error)

func (*ChatInviteLinkInfo) UnmarshalJSON

func (chatInviteLinkInfo *ChatInviteLinkInfo) UnmarshalJSON(data []byte) error

type ChatInviteLinkMember added in v1.7.10

type ChatInviteLinkMember struct {

	// User identifier
	UserId int64 `json:"user_id"`
	// Point in time (Unix timestamp) when the user joined the chat
	JoinedChatDate int32 `json:"joined_chat_date"`
	// User identifier of the chat administrator, approved user join request
	ApproverUserId int64 `json:"approver_user_id"`
	// contains filtered or unexported fields
}

Describes a chat member joined a chat via an invite link

func UnmarshalChatInviteLinkMember added in v1.7.10

func UnmarshalChatInviteLinkMember(data json.RawMessage) (*ChatInviteLinkMember, error)

func (*ChatInviteLinkMember) GetClass added in v1.7.10

func (*ChatInviteLinkMember) GetClass() string

func (*ChatInviteLinkMember) GetType added in v1.7.10

func (*ChatInviteLinkMember) GetType() string

func (*ChatInviteLinkMember) MarshalJSON added in v1.7.10

func (entity *ChatInviteLinkMember) MarshalJSON() ([]byte, error)

type ChatInviteLinkMembers added in v1.7.10

type ChatInviteLinkMembers struct {

	// Approximate total number of chat members found
	TotalCount int32 `json:"total_count"`
	// List of chat members, joined a chat via an invite link
	Members []*ChatInviteLinkMember `json:"members"`
	// contains filtered or unexported fields
}

Contains a list of chat members joined a chat via an invite link

func UnmarshalChatInviteLinkMembers added in v1.7.10

func UnmarshalChatInviteLinkMembers(data json.RawMessage) (*ChatInviteLinkMembers, error)

func (*ChatInviteLinkMembers) GetClass added in v1.7.10

func (*ChatInviteLinkMembers) GetClass() string

func (*ChatInviteLinkMembers) GetType added in v1.7.10

func (*ChatInviteLinkMembers) GetType() string

func (*ChatInviteLinkMembers) MarshalJSON added in v1.7.10

func (entity *ChatInviteLinkMembers) MarshalJSON() ([]byte, error)
type ChatInviteLinks struct {

	// Approximate total number of chat invite links found
	TotalCount int32 `json:"total_count"`
	// List of invite links
	InviteLinks []*ChatInviteLink `json:"invite_links"`
	// contains filtered or unexported fields
}

Contains a list of chat invite links

func UnmarshalChatInviteLinks(data json.RawMessage) (*ChatInviteLinks, error)

func (*ChatInviteLinks) GetClass added in v1.7.10

func (*ChatInviteLinks) GetClass() string

func (*ChatInviteLinks) GetType added in v1.7.10

func (*ChatInviteLinks) GetType() string

func (*ChatInviteLinks) MarshalJSON added in v1.7.10

func (entity *ChatInviteLinks) MarshalJSON() ([]byte, error)

type ChatJoinRequest added in v1.7.10

type ChatJoinRequest struct {

	// User identifier
	UserId int64 `json:"user_id"`
	// Point in time (Unix timestamp) when the user sent the join request
	Date int32 `json:"date"`
	// A short bio of the user
	Bio string `json:"bio"`
	// contains filtered or unexported fields
}

Describes a user that sent a join request and waits for administrator approval

func UnmarshalChatJoinRequest added in v1.7.10

func UnmarshalChatJoinRequest(data json.RawMessage) (*ChatJoinRequest, error)

func (*ChatJoinRequest) GetClass added in v1.7.10

func (*ChatJoinRequest) GetClass() string

func (*ChatJoinRequest) GetType added in v1.7.10

func (*ChatJoinRequest) GetType() string

func (*ChatJoinRequest) MarshalJSON added in v1.7.10

func (entity *ChatJoinRequest) MarshalJSON() ([]byte, error)

type ChatJoinRequests added in v1.7.10

type ChatJoinRequests struct {

	// Approximate total number of requests found
	TotalCount int32 `json:"total_count"`
	// List of the requests
	Requests []*ChatJoinRequest `json:"requests"`
	// contains filtered or unexported fields
}

Contains a list of requests to join a chat

func UnmarshalChatJoinRequests added in v1.7.10

func UnmarshalChatJoinRequests(data json.RawMessage) (*ChatJoinRequests, error)

func (*ChatJoinRequests) GetClass added in v1.7.10

func (*ChatJoinRequests) GetClass() string

func (*ChatJoinRequests) GetType added in v1.7.10

func (*ChatJoinRequests) GetType() string

func (*ChatJoinRequests) MarshalJSON added in v1.7.10

func (entity *ChatJoinRequests) MarshalJSON() ([]byte, error)

type ChatJoinRequestsInfo added in v1.7.10

type ChatJoinRequestsInfo struct {

	// Total number of pending join requests
	TotalCount int32 `json:"total_count"`
	// Identifiers of at most 3 users sent the newest pending join requests
	UserIds []int64 `json:"user_ids"`
	// contains filtered or unexported fields
}

Contains information about pending join requests for a chat

func UnmarshalChatJoinRequestsInfo added in v1.7.10

func UnmarshalChatJoinRequestsInfo(data json.RawMessage) (*ChatJoinRequestsInfo, error)

func (*ChatJoinRequestsInfo) GetClass added in v1.7.10

func (*ChatJoinRequestsInfo) GetClass() string

func (*ChatJoinRequestsInfo) GetType added in v1.7.10

func (*ChatJoinRequestsInfo) GetType() string

func (*ChatJoinRequestsInfo) MarshalJSON added in v1.7.10

func (entity *ChatJoinRequestsInfo) MarshalJSON() ([]byte, error)

type ChatList

type ChatList interface {
	ChatListType() string
}

Describes a list of chats

func UnmarshalChatList

func UnmarshalChatList(data json.RawMessage) (ChatList, error)

func UnmarshalListOfChatList

func UnmarshalListOfChatList(dataList []json.RawMessage) ([]ChatList, error)

type ChatListArchive

type ChatListArchive struct {
	// contains filtered or unexported fields
}

A list of chats usually located at the top of the main chat list. Unmuted chats are automatically moved from the Archive to the Main chat list when a new message arrives

func UnmarshalChatListArchive

func UnmarshalChatListArchive(data json.RawMessage) (*ChatListArchive, error)

func (*ChatListArchive) ChatListType

func (*ChatListArchive) ChatListType() string

func (*ChatListArchive) GetClass

func (*ChatListArchive) GetClass() string

func (*ChatListArchive) GetType

func (*ChatListArchive) GetType() string

func (*ChatListArchive) MarshalJSON

func (entity *ChatListArchive) MarshalJSON() ([]byte, error)

type ChatListFilter

type ChatListFilter struct {

	// Chat filter identifier
	ChatFilterId int32 `json:"chat_filter_id"`
	// contains filtered or unexported fields
}

A list of chats belonging to a chat filter

func UnmarshalChatListFilter

func UnmarshalChatListFilter(data json.RawMessage) (*ChatListFilter, error)

func (*ChatListFilter) ChatListType

func (*ChatListFilter) ChatListType() string

func (*ChatListFilter) GetClass

func (*ChatListFilter) GetClass() string

func (*ChatListFilter) GetType

func (*ChatListFilter) GetType() string

func (*ChatListFilter) MarshalJSON

func (entity *ChatListFilter) MarshalJSON() ([]byte, error)

type ChatListMain

type ChatListMain struct {
	// contains filtered or unexported fields
}

A main list of chats

func UnmarshalChatListMain

func UnmarshalChatListMain(data json.RawMessage) (*ChatListMain, error)

func (*ChatListMain) ChatListType

func (*ChatListMain) ChatListType() string

func (*ChatListMain) GetClass

func (*ChatListMain) GetClass() string

func (*ChatListMain) GetType

func (*ChatListMain) GetType() string

func (*ChatListMain) MarshalJSON

func (entity *ChatListMain) MarshalJSON() ([]byte, error)

type ChatLists

type ChatLists struct {

	// List of chat lists
	ChatLists []ChatList `json:"chat_lists"`
	// contains filtered or unexported fields
}

Contains a list of chat lists

func UnmarshalChatLists

func UnmarshalChatLists(data json.RawMessage) (*ChatLists, error)

func (*ChatLists) GetClass

func (*ChatLists) GetClass() string

func (*ChatLists) GetType

func (*ChatLists) GetType() string

func (*ChatLists) MarshalJSON

func (entity *ChatLists) MarshalJSON() ([]byte, error)

func (*ChatLists) UnmarshalJSON

func (chatLists *ChatLists) UnmarshalJSON(data []byte) error

type ChatLocation

type ChatLocation struct {

	// The location
	Location *Location `json:"location"`
	// Location address; 1-64 characters, as defined by the chat owner
	Address string `json:"address"`
	// contains filtered or unexported fields
}

Represents a location to which a chat is connected

func UnmarshalChatLocation

func UnmarshalChatLocation(data json.RawMessage) (*ChatLocation, error)

func (*ChatLocation) GetClass

func (*ChatLocation) GetClass() string

func (*ChatLocation) GetType

func (*ChatLocation) GetType() string

func (*ChatLocation) MarshalJSON

func (entity *ChatLocation) MarshalJSON() ([]byte, error)

type ChatMember

type ChatMember struct {

	// Identifier of the chat member. Currently, other chats can be only Left or Banned. Only supergroups and channels can have other chats as Left or Banned members and these chats must be supergroups or channels
	MemberId MessageSender `json:"member_id"`
	// Identifier of a user that invited/promoted/banned this member in the chat; 0 if unknown
	InviterUserId int64 `json:"inviter_user_id"`
	// Point in time (Unix timestamp) when the user joined the chat
	JoinedChatDate int32 `json:"joined_chat_date"`
	// Status of the member in the chat
	Status ChatMemberStatus `json:"status"`
	// contains filtered or unexported fields
}

Describes a user or a chat as a member of another chat

func UnmarshalChatMember

func UnmarshalChatMember(data json.RawMessage) (*ChatMember, error)

func (*ChatMember) GetClass

func (*ChatMember) GetClass() string

func (*ChatMember) GetType

func (*ChatMember) GetType() string

func (*ChatMember) MarshalJSON

func (entity *ChatMember) MarshalJSON() ([]byte, error)

func (*ChatMember) UnmarshalJSON

func (chatMember *ChatMember) UnmarshalJSON(data []byte) error

type ChatMemberStatus

type ChatMemberStatus interface {
	ChatMemberStatusType() string
}

Provides information about the status of a member in a chat

func UnmarshalChatMemberStatus

func UnmarshalChatMemberStatus(data json.RawMessage) (ChatMemberStatus, error)

func UnmarshalListOfChatMemberStatus

func UnmarshalListOfChatMemberStatus(dataList []json.RawMessage) ([]ChatMemberStatus, error)

type ChatMemberStatusAdministrator

type ChatMemberStatusAdministrator struct {

	// A custom title of the administrator; 0-16 characters without emojis; applicable to supergroups only
	CustomTitle string `json:"custom_title"`
	// True, if the current user can edit the administrator privileges for the called user
	CanBeEdited bool `json:"can_be_edited"`
	// Rights of the administrator
	Rights *ChatAdministratorRights `json:"rights"`
	// contains filtered or unexported fields
}

The user is a member of the chat and has some additional privileges. In basic groups, administrators can edit and delete messages sent by others, add new members, ban unprivileged members, and manage video chats. In supergroups and channels, there are more detailed options for administrator privileges

func UnmarshalChatMemberStatusAdministrator

func UnmarshalChatMemberStatusAdministrator(data json.RawMessage) (*ChatMemberStatusAdministrator, error)

func (*ChatMemberStatusAdministrator) ChatMemberStatusType

func (*ChatMemberStatusAdministrator) ChatMemberStatusType() string

func (*ChatMemberStatusAdministrator) GetClass

func (*ChatMemberStatusAdministrator) GetType

func (*ChatMemberStatusAdministrator) MarshalJSON

func (entity *ChatMemberStatusAdministrator) MarshalJSON() ([]byte, error)

type ChatMemberStatusBanned

type ChatMemberStatusBanned struct {

	// Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Always 0 in basic groups
	BannedUntilDate int32 `json:"banned_until_date"`
	// contains filtered or unexported fields
}

The user or the chat was banned (and hence is not a member of the chat). Implies the user can't return to the chat, view messages, or be used as a participant identifier to join a video chat of the chat

func UnmarshalChatMemberStatusBanned

func UnmarshalChatMemberStatusBanned(data json.RawMessage) (*ChatMemberStatusBanned, error)

func (*ChatMemberStatusBanned) ChatMemberStatusType

func (*ChatMemberStatusBanned) ChatMemberStatusType() string

func (*ChatMemberStatusBanned) GetClass

func (*ChatMemberStatusBanned) GetClass() string

func (*ChatMemberStatusBanned) GetType

func (*ChatMemberStatusBanned) GetType() string

func (*ChatMemberStatusBanned) MarshalJSON

func (entity *ChatMemberStatusBanned) MarshalJSON() ([]byte, error)

type ChatMemberStatusCreator

type ChatMemberStatusCreator struct {

	// A custom title of the owner; 0-16 characters without emojis; applicable to supergroups only
	CustomTitle string `json:"custom_title"`
	// True, if the creator isn't shown in the chat member list and sends messages anonymously; applicable to supergroups only
	IsAnonymous bool `json:"is_anonymous"`
	// True, if the user is a member of the chat
	IsMember bool `json:"is_member"`
	// contains filtered or unexported fields
}

The user is the owner of the chat and has all the administrator privileges

func UnmarshalChatMemberStatusCreator

func UnmarshalChatMemberStatusCreator(data json.RawMessage) (*ChatMemberStatusCreator, error)

func (*ChatMemberStatusCreator) ChatMemberStatusType

func (*ChatMemberStatusCreator) ChatMemberStatusType() string

func (*ChatMemberStatusCreator) GetClass

func (*ChatMemberStatusCreator) GetClass() string

func (*ChatMemberStatusCreator) GetType

func (*ChatMemberStatusCreator) GetType() string

func (*ChatMemberStatusCreator) MarshalJSON

func (entity *ChatMemberStatusCreator) MarshalJSON() ([]byte, error)

type ChatMemberStatusLeft

type ChatMemberStatusLeft struct {
	// contains filtered or unexported fields
}

The user or the chat is not a chat member

func UnmarshalChatMemberStatusLeft

func UnmarshalChatMemberStatusLeft(data json.RawMessage) (*ChatMemberStatusLeft, error)

func (*ChatMemberStatusLeft) ChatMemberStatusType

func (*ChatMemberStatusLeft) ChatMemberStatusType() string

func (*ChatMemberStatusLeft) GetClass

func (*ChatMemberStatusLeft) GetClass() string

func (*ChatMemberStatusLeft) GetType

func (*ChatMemberStatusLeft) GetType() string

func (*ChatMemberStatusLeft) MarshalJSON

func (entity *ChatMemberStatusLeft) MarshalJSON() ([]byte, error)

type ChatMemberStatusMember

type ChatMemberStatusMember struct {
	// contains filtered or unexported fields
}

The user is a member of the chat, without any additional privileges or restrictions

func UnmarshalChatMemberStatusMember

func UnmarshalChatMemberStatusMember(data json.RawMessage) (*ChatMemberStatusMember, error)

func (*ChatMemberStatusMember) ChatMemberStatusType

func (*ChatMemberStatusMember) ChatMemberStatusType() string

func (*ChatMemberStatusMember) GetClass

func (*ChatMemberStatusMember) GetClass() string

func (*ChatMemberStatusMember) GetType

func (*ChatMemberStatusMember) GetType() string

func (*ChatMemberStatusMember) MarshalJSON

func (entity *ChatMemberStatusMember) MarshalJSON() ([]byte, error)

type ChatMemberStatusRestricted

type ChatMemberStatusRestricted struct {

	// True, if the user is a member of the chat
	IsMember bool `json:"is_member"`
	// Point in time (Unix timestamp) when restrictions will be lifted from the user; 0 if never. If the user is restricted for more than 366 days or for less than 30 seconds from the current time, the user is considered to be restricted forever
	RestrictedUntilDate int32 `json:"restricted_until_date"`
	// User permissions in the chat
	Permissions *ChatPermissions `json:"permissions"`
	// contains filtered or unexported fields
}

The user is under certain restrictions in the chat. Not supported in basic groups and channels

func UnmarshalChatMemberStatusRestricted

func UnmarshalChatMemberStatusRestricted(data json.RawMessage) (*ChatMemberStatusRestricted, error)

func (*ChatMemberStatusRestricted) ChatMemberStatusType

func (*ChatMemberStatusRestricted) ChatMemberStatusType() string

func (*ChatMemberStatusRestricted) GetClass

func (*ChatMemberStatusRestricted) GetClass() string

func (*ChatMemberStatusRestricted) GetType

func (*ChatMemberStatusRestricted) MarshalJSON

func (entity *ChatMemberStatusRestricted) MarshalJSON() ([]byte, error)

type ChatMembers

type ChatMembers struct {

	// Approximate total number of chat members found
	TotalCount int32 `json:"total_count"`
	// A list of chat members
	Members []*ChatMember `json:"members"`
	// contains filtered or unexported fields
}

Contains a list of chat members

func UnmarshalChatMembers

func UnmarshalChatMembers(data json.RawMessage) (*ChatMembers, error)

func (*ChatMembers) GetClass

func (*ChatMembers) GetClass() string

func (*ChatMembers) GetType

func (*ChatMembers) GetType() string

func (*ChatMembers) MarshalJSON

func (entity *ChatMembers) MarshalJSON() ([]byte, error)

type ChatMembersFilter

type ChatMembersFilter interface {
	ChatMembersFilterType() string
}

Specifies the kind of chat members to return in searchChatMembers

func UnmarshalChatMembersFilter

func UnmarshalChatMembersFilter(data json.RawMessage) (ChatMembersFilter, error)

func UnmarshalListOfChatMembersFilter

func UnmarshalListOfChatMembersFilter(dataList []json.RawMessage) ([]ChatMembersFilter, error)

type ChatMembersFilterAdministrators

type ChatMembersFilterAdministrators struct {
	// contains filtered or unexported fields
}

Returns the owner and administrators

func UnmarshalChatMembersFilterAdministrators

func UnmarshalChatMembersFilterAdministrators(data json.RawMessage) (*ChatMembersFilterAdministrators, error)

func (*ChatMembersFilterAdministrators) ChatMembersFilterType

func (*ChatMembersFilterAdministrators) ChatMembersFilterType() string

func (*ChatMembersFilterAdministrators) GetClass

func (*ChatMembersFilterAdministrators) GetType

func (*ChatMembersFilterAdministrators) MarshalJSON

func (entity *ChatMembersFilterAdministrators) MarshalJSON() ([]byte, error)

type ChatMembersFilterBanned

type ChatMembersFilterBanned struct {
	// contains filtered or unexported fields
}

Returns users banned from the chat; can be used only by administrators in a supergroup or in a channel

func UnmarshalChatMembersFilterBanned

func UnmarshalChatMembersFilterBanned(data json.RawMessage) (*ChatMembersFilterBanned, error)

func (*ChatMembersFilterBanned) ChatMembersFilterType

func (*ChatMembersFilterBanned) ChatMembersFilterType() string

func (*ChatMembersFilterBanned) GetClass

func (*ChatMembersFilterBanned) GetClass() string

func (*ChatMembersFilterBanned) GetType

func (*ChatMembersFilterBanned) GetType() string

func (*ChatMembersFilterBanned) MarshalJSON

func (entity *ChatMembersFilterBanned) MarshalJSON() ([]byte, error)

type ChatMembersFilterBots

type ChatMembersFilterBots struct {
	// contains filtered or unexported fields
}

Returns bot members of the chat

func UnmarshalChatMembersFilterBots

func UnmarshalChatMembersFilterBots(data json.RawMessage) (*ChatMembersFilterBots, error)

func (*ChatMembersFilterBots) ChatMembersFilterType

func (*ChatMembersFilterBots) ChatMembersFilterType() string

func (*ChatMembersFilterBots) GetClass

func (*ChatMembersFilterBots) GetClass() string

func (*ChatMembersFilterBots) GetType

func (*ChatMembersFilterBots) GetType() string

func (*ChatMembersFilterBots) MarshalJSON

func (entity *ChatMembersFilterBots) MarshalJSON() ([]byte, error)

type ChatMembersFilterContacts

type ChatMembersFilterContacts struct {
	// contains filtered or unexported fields
}

Returns contacts of the user

func UnmarshalChatMembersFilterContacts

func UnmarshalChatMembersFilterContacts(data json.RawMessage) (*ChatMembersFilterContacts, error)

func (*ChatMembersFilterContacts) ChatMembersFilterType

func (*ChatMembersFilterContacts) ChatMembersFilterType() string

func (*ChatMembersFilterContacts) GetClass

func (*ChatMembersFilterContacts) GetClass() string

func (*ChatMembersFilterContacts) GetType

func (*ChatMembersFilterContacts) GetType() string

func (*ChatMembersFilterContacts) MarshalJSON

func (entity *ChatMembersFilterContacts) MarshalJSON() ([]byte, error)

type ChatMembersFilterMembers

type ChatMembersFilterMembers struct {
	// contains filtered or unexported fields
}

Returns all chat members, including restricted chat members

func UnmarshalChatMembersFilterMembers

func UnmarshalChatMembersFilterMembers(data json.RawMessage) (*ChatMembersFilterMembers, error)

func (*ChatMembersFilterMembers) ChatMembersFilterType

func (*ChatMembersFilterMembers) ChatMembersFilterType() string

func (*ChatMembersFilterMembers) GetClass

func (*ChatMembersFilterMembers) GetClass() string

func (*ChatMembersFilterMembers) GetType

func (*ChatMembersFilterMembers) GetType() string

func (*ChatMembersFilterMembers) MarshalJSON

func (entity *ChatMembersFilterMembers) MarshalJSON() ([]byte, error)

type ChatMembersFilterMention

type ChatMembersFilterMention struct {

	// If non-zero, the identifier of the current message thread
	MessageThreadId int64 `json:"message_thread_id"`
	// contains filtered or unexported fields
}

Returns users which can be mentioned in the chat

func UnmarshalChatMembersFilterMention

func UnmarshalChatMembersFilterMention(data json.RawMessage) (*ChatMembersFilterMention, error)

func (*ChatMembersFilterMention) ChatMembersFilterType

func (*ChatMembersFilterMention) ChatMembersFilterType() string

func (*ChatMembersFilterMention) GetClass

func (*ChatMembersFilterMention) GetClass() string

func (*ChatMembersFilterMention) GetType

func (*ChatMembersFilterMention) GetType() string

func (*ChatMembersFilterMention) MarshalJSON

func (entity *ChatMembersFilterMention) MarshalJSON() ([]byte, error)

type ChatMembersFilterRestricted

type ChatMembersFilterRestricted struct {
	// contains filtered or unexported fields
}

Returns users under certain restrictions in the chat; can be used only by administrators in a supergroup

func UnmarshalChatMembersFilterRestricted

func UnmarshalChatMembersFilterRestricted(data json.RawMessage) (*ChatMembersFilterRestricted, error)

func (*ChatMembersFilterRestricted) ChatMembersFilterType

func (*ChatMembersFilterRestricted) ChatMembersFilterType() string

func (*ChatMembersFilterRestricted) GetClass

func (*ChatMembersFilterRestricted) GetClass() string

func (*ChatMembersFilterRestricted) GetType

func (*ChatMembersFilterRestricted) MarshalJSON

func (entity *ChatMembersFilterRestricted) MarshalJSON() ([]byte, error)

type ChatNearby

type ChatNearby struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Distance to the chat location, in meters
	Distance int32 `json:"distance"`
	// contains filtered or unexported fields
}

Describes a chat located nearby

func UnmarshalChatNearby

func UnmarshalChatNearby(data json.RawMessage) (*ChatNearby, error)

func (*ChatNearby) GetClass

func (*ChatNearby) GetClass() string

func (*ChatNearby) GetType

func (*ChatNearby) GetType() string

func (*ChatNearby) MarshalJSON

func (entity *ChatNearby) MarshalJSON() ([]byte, error)

type ChatNotificationSettings

type ChatNotificationSettings struct {

	// If true, mute_for is ignored and the value for the relevant type of chat is used instead
	UseDefaultMuteFor bool `json:"use_default_mute_for"`
	// Time left before notifications will be unmuted, in seconds
	MuteFor int32 `json:"mute_for"`
	// If true, the value for the relevant type of chat is used instead of sound_id
	UseDefaultSound bool `json:"use_default_sound"`
	// Identifier of the notification sound to be played; 0 if sound is disabled
	SoundId JsonInt64 `json:"sound_id"`
	// If true, show_preview is ignored and the value for the relevant type of chat is used instead
	UseDefaultShowPreview bool `json:"use_default_show_preview"`
	// True, if message content must be displayed in notifications
	ShowPreview bool `json:"show_preview"`
	// If true, disable_pinned_message_notifications is ignored and the value for the relevant type of chat is used instead
	UseDefaultDisablePinnedMessageNotifications bool `json:"use_default_disable_pinned_message_notifications"`
	// If true, notifications for incoming pinned messages will be created as for an ordinary unread message
	DisablePinnedMessageNotifications bool `json:"disable_pinned_message_notifications"`
	// If true, disable_mention_notifications is ignored and the value for the relevant type of chat is used instead
	UseDefaultDisableMentionNotifications bool `json:"use_default_disable_mention_notifications"`
	// If true, notifications for messages with mentions will be created as for an ordinary unread message
	DisableMentionNotifications bool `json:"disable_mention_notifications"`
	// contains filtered or unexported fields
}

Contains information about notification settings for a chat

func UnmarshalChatNotificationSettings

func UnmarshalChatNotificationSettings(data json.RawMessage) (*ChatNotificationSettings, error)

func (*ChatNotificationSettings) GetClass

func (*ChatNotificationSettings) GetClass() string

func (*ChatNotificationSettings) GetType

func (*ChatNotificationSettings) GetType() string

func (*ChatNotificationSettings) MarshalJSON

func (entity *ChatNotificationSettings) MarshalJSON() ([]byte, error)

type ChatPermissions

type ChatPermissions struct {

	// True, if the user can send text messages, contacts, locations, and venues
	CanSendMessages bool `json:"can_send_messages"`
	// True, if the user can send audio files, documents, photos, videos, video notes, and voice notes. Implies can_send_messages permissions
	CanSendMediaMessages bool `json:"can_send_media_messages"`
	// True, if the user can send polls. Implies can_send_messages permissions
	CanSendPolls bool `json:"can_send_polls"`
	// True, if the user can send animations, games, stickers, and dice and use inline bots. Implies can_send_messages permissions
	CanSendOtherMessages bool `json:"can_send_other_messages"`
	// True, if the user may add a web page preview to their messages. Implies can_send_messages permissions
	CanAddWebPagePreviews bool `json:"can_add_web_page_previews"`
	// True, if the user can change the chat title, photo, and other settings
	CanChangeInfo bool `json:"can_change_info"`
	// True, if the user can invite new users to the chat
	CanInviteUsers bool `json:"can_invite_users"`
	// True, if the user can pin messages
	CanPinMessages bool `json:"can_pin_messages"`
	// contains filtered or unexported fields
}

Describes actions that a user is allowed to take in a chat

func UnmarshalChatPermissions

func UnmarshalChatPermissions(data json.RawMessage) (*ChatPermissions, error)

func (*ChatPermissions) GetClass

func (*ChatPermissions) GetClass() string

func (*ChatPermissions) GetType

func (*ChatPermissions) GetType() string

func (*ChatPermissions) MarshalJSON

func (entity *ChatPermissions) MarshalJSON() ([]byte, error)

type ChatPhoto

type ChatPhoto struct {

	// Unique photo identifier
	Id JsonInt64 `json:"id"`
	// Point in time (Unix timestamp) when the photo has been added
	AddedDate int32 `json:"added_date"`
	// Photo minithumbnail; may be null
	Minithumbnail *Minithumbnail `json:"minithumbnail"`
	// Available variants of the photo in JPEG format, in different size
	Sizes []*PhotoSize `json:"sizes"`
	// Animated variant of the photo in MPEG4 format; may be null
	Animation *AnimatedChatPhoto `json:"animation"`
	// contains filtered or unexported fields
}

Describes a chat or user profile photo

func UnmarshalChatPhoto

func UnmarshalChatPhoto(data json.RawMessage) (*ChatPhoto, error)

func (*ChatPhoto) GetClass

func (*ChatPhoto) GetClass() string

func (*ChatPhoto) GetType

func (*ChatPhoto) GetType() string

func (*ChatPhoto) MarshalJSON

func (entity *ChatPhoto) MarshalJSON() ([]byte, error)

type ChatPhotoInfo

type ChatPhotoInfo struct {

	// A small (160x160) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed
	Small *File `json:"small"`
	// A big (640x640) chat photo variant in JPEG format. The file can be downloaded only before the photo is changed
	Big *File `json:"big"`
	// Chat photo minithumbnail; may be null
	Minithumbnail *Minithumbnail `json:"minithumbnail"`
	// True, if the photo has animated variant
	HasAnimation bool `json:"has_animation"`
	// contains filtered or unexported fields
}

Contains basic information about the photo of a chat

func UnmarshalChatPhotoInfo

func UnmarshalChatPhotoInfo(data json.RawMessage) (*ChatPhotoInfo, error)

func (*ChatPhotoInfo) GetClass

func (*ChatPhotoInfo) GetClass() string

func (*ChatPhotoInfo) GetType

func (*ChatPhotoInfo) GetType() string

func (*ChatPhotoInfo) MarshalJSON

func (entity *ChatPhotoInfo) MarshalJSON() ([]byte, error)

type ChatPhotos

type ChatPhotos struct {

	// Total number of photos
	TotalCount int32 `json:"total_count"`
	// List of photos
	Photos []*ChatPhoto `json:"photos"`
	// contains filtered or unexported fields
}

Contains a list of chat or user profile photos

func UnmarshalChatPhotos

func UnmarshalChatPhotos(data json.RawMessage) (*ChatPhotos, error)

func (*ChatPhotos) GetClass

func (*ChatPhotos) GetClass() string

func (*ChatPhotos) GetType

func (*ChatPhotos) GetType() string

func (*ChatPhotos) MarshalJSON

func (entity *ChatPhotos) MarshalJSON() ([]byte, error)

type ChatPosition

type ChatPosition struct {

	// The chat list
	List ChatList `json:"list"`
	// A parameter used to determine order of the chat in the chat list. Chats must be sorted by the pair (order, chat.id) in descending order
	Order JsonInt64 `json:"order"`
	// True, if the chat is pinned in the chat list
	IsPinned bool `json:"is_pinned"`
	// Source of the chat in the chat list; may be null
	Source ChatSource `json:"source"`
	// contains filtered or unexported fields
}

Describes a position of a chat in a chat list

func UnmarshalChatPosition

func UnmarshalChatPosition(data json.RawMessage) (*ChatPosition, error)

func (*ChatPosition) GetClass

func (*ChatPosition) GetClass() string

func (*ChatPosition) GetType

func (*ChatPosition) GetType() string

func (*ChatPosition) MarshalJSON

func (entity *ChatPosition) MarshalJSON() ([]byte, error)

func (*ChatPosition) UnmarshalJSON

func (chatPosition *ChatPosition) UnmarshalJSON(data []byte) error

type ChatReportReason

type ChatReportReason interface {
	ChatReportReasonType() string
}

Describes the reason why a chat is reported

func UnmarshalChatReportReason

func UnmarshalChatReportReason(data json.RawMessage) (ChatReportReason, error)

func UnmarshalListOfChatReportReason

func UnmarshalListOfChatReportReason(dataList []json.RawMessage) ([]ChatReportReason, error)

type ChatReportReasonChildAbuse

type ChatReportReasonChildAbuse struct {
	// contains filtered or unexported fields
}

The chat has child abuse related content

func UnmarshalChatReportReasonChildAbuse

func UnmarshalChatReportReasonChildAbuse(data json.RawMessage) (*ChatReportReasonChildAbuse, error)

func (*ChatReportReasonChildAbuse) ChatReportReasonType

func (*ChatReportReasonChildAbuse) ChatReportReasonType() string

func (*ChatReportReasonChildAbuse) GetClass

func (*ChatReportReasonChildAbuse) GetClass() string

func (*ChatReportReasonChildAbuse) GetType

func (*ChatReportReasonChildAbuse) MarshalJSON

func (entity *ChatReportReasonChildAbuse) MarshalJSON() ([]byte, error)

type ChatReportReasonCopyright

type ChatReportReasonCopyright struct {
	// contains filtered or unexported fields
}

The chat contains copyrighted content

func UnmarshalChatReportReasonCopyright

func UnmarshalChatReportReasonCopyright(data json.RawMessage) (*ChatReportReasonCopyright, error)

func (*ChatReportReasonCopyright) ChatReportReasonType

func (*ChatReportReasonCopyright) ChatReportReasonType() string

func (*ChatReportReasonCopyright) GetClass

func (*ChatReportReasonCopyright) GetClass() string

func (*ChatReportReasonCopyright) GetType

func (*ChatReportReasonCopyright) GetType() string

func (*ChatReportReasonCopyright) MarshalJSON

func (entity *ChatReportReasonCopyright) MarshalJSON() ([]byte, error)

type ChatReportReasonCustom

type ChatReportReasonCustom struct {
	// contains filtered or unexported fields
}

A custom reason provided by the user

func UnmarshalChatReportReasonCustom

func UnmarshalChatReportReasonCustom(data json.RawMessage) (*ChatReportReasonCustom, error)

func (*ChatReportReasonCustom) ChatReportReasonType

func (*ChatReportReasonCustom) ChatReportReasonType() string

func (*ChatReportReasonCustom) GetClass

func (*ChatReportReasonCustom) GetClass() string

func (*ChatReportReasonCustom) GetType

func (*ChatReportReasonCustom) GetType() string

func (*ChatReportReasonCustom) MarshalJSON

func (entity *ChatReportReasonCustom) MarshalJSON() ([]byte, error)

type ChatReportReasonFake added in v1.7.10

type ChatReportReasonFake struct {
	// contains filtered or unexported fields
}

The chat represents a fake account

func UnmarshalChatReportReasonFake added in v1.7.10

func UnmarshalChatReportReasonFake(data json.RawMessage) (*ChatReportReasonFake, error)

func (*ChatReportReasonFake) ChatReportReasonType added in v1.7.10

func (*ChatReportReasonFake) ChatReportReasonType() string

func (*ChatReportReasonFake) GetClass added in v1.7.10

func (*ChatReportReasonFake) GetClass() string

func (*ChatReportReasonFake) GetType added in v1.7.10

func (*ChatReportReasonFake) GetType() string

func (*ChatReportReasonFake) MarshalJSON added in v1.7.10

func (entity *ChatReportReasonFake) MarshalJSON() ([]byte, error)

type ChatReportReasonIllegalDrugs added in v1.8.3

type ChatReportReasonIllegalDrugs struct {
	// contains filtered or unexported fields
}

The chat has illegal drugs related content

func UnmarshalChatReportReasonIllegalDrugs added in v1.8.3

func UnmarshalChatReportReasonIllegalDrugs(data json.RawMessage) (*ChatReportReasonIllegalDrugs, error)

func (*ChatReportReasonIllegalDrugs) ChatReportReasonType added in v1.8.3

func (*ChatReportReasonIllegalDrugs) ChatReportReasonType() string

func (*ChatReportReasonIllegalDrugs) GetClass added in v1.8.3

func (*ChatReportReasonIllegalDrugs) GetType added in v1.8.3

func (*ChatReportReasonIllegalDrugs) MarshalJSON added in v1.8.3

func (entity *ChatReportReasonIllegalDrugs) MarshalJSON() ([]byte, error)

type ChatReportReasonPersonalDetails added in v1.8.3

type ChatReportReasonPersonalDetails struct {
	// contains filtered or unexported fields
}

The chat contains messages with personal details

func UnmarshalChatReportReasonPersonalDetails added in v1.8.3

func UnmarshalChatReportReasonPersonalDetails(data json.RawMessage) (*ChatReportReasonPersonalDetails, error)

func (*ChatReportReasonPersonalDetails) ChatReportReasonType added in v1.8.3

func (*ChatReportReasonPersonalDetails) ChatReportReasonType() string

func (*ChatReportReasonPersonalDetails) GetClass added in v1.8.3

func (*ChatReportReasonPersonalDetails) GetType added in v1.8.3

func (*ChatReportReasonPersonalDetails) MarshalJSON added in v1.8.3

func (entity *ChatReportReasonPersonalDetails) MarshalJSON() ([]byte, error)

type ChatReportReasonPornography

type ChatReportReasonPornography struct {
	// contains filtered or unexported fields
}

The chat contains pornographic messages

func UnmarshalChatReportReasonPornography

func UnmarshalChatReportReasonPornography(data json.RawMessage) (*ChatReportReasonPornography, error)

func (*ChatReportReasonPornography) ChatReportReasonType

func (*ChatReportReasonPornography) ChatReportReasonType() string

func (*ChatReportReasonPornography) GetClass

func (*ChatReportReasonPornography) GetClass() string

func (*ChatReportReasonPornography) GetType

func (*ChatReportReasonPornography) MarshalJSON

func (entity *ChatReportReasonPornography) MarshalJSON() ([]byte, error)

type ChatReportReasonSpam

type ChatReportReasonSpam struct {
	// contains filtered or unexported fields
}

The chat contains spam messages

func UnmarshalChatReportReasonSpam

func UnmarshalChatReportReasonSpam(data json.RawMessage) (*ChatReportReasonSpam, error)

func (*ChatReportReasonSpam) ChatReportReasonType

func (*ChatReportReasonSpam) ChatReportReasonType() string

func (*ChatReportReasonSpam) GetClass

func (*ChatReportReasonSpam) GetClass() string

func (*ChatReportReasonSpam) GetType

func (*ChatReportReasonSpam) GetType() string

func (*ChatReportReasonSpam) MarshalJSON

func (entity *ChatReportReasonSpam) MarshalJSON() ([]byte, error)

type ChatReportReasonUnrelatedLocation

type ChatReportReasonUnrelatedLocation struct {
	// contains filtered or unexported fields
}

The location-based chat is unrelated to its stated location

func UnmarshalChatReportReasonUnrelatedLocation

func UnmarshalChatReportReasonUnrelatedLocation(data json.RawMessage) (*ChatReportReasonUnrelatedLocation, error)

func (*ChatReportReasonUnrelatedLocation) ChatReportReasonType

func (*ChatReportReasonUnrelatedLocation) ChatReportReasonType() string

func (*ChatReportReasonUnrelatedLocation) GetClass

func (*ChatReportReasonUnrelatedLocation) GetType

func (*ChatReportReasonUnrelatedLocation) MarshalJSON

func (entity *ChatReportReasonUnrelatedLocation) MarshalJSON() ([]byte, error)

type ChatReportReasonViolence

type ChatReportReasonViolence struct {
	// contains filtered or unexported fields
}

The chat promotes violence

func UnmarshalChatReportReasonViolence

func UnmarshalChatReportReasonViolence(data json.RawMessage) (*ChatReportReasonViolence, error)

func (*ChatReportReasonViolence) ChatReportReasonType

func (*ChatReportReasonViolence) ChatReportReasonType() string

func (*ChatReportReasonViolence) GetClass

func (*ChatReportReasonViolence) GetClass() string

func (*ChatReportReasonViolence) GetType

func (*ChatReportReasonViolence) GetType() string

func (*ChatReportReasonViolence) MarshalJSON

func (entity *ChatReportReasonViolence) MarshalJSON() ([]byte, error)

type ChatSource

type ChatSource interface {
	ChatSourceType() string
}

Describes a reason why an external chat is shown in a chat list

func UnmarshalChatSource

func UnmarshalChatSource(data json.RawMessage) (ChatSource, error)

func UnmarshalListOfChatSource

func UnmarshalListOfChatSource(dataList []json.RawMessage) ([]ChatSource, error)

type ChatSourceMtprotoProxy

type ChatSourceMtprotoProxy struct {
	// contains filtered or unexported fields
}

The chat is sponsored by the user's MTProxy server

func UnmarshalChatSourceMtprotoProxy

func UnmarshalChatSourceMtprotoProxy(data json.RawMessage) (*ChatSourceMtprotoProxy, error)

func (*ChatSourceMtprotoProxy) ChatSourceType

func (*ChatSourceMtprotoProxy) ChatSourceType() string

func (*ChatSourceMtprotoProxy) GetClass

func (*ChatSourceMtprotoProxy) GetClass() string

func (*ChatSourceMtprotoProxy) GetType

func (*ChatSourceMtprotoProxy) GetType() string

func (*ChatSourceMtprotoProxy) MarshalJSON

func (entity *ChatSourceMtprotoProxy) MarshalJSON() ([]byte, error)

type ChatSourcePublicServiceAnnouncement

type ChatSourcePublicServiceAnnouncement struct {

	// The type of the announcement
	Type string `json:"type"`
	// The text of the announcement
	Text string `json:"text"`
	// contains filtered or unexported fields
}

The chat contains a public service announcement

func UnmarshalChatSourcePublicServiceAnnouncement

func UnmarshalChatSourcePublicServiceAnnouncement(data json.RawMessage) (*ChatSourcePublicServiceAnnouncement, error)

func (*ChatSourcePublicServiceAnnouncement) ChatSourceType

func (*ChatSourcePublicServiceAnnouncement) ChatSourceType() string

func (*ChatSourcePublicServiceAnnouncement) GetClass

func (*ChatSourcePublicServiceAnnouncement) GetType

func (*ChatSourcePublicServiceAnnouncement) MarshalJSON

func (entity *ChatSourcePublicServiceAnnouncement) MarshalJSON() ([]byte, error)

type ChatStatistics

type ChatStatistics interface {
	ChatStatisticsType() string
}

Contains a detailed statistics about a chat

func UnmarshalChatStatistics

func UnmarshalChatStatistics(data json.RawMessage) (ChatStatistics, error)

func UnmarshalListOfChatStatistics

func UnmarshalListOfChatStatistics(dataList []json.RawMessage) ([]ChatStatistics, error)

type ChatStatisticsAdministratorActionsInfo

type ChatStatisticsAdministratorActionsInfo struct {

	// Administrator user identifier
	UserId int64 `json:"user_id"`
	// Number of messages deleted by the administrator
	DeletedMessageCount int32 `json:"deleted_message_count"`
	// Number of users banned by the administrator
	BannedUserCount int32 `json:"banned_user_count"`
	// Number of users restricted by the administrator
	RestrictedUserCount int32 `json:"restricted_user_count"`
	// contains filtered or unexported fields
}

Contains statistics about administrator actions done by a user

func UnmarshalChatStatisticsAdministratorActionsInfo

func UnmarshalChatStatisticsAdministratorActionsInfo(data json.RawMessage) (*ChatStatisticsAdministratorActionsInfo, error)

func (*ChatStatisticsAdministratorActionsInfo) GetClass

func (*ChatStatisticsAdministratorActionsInfo) GetType

func (*ChatStatisticsAdministratorActionsInfo) MarshalJSON

func (entity *ChatStatisticsAdministratorActionsInfo) MarshalJSON() ([]byte, error)

type ChatStatisticsChannel

type ChatStatisticsChannel struct {

	// A period to which the statistics applies
	Period *DateRange `json:"period"`
	// Number of members in the chat
	MemberCount *StatisticalValue `json:"member_count"`
	// Mean number of times the recently sent messages was viewed
	MeanViewCount *StatisticalValue `json:"mean_view_count"`
	// Mean number of times the recently sent messages was shared
	MeanShareCount *StatisticalValue `json:"mean_share_count"`
	// A percentage of users with enabled notifications for the chat
	EnabledNotificationsPercentage float64 `json:"enabled_notifications_percentage"`
	// A graph containing number of members in the chat
	MemberCountGraph StatisticalGraph `json:"member_count_graph"`
	// A graph containing number of members joined and left the chat
	JoinGraph StatisticalGraph `json:"join_graph"`
	// A graph containing number of members muted and unmuted the chat
	MuteGraph StatisticalGraph `json:"mute_graph"`
	// A graph containing number of message views in a given hour in the last two weeks
	ViewCountByHourGraph StatisticalGraph `json:"view_count_by_hour_graph"`
	// A graph containing number of message views per source
	ViewCountBySourceGraph StatisticalGraph `json:"view_count_by_source_graph"`
	// A graph containing number of new member joins per source
	JoinBySourceGraph StatisticalGraph `json:"join_by_source_graph"`
	// A graph containing number of users viewed chat messages per language
	LanguageGraph StatisticalGraph `json:"language_graph"`
	// A graph containing number of chat message views and shares
	MessageInteractionGraph StatisticalGraph `json:"message_interaction_graph"`
	// A graph containing number of views of associated with the chat instant views
	InstantViewInteractionGraph StatisticalGraph `json:"instant_view_interaction_graph"`
	// Detailed statistics about number of views and shares of recently sent messages
	RecentMessageInteractions []*ChatStatisticsMessageInteractionInfo `json:"recent_message_interactions"`
	// contains filtered or unexported fields
}

A detailed statistics about a channel chat

func UnmarshalChatStatisticsChannel

func UnmarshalChatStatisticsChannel(data json.RawMessage) (*ChatStatisticsChannel, error)

func (*ChatStatisticsChannel) ChatStatisticsType

func (*ChatStatisticsChannel) ChatStatisticsType() string

func (*ChatStatisticsChannel) GetClass

func (*ChatStatisticsChannel) GetClass() string

func (*ChatStatisticsChannel) GetType

func (*ChatStatisticsChannel) GetType() string

func (*ChatStatisticsChannel) MarshalJSON

func (entity *ChatStatisticsChannel) MarshalJSON() ([]byte, error)

func (*ChatStatisticsChannel) UnmarshalJSON

func (chatStatisticsChannel *ChatStatisticsChannel) UnmarshalJSON(data []byte) error

type ChatStatisticsInviterInfo

type ChatStatisticsInviterInfo struct {

	// User identifier
	UserId int64 `json:"user_id"`
	// Number of new members invited by the user
	AddedMemberCount int32 `json:"added_member_count"`
	// contains filtered or unexported fields
}

Contains statistics about number of new members invited by a user

func UnmarshalChatStatisticsInviterInfo

func UnmarshalChatStatisticsInviterInfo(data json.RawMessage) (*ChatStatisticsInviterInfo, error)

func (*ChatStatisticsInviterInfo) GetClass

func (*ChatStatisticsInviterInfo) GetClass() string

func (*ChatStatisticsInviterInfo) GetType

func (*ChatStatisticsInviterInfo) GetType() string

func (*ChatStatisticsInviterInfo) MarshalJSON

func (entity *ChatStatisticsInviterInfo) MarshalJSON() ([]byte, error)

type ChatStatisticsMessageInteractionInfo

type ChatStatisticsMessageInteractionInfo struct {

	// Message identifier
	MessageId int64 `json:"message_id"`
	// Number of times the message was viewed
	ViewCount int32 `json:"view_count"`
	// Number of times the message was forwarded
	ForwardCount int32 `json:"forward_count"`
	// contains filtered or unexported fields
}

Contains statistics about interactions with a message

func UnmarshalChatStatisticsMessageInteractionInfo

func UnmarshalChatStatisticsMessageInteractionInfo(data json.RawMessage) (*ChatStatisticsMessageInteractionInfo, error)

func (*ChatStatisticsMessageInteractionInfo) GetClass

func (*ChatStatisticsMessageInteractionInfo) GetType

func (*ChatStatisticsMessageInteractionInfo) MarshalJSON

func (entity *ChatStatisticsMessageInteractionInfo) MarshalJSON() ([]byte, error)

type ChatStatisticsMessageSenderInfo

type ChatStatisticsMessageSenderInfo struct {

	// User identifier
	UserId int64 `json:"user_id"`
	// Number of sent messages
	SentMessageCount int32 `json:"sent_message_count"`
	// Average number of characters in sent messages; 0 if unknown
	AverageCharacterCount int32 `json:"average_character_count"`
	// contains filtered or unexported fields
}

Contains statistics about messages sent by a user

func UnmarshalChatStatisticsMessageSenderInfo

func UnmarshalChatStatisticsMessageSenderInfo(data json.RawMessage) (*ChatStatisticsMessageSenderInfo, error)

func (*ChatStatisticsMessageSenderInfo) GetClass

func (*ChatStatisticsMessageSenderInfo) GetType

func (*ChatStatisticsMessageSenderInfo) MarshalJSON

func (entity *ChatStatisticsMessageSenderInfo) MarshalJSON() ([]byte, error)

type ChatStatisticsSupergroup

type ChatStatisticsSupergroup struct {

	// A period to which the statistics applies
	Period *DateRange `json:"period"`
	// Number of members in the chat
	MemberCount *StatisticalValue `json:"member_count"`
	// Number of messages sent to the chat
	MessageCount *StatisticalValue `json:"message_count"`
	// Number of users who viewed messages in the chat
	ViewerCount *StatisticalValue `json:"viewer_count"`
	// Number of users who sent messages to the chat
	SenderCount *StatisticalValue `json:"sender_count"`
	// A graph containing number of members in the chat
	MemberCountGraph StatisticalGraph `json:"member_count_graph"`
	// A graph containing number of members joined and left the chat
	JoinGraph StatisticalGraph `json:"join_graph"`
	// A graph containing number of new member joins per source
	JoinBySourceGraph StatisticalGraph `json:"join_by_source_graph"`
	// A graph containing distribution of active users per language
	LanguageGraph StatisticalGraph `json:"language_graph"`
	// A graph containing distribution of sent messages by content type
	MessageContentGraph StatisticalGraph `json:"message_content_graph"`
	// A graph containing number of different actions in the chat
	ActionGraph StatisticalGraph `json:"action_graph"`
	// A graph containing distribution of message views per hour
	DayGraph StatisticalGraph `json:"day_graph"`
	// A graph containing distribution of message views per day of week
	WeekGraph StatisticalGraph `json:"week_graph"`
	// List of users sent most messages in the last week
	TopSenders []*ChatStatisticsMessageSenderInfo `json:"top_senders"`
	// List of most active administrators in the last week
	TopAdministrators []*ChatStatisticsAdministratorActionsInfo `json:"top_administrators"`
	// List of most active inviters of new members in the last week
	TopInviters []*ChatStatisticsInviterInfo `json:"top_inviters"`
	// contains filtered or unexported fields
}

A detailed statistics about a supergroup chat

func UnmarshalChatStatisticsSupergroup

func UnmarshalChatStatisticsSupergroup(data json.RawMessage) (*ChatStatisticsSupergroup, error)

func (*ChatStatisticsSupergroup) ChatStatisticsType

func (*ChatStatisticsSupergroup) ChatStatisticsType() string

func (*ChatStatisticsSupergroup) GetClass

func (*ChatStatisticsSupergroup) GetClass() string

func (*ChatStatisticsSupergroup) GetType

func (*ChatStatisticsSupergroup) GetType() string

func (*ChatStatisticsSupergroup) MarshalJSON

func (entity *ChatStatisticsSupergroup) MarshalJSON() ([]byte, error)

func (*ChatStatisticsSupergroup) UnmarshalJSON

func (chatStatisticsSupergroup *ChatStatisticsSupergroup) UnmarshalJSON(data []byte) error

type ChatTheme added in v1.7.10

type ChatTheme struct {

	// Theme name
	Name string `json:"name"`
	// Theme settings for a light chat theme
	LightSettings *ThemeSettings `json:"light_settings"`
	// Theme settings for a dark chat theme
	DarkSettings *ThemeSettings `json:"dark_settings"`
	// contains filtered or unexported fields
}

Describes a chat theme

func UnmarshalChatTheme added in v1.7.10

func UnmarshalChatTheme(data json.RawMessage) (*ChatTheme, error)

func (*ChatTheme) GetClass added in v1.7.10

func (*ChatTheme) GetClass() string

func (*ChatTheme) GetType added in v1.7.10

func (*ChatTheme) GetType() string

func (*ChatTheme) MarshalJSON added in v1.7.10

func (entity *ChatTheme) MarshalJSON() ([]byte, error)

type ChatType

type ChatType interface {
	ChatTypeType() string
}

Describes the type of a chat

func UnmarshalChatType

func UnmarshalChatType(data json.RawMessage) (ChatType, error)

func UnmarshalListOfChatType

func UnmarshalListOfChatType(dataList []json.RawMessage) ([]ChatType, error)

type ChatTypeBasicGroup

type ChatTypeBasicGroup struct {

	// Basic group identifier
	BasicGroupId int64 `json:"basic_group_id"`
	// contains filtered or unexported fields
}

A basic group (a chat with 0-200 other users)

func UnmarshalChatTypeBasicGroup

func UnmarshalChatTypeBasicGroup(data json.RawMessage) (*ChatTypeBasicGroup, error)

func (*ChatTypeBasicGroup) ChatTypeType

func (*ChatTypeBasicGroup) ChatTypeType() string

func (*ChatTypeBasicGroup) GetClass

func (*ChatTypeBasicGroup) GetClass() string

func (*ChatTypeBasicGroup) GetType

func (*ChatTypeBasicGroup) GetType() string

func (*ChatTypeBasicGroup) MarshalJSON

func (entity *ChatTypeBasicGroup) MarshalJSON() ([]byte, error)

type ChatTypePrivate

type ChatTypePrivate struct {

	// User identifier
	UserId int64 `json:"user_id"`
	// contains filtered or unexported fields
}

An ordinary chat with a user

func UnmarshalChatTypePrivate

func UnmarshalChatTypePrivate(data json.RawMessage) (*ChatTypePrivate, error)

func (*ChatTypePrivate) ChatTypeType

func (*ChatTypePrivate) ChatTypeType() string

func (*ChatTypePrivate) GetClass

func (*ChatTypePrivate) GetClass() string

func (*ChatTypePrivate) GetType

func (*ChatTypePrivate) GetType() string

func (*ChatTypePrivate) MarshalJSON

func (entity *ChatTypePrivate) MarshalJSON() ([]byte, error)

type ChatTypeSecret

type ChatTypeSecret struct {

	// Secret chat identifier
	SecretChatId int32 `json:"secret_chat_id"`
	// User identifier of the secret chat peer
	UserId int64 `json:"user_id"`
	// contains filtered or unexported fields
}

A secret chat with a user

func UnmarshalChatTypeSecret

func UnmarshalChatTypeSecret(data json.RawMessage) (*ChatTypeSecret, error)

func (*ChatTypeSecret) ChatTypeType

func (*ChatTypeSecret) ChatTypeType() string

func (*ChatTypeSecret) GetClass

func (*ChatTypeSecret) GetClass() string

func (*ChatTypeSecret) GetType

func (*ChatTypeSecret) GetType() string

func (*ChatTypeSecret) MarshalJSON

func (entity *ChatTypeSecret) MarshalJSON() ([]byte, error)

type ChatTypeSupergroup

type ChatTypeSupergroup struct {

	// Supergroup or channel identifier
	SupergroupId int64 `json:"supergroup_id"`
	// True, if the supergroup is a channel
	IsChannel bool `json:"is_channel"`
	// contains filtered or unexported fields
}

A supergroup or channel (with unlimited members)

func UnmarshalChatTypeSupergroup

func UnmarshalChatTypeSupergroup(data json.RawMessage) (*ChatTypeSupergroup, error)

func (*ChatTypeSupergroup) ChatTypeType

func (*ChatTypeSupergroup) ChatTypeType() string

func (*ChatTypeSupergroup) GetClass

func (*ChatTypeSupergroup) GetClass() string

func (*ChatTypeSupergroup) GetType

func (*ChatTypeSupergroup) GetType() string

func (*ChatTypeSupergroup) MarshalJSON

func (entity *ChatTypeSupergroup) MarshalJSON() ([]byte, error)

type Chats

type Chats struct {

	// Approximate total number of chats found
	TotalCount int32 `json:"total_count"`
	// List of chat identifiers
	ChatIds []int64 `json:"chat_ids"`
	// contains filtered or unexported fields
}

Represents a list of chats

func UnmarshalChats

func UnmarshalChats(data json.RawMessage) (*Chats, error)

func (*Chats) GetClass

func (*Chats) GetClass() string

func (*Chats) GetType

func (*Chats) GetType() string

func (*Chats) MarshalJSON

func (entity *Chats) MarshalJSON() ([]byte, error)

type ChatsNearby

type ChatsNearby struct {

	// List of users nearby
	UsersNearby []*ChatNearby `json:"users_nearby"`
	// List of location-based supergroups nearby
	SupergroupsNearby []*ChatNearby `json:"supergroups_nearby"`
	// contains filtered or unexported fields
}

Represents a list of chats located nearby

func UnmarshalChatsNearby

func UnmarshalChatsNearby(data json.RawMessage) (*ChatsNearby, error)

func (*ChatsNearby) GetClass

func (*ChatsNearby) GetClass() string

func (*ChatsNearby) GetType

func (*ChatsNearby) GetType() string

func (*ChatsNearby) MarshalJSON

func (entity *ChatsNearby) MarshalJSON() ([]byte, error)

type CheckAuthenticationBotTokenRequest

type CheckAuthenticationBotTokenRequest struct {
	// The bot token
	Token string `json:"token"`
}

type CheckAuthenticationCodeRequest

type CheckAuthenticationCodeRequest struct {
	// Authentication code to check
	Code string `json:"code"`
}

type CheckAuthenticationPasswordRecoveryCodeRequest added in v1.7.10

type CheckAuthenticationPasswordRecoveryCodeRequest struct {
	// Recovery code to check
	RecoveryCode string `json:"recovery_code"`
}

type CheckAuthenticationPasswordRequest

type CheckAuthenticationPasswordRequest struct {
	// The password to check
	Password string `json:"password"`
}

type CheckChangePhoneNumberCodeRequest

type CheckChangePhoneNumberCodeRequest struct {
	// Authentication code to check
	Code string `json:"code"`
}

type CheckChatInviteLinkRequest

type CheckChatInviteLinkRequest struct {
	// Invite link to be checked
	InviteLink string `json:"invite_link"`
}

type CheckChatUsernameRequest

type CheckChatUsernameRequest struct {
	// Chat identifier; must be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if the chat is being created
	ChatId int64 `json:"chat_id"`
	// Username to be checked
	Username string `json:"username"`
}

type CheckChatUsernameResult

type CheckChatUsernameResult interface {
	CheckChatUsernameResultType() string
}

Represents result of checking whether a username can be set for a chat

func UnmarshalCheckChatUsernameResult

func UnmarshalCheckChatUsernameResult(data json.RawMessage) (CheckChatUsernameResult, error)

func UnmarshalListOfCheckChatUsernameResult

func UnmarshalListOfCheckChatUsernameResult(dataList []json.RawMessage) ([]CheckChatUsernameResult, error)

type CheckChatUsernameResultOk

type CheckChatUsernameResultOk struct {
	// contains filtered or unexported fields
}

The username can be set

func UnmarshalCheckChatUsernameResultOk

func UnmarshalCheckChatUsernameResultOk(data json.RawMessage) (*CheckChatUsernameResultOk, error)

func (*CheckChatUsernameResultOk) CheckChatUsernameResultType

func (*CheckChatUsernameResultOk) CheckChatUsernameResultType() string

func (*CheckChatUsernameResultOk) GetClass

func (*CheckChatUsernameResultOk) GetClass() string

func (*CheckChatUsernameResultOk) GetType

func (*CheckChatUsernameResultOk) GetType() string

func (*CheckChatUsernameResultOk) MarshalJSON

func (entity *CheckChatUsernameResultOk) MarshalJSON() ([]byte, error)

type CheckChatUsernameResultPublicChatsTooMuch

type CheckChatUsernameResultPublicChatsTooMuch struct {
	// contains filtered or unexported fields
}

The user has too many chats with username, one of them must be made private first

func UnmarshalCheckChatUsernameResultPublicChatsTooMuch

func UnmarshalCheckChatUsernameResultPublicChatsTooMuch(data json.RawMessage) (*CheckChatUsernameResultPublicChatsTooMuch, error)

func (*CheckChatUsernameResultPublicChatsTooMuch) CheckChatUsernameResultType

func (*CheckChatUsernameResultPublicChatsTooMuch) CheckChatUsernameResultType() string

func (*CheckChatUsernameResultPublicChatsTooMuch) GetClass

func (*CheckChatUsernameResultPublicChatsTooMuch) GetType

func (*CheckChatUsernameResultPublicChatsTooMuch) MarshalJSON

func (entity *CheckChatUsernameResultPublicChatsTooMuch) MarshalJSON() ([]byte, error)

type CheckChatUsernameResultPublicGroupsUnavailable

type CheckChatUsernameResultPublicGroupsUnavailable struct {
	// contains filtered or unexported fields
}

The user can't be a member of a public supergroup

func UnmarshalCheckChatUsernameResultPublicGroupsUnavailable

func UnmarshalCheckChatUsernameResultPublicGroupsUnavailable(data json.RawMessage) (*CheckChatUsernameResultPublicGroupsUnavailable, error)

func (*CheckChatUsernameResultPublicGroupsUnavailable) CheckChatUsernameResultType

func (*CheckChatUsernameResultPublicGroupsUnavailable) CheckChatUsernameResultType() string

func (*CheckChatUsernameResultPublicGroupsUnavailable) GetClass

func (*CheckChatUsernameResultPublicGroupsUnavailable) GetType

func (*CheckChatUsernameResultPublicGroupsUnavailable) MarshalJSON

func (entity *CheckChatUsernameResultPublicGroupsUnavailable) MarshalJSON() ([]byte, error)

type CheckChatUsernameResultUsernameInvalid

type CheckChatUsernameResultUsernameInvalid struct {
	// contains filtered or unexported fields
}

The username is invalid

func UnmarshalCheckChatUsernameResultUsernameInvalid

func UnmarshalCheckChatUsernameResultUsernameInvalid(data json.RawMessage) (*CheckChatUsernameResultUsernameInvalid, error)

func (*CheckChatUsernameResultUsernameInvalid) CheckChatUsernameResultType

func (*CheckChatUsernameResultUsernameInvalid) CheckChatUsernameResultType() string

func (*CheckChatUsernameResultUsernameInvalid) GetClass

func (*CheckChatUsernameResultUsernameInvalid) GetType

func (*CheckChatUsernameResultUsernameInvalid) MarshalJSON

func (entity *CheckChatUsernameResultUsernameInvalid) MarshalJSON() ([]byte, error)

type CheckChatUsernameResultUsernameOccupied

type CheckChatUsernameResultUsernameOccupied struct {
	// contains filtered or unexported fields
}

The username is occupied

func UnmarshalCheckChatUsernameResultUsernameOccupied

func UnmarshalCheckChatUsernameResultUsernameOccupied(data json.RawMessage) (*CheckChatUsernameResultUsernameOccupied, error)

func (*CheckChatUsernameResultUsernameOccupied) CheckChatUsernameResultType

func (*CheckChatUsernameResultUsernameOccupied) CheckChatUsernameResultType() string

func (*CheckChatUsernameResultUsernameOccupied) GetClass

func (*CheckChatUsernameResultUsernameOccupied) GetType

func (*CheckChatUsernameResultUsernameOccupied) MarshalJSON

func (entity *CheckChatUsernameResultUsernameOccupied) MarshalJSON() ([]byte, error)

type CheckCreatedPublicChatsLimitRequest

type CheckCreatedPublicChatsLimitRequest struct {
	// Type of the public chats, for which to check the limit
	Type PublicChatType `json:"type"`
}

type CheckDatabaseEncryptionKeyRequest

type CheckDatabaseEncryptionKeyRequest struct {
	// Encryption key to check or set up
	EncryptionKey []byte `json:"encryption_key"`
}

type CheckEmailAddressVerificationCodeRequest

type CheckEmailAddressVerificationCodeRequest struct {
	// Verification code to check
	Code string `json:"code"`
}

type CheckPasswordRecoveryCodeRequest added in v1.7.10

type CheckPasswordRecoveryCodeRequest struct {
	// Recovery code to check
	RecoveryCode string `json:"recovery_code"`
}

type CheckPhoneNumberConfirmationCodeRequest

type CheckPhoneNumberConfirmationCodeRequest struct {
	// Confirmation code to check
	Code string `json:"code"`
}

type CheckPhoneNumberVerificationCodeRequest

type CheckPhoneNumberVerificationCodeRequest struct {
	// Verification code to check
	Code string `json:"code"`
}

type CheckRecoveryEmailAddressCodeRequest

type CheckRecoveryEmailAddressCodeRequest struct {
	// Verification code to check
	Code string `json:"code"`
}

type CheckStickerSetNameRequest added in v1.7.10

type CheckStickerSetNameRequest struct {
	// Name to be checked
	Name string `json:"name"`
}

type CheckStickerSetNameResult added in v1.7.10

type CheckStickerSetNameResult interface {
	CheckStickerSetNameResultType() string
}

Represents result of checking whether a name can be used for a new sticker set

func UnmarshalCheckStickerSetNameResult added in v1.7.10

func UnmarshalCheckStickerSetNameResult(data json.RawMessage) (CheckStickerSetNameResult, error)

func UnmarshalListOfCheckStickerSetNameResult added in v1.7.10

func UnmarshalListOfCheckStickerSetNameResult(dataList []json.RawMessage) ([]CheckStickerSetNameResult, error)

type CheckStickerSetNameResultNameInvalid added in v1.7.10

type CheckStickerSetNameResultNameInvalid struct {
	// contains filtered or unexported fields
}

The name is invalid

func UnmarshalCheckStickerSetNameResultNameInvalid added in v1.7.10

func UnmarshalCheckStickerSetNameResultNameInvalid(data json.RawMessage) (*CheckStickerSetNameResultNameInvalid, error)

func (*CheckStickerSetNameResultNameInvalid) CheckStickerSetNameResultType added in v1.7.10

func (*CheckStickerSetNameResultNameInvalid) CheckStickerSetNameResultType() string

func (*CheckStickerSetNameResultNameInvalid) GetClass added in v1.7.10

func (*CheckStickerSetNameResultNameInvalid) GetType added in v1.7.10

func (*CheckStickerSetNameResultNameInvalid) MarshalJSON added in v1.7.10

func (entity *CheckStickerSetNameResultNameInvalid) MarshalJSON() ([]byte, error)

type CheckStickerSetNameResultNameOccupied added in v1.7.10

type CheckStickerSetNameResultNameOccupied struct {
	// contains filtered or unexported fields
}

The name is occupied

func UnmarshalCheckStickerSetNameResultNameOccupied added in v1.7.10

func UnmarshalCheckStickerSetNameResultNameOccupied(data json.RawMessage) (*CheckStickerSetNameResultNameOccupied, error)

func (*CheckStickerSetNameResultNameOccupied) CheckStickerSetNameResultType added in v1.7.10

func (*CheckStickerSetNameResultNameOccupied) CheckStickerSetNameResultType() string

func (*CheckStickerSetNameResultNameOccupied) GetClass added in v1.7.10

func (*CheckStickerSetNameResultNameOccupied) GetType added in v1.7.10

func (*CheckStickerSetNameResultNameOccupied) MarshalJSON added in v1.7.10

func (entity *CheckStickerSetNameResultNameOccupied) MarshalJSON() ([]byte, error)

type CheckStickerSetNameResultOk added in v1.7.10

type CheckStickerSetNameResultOk struct {
	// contains filtered or unexported fields
}

The name can be set

func UnmarshalCheckStickerSetNameResultOk added in v1.7.10

func UnmarshalCheckStickerSetNameResultOk(data json.RawMessage) (*CheckStickerSetNameResultOk, error)

func (*CheckStickerSetNameResultOk) CheckStickerSetNameResultType added in v1.7.10

func (*CheckStickerSetNameResultOk) CheckStickerSetNameResultType() string

func (*CheckStickerSetNameResultOk) GetClass added in v1.7.10

func (*CheckStickerSetNameResultOk) GetClass() string

func (*CheckStickerSetNameResultOk) GetType added in v1.7.10

func (*CheckStickerSetNameResultOk) MarshalJSON added in v1.7.10

func (entity *CheckStickerSetNameResultOk) MarshalJSON() ([]byte, error)

type CleanFileNameRequest

type CleanFileNameRequest struct {
	// File name or path to the file
	FileName string `json:"file_name"`
}

type ClearAllDraftMessagesRequest

type ClearAllDraftMessagesRequest struct {
	// Pass true to keep local message drafts in secret chats
	ExcludeSecretChats bool `json:"exclude_secret_chats"`
}

type ClearRecentStickersRequest

type ClearRecentStickersRequest struct {
	// Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers
	IsAttached bool `json:"is_attached"`
}

type ClickAnimatedEmojiMessageRequest added in v1.7.10

type ClickAnimatedEmojiMessageRequest struct {
	// Chat identifier of the message
	ChatId int64 `json:"chat_id"`
	// Identifier of the clicked message
	MessageId int64 `json:"message_id"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(authorizationStateHandler AuthorizationStateHandler, options ...Option) (*Client, error)

func (*Client) AcceptCall

func (client *Client) AcceptCall(req *AcceptCallRequest) (*Ok, error)

Accepts an incoming call

func (*Client) AcceptTermsOfService

func (client *Client) AcceptTermsOfService(req *AcceptTermsOfServiceRequest) (*Ok, error)

Accepts Telegram terms of services

func (*Client) AddChatMember

func (client *Client) AddChatMember(req *AddChatMemberRequest) (*Ok, error)

Adds a new member to a chat. Members can't be added to private or secret chats

func (*Client) AddChatMembers

func (client *Client) AddChatMembers(req *AddChatMembersRequest) (*Ok, error)

Adds multiple new members to a chat. Currently, this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members

func (*Client) AddChatToList

func (client *Client) AddChatToList(req *AddChatToListRequest) (*Ok, error)

Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed

func (*Client) AddContact

func (client *Client) AddContact(req *AddContactRequest) (*Ok, error)

Adds a user to the contact list or edits an existing contact by their user identifier

func (*Client) AddCustomServerLanguagePack

func (client *Client) AddCustomServerLanguagePack(req *AddCustomServerLanguagePackRequest) (*Ok, error)

Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization

func (*Client) AddFavoriteSticker

func (client *Client) AddFavoriteSticker(req *AddFavoriteStickerRequest) (*Ok, error)

Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list

func (*Client) AddFileToDownloads added in v1.8.3

func (client *Client) AddFileToDownloads(req *AddFileToDownloadsRequest) (*File, error)

Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent from download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file

func (*Client) AddLocalMessage

func (client *Client) AddLocalMessage(req *AddLocalMessageRequest) (*Message, error)

Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message

func (*Client) AddLogMessage

func (client *Client) AddLogMessage(req *AddLogMessageRequest) (*Ok, error)

Adds a message to TDLib internal log. Can be called synchronously

func (*Client) AddNetworkStatistics

func (client *Client) AddNetworkStatistics(req *AddNetworkStatisticsRequest) (*Ok, error)

Adds the specified data to data usage statistics. Can be called before authorization

func (*Client) AddProxy

func (client *Client) AddProxy(req *AddProxyRequest) (*Proxy, error)

Adds a proxy server for network requests. Can be called before authorization

func (*Client) AddRecentSticker

func (client *Client) AddRecentSticker(req *AddRecentStickerRequest) (*Stickers, error)

Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list

func (*Client) AddRecentlyFoundChat

func (client *Client) AddRecentlyFoundChat(req *AddRecentlyFoundChatRequest) (*Ok, error)

Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first

func (*Client) AddSavedAnimation

func (client *Client) AddSavedAnimation(req *AddSavedAnimationRequest) (*Ok, error)

Manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type "video/mp4" can be added to the list

func (*Client) AddSavedNotificationSound added in v1.8.3

func (client *Client) AddSavedNotificationSound(req *AddSavedNotificationSoundRequest) (*NotificationSound, error)

Adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, it is position isn't changed

func (*Client) AddStickerToSet

func (client *Client) AddStickerToSet(req *AddStickerToSetRequest) (*StickerSet, error)

Adds a new sticker to a set; for bots only. Returns the sticker set

func (*Client) AnswerCallbackQuery

func (client *Client) AnswerCallbackQuery(req *AnswerCallbackQueryRequest) (*Ok, error)

Sets the result of a callback query; for bots only

func (*Client) AnswerCustomQuery

func (client *Client) AnswerCustomQuery(req *AnswerCustomQueryRequest) (*Ok, error)

Answers a custom query; for bots only

func (*Client) AnswerInlineQuery

func (client *Client) AnswerInlineQuery(req *AnswerInlineQueryRequest) (*Ok, error)

Sets the result of an inline query; for bots only

func (*Client) AnswerPreCheckoutQuery

func (client *Client) AnswerPreCheckoutQuery(req *AnswerPreCheckoutQueryRequest) (*Ok, error)

Sets the result of a pre-checkout query; for bots only

func (*Client) AnswerShippingQuery

func (client *Client) AnswerShippingQuery(req *AnswerShippingQueryRequest) (*Ok, error)

Sets the result of a shipping query; for bots only

func (*Client) AnswerWebAppQuery added in v1.8.3

func (client *Client) AnswerWebAppQuery(req *AnswerWebAppQueryRequest) (*SentWebAppMessage, error)

Sets the result of interaction with a web app and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only

func (*Client) BanChatMember added in v1.7.10

func (client *Client) BanChatMember(req *BanChatMemberRequest) (*Ok, error)

Bans a member in a chat. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first

func (*Client) BlockMessageSenderFromReplies

func (client *Client) BlockMessageSenderFromReplies(req *BlockMessageSenderFromRepliesRequest) (*Ok, error)

Blocks an original sender of a message in the Replies chat

func (*Client) CanTransferOwnership

func (client *Client) CanTransferOwnership() (CanTransferOwnershipResult, error)

Checks whether the current session can be used to transfer a chat ownership to another user

func (*Client) CancelDownloadFile

func (client *Client) CancelDownloadFile(req *CancelDownloadFileRequest) (*Ok, error)

Stops the downloading of a file. If a file has already been downloaded, does nothing

func (*Client) CancelPasswordReset added in v1.7.10

func (client *Client) CancelPasswordReset() (*Ok, error)

Cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date > 0

func (*Client) CancelUploadFile

func (client *Client) CancelUploadFile(req *CancelUploadFileRequest) (*Ok, error)

Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined

func (*Client) ChangeImportedContacts

func (client *Client) ChangeImportedContacts(req *ChangeImportedContactsRequest) (*ImportedContacts, error)

Changes imported contacts using the list of contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. Query result depends on the result of the previous query, so only one query is possible at the same time

func (*Client) ChangePhoneNumber

func (client *Client) ChangePhoneNumber(req *ChangePhoneNumberRequest) (*AuthenticationCodeInfo, error)

Changes the phone number of the user and sends an authentication code to the user's new phone number. On success, returns information about the sent code

func (*Client) ChangeStickerSet

func (client *Client) ChangeStickerSet(req *ChangeStickerSetRequest) (*Ok, error)

Installs/uninstalls or activates/archives a sticker set

func (*Client) CheckAuthenticationBotToken

func (client *Client) CheckAuthenticationBotToken(req *CheckAuthenticationBotTokenRequest) (*Ok, error)

Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in

func (*Client) CheckAuthenticationCode

func (client *Client) CheckAuthenticationCode(req *CheckAuthenticationCodeRequest) (*Ok, error)

Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode

func (*Client) CheckAuthenticationPassword

func (client *Client) CheckAuthenticationPassword(req *CheckAuthenticationPasswordRequest) (*Ok, error)

Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword

func (*Client) CheckAuthenticationPasswordRecoveryCode added in v1.7.10

func (client *Client) CheckAuthenticationPasswordRecoveryCode(req *CheckAuthenticationPasswordRecoveryCodeRequest) (*Ok, error)

Checks whether a password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword

func (*Client) CheckChangePhoneNumberCode

func (client *Client) CheckChangePhoneNumberCode(req *CheckChangePhoneNumberCodeRequest) (*Ok, error)

Checks the authentication code sent to confirm a new phone number of the user

func (client *Client) CheckChatInviteLink(req *CheckChatInviteLinkRequest) (*ChatInviteLinkInfo, error)

Checks the validity of an invite link for a chat and returns information about the corresponding chat

func (*Client) CheckChatUsername

func (client *Client) CheckChatUsername(req *CheckChatUsernameRequest) (CheckChatUsernameResult, error)

Checks whether a username can be set for a chat

func (*Client) CheckCreatedPublicChatsLimit

func (client *Client) CheckCreatedPublicChatsLimit(req *CheckCreatedPublicChatsLimitRequest) (*Ok, error)

Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached

func (*Client) CheckDatabaseEncryptionKey

func (client *Client) CheckDatabaseEncryptionKey(req *CheckDatabaseEncryptionKeyRequest) (*Ok, error)

Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey

func (*Client) CheckEmailAddressVerificationCode

func (client *Client) CheckEmailAddressVerificationCode(req *CheckEmailAddressVerificationCodeRequest) (*Ok, error)

Checks the email address verification code for Telegram Passport

func (*Client) CheckPasswordRecoveryCode added in v1.7.10

func (client *Client) CheckPasswordRecoveryCode(req *CheckPasswordRecoveryCodeRequest) (*Ok, error)

Checks whether a 2-step verification password recovery code sent to an email address is valid

func (*Client) CheckPhoneNumberConfirmationCode

func (client *Client) CheckPhoneNumberConfirmationCode(req *CheckPhoneNumberConfirmationCodeRequest) (*Ok, error)

Checks phone number confirmation code

func (*Client) CheckPhoneNumberVerificationCode

func (client *Client) CheckPhoneNumberVerificationCode(req *CheckPhoneNumberVerificationCodeRequest) (*Ok, error)

Checks the phone number verification code for Telegram Passport

func (*Client) CheckRecoveryEmailAddressCode

func (client *Client) CheckRecoveryEmailAddressCode(req *CheckRecoveryEmailAddressCodeRequest) (*PasswordState, error)

Checks the 2-step verification recovery email address verification code

func (*Client) CheckStickerSetName added in v1.7.10

func (client *Client) CheckStickerSetName(req *CheckStickerSetNameRequest) (CheckStickerSetNameResult, error)

Checks whether a name can be used for a new sticker set

func (*Client) CleanFileName

func (client *Client) CleanFileName(req *CleanFileNameRequest) (*Text, error)

Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously

func (*Client) ClearAllDraftMessages

func (client *Client) ClearAllDraftMessages(req *ClearAllDraftMessagesRequest) (*Ok, error)

Clears message drafts in all chats

func (*Client) ClearImportedContacts

func (client *Client) ClearImportedContacts() (*Ok, error)

Clears all imported contacts, contact list remains unchanged

func (*Client) ClearRecentStickers

func (client *Client) ClearRecentStickers(req *ClearRecentStickersRequest) (*Ok, error)

Clears the list of recently used stickers

func (*Client) ClearRecentlyFoundChats

func (client *Client) ClearRecentlyFoundChats() (*Ok, error)

Clears the list of recently found chats

func (*Client) ClickAnimatedEmojiMessage added in v1.7.10

func (client *Client) ClickAnimatedEmojiMessage(req *ClickAnimatedEmojiMessageRequest) (*Sticker, error)

Informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played

func (*Client) Close

func (client *Client) Close() (*Ok, error)

Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent. Can be called before initialization

func (*Client) CloseChat

func (client *Client) CloseChat(req *CloseChatRequest) (*Ok, error)

Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed

func (*Client) CloseSecretChat

func (client *Client) CloseSecretChat(req *CloseSecretChatRequest) (*Ok, error)

Closes a secret chat, effectively transferring its state to secretChatStateClosed

func (*Client) CloseWebApp added in v1.8.3

func (client *Client) CloseWebApp(req *CloseWebAppRequest) (*Ok, error)

Informs TDLib that a previously opened web app was closed

func (*Client) ConfirmQrCodeAuthentication

func (client *Client) ConfirmQrCodeAuthentication(req *ConfirmQrCodeAuthenticationRequest) (*Session, error)

Confirms QR code authentication on another device. Returns created session on success

func (*Client) CreateBasicGroupChat

func (client *Client) CreateBasicGroupChat(req *CreateBasicGroupChatRequest) (*Chat, error)

Returns an existing chat corresponding to a known basic group

func (*Client) CreateCall

func (client *Client) CreateCall(req *CreateCallRequest) (*CallId, error)

Creates a new call

func (*Client) CreateChatFilter

func (client *Client) CreateChatFilter(req *CreateChatFilterRequest) (*ChatFilterInfo, error)

Creates new chat filter. Returns information about the created chat filter

func (client *Client) CreateChatInviteLink(req *CreateChatInviteLinkRequest) (*ChatInviteLink, error)

Creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat

func (*Client) CreateNewBasicGroupChat

func (client *Client) CreateNewBasicGroupChat(req *CreateNewBasicGroupChatRequest) (*Chat, error)

Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat

func (*Client) CreateNewSecretChat

func (client *Client) CreateNewSecretChat(req *CreateNewSecretChatRequest) (*Chat, error)

Creates a new secret chat. Returns the newly created chat

func (*Client) CreateNewStickerSet

func (client *Client) CreateNewStickerSet(req *CreateNewStickerSetRequest) (*StickerSet, error)

Creates a new sticker set. Returns the newly created sticker set

func (*Client) CreateNewSupergroupChat

func (client *Client) CreateNewSupergroupChat(req *CreateNewSupergroupChatRequest) (*Chat, error)

Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat

func (*Client) CreatePrivateChat

func (client *Client) CreatePrivateChat(req *CreatePrivateChatRequest) (*Chat, error)

Returns an existing chat corresponding to a given user

func (*Client) CreateSecretChat

func (client *Client) CreateSecretChat(req *CreateSecretChatRequest) (*Chat, error)

Returns an existing chat corresponding to a known secret chat

func (*Client) CreateSupergroupChat

func (client *Client) CreateSupergroupChat(req *CreateSupergroupChatRequest) (*Chat, error)

Returns an existing chat corresponding to a known supergroup or channel

func (*Client) CreateTemporaryPassword

func (client *Client) CreateTemporaryPassword(req *CreateTemporaryPasswordRequest) (*TemporaryPasswordState, error)

Creates a new temporary password for processing payments

func (*Client) CreateVideoChat added in v1.7.10

func (client *Client) CreateVideoChat(req *CreateVideoChatRequest) (*GroupCallId, error)

Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats rights

func (*Client) DeleteAccount

func (client *Client) DeleteAccount(req *DeleteAccountRequest) (*Ok, error)

Deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword

func (*Client) DeleteAllCallMessages added in v1.7.10

func (client *Client) DeleteAllCallMessages(req *DeleteAllCallMessagesRequest) (*Ok, error)

Deletes all call messages

func (client *Client) DeleteAllRevokedChatInviteLinks(req *DeleteAllRevokedChatInviteLinksRequest) (*Ok, error)

Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links

func (*Client) DeleteChat added in v1.7.10

func (client *Client) DeleteChat(req *DeleteChatRequest) (*Ok, error)

Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the username and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat

func (*Client) DeleteChatFilter

func (client *Client) DeleteChatFilter(req *DeleteChatFilterRequest) (*Ok, error)

Deletes existing chat filter

func (*Client) DeleteChatHistory

func (client *Client) DeleteChatHistory(req *DeleteChatHistoryRequest) (*Ok, error)

Deletes all messages in the chat. Use chat.can_be_deleted_only_for_self and chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat

func (*Client) DeleteChatMessagesByDate added in v1.7.10

func (client *Client) DeleteChatMessagesByDate(req *DeleteChatMessagesByDateRequest) (*Ok, error)

Deletes all messages between the specified dates in a chat. Supported only for private chats and basic groups. Messages sent in the last 30 seconds will not be deleted

func (*Client) DeleteChatMessagesBySender added in v1.7.10

func (client *Client) DeleteChatMessagesBySender(req *DeleteChatMessagesBySenderRequest) (*Ok, error)

Deletes all messages sent by the specified message sender in a chat. Supported only for supergroups; requires can_delete_messages administrator privileges

func (*Client) DeleteChatReplyMarkup

func (client *Client) DeleteChatReplyMarkup(req *DeleteChatReplyMarkupRequest) (*Ok, error)

Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup is changed

func (*Client) DeleteCommands added in v1.7.10

func (client *Client) DeleteCommands(req *DeleteCommandsRequest) (*Ok, error)

Deletes commands supported by the bot for the given user scope and language; for bots only

func (*Client) DeleteFile

func (client *Client) DeleteFile(req *DeleteFileRequest) (*Ok, error)

Deletes a file from the TDLib file cache

func (*Client) DeleteLanguagePack

func (client *Client) DeleteLanguagePack(req *DeleteLanguagePackRequest) (*Ok, error)

Deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization

func (*Client) DeleteMessages

func (client *Client) DeleteMessages(req *DeleteMessagesRequest) (*Ok, error)

Deletes messages

func (*Client) DeletePassportElement

func (client *Client) DeletePassportElement(req *DeletePassportElementRequest) (*Ok, error)

Deletes a Telegram Passport element

func (*Client) DeleteProfilePhoto

func (client *Client) DeleteProfilePhoto(req *DeleteProfilePhotoRequest) (*Ok, error)

Deletes a profile photo

func (client *Client) DeleteRevokedChatInviteLink(req *DeleteRevokedChatInviteLinkRequest) (*Ok, error)

Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links

func (*Client) DeleteSavedCredentials

func (client *Client) DeleteSavedCredentials() (*Ok, error)

Deletes saved credentials for all payment provider bots

func (*Client) DeleteSavedOrderInfo

func (client *Client) DeleteSavedOrderInfo() (*Ok, error)

Deletes saved order information

func (*Client) Destroy

func (client *Client) Destroy() (*Ok, error)

Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization

func (*Client) DisableProxy

func (client *Client) DisableProxy() (*Ok, error)

Disables the currently enabled proxy. Can be called before authorization

func (*Client) DiscardCall

func (client *Client) DiscardCall(req *DiscardCallRequest) (*Ok, error)

Discards a call

func (*Client) DisconnectAllWebsites

func (client *Client) DisconnectAllWebsites() (*Ok, error)

Disconnects all websites from the current user's Telegram account

func (*Client) DisconnectWebsite

func (client *Client) DisconnectWebsite(req *DisconnectWebsiteRequest) (*Ok, error)

Disconnects website from the current user's Telegram account

func (*Client) DownloadFile

func (client *Client) DownloadFile(req *DownloadFileRequest) (*File, error)

Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates

func (*Client) EditChatFilter

func (client *Client) EditChatFilter(req *EditChatFilterRequest) (*ChatFilterInfo, error)

Edits existing chat filter. Returns information about the edited chat filter

func (client *Client) EditChatInviteLink(req *EditChatInviteLinkRequest) (*ChatInviteLink, error)

Edits a non-primary invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links

func (*Client) EditCustomLanguagePackInfo

func (client *Client) EditCustomLanguagePackInfo(req *EditCustomLanguagePackInfoRequest) (*Ok, error)

Edits information about a custom local language pack in the current localization target. Can be called before authorization

func (*Client) EditInlineMessageCaption

func (client *Client) EditInlineMessageCaption(req *EditInlineMessageCaptionRequest) (*Ok, error)

Edits the caption of an inline message sent via a bot; for bots only

func (*Client) EditInlineMessageLiveLocation

func (client *Client) EditInlineMessageLiveLocation(req *EditInlineMessageLiveLocationRequest) (*Ok, error)

Edits the content of a live location in an inline message sent via a bot; for bots only

func (*Client) EditInlineMessageMedia

func (client *Client) EditInlineMessageMedia(req *EditInlineMessageMediaRequest) (*Ok, error)

Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only

func (*Client) EditInlineMessageReplyMarkup

func (client *Client) EditInlineMessageReplyMarkup(req *EditInlineMessageReplyMarkupRequest) (*Ok, error)

Edits the reply markup of an inline message sent via a bot; for bots only

func (*Client) EditInlineMessageText

func (client *Client) EditInlineMessageText(req *EditInlineMessageTextRequest) (*Ok, error)

Edits the text of an inline text or game message sent via a bot; for bots only

func (*Client) EditMessageCaption

func (client *Client) EditMessageCaption(req *EditMessageCaptionRequest) (*Message, error)

Edits the message content caption. Returns the edited message after the edit is completed on the server side

func (*Client) EditMessageLiveLocation

func (client *Client) EditMessageLiveLocation(req *EditMessageLiveLocationRequest) (*Message, error)

Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side

func (*Client) EditMessageMedia

func (client *Client) EditMessageMedia(req *EditMessageMediaRequest) (*Message, error)

Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side

func (*Client) EditMessageReplyMarkup

func (client *Client) EditMessageReplyMarkup(req *EditMessageReplyMarkupRequest) (*Message, error)

Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side

func (*Client) EditMessageSchedulingState

func (client *Client) EditMessageSchedulingState(req *EditMessageSchedulingStateRequest) (*Ok, error)

Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed

func (*Client) EditMessageText

func (client *Client) EditMessageText(req *EditMessageTextRequest) (*Message, error)

Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side

func (*Client) EditProxy

func (client *Client) EditProxy(req *EditProxyRequest) (*Proxy, error)

Edits an existing proxy server for network requests. Can be called before authorization

func (*Client) EnableProxy

func (client *Client) EnableProxy(req *EnableProxyRequest) (*Ok, error)

Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization

func (*Client) EndGroupCall added in v1.8.3

func (client *Client) EndGroupCall(req *EndGroupCallRequest) (*Ok, error)

Ends a group call. Requires groupCall.can_be_managed

func (*Client) EndGroupCallRecording added in v1.7.10

func (client *Client) EndGroupCallRecording(req *EndGroupCallRecordingRequest) (*Ok, error)

Ends recording of an active group call. Requires groupCall.can_be_managed group call flag

func (*Client) EndGroupCallScreenSharing added in v1.7.10

func (client *Client) EndGroupCallScreenSharing(req *EndGroupCallScreenSharingRequest) (*Ok, error)

Ends screen sharing in a joined group call

func (*Client) FinishFileGeneration

func (client *Client) FinishFileGeneration(req *FinishFileGenerationRequest) (*Ok, error)

Finishes the file generation

func (*Client) ForwardMessages

func (client *Client) ForwardMessages(req *ForwardMessagesRequest) (*Messages, error)

Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message

func (*Client) GetAccountTtl

func (client *Client) GetAccountTtl() (*AccountTtl, error)

Returns the period of inactivity after which the account of the current user will automatically be deleted

func (*Client) GetActiveLiveLocationMessages

func (client *Client) GetActiveLiveLocationMessages() (*Messages, error)

Returns all active live locations that need to be updated by the application. The list is persistent across application restarts only if the message database is used

func (*Client) GetActiveSessions

func (client *Client) GetActiveSessions() (*Sessions, error)

Returns all active sessions of the current user

func (*Client) GetAllPassportElements

func (client *Client) GetAllPassportElements(req *GetAllPassportElementsRequest) (*PassportElements, error)

Returns all available Telegram Passport elements

func (*Client) GetAnimatedEmoji added in v1.7.10

func (client *Client) GetAnimatedEmoji(req *GetAnimatedEmojiRequest) (*AnimatedEmoji, error)

Returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji

func (*Client) GetApplicationConfig

func (client *Client) GetApplicationConfig() (JsonValue, error)

Returns application config, provided by the server. Can be called before authorization

func (client *Client) GetApplicationDownloadLink() (*HttpUrl, error)

Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram

func (*Client) GetArchivedStickerSets

func (client *Client) GetArchivedStickerSets(req *GetArchivedStickerSetsRequest) (*StickerSets, error)

Returns a list of archived sticker sets

func (*Client) GetAttachedStickerSets

func (client *Client) GetAttachedStickerSets(req *GetAttachedStickerSetsRequest) (*StickerSets, error)

Returns a list of sticker sets attached to a file. Currently, only photos and videos can have attached sticker sets

func (*Client) GetAttachmentMenuBot added in v1.8.3

func (client *Client) GetAttachmentMenuBot(req *GetAttachmentMenuBotRequest) (*AttachmentMenuBot, error)

Returns information about a bot that can be added to attachment menu

func (*Client) GetAuthorizationState

func (client *Client) GetAuthorizationState() (AuthorizationState, error)

Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state. Can be called before initialization

func (*Client) GetAutoDownloadSettingsPresets

func (client *Client) GetAutoDownloadSettingsPresets() (*AutoDownloadSettingsPresets, error)

Returns auto-download settings presets for the current user

func (*Client) GetBackgroundUrl

func (client *Client) GetBackgroundUrl(req *GetBackgroundUrlRequest) (*HttpUrl, error)

Constructs a persistent HTTP URL for a background

func (*Client) GetBackgrounds

func (client *Client) GetBackgrounds(req *GetBackgroundsRequest) (*Backgrounds, error)

Returns backgrounds installed by the user

func (*Client) GetBankCardInfo

func (client *Client) GetBankCardInfo(req *GetBankCardInfoRequest) (*BankCardInfo, error)

Returns information about a bank card

func (*Client) GetBasicGroup

func (client *Client) GetBasicGroup(req *GetBasicGroupRequest) (*BasicGroup, error)

Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot

func (*Client) GetBasicGroupFullInfo

func (client *Client) GetBasicGroupFullInfo(req *GetBasicGroupFullInfoRequest) (*BasicGroupFullInfo, error)

Returns full information about a basic group by its identifier

func (*Client) GetBlockedMessageSenders

func (client *Client) GetBlockedMessageSenders(req *GetBlockedMessageSendersRequest) (*MessageSenders, error)

Returns users and chats that were blocked by the current user

func (*Client) GetCallbackQueryAnswer

func (client *Client) GetCallbackQueryAnswer(req *GetCallbackQueryAnswerRequest) (*CallbackQueryAnswer, error)

Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires

func (*Client) GetCallbackQueryMessage

func (client *Client) GetCallbackQueryMessage(req *GetCallbackQueryMessageRequest) (*Message, error)

Returns information about a message with the callback button that originated a callback query; for bots only

func (*Client) GetChat

func (client *Client) GetChat(req *GetChatRequest) (*Chat, error)

Returns information about a chat by its identifier, this is an offline request if the current user is not a bot

func (*Client) GetChatAdministrators

func (client *Client) GetChatAdministrators(req *GetChatAdministratorsRequest) (*ChatAdministrators, error)

Returns a list of administrators of the chat with their custom titles

func (*Client) GetChatAvailableMessageSenders added in v1.7.10

func (client *Client) GetChatAvailableMessageSenders(req *GetChatAvailableMessageSendersRequest) (*MessageSenders, error)

Returns list of message sender identifiers, which can be used to send messages in a chat

func (*Client) GetChatEventLog

func (client *Client) GetChatEventLog(req *GetChatEventLogRequest) (*ChatEvents, error)

Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing event_id)

func (*Client) GetChatFilter

func (client *Client) GetChatFilter(req *GetChatFilterRequest) (*ChatFilter, error)

Returns information about a chat filter by its identifier

func (*Client) GetChatFilterDefaultIconName

func (client *Client) GetChatFilterDefaultIconName(req *GetChatFilterDefaultIconNameRequest) (*Text, error)

Returns default icon name for a filter. Can be called synchronously

func (*Client) GetChatHistory

func (client *Client) GetChatHistory(req *GetChatHistoryRequest) (*Messages, error)

Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib. This is an offline request if only_local is true

func (client *Client) GetChatInviteLink(req *GetChatInviteLinkRequest) (*ChatInviteLink, error)

Returns information about an invite link. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links

func (*Client) GetChatInviteLinkCounts added in v1.7.10

func (client *Client) GetChatInviteLinkCounts(req *GetChatInviteLinkCountsRequest) (*ChatInviteLinkCounts, error)

Returns list of chat administrators with number of their invite links. Requires owner privileges in the chat

func (*Client) GetChatInviteLinkMembers added in v1.7.10

func (client *Client) GetChatInviteLinkMembers(req *GetChatInviteLinkMembersRequest) (*ChatInviteLinkMembers, error)

Returns chat members joined a chat via an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links

func (client *Client) GetChatInviteLinks(req *GetChatInviteLinksRequest) (*ChatInviteLinks, error)

Returns invite links for a chat created by specified administrator. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links

func (*Client) GetChatJoinRequests added in v1.7.10

func (client *Client) GetChatJoinRequests(req *GetChatJoinRequestsRequest) (*ChatJoinRequests, error)

Returns pending join requests in a chat

func (*Client) GetChatListsToAddChat

func (client *Client) GetChatListsToAddChat(req *GetChatListsToAddChatRequest) (*ChatLists, error)

Returns chat lists to which the chat can be added. This is an offline request

func (*Client) GetChatMember

func (client *Client) GetChatMember(req *GetChatMemberRequest) (*ChatMember, error)

Returns information about a single member of a chat

func (*Client) GetChatMessageByDate

func (client *Client) GetChatMessageByDate(req *GetChatMessageByDateRequest) (*Message, error)

Returns the last message sent in a chat no later than the specified date

func (*Client) GetChatMessageCalendar added in v1.7.10

func (client *Client) GetChatMessageCalendar(req *GetChatMessageCalendarRequest) (*MessageCalendar, error)

Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option "utc_time_offset"

func (*Client) GetChatMessageCount

func (client *Client) GetChatMessageCount(req *GetChatMessageCountRequest) (*Count, error)

Returns approximate number of messages of the specified type in the chat

func (*Client) GetChatNotificationSettingsExceptions

func (client *Client) GetChatNotificationSettingsExceptions(req *GetChatNotificationSettingsExceptionsRequest) (*Chats, error)

Returns list of chats with non-default notification settings

func (*Client) GetChatPinnedMessage

func (client *Client) GetChatPinnedMessage(req *GetChatPinnedMessageRequest) (*Message, error)

Returns information about a newest pinned message in the chat

func (*Client) GetChatScheduledMessages

func (client *Client) GetChatScheduledMessages(req *GetChatScheduledMessagesRequest) (*Messages, error)

Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id)

func (*Client) GetChatSparseMessagePositions added in v1.7.10

func (client *Client) GetChatSparseMessagePositions(req *GetChatSparseMessagePositionsRequest) (*MessagePositions, error)

Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing message_id). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database

func (*Client) GetChatSponsoredMessage added in v1.8.3

func (client *Client) GetChatSponsoredMessage(req *GetChatSponsoredMessageRequest) (*SponsoredMessage, error)

Returns sponsored message to be shown in a chat; for channel chats only. Returns a 404 error if there is no sponsored message in the chat

func (*Client) GetChatStatistics

func (client *Client) GetChatStatistics(req *GetChatStatisticsRequest) (ChatStatistics, error)

Returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true

func (*Client) GetChats

func (client *Client) GetChats(req *GetChatsRequest) (*Chats, error)

Returns an ordered list of chats from the beginning of a chat list. For informational purposes only. Use loadChats and updates processing instead to maintain chat lists in a consistent state

func (*Client) GetCommands added in v1.7.10

func (client *Client) GetCommands(req *GetCommandsRequest) (*BotCommands, error)

Returns the list of commands supported by the bot for the given user scope and language; for bots only

func (*Client) GetConnectedWebsites

func (client *Client) GetConnectedWebsites() (*ConnectedWebsites, error)

Returns all website where the current user used Telegram to log in

func (*Client) GetContacts

func (client *Client) GetContacts() (*Users, error)

Returns all user contacts

func (*Client) GetCountries

func (client *Client) GetCountries() (*Countries, error)

Returns information about existing countries. Can be called before authorization

func (*Client) GetCountryCode

func (client *Client) GetCountryCode() (*Text, error)

Uses the current IP address to find the current country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization

func (*Client) GetCreatedPublicChats

func (client *Client) GetCreatedPublicChats(req *GetCreatedPublicChatsRequest) (*Chats, error)

Returns a list of public chats of the specified type, owned by the user

func (*Client) GetCurrentState

func (client *Client) GetCurrentState() (*Updates, error)

Returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationState/UpdateUser/UpdateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization

func (*Client) GetDatabaseStatistics

func (client *Client) GetDatabaseStatistics() (*DatabaseStatistics, error)

Returns database statistics

func (*Client) GetDeepLinkInfo

func (client *Client) GetDeepLinkInfo(req *GetDeepLinkInfoRequest) (*DeepLinkInfo, error)

Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization

func (*Client) GetEmojiSuggestionsUrl

func (client *Client) GetEmojiSuggestionsUrl(req *GetEmojiSuggestionsUrlRequest) (*HttpUrl, error)

Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation

func (client *Client) GetExternalLink(req *GetExternalLinkRequest) (*HttpUrl, error)

Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed

func (*Client) GetExternalLinkInfo added in v1.7.10

func (client *Client) GetExternalLinkInfo(req *GetExternalLinkInfoRequest) (LoginUrlInfo, error)

Returns information about an action to be done when the current user clicks an external link. Don't use this method for links from secret chats if web page preview is disabled in secret chats

func (*Client) GetFavoriteStickers

func (client *Client) GetFavoriteStickers() (*Stickers, error)

Returns favorite stickers

func (*Client) GetFile

func (client *Client) GetFile(req *GetFileRequest) (*File, error)

Returns information about a file; this is an offline request

func (*Client) GetFileDownloadedPrefixSize

func (client *Client) GetFileDownloadedPrefixSize(req *GetFileDownloadedPrefixSizeRequest) (*Count, error)

Returns file downloaded prefix size from a given offset, in bytes

func (*Client) GetFileExtension

func (client *Client) GetFileExtension(req *GetFileExtensionRequest) (*Text, error)

Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously

func (*Client) GetFileMimeType

func (client *Client) GetFileMimeType(req *GetFileMimeTypeRequest) (*Text, error)

Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously

func (*Client) GetGameHighScores

func (client *Client) GetGameHighScores(req *GetGameHighScoresRequest) (*GameHighScores, error)

Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only

func (*Client) GetGroupCall added in v1.7.10

func (client *Client) GetGroupCall(req *GetGroupCallRequest) (*GroupCall, error)

Returns information about a group call

func (client *Client) GetGroupCallInviteLink(req *GetGroupCallInviteLinkRequest) (*HttpUrl, error)

Returns invite link to a video chat in a public chat

func (*Client) GetGroupCallStreamSegment added in v1.7.10

func (client *Client) GetGroupCallStreamSegment(req *GetGroupCallStreamSegmentRequest) (*FilePart, error)

Returns a file with a segment of a group call stream in a modified OGG format for audio or MPEG-4 format for video

func (*Client) GetGroupCallStreams added in v1.8.3

func (client *Client) GetGroupCallStreams(req *GetGroupCallStreamsRequest) (*GroupCallStreams, error)

Returns information about available group call streams

func (*Client) GetGroupsInCommon

func (client *Client) GetGroupsInCommon(req *GetGroupsInCommonRequest) (*Chats, error)

Returns a list of common group chats with a given user. Chats are sorted by their type and creation date

func (*Client) GetImportedContactCount

func (client *Client) GetImportedContactCount() (*Count, error)

Returns the total number of imported contacts

func (*Client) GetInactiveSupergroupChats

func (client *Client) GetInactiveSupergroupChats() (*Chats, error)

Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error

func (*Client) GetInlineGameHighScores

func (client *Client) GetInlineGameHighScores(req *GetInlineGameHighScoresRequest) (*GameHighScores, error)

Returns game high scores and some part of the high score table in the range of the specified user; for bots only

func (*Client) GetInlineQueryResults

func (client *Client) GetInlineQueryResults(req *GetInlineQueryResultsRequest) (*InlineQueryResults, error)

Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires

func (*Client) GetInstalledStickerSets

func (client *Client) GetInstalledStickerSets(req *GetInstalledStickerSetsRequest) (*StickerSets, error)

Returns a list of installed sticker sets

func (*Client) GetInternalLinkType added in v1.7.10

func (client *Client) GetInternalLinkType(req *GetInternalLinkTypeRequest) (InternalLinkType, error)

Returns information about the type of an internal link. Returns a 404 error if the link is not internal. Can be called before authorization

func (*Client) GetJsonString

func (client *Client) GetJsonString(req *GetJsonStringRequest) (*Text, error)

Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously

func (*Client) GetJsonValue

func (client *Client) GetJsonValue(req *GetJsonValueRequest) (JsonValue, error)

Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously

func (*Client) GetLanguagePackInfo

func (client *Client) GetLanguagePackInfo(req *GetLanguagePackInfoRequest) (*LanguagePackInfo, error)

Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization

func (*Client) GetLanguagePackString

func (client *Client) GetLanguagePackString(req *GetLanguagePackStringRequest) (LanguagePackStringValue, error)

Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously

func (*Client) GetLanguagePackStrings

func (client *Client) GetLanguagePackStrings(req *GetLanguagePackStringsRequest) (*LanguagePackStrings, error)

Returns strings from a language pack in the current localization target by their keys. Can be called before authorization

func (*Client) GetListener

func (client *Client) GetListener() *Listener

func (*Client) GetLocalizationTargetInfo

func (client *Client) GetLocalizationTargetInfo(req *GetLocalizationTargetInfoRequest) (*LocalizationTargetInfo, error)

Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization

func (*Client) GetLogStream

func (client *Client) GetLogStream() (LogStream, error)

Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously

func (*Client) GetLogTagVerbosityLevel

func (client *Client) GetLogTagVerbosityLevel(req *GetLogTagVerbosityLevelRequest) (*LogVerbosityLevel, error)

Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously

func (*Client) GetLogTags

func (client *Client) GetLogTags() (*LogTags, error)

Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously

func (*Client) GetLogVerbosityLevel

func (client *Client) GetLogVerbosityLevel() (*LogVerbosityLevel, error)

Returns current verbosity level of the internal logging of TDLib. Can be called synchronously

func (*Client) GetLoginUrl

func (client *Client) GetLoginUrl(req *GetLoginUrlRequest) (*HttpUrl, error)

Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button

func (*Client) GetLoginUrlInfo

func (client *Client) GetLoginUrlInfo(req *GetLoginUrlInfoRequest) (LoginUrlInfo, error)

Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button

func (*Client) GetMapThumbnailFile

func (client *Client) GetMapThumbnailFile(req *GetMapThumbnailFileRequest) (*File, error)

Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded

func (*Client) GetMarkdownText

func (client *Client) GetMarkdownText(req *GetMarkdownTextRequest) (*FormattedText, error)

Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously

func (*Client) GetMe

func (client *Client) GetMe() (*User, error)

Returns the current user

func (*Client) GetMenuButton added in v1.8.3

func (client *Client) GetMenuButton(req *GetMenuButtonRequest) (*BotMenuButton, error)

Returns menu button set by the bot for the given user; for bots only

func (*Client) GetMessage

func (client *Client) GetMessage(req *GetMessageRequest) (*Message, error)

Returns information about a message

func (*Client) GetMessageAddedReactions added in v1.8.3

func (client *Client) GetMessageAddedReactions(req *GetMessageAddedReactionsRequest) (*AddedReactions, error)

Returns reactions added for a message, along with their sender

func (*Client) GetMessageAvailableReactions added in v1.8.3

func (client *Client) GetMessageAvailableReactions(req *GetMessageAvailableReactionsRequest) (*AvailableReactions, error)

Returns reactions, which can be added to a message. The list can change after updateReactions, updateChatAvailableReactions for the chat, or updateMessageInteractionInfo for the message

func (*Client) GetMessageEmbeddingCode

func (client *Client) GetMessageEmbeddingCode(req *GetMessageEmbeddingCodeRequest) (*Text, error)

Returns an HTML code for embedding the message. Available only for messages in supergroups and channels with a username

func (*Client) GetMessageFileType added in v1.7.10

func (client *Client) GetMessageFileType(req *GetMessageFileTypeRequest) (MessageFileType, error)

Returns information about a file with messages exported from another app

func (*Client) GetMessageImportConfirmationText added in v1.7.10

func (client *Client) GetMessageImportConfirmationText(req *GetMessageImportConfirmationTextRequest) (*Text, error)

Returns a confirmation text to be shown to the user before starting message import

func (client *Client) GetMessageLink(req *GetMessageLinkRequest) (*MessageLink, error)

Returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels, or if message.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline request

func (*Client) GetMessageLinkInfo

func (client *Client) GetMessageLinkInfo(req *GetMessageLinkInfoRequest) (*MessageLinkInfo, error)

Returns information about a public or private message link. Can be called for any internal link of the type internalLinkTypeMessage

func (*Client) GetMessageLocally

func (client *Client) GetMessageLocally(req *GetMessageLocallyRequest) (*Message, error)

Returns information about a message, if it is available without sending network request. This is an offline request

func (*Client) GetMessagePublicForwards

func (client *Client) GetMessagePublicForwards(req *GetMessagePublicForwardsRequest) (*FoundMessages, error)

Returns forwarded copies of a channel message to different public channels. For optimal performance, the number of returned messages is chosen by TDLib

func (*Client) GetMessageStatistics

func (client *Client) GetMessageStatistics(req *GetMessageStatisticsRequest) (*MessageStatistics, error)

Returns detailed statistics about a message. Can be used only if message.can_get_statistics == true

func (*Client) GetMessageThread

func (client *Client) GetMessageThread(req *GetMessageThreadRequest) (*MessageThreadInfo, error)

Returns information about a message thread. Can be used only if message.can_get_message_thread == true

func (*Client) GetMessageThreadHistory

func (client *Client) GetMessageThreadHistory(req *GetMessageThreadHistoryRequest) (*Messages, error)

Returns messages in a message thread of a message. Can be used only if message.can_get_message_thread == true. Message thread of a channel message is in the channel's linked supergroup. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib

func (*Client) GetMessageViewers added in v1.7.10

func (client *Client) GetMessageViewers(req *GetMessageViewersRequest) (*Users, error)

Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if message.can_get_viewers == true

func (*Client) GetMessages

func (client *Client) GetMessages(req *GetMessagesRequest) (*Messages, error)

Returns information about messages. If a message is not found, returns null on the corresponding position of the result

func (*Client) GetNetworkStatistics

func (client *Client) GetNetworkStatistics(req *GetNetworkStatisticsRequest) (*NetworkStatistics, error)

Returns network data usage statistics. Can be called before authorization

func (*Client) GetOption

func (client *Client) GetOption(req *GetOptionRequest) (OptionValue, error)

Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization

func (*Client) GetPassportAuthorizationForm

func (client *Client) GetPassportAuthorizationForm(req *GetPassportAuthorizationFormRequest) (*PassportAuthorizationForm, error)

Returns a Telegram Passport authorization form for sharing data with a service

func (*Client) GetPassportAuthorizationFormAvailableElements

func (client *Client) GetPassportAuthorizationFormAvailableElements(req *GetPassportAuthorizationFormAvailableElementsRequest) (*PassportElementsWithErrors, error)

Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form

func (*Client) GetPassportElement

func (client *Client) GetPassportElement(req *GetPassportElementRequest) (PassportElement, error)

Returns one of the available Telegram Passport elements

func (*Client) GetPasswordState

func (client *Client) GetPasswordState() (*PasswordState, error)

Returns the current state of 2-step verification

func (*Client) GetPaymentForm

func (client *Client) GetPaymentForm(req *GetPaymentFormRequest) (*PaymentForm, error)

Returns an invoice payment form. This method must be called when the user presses inlineKeyboardButtonBuy

func (*Client) GetPaymentReceipt

func (client *Client) GetPaymentReceipt(req *GetPaymentReceiptRequest) (*PaymentReceipt, error)

Returns information about a successful payment

func (*Client) GetPhoneNumberInfo

func (client *Client) GetPhoneNumberInfo(req *GetPhoneNumberInfoRequest) (*PhoneNumberInfo, error)

Returns information about a phone number by its prefix. Can be called before authorization

func (*Client) GetPhoneNumberInfoSync added in v1.7.10

func (client *Client) GetPhoneNumberInfoSync(req *GetPhoneNumberInfoSyncRequest) (*PhoneNumberInfo, error)

Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously

func (*Client) GetPollVoters

func (client *Client) GetPollVoters(req *GetPollVotersRequest) (*Users, error)

Returns users voted for the specified option in a non-anonymous polls. For optimal performance, the number of returned users is chosen by TDLib

func (*Client) GetPreferredCountryLanguage

func (client *Client) GetPreferredCountryLanguage(req *GetPreferredCountryLanguageRequest) (*Text, error)

Returns an IETF language tag of the language preferred in the country, which must be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown

func (*Client) GetProxies

func (client *Client) GetProxies() (*Proxies, error)

Returns list of proxies that are currently set up. Can be called before authorization

func (client *Client) GetProxyLink(req *GetProxyLinkRequest) (*HttpUrl, error)

Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization

func (*Client) GetPushReceiverId

func (client *Client) GetPushReceiverId(req *GetPushReceiverIdRequest) (*PushReceiverId, error)

Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously

func (*Client) GetRecentInlineBots

func (client *Client) GetRecentInlineBots() (*Users, error)

Returns up to 20 recently used inline bots in the order of their last usage

func (*Client) GetRecentStickers

func (client *Client) GetRecentStickers(req *GetRecentStickersRequest) (*Stickers, error)

Returns a list of recently used stickers

func (*Client) GetRecentlyOpenedChats added in v1.7.10

func (client *Client) GetRecentlyOpenedChats(req *GetRecentlyOpenedChatsRequest) (*Chats, error)

Returns recently opened chats, this is an offline request. Returns chats in the order of last opening

func (*Client) GetRecentlyVisitedTMeUrls

func (client *Client) GetRecentlyVisitedTMeUrls(req *GetRecentlyVisitedTMeUrlsRequest) (*TMeUrls, error)

Returns t.me URLs recently visited by a newly registered user

func (*Client) GetRecommendedChatFilters

func (client *Client) GetRecommendedChatFilters() (*RecommendedChatFilters, error)

Returns recommended chat filters for the current user

func (*Client) GetRecoveryEmailAddress

func (client *Client) GetRecoveryEmailAddress(req *GetRecoveryEmailAddressRequest) (*RecoveryEmailAddress, error)

Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user

func (*Client) GetRemoteFile

func (client *Client) GetRemoteFile(req *GetRemoteFileRequest) (*File, error)

Returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application

func (*Client) GetRepliedMessage

func (client *Client) GetRepliedMessage(req *GetRepliedMessageRequest) (*Message, error)

Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, and the invoice message for messages of the types messagePinMessage, messageGameScore, and messagePaymentSuccessful respectively

func (*Client) GetSavedAnimations

func (client *Client) GetSavedAnimations() (*Animations, error)

Returns saved animations

func (*Client) GetSavedNotificationSound added in v1.8.3

func (client *Client) GetSavedNotificationSound(req *GetSavedNotificationSoundRequest) (*NotificationSounds, error)

Returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier

func (*Client) GetSavedNotificationSounds added in v1.8.3

func (client *Client) GetSavedNotificationSounds() (*NotificationSounds, error)

Returns list of saved notification sounds. If a sound isn't in the list, then default sound needs to be used

func (*Client) GetSavedOrderInfo

func (client *Client) GetSavedOrderInfo() (*OrderInfo, error)

Returns saved order information. Returns a 404 error if there is no saved order information

func (*Client) GetScopeNotificationSettings

func (client *Client) GetScopeNotificationSettings(req *GetScopeNotificationSettingsRequest) (*ScopeNotificationSettings, error)

Returns the notification settings for chats of a given type

func (*Client) GetSecretChat

func (client *Client) GetSecretChat(req *GetSecretChatRequest) (*SecretChat, error)

Returns information about a secret chat by its identifier. This is an offline request

func (*Client) GetStatisticalGraph

func (client *Client) GetStatisticalGraph(req *GetStatisticalGraphRequest) (StatisticalGraph, error)

Loads an asynchronous or a zoomed in statistical graph

func (*Client) GetStickerEmojis

func (client *Client) GetStickerEmojis(req *GetStickerEmojisRequest) (*Emojis, error)

Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object

func (*Client) GetStickerSet

func (client *Client) GetStickerSet(req *GetStickerSetRequest) (*StickerSet, error)

Returns information about a sticker set by its identifier

func (*Client) GetStickers

func (client *Client) GetStickers(req *GetStickersRequest) (*Stickers, error)

Returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is non-empty, favorite and recently used stickers may also be returned

func (*Client) GetStorageStatistics

func (client *Client) GetStorageStatistics(req *GetStorageStatisticsRequest) (*StorageStatistics, error)

Returns storage usage statistics. Can be called before authorization

func (*Client) GetStorageStatisticsFast

func (client *Client) GetStorageStatisticsFast() (*StorageStatisticsFast, error)

Quickly returns approximate storage usage statistics. Can be called before authorization

func (*Client) GetSuggestedFileName added in v1.7.10

func (client *Client) GetSuggestedFileName(req *GetSuggestedFileNameRequest) (*Text, error)

Returns suggested name for saving a file in a given directory

func (*Client) GetSuggestedStickerSetName added in v1.7.10

func (client *Client) GetSuggestedStickerSetName(req *GetSuggestedStickerSetNameRequest) (*Text, error)

Returns a suggested name for a new sticker set with a given title

func (*Client) GetSuitableDiscussionChats

func (client *Client) GetSuitableDiscussionChats() (*Chats, error)

Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first

func (*Client) GetSupergroup

func (client *Client) GetSupergroup(req *GetSupergroupRequest) (*Supergroup, error)

Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot

func (*Client) GetSupergroupFullInfo

func (client *Client) GetSupergroupFullInfo(req *GetSupergroupFullInfoRequest) (*SupergroupFullInfo, error)

Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute

func (*Client) GetSupergroupMembers

func (client *Client) GetSupergroupMembers(req *GetSupergroupMembersRequest) (*ChatMembers, error)

Returns information about members or banned users in a supergroup or channel. Can be used only if supergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters

func (*Client) GetSupportUser

func (client *Client) GetSupportUser() (*User, error)

Returns a user that can be contacted to get support

func (*Client) GetTemporaryPasswordState

func (client *Client) GetTemporaryPasswordState() (*TemporaryPasswordState, error)

Returns information about the current temporary password

func (*Client) GetTextEntities

func (client *Client) GetTextEntities(req *GetTextEntitiesRequest) (*TextEntities, error)

Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. Can be called synchronously

func (*Client) GetThemeParametersJsonString added in v1.8.3

func (client *Client) GetThemeParametersJsonString(req *GetThemeParametersJsonStringRequest) (*Text, error)

Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously

func (*Client) GetTopChats

func (client *Client) GetTopChats(req *GetTopChatsRequest) (*Chats, error)

Returns a list of frequently used chats. Supported only if the chat info database is enabled

func (*Client) GetTrendingStickerSets

func (client *Client) GetTrendingStickerSets(req *GetTrendingStickerSetsRequest) (*StickerSets, error)

Returns a list of trending sticker sets. For optimal performance, the number of returned sticker sets is chosen by TDLib

func (*Client) GetUser

func (client *Client) GetUser(req *GetUserRequest) (*User, error)

Returns information about a user by their identifier. This is an offline request if the current user is not a bot

func (*Client) GetUserFullInfo

func (client *Client) GetUserFullInfo(req *GetUserFullInfoRequest) (*UserFullInfo, error)

Returns full information about a user by their identifier

func (*Client) GetUserPrivacySettingRules

func (client *Client) GetUserPrivacySettingRules(req *GetUserPrivacySettingRulesRequest) (*UserPrivacySettingRules, error)

Returns the current privacy settings

func (*Client) GetUserProfilePhotos

func (client *Client) GetUserProfilePhotos(req *GetUserProfilePhotosRequest) (*ChatPhotos, error)

Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already

func (*Client) GetVideoChatAvailableParticipants added in v1.7.10

func (client *Client) GetVideoChatAvailableParticipants(req *GetVideoChatAvailableParticipantsRequest) (*MessageSenders, error)

Returns list of participant identifiers, on whose behalf a video chat in the chat can be joined

func (*Client) GetVideoChatRtmpUrl added in v1.8.3

func (client *Client) GetVideoChatRtmpUrl(req *GetVideoChatRtmpUrlRequest) (*RtmpUrl, error)

Returns RTMP URL for streaming to the chat; requires creator privileges

func (*Client) GetWebAppUrl added in v1.8.3

func (client *Client) GetWebAppUrl(req *GetWebAppUrlRequest) (*HttpUrl, error)

Returns an HTTPS URL of a web app to open after keyboardButtonTypeWebApp button is pressed

func (*Client) GetWebPageInstantView

func (client *Client) GetWebPageInstantView(req *GetWebPageInstantViewRequest) (*WebPageInstantView, error)

Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page

func (*Client) GetWebPagePreview

func (client *Client) GetWebPagePreview(req *GetWebPagePreviewRequest) (*WebPage, error)

Returns a web page preview by the text of the message. Do not call this function too often. Returns a 404 error if the web page has no preview

func (*Client) HideSuggestedAction

func (client *Client) HideSuggestedAction(req *HideSuggestedActionRequest) (*Ok, error)

Hides a suggested action

func (*Client) ImportContacts

func (client *Client) ImportContacts(req *ImportContactsRequest) (*ImportedContacts, error)

Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored

func (*Client) ImportMessages added in v1.7.10

func (client *Client) ImportMessages(req *ImportMessagesRequest) (*Ok, error)

Imports messages exported from another app

func (*Client) InviteGroupCallParticipants added in v1.7.10

func (client *Client) InviteGroupCallParticipants(req *InviteGroupCallParticipantsRequest) (*Ok, error)

Invites users to an active group call. Sends a service message of type messageInviteToGroupCall for video chats

func (*Client) JoinChat

func (client *Client) JoinChat(req *JoinChatRequest) (*Ok, error)

Adds the current user as a new member to a chat. Private and secret chats can't be joined using this method

func (client *Client) JoinChatByInviteLink(req *JoinChatByInviteLinkRequest) (*Chat, error)

Uses an invite link to add the current user to the chat if possible

func (*Client) JoinGroupCall added in v1.7.10

func (client *Client) JoinGroupCall(req *JoinGroupCallRequest) (*Text, error)

Joins an active group call. Returns join response payload for tgcalls

func (*Client) LeaveChat

func (client *Client) LeaveChat(req *LeaveChatRequest) (*Ok, error)

Removes the current user from chat members. Private and secret chats can't be left using this method

func (*Client) LeaveGroupCall added in v1.7.10

func (client *Client) LeaveGroupCall(req *LeaveGroupCallRequest) (*Ok, error)

Leaves a group call

func (*Client) LoadChats added in v1.7.10

func (client *Client) LoadChats(req *LoadChatsRequest) (*Ok, error)

Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded

func (*Client) LoadGroupCallParticipants added in v1.7.10

func (client *Client) LoadGroupCallParticipants(req *LoadGroupCallParticipantsRequest) (*Ok, error)

Loads more participants of a group call. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants have already been loaded

func (*Client) LogOut

func (client *Client) LogOut() (*Ok, error)

Closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent

func (*Client) OpenChat

func (client *Client) OpenChat(req *OpenChatRequest) (*Ok, error)

Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats)

func (*Client) OpenMessageContent

func (client *Client) OpenMessageContent(req *OpenMessageContentRequest) (*Ok, error)

Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed

func (*Client) OpenWebApp added in v1.8.3

func (client *Client) OpenWebApp(req *OpenWebAppRequest) (*WebAppInfo, error)

Informs TDLib that a web app is being opened from attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button. For each bot, a confirmation alert about data sent to the bot must be shown once

func (*Client) OptimizeStorage

func (client *Client) OptimizeStorage(req *OptimizeStorageRequest) (*StorageStatistics, error)

Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted

func (*Client) ParseMarkdown

func (client *Client) ParseMarkdown(req *ParseMarkdownRequest) (*FormattedText, error)

Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously

func (*Client) ParseTextEntities

func (client *Client) ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error)

Parses Bold, Italic, Underline, Strikethrough, Spoiler, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. Can be called synchronously

func (*Client) PinChatMessage

func (client *Client) PinChatMessage(req *PinChatMessageRequest) (*Ok, error)

Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the channel

func (*Client) PingProxy

func (client *Client) PingProxy(req *PingProxyRequest) (*Seconds, error)

Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization

func (*Client) ProcessChatJoinRequest added in v1.7.10

func (client *Client) ProcessChatJoinRequest(req *ProcessChatJoinRequestRequest) (*Ok, error)

Handles a pending join request in a chat

func (*Client) ProcessChatJoinRequests added in v1.7.10

func (client *Client) ProcessChatJoinRequests(req *ProcessChatJoinRequestsRequest) (*Ok, error)

Handles all pending join requests for a given link in a chat

func (*Client) ProcessPushNotification

func (client *Client) ProcessPushNotification(req *ProcessPushNotificationRequest) (*Ok, error)

Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization

func (*Client) ReadAllChatMentions

func (client *Client) ReadAllChatMentions(req *ReadAllChatMentionsRequest) (*Ok, error)

Marks all mentions in a chat as read

func (*Client) ReadAllChatReactions added in v1.8.3

func (client *Client) ReadAllChatReactions(req *ReadAllChatReactionsRequest) (*Ok, error)

Marks all reactions in a chat as read

func (*Client) ReadFilePart

func (client *Client) ReadFilePart(req *ReadFilePartRequest) (*FilePart, error)

Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file

func (*Client) RecoverAuthenticationPassword

func (client *Client) RecoverAuthenticationPassword(req *RecoverAuthenticationPasswordRequest) (*Ok, error)

Recovers the password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword

func (*Client) RecoverPassword

func (client *Client) RecoverPassword(req *RecoverPasswordRequest) (*PasswordState, error)

Recovers the 2-step verification password using a recovery code sent to an email address that was previously set up

func (*Client) RegisterDevice

func (client *Client) RegisterDevice(req *RegisterDeviceRequest) (*PushReceiverId, error)

Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription

func (*Client) RegisterUser

func (client *Client) RegisterUser(req *RegisterUserRequest) (*Ok, error)

Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration

func (*Client) RemoveAllFilesFromDownloads added in v1.8.3

func (client *Client) RemoveAllFilesFromDownloads(req *RemoveAllFilesFromDownloadsRequest) (*Ok, error)

Removes all files from the file download list

func (*Client) RemoveBackground

func (client *Client) RemoveBackground(req *RemoveBackgroundRequest) (*Ok, error)

Removes background from the list of installed backgrounds

func (*Client) RemoveChatActionBar

func (client *Client) RemoveChatActionBar(req *RemoveChatActionBarRequest) (*Ok, error)

Removes a chat action bar without any other action

func (*Client) RemoveContacts

func (client *Client) RemoveContacts(req *RemoveContactsRequest) (*Ok, error)

Removes users from the contact list

func (*Client) RemoveFavoriteSticker

func (client *Client) RemoveFavoriteSticker(req *RemoveFavoriteStickerRequest) (*Ok, error)

Removes a sticker from the list of favorite stickers

func (*Client) RemoveFileFromDownloads added in v1.8.3

func (client *Client) RemoveFileFromDownloads(req *RemoveFileFromDownloadsRequest) (*Ok, error)

Removes a file from the file download list

func (*Client) RemoveNotification

func (client *Client) RemoveNotification(req *RemoveNotificationRequest) (*Ok, error)

Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user

func (*Client) RemoveNotificationGroup

func (client *Client) RemoveNotificationGroup(req *RemoveNotificationGroupRequest) (*Ok, error)

Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user

func (*Client) RemoveProxy

func (client *Client) RemoveProxy(req *RemoveProxyRequest) (*Ok, error)

Removes a proxy server. Can be called before authorization

func (*Client) RemoveRecentHashtag

func (client *Client) RemoveRecentHashtag(req *RemoveRecentHashtagRequest) (*Ok, error)

Removes a hashtag from the list of recently used hashtags

func (*Client) RemoveRecentSticker

func (client *Client) RemoveRecentSticker(req *RemoveRecentStickerRequest) (*Ok, error)

Removes a sticker from the list of recently used stickers

func (*Client) RemoveRecentlyFoundChat

func (client *Client) RemoveRecentlyFoundChat(req *RemoveRecentlyFoundChatRequest) (*Ok, error)

Removes a chat from the list of recently found chats

func (*Client) RemoveSavedAnimation

func (client *Client) RemoveSavedAnimation(req *RemoveSavedAnimationRequest) (*Ok, error)

Removes an animation from the list of saved animations

func (*Client) RemoveSavedNotificationSound added in v1.8.3

func (client *Client) RemoveSavedNotificationSound(req *RemoveSavedNotificationSoundRequest) (*Ok, error)

Removes a notification sound from the list of saved notification sounds

func (*Client) RemoveStickerFromSet

func (client *Client) RemoveStickerFromSet(req *RemoveStickerFromSetRequest) (*Ok, error)

Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot

func (*Client) RemoveTopChat

func (client *Client) RemoveTopChat(req *RemoveTopChatRequest) (*Ok, error)

Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled

func (*Client) ReorderChatFilters

func (client *Client) ReorderChatFilters(req *ReorderChatFiltersRequest) (*Ok, error)

Changes the order of chat filters

func (*Client) ReorderInstalledStickerSets

func (client *Client) ReorderInstalledStickerSets(req *ReorderInstalledStickerSetsRequest) (*Ok, error)

Changes the order of installed sticker sets

func (client *Client) ReplacePrimaryChatInviteLink(req *ReplacePrimaryChatInviteLinkRequest) (*ChatInviteLink, error)

Replaces current primary invite link for a chat with a new primary invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right

func (*Client) ReplaceVideoChatRtmpUrl added in v1.8.3

func (client *Client) ReplaceVideoChatRtmpUrl(req *ReplaceVideoChatRtmpUrlRequest) (*RtmpUrl, error)

Replaces the current RTMP URL for streaming to the chat; requires creator privileges

func (*Client) ReportChat

func (client *Client) ReportChat(req *ReportChatRequest) (*Ok, error)

Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported

func (*Client) ReportChatPhoto added in v1.7.10

func (client *Client) ReportChatPhoto(req *ReportChatPhotoRequest) (*Ok, error)

Reports a chat photo to the Telegram moderators. A chat photo can be reported only if chat.can_be_reported

func (*Client) ReportSupergroupSpam

func (client *Client) ReportSupergroupSpam(req *ReportSupergroupSpamRequest) (*Ok, error)

Reports messages in a supergroup as spam; requires administrator rights in the supergroup

func (*Client) RequestAuthenticationPasswordRecovery

func (client *Client) RequestAuthenticationPasswordRecovery() (*Ok, error)

Requests to send a password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword

func (*Client) RequestPasswordRecovery

func (client *Client) RequestPasswordRecovery() (*EmailAddressAuthenticationCodeInfo, error)

Requests to send a 2-step verification password recovery code to an email address that was previously set up

func (*Client) RequestQrCodeAuthentication

func (client *Client) RequestQrCodeAuthentication(req *RequestQrCodeAuthenticationRequest) (*Ok, error)

Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword

func (*Client) ResendAuthenticationCode

func (client *Client) ResendAuthenticationCode() (*Ok, error)

Re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed

func (*Client) ResendChangePhoneNumberCode

func (client *Client) ResendChangePhoneNumberCode() (*AuthenticationCodeInfo, error)

Re-sends the authentication code sent to confirm a new phone number for the current user. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed

func (*Client) ResendEmailAddressVerificationCode

func (client *Client) ResendEmailAddressVerificationCode() (*EmailAddressAuthenticationCodeInfo, error)

Re-sends the code to verify an email address to be added to a user's Telegram Passport

func (*Client) ResendMessages

func (client *Client) ResendMessages(req *ResendMessagesRequest) (*Messages, error)

Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message

func (*Client) ResendPhoneNumberConfirmationCode

func (client *Client) ResendPhoneNumberConfirmationCode() (*AuthenticationCodeInfo, error)

Resends phone number confirmation code

func (*Client) ResendPhoneNumberVerificationCode

func (client *Client) ResendPhoneNumberVerificationCode() (*AuthenticationCodeInfo, error)

Re-sends the code to verify a phone number to be added to a user's Telegram Passport

func (*Client) ResendRecoveryEmailAddressCode

func (client *Client) ResendRecoveryEmailAddressCode() (*PasswordState, error)

Resends the 2-step verification recovery email address verification code

func (*Client) ResetAllNotificationSettings

func (client *Client) ResetAllNotificationSettings() (*Ok, error)

Resets all notification settings to their default values. By default, all chats are unmuted and message previews are shown

func (*Client) ResetBackgrounds

func (client *Client) ResetBackgrounds() (*Ok, error)

Resets list of installed backgrounds to its default value

func (*Client) ResetNetworkStatistics

func (client *Client) ResetNetworkStatistics() (*Ok, error)

Resets all network data usage statistics to zero. Can be called before authorization

func (*Client) ResetPassword added in v1.7.10

func (client *Client) ResetPassword() (ResetPasswordResult, error)

Removes 2-step verification password without previous password and access to recovery email address. The password can't be reset immediately and the request needs to be repeated after the specified time

func (client *Client) RevokeChatInviteLink(req *RevokeChatInviteLinkRequest) (*ChatInviteLinks, error)

Revokes invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links. If a primary link is revoked, then additionally to the revoked link returns new primary link

func (client *Client) RevokeGroupCallInviteLink(req *RevokeGroupCallInviteLinkRequest) (*Ok, error)

Revokes invite link for a group call. Requires groupCall.can_be_managed group call flag

func (*Client) SaveApplicationLogEvent

func (client *Client) SaveApplicationLogEvent(req *SaveApplicationLogEventRequest) (*Ok, error)

Saves application log event on the server. Can be called before authorization

func (*Client) SearchBackground

func (client *Client) SearchBackground(req *SearchBackgroundRequest) (*Background, error)

Searches for a background by its name

func (*Client) SearchCallMessages

func (client *Client) SearchCallMessages(req *SearchCallMessagesRequest) (*Messages, error)

Searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib

func (*Client) SearchChatMembers

func (client *Client) SearchChatMembers(req *SearchChatMembersRequest) (*ChatMembers, error)

Searches for a specified query in the first name, last name and username of the members of a specified chat. Requires administrator rights in channels

func (*Client) SearchChatMessages

func (client *Client) SearchChatMessages(req *SearchChatMessagesRequest) (*Messages, error)

Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query (searchSecretMessages must be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit

func (*Client) SearchChatRecentLocationMessages

func (client *Client) SearchChatRecentLocationMessages(req *SearchChatRecentLocationMessagesRequest) (*Messages, error)

Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user

func (*Client) SearchChats

func (client *Client) SearchChats(req *SearchChatsRequest) (*Chats, error)

Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list

func (*Client) SearchChatsNearby

func (client *Client) SearchChatsNearby(req *SearchChatsNearbyRequest) (*ChatsNearby, error)

Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request must be sent again every 25 seconds with adjusted location to not miss new chats

func (*Client) SearchChatsOnServer

func (client *Client) SearchChatsOnServer(req *SearchChatsOnServerRequest) (*Chats, error)

Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list

func (*Client) SearchContacts

func (client *Client) SearchContacts(req *SearchContactsRequest) (*Users, error)

Searches for the specified query in the first names, last names and usernames of the known user contacts

func (*Client) SearchEmojis

func (client *Client) SearchEmojis(req *SearchEmojisRequest) (*Emojis, error)

Searches for emojis by keywords. Supported only if the file database is enabled

func (*Client) SearchFileDownloads added in v1.8.3

func (client *Client) SearchFileDownloads(req *SearchFileDownloadsRequest) (*FoundFileDownloads, error)

Searches for files in the file download list or recently downloaded files from the list

func (*Client) SearchHashtags

func (client *Client) SearchHashtags(req *SearchHashtagsRequest) (*Hashtags, error)

Searches for recently used hashtags by their prefix

func (*Client) SearchInstalledStickerSets

func (client *Client) SearchInstalledStickerSets(req *SearchInstalledStickerSetsRequest) (*StickerSets, error)

Searches for installed sticker sets by looking for specified query in their title and name

func (*Client) SearchMessages

func (client *Client) SearchMessages(req *SearchMessagesRequest) (*Messages, error)

Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit

func (*Client) SearchOutgoingDocumentMessages added in v1.8.3

func (client *Client) SearchOutgoingDocumentMessages(req *SearchOutgoingDocumentMessagesRequest) (*FoundMessages, error)

Searches for outgoing messages with content of the type messageDocument in all chats except secret chats. Returns the results in reverse chronological order

func (*Client) SearchPublicChat

func (client *Client) SearchPublicChat(req *SearchPublicChatRequest) (*Chat, error)

Searches a public chat by its username. Currently, only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned

func (*Client) SearchPublicChats

func (client *Client) SearchPublicChats(req *SearchPublicChatsRequest) (*Chats, error)

Searches public chats by looking for specified query in their username and title. Currently, only private chats, supergroups and channels can be public. Returns a meaningful number of results. Excludes private chats with contacts and chats from the chat list from the results

func (*Client) SearchSecretMessages

func (client *Client) SearchSecretMessages(req *SearchSecretMessagesRequest) (*FoundMessages, error)

Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance, the number of returned messages is chosen by TDLib

func (*Client) SearchStickerSet

func (client *Client) SearchStickerSet(req *SearchStickerSetRequest) (*StickerSet, error)

Searches for a sticker set by its name

func (*Client) SearchStickerSets

func (client *Client) SearchStickerSets(req *SearchStickerSetsRequest) (*StickerSets, error)

Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results

func (*Client) SearchStickers

func (client *Client) SearchStickers(req *SearchStickersRequest) (*Stickers, error)

Searches for stickers from public sticker sets that correspond to a given emoji

func (*Client) SearchUserByPhoneNumber added in v1.8.3

func (client *Client) SearchUserByPhoneNumber(req *SearchUserByPhoneNumberRequest) (*User, error)

Searches a user by their phone number

func (*Client) Send

func (client *Client) Send(req Request) (*Response, error)

func (*Client) SendBotStartMessage

func (client *Client) SendBotStartMessage(req *SendBotStartMessageRequest) (*Message, error)

Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message

func (*Client) SendCallDebugInformation

func (client *Client) SendCallDebugInformation(req *SendCallDebugInformationRequest) (*Ok, error)

Sends debug information for a call

func (*Client) SendCallRating

func (client *Client) SendCallRating(req *SendCallRatingRequest) (*Ok, error)

Sends a call rating

func (*Client) SendCallSignalingData

func (client *Client) SendCallSignalingData(req *SendCallSignalingDataRequest) (*Ok, error)

Sends call signaling data

func (*Client) SendChatAction

func (client *Client) SendChatAction(req *SendChatActionRequest) (*Ok, error)

Sends a notification about user activity in a chat

func (*Client) SendChatScreenshotTakenNotification

func (client *Client) SendChatScreenshotTakenNotification(req *SendChatScreenshotTakenNotificationRequest) (*Ok, error)

Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats

func (*Client) SendCustomRequest

func (client *Client) SendCustomRequest(req *SendCustomRequestRequest) (*CustomRequestResult, error)

Sends a custom request; for bots only

func (*Client) SendEmailAddressVerificationCode

func (client *Client) SendEmailAddressVerificationCode(req *SendEmailAddressVerificationCodeRequest) (*EmailAddressAuthenticationCodeInfo, error)

Sends a code to verify an email address to be added to a user's Telegram Passport

func (*Client) SendInlineQueryResultMessage

func (client *Client) SendInlineQueryResultMessage(req *SendInlineQueryResultMessageRequest) (*Message, error)

Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message

func (*Client) SendMessage

func (client *Client) SendMessage(req *SendMessageRequest) (*Message, error)

Sends a message. Returns the sent message

func (*Client) SendMessageAlbum

func (client *Client) SendMessageAlbum(req *SendMessageAlbumRequest) (*Messages, error)

Sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages

func (*Client) SendPassportAuthorizationForm

func (client *Client) SendPassportAuthorizationForm(req *SendPassportAuthorizationFormRequest) (*Ok, error)

Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements are going to be reused

func (*Client) SendPaymentForm

func (client *Client) SendPaymentForm(req *SendPaymentFormRequest) (*PaymentResult, error)

Sends a filled-out payment form to the bot for final verification

func (*Client) SendPhoneNumberConfirmationCode

func (client *Client) SendPhoneNumberConfirmationCode(req *SendPhoneNumberConfirmationCodeRequest) (*AuthenticationCodeInfo, error)

Sends phone number confirmation code to handle links of the type internalLinkTypePhoneNumberConfirmation

func (*Client) SendPhoneNumberVerificationCode

func (client *Client) SendPhoneNumberVerificationCode(req *SendPhoneNumberVerificationCodeRequest) (*AuthenticationCodeInfo, error)

Sends a code to verify a phone number to be added to a user's Telegram Passport

func (*Client) SendWebAppData added in v1.8.3

func (client *Client) SendWebAppData(req *SendWebAppDataRequest) (*Ok, error)

Sends data received from a keyboardButtonTypeWebApp web app to a bot

func (*Client) SetAccountTtl

func (client *Client) SetAccountTtl(req *SetAccountTtlRequest) (*Ok, error)

Changes the period of inactivity after which the account of the current user will automatically be deleted

func (*Client) SetAlarm

func (client *Client) SetAlarm(req *SetAlarmRequest) (*Ok, error)

Succeeds after a specified amount of time has passed. Can be called before initialization

func (*Client) SetAuthenticationPhoneNumber

func (client *Client) SetAuthenticationPhoneNumber(req *SetAuthenticationPhoneNumberRequest) (*Ok, error)

Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword

func (*Client) SetAutoDownloadSettings

func (client *Client) SetAutoDownloadSettings(req *SetAutoDownloadSettingsRequest) (*Ok, error)

Sets auto-download settings

func (*Client) SetBackground

func (client *Client) SetBackground(req *SetBackgroundRequest) (*Background, error)

Changes the background selected by the user; adds background to the list of installed backgrounds

func (*Client) SetBio

func (client *Client) SetBio(req *SetBioRequest) (*Ok, error)

Changes the bio of the current user

func (*Client) SetBotUpdatesStatus

func (client *Client) SetBotUpdatesStatus(req *SetBotUpdatesStatusRequest) (*Ok, error)

Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only

func (*Client) SetChatAvailableReactions added in v1.8.3

func (client *Client) SetChatAvailableReactions(req *SetChatAvailableReactionsRequest) (*Ok, error)

Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right

func (*Client) SetChatClientData

func (client *Client) SetChatClientData(req *SetChatClientDataRequest) (*Ok, error)

Changes application-specific data associated with a chat

func (*Client) SetChatDescription

func (client *Client) SetChatDescription(req *SetChatDescriptionRequest) (*Ok, error)

Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right

func (*Client) SetChatDiscussionGroup

func (client *Client) SetChatDiscussionGroup(req *SetChatDiscussionGroupRequest) (*Ok, error)

Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified

func (*Client) SetChatDraftMessage

func (client *Client) SetChatDraftMessage(req *SetChatDraftMessageRequest) (*Ok, error)

Changes the draft message in a chat

func (*Client) SetChatLocation

func (client *Client) SetChatLocation(req *SetChatLocationRequest) (*Ok, error)

Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use

func (*Client) SetChatMemberStatus

func (client *Client) SetChatMemberStatus(req *SetChatMemberStatusRequest) (*Ok, error)

Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead. Use addChatMember or banChatMember if some additional parameters needs to be passed

func (*Client) SetChatMessageSender added in v1.8.3

func (client *Client) SetChatMessageSender(req *SetChatMessageSenderRequest) (*Ok, error)

Selects a message sender to send messages in a chat

func (*Client) SetChatMessageTtl added in v1.8.3

func (client *Client) SetChatMessageTtl(req *SetChatMessageTtlRequest) (*Ok, error)

Changes the message TTL in a chat. Requires can_delete_messages administrator right in basic groups, supergroups and channels Message TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram).

func (*Client) SetChatNotificationSettings

func (client *Client) SetChatNotificationSettings(req *SetChatNotificationSettingsRequest) (*Ok, error)

Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed

func (*Client) SetChatPermissions

func (client *Client) SetChatPermissions(req *SetChatPermissionsRequest) (*Ok, error)

Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right

func (*Client) SetChatPhoto

func (client *Client) SetChatPhoto(req *SetChatPhotoRequest) (*Ok, error)

Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right

func (*Client) SetChatSlowModeDelay

func (client *Client) SetChatSlowModeDelay(req *SetChatSlowModeDelayRequest) (*Ok, error)

Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights

func (*Client) SetChatTheme added in v1.7.10

func (client *Client) SetChatTheme(req *SetChatThemeRequest) (*Ok, error)

Changes the chat theme. Supported only in private and secret chats

func (*Client) SetChatTitle

func (client *Client) SetChatTitle(req *SetChatTitleRequest) (*Ok, error)

Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right

func (*Client) SetCommands

func (client *Client) SetCommands(req *SetCommandsRequest) (*Ok, error)

Sets the list of commands supported by the bot for the given user scope and language; for bots only

func (*Client) SetCustomLanguagePack

func (client *Client) SetCustomLanguagePack(req *SetCustomLanguagePackRequest) (*Ok, error)

Adds or changes a custom local language pack to the current localization target

func (*Client) SetCustomLanguagePackString

func (client *Client) SetCustomLanguagePackString(req *SetCustomLanguagePackStringRequest) (*Ok, error)

Adds, edits or deletes a string in a custom local language pack. Can be called before authorization

func (*Client) SetDatabaseEncryptionKey

func (client *Client) SetDatabaseEncryptionKey(req *SetDatabaseEncryptionKeyRequest) (*Ok, error)

Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain

func (*Client) SetDefaultChannelAdministratorRights added in v1.8.3

func (client *Client) SetDefaultChannelAdministratorRights(req *SetDefaultChannelAdministratorRightsRequest) (*Ok, error)

Sets default administrator rights for adding the bot to channel chats; for bots only

func (*Client) SetDefaultGroupAdministratorRights added in v1.8.3

func (client *Client) SetDefaultGroupAdministratorRights(req *SetDefaultGroupAdministratorRightsRequest) (*Ok, error)

Sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only

func (*Client) SetFileGenerationProgress

func (client *Client) SetFileGenerationProgress(req *SetFileGenerationProgressRequest) (*Ok, error)

Informs TDLib on a file generation progress

func (*Client) SetGameScore

func (client *Client) SetGameScore(req *SetGameScoreRequest) (*Message, error)

Updates the game score of the specified user in the game; for bots only

func (*Client) SetGroupCallParticipantIsSpeaking added in v1.7.10

func (client *Client) SetGroupCallParticipantIsSpeaking(req *SetGroupCallParticipantIsSpeakingRequest) (*Ok, error)

Informs TDLib that speaking state of a participant of an active group has changed

func (*Client) SetGroupCallParticipantVolumeLevel added in v1.7.10

func (client *Client) SetGroupCallParticipantVolumeLevel(req *SetGroupCallParticipantVolumeLevelRequest) (*Ok, error)

Changes volume level of a participant of an active group call. If the current user can manage the group call, then the participant's volume level will be changed for all users with the default volume level

func (*Client) SetGroupCallTitle added in v1.7.10

func (client *Client) SetGroupCallTitle(req *SetGroupCallTitleRequest) (*Ok, error)

Sets group call title. Requires groupCall.can_be_managed group call flag

func (*Client) SetInactiveSessionTtl added in v1.7.10

func (client *Client) SetInactiveSessionTtl(req *SetInactiveSessionTtlRequest) (*Ok, error)

Changes the period of inactivity after which sessions will automatically be terminated

func (*Client) SetInlineGameScore

func (client *Client) SetInlineGameScore(req *SetInlineGameScoreRequest) (*Ok, error)

Updates the game score of the specified user in a game; for bots only

func (*Client) SetLocation

func (client *Client) SetLocation(req *SetLocationRequest) (*Ok, error)

Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer

func (*Client) SetLogStream

func (client *Client) SetLogStream(req *SetLogStreamRequest) (*Ok, error)

Sets new log stream for internal logging of TDLib. Can be called synchronously

func (*Client) SetLogTagVerbosityLevel

func (client *Client) SetLogTagVerbosityLevel(req *SetLogTagVerbosityLevelRequest) (*Ok, error)

Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously

func (*Client) SetLogVerbosityLevel

func (client *Client) SetLogVerbosityLevel(req *SetLogVerbosityLevelRequest) (*Ok, error)

Sets the verbosity level of the internal logging of TDLib. Can be called synchronously

func (*Client) SetMenuButton added in v1.8.3

func (client *Client) SetMenuButton(req *SetMenuButtonRequest) (*Ok, error)

Sets menu button for the given user or for all users; for bots only

func (*Client) SetMessageReaction added in v1.8.3

func (client *Client) SetMessageReaction(req *SetMessageReactionRequest) (*Ok, error)

Changes chosen reaction for a message

func (*Client) SetName

func (client *Client) SetName(req *SetNameRequest) (*Ok, error)

Changes the first and last name of the current user

func (*Client) SetNetworkType

func (client *Client) SetNetworkType(req *SetNetworkTypeRequest) (*Ok, error)

Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it must be called whenever the network is changed, even if the network type remains the same. Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics

func (*Client) SetOption

func (client *Client) SetOption(req *SetOptionRequest) (*Ok, error)

Sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization

func (*Client) SetPassportElement

func (client *Client) SetPassportElement(req *SetPassportElementRequest) (PassportElement, error)

Adds an element to the user's Telegram Passport. May return an error with a message "PHONE_VERIFICATION_NEEDED" or "EMAIL_VERIFICATION_NEEDED" if the chosen phone number or the chosen email address must be verified first

func (*Client) SetPassportElementErrors

func (client *Client) SetPassportElementErrors(req *SetPassportElementErrorsRequest) (*Ok, error)

Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed

func (*Client) SetPassword

func (client *Client) SetPassword(req *SetPasswordRequest) (*PasswordState, error)

Changes the password for the current user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed

func (*Client) SetPinnedChats

func (client *Client) SetPinnedChats(req *SetPinnedChatsRequest) (*Ok, error)

Changes the order of pinned chats

func (*Client) SetPollAnswer

func (client *Client) SetPollAnswer(req *SetPollAnswerRequest) (*Ok, error)

Changes the user answer to a poll. A poll in quiz mode can be answered only once

func (*Client) SetProfilePhoto

func (client *Client) SetProfilePhoto(req *SetProfilePhotoRequest) (*Ok, error)

Changes a profile photo for the current user

func (*Client) SetRecoveryEmailAddress

func (client *Client) SetRecoveryEmailAddress(req *SetRecoveryEmailAddressRequest) (*PasswordState, error)

Changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. If new_recovery_email_address is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation

func (*Client) SetScopeNotificationSettings

func (client *Client) SetScopeNotificationSettings(req *SetScopeNotificationSettingsRequest) (*Ok, error)

Changes notification settings for chats of a given type

func (*Client) SetStickerPositionInSet

func (client *Client) SetStickerPositionInSet(req *SetStickerPositionInSetRequest) (*Ok, error)

Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot

func (*Client) SetStickerSetThumbnail

func (client *Client) SetStickerSetThumbnail(req *SetStickerSetThumbnailRequest) (*StickerSet, error)

Sets a sticker set thumbnail; for bots only. Returns the sticker set

func (*Client) SetSupergroupStickerSet

func (client *Client) SetSupergroupStickerSet(req *SetSupergroupStickerSetRequest) (*Ok, error)

Changes the sticker set of a supergroup; requires can_change_info administrator right

func (*Client) SetSupergroupUsername

func (client *Client) SetSupergroupUsername(req *SetSupergroupUsernameRequest) (*Ok, error)

Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel

func (*Client) SetTdlibParameters

func (client *Client) SetTdlibParameters(req *SetTdlibParametersRequest) (*Ok, error)

Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters

func (*Client) SetUserPrivacySettingRules

func (client *Client) SetUserPrivacySettingRules(req *SetUserPrivacySettingRulesRequest) (*Ok, error)

Changes user privacy settings

func (*Client) SetUsername

func (client *Client) SetUsername(req *SetUsernameRequest) (*Ok, error)

Changes the username of the current user

func (*Client) SetVideoChatDefaultParticipant added in v1.7.10

func (client *Client) SetVideoChatDefaultParticipant(req *SetVideoChatDefaultParticipantRequest) (*Ok, error)

Changes default participant identifier, on whose behalf a video chat in the chat will be joined

func (*Client) SharePhoneNumber

func (client *Client) SharePhoneNumber(req *SharePhoneNumberRequest) (*Ok, error)

Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber

func (*Client) StartGroupCallRecording added in v1.7.10

func (client *Client) StartGroupCallRecording(req *StartGroupCallRecordingRequest) (*Ok, error)

Starts recording of an active group call. Requires groupCall.can_be_managed group call flag

func (*Client) StartGroupCallScreenSharing added in v1.7.10

func (client *Client) StartGroupCallScreenSharing(req *StartGroupCallScreenSharingRequest) (*Text, error)

Starts screen sharing in a joined group call. Returns join response payload for tgcalls

func (*Client) StartScheduledGroupCall added in v1.7.10

func (client *Client) StartScheduledGroupCall(req *StartScheduledGroupCallRequest) (*Ok, error)

Starts a scheduled group call

func (*Client) Stop

func (client *Client) Stop()

func (*Client) StopPoll

func (client *Client) StopPoll(req *StopPollRequest) (*Ok, error)

Stops a poll. A poll in a message can be stopped when the message has can_be_edited flag set

func (*Client) SynchronizeLanguagePack

func (client *Client) SynchronizeLanguagePack(req *SynchronizeLanguagePackRequest) (*Ok, error)

Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn't need to be called explicitly for the current used/base language packs. Can be called before authorization

func (*Client) TerminateAllOtherSessions

func (client *Client) TerminateAllOtherSessions() (*Ok, error)

Terminates all other sessions of the current user

func (*Client) TerminateSession

func (client *Client) TerminateSession(req *TerminateSessionRequest) (*Ok, error)

Terminates a session of the current user

func (*Client) TestCallBytes

func (client *Client) TestCallBytes(req *TestCallBytesRequest) (*TestBytes, error)

Returns the received bytes; for testing only. This is an offline method. Can be called before authorization

func (*Client) TestCallEmpty

func (client *Client) TestCallEmpty() (*Ok, error)

Does nothing; for testing only. This is an offline method. Can be called before authorization

func (*Client) TestCallString

func (client *Client) TestCallString(req *TestCallStringRequest) (*TestString, error)

Returns the received string; for testing only. This is an offline method. Can be called before authorization

func (*Client) TestCallVectorInt

func (client *Client) TestCallVectorInt(req *TestCallVectorIntRequest) (*TestVectorInt, error)

Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization

func (*Client) TestCallVectorIntObject

func (client *Client) TestCallVectorIntObject(req *TestCallVectorIntObjectRequest) (*TestVectorIntObject, error)

Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization

func (*Client) TestCallVectorString

func (client *Client) TestCallVectorString(req *TestCallVectorStringRequest) (*TestVectorString, error)

Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization

func (*Client) TestCallVectorStringObject

func (client *Client) TestCallVectorStringObject(req *TestCallVectorStringObjectRequest) (*TestVectorStringObject, error)

Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization

func (*Client) TestGetDifference

func (client *Client) TestGetDifference() (*Ok, error)

Forces an updates.getDifference call to the Telegram servers; for testing only

func (*Client) TestNetwork

func (client *Client) TestNetwork() (*Ok, error)

Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization

func (*Client) TestProxy

func (client *Client) TestProxy(req *TestProxyRequest) (*Ok, error)

Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization

func (*Client) TestReturnError

func (client *Client) TestReturnError(req *TestReturnErrorRequest) (*Error, error)

Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously

func (*Client) TestSquareInt

func (client *Client) TestSquareInt(req *TestSquareIntRequest) (*TestInt, error)

Returns the squared received number; for testing only. This is an offline method. Can be called before authorization

func (*Client) TestUseUpdate

func (client *Client) TestUseUpdate() (Update, error)

Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization

func (*Client) ToggleAllDownloadsArePaused added in v1.8.3

func (client *Client) ToggleAllDownloadsArePaused(req *ToggleAllDownloadsArePausedRequest) (*Ok, error)

Changes pause state of all files in the file download list

func (*Client) ToggleBotIsAddedToAttachmentMenu added in v1.8.3

func (client *Client) ToggleBotIsAddedToAttachmentMenu(req *ToggleBotIsAddedToAttachmentMenuRequest) (*Ok, error)

Adds or removes a bot to attachment menu. Bot can be added to attachment menu, only if userTypeBot.can_be_added_to_attachment_menu == true

func (*Client) ToggleChatDefaultDisableNotification

func (client *Client) ToggleChatDefaultDisableNotification(req *ToggleChatDefaultDisableNotificationRequest) (*Ok, error)

Changes the value of the default disable_notification parameter, used when a message is sent to a chat

func (*Client) ToggleChatHasProtectedContent added in v1.7.10

func (client *Client) ToggleChatHasProtectedContent(req *ToggleChatHasProtectedContentRequest) (*Ok, error)

Changes the ability of users to save, forward, or copy chat content. Supported only for basic groups, supergroups and channels. Requires owner privileges

func (*Client) ToggleChatIsMarkedAsUnread

func (client *Client) ToggleChatIsMarkedAsUnread(req *ToggleChatIsMarkedAsUnreadRequest) (*Ok, error)

Changes the marked as unread state of a chat

func (*Client) ToggleChatIsPinned

func (client *Client) ToggleChatIsPinned(req *ToggleChatIsPinnedRequest) (*Ok, error)

Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/archive chat list

func (*Client) ToggleDownloadIsPaused added in v1.8.3

func (client *Client) ToggleDownloadIsPaused(req *ToggleDownloadIsPausedRequest) (*Ok, error)

Changes pause state of a file in the file download list

func (*Client) ToggleGroupCallEnabledStartNotification added in v1.7.10

func (client *Client) ToggleGroupCallEnabledStartNotification(req *ToggleGroupCallEnabledStartNotificationRequest) (*Ok, error)

Toggles whether the current user will receive a notification when the group call will start; scheduled group calls only

func (*Client) ToggleGroupCallIsMyVideoEnabled added in v1.7.10

func (client *Client) ToggleGroupCallIsMyVideoEnabled(req *ToggleGroupCallIsMyVideoEnabledRequest) (*Ok, error)

Toggles whether current user's video is enabled

func (*Client) ToggleGroupCallIsMyVideoPaused added in v1.7.10

func (client *Client) ToggleGroupCallIsMyVideoPaused(req *ToggleGroupCallIsMyVideoPausedRequest) (*Ok, error)

Toggles whether current user's video is paused

func (*Client) ToggleGroupCallMuteNewParticipants added in v1.7.10

func (client *Client) ToggleGroupCallMuteNewParticipants(req *ToggleGroupCallMuteNewParticipantsRequest) (*Ok, error)

Toggles whether new participants of a group call can be unmuted only by administrators of the group call. Requires groupCall.can_toggle_mute_new_participants group call flag

func (*Client) ToggleGroupCallParticipantIsHandRaised added in v1.7.10

func (client *Client) ToggleGroupCallParticipantIsHandRaised(req *ToggleGroupCallParticipantIsHandRaisedRequest) (*Ok, error)

Toggles whether a group call participant hand is rased

func (*Client) ToggleGroupCallParticipantIsMuted added in v1.7.10

func (client *Client) ToggleGroupCallParticipantIsMuted(req *ToggleGroupCallParticipantIsMutedRequest) (*Ok, error)

Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves

func (*Client) ToggleGroupCallScreenSharingIsPaused added in v1.7.10

func (client *Client) ToggleGroupCallScreenSharingIsPaused(req *ToggleGroupCallScreenSharingIsPausedRequest) (*Ok, error)

Pauses or unpauses screen sharing in a joined group call

func (*Client) ToggleMessageSenderIsBlocked

func (client *Client) ToggleMessageSenderIsBlocked(req *ToggleMessageSenderIsBlockedRequest) (*Ok, error)

Changes the block state of a message sender. Currently, only users and supergroup chats can be blocked

func (*Client) ToggleSessionCanAcceptCalls added in v1.7.10

func (client *Client) ToggleSessionCanAcceptCalls(req *ToggleSessionCanAcceptCallsRequest) (*Ok, error)

Toggles whether a session can accept incoming calls

func (*Client) ToggleSessionCanAcceptSecretChats added in v1.7.10

func (client *Client) ToggleSessionCanAcceptSecretChats(req *ToggleSessionCanAcceptSecretChatsRequest) (*Ok, error)

Toggles whether a session can accept incoming secret chats

func (*Client) ToggleSupergroupIsAllHistoryAvailable

func (client *Client) ToggleSupergroupIsAllHistoryAvailable(req *ToggleSupergroupIsAllHistoryAvailableRequest) (*Ok, error)

Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right

func (*Client) ToggleSupergroupIsBroadcastGroup added in v1.7.10

func (client *Client) ToggleSupergroupIsBroadcastGroup(req *ToggleSupergroupIsBroadcastGroupRequest) (*Ok, error)

Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup

func (*Client) ToggleSupergroupSignMessages

func (client *Client) ToggleSupergroupSignMessages(req *ToggleSupergroupSignMessagesRequest) (*Ok, error)

Toggles whether sender signature is added to sent messages in a channel; requires can_change_info administrator right

func (*Client) TransferChatOwnership

func (client *Client) TransferChatOwnership(req *TransferChatOwnershipRequest) (*Ok, error)

Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats

func (*Client) TranslateText added in v1.8.3

func (client *Client) TranslateText(req *TranslateTextRequest) (*Text, error)

Translates a text to the given language. Returns a 404 error if the translation can't be performed

func (*Client) UnpinAllChatMessages

func (client *Client) UnpinAllChatMessages(req *UnpinAllChatMessagesRequest) (*Ok, error)

Removes all pinned messages from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel

func (*Client) UnpinChatMessage

func (client *Client) UnpinChatMessage(req *UnpinChatMessageRequest) (*Ok, error)

Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel

func (*Client) UpgradeBasicGroupChatToSupergroupChat

func (client *Client) UpgradeBasicGroupChatToSupergroupChat(req *UpgradeBasicGroupChatToSupergroupChatRequest) (*Chat, error)

Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group

func (*Client) UploadFile

func (client *Client) UploadFile(req *UploadFileRequest) (*File, error)

Asynchronously uploads a file to the cloud without sending it in a message. updateFile will be used to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it will be sent in a message

func (*Client) UploadStickerFile

func (client *Client) UploadStickerFile(req *UploadStickerFileRequest) (*File, error)

Uploads a file with a sticker; returns the uploaded file

func (*Client) ValidateOrderInfo

func (client *Client) ValidateOrderInfo(req *ValidateOrderInfoRequest) (*ValidatedOrderInfo, error)

Validates the order information provided by a user and returns the available shipping options for a flexible invoice

func (*Client) ViewMessages

func (client *Client) ViewMessages(req *ViewMessagesRequest) (*Ok, error)

Informs TDLib that messages are being viewed by the user. Sponsored messages must be marked as viewed only when the entire text of the message is shown on the screen (excluding the button). Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels)

func (*Client) ViewTrendingStickerSets

func (client *Client) ViewTrendingStickerSets(req *ViewTrendingStickerSetsRequest) (*Ok, error)

Informs the server that some trending sticker sets have been viewed by the user

func (*Client) WriteGeneratedFilePart

func (client *Client) WriteGeneratedFilePart(req *WriteGeneratedFilePartRequest) (*Ok, error)

Writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file

type CloseChatRequest

type CloseChatRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type CloseSecretChatRequest

type CloseSecretChatRequest struct {
	// Secret chat identifier
	SecretChatId int32 `json:"secret_chat_id"`
}

type CloseWebAppRequest added in v1.8.3

type CloseWebAppRequest struct {
	// Identifier of web app launch, received from openWebApp
	WebAppLaunchId JsonInt64 `json:"web_app_launch_id"`
}

type ClosedVectorPath added in v1.7.10

type ClosedVectorPath struct {

	// List of vector path commands
	Commands []VectorPathCommand `json:"commands"`
	// contains filtered or unexported fields
}

Represents a closed vector path. The path begins at the end point of the last command

func UnmarshalClosedVectorPath added in v1.7.10

func UnmarshalClosedVectorPath(data json.RawMessage) (*ClosedVectorPath, error)

func (*ClosedVectorPath) GetClass added in v1.7.10

func (*ClosedVectorPath) GetClass() string

func (*ClosedVectorPath) GetType added in v1.7.10

func (*ClosedVectorPath) GetType() string

func (*ClosedVectorPath) MarshalJSON added in v1.7.10

func (entity *ClosedVectorPath) MarshalJSON() ([]byte, error)

func (*ClosedVectorPath) UnmarshalJSON added in v1.7.10

func (closedVectorPath *ClosedVectorPath) UnmarshalJSON(data []byte) error

type ConfirmQrCodeAuthenticationRequest

type ConfirmQrCodeAuthenticationRequest struct {
	// A link from a QR code. The link must be scanned by the in-app camera
	Link string `json:"link"`
}

type ConnectedWebsite

type ConnectedWebsite struct {

	// Website identifier
	Id JsonInt64 `json:"id"`
	// The domain name of the website
	DomainName string `json:"domain_name"`
	// User identifier of a bot linked with the website
	BotUserId int64 `json:"bot_user_id"`
	// The version of a browser used to log in
	Browser string `json:"browser"`
	// Operating system the browser is running on
	Platform string `json:"platform"`
	// Point in time (Unix timestamp) when the user was logged in
	LogInDate int32 `json:"log_in_date"`
	// Point in time (Unix timestamp) when obtained authorization was last used
	LastActiveDate int32 `json:"last_active_date"`
	// IP address from which the user was logged in, in human-readable format
	Ip string `json:"ip"`
	// Human-readable description of a country and a region from which the user was logged in, based on the IP address
	Location string `json:"location"`
	// contains filtered or unexported fields
}

Contains information about one website the current user is logged in with Telegram

func UnmarshalConnectedWebsite

func UnmarshalConnectedWebsite(data json.RawMessage) (*ConnectedWebsite, error)

func (*ConnectedWebsite) GetClass

func (*ConnectedWebsite) GetClass() string

func (*ConnectedWebsite) GetType

func (*ConnectedWebsite) GetType() string

func (*ConnectedWebsite) MarshalJSON

func (entity *ConnectedWebsite) MarshalJSON() ([]byte, error)

type ConnectedWebsites

type ConnectedWebsites struct {

	// List of connected websites
	Websites []*ConnectedWebsite `json:"websites"`
	// contains filtered or unexported fields
}

Contains a list of websites the current user is logged in with Telegram

func UnmarshalConnectedWebsites

func UnmarshalConnectedWebsites(data json.RawMessage) (*ConnectedWebsites, error)

func (*ConnectedWebsites) GetClass

func (*ConnectedWebsites) GetClass() string

func (*ConnectedWebsites) GetType

func (*ConnectedWebsites) GetType() string

func (*ConnectedWebsites) MarshalJSON

func (entity *ConnectedWebsites) MarshalJSON() ([]byte, error)

type ConnectionState

type ConnectionState interface {
	ConnectionStateType() string
}

Describes the current state of the connection to Telegram servers

func UnmarshalConnectionState

func UnmarshalConnectionState(data json.RawMessage) (ConnectionState, error)

func UnmarshalListOfConnectionState

func UnmarshalListOfConnectionState(dataList []json.RawMessage) ([]ConnectionState, error)

type ConnectionStateConnecting

type ConnectionStateConnecting struct {
	// contains filtered or unexported fields
}

Currently establishing a connection to the Telegram servers

func UnmarshalConnectionStateConnecting

func UnmarshalConnectionStateConnecting(data json.RawMessage) (*ConnectionStateConnecting, error)

func (*ConnectionStateConnecting) ConnectionStateType

func (*ConnectionStateConnecting) ConnectionStateType() string

func (*ConnectionStateConnecting) GetClass

func (*ConnectionStateConnecting) GetClass() string

func (*ConnectionStateConnecting) GetType

func (*ConnectionStateConnecting) GetType() string

func (*ConnectionStateConnecting) MarshalJSON

func (entity *ConnectionStateConnecting) MarshalJSON() ([]byte, error)

type ConnectionStateConnectingToProxy

type ConnectionStateConnectingToProxy struct {
	// contains filtered or unexported fields
}

Currently establishing a connection with a proxy server

func UnmarshalConnectionStateConnectingToProxy

func UnmarshalConnectionStateConnectingToProxy(data json.RawMessage) (*ConnectionStateConnectingToProxy, error)

func (*ConnectionStateConnectingToProxy) ConnectionStateType

func (*ConnectionStateConnectingToProxy) ConnectionStateType() string

func (*ConnectionStateConnectingToProxy) GetClass

func (*ConnectionStateConnectingToProxy) GetType

func (*ConnectionStateConnectingToProxy) MarshalJSON

func (entity *ConnectionStateConnectingToProxy) MarshalJSON() ([]byte, error)

type ConnectionStateReady

type ConnectionStateReady struct {
	// contains filtered or unexported fields
}

There is a working connection to the Telegram servers

func UnmarshalConnectionStateReady

func UnmarshalConnectionStateReady(data json.RawMessage) (*ConnectionStateReady, error)

func (*ConnectionStateReady) ConnectionStateType

func (*ConnectionStateReady) ConnectionStateType() string

func (*ConnectionStateReady) GetClass

func (*ConnectionStateReady) GetClass() string

func (*ConnectionStateReady) GetType

func (*ConnectionStateReady) GetType() string

func (*ConnectionStateReady) MarshalJSON

func (entity *ConnectionStateReady) MarshalJSON() ([]byte, error)

type ConnectionStateUpdating

type ConnectionStateUpdating struct {
	// contains filtered or unexported fields
}

Downloading data received while the application was offline

func UnmarshalConnectionStateUpdating

func UnmarshalConnectionStateUpdating(data json.RawMessage) (*ConnectionStateUpdating, error)

func (*ConnectionStateUpdating) ConnectionStateType

func (*ConnectionStateUpdating) ConnectionStateType() string

func (*ConnectionStateUpdating) GetClass

func (*ConnectionStateUpdating) GetClass() string

func (*ConnectionStateUpdating) GetType

func (*ConnectionStateUpdating) GetType() string

func (*ConnectionStateUpdating) MarshalJSON

func (entity *ConnectionStateUpdating) MarshalJSON() ([]byte, error)

type ConnectionStateWaitingForNetwork

type ConnectionStateWaitingForNetwork struct {
	// contains filtered or unexported fields
}

Currently waiting for the network to become available. Use setNetworkType to change the available network type

func UnmarshalConnectionStateWaitingForNetwork

func UnmarshalConnectionStateWaitingForNetwork(data json.RawMessage) (*ConnectionStateWaitingForNetwork, error)

func (*ConnectionStateWaitingForNetwork) ConnectionStateType

func (*ConnectionStateWaitingForNetwork) ConnectionStateType() string

func (*ConnectionStateWaitingForNetwork) GetClass

func (*ConnectionStateWaitingForNetwork) GetType

func (*ConnectionStateWaitingForNetwork) MarshalJSON

func (entity *ConnectionStateWaitingForNetwork) MarshalJSON() ([]byte, error)

type Contact

type Contact struct {

	// Phone number of the user
	PhoneNumber string `json:"phone_number"`
	// First name of the user; 1-255 characters in length
	FirstName string `json:"first_name"`
	// Last name of the user
	LastName string `json:"last_name"`
	// Additional data about the user in a form of vCard; 0-2048 bytes in length
	Vcard string `json:"vcard"`
	// Identifier of the user, if known; otherwise 0
	UserId int64 `json:"user_id"`
	// contains filtered or unexported fields
}

Describes a user contact

func UnmarshalContact

func UnmarshalContact(data json.RawMessage) (*Contact, error)

func (*Contact) GetClass

func (*Contact) GetClass() string

func (*Contact) GetType

func (*Contact) GetType() string

func (*Contact) MarshalJSON

func (entity *Contact) MarshalJSON() ([]byte, error)

type Count

type Count struct {

	// Count
	Count int32 `json:"count"`
	// contains filtered or unexported fields
}

Contains a counter

func UnmarshalCount

func UnmarshalCount(data json.RawMessage) (*Count, error)

func (*Count) GetClass

func (*Count) GetClass() string

func (*Count) GetType

func (*Count) GetType() string

func (*Count) MarshalJSON

func (entity *Count) MarshalJSON() ([]byte, error)

type Countries

type Countries struct {

	// The list of countries
	Countries []*CountryInfo `json:"countries"`
	// contains filtered or unexported fields
}

Contains information about countries

func UnmarshalCountries

func UnmarshalCountries(data json.RawMessage) (*Countries, error)

func (*Countries) GetClass

func (*Countries) GetClass() string

func (*Countries) GetType

func (*Countries) GetType() string

func (*Countries) MarshalJSON

func (entity *Countries) MarshalJSON() ([]byte, error)

type CountryInfo

type CountryInfo struct {

	// A two-letter ISO 3166-1 alpha-2 country code
	CountryCode string `json:"country_code"`
	// Native name of the country
	Name string `json:"name"`
	// English name of the country
	EnglishName string `json:"english_name"`
	// True, if the country must be hidden from the list of all countries
	IsHidden bool `json:"is_hidden"`
	// List of country calling codes
	CallingCodes []string `json:"calling_codes"`
	// contains filtered or unexported fields
}

Contains information about a country

func UnmarshalCountryInfo

func UnmarshalCountryInfo(data json.RawMessage) (*CountryInfo, error)

func (*CountryInfo) GetClass

func (*CountryInfo) GetClass() string

func (*CountryInfo) GetType

func (*CountryInfo) GetType() string

func (*CountryInfo) MarshalJSON

func (entity *CountryInfo) MarshalJSON() ([]byte, error)

type CreateBasicGroupChatRequest

type CreateBasicGroupChatRequest struct {
	// Basic group identifier
	BasicGroupId int64 `json:"basic_group_id"`
	// Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect
	Force bool `json:"force"`
}

type CreateCallRequest

type CreateCallRequest struct {
	// Identifier of the user to be called
	UserId int64 `json:"user_id"`
	// The call protocols supported by the application
	Protocol *CallProtocol `json:"protocol"`
	// Pass true to create a video call
	IsVideo bool `json:"is_video"`
}

type CreateChatFilterRequest

type CreateChatFilterRequest struct {
	// Chat filter
	Filter *ChatFilter `json:"filter"`
}

type CreateChatInviteLinkRequest added in v1.7.10

type CreateChatInviteLinkRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Invite link name; 0-32 characters
	Name string `json:"name"`
	// Point in time (Unix timestamp) when the link will expire; pass 0 if never
	ExpirationDate int32 `json:"expiration_date"`
	// The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited
	MemberLimit int32 `json:"member_limit"`
	// Pass true if users joining the chat via the link need to be approved by chat administrators. In this case, member_limit must be 0
	CreatesJoinRequest bool `json:"creates_join_request"`
}

type CreateNewBasicGroupChatRequest

type CreateNewBasicGroupChatRequest struct {
	// Identifiers of users to be added to the basic group
	UserIds []int64 `json:"user_ids"`
	// Title of the new basic group; 1-128 characters
	Title string `json:"title"`
}

type CreateNewSecretChatRequest

type CreateNewSecretChatRequest struct {
	// Identifier of the target user
	UserId int64 `json:"user_id"`
}

type CreateNewStickerSetRequest

type CreateNewStickerSetRequest struct {
	// Sticker set owner; ignored for regular users
	UserId int64 `json:"user_id"`
	// Sticker set title; 1-64 characters
	Title string `json:"title"`
	// Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 1-64 characters
	Name string `json:"name"`
	// List of stickers to be added to the set; must be non-empty. All stickers must have the same format. For TGS stickers, uploadStickerFile must be used before the sticker is shown
	Stickers []*InputSticker `json:"stickers"`
	// Source of the sticker set; may be empty if unknown
	Source string `json:"source"`
}

type CreateNewSupergroupChatRequest

type CreateNewSupergroupChatRequest struct {
	// Title of the new chat; 1-128 characters
	Title string `json:"title"`
	// Pass true to create a channel chat
	IsChannel bool `json:"is_channel"`
	// Chat description; 0-255 characters
	Description string `json:"description"`
	// Chat location if a location-based supergroup is being created; pass null to create an ordinary supergroup chat
	Location *ChatLocation `json:"location"`
	// Pass true to create a supergroup for importing messages using importMessage
	ForImport bool `json:"for_import"`
}

type CreatePrivateChatRequest

type CreatePrivateChatRequest struct {
	// User identifier
	UserId int64 `json:"user_id"`
	// Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect
	Force bool `json:"force"`
}

type CreateSecretChatRequest

type CreateSecretChatRequest struct {
	// Secret chat identifier
	SecretChatId int32 `json:"secret_chat_id"`
}

type CreateSupergroupChatRequest

type CreateSupergroupChatRequest struct {
	// Supergroup or channel identifier
	SupergroupId int64 `json:"supergroup_id"`
	// Pass true to create the chat without a network request. In this case all information about the chat except its type, title and photo can be incorrect
	Force bool `json:"force"`
}

type CreateTemporaryPasswordRequest

type CreateTemporaryPasswordRequest struct {
	// Persistent user password
	Password string `json:"password"`
	// Time during which the temporary password will be valid, in seconds; must be between 60 and 86400
	ValidFor int32 `json:"valid_for"`
}

type CreateVideoChatRequest added in v1.7.10

type CreateVideoChatRequest struct {
	// Identifier of a chat in which the video chat will be created
	ChatId int64 `json:"chat_id"`
	// Group call title; if empty, chat title will be used
	Title string `json:"title"`
	// Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future
	StartDate int32 `json:"start_date"`
	// Pass true to create an RTMP stream instead of an ordinary video chat; requires creator privileges
	IsRtmpStream bool `json:"is_rtmp_stream"`
}

type CustomRequestResult

type CustomRequestResult struct {

	// A JSON-serialized result
	Result string `json:"result"`
	// contains filtered or unexported fields
}

Contains the result of a custom request

func UnmarshalCustomRequestResult

func UnmarshalCustomRequestResult(data json.RawMessage) (*CustomRequestResult, error)

func (*CustomRequestResult) GetClass

func (*CustomRequestResult) GetClass() string

func (*CustomRequestResult) GetType

func (*CustomRequestResult) GetType() string

func (*CustomRequestResult) MarshalJSON

func (entity *CustomRequestResult) MarshalJSON() ([]byte, error)

type DatabaseStatistics

type DatabaseStatistics struct {

	// Database statistics in an unspecified human-readable format
	Statistics string `json:"statistics"`
	// contains filtered or unexported fields
}

Contains database statistics

func UnmarshalDatabaseStatistics

func UnmarshalDatabaseStatistics(data json.RawMessage) (*DatabaseStatistics, error)

func (*DatabaseStatistics) GetClass

func (*DatabaseStatistics) GetClass() string

func (*DatabaseStatistics) GetType

func (*DatabaseStatistics) GetType() string

func (*DatabaseStatistics) MarshalJSON

func (entity *DatabaseStatistics) MarshalJSON() ([]byte, error)

type Date

type Date struct {

	// Day of the month; 1-31
	Day int32 `json:"day"`
	// Month; 1-12
	Month int32 `json:"month"`
	// Year; 1-9999
	Year int32 `json:"year"`
	// contains filtered or unexported fields
}

Represents a date according to the Gregorian calendar

func UnmarshalDate

func UnmarshalDate(data json.RawMessage) (*Date, error)

func (*Date) GetClass

func (*Date) GetClass() string

func (*Date) GetType

func (*Date) GetType() string

func (*Date) MarshalJSON

func (entity *Date) MarshalJSON() ([]byte, error)

type DateRange

type DateRange struct {

	// Point in time (Unix timestamp) at which the date range begins
	StartDate int32 `json:"start_date"`
	// Point in time (Unix timestamp) at which the date range ends
	EndDate int32 `json:"end_date"`
	// contains filtered or unexported fields
}

Represents a date range

func UnmarshalDateRange

func UnmarshalDateRange(data json.RawMessage) (*DateRange, error)

func (*DateRange) GetClass

func (*DateRange) GetClass() string

func (*DateRange) GetType

func (*DateRange) GetType() string

func (*DateRange) MarshalJSON

func (entity *DateRange) MarshalJSON() ([]byte, error)

type DatedFile

type DatedFile struct {

	// The file
	File *File `json:"file"`
	// Point in time (Unix timestamp) when the file was uploaded
	Date int32 `json:"date"`
	// contains filtered or unexported fields
}

File with the date it was uploaded

func UnmarshalDatedFile

func UnmarshalDatedFile(data json.RawMessage) (*DatedFile, error)

func (*DatedFile) GetClass

func (*DatedFile) GetClass() string

func (*DatedFile) GetType

func (*DatedFile) GetType() string

func (*DatedFile) MarshalJSON

func (entity *DatedFile) MarshalJSON() ([]byte, error)

type DeepLinkInfo

type DeepLinkInfo struct {

	// Text to be shown to the user
	Text *FormattedText `json:"text"`
	// True, if the user must be asked to update the application
	NeedUpdateApplication bool `json:"need_update_application"`
	// contains filtered or unexported fields
}

Contains information about a tg: deep link

func UnmarshalDeepLinkInfo

func UnmarshalDeepLinkInfo(data json.RawMessage) (*DeepLinkInfo, error)

func (*DeepLinkInfo) GetClass

func (*DeepLinkInfo) GetClass() string

func (*DeepLinkInfo) GetType

func (*DeepLinkInfo) GetType() string

func (*DeepLinkInfo) MarshalJSON

func (entity *DeepLinkInfo) MarshalJSON() ([]byte, error)

type DeleteAccountRequest

type DeleteAccountRequest struct {
	// The reason why the account was deleted; optional
	Reason string `json:"reason"`
}

type DeleteAllCallMessagesRequest added in v1.7.10

type DeleteAllCallMessagesRequest struct {
	// Pass true to delete the messages for all users
	Revoke bool `json:"revoke"`
}

type DeleteAllRevokedChatInviteLinksRequest added in v1.7.10

type DeleteAllRevokedChatInviteLinksRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// User identifier of a chat administrator, which links will be deleted. Must be an identifier of the current user for non-owner
	CreatorUserId int64 `json:"creator_user_id"`
}

type DeleteChatFilterRequest

type DeleteChatFilterRequest struct {
	// Chat filter identifier
	ChatFilterId int32 `json:"chat_filter_id"`
}

type DeleteChatHistoryRequest

type DeleteChatHistoryRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Pass true to remove the chat from all chat lists
	RemoveFromChatList bool `json:"remove_from_chat_list"`
	// Pass true to delete chat history for all users
	Revoke bool `json:"revoke"`
}

type DeleteChatMessagesByDateRequest added in v1.7.10

type DeleteChatMessagesByDateRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The minimum date of the messages to delete
	MinDate int32 `json:"min_date"`
	// The maximum date of the messages to delete
	MaxDate int32 `json:"max_date"`
	// Pass true to delete chat messages for all users; private chats only
	Revoke bool `json:"revoke"`
}

type DeleteChatMessagesBySenderRequest added in v1.7.10

type DeleteChatMessagesBySenderRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the sender of messages to delete
	SenderId MessageSender `json:"sender_id"`
}

type DeleteChatReplyMarkupRequest

type DeleteChatReplyMarkupRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The message identifier of the used keyboard
	MessageId int64 `json:"message_id"`
}

type DeleteChatRequest added in v1.7.10

type DeleteChatRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type DeleteCommandsRequest added in v1.7.10

type DeleteCommandsRequest struct {
	// The scope to which the commands are relevant; pass null to delete commands in the default bot command scope
	Scope BotCommandScope `json:"scope"`
	// A two-letter ISO 639-1 language code or an empty string
	LanguageCode string `json:"language_code"`
}

type DeleteFileRequest

type DeleteFileRequest struct {
	// Identifier of the file to delete
	FileId int32 `json:"file_id"`
}

type DeleteLanguagePackRequest

type DeleteLanguagePackRequest struct {
	// Identifier of the language pack to delete
	LanguagePackId string `json:"language_pack_id"`
}

type DeleteMessagesRequest

type DeleteMessagesRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifiers of the messages to be deleted
	MessageIds []int64 `json:"message_ids"`
	// Pass true to delete messages for all chat members. Always true for supergroups, channels and secret chats
	Revoke bool `json:"revoke"`
}

type DeletePassportElementRequest

type DeletePassportElementRequest struct {
	// Element type
	Type PassportElementType `json:"type"`
}

type DeleteProfilePhotoRequest

type DeleteProfilePhotoRequest struct {
	// Identifier of the profile photo to delete
	ProfilePhotoId JsonInt64 `json:"profile_photo_id"`
}

type DeleteRevokedChatInviteLinkRequest added in v1.7.10

type DeleteRevokedChatInviteLinkRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Invite link to revoke
	InviteLink string `json:"invite_link"`
}

type DeviceToken

type DeviceToken interface {
	DeviceTokenType() string
}

Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, the correct application platform must be specified and a valid server authentication data must be uploaded at https://my.telegram.org

func UnmarshalDeviceToken

func UnmarshalDeviceToken(data json.RawMessage) (DeviceToken, error)

func UnmarshalListOfDeviceToken

func UnmarshalListOfDeviceToken(dataList []json.RawMessage) ([]DeviceToken, error)

type DeviceTokenApplePush

type DeviceTokenApplePush struct {

	// Device token; may be empty to deregister a device
	DeviceToken string `json:"device_token"`
	// True, if App Sandbox is enabled
	IsAppSandbox bool `json:"is_app_sandbox"`
	// contains filtered or unexported fields
}

A token for Apple Push Notification service

func UnmarshalDeviceTokenApplePush

func UnmarshalDeviceTokenApplePush(data json.RawMessage) (*DeviceTokenApplePush, error)

func (*DeviceTokenApplePush) DeviceTokenType

func (*DeviceTokenApplePush) DeviceTokenType() string

func (*DeviceTokenApplePush) GetClass

func (*DeviceTokenApplePush) GetClass() string

func (*DeviceTokenApplePush) GetType

func (*DeviceTokenApplePush) GetType() string

func (*DeviceTokenApplePush) MarshalJSON

func (entity *DeviceTokenApplePush) MarshalJSON() ([]byte, error)

type DeviceTokenApplePushVoIP

type DeviceTokenApplePushVoIP struct {

	// Device token; may be empty to deregister a device
	DeviceToken string `json:"device_token"`
	// True, if App Sandbox is enabled
	IsAppSandbox bool `json:"is_app_sandbox"`
	// True, if push notifications must be additionally encrypted
	Encrypt bool `json:"encrypt"`
	// contains filtered or unexported fields
}

A token for Apple Push Notification service VoIP notifications

func UnmarshalDeviceTokenApplePushVoIP

func UnmarshalDeviceTokenApplePushVoIP(data json.RawMessage) (*DeviceTokenApplePushVoIP, error)

func (*DeviceTokenApplePushVoIP) DeviceTokenType

func (*DeviceTokenApplePushVoIP) DeviceTokenType() string

func (*DeviceTokenApplePushVoIP) GetClass

func (*DeviceTokenApplePushVoIP) GetClass() string

func (*DeviceTokenApplePushVoIP) GetType

func (*DeviceTokenApplePushVoIP) GetType() string

func (*DeviceTokenApplePushVoIP) MarshalJSON

func (entity *DeviceTokenApplePushVoIP) MarshalJSON() ([]byte, error)

type DeviceTokenBlackBerryPush

type DeviceTokenBlackBerryPush struct {

	// Token; may be empty to deregister a device
	Token string `json:"token"`
	// contains filtered or unexported fields
}

A token for BlackBerry Push Service

func UnmarshalDeviceTokenBlackBerryPush

func UnmarshalDeviceTokenBlackBerryPush(data json.RawMessage) (*DeviceTokenBlackBerryPush, error)

func (*DeviceTokenBlackBerryPush) DeviceTokenType

func (*DeviceTokenBlackBerryPush) DeviceTokenType() string

func (*DeviceTokenBlackBerryPush) GetClass

func (*DeviceTokenBlackBerryPush) GetClass() string

func (*DeviceTokenBlackBerryPush) GetType

func (*DeviceTokenBlackBerryPush) GetType() string

func (*DeviceTokenBlackBerryPush) MarshalJSON

func (entity *DeviceTokenBlackBerryPush) MarshalJSON() ([]byte, error)

type DeviceTokenFirebaseCloudMessaging

type DeviceTokenFirebaseCloudMessaging struct {

	// Device registration token; may be empty to deregister a device
	Token string `json:"token"`
	// True, if push notifications must be additionally encrypted
	Encrypt bool `json:"encrypt"`
	// contains filtered or unexported fields
}

A token for Firebase Cloud Messaging

func UnmarshalDeviceTokenFirebaseCloudMessaging

func UnmarshalDeviceTokenFirebaseCloudMessaging(data json.RawMessage) (*DeviceTokenFirebaseCloudMessaging, error)

func (*DeviceTokenFirebaseCloudMessaging) DeviceTokenType

func (*DeviceTokenFirebaseCloudMessaging) DeviceTokenType() string

func (*DeviceTokenFirebaseCloudMessaging) GetClass

func (*DeviceTokenFirebaseCloudMessaging) GetType

func (*DeviceTokenFirebaseCloudMessaging) MarshalJSON

func (entity *DeviceTokenFirebaseCloudMessaging) MarshalJSON() ([]byte, error)

type DeviceTokenMicrosoftPush

type DeviceTokenMicrosoftPush struct {

	// Push notification channel URI; may be empty to deregister a device
	ChannelUri string `json:"channel_uri"`
	// contains filtered or unexported fields
}

A token for Microsoft Push Notification Service

func UnmarshalDeviceTokenMicrosoftPush

func UnmarshalDeviceTokenMicrosoftPush(data json.RawMessage) (*DeviceTokenMicrosoftPush, error)

func (*DeviceTokenMicrosoftPush) DeviceTokenType

func (*DeviceTokenMicrosoftPush) DeviceTokenType() string

func (*DeviceTokenMicrosoftPush) GetClass

func (*DeviceTokenMicrosoftPush) GetClass() string

func (*DeviceTokenMicrosoftPush) GetType

func (*DeviceTokenMicrosoftPush) GetType() string

func (*DeviceTokenMicrosoftPush) MarshalJSON

func (entity *DeviceTokenMicrosoftPush) MarshalJSON() ([]byte, error)

type DeviceTokenMicrosoftPushVoIP

type DeviceTokenMicrosoftPushVoIP struct {

	// Push notification channel URI; may be empty to deregister a device
	ChannelUri string `json:"channel_uri"`
	// contains filtered or unexported fields
}

A token for Microsoft Push Notification Service VoIP channel

func UnmarshalDeviceTokenMicrosoftPushVoIP

func UnmarshalDeviceTokenMicrosoftPushVoIP(data json.RawMessage) (*DeviceTokenMicrosoftPushVoIP, error)

func (*DeviceTokenMicrosoftPushVoIP) DeviceTokenType

func (*DeviceTokenMicrosoftPushVoIP) DeviceTokenType() string

func (*DeviceTokenMicrosoftPushVoIP) GetClass

func (*DeviceTokenMicrosoftPushVoIP) GetType

func (*DeviceTokenMicrosoftPushVoIP) MarshalJSON

func (entity *DeviceTokenMicrosoftPushVoIP) MarshalJSON() ([]byte, error)

type DeviceTokenSimplePush

type DeviceTokenSimplePush struct {

	// Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device
	Endpoint string `json:"endpoint"`
	// contains filtered or unexported fields
}

A token for Simple Push API for Firefox OS

func UnmarshalDeviceTokenSimplePush

func UnmarshalDeviceTokenSimplePush(data json.RawMessage) (*DeviceTokenSimplePush, error)

func (*DeviceTokenSimplePush) DeviceTokenType

func (*DeviceTokenSimplePush) DeviceTokenType() string

func (*DeviceTokenSimplePush) GetClass

func (*DeviceTokenSimplePush) GetClass() string

func (*DeviceTokenSimplePush) GetType

func (*DeviceTokenSimplePush) GetType() string

func (*DeviceTokenSimplePush) MarshalJSON

func (entity *DeviceTokenSimplePush) MarshalJSON() ([]byte, error)

type DeviceTokenTizenPush

type DeviceTokenTizenPush struct {

	// Push service registration identifier; may be empty to deregister a device
	RegId string `json:"reg_id"`
	// contains filtered or unexported fields
}

A token for Tizen Push Service

func UnmarshalDeviceTokenTizenPush

func UnmarshalDeviceTokenTizenPush(data json.RawMessage) (*DeviceTokenTizenPush, error)

func (*DeviceTokenTizenPush) DeviceTokenType

func (*DeviceTokenTizenPush) DeviceTokenType() string

func (*DeviceTokenTizenPush) GetClass

func (*DeviceTokenTizenPush) GetClass() string

func (*DeviceTokenTizenPush) GetType

func (*DeviceTokenTizenPush) GetType() string

func (*DeviceTokenTizenPush) MarshalJSON

func (entity *DeviceTokenTizenPush) MarshalJSON() ([]byte, error)

type DeviceTokenUbuntuPush

type DeviceTokenUbuntuPush struct {

	// Token; may be empty to deregister a device
	Token string `json:"token"`
	// contains filtered or unexported fields
}

A token for Ubuntu Push Client service

func UnmarshalDeviceTokenUbuntuPush

func UnmarshalDeviceTokenUbuntuPush(data json.RawMessage) (*DeviceTokenUbuntuPush, error)

func (*DeviceTokenUbuntuPush) DeviceTokenType

func (*DeviceTokenUbuntuPush) DeviceTokenType() string

func (*DeviceTokenUbuntuPush) GetClass

func (*DeviceTokenUbuntuPush) GetClass() string

func (*DeviceTokenUbuntuPush) GetType

func (*DeviceTokenUbuntuPush) GetType() string

func (*DeviceTokenUbuntuPush) MarshalJSON

func (entity *DeviceTokenUbuntuPush) MarshalJSON() ([]byte, error)

type DeviceTokenWebPush

type DeviceTokenWebPush struct {

	// Absolute URL exposed by the push service where the application server can send push messages; may be empty to deregister a device
	Endpoint string `json:"endpoint"`
	// Base64url-encoded P-256 elliptic curve Diffie-Hellman public key
	P256dhBase64url string `json:"p256dh_base64url"`
	// Base64url-encoded authentication secret
	AuthBase64url string `json:"auth_base64url"`
	// contains filtered or unexported fields
}

A token for web Push API

func UnmarshalDeviceTokenWebPush

func UnmarshalDeviceTokenWebPush(data json.RawMessage) (*DeviceTokenWebPush, error)

func (*DeviceTokenWebPush) DeviceTokenType

func (*DeviceTokenWebPush) DeviceTokenType() string

func (*DeviceTokenWebPush) GetClass

func (*DeviceTokenWebPush) GetClass() string

func (*DeviceTokenWebPush) GetType

func (*DeviceTokenWebPush) GetType() string

func (*DeviceTokenWebPush) MarshalJSON

func (entity *DeviceTokenWebPush) MarshalJSON() ([]byte, error)

type DeviceTokenWindowsPush

type DeviceTokenWindowsPush struct {

	// The access token that will be used to send notifications; may be empty to deregister a device
	AccessToken string `json:"access_token"`
	// contains filtered or unexported fields
}

A token for Windows Push Notification Services

func UnmarshalDeviceTokenWindowsPush

func UnmarshalDeviceTokenWindowsPush(data json.RawMessage) (*DeviceTokenWindowsPush, error)

func (*DeviceTokenWindowsPush) DeviceTokenType

func (*DeviceTokenWindowsPush) DeviceTokenType() string

func (*DeviceTokenWindowsPush) GetClass

func (*DeviceTokenWindowsPush) GetClass() string

func (*DeviceTokenWindowsPush) GetType

func (*DeviceTokenWindowsPush) GetType() string

func (*DeviceTokenWindowsPush) MarshalJSON

func (entity *DeviceTokenWindowsPush) MarshalJSON() ([]byte, error)

type DiceStickers

type DiceStickers interface {
	DiceStickersType() string
}

Contains animated stickers which must be used for dice animation rendering

func UnmarshalDiceStickers

func UnmarshalDiceStickers(data json.RawMessage) (DiceStickers, error)

func UnmarshalListOfDiceStickers

func UnmarshalListOfDiceStickers(dataList []json.RawMessage) ([]DiceStickers, error)

type DiceStickersRegular

type DiceStickersRegular struct {

	// The animated sticker with the dice animation
	Sticker *Sticker `json:"sticker"`
	// contains filtered or unexported fields
}

A regular animated sticker

func UnmarshalDiceStickersRegular

func UnmarshalDiceStickersRegular(data json.RawMessage) (*DiceStickersRegular, error)

func (*DiceStickersRegular) DiceStickersType

func (*DiceStickersRegular) DiceStickersType() string

func (*DiceStickersRegular) GetClass

func (*DiceStickersRegular) GetClass() string

func (*DiceStickersRegular) GetType

func (*DiceStickersRegular) GetType() string

func (*DiceStickersRegular) MarshalJSON

func (entity *DiceStickersRegular) MarshalJSON() ([]byte, error)

type DiceStickersSlotMachine

type DiceStickersSlotMachine struct {

	// The animated sticker with the slot machine background. The background animation must start playing after all reel animations finish
	Background *Sticker `json:"background"`
	// The animated sticker with the lever animation. The lever animation must play once in the initial dice state
	Lever *Sticker `json:"lever"`
	// The animated sticker with the left reel
	LeftReel *Sticker `json:"left_reel"`
	// The animated sticker with the center reel
	CenterReel *Sticker `json:"center_reel"`
	// The animated sticker with the right reel
	RightReel *Sticker `json:"right_reel"`
	// contains filtered or unexported fields
}

Animated stickers to be combined into a slot machine

func UnmarshalDiceStickersSlotMachine

func UnmarshalDiceStickersSlotMachine(data json.RawMessage) (*DiceStickersSlotMachine, error)

func (*DiceStickersSlotMachine) DiceStickersType

func (*DiceStickersSlotMachine) DiceStickersType() string

func (*DiceStickersSlotMachine) GetClass

func (*DiceStickersSlotMachine) GetClass() string

func (*DiceStickersSlotMachine) GetType

func (*DiceStickersSlotMachine) GetType() string

func (*DiceStickersSlotMachine) MarshalJSON

func (entity *DiceStickersSlotMachine) MarshalJSON() ([]byte, error)

type DiscardCallRequest

type DiscardCallRequest struct {
	// Call identifier
	CallId int32 `json:"call_id"`
	// Pass true if the user was disconnected
	IsDisconnected bool `json:"is_disconnected"`
	// The call duration, in seconds
	Duration int32 `json:"duration"`
	// Pass true if the call was a video call
	IsVideo bool `json:"is_video"`
	// Identifier of the connection used during the call
	ConnectionId JsonInt64 `json:"connection_id"`
}

type DisconnectWebsiteRequest

type DisconnectWebsiteRequest struct {
	// Website identifier
	WebsiteId JsonInt64 `json:"website_id"`
}

type Document

type Document struct {

	// Original name of the file; as defined by the sender
	FileName string `json:"file_name"`
	// MIME type of the file; as defined by the sender
	MimeType string `json:"mime_type"`
	// Document minithumbnail; may be null
	Minithumbnail *Minithumbnail `json:"minithumbnail"`
	// Document thumbnail in JPEG or PNG format (PNG will be used only for background patterns); as defined by the sender; may be null
	Thumbnail *Thumbnail `json:"thumbnail"`
	// File containing the document
	Document *File `json:"document"`
	// contains filtered or unexported fields
}

Describes a document of any type

func UnmarshalDocument

func UnmarshalDocument(data json.RawMessage) (*Document, error)

func (*Document) GetClass

func (*Document) GetClass() string

func (*Document) GetType

func (*Document) GetType() string

func (*Document) MarshalJSON

func (entity *Document) MarshalJSON() ([]byte, error)

type DownloadFileRequest

type DownloadFileRequest struct {
	// Identifier of the file to download
	FileId int32 `json:"file_id"`
	// Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first
	Priority int32 `json:"priority"`
	// The starting position from which the file needs to be downloaded
	Offset int32 `json:"offset"`
	// Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit
	Limit int32 `json:"limit"`
	// Pass true to return response only after the file download has succeeded, has failed, has been canceled, or a new downloadFile request with different offset/limit parameters was sent; pass false to return file state immediately, just after the download has been started
	Synchronous bool `json:"synchronous"`
}

type DownloadedFileCounts added in v1.8.3

type DownloadedFileCounts struct {

	// Number of active file downloads found, including paused
	ActiveCount int32 `json:"active_count"`
	// Number of paused file downloads found
	PausedCount int32 `json:"paused_count"`
	// Number of completed file downloads found
	CompletedCount int32 `json:"completed_count"`
	// contains filtered or unexported fields
}

Contains number of being downloaded and recently downloaded files found

func UnmarshalDownloadedFileCounts added in v1.8.3

func UnmarshalDownloadedFileCounts(data json.RawMessage) (*DownloadedFileCounts, error)

func (*DownloadedFileCounts) GetClass added in v1.8.3

func (*DownloadedFileCounts) GetClass() string

func (*DownloadedFileCounts) GetType added in v1.8.3

func (*DownloadedFileCounts) GetType() string

func (*DownloadedFileCounts) MarshalJSON added in v1.8.3

func (entity *DownloadedFileCounts) MarshalJSON() ([]byte, error)

type DraftMessage

type DraftMessage struct {

	// Identifier of the replied message; 0 if none
	ReplyToMessageId int64 `json:"reply_to_message_id"`
	// Point in time (Unix timestamp) when the draft was created
	Date int32 `json:"date"`
	// Content of the message draft; must be of the type inputMessageText
	InputMessageText InputMessageContent `json:"input_message_text"`
	// contains filtered or unexported fields
}

Contains information about a message draft

func UnmarshalDraftMessage

func UnmarshalDraftMessage(data json.RawMessage) (*DraftMessage, error)

func (*DraftMessage) GetClass

func (*DraftMessage) GetClass() string

func (*DraftMessage) GetType

func (*DraftMessage) GetType() string

func (*DraftMessage) MarshalJSON

func (entity *DraftMessage) MarshalJSON() ([]byte, error)

func (*DraftMessage) UnmarshalJSON

func (draftMessage *DraftMessage) UnmarshalJSON(data []byte) error

type EditChatFilterRequest

type EditChatFilterRequest struct {
	// Chat filter identifier
	ChatFilterId int32 `json:"chat_filter_id"`
	// The edited chat filter
	Filter *ChatFilter `json:"filter"`
}

type EditChatInviteLinkRequest added in v1.7.10

type EditChatInviteLinkRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Invite link to be edited
	InviteLink string `json:"invite_link"`
	// Invite link name; 0-32 characters
	Name string `json:"name"`
	// Point in time (Unix timestamp) when the link will expire; pass 0 if never
	ExpirationDate int32 `json:"expiration_date"`
	// The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited
	MemberLimit int32 `json:"member_limit"`
	// Pass true if users joining the chat via the link need to be approved by chat administrators. In this case, member_limit must be 0
	CreatesJoinRequest bool `json:"creates_join_request"`
}

type EditCustomLanguagePackInfoRequest

type EditCustomLanguagePackInfoRequest struct {
	// New information about the custom local language pack
	Info *LanguagePackInfo `json:"info"`
}

type EditInlineMessageCaptionRequest

type EditInlineMessageCaptionRequest struct {
	// Inline message identifier
	InlineMessageId string `json:"inline_message_id"`
	// The new message reply markup; pass null if none
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// New message content caption; pass null to remove caption; 0-GetOption("message_caption_length_max") characters
	Caption *FormattedText `json:"caption"`
}

type EditInlineMessageLiveLocationRequest

type EditInlineMessageLiveLocationRequest struct {
	// Inline message identifier
	InlineMessageId string `json:"inline_message_id"`
	// The new message reply markup; pass null if none
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// New location content of the message; pass null to stop sharing the live location
	Location *Location `json:"location"`
	// The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown
	Heading int32 `json:"heading"`
	// The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled
	ProximityAlertRadius int32 `json:"proximity_alert_radius"`
}

type EditInlineMessageMediaRequest

type EditInlineMessageMediaRequest struct {
	// Inline message identifier
	InlineMessageId string `json:"inline_message_id"`
	// The new message reply markup; pass null if none; for bots only
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo
	InputMessageContent InputMessageContent `json:"input_message_content"`
}

type EditInlineMessageReplyMarkupRequest

type EditInlineMessageReplyMarkupRequest struct {
	// Inline message identifier
	InlineMessageId string `json:"inline_message_id"`
	// The new message reply markup; pass null if none
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
}

type EditInlineMessageTextRequest

type EditInlineMessageTextRequest struct {
	// Inline message identifier
	InlineMessageId string `json:"inline_message_id"`
	// The new message reply markup; pass null if none
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// New text content of the message. Must be of type inputMessageText
	InputMessageContent InputMessageContent `json:"input_message_content"`
}

type EditMessageCaptionRequest

type EditMessageCaptionRequest struct {
	// The chat the message belongs to
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// The new message reply markup; pass null if none; for bots only
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// New message content caption; 0-GetOption("message_caption_length_max") characters; pass null to remove caption
	Caption *FormattedText `json:"caption"`
}

type EditMessageLiveLocationRequest

type EditMessageLiveLocationRequest struct {
	// The chat the message belongs to
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// The new message reply markup; pass null if none; for bots only
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// New location content of the message; pass null to stop sharing the live location
	Location *Location `json:"location"`
	// The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown
	Heading int32 `json:"heading"`
	// The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled
	ProximityAlertRadius int32 `json:"proximity_alert_radius"`
}

type EditMessageMediaRequest

type EditMessageMediaRequest struct {
	// The chat the message belongs to
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// The new message reply markup; pass null if none; for bots only
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo
	InputMessageContent InputMessageContent `json:"input_message_content"`
}

type EditMessageReplyMarkupRequest

type EditMessageReplyMarkupRequest struct {
	// The chat the message belongs to
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// The new message reply markup; pass null if none
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
}

type EditMessageSchedulingStateRequest

type EditMessageSchedulingStateRequest struct {
	// The chat the message belongs to
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// The new message scheduling state; pass null to send the message immediately
	SchedulingState MessageSchedulingState `json:"scheduling_state"`
}

type EditMessageTextRequest

type EditMessageTextRequest struct {
	// The chat the message belongs to
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// The new message reply markup; pass null if none; for bots only
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// New text content of the message. Must be of type inputMessageText
	InputMessageContent InputMessageContent `json:"input_message_content"`
}

type EditProxyRequest

type EditProxyRequest struct {
	// Proxy identifier
	ProxyId int32 `json:"proxy_id"`
	// Proxy server IP address
	Server string `json:"server"`
	// Proxy server port
	Port int32 `json:"port"`
	// Pass true to immediately enable the proxy
	Enable bool `json:"enable"`
	// Proxy type
	Type ProxyType `json:"type"`
}

type EmailAddressAuthenticationCodeInfo

type EmailAddressAuthenticationCodeInfo struct {

	// Pattern of the email address to which an authentication code was sent
	EmailAddressPattern string `json:"email_address_pattern"`
	// Length of the code; 0 if unknown
	Length int32 `json:"length"`
	// contains filtered or unexported fields
}

Information about the email address authentication code that was sent

func UnmarshalEmailAddressAuthenticationCodeInfo

func UnmarshalEmailAddressAuthenticationCodeInfo(data json.RawMessage) (*EmailAddressAuthenticationCodeInfo, error)

func (*EmailAddressAuthenticationCodeInfo) GetClass

func (*EmailAddressAuthenticationCodeInfo) GetType

func (*EmailAddressAuthenticationCodeInfo) MarshalJSON

func (entity *EmailAddressAuthenticationCodeInfo) MarshalJSON() ([]byte, error)

type Emojis

type Emojis struct {

	// List of emojis
	Emojis []string `json:"emojis"`
	// contains filtered or unexported fields
}

Represents a list of emoji

func UnmarshalEmojis

func UnmarshalEmojis(data json.RawMessage) (*Emojis, error)

func (*Emojis) GetClass

func (*Emojis) GetClass() string

func (*Emojis) GetType

func (*Emojis) GetType() string

func (*Emojis) MarshalJSON

func (entity *Emojis) MarshalJSON() ([]byte, error)

type EnableProxyRequest

type EnableProxyRequest struct {
	// Proxy identifier
	ProxyId int32 `json:"proxy_id"`
}

type EncryptedCredentials

type EncryptedCredentials struct {

	// The encrypted credentials
	Data []byte `json:"data"`
	// The decrypted data hash
	Hash []byte `json:"hash"`
	// Secret for data decryption, encrypted with the service's public key
	Secret []byte `json:"secret"`
	// contains filtered or unexported fields
}

Contains encrypted Telegram Passport data credentials

func UnmarshalEncryptedCredentials

func UnmarshalEncryptedCredentials(data json.RawMessage) (*EncryptedCredentials, error)

func (*EncryptedCredentials) GetClass

func (*EncryptedCredentials) GetClass() string

func (*EncryptedCredentials) GetType

func (*EncryptedCredentials) GetType() string

func (*EncryptedCredentials) MarshalJSON

func (entity *EncryptedCredentials) MarshalJSON() ([]byte, error)

type EncryptedPassportElement

type EncryptedPassportElement struct {

	// Type of Telegram Passport element
	Type PassportElementType `json:"type"`
	// Encrypted JSON-encoded data about the user
	Data []byte `json:"data"`
	// The front side of an identity document
	FrontSide *DatedFile `json:"front_side"`
	// The reverse side of an identity document; may be null
	ReverseSide *DatedFile `json:"reverse_side"`
	// Selfie with the document; may be null
	Selfie *DatedFile `json:"selfie"`
	// List of files containing a certified English translation of the document
	Translation []*DatedFile `json:"translation"`
	// List of attached files
	Files []*DatedFile `json:"files"`
	// Unencrypted data, phone number or email address
	Value string `json:"value"`
	// Hash of the entire element
	Hash string `json:"hash"`
	// contains filtered or unexported fields
}

Contains information about an encrypted Telegram Passport element; for bots only

func UnmarshalEncryptedPassportElement

func UnmarshalEncryptedPassportElement(data json.RawMessage) (*EncryptedPassportElement, error)

func (*EncryptedPassportElement) GetClass

func (*EncryptedPassportElement) GetClass() string

func (*EncryptedPassportElement) GetType

func (*EncryptedPassportElement) GetType() string

func (*EncryptedPassportElement) MarshalJSON

func (entity *EncryptedPassportElement) MarshalJSON() ([]byte, error)

func (*EncryptedPassportElement) UnmarshalJSON

func (encryptedPassportElement *EncryptedPassportElement) UnmarshalJSON(data []byte) error

type EndGroupCallRecordingRequest added in v1.7.10

type EndGroupCallRecordingRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
}

type EndGroupCallRequest added in v1.8.3

type EndGroupCallRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
}

type EndGroupCallScreenSharingRequest added in v1.7.10

type EndGroupCallScreenSharingRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
}

type Error

type Error struct {

	// Error code; subject to future changes. If the error code is 406, the error message must not be processed in any way and must not be displayed to the user
	Code int32 `json:"code"`
	// Error message; subject to future changes
	Message string `json:"message"`
	// contains filtered or unexported fields
}

An object of this type can be returned on every function call, in case of an error

func UnmarshalError

func UnmarshalError(data json.RawMessage) (*Error, error)

func (*Error) GetClass

func (*Error) GetClass() string

func (*Error) GetType

func (*Error) GetType() string

func (*Error) MarshalJSON

func (entity *Error) MarshalJSON() ([]byte, error)

type ExtraGenerator

type ExtraGenerator func() string

func UuidV4Generator

func UuidV4Generator() ExtraGenerator

type File

type File struct {

	// Unique file identifier
	Id int32 `json:"id"`
	// File size, in bytes; 0 if unknown
	Size int32 `json:"size"`
	// Approximate file size in bytes in case the exact file size is unknown. Can be used to show download/upload progress
	ExpectedSize int32 `json:"expected_size"`
	// Information about the local copy of the file
	Local *LocalFile `json:"local"`
	// Information about the remote copy of the file
	Remote *RemoteFile `json:"remote"`
	// contains filtered or unexported fields
}

Represents a file

func UnmarshalFile

func UnmarshalFile(data json.RawMessage) (*File, error)

func (*File) GetClass

func (*File) GetClass() string

func (*File) GetType

func (*File) GetType() string

func (*File) MarshalJSON

func (entity *File) MarshalJSON() ([]byte, error)

type FileDownload added in v1.8.3

type FileDownload struct {

	// File identifier
	FileId int32 `json:"file_id"`
	// The message with the file
	Message *Message `json:"message"`
	// Point in time (Unix timestamp) when the file was added to the download list
	AddDate int32 `json:"add_date"`
	// Point in time (Unix timestamp) when the file downloading was completed; 0 if the file downloading isn't completed
	CompleteDate int32 `json:"complete_date"`
	// True, if downloading of the file is paused
	IsPaused bool `json:"is_paused"`
	// contains filtered or unexported fields
}

Describes a file added to file download list

func UnmarshalFileDownload added in v1.8.3

func UnmarshalFileDownload(data json.RawMessage) (*FileDownload, error)

func (*FileDownload) GetClass added in v1.8.3

func (*FileDownload) GetClass() string

func (*FileDownload) GetType added in v1.8.3

func (*FileDownload) GetType() string

func (*FileDownload) MarshalJSON added in v1.8.3

func (entity *FileDownload) MarshalJSON() ([]byte, error)

type FilePart

type FilePart struct {

	// File bytes
	Data []byte `json:"data"`
	// contains filtered or unexported fields
}

Contains a part of a file

func UnmarshalFilePart

func UnmarshalFilePart(data json.RawMessage) (*FilePart, error)

func (*FilePart) GetClass

func (*FilePart) GetClass() string

func (*FilePart) GetType

func (*FilePart) GetType() string

func (*FilePart) MarshalJSON

func (entity *FilePart) MarshalJSON() ([]byte, error)

type FileType

type FileType interface {
	FileTypeType() string
}

Represents the type of a file

func UnmarshalFileType

func UnmarshalFileType(data json.RawMessage) (FileType, error)

func UnmarshalListOfFileType

func UnmarshalListOfFileType(dataList []json.RawMessage) ([]FileType, error)

type FileTypeAnimation

type FileTypeAnimation struct {
	// contains filtered or unexported fields
}

The file is an animation

func UnmarshalFileTypeAnimation

func UnmarshalFileTypeAnimation(data json.RawMessage) (*FileTypeAnimation, error)

func (*FileTypeAnimation) FileTypeType

func (*FileTypeAnimation) FileTypeType() string

func (*FileTypeAnimation) GetClass

func (*FileTypeAnimation) GetClass() string

func (*FileTypeAnimation) GetType

func (*FileTypeAnimation) GetType() string

func (*FileTypeAnimation) MarshalJSON

func (entity *FileTypeAnimation) MarshalJSON() ([]byte, error)

type FileTypeAudio

type FileTypeAudio struct {
	// contains filtered or unexported fields
}

The file is an audio file

func UnmarshalFileTypeAudio

func UnmarshalFileTypeAudio(data json.RawMessage) (*FileTypeAudio, error)

func (*FileTypeAudio) FileTypeType

func (*FileTypeAudio) FileTypeType() string

func (*FileTypeAudio) GetClass

func (*FileTypeAudio) GetClass() string

func (*FileTypeAudio) GetType

func (*FileTypeAudio) GetType() string

func (*FileTypeAudio) MarshalJSON

func (entity *FileTypeAudio) MarshalJSON() ([]byte, error)

type FileTypeDocument

type FileTypeDocument struct {
	// contains filtered or unexported fields
}

The file is a document

func UnmarshalFileTypeDocument

func UnmarshalFileTypeDocument(data json.RawMessage) (*FileTypeDocument, error)

func (*FileTypeDocument) FileTypeType

func (*FileTypeDocument) FileTypeType() string

func (*FileTypeDocument) GetClass

func (*FileTypeDocument) GetClass() string

func (*FileTypeDocument) GetType

func (*FileTypeDocument) GetType() string

func (*FileTypeDocument) MarshalJSON

func (entity *FileTypeDocument) MarshalJSON() ([]byte, error)

type FileTypeNone

type FileTypeNone struct {
	// contains filtered or unexported fields
}

The data is not a file

func UnmarshalFileTypeNone

func UnmarshalFileTypeNone(data json.RawMessage) (*FileTypeNone, error)

func (*FileTypeNone) FileTypeType

func (*FileTypeNone) FileTypeType() string

func (*FileTypeNone) GetClass

func (*FileTypeNone) GetClass() string

func (*FileTypeNone) GetType

func (*FileTypeNone) GetType() string

func (*FileTypeNone) MarshalJSON

func (entity *FileTypeNone) MarshalJSON() ([]byte, error)

type FileTypeNotificationSound added in v1.8.3

type FileTypeNotificationSound struct {
	// contains filtered or unexported fields
}

The file is a notification sound

func UnmarshalFileTypeNotificationSound added in v1.8.3

func UnmarshalFileTypeNotificationSound(data json.RawMessage) (*FileTypeNotificationSound, error)

func (*FileTypeNotificationSound) FileTypeType added in v1.8.3

func (*FileTypeNotificationSound) FileTypeType() string

func (*FileTypeNotificationSound) GetClass added in v1.8.3

func (*FileTypeNotificationSound) GetClass() string

func (*FileTypeNotificationSound) GetType added in v1.8.3

func (*FileTypeNotificationSound) GetType() string

func (*FileTypeNotificationSound) MarshalJSON added in v1.8.3

func (entity *FileTypeNotificationSound) MarshalJSON() ([]byte, error)

type FileTypePhoto

type FileTypePhoto struct {
	// contains filtered or unexported fields
}

The file is a photo

func UnmarshalFileTypePhoto

func UnmarshalFileTypePhoto(data json.RawMessage) (*FileTypePhoto, error)

func (*FileTypePhoto) FileTypeType

func (*FileTypePhoto) FileTypeType() string

func (*FileTypePhoto) GetClass

func (*FileTypePhoto) GetClass() string

func (*FileTypePhoto) GetType

func (*FileTypePhoto) GetType() string

func (*FileTypePhoto) MarshalJSON

func (entity *FileTypePhoto) MarshalJSON() ([]byte, error)

type FileTypeProfilePhoto

type FileTypeProfilePhoto struct {
	// contains filtered or unexported fields
}

The file is a profile photo

func UnmarshalFileTypeProfilePhoto

func UnmarshalFileTypeProfilePhoto(data json.RawMessage) (*FileTypeProfilePhoto, error)

func (*FileTypeProfilePhoto) FileTypeType

func (*FileTypeProfilePhoto) FileTypeType() string

func (*FileTypeProfilePhoto) GetClass

func (*FileTypeProfilePhoto) GetClass() string

func (*FileTypeProfilePhoto) GetType

func (*FileTypeProfilePhoto) GetType() string

func (*FileTypeProfilePhoto) MarshalJSON

func (entity *FileTypeProfilePhoto) MarshalJSON() ([]byte, error)

type FileTypeSecret

type FileTypeSecret struct {
	// contains filtered or unexported fields
}

The file was sent to a secret chat (the file type is not known to the server)

func UnmarshalFileTypeSecret

func UnmarshalFileTypeSecret(data json.RawMessage) (*FileTypeSecret, error)

func (*FileTypeSecret) FileTypeType

func (*FileTypeSecret) FileTypeType() string

func (*FileTypeSecret) GetClass

func (*FileTypeSecret) GetClass() string

func (*FileTypeSecret) GetType

func (*FileTypeSecret) GetType() string

func (*FileTypeSecret) MarshalJSON

func (entity *FileTypeSecret) MarshalJSON() ([]byte, error)

type FileTypeSecretThumbnail

type FileTypeSecretThumbnail struct {
	// contains filtered or unexported fields
}

The file is a thumbnail of a file from a secret chat

func UnmarshalFileTypeSecretThumbnail

func UnmarshalFileTypeSecretThumbnail(data json.RawMessage) (*FileTypeSecretThumbnail, error)

func (*FileTypeSecretThumbnail) FileTypeType

func (*FileTypeSecretThumbnail) FileTypeType() string

func (*FileTypeSecretThumbnail) GetClass

func (*FileTypeSecretThumbnail) GetClass() string

func (*FileTypeSecretThumbnail) GetType

func (*FileTypeSecretThumbnail) GetType() string

func (*FileTypeSecretThumbnail) MarshalJSON

func (entity *FileTypeSecretThumbnail) MarshalJSON() ([]byte, error)

type FileTypeSecure

type FileTypeSecure struct {
	// contains filtered or unexported fields
}

The file is a file from Secure storage used for storing Telegram Passport files

func UnmarshalFileTypeSecure

func UnmarshalFileTypeSecure(data json.RawMessage) (*FileTypeSecure, error)

func (*FileTypeSecure) FileTypeType

func (*FileTypeSecure) FileTypeType() string

func (*FileTypeSecure) GetClass

func (*FileTypeSecure) GetClass() string

func (*FileTypeSecure) GetType

func (*FileTypeSecure) GetType() string

func (*FileTypeSecure) MarshalJSON

func (entity *FileTypeSecure) MarshalJSON() ([]byte, error)

type FileTypeSticker

type FileTypeSticker struct {
	// contains filtered or unexported fields
}

The file is a sticker

func UnmarshalFileTypeSticker

func UnmarshalFileTypeSticker(data json.RawMessage) (*FileTypeSticker, error)

func (*FileTypeSticker) FileTypeType

func (*FileTypeSticker) FileTypeType() string

func (*FileTypeSticker) GetClass

func (*FileTypeSticker) GetClass() string

func (*FileTypeSticker) GetType

func (*FileTypeSticker) GetType() string

func (*FileTypeSticker) MarshalJSON

func (entity *FileTypeSticker) MarshalJSON() ([]byte, error)

type FileTypeThumbnail

type FileTypeThumbnail struct {
	// contains filtered or unexported fields
}

The file is a thumbnail of another file

func UnmarshalFileTypeThumbnail

func UnmarshalFileTypeThumbnail(data json.RawMessage) (*FileTypeThumbnail, error)

func (*FileTypeThumbnail) FileTypeType

func (*FileTypeThumbnail) FileTypeType() string

func (*FileTypeThumbnail) GetClass

func (*FileTypeThumbnail) GetClass() string

func (*FileTypeThumbnail) GetType

func (*FileTypeThumbnail) GetType() string

func (*FileTypeThumbnail) MarshalJSON

func (entity *FileTypeThumbnail) MarshalJSON() ([]byte, error)

type FileTypeUnknown

type FileTypeUnknown struct {
	// contains filtered or unexported fields
}

The file type is not yet known

func UnmarshalFileTypeUnknown

func UnmarshalFileTypeUnknown(data json.RawMessage) (*FileTypeUnknown, error)

func (*FileTypeUnknown) FileTypeType

func (*FileTypeUnknown) FileTypeType() string

func (*FileTypeUnknown) GetClass

func (*FileTypeUnknown) GetClass() string

func (*FileTypeUnknown) GetType

func (*FileTypeUnknown) GetType() string

func (*FileTypeUnknown) MarshalJSON

func (entity *FileTypeUnknown) MarshalJSON() ([]byte, error)

type FileTypeVideo

type FileTypeVideo struct {
	// contains filtered or unexported fields
}

The file is a video

func UnmarshalFileTypeVideo

func UnmarshalFileTypeVideo(data json.RawMessage) (*FileTypeVideo, error)

func (*FileTypeVideo) FileTypeType

func (*FileTypeVideo) FileTypeType() string

func (*FileTypeVideo) GetClass

func (*FileTypeVideo) GetClass() string

func (*FileTypeVideo) GetType

func (*FileTypeVideo) GetType() string

func (*FileTypeVideo) MarshalJSON

func (entity *FileTypeVideo) MarshalJSON() ([]byte, error)

type FileTypeVideoNote

type FileTypeVideoNote struct {
	// contains filtered or unexported fields
}

The file is a video note

func UnmarshalFileTypeVideoNote

func UnmarshalFileTypeVideoNote(data json.RawMessage) (*FileTypeVideoNote, error)

func (*FileTypeVideoNote) FileTypeType

func (*FileTypeVideoNote) FileTypeType() string

func (*FileTypeVideoNote) GetClass

func (*FileTypeVideoNote) GetClass() string

func (*FileTypeVideoNote) GetType

func (*FileTypeVideoNote) GetType() string

func (*FileTypeVideoNote) MarshalJSON

func (entity *FileTypeVideoNote) MarshalJSON() ([]byte, error)

type FileTypeVoiceNote

type FileTypeVoiceNote struct {
	// contains filtered or unexported fields
}

The file is a voice note

func UnmarshalFileTypeVoiceNote

func UnmarshalFileTypeVoiceNote(data json.RawMessage) (*FileTypeVoiceNote, error)

func (*FileTypeVoiceNote) FileTypeType

func (*FileTypeVoiceNote) FileTypeType() string

func (*FileTypeVoiceNote) GetClass

func (*FileTypeVoiceNote) GetClass() string

func (*FileTypeVoiceNote) GetType

func (*FileTypeVoiceNote) GetType() string

func (*FileTypeVoiceNote) MarshalJSON

func (entity *FileTypeVoiceNote) MarshalJSON() ([]byte, error)

type FileTypeWallpaper

type FileTypeWallpaper struct {
	// contains filtered or unexported fields
}

The file is a wallpaper or a background pattern

func UnmarshalFileTypeWallpaper

func UnmarshalFileTypeWallpaper(data json.RawMessage) (*FileTypeWallpaper, error)

func (*FileTypeWallpaper) FileTypeType

func (*FileTypeWallpaper) FileTypeType() string

func (*FileTypeWallpaper) GetClass

func (*FileTypeWallpaper) GetClass() string

func (*FileTypeWallpaper) GetType

func (*FileTypeWallpaper) GetType() string

func (*FileTypeWallpaper) MarshalJSON

func (entity *FileTypeWallpaper) MarshalJSON() ([]byte, error)

type FinishFileGenerationRequest

type FinishFileGenerationRequest struct {
	// The identifier of the generation process
	GenerationId JsonInt64 `json:"generation_id"`
	// If passed, the file generation has failed and must be terminated; pass null if the file generation succeeded
	Error *Error `json:"error"`
}

type FormattedText

type FormattedText struct {

	// The text
	Text string `json:"text"`
	// Entities contained in the text. Entities can be nested, but must not mutually intersect with each other. Pre, Code and PreCode entities can't contain other entities. Bold, Italic, Underline, Strikethrough, and Spoiler entities can contain and to be contained in all other entities. All other entities can't contain each other
	Entities []*TextEntity `json:"entities"`
	// contains filtered or unexported fields
}

A text with some entities

func UnmarshalFormattedText

func UnmarshalFormattedText(data json.RawMessage) (*FormattedText, error)

func (*FormattedText) GetClass

func (*FormattedText) GetClass() string

func (*FormattedText) GetType

func (*FormattedText) GetType() string

func (*FormattedText) MarshalJSON

func (entity *FormattedText) MarshalJSON() ([]byte, error)

type ForwardMessagesRequest

type ForwardMessagesRequest struct {
	// Identifier of the chat to which to forward messages
	ChatId int64 `json:"chat_id"`
	// Identifier of the chat from which to forward messages
	FromChatId int64 `json:"from_chat_id"`
	// Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously
	MessageIds []int64 `json:"message_ids"`
	// Options to be used to send the messages; pass null to use default options
	Options *MessageSendOptions `json:"options"`
	// Pass true to copy content of the messages without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local
	SendCopy bool `json:"send_copy"`
	// Pass true to remove media captions of message copies. Ignored if send_copy is false
	RemoveCaption bool `json:"remove_caption"`
	// Pass true to get fake messages instead of actually forwarding them
	OnlyPreview bool `json:"only_preview"`
}

type FoundFileDownloads added in v1.8.3

type FoundFileDownloads struct {

	// Total number of suitable files, ignoring offset
	TotalCounts *DownloadedFileCounts `json:"total_counts"`
	// The list of files
	Files []*FileDownload `json:"files"`
	// The offset for the next request. If empty, there are no more results
	NextOffset string `json:"next_offset"`
	// contains filtered or unexported fields
}

Contains a list of downloaded files, found by a search

func UnmarshalFoundFileDownloads added in v1.8.3

func UnmarshalFoundFileDownloads(data json.RawMessage) (*FoundFileDownloads, error)

func (*FoundFileDownloads) GetClass added in v1.8.3

func (*FoundFileDownloads) GetClass() string

func (*FoundFileDownloads) GetType added in v1.8.3

func (*FoundFileDownloads) GetType() string

func (*FoundFileDownloads) MarshalJSON added in v1.8.3

func (entity *FoundFileDownloads) MarshalJSON() ([]byte, error)

type FoundMessages

type FoundMessages struct {

	// Approximate total number of messages found; -1 if unknown
	TotalCount int32 `json:"total_count"`
	// List of messages
	Messages []*Message `json:"messages"`
	// The offset for the next request. If empty, there are no more results
	NextOffset string `json:"next_offset"`
	// contains filtered or unexported fields
}

Contains a list of messages found by a search

func UnmarshalFoundMessages

func UnmarshalFoundMessages(data json.RawMessage) (*FoundMessages, error)

func (*FoundMessages) GetClass

func (*FoundMessages) GetClass() string

func (*FoundMessages) GetType

func (*FoundMessages) GetType() string

func (*FoundMessages) MarshalJSON

func (entity *FoundMessages) MarshalJSON() ([]byte, error)

type Game

type Game struct {

	// Game ID
	Id JsonInt64 `json:"id"`
	// Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name}
	ShortName string `json:"short_name"`
	// Game title
	Title string `json:"title"`
	// Game text, usually containing scoreboards for a game
	Text *FormattedText `json:"text"`
	// Game description
	Description string `json:"description"`
	// Game photo
	Photo *Photo `json:"photo"`
	// Game animation; may be null
	Animation *Animation `json:"animation"`
	// contains filtered or unexported fields
}

Describes a game

func UnmarshalGame

func UnmarshalGame(data json.RawMessage) (*Game, error)

func (*Game) GetClass

func (*Game) GetClass() string

func (*Game) GetType

func (*Game) GetType() string

func (*Game) MarshalJSON

func (entity *Game) MarshalJSON() ([]byte, error)

type GameHighScore

type GameHighScore struct {

	// Position in the high score table
	Position int32 `json:"position"`
	// User identifier
	UserId int64 `json:"user_id"`
	// User score
	Score int32 `json:"score"`
	// contains filtered or unexported fields
}

Contains one row of the game high score table

func UnmarshalGameHighScore

func UnmarshalGameHighScore(data json.RawMessage) (*GameHighScore, error)

func (*GameHighScore) GetClass

func (*GameHighScore) GetClass() string

func (*GameHighScore) GetType

func (*GameHighScore) GetType() string

func (*GameHighScore) MarshalJSON

func (entity *GameHighScore) MarshalJSON() ([]byte, error)

type GameHighScores

type GameHighScores struct {

	// A list of game high scores
	Scores []*GameHighScore `json:"scores"`
	// contains filtered or unexported fields
}

Contains a list of game high scores

func UnmarshalGameHighScores

func UnmarshalGameHighScores(data json.RawMessage) (*GameHighScores, error)

func (*GameHighScores) GetClass

func (*GameHighScores) GetClass() string

func (*GameHighScores) GetType

func (*GameHighScores) GetType() string

func (*GameHighScores) MarshalJSON

func (entity *GameHighScores) MarshalJSON() ([]byte, error)

type GetAllPassportElementsRequest

type GetAllPassportElementsRequest struct {
	// Password of the current user
	Password string `json:"password"`
}

type GetAnimatedEmojiRequest added in v1.7.10

type GetAnimatedEmojiRequest struct {
	// The emoji
	Emoji string `json:"emoji"`
}

type GetArchivedStickerSetsRequest

type GetArchivedStickerSetsRequest struct {
	// Pass true to return mask stickers sets; pass false to return ordinary sticker sets
	IsMasks bool `json:"is_masks"`
	// Identifier of the sticker set from which to return the result
	OffsetStickerSetId JsonInt64 `json:"offset_sticker_set_id"`
	// The maximum number of sticker sets to return; up to 100
	Limit int32 `json:"limit"`
}

type GetAttachedStickerSetsRequest

type GetAttachedStickerSetsRequest struct {
	// File identifier
	FileId int32 `json:"file_id"`
}

type GetAttachmentMenuBotRequest added in v1.8.3

type GetAttachmentMenuBotRequest struct {
	// Bot's user identifier
	BotUserId int64 `json:"bot_user_id"`
}

type GetBackgroundUrlRequest

type GetBackgroundUrlRequest struct {
	// Background name
	Name string `json:"name"`
	// Background type
	Type BackgroundType `json:"type"`
}

type GetBackgroundsRequest

type GetBackgroundsRequest struct {
	// Pass true to order returned backgrounds for a dark theme
	ForDarkTheme bool `json:"for_dark_theme"`
}

type GetBankCardInfoRequest

type GetBankCardInfoRequest struct {
	// The bank card number
	BankCardNumber string `json:"bank_card_number"`
}

type GetBasicGroupFullInfoRequest

type GetBasicGroupFullInfoRequest struct {
	// Basic group identifier
	BasicGroupId int64 `json:"basic_group_id"`
}

type GetBasicGroupRequest

type GetBasicGroupRequest struct {
	// Basic group identifier
	BasicGroupId int64 `json:"basic_group_id"`
}

type GetBlockedMessageSendersRequest

type GetBlockedMessageSendersRequest struct {
	// Number of users and chats to skip in the result; must be non-negative
	Offset int32 `json:"offset"`
	// The maximum number of users and chats to return; up to 100
	Limit int32 `json:"limit"`
}

type GetCallbackQueryAnswerRequest

type GetCallbackQueryAnswerRequest struct {
	// Identifier of the chat with the message
	ChatId int64 `json:"chat_id"`
	// Identifier of the message from which the query originated
	MessageId int64 `json:"message_id"`
	// Query payload
	Payload CallbackQueryPayload `json:"payload"`
}

type GetCallbackQueryMessageRequest

type GetCallbackQueryMessageRequest struct {
	// Identifier of the chat the message belongs to
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// Identifier of the callback query
	CallbackQueryId JsonInt64 `json:"callback_query_id"`
}

type GetChatAdministratorsRequest

type GetChatAdministratorsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type GetChatAvailableMessageSendersRequest added in v1.7.10

type GetChatAvailableMessageSendersRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type GetChatEventLogRequest

type GetChatEventLogRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Search query by which to filter events
	Query string `json:"query"`
	// Identifier of an event from which to return results. Use 0 to get results from the latest events
	FromEventId JsonInt64 `json:"from_event_id"`
	// The maximum number of events to return; up to 100
	Limit int32 `json:"limit"`
	// The types of events to return; pass null to get chat events of all types
	Filters *ChatEventLogFilters `json:"filters"`
	// User identifiers by which to filter events. By default, events relating to all users will be returned
	UserIds []int64 `json:"user_ids"`
}

type GetChatFilterDefaultIconNameRequest

type GetChatFilterDefaultIconNameRequest struct {
	// Chat filter
	Filter *ChatFilter `json:"filter"`
}

type GetChatFilterRequest

type GetChatFilterRequest struct {
	// Chat filter identifier
	ChatFilterId int32 `json:"chat_filter_id"`
}

type GetChatHistoryRequest

type GetChatHistoryRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the message starting from which history must be fetched; use 0 to get results from the last message
	FromMessageId int64 `json:"from_message_id"`
	// Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally some newer messages
	Offset int32 `json:"offset"`
	// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
	Limit int32 `json:"limit"`
	// Pass true to get only messages that are available without sending network requests
	OnlyLocal bool `json:"only_local"`
}

type GetChatInviteLinkCountsRequest added in v1.7.10

type GetChatInviteLinkCountsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type GetChatInviteLinkMembersRequest added in v1.7.10

type GetChatInviteLinkMembersRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Invite link for which to return chat members
	InviteLink string `json:"invite_link"`
	// A chat member from which to return next chat members; pass null to get results from the beginning
	OffsetMember *ChatInviteLinkMember `json:"offset_member"`
	// The maximum number of chat members to return; up to 100
	Limit int32 `json:"limit"`
}

type GetChatInviteLinkRequest added in v1.7.10

type GetChatInviteLinkRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Invite link to get
	InviteLink string `json:"invite_link"`
}

type GetChatInviteLinksRequest added in v1.7.10

type GetChatInviteLinksRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// User identifier of a chat administrator. Must be an identifier of the current user for non-owner
	CreatorUserId int64 `json:"creator_user_id"`
	// Pass true if revoked links needs to be returned instead of active or expired
	IsRevoked bool `json:"is_revoked"`
	// Creation date of an invite link starting after which to return invite links; use 0 to get results from the beginning
	OffsetDate int32 `json:"offset_date"`
	// Invite link starting after which to return invite links; use empty string to get results from the beginning
	OffsetInviteLink string `json:"offset_invite_link"`
	// The maximum number of invite links to return; up to 100
	Limit int32 `json:"limit"`
}

type GetChatJoinRequestsRequest added in v1.7.10

type GetChatJoinRequestsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Invite link for which to return join requests. If empty, all join requests will be returned. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
	InviteLink string `json:"invite_link"`
	// A query to search for in the first names, last names and usernames of the users to return
	Query string `json:"query"`
	// A chat join request from which to return next requests; pass null to get results from the beginning
	OffsetRequest *ChatJoinRequest `json:"offset_request"`
	// The maximum number of requests to join the chat to return
	Limit int32 `json:"limit"`
}

type GetChatListsToAddChatRequest

type GetChatListsToAddChatRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type GetChatMemberRequest

type GetChatMemberRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Member identifier
	MemberId MessageSender `json:"member_id"`
}

type GetChatMessageByDateRequest

type GetChatMessageByDateRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Point in time (Unix timestamp) relative to which to search for messages
	Date int32 `json:"date"`
}

type GetChatMessageCalendarRequest added in v1.7.10

type GetChatMessageCalendarRequest struct {
	// Identifier of the chat in which to return information about messages
	ChatId int64 `json:"chat_id"`
	// Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, and searchMessagesFilterUnreadReaction are unsupported in this function
	Filter SearchMessagesFilter `json:"filter"`
	// The message identifier from which to return information about messages; use 0 to get results from the last message
	FromMessageId int64 `json:"from_message_id"`
}

type GetChatMessageCountRequest

type GetChatMessageCountRequest struct {
	// Identifier of the chat in which to count messages
	ChatId int64 `json:"chat_id"`
	// Filter for message content; searchMessagesFilterEmpty is unsupported in this function
	Filter SearchMessagesFilter `json:"filter"`
	// Pass true to get the number of messages without sending network requests, or -1 if the number of messages is unknown locally
	ReturnLocal bool `json:"return_local"`
}

type GetChatNotificationSettingsExceptionsRequest

type GetChatNotificationSettingsExceptionsRequest struct {
	// If specified, only chats from the scope will be returned; pass null to return chats from all scopes
	Scope NotificationSettingsScope `json:"scope"`
	// Pass true to include in the response chats with only non-default sound
	CompareSound bool `json:"compare_sound"`
}

type GetChatPinnedMessageRequest

type GetChatPinnedMessageRequest struct {
	// Identifier of the chat the message belongs to
	ChatId int64 `json:"chat_id"`
}

type GetChatRequest

type GetChatRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type GetChatScheduledMessagesRequest

type GetChatScheduledMessagesRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type GetChatSparseMessagePositionsRequest added in v1.7.10

type GetChatSparseMessagePositionsRequest struct {
	// Identifier of the chat in which to return information about message positions
	ChatId int64 `json:"chat_id"`
	// Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention, searchMessagesFilterUnreadMention, and searchMessagesFilterUnreadReaction are unsupported in this function
	Filter SearchMessagesFilter `json:"filter"`
	// The message identifier from which to return information about message positions
	FromMessageId int64 `json:"from_message_id"`
	// The expected number of message positions to be returned; 50-2000. A smaller number of positions can be returned, if there are not enough appropriate messages
	Limit int32 `json:"limit"`
}

type GetChatSponsoredMessageRequest added in v1.8.3

type GetChatSponsoredMessageRequest struct {
	// Identifier of the chat
	ChatId int64 `json:"chat_id"`
}

type GetChatStatisticsRequest

type GetChatStatisticsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Pass true if a dark theme is used by the application
	IsDark bool `json:"is_dark"`
}

type GetChatsRequest

type GetChatsRequest struct {
	// The chat list in which to return chats; pass null to get chats from the main chat list
	ChatList ChatList `json:"chat_list"`
	// The maximum number of chats to be returned
	Limit int32 `json:"limit"`
}

type GetCommandsRequest added in v1.7.10

type GetCommandsRequest struct {
	// The scope to which the commands are relevant; pass null to get commands in the default bot command scope
	Scope BotCommandScope `json:"scope"`
	// A two-letter ISO 639-1 language code or an empty string
	LanguageCode string `json:"language_code"`
}

type GetCreatedPublicChatsRequest

type GetCreatedPublicChatsRequest struct {
	// Type of the public chats to return
	Type PublicChatType `json:"type"`
}

type GetDeepLinkInfoRequest

type GetDeepLinkInfoRequest struct {
	// The link
	Link string `json:"link"`
}

type GetEmojiSuggestionsUrlRequest

type GetEmojiSuggestionsUrlRequest struct {
	// Language code for which the emoji replacements will be suggested
	LanguageCode string `json:"language_code"`
}

type GetExternalLinkInfoRequest added in v1.7.10

type GetExternalLinkInfoRequest struct {
	// The link
	Link string `json:"link"`
}

type GetExternalLinkRequest added in v1.7.10

type GetExternalLinkRequest struct {
	// The HTTP link
	Link string `json:"link"`
	// Pass true if the current user allowed the bot, returned in getExternalLinkInfo, to send them messages
	AllowWriteAccess bool `json:"allow_write_access"`
}

type GetFileDownloadedPrefixSizeRequest

type GetFileDownloadedPrefixSizeRequest struct {
	// Identifier of the file
	FileId int32 `json:"file_id"`
	// Offset from which downloaded prefix size needs to be calculated
	Offset int32 `json:"offset"`
}

type GetFileExtensionRequest

type GetFileExtensionRequest struct {
	// The MIME type of the file
	MimeType string `json:"mime_type"`
}

type GetFileMimeTypeRequest

type GetFileMimeTypeRequest struct {
	// The name of the file or path to the file
	FileName string `json:"file_name"`
}

type GetFileRequest

type GetFileRequest struct {
	// Identifier of the file to get
	FileId int32 `json:"file_id"`
}

type GetGameHighScoresRequest

type GetGameHighScoresRequest struct {
	// The chat that contains the message with the game
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// User identifier
	UserId int64 `json:"user_id"`
}

type GetGroupCallInviteLinkRequest added in v1.7.10

type GetGroupCallInviteLinkRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Pass true if the invite link needs to contain an invite hash, passing which to joinGroupCall would allow the invited user to unmute themselves. Requires groupCall.can_be_managed group call flag
	CanSelfUnmute bool `json:"can_self_unmute"`
}

type GetGroupCallRequest added in v1.7.10

type GetGroupCallRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
}

type GetGroupCallStreamSegmentRequest added in v1.7.10

type GetGroupCallStreamSegmentRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Point in time when the stream segment begins; Unix timestamp in milliseconds
	TimeOffset int64 `json:"time_offset"`
	// Segment duration scale; 0-1. Segment's duration is 1000/(2**scale) milliseconds
	Scale int32 `json:"scale"`
	// Identifier of an audio/video channel to get as received from tgcalls
	ChannelId int32 `json:"channel_id"`
	// Video quality as received from tgcalls; pass null to get the worst available quality
	VideoQuality GroupCallVideoQuality `json:"video_quality"`
}

type GetGroupCallStreamsRequest added in v1.8.3

type GetGroupCallStreamsRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
}

type GetGroupsInCommonRequest

type GetGroupsInCommonRequest struct {
	// User identifier
	UserId int64 `json:"user_id"`
	// Chat identifier starting from which to return chats; use 0 for the first request
	OffsetChatId int64 `json:"offset_chat_id"`
	// The maximum number of chats to be returned; up to 100
	Limit int32 `json:"limit"`
}

type GetInlineGameHighScoresRequest

type GetInlineGameHighScoresRequest struct {
	// Inline message identifier
	InlineMessageId string `json:"inline_message_id"`
	// User identifier
	UserId int64 `json:"user_id"`
}

type GetInlineQueryResultsRequest

type GetInlineQueryResultsRequest struct {
	// The identifier of the target bot
	BotUserId int64 `json:"bot_user_id"`
	// Identifier of the chat where the query was sent
	ChatId int64 `json:"chat_id"`
	// Location of the user; pass null if unknown or the bot doesn't need user's location
	UserLocation *Location `json:"user_location"`
	// Text of the query
	Query string `json:"query"`
	// Offset of the first entry to return
	Offset string `json:"offset"`
}

type GetInstalledStickerSetsRequest

type GetInstalledStickerSetsRequest struct {
	// Pass true to return mask sticker sets; pass false to return ordinary sticker sets
	IsMasks bool `json:"is_masks"`
}

type GetInternalLinkTypeRequest added in v1.7.10

type GetInternalLinkTypeRequest struct {
	// The link
	Link string `json:"link"`
}

type GetJsonStringRequest

type GetJsonStringRequest struct {
	// The JsonValue object
	JsonValue JsonValue `json:"json_value"`
}

type GetJsonValueRequest

type GetJsonValueRequest struct {
	// The JSON-serialized string
	Json string `json:"json"`
}

type GetLanguagePackInfoRequest

type GetLanguagePackInfoRequest struct {
	// Language pack identifier
	LanguagePackId string `json:"language_pack_id"`
}

type GetLanguagePackStringRequest

type GetLanguagePackStringRequest struct {
	// Path to the language pack database in which strings are stored
	LanguagePackDatabasePath string `json:"language_pack_database_path"`
	// Localization target to which the language pack belongs
	LocalizationTarget string `json:"localization_target"`
	// Language pack identifier
	LanguagePackId string `json:"language_pack_id"`
	// Language pack key of the string to be returned
	Key string `json:"key"`
}

type GetLanguagePackStringsRequest

type GetLanguagePackStringsRequest struct {
	// Language pack identifier of the strings to be returned
	LanguagePackId string `json:"language_pack_id"`
	// Language pack keys of the strings to be returned; leave empty to request all available strings
	Keys []string `json:"keys"`
}

type GetLocalizationTargetInfoRequest

type GetLocalizationTargetInfoRequest struct {
	// Pass true to get only locally available information without sending network requests
	OnlyLocal bool `json:"only_local"`
}

type GetLogTagVerbosityLevelRequest

type GetLogTagVerbosityLevelRequest struct {
	// Logging tag to change verbosity level
	Tag string `json:"tag"`
}

type GetLoginUrlInfoRequest

type GetLoginUrlInfoRequest struct {
	// Chat identifier of the message with the button
	ChatId int64 `json:"chat_id"`
	// Message identifier of the message with the button
	MessageId int64 `json:"message_id"`
	// Button identifier
	ButtonId int64 `json:"button_id"`
}

type GetLoginUrlRequest

type GetLoginUrlRequest struct {
	// Chat identifier of the message with the button
	ChatId int64 `json:"chat_id"`
	// Message identifier of the message with the button
	MessageId int64 `json:"message_id"`
	// Button identifier
	ButtonId int64 `json:"button_id"`
	// Pass true to allow the bot to send messages to the current user
	AllowWriteAccess bool `json:"allow_write_access"`
}

type GetMapThumbnailFileRequest

type GetMapThumbnailFileRequest struct {
	// Location of the map center
	Location *Location `json:"location"`
	// Map zoom level; 13-20
	Zoom int32 `json:"zoom"`
	// Map width in pixels before applying scale; 16-1024
	Width int32 `json:"width"`
	// Map height in pixels before applying scale; 16-1024
	Height int32 `json:"height"`
	// Map scale; 1-3
	Scale int32 `json:"scale"`
	// Identifier of a chat in which the thumbnail will be shown. Use 0 if unknown
	ChatId int64 `json:"chat_id"`
}

type GetMarkdownTextRequest

type GetMarkdownTextRequest struct {
	// The text
	Text *FormattedText `json:"text"`
}

type GetMenuButtonRequest added in v1.8.3

type GetMenuButtonRequest struct {
	// Identifier of the user or 0 to get the default menu button
	UserId int64 `json:"user_id"`
}

type GetMessageAddedReactionsRequest added in v1.8.3

type GetMessageAddedReactionsRequest struct {
	// Identifier of the chat to which the message belongs
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// If non-empty, only added reactions with the specified text representation will be returned
	Reaction string `json:"reaction"`
	// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
	Offset string `json:"offset"`
	// The maximum number of reactions to be returned; must be positive and can't be greater than 100
	Limit int32 `json:"limit"`
}

type GetMessageAvailableReactionsRequest added in v1.8.3

type GetMessageAvailableReactionsRequest struct {
	// Identifier of the chat to which the message belongs
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
}

type GetMessageEmbeddingCodeRequest

type GetMessageEmbeddingCodeRequest struct {
	// Identifier of the chat to which the message belongs
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// Pass true to return an HTML code for embedding of the whole media album
	ForAlbum bool `json:"for_album"`
}

type GetMessageFileTypeRequest added in v1.7.10

type GetMessageFileTypeRequest struct {
	// Beginning of the message file; up to 100 first lines
	MessageFileHead string `json:"message_file_head"`
}

type GetMessageImportConfirmationTextRequest added in v1.7.10

type GetMessageImportConfirmationTextRequest struct {
	// Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right
	ChatId int64 `json:"chat_id"`
}

type GetMessageLinkInfoRequest

type GetMessageLinkInfoRequest struct {
	// The message link
	Url string `json:"url"`
}

type GetMessageLinkRequest

type GetMessageLinkRequest struct {
	// Identifier of the chat to which the message belongs
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// If not 0, timestamp from which the video/audio/video note/voice note playing must start, in seconds. The media can be in the message content or in its web page preview
	MediaTimestamp int32 `json:"media_timestamp"`
	// Pass true to create a link for the whole media album
	ForAlbum bool `json:"for_album"`
	// Pass true to create a link to the message as a channel post comment, or from a message thread
	ForComment bool `json:"for_comment"`
}

type GetMessageLocallyRequest

type GetMessageLocallyRequest struct {
	// Identifier of the chat the message belongs to
	ChatId int64 `json:"chat_id"`
	// Identifier of the message to get
	MessageId int64 `json:"message_id"`
}

type GetMessagePublicForwardsRequest

type GetMessagePublicForwardsRequest struct {
	// Chat identifier of the message
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
	Offset string `json:"offset"`
	// The maximum number of messages to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
	Limit int32 `json:"limit"`
}

type GetMessageRequest

type GetMessageRequest struct {
	// Identifier of the chat the message belongs to
	ChatId int64 `json:"chat_id"`
	// Identifier of the message to get
	MessageId int64 `json:"message_id"`
}

type GetMessageStatisticsRequest

type GetMessageStatisticsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// Pass true if a dark theme is used by the application
	IsDark bool `json:"is_dark"`
}

type GetMessageThreadHistoryRequest

type GetMessageThreadHistoryRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Message identifier, which thread history needs to be returned
	MessageId int64 `json:"message_id"`
	// Identifier of the message starting from which history must be fetched; use 0 to get results from the last message
	FromMessageId int64 `json:"from_message_id"`
	// Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally some newer messages
	Offset int32 `json:"offset"`
	// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
	Limit int32 `json:"limit"`
}

type GetMessageThreadRequest

type GetMessageThreadRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
}

type GetMessageViewersRequest added in v1.7.10

type GetMessageViewersRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
}

type GetMessagesRequest

type GetMessagesRequest struct {
	// Identifier of the chat the messages belong to
	ChatId int64 `json:"chat_id"`
	// Identifiers of the messages to get
	MessageIds []int64 `json:"message_ids"`
}

type GetNetworkStatisticsRequest

type GetNetworkStatisticsRequest struct {
	// Pass true to get statistics only for the current library launch
	OnlyCurrent bool `json:"only_current"`
}

type GetOptionRequest

type GetOptionRequest struct {
	// The name of the option
	Name string `json:"name"`
}

type GetPassportAuthorizationFormAvailableElementsRequest

type GetPassportAuthorizationFormAvailableElementsRequest struct {
	// Authorization form identifier
	AutorizationFormId int32 `json:"autorization_form_id"`
	// Password of the current user
	Password string `json:"password"`
}

type GetPassportAuthorizationFormRequest

type GetPassportAuthorizationFormRequest struct {
	// User identifier of the service's bot
	BotUserId int64 `json:"bot_user_id"`
	// Telegram Passport element types requested by the service
	Scope string `json:"scope"`
	// Service's public key
	PublicKey string `json:"public_key"`
	// Unique request identifier provided by the service
	Nonce string `json:"nonce"`
}

type GetPassportElementRequest

type GetPassportElementRequest struct {
	// Telegram Passport element type
	Type PassportElementType `json:"type"`
	// Password of the current user
	Password string `json:"password"`
}

type GetPaymentFormRequest

type GetPaymentFormRequest struct {
	// Chat identifier of the Invoice message
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// Preferred payment form theme; pass null to use the default theme
	Theme *ThemeParameters `json:"theme"`
}

type GetPaymentReceiptRequest

type GetPaymentReceiptRequest struct {
	// Chat identifier of the PaymentSuccessful message
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
}

type GetPhoneNumberInfoRequest

type GetPhoneNumberInfoRequest struct {
	// The phone number prefix
	PhoneNumberPrefix string `json:"phone_number_prefix"`
}

type GetPhoneNumberInfoSyncRequest added in v1.7.10

type GetPhoneNumberInfoSyncRequest struct {
	// A two-letter ISO 639-1 language code for country information localization
	LanguageCode string `json:"language_code"`
	// The phone number prefix
	PhoneNumberPrefix string `json:"phone_number_prefix"`
}

type GetPollVotersRequest

type GetPollVotersRequest struct {
	// Identifier of the chat to which the poll belongs
	ChatId int64 `json:"chat_id"`
	// Identifier of the message containing the poll
	MessageId int64 `json:"message_id"`
	// 0-based identifier of the answer option
	OptionId int32 `json:"option_id"`
	// Number of users to skip in the result; must be non-negative
	Offset int32 `json:"offset"`
	// The maximum number of users to be returned; must be positive and can't be greater than 50. For optimal performance, the number of returned users is chosen by TDLib and can be smaller than the specified limit, even if the end of the voter list has not been reached
	Limit int32 `json:"limit"`
}

type GetPreferredCountryLanguageRequest

type GetPreferredCountryLanguageRequest struct {
	// A two-letter ISO 3166-1 alpha-2 country code
	CountryCode string `json:"country_code"`
}

type GetProxyLinkRequest

type GetProxyLinkRequest struct {
	// Proxy identifier
	ProxyId int32 `json:"proxy_id"`
}

type GetPushReceiverIdRequest

type GetPushReceiverIdRequest struct {
	// JSON-encoded push notification payload
	Payload string `json:"payload"`
}

type GetRecentStickersRequest

type GetRecentStickersRequest struct {
	// Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers
	IsAttached bool `json:"is_attached"`
}

type GetRecentlyOpenedChatsRequest added in v1.7.10

type GetRecentlyOpenedChatsRequest struct {
	// The maximum number of chats to be returned
	Limit int32 `json:"limit"`
}

type GetRecentlyVisitedTMeUrlsRequest

type GetRecentlyVisitedTMeUrlsRequest struct {
	// Google Play referrer to identify the user
	Referrer string `json:"referrer"`
}

type GetRecoveryEmailAddressRequest

type GetRecoveryEmailAddressRequest struct {
	// The password for the current user
	Password string `json:"password"`
}

type GetRemoteFileRequest

type GetRemoteFileRequest struct {
	// Remote identifier of the file to get
	RemoteFileId string `json:"remote_file_id"`
	// File type; pass null if unknown
	FileType FileType `json:"file_type"`
}

type GetRepliedMessageRequest

type GetRepliedMessageRequest struct {
	// Identifier of the chat the message belongs to
	ChatId int64 `json:"chat_id"`
	// Identifier of the reply message
	MessageId int64 `json:"message_id"`
}

type GetSavedNotificationSoundRequest added in v1.8.3

type GetSavedNotificationSoundRequest struct {
	// Identifier of the notification sound
	NotificationSoundId JsonInt64 `json:"notification_sound_id"`
}

type GetScopeNotificationSettingsRequest

type GetScopeNotificationSettingsRequest struct {
	// Types of chats for which to return the notification settings information
	Scope NotificationSettingsScope `json:"scope"`
}

type GetSecretChatRequest

type GetSecretChatRequest struct {
	// Secret chat identifier
	SecretChatId int32 `json:"secret_chat_id"`
}

type GetStatisticalGraphRequest

type GetStatisticalGraphRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The token for graph loading
	Token string `json:"token"`
	// X-value for zoomed in graph or 0 otherwise
	X int64 `json:"x"`
}

type GetStickerEmojisRequest

type GetStickerEmojisRequest struct {
	// Sticker file identifier
	Sticker InputFile `json:"sticker"`
}

type GetStickerSetRequest

type GetStickerSetRequest struct {
	// Identifier of the sticker set
	SetId JsonInt64 `json:"set_id"`
}

type GetStickersRequest

type GetStickersRequest struct {
	// String representation of emoji. If empty, returns all known installed stickers
	Emoji string `json:"emoji"`
	// The maximum number of stickers to be returned
	Limit int32 `json:"limit"`
}

type GetStorageStatisticsRequest

type GetStorageStatisticsRequest struct {
	// The maximum number of chats with the largest storage usage for which separate statistics need to be returned. All other chats will be grouped in entries with chat_id == 0. If the chat info database is not used, the chat_limit is ignored and is always set to 0
	ChatLimit int32 `json:"chat_limit"`
}

type GetSuggestedFileNameRequest added in v1.7.10

type GetSuggestedFileNameRequest struct {
	// Identifier of the file
	FileId int32 `json:"file_id"`
	// Directory in which the file is supposed to be saved
	Directory string `json:"directory"`
}

type GetSuggestedStickerSetNameRequest added in v1.7.10

type GetSuggestedStickerSetNameRequest struct {
	// Sticker set title; 1-64 characters
	Title string `json:"title"`
}

type GetSupergroupFullInfoRequest

type GetSupergroupFullInfoRequest struct {
	// Supergroup or channel identifier
	SupergroupId int64 `json:"supergroup_id"`
}

type GetSupergroupMembersRequest

type GetSupergroupMembersRequest struct {
	// Identifier of the supergroup or channel
	SupergroupId int64 `json:"supergroup_id"`
	// The type of users to return; pass null to use supergroupMembersFilterRecent
	Filter SupergroupMembersFilter `json:"filter"`
	// Number of users to skip
	Offset int32 `json:"offset"`
	// The maximum number of users be returned; up to 200
	Limit int32 `json:"limit"`
}

type GetSupergroupRequest

type GetSupergroupRequest struct {
	// Supergroup or channel identifier
	SupergroupId int64 `json:"supergroup_id"`
}

type GetTextEntitiesRequest

type GetTextEntitiesRequest struct {
	// The text in which to look for entites
	Text string `json:"text"`
}

type GetThemeParametersJsonStringRequest added in v1.8.3

type GetThemeParametersJsonStringRequest struct {
	// Theme parameters to convert to JSON
	Theme *ThemeParameters `json:"theme"`
}

type GetTopChatsRequest

type GetTopChatsRequest struct {
	// Category of chats to be returned
	Category TopChatCategory `json:"category"`
	// The maximum number of chats to be returned; up to 30
	Limit int32 `json:"limit"`
}

type GetTrendingStickerSetsRequest

type GetTrendingStickerSetsRequest struct {
	// The offset from which to return the sticker sets; must be non-negative
	Offset int32 `json:"offset"`
	// The maximum number of sticker sets to be returned; up to 100. For optimal performance, the number of returned sticker sets is chosen by TDLib and can be smaller than the specified limit, even if the end of the list has not been reached
	Limit int32 `json:"limit"`
}

type GetUserFullInfoRequest

type GetUserFullInfoRequest struct {
	// User identifier
	UserId int64 `json:"user_id"`
}

type GetUserPrivacySettingRulesRequest

type GetUserPrivacySettingRulesRequest struct {
	// The privacy setting
	Setting UserPrivacySetting `json:"setting"`
}

type GetUserProfilePhotosRequest

type GetUserProfilePhotosRequest struct {
	// User identifier
	UserId int64 `json:"user_id"`
	// The number of photos to skip; must be non-negative
	Offset int32 `json:"offset"`
	// The maximum number of photos to be returned; up to 100
	Limit int32 `json:"limit"`
}

type GetUserRequest

type GetUserRequest struct {
	// User identifier
	UserId int64 `json:"user_id"`
}

type GetVideoChatAvailableParticipantsRequest added in v1.7.10

type GetVideoChatAvailableParticipantsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type GetVideoChatRtmpUrlRequest added in v1.8.3

type GetVideoChatRtmpUrlRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type GetWebAppUrlRequest added in v1.8.3

type GetWebAppUrlRequest struct {
	// Identifier of the target bot
	BotUserId int64 `json:"bot_user_id"`
	// The URL from the keyboardButtonTypeWebApp button
	Url string `json:"url"`
	// Preferred web app theme; pass null to use the default theme
	Theme *ThemeParameters `json:"theme"`
}

type GetWebPageInstantViewRequest

type GetWebPageInstantViewRequest struct {
	// The web page URL
	Url string `json:"url"`
	// Pass true to get full instant view for the web page
	ForceFull bool `json:"force_full"`
}

type GetWebPagePreviewRequest

type GetWebPagePreviewRequest struct {
	// Message text with formatting
	Text *FormattedText `json:"text"`
}

type GroupCall added in v1.7.10

type GroupCall struct {

	// Group call identifier
	Id int32 `json:"id"`
	// Group call title
	Title string `json:"title"`
	// Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 if it is already active or was ended
	ScheduledStartDate int32 `json:"scheduled_start_date"`
	// True, if the group call is scheduled and the current user will receive a notification when the group call will start
	EnabledStartNotification bool `json:"enabled_start_notification"`
	// True, if the call is active
	IsActive bool `json:"is_active"`
	// True, if the chat is an RTMP stream instead of an ordinary video chat
	IsRtmpStream bool `json:"is_rtmp_stream"`
	// True, if the call is joined
	IsJoined bool `json:"is_joined"`
	// True, if user was kicked from the call because of network loss and the call needs to be rejoined
	NeedRejoin bool `json:"need_rejoin"`
	// True, if the current user can manage the group call
	CanBeManaged bool `json:"can_be_managed"`
	// Number of participants in the group call
	ParticipantCount int32 `json:"participant_count"`
	// True, if group call participants, which are muted, aren't returned in participant list
	HasHiddenListeners bool `json:"has_hidden_listeners"`
	// True, if all group call participants are loaded
	LoadedAllParticipants bool `json:"loaded_all_participants"`
	// At most 3 recently speaking users in the group call
	RecentSpeakers []*GroupCallRecentSpeaker `json:"recent_speakers"`
	// True, if the current user's video is enabled
	IsMyVideoEnabled bool `json:"is_my_video_enabled"`
	// True, if the current user's video is paused
	IsMyVideoPaused bool `json:"is_my_video_paused"`
	// True, if the current user can broadcast video or share screen
	CanEnableVideo bool `json:"can_enable_video"`
	// True, if only group call administrators can unmute new participants
	MuteNewParticipants bool `json:"mute_new_participants"`
	// True, if the current user can enable or disable mute_new_participants setting
	CanToggleMuteNewParticipants bool `json:"can_toggle_mute_new_participants"`
	// Duration of the ongoing group call recording, in seconds; 0 if none. An updateGroupCall update is not triggered when value of this field changes, but the same recording goes on
	RecordDuration int32 `json:"record_duration"`
	// True, if a video file is being recorded for the call
	IsVideoRecorded bool `json:"is_video_recorded"`
	// Call duration, in seconds; for ended calls only
	Duration int32 `json:"duration"`
	// contains filtered or unexported fields
}

Describes a group call

func UnmarshalGroupCall added in v1.7.10

func UnmarshalGroupCall(data json.RawMessage) (*GroupCall, error)

func (*GroupCall) GetClass added in v1.7.10

func (*GroupCall) GetClass() string

func (*GroupCall) GetType added in v1.7.10

func (*GroupCall) GetType() string

func (*GroupCall) MarshalJSON added in v1.7.10

func (entity *GroupCall) MarshalJSON() ([]byte, error)

type GroupCallId added in v1.7.10

type GroupCallId struct {

	// Group call identifier
	Id int32 `json:"id"`
	// contains filtered or unexported fields
}

Contains the group call identifier

func UnmarshalGroupCallId added in v1.7.10

func UnmarshalGroupCallId(data json.RawMessage) (*GroupCallId, error)

func (*GroupCallId) GetClass added in v1.7.10

func (*GroupCallId) GetClass() string

func (*GroupCallId) GetType added in v1.7.10

func (*GroupCallId) GetType() string

func (*GroupCallId) MarshalJSON added in v1.7.10

func (entity *GroupCallId) MarshalJSON() ([]byte, error)

type GroupCallParticipant added in v1.7.10

type GroupCallParticipant struct {

	// Identifier of the group call participant
	ParticipantId MessageSender `json:"participant_id"`
	// User's audio channel synchronization source identifier
	AudioSourceId int32 `json:"audio_source_id"`
	// User's screen sharing audio channel synchronization source identifier
	ScreenSharingAudioSourceId int32 `json:"screen_sharing_audio_source_id"`
	// Information about user's video channel; may be null if there is no active video
	VideoInfo *GroupCallParticipantVideoInfo `json:"video_info"`
	// Information about user's screen sharing video channel; may be null if there is no active screen sharing video
	ScreenSharingVideoInfo *GroupCallParticipantVideoInfo `json:"screen_sharing_video_info"`
	// The participant user's bio or the participant chat's description
	Bio string `json:"bio"`
	// True, if the participant is the current user
	IsCurrentUser bool `json:"is_current_user"`
	// True, if the participant is speaking as set by setGroupCallParticipantIsSpeaking
	IsSpeaking bool `json:"is_speaking"`
	// True, if the participant hand is raised
	IsHandRaised bool `json:"is_hand_raised"`
	// True, if the current user can mute the participant for all other group call participants
	CanBeMutedForAllUsers bool `json:"can_be_muted_for_all_users"`
	// True, if the current user can allow the participant to unmute themselves or unmute the participant (if the participant is the current user)
	CanBeUnmutedForAllUsers bool `json:"can_be_unmuted_for_all_users"`
	// True, if the current user can mute the participant only for self
	CanBeMutedForCurrentUser bool `json:"can_be_muted_for_current_user"`
	// True, if the current user can unmute the participant for self
	CanBeUnmutedForCurrentUser bool `json:"can_be_unmuted_for_current_user"`
	// True, if the participant is muted for all users
	IsMutedForAllUsers bool `json:"is_muted_for_all_users"`
	// True, if the participant is muted for the current user
	IsMutedForCurrentUser bool `json:"is_muted_for_current_user"`
	// True, if the participant is muted for all users, but can unmute themselves
	CanUnmuteSelf bool `json:"can_unmute_self"`
	// Participant's volume level; 1-20000 in hundreds of percents
	VolumeLevel int32 `json:"volume_level"`
	// User's order in the group call participant list. Orders must be compared lexicographically. The bigger is order, the higher is user in the list. If order is empty, the user must be removed from the participant list
	Order string `json:"order"`
	// contains filtered or unexported fields
}

Represents a group call participant

func UnmarshalGroupCallParticipant added in v1.7.10

func UnmarshalGroupCallParticipant(data json.RawMessage) (*GroupCallParticipant, error)

func (*GroupCallParticipant) GetClass added in v1.7.10

func (*GroupCallParticipant) GetClass() string

func (*GroupCallParticipant) GetType added in v1.7.10

func (*GroupCallParticipant) GetType() string

func (*GroupCallParticipant) MarshalJSON added in v1.7.10

func (entity *GroupCallParticipant) MarshalJSON() ([]byte, error)

func (*GroupCallParticipant) UnmarshalJSON added in v1.7.10

func (groupCallParticipant *GroupCallParticipant) UnmarshalJSON(data []byte) error

type GroupCallParticipantVideoInfo added in v1.7.10

type GroupCallParticipantVideoInfo struct {

	// List of synchronization source groups of the video
	SourceGroups []*GroupCallVideoSourceGroup `json:"source_groups"`
	// Video channel endpoint identifier
	EndpointId string `json:"endpoint_id"`
	// True if the video is paused. This flag needs to be ignored, if new video frames are received
	IsPaused bool `json:"is_paused"`
	// contains filtered or unexported fields
}

Contains information about a group call participant's video channel

func UnmarshalGroupCallParticipantVideoInfo added in v1.7.10

func UnmarshalGroupCallParticipantVideoInfo(data json.RawMessage) (*GroupCallParticipantVideoInfo, error)

func (*GroupCallParticipantVideoInfo) GetClass added in v1.7.10

func (*GroupCallParticipantVideoInfo) GetType added in v1.7.10

func (*GroupCallParticipantVideoInfo) MarshalJSON added in v1.7.10

func (entity *GroupCallParticipantVideoInfo) MarshalJSON() ([]byte, error)

type GroupCallRecentSpeaker added in v1.7.10

type GroupCallRecentSpeaker struct {

	// Group call participant identifier
	ParticipantId MessageSender `json:"participant_id"`
	// True, is the user has spoken recently
	IsSpeaking bool `json:"is_speaking"`
	// contains filtered or unexported fields
}

Describes a recently speaking participant in a group call

func UnmarshalGroupCallRecentSpeaker added in v1.7.10

func UnmarshalGroupCallRecentSpeaker(data json.RawMessage) (*GroupCallRecentSpeaker, error)

func (*GroupCallRecentSpeaker) GetClass added in v1.7.10

func (*GroupCallRecentSpeaker) GetClass() string

func (*GroupCallRecentSpeaker) GetType added in v1.7.10

func (*GroupCallRecentSpeaker) GetType() string

func (*GroupCallRecentSpeaker) MarshalJSON added in v1.7.10

func (entity *GroupCallRecentSpeaker) MarshalJSON() ([]byte, error)

func (*GroupCallRecentSpeaker) UnmarshalJSON added in v1.7.10

func (groupCallRecentSpeaker *GroupCallRecentSpeaker) UnmarshalJSON(data []byte) error

type GroupCallStream added in v1.8.3

type GroupCallStream struct {

	// Identifier of an audio/video channel
	ChannelId int32 `json:"channel_id"`
	// Scale of segment durations in the stream. The duration is 1000/(2**scale) milliseconds
	Scale int32 `json:"scale"`
	// Point in time when the stream currently ends; Unix timestamp in milliseconds
	TimeOffset int64 `json:"time_offset"`
	// contains filtered or unexported fields
}

Describes an available stream in a group call

func UnmarshalGroupCallStream added in v1.8.3

func UnmarshalGroupCallStream(data json.RawMessage) (*GroupCallStream, error)

func (*GroupCallStream) GetClass added in v1.8.3

func (*GroupCallStream) GetClass() string

func (*GroupCallStream) GetType added in v1.8.3

func (*GroupCallStream) GetType() string

func (*GroupCallStream) MarshalJSON added in v1.8.3

func (entity *GroupCallStream) MarshalJSON() ([]byte, error)

type GroupCallStreams added in v1.8.3

type GroupCallStreams struct {

	// A list of group call streams
	Streams []*GroupCallStream `json:"streams"`
	// contains filtered or unexported fields
}

Represents a list of group call streams

func UnmarshalGroupCallStreams added in v1.8.3

func UnmarshalGroupCallStreams(data json.RawMessage) (*GroupCallStreams, error)

func (*GroupCallStreams) GetClass added in v1.8.3

func (*GroupCallStreams) GetClass() string

func (*GroupCallStreams) GetType added in v1.8.3

func (*GroupCallStreams) GetType() string

func (*GroupCallStreams) MarshalJSON added in v1.8.3

func (entity *GroupCallStreams) MarshalJSON() ([]byte, error)

type GroupCallVideoQuality added in v1.7.10

type GroupCallVideoQuality interface {
	GroupCallVideoQualityType() string
}

Describes the quality of a group call video

func UnmarshalGroupCallVideoQuality added in v1.7.10

func UnmarshalGroupCallVideoQuality(data json.RawMessage) (GroupCallVideoQuality, error)

func UnmarshalListOfGroupCallVideoQuality added in v1.7.10

func UnmarshalListOfGroupCallVideoQuality(dataList []json.RawMessage) ([]GroupCallVideoQuality, error)

type GroupCallVideoQualityFull added in v1.7.10

type GroupCallVideoQualityFull struct {
	// contains filtered or unexported fields
}

The best available video quality

func UnmarshalGroupCallVideoQualityFull added in v1.7.10

func UnmarshalGroupCallVideoQualityFull(data json.RawMessage) (*GroupCallVideoQualityFull, error)

func (*GroupCallVideoQualityFull) GetClass added in v1.7.10

func (*GroupCallVideoQualityFull) GetClass() string

func (*GroupCallVideoQualityFull) GetType added in v1.7.10

func (*GroupCallVideoQualityFull) GetType() string

func (*GroupCallVideoQualityFull) GroupCallVideoQualityType added in v1.7.10

func (*GroupCallVideoQualityFull) GroupCallVideoQualityType() string

func (*GroupCallVideoQualityFull) MarshalJSON added in v1.7.10

func (entity *GroupCallVideoQualityFull) MarshalJSON() ([]byte, error)

type GroupCallVideoQualityMedium added in v1.7.10

type GroupCallVideoQualityMedium struct {
	// contains filtered or unexported fields
}

The medium video quality

func UnmarshalGroupCallVideoQualityMedium added in v1.7.10

func UnmarshalGroupCallVideoQualityMedium(data json.RawMessage) (*GroupCallVideoQualityMedium, error)

func (*GroupCallVideoQualityMedium) GetClass added in v1.7.10

func (*GroupCallVideoQualityMedium) GetClass() string

func (*GroupCallVideoQualityMedium) GetType added in v1.7.10

func (*GroupCallVideoQualityMedium) GroupCallVideoQualityType added in v1.7.10

func (*GroupCallVideoQualityMedium) GroupCallVideoQualityType() string

func (*GroupCallVideoQualityMedium) MarshalJSON added in v1.7.10

func (entity *GroupCallVideoQualityMedium) MarshalJSON() ([]byte, error)

type GroupCallVideoQualityThumbnail added in v1.7.10

type GroupCallVideoQualityThumbnail struct {
	// contains filtered or unexported fields
}

The worst available video quality

func UnmarshalGroupCallVideoQualityThumbnail added in v1.7.10

func UnmarshalGroupCallVideoQualityThumbnail(data json.RawMessage) (*GroupCallVideoQualityThumbnail, error)

func (*GroupCallVideoQualityThumbnail) GetClass added in v1.7.10

func (*GroupCallVideoQualityThumbnail) GetType added in v1.7.10

func (*GroupCallVideoQualityThumbnail) GroupCallVideoQualityType added in v1.7.10

func (*GroupCallVideoQualityThumbnail) GroupCallVideoQualityType() string

func (*GroupCallVideoQualityThumbnail) MarshalJSON added in v1.7.10

func (entity *GroupCallVideoQualityThumbnail) MarshalJSON() ([]byte, error)

type GroupCallVideoSourceGroup added in v1.7.10

type GroupCallVideoSourceGroup struct {

	// The semantics of sources, one of "SIM" or "FID"
	Semantics string `json:"semantics"`
	// The list of synchronization source identifiers
	SourceIds []int32 `json:"source_ids"`
	// contains filtered or unexported fields
}

Describes a group of video synchronization source identifiers

func UnmarshalGroupCallVideoSourceGroup added in v1.7.10

func UnmarshalGroupCallVideoSourceGroup(data json.RawMessage) (*GroupCallVideoSourceGroup, error)

func (*GroupCallVideoSourceGroup) GetClass added in v1.7.10

func (*GroupCallVideoSourceGroup) GetClass() string

func (*GroupCallVideoSourceGroup) GetType added in v1.7.10

func (*GroupCallVideoSourceGroup) GetType() string

func (*GroupCallVideoSourceGroup) MarshalJSON added in v1.7.10

func (entity *GroupCallVideoSourceGroup) MarshalJSON() ([]byte, error)

type Hashtags

type Hashtags struct {

	// A list of hashtags
	Hashtags []string `json:"hashtags"`
	// contains filtered or unexported fields
}

Contains a list of hashtags

func UnmarshalHashtags

func UnmarshalHashtags(data json.RawMessage) (*Hashtags, error)

func (*Hashtags) GetClass

func (*Hashtags) GetClass() string

func (*Hashtags) GetType

func (*Hashtags) GetType() string

func (*Hashtags) MarshalJSON

func (entity *Hashtags) MarshalJSON() ([]byte, error)

type HideSuggestedActionRequest

type HideSuggestedActionRequest struct {
	// Suggested action to hide
	Action SuggestedAction `json:"action"`
}

type HttpUrl

type HttpUrl struct {

	// The URL
	Url string `json:"url"`
	// contains filtered or unexported fields
}

Contains an HTTP URL

func UnmarshalHttpUrl

func UnmarshalHttpUrl(data json.RawMessage) (*HttpUrl, error)

func (*HttpUrl) GetClass

func (*HttpUrl) GetClass() string

func (*HttpUrl) GetType

func (*HttpUrl) GetType() string

func (*HttpUrl) MarshalJSON

func (entity *HttpUrl) MarshalJSON() ([]byte, error)

type IdentityDocument

type IdentityDocument struct {

	// Document number; 1-24 characters
	Number string `json:"number"`
	// Document expiry date; may be null if not applicable
	ExpiryDate *Date `json:"expiry_date"`
	// Front side of the document
	FrontSide *DatedFile `json:"front_side"`
	// Reverse side of the document; only for driver license and identity card; may be null
	ReverseSide *DatedFile `json:"reverse_side"`
	// Selfie with the document; may be null
	Selfie *DatedFile `json:"selfie"`
	// List of files containing a certified English translation of the document
	Translation []*DatedFile `json:"translation"`
	// contains filtered or unexported fields
}

An identity document

func UnmarshalIdentityDocument

func UnmarshalIdentityDocument(data json.RawMessage) (*IdentityDocument, error)

func (*IdentityDocument) GetClass

func (*IdentityDocument) GetClass() string

func (*IdentityDocument) GetType

func (*IdentityDocument) GetType() string

func (*IdentityDocument) MarshalJSON

func (entity *IdentityDocument) MarshalJSON() ([]byte, error)

type ImportContactsRequest

type ImportContactsRequest struct {
	// The list of contacts to import or edit; contacts' vCard are ignored and are not imported
	Contacts []*Contact `json:"contacts"`
}

type ImportMessagesRequest added in v1.7.10

type ImportMessagesRequest struct {
	// Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right
	ChatId int64 `json:"chat_id"`
	// File with messages to import. Only inputFileLocal and inputFileGenerated are supported. The file must not be previously uploaded
	MessageFile InputFile `json:"message_file"`
	// Files used in the imported messages. Only inputFileLocal and inputFileGenerated are supported. The files must not be previously uploaded
	AttachedFiles []InputFile `json:"attached_files"`
}

type ImportedContacts

type ImportedContacts struct {

	// User identifiers of the imported contacts in the same order as they were specified in the request; 0 if the contact is not yet a registered user
	UserIds []int64 `json:"user_ids"`
	// The number of users that imported the corresponding contact; 0 for already registered users or if unavailable
	ImporterCount []int32 `json:"importer_count"`
	// contains filtered or unexported fields
}

Represents the result of an ImportContacts request

func UnmarshalImportedContacts

func UnmarshalImportedContacts(data json.RawMessage) (*ImportedContacts, error)

func (*ImportedContacts) GetClass

func (*ImportedContacts) GetClass() string

func (*ImportedContacts) GetType

func (*ImportedContacts) GetType() string

func (*ImportedContacts) MarshalJSON

func (entity *ImportedContacts) MarshalJSON() ([]byte, error)

type InlineKeyboardButton

type InlineKeyboardButton struct {

	// Text of the button
	Text string `json:"text"`
	// Type of the button
	Type InlineKeyboardButtonType `json:"type"`
	// contains filtered or unexported fields
}

Represents a single button in an inline keyboard

func UnmarshalInlineKeyboardButton

func UnmarshalInlineKeyboardButton(data json.RawMessage) (*InlineKeyboardButton, error)

func (*InlineKeyboardButton) GetClass

func (*InlineKeyboardButton) GetClass() string

func (*InlineKeyboardButton) GetType

func (*InlineKeyboardButton) GetType() string

func (*InlineKeyboardButton) MarshalJSON

func (entity *InlineKeyboardButton) MarshalJSON() ([]byte, error)

func (*InlineKeyboardButton) UnmarshalJSON

func (inlineKeyboardButton *InlineKeyboardButton) UnmarshalJSON(data []byte) error

type InlineKeyboardButtonType

type InlineKeyboardButtonType interface {
	InlineKeyboardButtonTypeType() string
}

Describes the type of an inline keyboard button

func UnmarshalInlineKeyboardButtonType

func UnmarshalInlineKeyboardButtonType(data json.RawMessage) (InlineKeyboardButtonType, error)

func UnmarshalListOfInlineKeyboardButtonType

func UnmarshalListOfInlineKeyboardButtonType(dataList []json.RawMessage) ([]InlineKeyboardButtonType, error)

type InlineKeyboardButtonTypeBuy

type InlineKeyboardButtonTypeBuy struct {
	// contains filtered or unexported fields
}

A button to buy something. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageInvoice

func UnmarshalInlineKeyboardButtonTypeBuy

func UnmarshalInlineKeyboardButtonTypeBuy(data json.RawMessage) (*InlineKeyboardButtonTypeBuy, error)

func (*InlineKeyboardButtonTypeBuy) GetClass

func (*InlineKeyboardButtonTypeBuy) GetClass() string

func (*InlineKeyboardButtonTypeBuy) GetType

func (*InlineKeyboardButtonTypeBuy) InlineKeyboardButtonTypeType

func (*InlineKeyboardButtonTypeBuy) InlineKeyboardButtonTypeType() string

func (*InlineKeyboardButtonTypeBuy) MarshalJSON

func (entity *InlineKeyboardButtonTypeBuy) MarshalJSON() ([]byte, error)

type InlineKeyboardButtonTypeCallback

type InlineKeyboardButtonTypeCallback struct {

	// Data to be sent to the bot via a callback query
	Data []byte `json:"data"`
	// contains filtered or unexported fields
}

A button that sends a callback query to a bot

func UnmarshalInlineKeyboardButtonTypeCallback

func UnmarshalInlineKeyboardButtonTypeCallback(data json.RawMessage) (*InlineKeyboardButtonTypeCallback, error)

func (*InlineKeyboardButtonTypeCallback) GetClass

func (*InlineKeyboardButtonTypeCallback) GetType

func (*InlineKeyboardButtonTypeCallback) InlineKeyboardButtonTypeType

func (*InlineKeyboardButtonTypeCallback) InlineKeyboardButtonTypeType() string

func (*InlineKeyboardButtonTypeCallback) MarshalJSON

func (entity *InlineKeyboardButtonTypeCallback) MarshalJSON() ([]byte, error)

type InlineKeyboardButtonTypeCallbackGame

type InlineKeyboardButtonTypeCallbackGame struct {
	// contains filtered or unexported fields
}

A button with a game that sends a callback query to a bot. This button must be in the first column and row of the keyboard and can be attached only to a message with content of the type messageGame

func UnmarshalInlineKeyboardButtonTypeCallbackGame

func UnmarshalInlineKeyboardButtonTypeCallbackGame(data json.RawMessage) (*InlineKeyboardButtonTypeCallbackGame, error)

func (*InlineKeyboardButtonTypeCallbackGame) GetClass

func (*InlineKeyboardButtonTypeCallbackGame) GetType

func (*InlineKeyboardButtonTypeCallbackGame) InlineKeyboardButtonTypeType

func (*InlineKeyboardButtonTypeCallbackGame) InlineKeyboardButtonTypeType() string

func (*InlineKeyboardButtonTypeCallbackGame) MarshalJSON

func (entity *InlineKeyboardButtonTypeCallbackGame) MarshalJSON() ([]byte, error)

type InlineKeyboardButtonTypeCallbackWithPassword

type InlineKeyboardButtonTypeCallbackWithPassword struct {

	// Data to be sent to the bot via a callback query
	Data []byte `json:"data"`
	// contains filtered or unexported fields
}

A button that asks for password of the current user and then sends a callback query to a bot

func UnmarshalInlineKeyboardButtonTypeCallbackWithPassword

func UnmarshalInlineKeyboardButtonTypeCallbackWithPassword(data json.RawMessage) (*InlineKeyboardButtonTypeCallbackWithPassword, error)

func (*InlineKeyboardButtonTypeCallbackWithPassword) GetClass

func (*InlineKeyboardButtonTypeCallbackWithPassword) GetType

func (*InlineKeyboardButtonTypeCallbackWithPassword) InlineKeyboardButtonTypeType

func (*InlineKeyboardButtonTypeCallbackWithPassword) InlineKeyboardButtonTypeType() string

func (*InlineKeyboardButtonTypeCallbackWithPassword) MarshalJSON

func (entity *InlineKeyboardButtonTypeCallbackWithPassword) MarshalJSON() ([]byte, error)

type InlineKeyboardButtonTypeLoginUrl

type InlineKeyboardButtonTypeLoginUrl struct {

	// An HTTP URL to pass to getLoginUrlInfo
	Url string `json:"url"`
	// Unique button identifier
	Id int64 `json:"id"`
	// If non-empty, new text of the button in forwarded messages
	ForwardText string `json:"forward_text"`
	// contains filtered or unexported fields
}

A button that opens a specified URL and automatically authorize the current user by calling getLoginUrlInfo

func UnmarshalInlineKeyboardButtonTypeLoginUrl

func UnmarshalInlineKeyboardButtonTypeLoginUrl(data json.RawMessage) (*InlineKeyboardButtonTypeLoginUrl, error)

func (*InlineKeyboardButtonTypeLoginUrl) GetClass

func (*InlineKeyboardButtonTypeLoginUrl) GetType

func (*InlineKeyboardButtonTypeLoginUrl) InlineKeyboardButtonTypeType

func (*InlineKeyboardButtonTypeLoginUrl) InlineKeyboardButtonTypeType() string

func (*InlineKeyboardButtonTypeLoginUrl) MarshalJSON

func (entity *InlineKeyboardButtonTypeLoginUrl) MarshalJSON() ([]byte, error)

type InlineKeyboardButtonTypeSwitchInline

type InlineKeyboardButtonTypeSwitchInline struct {

	// Inline query to be sent to the bot
	Query string `json:"query"`
	// True, if the inline query must be sent from the current chat
	InCurrentChat bool `json:"in_current_chat"`
	// contains filtered or unexported fields
}

A button that forces an inline query to the bot to be inserted in the input field

func UnmarshalInlineKeyboardButtonTypeSwitchInline

func UnmarshalInlineKeyboardButtonTypeSwitchInline(data json.RawMessage) (*InlineKeyboardButtonTypeSwitchInline, error)

func (*InlineKeyboardButtonTypeSwitchInline) GetClass

func (*InlineKeyboardButtonTypeSwitchInline) GetType

func (*InlineKeyboardButtonTypeSwitchInline) InlineKeyboardButtonTypeType

func (*InlineKeyboardButtonTypeSwitchInline) InlineKeyboardButtonTypeType() string

func (*InlineKeyboardButtonTypeSwitchInline) MarshalJSON

func (entity *InlineKeyboardButtonTypeSwitchInline) MarshalJSON() ([]byte, error)

type InlineKeyboardButtonTypeUrl

type InlineKeyboardButtonTypeUrl struct {

	// HTTP or tg:// URL to open
	Url string `json:"url"`
	// contains filtered or unexported fields
}

A button that opens a specified URL

func UnmarshalInlineKeyboardButtonTypeUrl

func UnmarshalInlineKeyboardButtonTypeUrl(data json.RawMessage) (*InlineKeyboardButtonTypeUrl, error)

func (*InlineKeyboardButtonTypeUrl) GetClass

func (*InlineKeyboardButtonTypeUrl) GetClass() string

func (*InlineKeyboardButtonTypeUrl) GetType

func (*InlineKeyboardButtonTypeUrl) InlineKeyboardButtonTypeType

func (*InlineKeyboardButtonTypeUrl) InlineKeyboardButtonTypeType() string

func (*InlineKeyboardButtonTypeUrl) MarshalJSON

func (entity *InlineKeyboardButtonTypeUrl) MarshalJSON() ([]byte, error)

type InlineKeyboardButtonTypeUser added in v1.7.10

type InlineKeyboardButtonTypeUser struct {

	// User identifier
	UserId int64 `json:"user_id"`
	// contains filtered or unexported fields
}

A button with a user reference to be handled in the same way as textEntityTypeMentionName entities

func UnmarshalInlineKeyboardButtonTypeUser added in v1.7.10

func UnmarshalInlineKeyboardButtonTypeUser(data json.RawMessage) (*InlineKeyboardButtonTypeUser, error)

func (*InlineKeyboardButtonTypeUser) GetClass added in v1.7.10

func (*InlineKeyboardButtonTypeUser) GetType added in v1.7.10

func (*InlineKeyboardButtonTypeUser) InlineKeyboardButtonTypeType added in v1.7.10

func (*InlineKeyboardButtonTypeUser) InlineKeyboardButtonTypeType() string

func (*InlineKeyboardButtonTypeUser) MarshalJSON added in v1.7.10

func (entity *InlineKeyboardButtonTypeUser) MarshalJSON() ([]byte, error)

type InlineKeyboardButtonTypeWebApp added in v1.8.3

type InlineKeyboardButtonTypeWebApp struct {

	// An HTTP URL to pass to openWebApp
	Url string `json:"url"`
	// contains filtered or unexported fields
}

A button that opens a web app by calling openWebApp

func UnmarshalInlineKeyboardButtonTypeWebApp added in v1.8.3

func UnmarshalInlineKeyboardButtonTypeWebApp(data json.RawMessage) (*InlineKeyboardButtonTypeWebApp, error)

func (*InlineKeyboardButtonTypeWebApp) GetClass added in v1.8.3

func (*InlineKeyboardButtonTypeWebApp) GetType added in v1.8.3

func (*InlineKeyboardButtonTypeWebApp) InlineKeyboardButtonTypeType added in v1.8.3

func (*InlineKeyboardButtonTypeWebApp) InlineKeyboardButtonTypeType() string

func (*InlineKeyboardButtonTypeWebApp) MarshalJSON added in v1.8.3

func (entity *InlineKeyboardButtonTypeWebApp) MarshalJSON() ([]byte, error)

type InlineQueryResult

type InlineQueryResult interface {
	InlineQueryResultType() string
}

Represents a single result of an inline query

func UnmarshalInlineQueryResult

func UnmarshalInlineQueryResult(data json.RawMessage) (InlineQueryResult, error)

func UnmarshalListOfInlineQueryResult

func UnmarshalListOfInlineQueryResult(dataList []json.RawMessage) ([]InlineQueryResult, error)

type InlineQueryResultAnimation

type InlineQueryResultAnimation struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Animation file
	Animation *Animation `json:"animation"`
	// Animation title
	Title string `json:"title"`
	// contains filtered or unexported fields
}

Represents an animation file

func UnmarshalInlineQueryResultAnimation

func UnmarshalInlineQueryResultAnimation(data json.RawMessage) (*InlineQueryResultAnimation, error)

func (*InlineQueryResultAnimation) GetClass

func (*InlineQueryResultAnimation) GetClass() string

func (*InlineQueryResultAnimation) GetType

func (*InlineQueryResultAnimation) InlineQueryResultType

func (*InlineQueryResultAnimation) InlineQueryResultType() string

func (*InlineQueryResultAnimation) MarshalJSON

func (entity *InlineQueryResultAnimation) MarshalJSON() ([]byte, error)

type InlineQueryResultArticle

type InlineQueryResultArticle struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// URL of the result, if it exists
	Url string `json:"url"`
	// True, if the URL must be not shown
	HideUrl bool `json:"hide_url"`
	// Title of the result
	Title string `json:"title"`
	// A short description of the result
	Description string `json:"description"`
	// Result thumbnail in JPEG format; may be null
	Thumbnail *Thumbnail `json:"thumbnail"`
	// contains filtered or unexported fields
}

Represents a link to an article or web page

func UnmarshalInlineQueryResultArticle

func UnmarshalInlineQueryResultArticle(data json.RawMessage) (*InlineQueryResultArticle, error)

func (*InlineQueryResultArticle) GetClass

func (*InlineQueryResultArticle) GetClass() string

func (*InlineQueryResultArticle) GetType

func (*InlineQueryResultArticle) GetType() string

func (*InlineQueryResultArticle) InlineQueryResultType

func (*InlineQueryResultArticle) InlineQueryResultType() string

func (*InlineQueryResultArticle) MarshalJSON

func (entity *InlineQueryResultArticle) MarshalJSON() ([]byte, error)

type InlineQueryResultAudio

type InlineQueryResultAudio struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Audio file
	Audio *Audio `json:"audio"`
	// contains filtered or unexported fields
}

Represents an audio file

func UnmarshalInlineQueryResultAudio

func UnmarshalInlineQueryResultAudio(data json.RawMessage) (*InlineQueryResultAudio, error)

func (*InlineQueryResultAudio) GetClass

func (*InlineQueryResultAudio) GetClass() string

func (*InlineQueryResultAudio) GetType

func (*InlineQueryResultAudio) GetType() string

func (*InlineQueryResultAudio) InlineQueryResultType

func (*InlineQueryResultAudio) InlineQueryResultType() string

func (*InlineQueryResultAudio) MarshalJSON

func (entity *InlineQueryResultAudio) MarshalJSON() ([]byte, error)

type InlineQueryResultContact

type InlineQueryResultContact struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// A user contact
	Contact *Contact `json:"contact"`
	// Result thumbnail in JPEG format; may be null
	Thumbnail *Thumbnail `json:"thumbnail"`
	// contains filtered or unexported fields
}

Represents a user contact

func UnmarshalInlineQueryResultContact

func UnmarshalInlineQueryResultContact(data json.RawMessage) (*InlineQueryResultContact, error)

func (*InlineQueryResultContact) GetClass

func (*InlineQueryResultContact) GetClass() string

func (*InlineQueryResultContact) GetType

func (*InlineQueryResultContact) GetType() string

func (*InlineQueryResultContact) InlineQueryResultType

func (*InlineQueryResultContact) InlineQueryResultType() string

func (*InlineQueryResultContact) MarshalJSON

func (entity *InlineQueryResultContact) MarshalJSON() ([]byte, error)

type InlineQueryResultDocument

type InlineQueryResultDocument struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Document
	Document *Document `json:"document"`
	// Document title
	Title string `json:"title"`
	// Document description
	Description string `json:"description"`
	// contains filtered or unexported fields
}

Represents a document

func UnmarshalInlineQueryResultDocument

func UnmarshalInlineQueryResultDocument(data json.RawMessage) (*InlineQueryResultDocument, error)

func (*InlineQueryResultDocument) GetClass

func (*InlineQueryResultDocument) GetClass() string

func (*InlineQueryResultDocument) GetType

func (*InlineQueryResultDocument) GetType() string

func (*InlineQueryResultDocument) InlineQueryResultType

func (*InlineQueryResultDocument) InlineQueryResultType() string

func (*InlineQueryResultDocument) MarshalJSON

func (entity *InlineQueryResultDocument) MarshalJSON() ([]byte, error)

type InlineQueryResultGame

type InlineQueryResultGame struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Game result
	Game *Game `json:"game"`
	// contains filtered or unexported fields
}

Represents information about a game

func UnmarshalInlineQueryResultGame

func UnmarshalInlineQueryResultGame(data json.RawMessage) (*InlineQueryResultGame, error)

func (*InlineQueryResultGame) GetClass

func (*InlineQueryResultGame) GetClass() string

func (*InlineQueryResultGame) GetType

func (*InlineQueryResultGame) GetType() string

func (*InlineQueryResultGame) InlineQueryResultType

func (*InlineQueryResultGame) InlineQueryResultType() string

func (*InlineQueryResultGame) MarshalJSON

func (entity *InlineQueryResultGame) MarshalJSON() ([]byte, error)

type InlineQueryResultLocation

type InlineQueryResultLocation struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Location result
	Location *Location `json:"location"`
	// Title of the result
	Title string `json:"title"`
	// Result thumbnail in JPEG format; may be null
	Thumbnail *Thumbnail `json:"thumbnail"`
	// contains filtered or unexported fields
}

Represents a point on the map

func UnmarshalInlineQueryResultLocation

func UnmarshalInlineQueryResultLocation(data json.RawMessage) (*InlineQueryResultLocation, error)

func (*InlineQueryResultLocation) GetClass

func (*InlineQueryResultLocation) GetClass() string

func (*InlineQueryResultLocation) GetType

func (*InlineQueryResultLocation) GetType() string

func (*InlineQueryResultLocation) InlineQueryResultType

func (*InlineQueryResultLocation) InlineQueryResultType() string

func (*InlineQueryResultLocation) MarshalJSON

func (entity *InlineQueryResultLocation) MarshalJSON() ([]byte, error)

type InlineQueryResultPhoto

type InlineQueryResultPhoto struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Photo
	Photo *Photo `json:"photo"`
	// Title of the result, if known
	Title string `json:"title"`
	// A short description of the result, if known
	Description string `json:"description"`
	// contains filtered or unexported fields
}

Represents a photo

func UnmarshalInlineQueryResultPhoto

func UnmarshalInlineQueryResultPhoto(data json.RawMessage) (*InlineQueryResultPhoto, error)

func (*InlineQueryResultPhoto) GetClass

func (*InlineQueryResultPhoto) GetClass() string

func (*InlineQueryResultPhoto) GetType

func (*InlineQueryResultPhoto) GetType() string

func (*InlineQueryResultPhoto) InlineQueryResultType

func (*InlineQueryResultPhoto) InlineQueryResultType() string

func (*InlineQueryResultPhoto) MarshalJSON

func (entity *InlineQueryResultPhoto) MarshalJSON() ([]byte, error)

type InlineQueryResultSticker

type InlineQueryResultSticker struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Sticker
	Sticker *Sticker `json:"sticker"`
	// contains filtered or unexported fields
}

Represents a sticker

func UnmarshalInlineQueryResultSticker

func UnmarshalInlineQueryResultSticker(data json.RawMessage) (*InlineQueryResultSticker, error)

func (*InlineQueryResultSticker) GetClass

func (*InlineQueryResultSticker) GetClass() string

func (*InlineQueryResultSticker) GetType

func (*InlineQueryResultSticker) GetType() string

func (*InlineQueryResultSticker) InlineQueryResultType

func (*InlineQueryResultSticker) InlineQueryResultType() string

func (*InlineQueryResultSticker) MarshalJSON

func (entity *InlineQueryResultSticker) MarshalJSON() ([]byte, error)

type InlineQueryResultVenue

type InlineQueryResultVenue struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Venue result
	Venue *Venue `json:"venue"`
	// Result thumbnail in JPEG format; may be null
	Thumbnail *Thumbnail `json:"thumbnail"`
	// contains filtered or unexported fields
}

Represents information about a venue

func UnmarshalInlineQueryResultVenue

func UnmarshalInlineQueryResultVenue(data json.RawMessage) (*InlineQueryResultVenue, error)

func (*InlineQueryResultVenue) GetClass

func (*InlineQueryResultVenue) GetClass() string

func (*InlineQueryResultVenue) GetType

func (*InlineQueryResultVenue) GetType() string

func (*InlineQueryResultVenue) InlineQueryResultType

func (*InlineQueryResultVenue) InlineQueryResultType() string

func (*InlineQueryResultVenue) MarshalJSON

func (entity *InlineQueryResultVenue) MarshalJSON() ([]byte, error)

type InlineQueryResultVideo

type InlineQueryResultVideo struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Video
	Video *Video `json:"video"`
	// Title of the video
	Title string `json:"title"`
	// Description of the video
	Description string `json:"description"`
	// contains filtered or unexported fields
}

Represents a video

func UnmarshalInlineQueryResultVideo

func UnmarshalInlineQueryResultVideo(data json.RawMessage) (*InlineQueryResultVideo, error)

func (*InlineQueryResultVideo) GetClass

func (*InlineQueryResultVideo) GetClass() string

func (*InlineQueryResultVideo) GetType

func (*InlineQueryResultVideo) GetType() string

func (*InlineQueryResultVideo) InlineQueryResultType

func (*InlineQueryResultVideo) InlineQueryResultType() string

func (*InlineQueryResultVideo) MarshalJSON

func (entity *InlineQueryResultVideo) MarshalJSON() ([]byte, error)

type InlineQueryResultVoiceNote

type InlineQueryResultVoiceNote struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Voice note
	VoiceNote *VoiceNote `json:"voice_note"`
	// Title of the voice note
	Title string `json:"title"`
	// contains filtered or unexported fields
}

Represents a voice note

func UnmarshalInlineQueryResultVoiceNote

func UnmarshalInlineQueryResultVoiceNote(data json.RawMessage) (*InlineQueryResultVoiceNote, error)

func (*InlineQueryResultVoiceNote) GetClass

func (*InlineQueryResultVoiceNote) GetClass() string

func (*InlineQueryResultVoiceNote) GetType

func (*InlineQueryResultVoiceNote) InlineQueryResultType

func (*InlineQueryResultVoiceNote) InlineQueryResultType() string

func (*InlineQueryResultVoiceNote) MarshalJSON

func (entity *InlineQueryResultVoiceNote) MarshalJSON() ([]byte, error)

type InlineQueryResults

type InlineQueryResults struct {

	// Unique identifier of the inline query
	InlineQueryId JsonInt64 `json:"inline_query_id"`
	// The offset for the next request. If empty, there are no more results
	NextOffset string `json:"next_offset"`
	// Results of the query
	Results []InlineQueryResult `json:"results"`
	// If non-empty, this text must be shown on the button, which opens a private chat with the bot and sends the bot a start message with the switch_pm_parameter
	SwitchPmText string `json:"switch_pm_text"`
	// Parameter for the bot start message
	SwitchPmParameter string `json:"switch_pm_parameter"`
	// contains filtered or unexported fields
}

Represents the results of the inline query. Use sendInlineQueryResultMessage to send the result of the query

func UnmarshalInlineQueryResults

func UnmarshalInlineQueryResults(data json.RawMessage) (*InlineQueryResults, error)

func (*InlineQueryResults) GetClass

func (*InlineQueryResults) GetClass() string

func (*InlineQueryResults) GetType

func (*InlineQueryResults) GetType() string

func (*InlineQueryResults) MarshalJSON

func (entity *InlineQueryResults) MarshalJSON() ([]byte, error)

func (*InlineQueryResults) UnmarshalJSON

func (inlineQueryResults *InlineQueryResults) UnmarshalJSON(data []byte) error

type InputBackground

type InputBackground interface {
	InputBackgroundType() string
}

Contains information about background to set

func UnmarshalInputBackground

func UnmarshalInputBackground(data json.RawMessage) (InputBackground, error)

func UnmarshalListOfInputBackground

func UnmarshalListOfInputBackground(dataList []json.RawMessage) ([]InputBackground, error)

type InputBackgroundLocal

type InputBackgroundLocal struct {

	// Background file to use. Only inputFileLocal and inputFileGenerated are supported. The file must be in JPEG format for wallpapers and in PNG format for patterns
	Background InputFile `json:"background"`
	// contains filtered or unexported fields
}

A background from a local file

func UnmarshalInputBackgroundLocal

func UnmarshalInputBackgroundLocal(data json.RawMessage) (*InputBackgroundLocal, error)

func (*InputBackgroundLocal) GetClass

func (*InputBackgroundLocal) GetClass() string

func (*InputBackgroundLocal) GetType

func (*InputBackgroundLocal) GetType() string

func (*InputBackgroundLocal) InputBackgroundType

func (*InputBackgroundLocal) InputBackgroundType() string

func (*InputBackgroundLocal) MarshalJSON

func (entity *InputBackgroundLocal) MarshalJSON() ([]byte, error)

func (*InputBackgroundLocal) UnmarshalJSON

func (inputBackgroundLocal *InputBackgroundLocal) UnmarshalJSON(data []byte) error

type InputBackgroundRemote

type InputBackgroundRemote struct {

	// The background identifier
	BackgroundId JsonInt64 `json:"background_id"`
	// contains filtered or unexported fields
}

A background from the server

func UnmarshalInputBackgroundRemote

func UnmarshalInputBackgroundRemote(data json.RawMessage) (*InputBackgroundRemote, error)

func (*InputBackgroundRemote) GetClass

func (*InputBackgroundRemote) GetClass() string

func (*InputBackgroundRemote) GetType

func (*InputBackgroundRemote) GetType() string

func (*InputBackgroundRemote) InputBackgroundType

func (*InputBackgroundRemote) InputBackgroundType() string

func (*InputBackgroundRemote) MarshalJSON

func (entity *InputBackgroundRemote) MarshalJSON() ([]byte, error)

type InputChatPhoto

type InputChatPhoto interface {
	InputChatPhotoType() string
}

Describes a photo to be set as a user profile or chat photo

func UnmarshalInputChatPhoto

func UnmarshalInputChatPhoto(data json.RawMessage) (InputChatPhoto, error)

func UnmarshalListOfInputChatPhoto

func UnmarshalListOfInputChatPhoto(dataList []json.RawMessage) ([]InputChatPhoto, error)

type InputChatPhotoAnimation

type InputChatPhotoAnimation struct {

	// Animation to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed
	Animation InputFile `json:"animation"`
	// Timestamp of the frame, which will be used as static chat photo
	MainFrameTimestamp float64 `json:"main_frame_timestamp"`
	// contains filtered or unexported fields
}

An animation in MPEG4 format; must be square, at most 10 seconds long, have width between 160 and 800 and be at most 2MB in size

func UnmarshalInputChatPhotoAnimation

func UnmarshalInputChatPhotoAnimation(data json.RawMessage) (*InputChatPhotoAnimation, error)

func (*InputChatPhotoAnimation) GetClass

func (*InputChatPhotoAnimation) GetClass() string

func (*InputChatPhotoAnimation) GetType

func (*InputChatPhotoAnimation) GetType() string

func (*InputChatPhotoAnimation) InputChatPhotoType

func (*InputChatPhotoAnimation) InputChatPhotoType() string

func (*InputChatPhotoAnimation) MarshalJSON

func (entity *InputChatPhotoAnimation) MarshalJSON() ([]byte, error)

func (*InputChatPhotoAnimation) UnmarshalJSON

func (inputChatPhotoAnimation *InputChatPhotoAnimation) UnmarshalJSON(data []byte) error

type InputChatPhotoPrevious

type InputChatPhotoPrevious struct {

	// Identifier of the current user's profile photo to reuse
	ChatPhotoId JsonInt64 `json:"chat_photo_id"`
	// contains filtered or unexported fields
}

A previously used profile photo of the current user

func UnmarshalInputChatPhotoPrevious

func UnmarshalInputChatPhotoPrevious(data json.RawMessage) (*InputChatPhotoPrevious, error)

func (*InputChatPhotoPrevious) GetClass

func (*InputChatPhotoPrevious) GetClass() string

func (*InputChatPhotoPrevious) GetType

func (*InputChatPhotoPrevious) GetType() string

func (*InputChatPhotoPrevious) InputChatPhotoType

func (*InputChatPhotoPrevious) InputChatPhotoType() string

func (*InputChatPhotoPrevious) MarshalJSON

func (entity *InputChatPhotoPrevious) MarshalJSON() ([]byte, error)

type InputChatPhotoStatic

type InputChatPhotoStatic struct {

	// Photo to be set as profile photo. Only inputFileLocal and inputFileGenerated are allowed
	Photo InputFile `json:"photo"`
	// contains filtered or unexported fields
}

A static photo in JPEG format

func UnmarshalInputChatPhotoStatic

func UnmarshalInputChatPhotoStatic(data json.RawMessage) (*InputChatPhotoStatic, error)

func (*InputChatPhotoStatic) GetClass

func (*InputChatPhotoStatic) GetClass() string

func (*InputChatPhotoStatic) GetType

func (*InputChatPhotoStatic) GetType() string

func (*InputChatPhotoStatic) InputChatPhotoType

func (*InputChatPhotoStatic) InputChatPhotoType() string

func (*InputChatPhotoStatic) MarshalJSON

func (entity *InputChatPhotoStatic) MarshalJSON() ([]byte, error)

func (*InputChatPhotoStatic) UnmarshalJSON

func (inputChatPhotoStatic *InputChatPhotoStatic) UnmarshalJSON(data []byte) error

type InputCredentials

type InputCredentials interface {
	InputCredentialsType() string
}

Contains information about the payment method chosen by the user

func UnmarshalInputCredentials

func UnmarshalInputCredentials(data json.RawMessage) (InputCredentials, error)

func UnmarshalListOfInputCredentials

func UnmarshalListOfInputCredentials(dataList []json.RawMessage) ([]InputCredentials, error)

type InputCredentialsApplePay

type InputCredentialsApplePay struct {

	// JSON-encoded data with the credential identifier
	Data string `json:"data"`
	// contains filtered or unexported fields
}

Applies if a user enters new credentials using Apple Pay

func UnmarshalInputCredentialsApplePay

func UnmarshalInputCredentialsApplePay(data json.RawMessage) (*InputCredentialsApplePay, error)

func (*InputCredentialsApplePay) GetClass

func (*InputCredentialsApplePay) GetClass() string

func (*InputCredentialsApplePay) GetType

func (*InputCredentialsApplePay) GetType() string

func (*InputCredentialsApplePay) InputCredentialsType

func (*InputCredentialsApplePay) InputCredentialsType() string

func (*InputCredentialsApplePay) MarshalJSON

func (entity *InputCredentialsApplePay) MarshalJSON() ([]byte, error)

type InputCredentialsGooglePay added in v1.7.10

type InputCredentialsGooglePay struct {

	// JSON-encoded data with the credential identifier
	Data string `json:"data"`
	// contains filtered or unexported fields
}

Applies if a user enters new credentials using Google Pay

func UnmarshalInputCredentialsGooglePay added in v1.7.10

func UnmarshalInputCredentialsGooglePay(data json.RawMessage) (*InputCredentialsGooglePay, error)

func (*InputCredentialsGooglePay) GetClass added in v1.7.10

func (*InputCredentialsGooglePay) GetClass() string

func (*InputCredentialsGooglePay) GetType added in v1.7.10

func (*InputCredentialsGooglePay) GetType() string

func (*InputCredentialsGooglePay) InputCredentialsType added in v1.7.10

func (*InputCredentialsGooglePay) InputCredentialsType() string

func (*InputCredentialsGooglePay) MarshalJSON added in v1.7.10

func (entity *InputCredentialsGooglePay) MarshalJSON() ([]byte, error)

type InputCredentialsNew

type InputCredentialsNew struct {

	// JSON-encoded data with the credential identifier from the payment provider
	Data string `json:"data"`
	// True, if the credential identifier can be saved on the server side
	AllowSave bool `json:"allow_save"`
	// contains filtered or unexported fields
}

Applies if a user enters new credentials on a payment provider website

func UnmarshalInputCredentialsNew

func UnmarshalInputCredentialsNew(data json.RawMessage) (*InputCredentialsNew, error)

func (*InputCredentialsNew) GetClass

func (*InputCredentialsNew) GetClass() string

func (*InputCredentialsNew) GetType

func (*InputCredentialsNew) GetType() string

func (*InputCredentialsNew) InputCredentialsType

func (*InputCredentialsNew) InputCredentialsType() string

func (*InputCredentialsNew) MarshalJSON

func (entity *InputCredentialsNew) MarshalJSON() ([]byte, error)

type InputCredentialsSaved

type InputCredentialsSaved struct {

	// Identifier of the saved credentials
	SavedCredentialsId string `json:"saved_credentials_id"`
	// contains filtered or unexported fields
}

Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password

func UnmarshalInputCredentialsSaved

func UnmarshalInputCredentialsSaved(data json.RawMessage) (*InputCredentialsSaved, error)

func (*InputCredentialsSaved) GetClass

func (*InputCredentialsSaved) GetClass() string

func (*InputCredentialsSaved) GetType

func (*InputCredentialsSaved) GetType() string

func (*InputCredentialsSaved) InputCredentialsType

func (*InputCredentialsSaved) InputCredentialsType() string

func (*InputCredentialsSaved) MarshalJSON

func (entity *InputCredentialsSaved) MarshalJSON() ([]byte, error)

type InputFile

type InputFile interface {
	InputFileType() string
}

Points to a file

func UnmarshalInputFile

func UnmarshalInputFile(data json.RawMessage) (InputFile, error)

func UnmarshalListOfInputFile

func UnmarshalListOfInputFile(dataList []json.RawMessage) ([]InputFile, error)

type InputFileGenerated

type InputFileGenerated struct {

	// Local path to a file from which the file is generated; may be empty if there is no such file
	OriginalPath string `json:"original_path"`
	// String specifying the conversion applied to the original file; must be persistent across application restarts. Conversions beginning with '#' are reserved for internal TDLib usage
	Conversion string `json:"conversion"`
	// Expected size of the generated file, in bytes; 0 if unknown
	ExpectedSize int32 `json:"expected_size"`
	// contains filtered or unexported fields
}

A file generated by the application

func UnmarshalInputFileGenerated

func UnmarshalInputFileGenerated(data json.RawMessage) (*InputFileGenerated, error)

func (*InputFileGenerated) GetClass

func (*InputFileGenerated) GetClass() string

func (*InputFileGenerated) GetType

func (*InputFileGenerated) GetType() string

func (*InputFileGenerated) InputFileType

func (*InputFileGenerated) InputFileType() string

func (*InputFileGenerated) MarshalJSON

func (entity *InputFileGenerated) MarshalJSON() ([]byte, error)

type InputFileId

type InputFileId struct {

	// Unique file identifier
	Id int32 `json:"id"`
	// contains filtered or unexported fields
}

A file defined by its unique ID

func UnmarshalInputFileId

func UnmarshalInputFileId(data json.RawMessage) (*InputFileId, error)

func (*InputFileId) GetClass

func (*InputFileId) GetClass() string

func (*InputFileId) GetType

func (*InputFileId) GetType() string

func (*InputFileId) InputFileType

func (*InputFileId) InputFileType() string

func (*InputFileId) MarshalJSON

func (entity *InputFileId) MarshalJSON() ([]byte, error)

type InputFileLocal

type InputFileLocal struct {

	// Local path to the file
	Path string `json:"path"`
	// contains filtered or unexported fields
}

A file defined by a local path

func UnmarshalInputFileLocal

func UnmarshalInputFileLocal(data json.RawMessage) (*InputFileLocal, error)

func (*InputFileLocal) GetClass

func (*InputFileLocal) GetClass() string

func (*InputFileLocal) GetType

func (*InputFileLocal) GetType() string

func (*InputFileLocal) InputFileType

func (*InputFileLocal) InputFileType() string

func (*InputFileLocal) MarshalJSON

func (entity *InputFileLocal) MarshalJSON() ([]byte, error)

type InputFileRemote

type InputFileRemote struct {

	// Remote file identifier
	Id string `json:"id"`
	// contains filtered or unexported fields
}

A file defined by its remote ID. The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known to TDLib. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application

func UnmarshalInputFileRemote

func UnmarshalInputFileRemote(data json.RawMessage) (*InputFileRemote, error)

func (*InputFileRemote) GetClass

func (*InputFileRemote) GetClass() string

func (*InputFileRemote) GetType

func (*InputFileRemote) GetType() string

func (*InputFileRemote) InputFileType

func (*InputFileRemote) InputFileType() string

func (*InputFileRemote) MarshalJSON

func (entity *InputFileRemote) MarshalJSON() ([]byte, error)

type InputIdentityDocument

type InputIdentityDocument struct {

	// Document number; 1-24 characters
	Number string `json:"number"`
	// Document expiry date; pass null if not applicable
	ExpiryDate *Date `json:"expiry_date"`
	// Front side of the document
	FrontSide InputFile `json:"front_side"`
	// Reverse side of the document; only for driver license and identity card; pass null otherwise
	ReverseSide InputFile `json:"reverse_side"`
	// Selfie with the document; pass null if unavailable
	Selfie InputFile `json:"selfie"`
	// List of files containing a certified English translation of the document
	Translation []InputFile `json:"translation"`
	// contains filtered or unexported fields
}

An identity document to be saved to Telegram Passport

func UnmarshalInputIdentityDocument

func UnmarshalInputIdentityDocument(data json.RawMessage) (*InputIdentityDocument, error)

func (*InputIdentityDocument) GetClass

func (*InputIdentityDocument) GetClass() string

func (*InputIdentityDocument) GetType

func (*InputIdentityDocument) GetType() string

func (*InputIdentityDocument) MarshalJSON

func (entity *InputIdentityDocument) MarshalJSON() ([]byte, error)

func (*InputIdentityDocument) UnmarshalJSON

func (inputIdentityDocument *InputIdentityDocument) UnmarshalJSON(data []byte) error

type InputInlineQueryResult

type InputInlineQueryResult interface {
	InputInlineQueryResultType() string
}

Represents a single result of an inline query; for bots only

func UnmarshalInputInlineQueryResult

func UnmarshalInputInlineQueryResult(data json.RawMessage) (InputInlineQueryResult, error)

func UnmarshalListOfInputInlineQueryResult

func UnmarshalListOfInputInlineQueryResult(dataList []json.RawMessage) ([]InputInlineQueryResult, error)

type InputInlineQueryResultAnimation

type InputInlineQueryResultAnimation struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Title of the query result
	Title string `json:"title"`
	// URL of the result thumbnail (JPEG, GIF, or MPEG4), if it exists
	ThumbnailUrl string `json:"thumbnail_url"`
	// MIME type of the video thumbnail. If non-empty, must be one of "image/jpeg", "image/gif" and "video/mp4"
	ThumbnailMimeType string `json:"thumbnail_mime_type"`
	// The URL of the video file (file size must not exceed 1MB)
	VideoUrl string `json:"video_url"`
	// MIME type of the video file. Must be one of "image/gif" and "video/mp4"
	VideoMimeType string `json:"video_mime_type"`
	// Duration of the video, in seconds
	VideoDuration int32 `json:"video_duration"`
	// Width of the video
	VideoWidth int32 `json:"video_width"`
	// Height of the video
	VideoHeight int32 `json:"video_height"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAnimation, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents a link to an animated GIF or an animated (i.e., without sound) H.264/MPEG-4 AVC video

func UnmarshalInputInlineQueryResultAnimation

func UnmarshalInputInlineQueryResultAnimation(data json.RawMessage) (*InputInlineQueryResultAnimation, error)

func (*InputInlineQueryResultAnimation) GetClass

func (*InputInlineQueryResultAnimation) GetType

func (*InputInlineQueryResultAnimation) InputInlineQueryResultType

func (*InputInlineQueryResultAnimation) InputInlineQueryResultType() string

func (*InputInlineQueryResultAnimation) MarshalJSON

func (entity *InputInlineQueryResultAnimation) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultAnimation) UnmarshalJSON

func (inputInlineQueryResultAnimation *InputInlineQueryResultAnimation) UnmarshalJSON(data []byte) error

type InputInlineQueryResultArticle

type InputInlineQueryResultArticle struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// URL of the result, if it exists
	Url string `json:"url"`
	// True, if the URL must be not shown
	HideUrl bool `json:"hide_url"`
	// Title of the result
	Title string `json:"title"`
	// A short description of the result
	Description string `json:"description"`
	// URL of the result thumbnail, if it exists
	ThumbnailUrl string `json:"thumbnail_url"`
	// Thumbnail width, if known
	ThumbnailWidth int32 `json:"thumbnail_width"`
	// Thumbnail height, if known
	ThumbnailHeight int32 `json:"thumbnail_height"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents a link to an article or web page

func UnmarshalInputInlineQueryResultArticle

func UnmarshalInputInlineQueryResultArticle(data json.RawMessage) (*InputInlineQueryResultArticle, error)

func (*InputInlineQueryResultArticle) GetClass

func (*InputInlineQueryResultArticle) GetType

func (*InputInlineQueryResultArticle) InputInlineQueryResultType

func (*InputInlineQueryResultArticle) InputInlineQueryResultType() string

func (*InputInlineQueryResultArticle) MarshalJSON

func (entity *InputInlineQueryResultArticle) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultArticle) UnmarshalJSON

func (inputInlineQueryResultArticle *InputInlineQueryResultArticle) UnmarshalJSON(data []byte) error

type InputInlineQueryResultAudio

type InputInlineQueryResultAudio struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Title of the audio file
	Title string `json:"title"`
	// Performer of the audio file
	Performer string `json:"performer"`
	// The URL of the audio file
	AudioUrl string `json:"audio_url"`
	// Audio file duration, in seconds
	AudioDuration int32 `json:"audio_duration"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageAudio, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents a link to an MP3 audio file

func UnmarshalInputInlineQueryResultAudio

func UnmarshalInputInlineQueryResultAudio(data json.RawMessage) (*InputInlineQueryResultAudio, error)

func (*InputInlineQueryResultAudio) GetClass

func (*InputInlineQueryResultAudio) GetClass() string

func (*InputInlineQueryResultAudio) GetType

func (*InputInlineQueryResultAudio) InputInlineQueryResultType

func (*InputInlineQueryResultAudio) InputInlineQueryResultType() string

func (*InputInlineQueryResultAudio) MarshalJSON

func (entity *InputInlineQueryResultAudio) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultAudio) UnmarshalJSON

func (inputInlineQueryResultAudio *InputInlineQueryResultAudio) UnmarshalJSON(data []byte) error

type InputInlineQueryResultContact

type InputInlineQueryResultContact struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// User contact
	Contact *Contact `json:"contact"`
	// URL of the result thumbnail, if it exists
	ThumbnailUrl string `json:"thumbnail_url"`
	// Thumbnail width, if known
	ThumbnailWidth int32 `json:"thumbnail_width"`
	// Thumbnail height, if known
	ThumbnailHeight int32 `json:"thumbnail_height"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents a user contact

func UnmarshalInputInlineQueryResultContact

func UnmarshalInputInlineQueryResultContact(data json.RawMessage) (*InputInlineQueryResultContact, error)

func (*InputInlineQueryResultContact) GetClass

func (*InputInlineQueryResultContact) GetType

func (*InputInlineQueryResultContact) InputInlineQueryResultType

func (*InputInlineQueryResultContact) InputInlineQueryResultType() string

func (*InputInlineQueryResultContact) MarshalJSON

func (entity *InputInlineQueryResultContact) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultContact) UnmarshalJSON

func (inputInlineQueryResultContact *InputInlineQueryResultContact) UnmarshalJSON(data []byte) error

type InputInlineQueryResultDocument

type InputInlineQueryResultDocument struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Title of the resulting file
	Title string `json:"title"`
	// Short description of the result, if known
	Description string `json:"description"`
	// URL of the file
	DocumentUrl string `json:"document_url"`
	// MIME type of the file content; only "application/pdf" and "application/zip" are currently allowed
	MimeType string `json:"mime_type"`
	// The URL of the file thumbnail, if it exists
	ThumbnailUrl string `json:"thumbnail_url"`
	// Width of the thumbnail
	ThumbnailWidth int32 `json:"thumbnail_width"`
	// Height of the thumbnail
	ThumbnailHeight int32 `json:"thumbnail_height"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageDocument, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents a link to a file

func UnmarshalInputInlineQueryResultDocument

func UnmarshalInputInlineQueryResultDocument(data json.RawMessage) (*InputInlineQueryResultDocument, error)

func (*InputInlineQueryResultDocument) GetClass

func (*InputInlineQueryResultDocument) GetType

func (*InputInlineQueryResultDocument) InputInlineQueryResultType

func (*InputInlineQueryResultDocument) InputInlineQueryResultType() string

func (*InputInlineQueryResultDocument) MarshalJSON

func (entity *InputInlineQueryResultDocument) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultDocument) UnmarshalJSON

func (inputInlineQueryResultDocument *InputInlineQueryResultDocument) UnmarshalJSON(data []byte) error

type InputInlineQueryResultGame

type InputInlineQueryResultGame struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Short name of the game
	GameShortName string `json:"game_short_name"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// contains filtered or unexported fields
}

Represents a game

func UnmarshalInputInlineQueryResultGame

func UnmarshalInputInlineQueryResultGame(data json.RawMessage) (*InputInlineQueryResultGame, error)

func (*InputInlineQueryResultGame) GetClass

func (*InputInlineQueryResultGame) GetClass() string

func (*InputInlineQueryResultGame) GetType

func (*InputInlineQueryResultGame) InputInlineQueryResultType

func (*InputInlineQueryResultGame) InputInlineQueryResultType() string

func (*InputInlineQueryResultGame) MarshalJSON

func (entity *InputInlineQueryResultGame) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultGame) UnmarshalJSON

func (inputInlineQueryResultGame *InputInlineQueryResultGame) UnmarshalJSON(data []byte) error

type InputInlineQueryResultLocation

type InputInlineQueryResultLocation struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Location result
	Location *Location `json:"location"`
	// Amount of time relative to the message sent time until the location can be updated, in seconds
	LivePeriod int32 `json:"live_period"`
	// Title of the result
	Title string `json:"title"`
	// URL of the result thumbnail, if it exists
	ThumbnailUrl string `json:"thumbnail_url"`
	// Thumbnail width, if known
	ThumbnailWidth int32 `json:"thumbnail_width"`
	// Thumbnail height, if known
	ThumbnailHeight int32 `json:"thumbnail_height"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents a point on the map

func UnmarshalInputInlineQueryResultLocation

func UnmarshalInputInlineQueryResultLocation(data json.RawMessage) (*InputInlineQueryResultLocation, error)

func (*InputInlineQueryResultLocation) GetClass

func (*InputInlineQueryResultLocation) GetType

func (*InputInlineQueryResultLocation) InputInlineQueryResultType

func (*InputInlineQueryResultLocation) InputInlineQueryResultType() string

func (*InputInlineQueryResultLocation) MarshalJSON

func (entity *InputInlineQueryResultLocation) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultLocation) UnmarshalJSON

func (inputInlineQueryResultLocation *InputInlineQueryResultLocation) UnmarshalJSON(data []byte) error

type InputInlineQueryResultPhoto

type InputInlineQueryResultPhoto struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Title of the result, if known
	Title string `json:"title"`
	// A short description of the result, if known
	Description string `json:"description"`
	// URL of the photo thumbnail, if it exists
	ThumbnailUrl string `json:"thumbnail_url"`
	// The URL of the JPEG photo (photo size must not exceed 5MB)
	PhotoUrl string `json:"photo_url"`
	// Width of the photo
	PhotoWidth int32 `json:"photo_width"`
	// Height of the photo
	PhotoHeight int32 `json:"photo_height"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessagePhoto, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents link to a JPEG image

func UnmarshalInputInlineQueryResultPhoto

func UnmarshalInputInlineQueryResultPhoto(data json.RawMessage) (*InputInlineQueryResultPhoto, error)

func (*InputInlineQueryResultPhoto) GetClass

func (*InputInlineQueryResultPhoto) GetClass() string

func (*InputInlineQueryResultPhoto) GetType

func (*InputInlineQueryResultPhoto) InputInlineQueryResultType

func (*InputInlineQueryResultPhoto) InputInlineQueryResultType() string

func (*InputInlineQueryResultPhoto) MarshalJSON

func (entity *InputInlineQueryResultPhoto) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultPhoto) UnmarshalJSON

func (inputInlineQueryResultPhoto *InputInlineQueryResultPhoto) UnmarshalJSON(data []byte) error

type InputInlineQueryResultSticker

type InputInlineQueryResultSticker struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// URL of the sticker thumbnail, if it exists
	ThumbnailUrl string `json:"thumbnail_url"`
	// The URL of the WEBP, TGS, or WEBM sticker (sticker file size must not exceed 5MB)
	StickerUrl string `json:"sticker_url"`
	// Width of the sticker
	StickerWidth int32 `json:"sticker_width"`
	// Height of the sticker
	StickerHeight int32 `json:"sticker_height"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageSticker, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents a link to a WEBP, TGS, or WEBM sticker

func UnmarshalInputInlineQueryResultSticker

func UnmarshalInputInlineQueryResultSticker(data json.RawMessage) (*InputInlineQueryResultSticker, error)

func (*InputInlineQueryResultSticker) GetClass

func (*InputInlineQueryResultSticker) GetType

func (*InputInlineQueryResultSticker) InputInlineQueryResultType

func (*InputInlineQueryResultSticker) InputInlineQueryResultType() string

func (*InputInlineQueryResultSticker) MarshalJSON

func (entity *InputInlineQueryResultSticker) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultSticker) UnmarshalJSON

func (inputInlineQueryResultSticker *InputInlineQueryResultSticker) UnmarshalJSON(data []byte) error

type InputInlineQueryResultVenue

type InputInlineQueryResultVenue struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Venue result
	Venue *Venue `json:"venue"`
	// URL of the result thumbnail, if it exists
	ThumbnailUrl string `json:"thumbnail_url"`
	// Thumbnail width, if known
	ThumbnailWidth int32 `json:"thumbnail_width"`
	// Thumbnail height, if known
	ThumbnailHeight int32 `json:"thumbnail_height"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents information about a venue

func UnmarshalInputInlineQueryResultVenue

func UnmarshalInputInlineQueryResultVenue(data json.RawMessage) (*InputInlineQueryResultVenue, error)

func (*InputInlineQueryResultVenue) GetClass

func (*InputInlineQueryResultVenue) GetClass() string

func (*InputInlineQueryResultVenue) GetType

func (*InputInlineQueryResultVenue) InputInlineQueryResultType

func (*InputInlineQueryResultVenue) InputInlineQueryResultType() string

func (*InputInlineQueryResultVenue) MarshalJSON

func (entity *InputInlineQueryResultVenue) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultVenue) UnmarshalJSON

func (inputInlineQueryResultVenue *InputInlineQueryResultVenue) UnmarshalJSON(data []byte) error

type InputInlineQueryResultVideo

type InputInlineQueryResultVideo struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Title of the result
	Title string `json:"title"`
	// A short description of the result, if known
	Description string `json:"description"`
	// The URL of the video thumbnail (JPEG), if it exists
	ThumbnailUrl string `json:"thumbnail_url"`
	// URL of the embedded video player or video file
	VideoUrl string `json:"video_url"`
	// MIME type of the content of the video URL, only "text/html" or "video/mp4" are currently supported
	MimeType string `json:"mime_type"`
	// Width of the video
	VideoWidth int32 `json:"video_width"`
	// Height of the video
	VideoHeight int32 `json:"video_height"`
	// Video duration, in seconds
	VideoDuration int32 `json:"video_duration"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageVideo, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents a link to a page containing an embedded video player or a video file

func UnmarshalInputInlineQueryResultVideo

func UnmarshalInputInlineQueryResultVideo(data json.RawMessage) (*InputInlineQueryResultVideo, error)

func (*InputInlineQueryResultVideo) GetClass

func (*InputInlineQueryResultVideo) GetClass() string

func (*InputInlineQueryResultVideo) GetType

func (*InputInlineQueryResultVideo) InputInlineQueryResultType

func (*InputInlineQueryResultVideo) InputInlineQueryResultType() string

func (*InputInlineQueryResultVideo) MarshalJSON

func (entity *InputInlineQueryResultVideo) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultVideo) UnmarshalJSON

func (inputInlineQueryResultVideo *InputInlineQueryResultVideo) UnmarshalJSON(data []byte) error

type InputInlineQueryResultVoiceNote

type InputInlineQueryResultVoiceNote struct {

	// Unique identifier of the query result
	Id string `json:"id"`
	// Title of the voice note
	Title string `json:"title"`
	// The URL of the voice note file
	VoiceNoteUrl string `json:"voice_note_url"`
	// Duration of the voice note, in seconds
	VoiceNoteDuration int32 `json:"voice_note_duration"`
	// The message reply markup; pass null if none. Must be of type replyMarkupInlineKeyboard or null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent. Must be one of the following types: inputMessageText, inputMessageVoiceNote, inputMessageInvoice, inputMessageLocation, inputMessageVenue or inputMessageContact
	InputMessageContent InputMessageContent `json:"input_message_content"`
	// contains filtered or unexported fields
}

Represents a link to an opus-encoded audio file within an OGG container, single channel audio

func UnmarshalInputInlineQueryResultVoiceNote

func UnmarshalInputInlineQueryResultVoiceNote(data json.RawMessage) (*InputInlineQueryResultVoiceNote, error)

func (*InputInlineQueryResultVoiceNote) GetClass

func (*InputInlineQueryResultVoiceNote) GetType

func (*InputInlineQueryResultVoiceNote) InputInlineQueryResultType

func (*InputInlineQueryResultVoiceNote) InputInlineQueryResultType() string

func (*InputInlineQueryResultVoiceNote) MarshalJSON

func (entity *InputInlineQueryResultVoiceNote) MarshalJSON() ([]byte, error)

func (*InputInlineQueryResultVoiceNote) UnmarshalJSON

func (inputInlineQueryResultVoiceNote *InputInlineQueryResultVoiceNote) UnmarshalJSON(data []byte) error

type InputMessageAnimation

type InputMessageAnimation struct {

	// Animation file to be sent
	Animation InputFile `json:"animation"`
	// Animation thumbnail; pass null to skip thumbnail uploading
	Thumbnail *InputThumbnail `json:"thumbnail"`
	// File identifiers of the stickers added to the animation, if applicable
	AddedStickerFileIds []int32 `json:"added_sticker_file_ids"`
	// Duration of the animation, in seconds
	Duration int32 `json:"duration"`
	// Width of the animation; may be replaced by the server
	Width int32 `json:"width"`
	// Height of the animation; may be replaced by the server
	Height int32 `json:"height"`
	// Animation caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters
	Caption *FormattedText `json:"caption"`
	// contains filtered or unexported fields
}

An animation message (GIF-style).

func UnmarshalInputMessageAnimation

func UnmarshalInputMessageAnimation(data json.RawMessage) (*InputMessageAnimation, error)

func (*InputMessageAnimation) GetClass

func (*InputMessageAnimation) GetClass() string

func (*InputMessageAnimation) GetType

func (*InputMessageAnimation) GetType() string

func (*InputMessageAnimation) InputMessageContentType

func (*InputMessageAnimation) InputMessageContentType() string

func (*InputMessageAnimation) MarshalJSON

func (entity *InputMessageAnimation) MarshalJSON() ([]byte, error)

func (*InputMessageAnimation) UnmarshalJSON

func (inputMessageAnimation *InputMessageAnimation) UnmarshalJSON(data []byte) error

type InputMessageAudio

type InputMessageAudio struct {

	// Audio file to be sent
	Audio InputFile `json:"audio"`
	// Thumbnail of the cover for the album; pass null to skip thumbnail uploading
	AlbumCoverThumbnail *InputThumbnail `json:"album_cover_thumbnail"`
	// Duration of the audio, in seconds; may be replaced by the server
	Duration int32 `json:"duration"`
	// Title of the audio; 0-64 characters; may be replaced by the server
	Title string `json:"title"`
	// Performer of the audio; 0-64 characters, may be replaced by the server
	Performer string `json:"performer"`
	// Audio caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters
	Caption *FormattedText `json:"caption"`
	// contains filtered or unexported fields
}

An audio message

func UnmarshalInputMessageAudio

func UnmarshalInputMessageAudio(data json.RawMessage) (*InputMessageAudio, error)

func (*InputMessageAudio) GetClass

func (*InputMessageAudio) GetClass() string

func (*InputMessageAudio) GetType

func (*InputMessageAudio) GetType() string

func (*InputMessageAudio) InputMessageContentType

func (*InputMessageAudio) InputMessageContentType() string

func (*InputMessageAudio) MarshalJSON

func (entity *InputMessageAudio) MarshalJSON() ([]byte, error)

func (*InputMessageAudio) UnmarshalJSON

func (inputMessageAudio *InputMessageAudio) UnmarshalJSON(data []byte) error

type InputMessageContact

type InputMessageContact struct {

	// Contact to send
	Contact *Contact `json:"contact"`
	// contains filtered or unexported fields
}

A message containing a user contact

func UnmarshalInputMessageContact

func UnmarshalInputMessageContact(data json.RawMessage) (*InputMessageContact, error)

func (*InputMessageContact) GetClass

func (*InputMessageContact) GetClass() string

func (*InputMessageContact) GetType

func (*InputMessageContact) GetType() string

func (*InputMessageContact) InputMessageContentType

func (*InputMessageContact) InputMessageContentType() string

func (*InputMessageContact) MarshalJSON

func (entity *InputMessageContact) MarshalJSON() ([]byte, error)

type InputMessageContent

type InputMessageContent interface {
	InputMessageContentType() string
}

The content of a message to send

func UnmarshalInputMessageContent

func UnmarshalInputMessageContent(data json.RawMessage) (InputMessageContent, error)

func UnmarshalListOfInputMessageContent

func UnmarshalListOfInputMessageContent(dataList []json.RawMessage) ([]InputMessageContent, error)

type InputMessageDice

type InputMessageDice struct {

	// Emoji on which the dice throw animation is based
	Emoji string `json:"emoji"`
	// True, if the chat message draft must be deleted
	ClearDraft bool `json:"clear_draft"`
	// contains filtered or unexported fields
}

A dice message

func UnmarshalInputMessageDice

func UnmarshalInputMessageDice(data json.RawMessage) (*InputMessageDice, error)

func (*InputMessageDice) GetClass

func (*InputMessageDice) GetClass() string

func (*InputMessageDice) GetType

func (*InputMessageDice) GetType() string

func (*InputMessageDice) InputMessageContentType

func (*InputMessageDice) InputMessageContentType() string

func (*InputMessageDice) MarshalJSON

func (entity *InputMessageDice) MarshalJSON() ([]byte, error)

type InputMessageDocument

type InputMessageDocument struct {

	// Document to be sent
	Document InputFile `json:"document"`
	// Document thumbnail; pass null to skip thumbnail uploading
	Thumbnail *InputThumbnail `json:"thumbnail"`
	// If true, automatic file type detection will be disabled and the document will be always sent as file. Always true for files sent to secret chats
	DisableContentTypeDetection bool `json:"disable_content_type_detection"`
	// Document caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters
	Caption *FormattedText `json:"caption"`
	// contains filtered or unexported fields
}

A document message (general file)

func UnmarshalInputMessageDocument

func UnmarshalInputMessageDocument(data json.RawMessage) (*InputMessageDocument, error)

func (*InputMessageDocument) GetClass

func (*InputMessageDocument) GetClass() string

func (*InputMessageDocument) GetType

func (*InputMessageDocument) GetType() string

func (*InputMessageDocument) InputMessageContentType

func (*InputMessageDocument) InputMessageContentType() string

func (*InputMessageDocument) MarshalJSON

func (entity *InputMessageDocument) MarshalJSON() ([]byte, error)

func (*InputMessageDocument) UnmarshalJSON

func (inputMessageDocument *InputMessageDocument) UnmarshalJSON(data []byte) error

type InputMessageForwarded

type InputMessageForwarded struct {

	// Identifier for the chat this forwarded message came from
	FromChatId int64 `json:"from_chat_id"`
	// Identifier of the message to forward
	MessageId int64 `json:"message_id"`
	// True, if a game message is being shared from a launched game; applies only to game messages
	InGameShare bool `json:"in_game_share"`
	// Options to be used to copy content of the message without reference to the original sender; pass null to forward the message as usual
	CopyOptions *MessageCopyOptions `json:"copy_options"`
	// contains filtered or unexported fields
}

A forwarded message

func UnmarshalInputMessageForwarded

func UnmarshalInputMessageForwarded(data json.RawMessage) (*InputMessageForwarded, error)

func (*InputMessageForwarded) GetClass

func (*InputMessageForwarded) GetClass() string

func (*InputMessageForwarded) GetType

func (*InputMessageForwarded) GetType() string

func (*InputMessageForwarded) InputMessageContentType

func (*InputMessageForwarded) InputMessageContentType() string

func (*InputMessageForwarded) MarshalJSON

func (entity *InputMessageForwarded) MarshalJSON() ([]byte, error)

type InputMessageGame

type InputMessageGame struct {

	// User identifier of the bot that owns the game
	BotUserId int64 `json:"bot_user_id"`
	// Short name of the game
	GameShortName string `json:"game_short_name"`
	// contains filtered or unexported fields
}

A message with a game; not supported for channels or secret chats

func UnmarshalInputMessageGame

func UnmarshalInputMessageGame(data json.RawMessage) (*InputMessageGame, error)

func (*InputMessageGame) GetClass

func (*InputMessageGame) GetClass() string

func (*InputMessageGame) GetType

func (*InputMessageGame) GetType() string

func (*InputMessageGame) InputMessageContentType

func (*InputMessageGame) InputMessageContentType() string

func (*InputMessageGame) MarshalJSON

func (entity *InputMessageGame) MarshalJSON() ([]byte, error)

type InputMessageInvoice

type InputMessageInvoice struct {

	// Invoice
	Invoice *Invoice `json:"invoice"`
	// Product title; 1-32 characters
	Title string `json:"title"`
	// Product description; 0-255 characters
	Description string `json:"description"`
	// Product photo URL; optional
	PhotoUrl string `json:"photo_url"`
	// Product photo size
	PhotoSize int32 `json:"photo_size"`
	// Product photo width
	PhotoWidth int32 `json:"photo_width"`
	// Product photo height
	PhotoHeight int32 `json:"photo_height"`
	// The invoice payload
	Payload []byte `json:"payload"`
	// Payment provider token
	ProviderToken string `json:"provider_token"`
	// JSON-encoded data about the invoice, which will be shared with the payment provider
	ProviderData string `json:"provider_data"`
	// Unique invoice bot deep link parameter for the generation of this invoice. If empty, it would be possible to pay directly from forwards of the invoice message
	StartParameter string `json:"start_parameter"`
	// contains filtered or unexported fields
}

A message with an invoice; can be used only by bots

func UnmarshalInputMessageInvoice

func UnmarshalInputMessageInvoice(data json.RawMessage) (*InputMessageInvoice, error)

func (*InputMessageInvoice) GetClass

func (*InputMessageInvoice) GetClass() string

func (*InputMessageInvoice) GetType

func (*InputMessageInvoice) GetType() string

func (*InputMessageInvoice) InputMessageContentType

func (*InputMessageInvoice) InputMessageContentType() string

func (*InputMessageInvoice) MarshalJSON

func (entity *InputMessageInvoice) MarshalJSON() ([]byte, error)

type InputMessageLocation

type InputMessageLocation struct {

	// Location to be sent
	Location *Location `json:"location"`
	// Period for which the location can be updated, in seconds; must be between 60 and 86400 for a live location and 0 otherwise
	LivePeriod int32 `json:"live_period"`
	// For live locations, a direction in which the location moves, in degrees; 1-360. Pass 0 if unknown
	Heading int32 `json:"heading"`
	// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled. Can't be enabled in channels and Saved Messages
	ProximityAlertRadius int32 `json:"proximity_alert_radius"`
	// contains filtered or unexported fields
}

A message with a location

func UnmarshalInputMessageLocation

func UnmarshalInputMessageLocation(data json.RawMessage) (*InputMessageLocation, error)

func (*InputMessageLocation) GetClass

func (*InputMessageLocation) GetClass() string

func (*InputMessageLocation) GetType

func (*InputMessageLocation) GetType() string

func (*InputMessageLocation) InputMessageContentType

func (*InputMessageLocation) InputMessageContentType() string

func (*InputMessageLocation) MarshalJSON

func (entity *InputMessageLocation) MarshalJSON() ([]byte, error)

type InputMessagePhoto

type InputMessagePhoto struct {

	// Photo to send
	Photo InputFile `json:"photo"`
	// Photo thumbnail to be sent; pass null to skip thumbnail uploading. The thumbnail is sent to the other party only in secret chats
	Thumbnail *InputThumbnail `json:"thumbnail"`
	// File identifiers of the stickers added to the photo, if applicable
	AddedStickerFileIds []int32 `json:"added_sticker_file_ids"`
	// Photo width
	Width int32 `json:"width"`
	// Photo height
	Height int32 `json:"height"`
	// Photo caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters
	Caption *FormattedText `json:"caption"`
	// Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
	Ttl int32 `json:"ttl"`
	// contains filtered or unexported fields
}

A photo message

func UnmarshalInputMessagePhoto

func UnmarshalInputMessagePhoto(data json.RawMessage) (*InputMessagePhoto, error)

func (*InputMessagePhoto) GetClass

func (*InputMessagePhoto) GetClass() string

func (*InputMessagePhoto) GetType

func (*InputMessagePhoto) GetType() string

func (*InputMessagePhoto) InputMessageContentType

func (*InputMessagePhoto) InputMessageContentType() string

func (*InputMessagePhoto) MarshalJSON

func (entity *InputMessagePhoto) MarshalJSON() ([]byte, error)

func (*InputMessagePhoto) UnmarshalJSON

func (inputMessagePhoto *InputMessagePhoto) UnmarshalJSON(data []byte) error

type InputMessagePoll

type InputMessagePoll struct {

	// Poll question; 1-255 characters (up to 300 characters for bots)
	Question string `json:"question"`
	// List of poll answer options, 2-10 strings 1-100 characters each
	Options []string `json:"options"`
	// True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels
	IsAnonymous bool `json:"is_anonymous"`
	// Type of the poll
	Type PollType `json:"type"`
	// Amount of time the poll will be active after creation, in seconds; for bots only
	OpenPeriod int32 `json:"open_period"`
	// Point in time (Unix timestamp) when the poll will automatically be closed; for bots only
	CloseDate int32 `json:"close_date"`
	// True, if the poll needs to be sent already closed; for bots only
	IsClosed bool `json:"is_closed"`
	// contains filtered or unexported fields
}

A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot

func UnmarshalInputMessagePoll

func UnmarshalInputMessagePoll(data json.RawMessage) (*InputMessagePoll, error)

func (*InputMessagePoll) GetClass

func (*InputMessagePoll) GetClass() string

func (*InputMessagePoll) GetType

func (*InputMessagePoll) GetType() string

func (*InputMessagePoll) InputMessageContentType

func (*InputMessagePoll) InputMessageContentType() string

func (*InputMessagePoll) MarshalJSON

func (entity *InputMessagePoll) MarshalJSON() ([]byte, error)

func (*InputMessagePoll) UnmarshalJSON

func (inputMessagePoll *InputMessagePoll) UnmarshalJSON(data []byte) error

type InputMessageSticker

type InputMessageSticker struct {

	// Sticker to be sent
	Sticker InputFile `json:"sticker"`
	// Sticker thumbnail; pass null to skip thumbnail uploading
	Thumbnail *InputThumbnail `json:"thumbnail"`
	// Sticker width
	Width int32 `json:"width"`
	// Sticker height
	Height int32 `json:"height"`
	// Emoji used to choose the sticker
	Emoji string `json:"emoji"`
	// contains filtered or unexported fields
}

A sticker message

func UnmarshalInputMessageSticker

func UnmarshalInputMessageSticker(data json.RawMessage) (*InputMessageSticker, error)

func (*InputMessageSticker) GetClass

func (*InputMessageSticker) GetClass() string

func (*InputMessageSticker) GetType

func (*InputMessageSticker) GetType() string

func (*InputMessageSticker) InputMessageContentType

func (*InputMessageSticker) InputMessageContentType() string

func (*InputMessageSticker) MarshalJSON

func (entity *InputMessageSticker) MarshalJSON() ([]byte, error)

func (*InputMessageSticker) UnmarshalJSON

func (inputMessageSticker *InputMessageSticker) UnmarshalJSON(data []byte) error

type InputMessageText

type InputMessageText struct {

	// Formatted text to be sent; 1-GetOption("message_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, Code, Pre, PreCode, TextUrl and MentionName entities are allowed to be specified manually
	Text *FormattedText `json:"text"`
	// True, if rich web page previews for URLs in the message text must be disabled
	DisableWebPagePreview bool `json:"disable_web_page_preview"`
	// True, if a chat message draft must be deleted
	ClearDraft bool `json:"clear_draft"`
	// contains filtered or unexported fields
}

A text message

func UnmarshalInputMessageText

func UnmarshalInputMessageText(data json.RawMessage) (*InputMessageText, error)

func (*InputMessageText) GetClass

func (*InputMessageText) GetClass() string

func (*InputMessageText) GetType

func (*InputMessageText) GetType() string

func (*InputMessageText) InputMessageContentType

func (*InputMessageText) InputMessageContentType() string

func (*InputMessageText) MarshalJSON

func (entity *InputMessageText) MarshalJSON() ([]byte, error)

type InputMessageVenue

type InputMessageVenue struct {

	// Venue to send
	Venue *Venue `json:"venue"`
	// contains filtered or unexported fields
}

A message with information about a venue

func UnmarshalInputMessageVenue

func UnmarshalInputMessageVenue(data json.RawMessage) (*InputMessageVenue, error)

func (*InputMessageVenue) GetClass

func (*InputMessageVenue) GetClass() string

func (*InputMessageVenue) GetType

func (*InputMessageVenue) GetType() string

func (*InputMessageVenue) InputMessageContentType

func (*InputMessageVenue) InputMessageContentType() string

func (*InputMessageVenue) MarshalJSON

func (entity *InputMessageVenue) MarshalJSON() ([]byte, error)

type InputMessageVideo

type InputMessageVideo struct {

	// Video to be sent
	Video InputFile `json:"video"`
	// Video thumbnail; pass null to skip thumbnail uploading
	Thumbnail *InputThumbnail `json:"thumbnail"`
	// File identifiers of the stickers added to the video, if applicable
	AddedStickerFileIds []int32 `json:"added_sticker_file_ids"`
	// Duration of the video, in seconds
	Duration int32 `json:"duration"`
	// Video width
	Width int32 `json:"width"`
	// Video height
	Height int32 `json:"height"`
	// True, if the video is supposed to be streamed
	SupportsStreaming bool `json:"supports_streaming"`
	// Video caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters
	Caption *FormattedText `json:"caption"`
	// Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
	Ttl int32 `json:"ttl"`
	// contains filtered or unexported fields
}

A video message

func UnmarshalInputMessageVideo

func UnmarshalInputMessageVideo(data json.RawMessage) (*InputMessageVideo, error)

func (*InputMessageVideo) GetClass

func (*InputMessageVideo) GetClass() string

func (*InputMessageVideo) GetType

func (*InputMessageVideo) GetType() string

func (*InputMessageVideo) InputMessageContentType

func (*InputMessageVideo) InputMessageContentType() string

func (*InputMessageVideo) MarshalJSON

func (entity *InputMessageVideo) MarshalJSON() ([]byte, error)

func (*InputMessageVideo) UnmarshalJSON

func (inputMessageVideo *InputMessageVideo) UnmarshalJSON(data []byte) error

type InputMessageVideoNote

type InputMessageVideoNote struct {

	// Video note to be sent
	VideoNote InputFile `json:"video_note"`
	// Video thumbnail; pass null to skip thumbnail uploading
	Thumbnail *InputThumbnail `json:"thumbnail"`
	// Duration of the video, in seconds
	Duration int32 `json:"duration"`
	// Video width and height; must be positive and not greater than 640
	Length int32 `json:"length"`
	// contains filtered or unexported fields
}

A video note message

func UnmarshalInputMessageVideoNote

func UnmarshalInputMessageVideoNote(data json.RawMessage) (*InputMessageVideoNote, error)

func (*InputMessageVideoNote) GetClass

func (*InputMessageVideoNote) GetClass() string

func (*InputMessageVideoNote) GetType

func (*InputMessageVideoNote) GetType() string

func (*InputMessageVideoNote) InputMessageContentType

func (*InputMessageVideoNote) InputMessageContentType() string

func (*InputMessageVideoNote) MarshalJSON

func (entity *InputMessageVideoNote) MarshalJSON() ([]byte, error)

func (*InputMessageVideoNote) UnmarshalJSON

func (inputMessageVideoNote *InputMessageVideoNote) UnmarshalJSON(data []byte) error

type InputMessageVoiceNote

type InputMessageVoiceNote struct {

	// Voice note to be sent
	VoiceNote InputFile `json:"voice_note"`
	// Duration of the voice note, in seconds
	Duration int32 `json:"duration"`
	// Waveform representation of the voice note, in 5-bit format
	Waveform []byte `json:"waveform"`
	// Voice note caption; pass null to use an empty caption; 0-GetOption("message_caption_length_max") characters
	Caption *FormattedText `json:"caption"`
	// contains filtered or unexported fields
}

A voice note message

func UnmarshalInputMessageVoiceNote

func UnmarshalInputMessageVoiceNote(data json.RawMessage) (*InputMessageVoiceNote, error)

func (*InputMessageVoiceNote) GetClass

func (*InputMessageVoiceNote) GetClass() string

func (*InputMessageVoiceNote) GetType

func (*InputMessageVoiceNote) GetType() string

func (*InputMessageVoiceNote) InputMessageContentType

func (*InputMessageVoiceNote) InputMessageContentType() string

func (*InputMessageVoiceNote) MarshalJSON

func (entity *InputMessageVoiceNote) MarshalJSON() ([]byte, error)

func (*InputMessageVoiceNote) UnmarshalJSON

func (inputMessageVoiceNote *InputMessageVoiceNote) UnmarshalJSON(data []byte) error

type InputPassportElement

type InputPassportElement interface {
	InputPassportElementType() string
}

Contains information about a Telegram Passport element to be saved

func UnmarshalInputPassportElement

func UnmarshalInputPassportElement(data json.RawMessage) (InputPassportElement, error)

func UnmarshalListOfInputPassportElement

func UnmarshalListOfInputPassportElement(dataList []json.RawMessage) ([]InputPassportElement, error)

type InputPassportElementAddress

type InputPassportElementAddress struct {

	// The address to be saved
	Address *Address `json:"address"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's address

func UnmarshalInputPassportElementAddress

func UnmarshalInputPassportElementAddress(data json.RawMessage) (*InputPassportElementAddress, error)

func (*InputPassportElementAddress) GetClass

func (*InputPassportElementAddress) GetClass() string

func (*InputPassportElementAddress) GetType

func (*InputPassportElementAddress) InputPassportElementType

func (*InputPassportElementAddress) InputPassportElementType() string

func (*InputPassportElementAddress) MarshalJSON

func (entity *InputPassportElementAddress) MarshalJSON() ([]byte, error)

type InputPassportElementBankStatement

type InputPassportElementBankStatement struct {

	// The bank statement to be saved
	BankStatement *InputPersonalDocument `json:"bank_statement"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's bank statement

func UnmarshalInputPassportElementBankStatement

func UnmarshalInputPassportElementBankStatement(data json.RawMessage) (*InputPassportElementBankStatement, error)

func (*InputPassportElementBankStatement) GetClass

func (*InputPassportElementBankStatement) GetType

func (*InputPassportElementBankStatement) InputPassportElementType

func (*InputPassportElementBankStatement) InputPassportElementType() string

func (*InputPassportElementBankStatement) MarshalJSON

func (entity *InputPassportElementBankStatement) MarshalJSON() ([]byte, error)

type InputPassportElementDriverLicense

type InputPassportElementDriverLicense struct {

	// The driver license to be saved
	DriverLicense *InputIdentityDocument `json:"driver_license"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's driver license

func UnmarshalInputPassportElementDriverLicense

func UnmarshalInputPassportElementDriverLicense(data json.RawMessage) (*InputPassportElementDriverLicense, error)

func (*InputPassportElementDriverLicense) GetClass

func (*InputPassportElementDriverLicense) GetType

func (*InputPassportElementDriverLicense) InputPassportElementType

func (*InputPassportElementDriverLicense) InputPassportElementType() string

func (*InputPassportElementDriverLicense) MarshalJSON

func (entity *InputPassportElementDriverLicense) MarshalJSON() ([]byte, error)

type InputPassportElementEmailAddress

type InputPassportElementEmailAddress struct {

	// The email address to be saved
	EmailAddress string `json:"email_address"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's email address

func UnmarshalInputPassportElementEmailAddress

func UnmarshalInputPassportElementEmailAddress(data json.RawMessage) (*InputPassportElementEmailAddress, error)

func (*InputPassportElementEmailAddress) GetClass

func (*InputPassportElementEmailAddress) GetType

func (*InputPassportElementEmailAddress) InputPassportElementType

func (*InputPassportElementEmailAddress) InputPassportElementType() string

func (*InputPassportElementEmailAddress) MarshalJSON

func (entity *InputPassportElementEmailAddress) MarshalJSON() ([]byte, error)

type InputPassportElementError

type InputPassportElementError struct {

	// Type of Telegram Passport element that has the error
	Type PassportElementType `json:"type"`
	// Error message
	Message string `json:"message"`
	// Error source
	Source InputPassportElementErrorSource `json:"source"`
	// contains filtered or unexported fields
}

Contains the description of an error in a Telegram Passport element; for bots only

func UnmarshalInputPassportElementError

func UnmarshalInputPassportElementError(data json.RawMessage) (*InputPassportElementError, error)

func (*InputPassportElementError) GetClass

func (*InputPassportElementError) GetClass() string

func (*InputPassportElementError) GetType

func (*InputPassportElementError) GetType() string

func (*InputPassportElementError) MarshalJSON

func (entity *InputPassportElementError) MarshalJSON() ([]byte, error)

func (*InputPassportElementError) UnmarshalJSON

func (inputPassportElementError *InputPassportElementError) UnmarshalJSON(data []byte) error

type InputPassportElementErrorSource

type InputPassportElementErrorSource interface {
	InputPassportElementErrorSourceType() string
}

Contains the description of an error in a Telegram Passport element; for bots only

func UnmarshalInputPassportElementErrorSource

func UnmarshalInputPassportElementErrorSource(data json.RawMessage) (InputPassportElementErrorSource, error)

func UnmarshalListOfInputPassportElementErrorSource

func UnmarshalListOfInputPassportElementErrorSource(dataList []json.RawMessage) ([]InputPassportElementErrorSource, error)

type InputPassportElementErrorSourceDataField

type InputPassportElementErrorSourceDataField struct {

	// Field name
	FieldName string `json:"field_name"`
	// Current data hash
	DataHash []byte `json:"data_hash"`
	// contains filtered or unexported fields
}

A data field contains an error. The error is considered resolved when the field's value changes

func UnmarshalInputPassportElementErrorSourceDataField

func UnmarshalInputPassportElementErrorSourceDataField(data json.RawMessage) (*InputPassportElementErrorSourceDataField, error)

func (*InputPassportElementErrorSourceDataField) GetClass

func (*InputPassportElementErrorSourceDataField) GetType

func (*InputPassportElementErrorSourceDataField) InputPassportElementErrorSourceType

func (*InputPassportElementErrorSourceDataField) InputPassportElementErrorSourceType() string

func (*InputPassportElementErrorSourceDataField) MarshalJSON

func (entity *InputPassportElementErrorSourceDataField) MarshalJSON() ([]byte, error)

type InputPassportElementErrorSourceFile

type InputPassportElementErrorSourceFile struct {

	// Current hash of the file which has the error
	FileHash []byte `json:"file_hash"`
	// contains filtered or unexported fields
}

The file contains an error. The error is considered resolved when the file changes

func UnmarshalInputPassportElementErrorSourceFile

func UnmarshalInputPassportElementErrorSourceFile(data json.RawMessage) (*InputPassportElementErrorSourceFile, error)

func (*InputPassportElementErrorSourceFile) GetClass

func (*InputPassportElementErrorSourceFile) GetType

func (*InputPassportElementErrorSourceFile) InputPassportElementErrorSourceType

func (*InputPassportElementErrorSourceFile) InputPassportElementErrorSourceType() string

func (*InputPassportElementErrorSourceFile) MarshalJSON

func (entity *InputPassportElementErrorSourceFile) MarshalJSON() ([]byte, error)

type InputPassportElementErrorSourceFiles

type InputPassportElementErrorSourceFiles struct {

	// Current hashes of all attached files
	FileHashes [][]byte `json:"file_hashes"`
	// contains filtered or unexported fields
}

The list of attached files contains an error. The error is considered resolved when the file list changes

func UnmarshalInputPassportElementErrorSourceFiles

func UnmarshalInputPassportElementErrorSourceFiles(data json.RawMessage) (*InputPassportElementErrorSourceFiles, error)

func (*InputPassportElementErrorSourceFiles) GetClass

func (*InputPassportElementErrorSourceFiles) GetType

func (*InputPassportElementErrorSourceFiles) InputPassportElementErrorSourceType

func (*InputPassportElementErrorSourceFiles) InputPassportElementErrorSourceType() string

func (*InputPassportElementErrorSourceFiles) MarshalJSON

func (entity *InputPassportElementErrorSourceFiles) MarshalJSON() ([]byte, error)

type InputPassportElementErrorSourceFrontSide

type InputPassportElementErrorSourceFrontSide struct {

	// Current hash of the file containing the front side
	FileHash []byte `json:"file_hash"`
	// contains filtered or unexported fields
}

The front side of the document contains an error. The error is considered resolved when the file with the front side of the document changes

func UnmarshalInputPassportElementErrorSourceFrontSide

func UnmarshalInputPassportElementErrorSourceFrontSide(data json.RawMessage) (*InputPassportElementErrorSourceFrontSide, error)

func (*InputPassportElementErrorSourceFrontSide) GetClass

func (*InputPassportElementErrorSourceFrontSide) GetType

func (*InputPassportElementErrorSourceFrontSide) InputPassportElementErrorSourceType

func (*InputPassportElementErrorSourceFrontSide) InputPassportElementErrorSourceType() string

func (*InputPassportElementErrorSourceFrontSide) MarshalJSON

func (entity *InputPassportElementErrorSourceFrontSide) MarshalJSON() ([]byte, error)

type InputPassportElementErrorSourceReverseSide

type InputPassportElementErrorSourceReverseSide struct {

	// Current hash of the file containing the reverse side
	FileHash []byte `json:"file_hash"`
	// contains filtered or unexported fields
}

The reverse side of the document contains an error. The error is considered resolved when the file with the reverse side of the document changes

func UnmarshalInputPassportElementErrorSourceReverseSide

func UnmarshalInputPassportElementErrorSourceReverseSide(data json.RawMessage) (*InputPassportElementErrorSourceReverseSide, error)

func (*InputPassportElementErrorSourceReverseSide) GetClass

func (*InputPassportElementErrorSourceReverseSide) GetType

func (*InputPassportElementErrorSourceReverseSide) InputPassportElementErrorSourceType

func (*InputPassportElementErrorSourceReverseSide) InputPassportElementErrorSourceType() string

func (*InputPassportElementErrorSourceReverseSide) MarshalJSON

func (entity *InputPassportElementErrorSourceReverseSide) MarshalJSON() ([]byte, error)

type InputPassportElementErrorSourceSelfie

type InputPassportElementErrorSourceSelfie struct {

	// Current hash of the file containing the selfie
	FileHash []byte `json:"file_hash"`
	// contains filtered or unexported fields
}

The selfie contains an error. The error is considered resolved when the file with the selfie changes

func UnmarshalInputPassportElementErrorSourceSelfie

func UnmarshalInputPassportElementErrorSourceSelfie(data json.RawMessage) (*InputPassportElementErrorSourceSelfie, error)

func (*InputPassportElementErrorSourceSelfie) GetClass

func (*InputPassportElementErrorSourceSelfie) GetType

func (*InputPassportElementErrorSourceSelfie) InputPassportElementErrorSourceType

func (*InputPassportElementErrorSourceSelfie) InputPassportElementErrorSourceType() string

func (*InputPassportElementErrorSourceSelfie) MarshalJSON

func (entity *InputPassportElementErrorSourceSelfie) MarshalJSON() ([]byte, error)

type InputPassportElementErrorSourceTranslationFile

type InputPassportElementErrorSourceTranslationFile struct {

	// Current hash of the file containing the translation
	FileHash []byte `json:"file_hash"`
	// contains filtered or unexported fields
}

One of the files containing the translation of the document contains an error. The error is considered resolved when the file with the translation changes

func UnmarshalInputPassportElementErrorSourceTranslationFile

func UnmarshalInputPassportElementErrorSourceTranslationFile(data json.RawMessage) (*InputPassportElementErrorSourceTranslationFile, error)

func (*InputPassportElementErrorSourceTranslationFile) GetClass

func (*InputPassportElementErrorSourceTranslationFile) GetType

func (*InputPassportElementErrorSourceTranslationFile) InputPassportElementErrorSourceType

func (*InputPassportElementErrorSourceTranslationFile) InputPassportElementErrorSourceType() string

func (*InputPassportElementErrorSourceTranslationFile) MarshalJSON

func (entity *InputPassportElementErrorSourceTranslationFile) MarshalJSON() ([]byte, error)

type InputPassportElementErrorSourceTranslationFiles

type InputPassportElementErrorSourceTranslationFiles struct {

	// Current hashes of all files with the translation
	FileHashes [][]byte `json:"file_hashes"`
	// contains filtered or unexported fields
}

The translation of the document contains an error. The error is considered resolved when the list of files changes

func UnmarshalInputPassportElementErrorSourceTranslationFiles

func UnmarshalInputPassportElementErrorSourceTranslationFiles(data json.RawMessage) (*InputPassportElementErrorSourceTranslationFiles, error)

func (*InputPassportElementErrorSourceTranslationFiles) GetClass

func (*InputPassportElementErrorSourceTranslationFiles) GetType

func (*InputPassportElementErrorSourceTranslationFiles) InputPassportElementErrorSourceType

func (*InputPassportElementErrorSourceTranslationFiles) InputPassportElementErrorSourceType() string

func (*InputPassportElementErrorSourceTranslationFiles) MarshalJSON

func (entity *InputPassportElementErrorSourceTranslationFiles) MarshalJSON() ([]byte, error)

type InputPassportElementErrorSourceUnspecified

type InputPassportElementErrorSourceUnspecified struct {

	// Current hash of the entire element
	ElementHash []byte `json:"element_hash"`
	// contains filtered or unexported fields
}

The element contains an error in an unspecified place. The error will be considered resolved when new data is added

func UnmarshalInputPassportElementErrorSourceUnspecified

func UnmarshalInputPassportElementErrorSourceUnspecified(data json.RawMessage) (*InputPassportElementErrorSourceUnspecified, error)

func (*InputPassportElementErrorSourceUnspecified) GetClass

func (*InputPassportElementErrorSourceUnspecified) GetType

func (*InputPassportElementErrorSourceUnspecified) InputPassportElementErrorSourceType

func (*InputPassportElementErrorSourceUnspecified) InputPassportElementErrorSourceType() string

func (*InputPassportElementErrorSourceUnspecified) MarshalJSON

func (entity *InputPassportElementErrorSourceUnspecified) MarshalJSON() ([]byte, error)

type InputPassportElementIdentityCard

type InputPassportElementIdentityCard struct {

	// The identity card to be saved
	IdentityCard *InputIdentityDocument `json:"identity_card"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's identity card

func UnmarshalInputPassportElementIdentityCard

func UnmarshalInputPassportElementIdentityCard(data json.RawMessage) (*InputPassportElementIdentityCard, error)

func (*InputPassportElementIdentityCard) GetClass

func (*InputPassportElementIdentityCard) GetType

func (*InputPassportElementIdentityCard) InputPassportElementType

func (*InputPassportElementIdentityCard) InputPassportElementType() string

func (*InputPassportElementIdentityCard) MarshalJSON

func (entity *InputPassportElementIdentityCard) MarshalJSON() ([]byte, error)

type InputPassportElementInternalPassport

type InputPassportElementInternalPassport struct {

	// The internal passport to be saved
	InternalPassport *InputIdentityDocument `json:"internal_passport"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's internal passport

func UnmarshalInputPassportElementInternalPassport

func UnmarshalInputPassportElementInternalPassport(data json.RawMessage) (*InputPassportElementInternalPassport, error)

func (*InputPassportElementInternalPassport) GetClass

func (*InputPassportElementInternalPassport) GetType

func (*InputPassportElementInternalPassport) InputPassportElementType

func (*InputPassportElementInternalPassport) InputPassportElementType() string

func (*InputPassportElementInternalPassport) MarshalJSON

func (entity *InputPassportElementInternalPassport) MarshalJSON() ([]byte, error)

type InputPassportElementPassport

type InputPassportElementPassport struct {

	// The passport to be saved
	Passport *InputIdentityDocument `json:"passport"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's passport

func UnmarshalInputPassportElementPassport

func UnmarshalInputPassportElementPassport(data json.RawMessage) (*InputPassportElementPassport, error)

func (*InputPassportElementPassport) GetClass

func (*InputPassportElementPassport) GetType

func (*InputPassportElementPassport) InputPassportElementType

func (*InputPassportElementPassport) InputPassportElementType() string

func (*InputPassportElementPassport) MarshalJSON

func (entity *InputPassportElementPassport) MarshalJSON() ([]byte, error)

type InputPassportElementPassportRegistration

type InputPassportElementPassportRegistration struct {

	// The passport registration page to be saved
	PassportRegistration *InputPersonalDocument `json:"passport_registration"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's passport registration

func UnmarshalInputPassportElementPassportRegistration

func UnmarshalInputPassportElementPassportRegistration(data json.RawMessage) (*InputPassportElementPassportRegistration, error)

func (*InputPassportElementPassportRegistration) GetClass

func (*InputPassportElementPassportRegistration) GetType

func (*InputPassportElementPassportRegistration) InputPassportElementType

func (*InputPassportElementPassportRegistration) InputPassportElementType() string

func (*InputPassportElementPassportRegistration) MarshalJSON

func (entity *InputPassportElementPassportRegistration) MarshalJSON() ([]byte, error)

type InputPassportElementPersonalDetails

type InputPassportElementPersonalDetails struct {

	// Personal details of the user
	PersonalDetails *PersonalDetails `json:"personal_details"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's personal details

func UnmarshalInputPassportElementPersonalDetails

func UnmarshalInputPassportElementPersonalDetails(data json.RawMessage) (*InputPassportElementPersonalDetails, error)

func (*InputPassportElementPersonalDetails) GetClass

func (*InputPassportElementPersonalDetails) GetType

func (*InputPassportElementPersonalDetails) InputPassportElementType

func (*InputPassportElementPersonalDetails) InputPassportElementType() string

func (*InputPassportElementPersonalDetails) MarshalJSON

func (entity *InputPassportElementPersonalDetails) MarshalJSON() ([]byte, error)

type InputPassportElementPhoneNumber

type InputPassportElementPhoneNumber struct {

	// The phone number to be saved
	PhoneNumber string `json:"phone_number"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's phone number

func UnmarshalInputPassportElementPhoneNumber

func UnmarshalInputPassportElementPhoneNumber(data json.RawMessage) (*InputPassportElementPhoneNumber, error)

func (*InputPassportElementPhoneNumber) GetClass

func (*InputPassportElementPhoneNumber) GetType

func (*InputPassportElementPhoneNumber) InputPassportElementType

func (*InputPassportElementPhoneNumber) InputPassportElementType() string

func (*InputPassportElementPhoneNumber) MarshalJSON

func (entity *InputPassportElementPhoneNumber) MarshalJSON() ([]byte, error)

type InputPassportElementRentalAgreement

type InputPassportElementRentalAgreement struct {

	// The rental agreement to be saved
	RentalAgreement *InputPersonalDocument `json:"rental_agreement"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's rental agreement

func UnmarshalInputPassportElementRentalAgreement

func UnmarshalInputPassportElementRentalAgreement(data json.RawMessage) (*InputPassportElementRentalAgreement, error)

func (*InputPassportElementRentalAgreement) GetClass

func (*InputPassportElementRentalAgreement) GetType

func (*InputPassportElementRentalAgreement) InputPassportElementType

func (*InputPassportElementRentalAgreement) InputPassportElementType() string

func (*InputPassportElementRentalAgreement) MarshalJSON

func (entity *InputPassportElementRentalAgreement) MarshalJSON() ([]byte, error)

type InputPassportElementTemporaryRegistration

type InputPassportElementTemporaryRegistration struct {

	// The temporary registration document to be saved
	TemporaryRegistration *InputPersonalDocument `json:"temporary_registration"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's temporary registration

func UnmarshalInputPassportElementTemporaryRegistration

func UnmarshalInputPassportElementTemporaryRegistration(data json.RawMessage) (*InputPassportElementTemporaryRegistration, error)

func (*InputPassportElementTemporaryRegistration) GetClass

func (*InputPassportElementTemporaryRegistration) GetType

func (*InputPassportElementTemporaryRegistration) InputPassportElementType

func (*InputPassportElementTemporaryRegistration) InputPassportElementType() string

func (*InputPassportElementTemporaryRegistration) MarshalJSON

func (entity *InputPassportElementTemporaryRegistration) MarshalJSON() ([]byte, error)

type InputPassportElementUtilityBill

type InputPassportElementUtilityBill struct {

	// The utility bill to be saved
	UtilityBill *InputPersonalDocument `json:"utility_bill"`
	// contains filtered or unexported fields
}

A Telegram Passport element to be saved containing the user's utility bill

func UnmarshalInputPassportElementUtilityBill

func UnmarshalInputPassportElementUtilityBill(data json.RawMessage) (*InputPassportElementUtilityBill, error)

func (*InputPassportElementUtilityBill) GetClass

func (*InputPassportElementUtilityBill) GetType

func (*InputPassportElementUtilityBill) InputPassportElementType

func (*InputPassportElementUtilityBill) InputPassportElementType() string

func (*InputPassportElementUtilityBill) MarshalJSON

func (entity *InputPassportElementUtilityBill) MarshalJSON() ([]byte, error)

type InputPersonalDocument

type InputPersonalDocument struct {

	// List of files containing the pages of the document
	Files []InputFile `json:"files"`
	// List of files containing a certified English translation of the document
	Translation []InputFile `json:"translation"`
	// contains filtered or unexported fields
}

A personal document to be saved to Telegram Passport

func UnmarshalInputPersonalDocument

func UnmarshalInputPersonalDocument(data json.RawMessage) (*InputPersonalDocument, error)

func (*InputPersonalDocument) GetClass

func (*InputPersonalDocument) GetClass() string

func (*InputPersonalDocument) GetType

func (*InputPersonalDocument) GetType() string

func (*InputPersonalDocument) MarshalJSON

func (entity *InputPersonalDocument) MarshalJSON() ([]byte, error)

func (*InputPersonalDocument) UnmarshalJSON

func (inputPersonalDocument *InputPersonalDocument) UnmarshalJSON(data []byte) error

type InputSticker

type InputSticker struct {

	// File with the sticker; must fit in a 512x512 square. For WEBP stickers and masks the file must be in PNG format, which will be converted to WEBP server-side. Otherwise, the file must be local or uploaded within a week. See https://core.telegram.org/animated_stickers#technical-requirements for technical requirements
	Sticker InputFile `json:"sticker"`
	// Emojis corresponding to the sticker
	Emojis string `json:"emojis"`
	// Sticker type
	Type StickerType `json:"type"`
	// contains filtered or unexported fields
}

A sticker to be added to a sticker set

func UnmarshalInputSticker

func UnmarshalInputSticker(data json.RawMessage) (*InputSticker, error)

func (*InputSticker) GetClass added in v1.8.3

func (*InputSticker) GetClass() string

func (*InputSticker) GetType added in v1.8.3

func (*InputSticker) GetType() string

func (*InputSticker) MarshalJSON added in v1.8.3

func (entity *InputSticker) MarshalJSON() ([]byte, error)

func (*InputSticker) UnmarshalJSON added in v1.8.3

func (inputSticker *InputSticker) UnmarshalJSON(data []byte) error

type InputThumbnail

type InputThumbnail struct {

	// Thumbnail file to send. Sending thumbnails by file_id is currently not supported
	Thumbnail InputFile `json:"thumbnail"`
	// Thumbnail width, usually shouldn't exceed 320. Use 0 if unknown
	Width int32 `json:"width"`
	// Thumbnail height, usually shouldn't exceed 320. Use 0 if unknown
	Height int32 `json:"height"`
	// contains filtered or unexported fields
}

A thumbnail to be sent along with a file; must be in JPEG or WEBP format for stickers, and less than 200 KB in size

func UnmarshalInputThumbnail

func UnmarshalInputThumbnail(data json.RawMessage) (*InputThumbnail, error)

func (*InputThumbnail) GetClass

func (*InputThumbnail) GetClass() string

func (*InputThumbnail) GetType

func (*InputThumbnail) GetType() string

func (*InputThumbnail) MarshalJSON

func (entity *InputThumbnail) MarshalJSON() ([]byte, error)

func (*InputThumbnail) UnmarshalJSON

func (inputThumbnail *InputThumbnail) UnmarshalJSON(data []byte) error

type InternalLinkType added in v1.7.10

type InternalLinkType interface {
	InternalLinkTypeType() string
}

Describes an internal https://t.me or tg: link, which must be processed by the app in a special way

func UnmarshalInternalLinkType added in v1.7.10

func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error)

func UnmarshalListOfInternalLinkType added in v1.7.10

func UnmarshalListOfInternalLinkType(dataList []json.RawMessage) ([]InternalLinkType, error)

type InternalLinkTypeActiveSessions added in v1.7.10

type InternalLinkTypeActiveSessions struct {
	// contains filtered or unexported fields
}

The link is a link to the active sessions section of the app. Use getActiveSessions to handle the link

func UnmarshalInternalLinkTypeActiveSessions added in v1.7.10

func UnmarshalInternalLinkTypeActiveSessions(data json.RawMessage) (*InternalLinkTypeActiveSessions, error)

func (*InternalLinkTypeActiveSessions) GetClass added in v1.7.10

func (*InternalLinkTypeActiveSessions) GetType added in v1.7.10

func (*InternalLinkTypeActiveSessions) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeActiveSessions) InternalLinkTypeType() string

func (*InternalLinkTypeActiveSessions) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeActiveSessions) MarshalJSON() ([]byte, error)

type InternalLinkTypeAttachmentMenuBot added in v1.8.3

type InternalLinkTypeAttachmentMenuBot struct {

	// An internal link pointing to a chat; may be null if the current chat needs to be kept
	ChatLink InternalLinkType `json:"chat_link"`
	// Username of the bot
	BotUsername string `json:"bot_username"`
	// URL to be passed to openWebApp
	Url string `json:"url"`
	// contains filtered or unexported fields
}

The link is a link to an attachment menu bot to be opened in the specified chat. Process given chat_link to open corresponding chat. Then call searchPublicChat with the given bot username, check that the user is a bot and can be added to attachment menu. Then use getAttachmentMenuBot to receive information about the bot. If the bot isn't added to attachment menu, then user needs to confirm adding the bot to attachment menu. If user confirms adding, then use toggleBotIsAddedToAttachmentMenu to add it. If attachment menu bots can't be used in the current chat, show an error to the user. If the bot is added to attachment menu, then use openWebApp with the given URL

func UnmarshalInternalLinkTypeAttachmentMenuBot added in v1.8.3

func UnmarshalInternalLinkTypeAttachmentMenuBot(data json.RawMessage) (*InternalLinkTypeAttachmentMenuBot, error)

func (*InternalLinkTypeAttachmentMenuBot) GetClass added in v1.8.3

func (*InternalLinkTypeAttachmentMenuBot) GetType added in v1.8.3

func (*InternalLinkTypeAttachmentMenuBot) InternalLinkTypeType added in v1.8.3

func (*InternalLinkTypeAttachmentMenuBot) InternalLinkTypeType() string

func (*InternalLinkTypeAttachmentMenuBot) MarshalJSON added in v1.8.3

func (entity *InternalLinkTypeAttachmentMenuBot) MarshalJSON() ([]byte, error)

func (*InternalLinkTypeAttachmentMenuBot) UnmarshalJSON added in v1.8.3

func (internalLinkTypeAttachmentMenuBot *InternalLinkTypeAttachmentMenuBot) UnmarshalJSON(data []byte) error

type InternalLinkTypeAuthenticationCode added in v1.7.10

type InternalLinkTypeAuthenticationCode struct {

	// The authentication code
	Code string `json:"code"`
	// contains filtered or unexported fields
}

The link contains an authentication code. Call checkAuthenticationCode with the code if the current authorization state is authorizationStateWaitCode

func UnmarshalInternalLinkTypeAuthenticationCode added in v1.7.10

func UnmarshalInternalLinkTypeAuthenticationCode(data json.RawMessage) (*InternalLinkTypeAuthenticationCode, error)

func (*InternalLinkTypeAuthenticationCode) GetClass added in v1.7.10

func (*InternalLinkTypeAuthenticationCode) GetType added in v1.7.10

func (*InternalLinkTypeAuthenticationCode) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeAuthenticationCode) InternalLinkTypeType() string

func (*InternalLinkTypeAuthenticationCode) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeAuthenticationCode) MarshalJSON() ([]byte, error)

type InternalLinkTypeBackground added in v1.7.10

type InternalLinkTypeBackground struct {

	// Name of the background
	BackgroundName string `json:"background_name"`
	// contains filtered or unexported fields
}

The link is a link to a background. Call searchBackground with the given background name to process the link

func UnmarshalInternalLinkTypeBackground added in v1.7.10

func UnmarshalInternalLinkTypeBackground(data json.RawMessage) (*InternalLinkTypeBackground, error)

func (*InternalLinkTypeBackground) GetClass added in v1.7.10

func (*InternalLinkTypeBackground) GetClass() string

func (*InternalLinkTypeBackground) GetType added in v1.7.10

func (*InternalLinkTypeBackground) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeBackground) InternalLinkTypeType() string

func (*InternalLinkTypeBackground) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeBackground) MarshalJSON() ([]byte, error)

type InternalLinkTypeBotAddToChannel added in v1.8.3

type InternalLinkTypeBotAddToChannel struct {

	// Username of the bot
	BotUsername string `json:"bot_username"`
	// Expected administrator rights for the bot
	AdministratorRights *ChatAdministratorRights `json:"administrator_rights"`
	// contains filtered or unexported fields
}

The link is a link to a Telegram bot, which is supposed to be added to a channel chat as an administrator. Call searchPublicChat with the given bot username and check that the user is a bot, ask the current user to select a channel chat to add the bot to as an administrator. Then call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights and combine received rights with the requested administrator rights. Then show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed rights

func UnmarshalInternalLinkTypeBotAddToChannel added in v1.8.3

func UnmarshalInternalLinkTypeBotAddToChannel(data json.RawMessage) (*InternalLinkTypeBotAddToChannel, error)

func (*InternalLinkTypeBotAddToChannel) GetClass added in v1.8.3

func (*InternalLinkTypeBotAddToChannel) GetType added in v1.8.3

func (*InternalLinkTypeBotAddToChannel) InternalLinkTypeType added in v1.8.3

func (*InternalLinkTypeBotAddToChannel) InternalLinkTypeType() string

func (*InternalLinkTypeBotAddToChannel) MarshalJSON added in v1.8.3

func (entity *InternalLinkTypeBotAddToChannel) MarshalJSON() ([]byte, error)

type InternalLinkTypeBotStart added in v1.7.10

type InternalLinkTypeBotStart struct {

	// Username of the bot
	BotUsername string `json:"bot_username"`
	// The parameter to be passed to sendBotStartMessage
	StartParameter string `json:"start_parameter"`
	// contains filtered or unexported fields
}

The link is a link to a chat with a Telegram bot. Call searchPublicChat with the given bot username, check that the user is a bot, show START button in the chat with the bot, and then call sendBotStartMessage with the given start parameter after the button is pressed

func UnmarshalInternalLinkTypeBotStart added in v1.7.10

func UnmarshalInternalLinkTypeBotStart(data json.RawMessage) (*InternalLinkTypeBotStart, error)

func (*InternalLinkTypeBotStart) GetClass added in v1.7.10

func (*InternalLinkTypeBotStart) GetClass() string

func (*InternalLinkTypeBotStart) GetType added in v1.7.10

func (*InternalLinkTypeBotStart) GetType() string

func (*InternalLinkTypeBotStart) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeBotStart) InternalLinkTypeType() string

func (*InternalLinkTypeBotStart) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeBotStart) MarshalJSON() ([]byte, error)

type InternalLinkTypeBotStartInGroup added in v1.7.10

type InternalLinkTypeBotStartInGroup struct {

	// Username of the bot
	BotUsername string `json:"bot_username"`
	// The parameter to be passed to sendBotStartMessage
	StartParameter string `json:"start_parameter"`
	// Expected administrator rights for the bot; may be null
	AdministratorRights *ChatAdministratorRights `json:"administrator_rights"`
	// contains filtered or unexported fields
}

The link is a link to a Telegram bot, which is supposed to be added to a group chat. Call searchPublicChat with the given bot username, check that the user is a bot and can be added to groups, ask the current user to select a basic group or a supergroup chat to add the bot to, taking into account that bots can be added to a public supergroup only by administrators of the supergroup. If administrator rights are provided by the link, call getChatMember to receive the current bot rights in the chat and if the bot already is an administrator, check that the current user can edit its administrator rights, combine received rights with the requested administrator rights, show confirmation box to the user, and call setChatMemberStatus with the chosen chat and confirmed administrator rights. Before call to setChatMemberStatus it may be required to upgrade the chosen basic group chat to a supergroup chat. Then if start_parameter isn't empty, call sendBotStartMessage with the given start parameter and the chosen chat, otherwise just send /start message with bot's username added to the chat.

func UnmarshalInternalLinkTypeBotStartInGroup added in v1.7.10

func UnmarshalInternalLinkTypeBotStartInGroup(data json.RawMessage) (*InternalLinkTypeBotStartInGroup, error)

func (*InternalLinkTypeBotStartInGroup) GetClass added in v1.7.10

func (*InternalLinkTypeBotStartInGroup) GetType added in v1.7.10

func (*InternalLinkTypeBotStartInGroup) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeBotStartInGroup) InternalLinkTypeType() string

func (*InternalLinkTypeBotStartInGroup) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeBotStartInGroup) MarshalJSON() ([]byte, error)

type InternalLinkTypeChangePhoneNumber added in v1.7.10

type InternalLinkTypeChangePhoneNumber struct {
	// contains filtered or unexported fields
}

The link is a link to the change phone number section of the app

func UnmarshalInternalLinkTypeChangePhoneNumber added in v1.7.10

func UnmarshalInternalLinkTypeChangePhoneNumber(data json.RawMessage) (*InternalLinkTypeChangePhoneNumber, error)

func (*InternalLinkTypeChangePhoneNumber) GetClass added in v1.7.10

func (*InternalLinkTypeChangePhoneNumber) GetType added in v1.7.10

func (*InternalLinkTypeChangePhoneNumber) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeChangePhoneNumber) InternalLinkTypeType() string

func (*InternalLinkTypeChangePhoneNumber) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeChangePhoneNumber) MarshalJSON() ([]byte, error)

type InternalLinkTypeChatInvite added in v1.7.10

type InternalLinkTypeChatInvite struct {

	// Internal representation of the invite link
	InviteLink string `json:"invite_link"`
	// contains filtered or unexported fields
}

The link is a chat invite link. Call checkChatInviteLink with the given invite link to process the link

func UnmarshalInternalLinkTypeChatInvite added in v1.7.10

func UnmarshalInternalLinkTypeChatInvite(data json.RawMessage) (*InternalLinkTypeChatInvite, error)

func (*InternalLinkTypeChatInvite) GetClass added in v1.7.10

func (*InternalLinkTypeChatInvite) GetClass() string

func (*InternalLinkTypeChatInvite) GetType added in v1.7.10

func (*InternalLinkTypeChatInvite) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeChatInvite) InternalLinkTypeType() string

func (*InternalLinkTypeChatInvite) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeChatInvite) MarshalJSON() ([]byte, error)

type InternalLinkTypeFilterSettings added in v1.7.10

type InternalLinkTypeFilterSettings struct {
	// contains filtered or unexported fields
}

The link is a link to the filter settings section of the app

func UnmarshalInternalLinkTypeFilterSettings added in v1.7.10

func UnmarshalInternalLinkTypeFilterSettings(data json.RawMessage) (*InternalLinkTypeFilterSettings, error)

func (*InternalLinkTypeFilterSettings) GetClass added in v1.7.10

func (*InternalLinkTypeFilterSettings) GetType added in v1.7.10

func (*InternalLinkTypeFilterSettings) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeFilterSettings) InternalLinkTypeType() string

func (*InternalLinkTypeFilterSettings) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeFilterSettings) MarshalJSON() ([]byte, error)

type InternalLinkTypeGame added in v1.7.10

type InternalLinkTypeGame struct {

	// Username of the bot that owns the game
	BotUsername string `json:"bot_username"`
	// Short name of the game
	GameShortName string `json:"game_short_name"`
	// contains filtered or unexported fields
}

The link is a link to a game. Call searchPublicChat with the given bot username, check that the user is a bot, ask the current user to select a chat to send the game, and then call sendMessage with inputMessageGame

func UnmarshalInternalLinkTypeGame added in v1.7.10

func UnmarshalInternalLinkTypeGame(data json.RawMessage) (*InternalLinkTypeGame, error)

func (*InternalLinkTypeGame) GetClass added in v1.7.10

func (*InternalLinkTypeGame) GetClass() string

func (*InternalLinkTypeGame) GetType added in v1.7.10

func (*InternalLinkTypeGame) GetType() string

func (*InternalLinkTypeGame) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeGame) InternalLinkTypeType() string

func (*InternalLinkTypeGame) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeGame) MarshalJSON() ([]byte, error)

type InternalLinkTypeLanguagePack added in v1.7.10

type InternalLinkTypeLanguagePack struct {

	// Language pack identifier
	LanguagePackId string `json:"language_pack_id"`
	// contains filtered or unexported fields
}

The link is a link to a language pack. Call getLanguagePackInfo with the given language pack identifier to process the link

func UnmarshalInternalLinkTypeLanguagePack added in v1.7.10

func UnmarshalInternalLinkTypeLanguagePack(data json.RawMessage) (*InternalLinkTypeLanguagePack, error)

func (*InternalLinkTypeLanguagePack) GetClass added in v1.7.10

func (*InternalLinkTypeLanguagePack) GetType added in v1.7.10

func (*InternalLinkTypeLanguagePack) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeLanguagePack) InternalLinkTypeType() string

func (*InternalLinkTypeLanguagePack) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeLanguagePack) MarshalJSON() ([]byte, error)

type InternalLinkTypeLanguageSettings added in v1.8.3

type InternalLinkTypeLanguageSettings struct {
	// contains filtered or unexported fields
}

The link is a link to the language settings section of the app

func UnmarshalInternalLinkTypeLanguageSettings added in v1.8.3

func UnmarshalInternalLinkTypeLanguageSettings(data json.RawMessage) (*InternalLinkTypeLanguageSettings, error)

func (*InternalLinkTypeLanguageSettings) GetClass added in v1.8.3

func (*InternalLinkTypeLanguageSettings) GetType added in v1.8.3

func (*InternalLinkTypeLanguageSettings) InternalLinkTypeType added in v1.8.3

func (*InternalLinkTypeLanguageSettings) InternalLinkTypeType() string

func (*InternalLinkTypeLanguageSettings) MarshalJSON added in v1.8.3

func (entity *InternalLinkTypeLanguageSettings) MarshalJSON() ([]byte, error)

type InternalLinkTypeMessage added in v1.7.10

type InternalLinkTypeMessage struct {

	// URL to be passed to getMessageLinkInfo
	Url string `json:"url"`
	// contains filtered or unexported fields
}

The link is a link to a Telegram message. Call getMessageLinkInfo with the given URL to process the link

func UnmarshalInternalLinkTypeMessage added in v1.7.10

func UnmarshalInternalLinkTypeMessage(data json.RawMessage) (*InternalLinkTypeMessage, error)

func (*InternalLinkTypeMessage) GetClass added in v1.7.10

func (*InternalLinkTypeMessage) GetClass() string

func (*InternalLinkTypeMessage) GetType added in v1.7.10

func (*InternalLinkTypeMessage) GetType() string

func (*InternalLinkTypeMessage) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeMessage) InternalLinkTypeType() string

func (*InternalLinkTypeMessage) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeMessage) MarshalJSON() ([]byte, error)

type InternalLinkTypeMessageDraft added in v1.7.10

type InternalLinkTypeMessageDraft struct {

	// Message draft text
	Text *FormattedText `json:"text"`
	// True, if the first line of the text contains a link. If true, the input field needs to be focused and the text after the link must be selected
	ContainsLink bool `json:"contains_link"`
	// contains filtered or unexported fields
}

The link contains a message draft text. A share screen needs to be shown to the user, then the chosen chat must be opened and the text is added to the input field

func UnmarshalInternalLinkTypeMessageDraft added in v1.7.10

func UnmarshalInternalLinkTypeMessageDraft(data json.RawMessage) (*InternalLinkTypeMessageDraft, error)

func (*InternalLinkTypeMessageDraft) GetClass added in v1.7.10

func (*InternalLinkTypeMessageDraft) GetType added in v1.7.10

func (*InternalLinkTypeMessageDraft) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeMessageDraft) InternalLinkTypeType() string

func (*InternalLinkTypeMessageDraft) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeMessageDraft) MarshalJSON() ([]byte, error)

type InternalLinkTypePassportDataRequest added in v1.7.10

type InternalLinkTypePassportDataRequest struct {

	// User identifier of the service's bot
	BotUserId int64 `json:"bot_user_id"`
	// Telegram Passport element types requested by the service
	Scope string `json:"scope"`
	// Service's public key
	PublicKey string `json:"public_key"`
	// Unique request identifier provided by the service
	Nonce string `json:"nonce"`
	// An HTTP URL to open once the request is finished or canceled with the parameter tg_passport=success or tg_passport=cancel respectively. If empty, then the link tgbot{bot_user_id}://passport/success or tgbot{bot_user_id}://passport/cancel needs to be opened instead
	CallbackUrl string `json:"callback_url"`
	// contains filtered or unexported fields
}

The link contains a request of Telegram passport data. Call getPassportAuthorizationForm with the given parameters to process the link if the link was received from outside of the app, otherwise ignore it

func UnmarshalInternalLinkTypePassportDataRequest added in v1.7.10

func UnmarshalInternalLinkTypePassportDataRequest(data json.RawMessage) (*InternalLinkTypePassportDataRequest, error)

func (*InternalLinkTypePassportDataRequest) GetClass added in v1.7.10

func (*InternalLinkTypePassportDataRequest) GetType added in v1.7.10

func (*InternalLinkTypePassportDataRequest) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypePassportDataRequest) InternalLinkTypeType() string

func (*InternalLinkTypePassportDataRequest) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypePassportDataRequest) MarshalJSON() ([]byte, error)

type InternalLinkTypePhoneNumberConfirmation added in v1.7.10

type InternalLinkTypePhoneNumberConfirmation struct {

	// Hash value from the link
	Hash string `json:"hash"`
	// Phone number value from the link
	PhoneNumber string `json:"phone_number"`
	// contains filtered or unexported fields
}

The link can be used to confirm ownership of a phone number to prevent account deletion. Call sendPhoneNumberConfirmationCode with the given hash and phone number to process the link

func UnmarshalInternalLinkTypePhoneNumberConfirmation added in v1.7.10

func UnmarshalInternalLinkTypePhoneNumberConfirmation(data json.RawMessage) (*InternalLinkTypePhoneNumberConfirmation, error)

func (*InternalLinkTypePhoneNumberConfirmation) GetClass added in v1.7.10

func (*InternalLinkTypePhoneNumberConfirmation) GetType added in v1.7.10

func (*InternalLinkTypePhoneNumberConfirmation) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypePhoneNumberConfirmation) InternalLinkTypeType() string

func (*InternalLinkTypePhoneNumberConfirmation) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypePhoneNumberConfirmation) MarshalJSON() ([]byte, error)

type InternalLinkTypePrivacyAndSecuritySettings added in v1.8.3

type InternalLinkTypePrivacyAndSecuritySettings struct {
	// contains filtered or unexported fields
}

The link is a link to the privacy and security settings section of the app

func UnmarshalInternalLinkTypePrivacyAndSecuritySettings added in v1.8.3

func UnmarshalInternalLinkTypePrivacyAndSecuritySettings(data json.RawMessage) (*InternalLinkTypePrivacyAndSecuritySettings, error)

func (*InternalLinkTypePrivacyAndSecuritySettings) GetClass added in v1.8.3

func (*InternalLinkTypePrivacyAndSecuritySettings) GetType added in v1.8.3

func (*InternalLinkTypePrivacyAndSecuritySettings) InternalLinkTypeType added in v1.8.3

func (*InternalLinkTypePrivacyAndSecuritySettings) InternalLinkTypeType() string

func (*InternalLinkTypePrivacyAndSecuritySettings) MarshalJSON added in v1.8.3

func (entity *InternalLinkTypePrivacyAndSecuritySettings) MarshalJSON() ([]byte, error)

type InternalLinkTypeProxy added in v1.7.10

type InternalLinkTypeProxy struct {

	// Proxy server IP address
	Server string `json:"server"`
	// Proxy server port
	Port int32 `json:"port"`
	// Type of the proxy
	Type ProxyType `json:"type"`
	// contains filtered or unexported fields
}

The link is a link to a proxy. Call addProxy with the given parameters to process the link and add the proxy

func UnmarshalInternalLinkTypeProxy added in v1.7.10

func UnmarshalInternalLinkTypeProxy(data json.RawMessage) (*InternalLinkTypeProxy, error)

func (*InternalLinkTypeProxy) GetClass added in v1.7.10

func (*InternalLinkTypeProxy) GetClass() string

func (*InternalLinkTypeProxy) GetType added in v1.7.10

func (*InternalLinkTypeProxy) GetType() string

func (*InternalLinkTypeProxy) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeProxy) InternalLinkTypeType() string

func (*InternalLinkTypeProxy) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeProxy) MarshalJSON() ([]byte, error)

func (*InternalLinkTypeProxy) UnmarshalJSON added in v1.7.10

func (internalLinkTypeProxy *InternalLinkTypeProxy) UnmarshalJSON(data []byte) error

type InternalLinkTypePublicChat added in v1.7.10

type InternalLinkTypePublicChat struct {

	// Username of the chat
	ChatUsername string `json:"chat_username"`
	// contains filtered or unexported fields
}

The link is a link to a chat by its username. Call searchPublicChat with the given chat username to process the link

func UnmarshalInternalLinkTypePublicChat added in v1.7.10

func UnmarshalInternalLinkTypePublicChat(data json.RawMessage) (*InternalLinkTypePublicChat, error)

func (*InternalLinkTypePublicChat) GetClass added in v1.7.10

func (*InternalLinkTypePublicChat) GetClass() string

func (*InternalLinkTypePublicChat) GetType added in v1.7.10

func (*InternalLinkTypePublicChat) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypePublicChat) InternalLinkTypeType() string

func (*InternalLinkTypePublicChat) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypePublicChat) MarshalJSON() ([]byte, error)

type InternalLinkTypeQrCodeAuthentication added in v1.7.10

type InternalLinkTypeQrCodeAuthentication struct {
	// contains filtered or unexported fields
}

The link can be used to login the current user on another device, but it must be scanned from QR-code using in-app camera. An alert similar to "This code can be used to allow someone to log in to your Telegram account. To confirm Telegram login, please go to Settings > Devices > Scan QR and scan the code" needs to be shown

func UnmarshalInternalLinkTypeQrCodeAuthentication added in v1.7.10

func UnmarshalInternalLinkTypeQrCodeAuthentication(data json.RawMessage) (*InternalLinkTypeQrCodeAuthentication, error)

func (*InternalLinkTypeQrCodeAuthentication) GetClass added in v1.7.10

func (*InternalLinkTypeQrCodeAuthentication) GetType added in v1.7.10

func (*InternalLinkTypeQrCodeAuthentication) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeQrCodeAuthentication) InternalLinkTypeType() string

func (*InternalLinkTypeQrCodeAuthentication) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeQrCodeAuthentication) MarshalJSON() ([]byte, error)

type InternalLinkTypeSettings added in v1.7.10

type InternalLinkTypeSettings struct {
	// contains filtered or unexported fields
}

The link is a link to app settings

func UnmarshalInternalLinkTypeSettings added in v1.7.10

func UnmarshalInternalLinkTypeSettings(data json.RawMessage) (*InternalLinkTypeSettings, error)

func (*InternalLinkTypeSettings) GetClass added in v1.7.10

func (*InternalLinkTypeSettings) GetClass() string

func (*InternalLinkTypeSettings) GetType added in v1.7.10

func (*InternalLinkTypeSettings) GetType() string

func (*InternalLinkTypeSettings) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeSettings) InternalLinkTypeType() string

func (*InternalLinkTypeSettings) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeSettings) MarshalJSON() ([]byte, error)

type InternalLinkTypeStickerSet added in v1.7.10

type InternalLinkTypeStickerSet struct {

	// Name of the sticker set
	StickerSetName string `json:"sticker_set_name"`
	// contains filtered or unexported fields
}

The link is a link to a sticker set. Call searchStickerSet with the given sticker set name to process the link and show the sticker set

func UnmarshalInternalLinkTypeStickerSet added in v1.7.10

func UnmarshalInternalLinkTypeStickerSet(data json.RawMessage) (*InternalLinkTypeStickerSet, error)

func (*InternalLinkTypeStickerSet) GetClass added in v1.7.10

func (*InternalLinkTypeStickerSet) GetClass() string

func (*InternalLinkTypeStickerSet) GetType added in v1.7.10

func (*InternalLinkTypeStickerSet) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeStickerSet) InternalLinkTypeType() string

func (*InternalLinkTypeStickerSet) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeStickerSet) MarshalJSON() ([]byte, error)

type InternalLinkTypeTheme added in v1.7.10

type InternalLinkTypeTheme struct {

	// Name of the theme
	ThemeName string `json:"theme_name"`
	// contains filtered or unexported fields
}

The link is a link to a theme. TDLib has no theme support yet

func UnmarshalInternalLinkTypeTheme added in v1.7.10

func UnmarshalInternalLinkTypeTheme(data json.RawMessage) (*InternalLinkTypeTheme, error)

func (*InternalLinkTypeTheme) GetClass added in v1.7.10

func (*InternalLinkTypeTheme) GetClass() string

func (*InternalLinkTypeTheme) GetType added in v1.7.10

func (*InternalLinkTypeTheme) GetType() string

func (*InternalLinkTypeTheme) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeTheme) InternalLinkTypeType() string

func (*InternalLinkTypeTheme) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeTheme) MarshalJSON() ([]byte, error)

type InternalLinkTypeThemeSettings added in v1.7.10

type InternalLinkTypeThemeSettings struct {
	// contains filtered or unexported fields
}

The link is a link to the theme settings section of the app

func UnmarshalInternalLinkTypeThemeSettings added in v1.7.10

func UnmarshalInternalLinkTypeThemeSettings(data json.RawMessage) (*InternalLinkTypeThemeSettings, error)

func (*InternalLinkTypeThemeSettings) GetClass added in v1.7.10

func (*InternalLinkTypeThemeSettings) GetType added in v1.7.10

func (*InternalLinkTypeThemeSettings) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeThemeSettings) InternalLinkTypeType() string

func (*InternalLinkTypeThemeSettings) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeThemeSettings) MarshalJSON() ([]byte, error)
type InternalLinkTypeUnknownDeepLink struct {

	// Link to be passed to getDeepLinkInfo
	Link string `json:"link"`
	// contains filtered or unexported fields
}

The link is an unknown tg: link. Call getDeepLinkInfo to process the link

func UnmarshalInternalLinkTypeUnknownDeepLink(data json.RawMessage) (*InternalLinkTypeUnknownDeepLink, error)

func (*InternalLinkTypeUnknownDeepLink) GetClass added in v1.7.10

func (*InternalLinkTypeUnknownDeepLink) GetType added in v1.7.10

func (*InternalLinkTypeUnknownDeepLink) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeUnknownDeepLink) InternalLinkTypeType() string

func (*InternalLinkTypeUnknownDeepLink) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeUnknownDeepLink) MarshalJSON() ([]byte, error)

type InternalLinkTypeUnsupportedProxy added in v1.7.10

type InternalLinkTypeUnsupportedProxy struct {
	// contains filtered or unexported fields
}

The link is a link to an unsupported proxy. An alert can be shown to the user

func UnmarshalInternalLinkTypeUnsupportedProxy added in v1.7.10

func UnmarshalInternalLinkTypeUnsupportedProxy(data json.RawMessage) (*InternalLinkTypeUnsupportedProxy, error)

func (*InternalLinkTypeUnsupportedProxy) GetClass added in v1.7.10

func (*InternalLinkTypeUnsupportedProxy) GetType added in v1.7.10

func (*InternalLinkTypeUnsupportedProxy) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeUnsupportedProxy) InternalLinkTypeType() string

func (*InternalLinkTypeUnsupportedProxy) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeUnsupportedProxy) MarshalJSON() ([]byte, error)

type InternalLinkTypeUserPhoneNumber added in v1.8.3

type InternalLinkTypeUserPhoneNumber struct {

	// Phone number of the user
	PhoneNumber string `json:"phone_number"`
	// contains filtered or unexported fields
}

The link is a link to a user by its phone number. Call searchUserByPhoneNumber with the given phone number to process the link

func UnmarshalInternalLinkTypeUserPhoneNumber added in v1.8.3

func UnmarshalInternalLinkTypeUserPhoneNumber(data json.RawMessage) (*InternalLinkTypeUserPhoneNumber, error)

func (*InternalLinkTypeUserPhoneNumber) GetClass added in v1.8.3

func (*InternalLinkTypeUserPhoneNumber) GetType added in v1.8.3

func (*InternalLinkTypeUserPhoneNumber) InternalLinkTypeType added in v1.8.3

func (*InternalLinkTypeUserPhoneNumber) InternalLinkTypeType() string

func (*InternalLinkTypeUserPhoneNumber) MarshalJSON added in v1.8.3

func (entity *InternalLinkTypeUserPhoneNumber) MarshalJSON() ([]byte, error)

type InternalLinkTypeVideoChat added in v1.7.10

type InternalLinkTypeVideoChat struct {

	// Username of the chat with the video chat
	ChatUsername string `json:"chat_username"`
	// If non-empty, invite hash to be used to join the video chat without being muted by administrators
	InviteHash string `json:"invite_hash"`
	// True, if the video chat is expected to be a live stream in a channel or a broadcast group
	IsLiveStream bool `json:"is_live_stream"`
	// contains filtered or unexported fields
}

The link is a link to a video chat. Call searchPublicChat with the given chat username, and then joinGroupCall with the given invite hash to process the link

func UnmarshalInternalLinkTypeVideoChat added in v1.7.10

func UnmarshalInternalLinkTypeVideoChat(data json.RawMessage) (*InternalLinkTypeVideoChat, error)

func (*InternalLinkTypeVideoChat) GetClass added in v1.7.10

func (*InternalLinkTypeVideoChat) GetClass() string

func (*InternalLinkTypeVideoChat) GetType added in v1.7.10

func (*InternalLinkTypeVideoChat) GetType() string

func (*InternalLinkTypeVideoChat) InternalLinkTypeType added in v1.7.10

func (*InternalLinkTypeVideoChat) InternalLinkTypeType() string

func (*InternalLinkTypeVideoChat) MarshalJSON added in v1.7.10

func (entity *InternalLinkTypeVideoChat) MarshalJSON() ([]byte, error)

type InviteGroupCallParticipantsRequest added in v1.7.10

type InviteGroupCallParticipantsRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// User identifiers. At most 10 users can be invited simultaneously
	UserIds []int64 `json:"user_ids"`
}

type Invoice

type Invoice struct {

	// ISO 4217 currency code
	Currency string `json:"currency"`
	// A list of objects used to calculate the total price of the product
	PriceParts []*LabeledPricePart `json:"price_parts"`
	// The maximum allowed amount of tip in the smallest units of the currency
	MaxTipAmount int64 `json:"max_tip_amount"`
	// Suggested amounts of tip in the smallest units of the currency
	SuggestedTipAmounts []int64 `json:"suggested_tip_amounts"`
	// True, if the payment is a test payment
	IsTest bool `json:"is_test"`
	// True, if the user's name is needed for payment
	NeedName bool `json:"need_name"`
	// True, if the user's phone number is needed for payment
	NeedPhoneNumber bool `json:"need_phone_number"`
	// True, if the user's email address is needed for payment
	NeedEmailAddress bool `json:"need_email_address"`
	// True, if the user's shipping address is needed for payment
	NeedShippingAddress bool `json:"need_shipping_address"`
	// True, if the user's phone number will be sent to the provider
	SendPhoneNumberToProvider bool `json:"send_phone_number_to_provider"`
	// True, if the user's email address will be sent to the provider
	SendEmailAddressToProvider bool `json:"send_email_address_to_provider"`
	// True, if the total price depends on the shipping method
	IsFlexible bool `json:"is_flexible"`
	// contains filtered or unexported fields
}

Product invoice

func UnmarshalInvoice

func UnmarshalInvoice(data json.RawMessage) (*Invoice, error)

func (*Invoice) GetClass

func (*Invoice) GetClass() string

func (*Invoice) GetType

func (*Invoice) GetType() string

func (*Invoice) MarshalJSON

func (entity *Invoice) MarshalJSON() ([]byte, error)

type JoinChatByInviteLinkRequest

type JoinChatByInviteLinkRequest struct {
	// Invite link to use
	InviteLink string `json:"invite_link"`
}

type JoinChatRequest

type JoinChatRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type JoinGroupCallRequest added in v1.7.10

type JoinGroupCallRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Identifier of a group call participant, which will be used to join the call; pass null to join as self; video chats only
	ParticipantId MessageSender `json:"participant_id"`
	// Caller audio channel synchronization source identifier; received from tgcalls
	AudioSourceId int32 `json:"audio_source_id"`
	// Group call join payload; received from tgcalls
	Payload string `json:"payload"`
	// Pass true to join the call with muted microphone
	IsMuted bool `json:"is_muted"`
	// Pass true if the user's video is enabled
	IsMyVideoEnabled bool `json:"is_my_video_enabled"`
	// If non-empty, invite hash to be used to join the group call without being muted by administrators
	InviteHash string `json:"invite_hash"`
}

type JsonClient

type JsonClient struct {
	// contains filtered or unexported fields
}

func NewJsonClient

func NewJsonClient() *JsonClient

func (*JsonClient) Destroy

func (jsonClient *JsonClient) Destroy()

Destroys the TDLib client instance. After this is called the client instance shouldn't be used anymore.

func (*JsonClient) Execute

func (jsonClient *JsonClient) Execute(req Request) (*Response, error)

Synchronously executes TDLib request. May be called from any thread. Only a few requests can be executed synchronously. Returned pointer will be deallocated by TDLib during next call to td_json_client_receive or td_json_client_execute in the same thread, so it can't be used after that.

func (*JsonClient) Receive

func (jsonClient *JsonClient) Receive(timeout time.Duration) (*Response, error)

Receives incoming updates and request responses from the TDLib client. May be called from any thread, but shouldn't be called simultaneously from two different threads. Returned pointer will be deallocated by TDLib during next call to td_json_client_receive or td_json_client_execute in the same thread, so it can't be used after that.

func (*JsonClient) Send

func (jsonClient *JsonClient) Send(req Request)

Sends request to the TDLib client. May be called from any thread.

type JsonInt64

type JsonInt64 int64

JsonInt64 alias for int64, in order to deal with json big number problem

func (JsonInt64) MarshalJSON

func (jsonInt64 JsonInt64) MarshalJSON() ([]byte, error)

MarshalJSON marshals to json

func (*JsonInt64) UnmarshalJSON

func (jsonInt64 *JsonInt64) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals from json

type JsonObjectMember

type JsonObjectMember struct {

	// Member's key
	Key string `json:"key"`
	// Member's value
	Value JsonValue `json:"value"`
	// contains filtered or unexported fields
}

Represents one member of a JSON object

func UnmarshalJsonObjectMember

func UnmarshalJsonObjectMember(data json.RawMessage) (*JsonObjectMember, error)

func (*JsonObjectMember) GetClass

func (*JsonObjectMember) GetClass() string

func (*JsonObjectMember) GetType

func (*JsonObjectMember) GetType() string

func (*JsonObjectMember) MarshalJSON

func (entity *JsonObjectMember) MarshalJSON() ([]byte, error)

func (*JsonObjectMember) UnmarshalJSON

func (jsonObjectMember *JsonObjectMember) UnmarshalJSON(data []byte) error

type JsonValue

type JsonValue interface {
	JsonValueType() string
}

Represents a JSON value

func UnmarshalJsonValue

func UnmarshalJsonValue(data json.RawMessage) (JsonValue, error)

func UnmarshalListOfJsonValue

func UnmarshalListOfJsonValue(dataList []json.RawMessage) ([]JsonValue, error)

type JsonValueArray

type JsonValueArray struct {

	// The list of array elements
	Values []JsonValue `json:"values"`
	// contains filtered or unexported fields
}

Represents a JSON array

func UnmarshalJsonValueArray

func UnmarshalJsonValueArray(data json.RawMessage) (*JsonValueArray, error)

func (*JsonValueArray) GetClass

func (*JsonValueArray) GetClass() string

func (*JsonValueArray) GetType

func (*JsonValueArray) GetType() string

func (*JsonValueArray) JsonValueType

func (*JsonValueArray) JsonValueType() string

func (*JsonValueArray) MarshalJSON

func (entity *JsonValueArray) MarshalJSON() ([]byte, error)

func (*JsonValueArray) UnmarshalJSON

func (jsonValueArray *JsonValueArray) UnmarshalJSON(data []byte) error

type JsonValueBoolean

type JsonValueBoolean struct {

	// The value
	Value bool `json:"value"`
	// contains filtered or unexported fields
}

Represents a boolean JSON value

func UnmarshalJsonValueBoolean

func UnmarshalJsonValueBoolean(data json.RawMessage) (*JsonValueBoolean, error)

func (*JsonValueBoolean) GetClass

func (*JsonValueBoolean) GetClass() string

func (*JsonValueBoolean) GetType

func (*JsonValueBoolean) GetType() string

func (*JsonValueBoolean) JsonValueType

func (*JsonValueBoolean) JsonValueType() string

func (*JsonValueBoolean) MarshalJSON

func (entity *JsonValueBoolean) MarshalJSON() ([]byte, error)

type JsonValueNull

type JsonValueNull struct {
	// contains filtered or unexported fields
}

Represents a null JSON value

func UnmarshalJsonValueNull

func UnmarshalJsonValueNull(data json.RawMessage) (*JsonValueNull, error)

func (*JsonValueNull) GetClass

func (*JsonValueNull) GetClass() string

func (*JsonValueNull) GetType

func (*JsonValueNull) GetType() string

func (*JsonValueNull) JsonValueType

func (*JsonValueNull) JsonValueType() string

func (*JsonValueNull) MarshalJSON

func (entity *JsonValueNull) MarshalJSON() ([]byte, error)

type JsonValueNumber

type JsonValueNumber struct {

	// The value
	Value float64 `json:"value"`
	// contains filtered or unexported fields
}

Represents a numeric JSON value

func UnmarshalJsonValueNumber

func UnmarshalJsonValueNumber(data json.RawMessage) (*JsonValueNumber, error)

func (*JsonValueNumber) GetClass

func (*JsonValueNumber) GetClass() string

func (*JsonValueNumber) GetType

func (*JsonValueNumber) GetType() string

func (*JsonValueNumber) JsonValueType

func (*JsonValueNumber) JsonValueType() string

func (*JsonValueNumber) MarshalJSON

func (entity *JsonValueNumber) MarshalJSON() ([]byte, error)

type JsonValueObject

type JsonValueObject struct {

	// The list of object members
	Members []*JsonObjectMember `json:"members"`
	// contains filtered or unexported fields
}

Represents a JSON object

func UnmarshalJsonValueObject

func UnmarshalJsonValueObject(data json.RawMessage) (*JsonValueObject, error)

func (*JsonValueObject) GetClass

func (*JsonValueObject) GetClass() string

func (*JsonValueObject) GetType

func (*JsonValueObject) GetType() string

func (*JsonValueObject) JsonValueType

func (*JsonValueObject) JsonValueType() string

func (*JsonValueObject) MarshalJSON

func (entity *JsonValueObject) MarshalJSON() ([]byte, error)

type JsonValueString

type JsonValueString struct {

	// The value
	Value string `json:"value"`
	// contains filtered or unexported fields
}

Represents a string JSON value

func UnmarshalJsonValueString

func UnmarshalJsonValueString(data json.RawMessage) (*JsonValueString, error)

func (*JsonValueString) GetClass

func (*JsonValueString) GetClass() string

func (*JsonValueString) GetType

func (*JsonValueString) GetType() string

func (*JsonValueString) JsonValueType

func (*JsonValueString) JsonValueType() string

func (*JsonValueString) MarshalJSON

func (entity *JsonValueString) MarshalJSON() ([]byte, error)

type KeyboardButton

type KeyboardButton struct {

	// Text of the button
	Text string `json:"text"`
	// Type of the button
	Type KeyboardButtonType `json:"type"`
	// contains filtered or unexported fields
}

Represents a single button in a bot keyboard

func UnmarshalKeyboardButton

func UnmarshalKeyboardButton(data json.RawMessage) (*KeyboardButton, error)

func (*KeyboardButton) GetClass

func (*KeyboardButton) GetClass() string

func (*KeyboardButton) GetType

func (*KeyboardButton) GetType() string

func (*KeyboardButton) MarshalJSON

func (entity *KeyboardButton) MarshalJSON() ([]byte, error)

func (*KeyboardButton) UnmarshalJSON

func (keyboardButton *KeyboardButton) UnmarshalJSON(data []byte) error

type KeyboardButtonType

type KeyboardButtonType interface {
	KeyboardButtonTypeType() string
}

Describes a keyboard button type

func UnmarshalKeyboardButtonType

func UnmarshalKeyboardButtonType(data json.RawMessage) (KeyboardButtonType, error)

func UnmarshalListOfKeyboardButtonType

func UnmarshalListOfKeyboardButtonType(dataList []json.RawMessage) ([]KeyboardButtonType, error)

type KeyboardButtonTypeRequestLocation

type KeyboardButtonTypeRequestLocation struct {
	// contains filtered or unexported fields
}

A button that sends the user's location when pressed; available only in private chats

func UnmarshalKeyboardButtonTypeRequestLocation

func UnmarshalKeyboardButtonTypeRequestLocation(data json.RawMessage) (*KeyboardButtonTypeRequestLocation, error)

func (*KeyboardButtonTypeRequestLocation) GetClass

func (*KeyboardButtonTypeRequestLocation) GetType

func (*KeyboardButtonTypeRequestLocation) KeyboardButtonTypeType

func (*KeyboardButtonTypeRequestLocation) KeyboardButtonTypeType() string

func (*KeyboardButtonTypeRequestLocation) MarshalJSON

func (entity *KeyboardButtonTypeRequestLocation) MarshalJSON() ([]byte, error)

type KeyboardButtonTypeRequestPhoneNumber

type KeyboardButtonTypeRequestPhoneNumber struct {
	// contains filtered or unexported fields
}

A button that sends the user's phone number when pressed; available only in private chats

func UnmarshalKeyboardButtonTypeRequestPhoneNumber

func UnmarshalKeyboardButtonTypeRequestPhoneNumber(data json.RawMessage) (*KeyboardButtonTypeRequestPhoneNumber, error)

func (*KeyboardButtonTypeRequestPhoneNumber) GetClass

func (*KeyboardButtonTypeRequestPhoneNumber) GetType

func (*KeyboardButtonTypeRequestPhoneNumber) KeyboardButtonTypeType

func (*KeyboardButtonTypeRequestPhoneNumber) KeyboardButtonTypeType() string

func (*KeyboardButtonTypeRequestPhoneNumber) MarshalJSON

func (entity *KeyboardButtonTypeRequestPhoneNumber) MarshalJSON() ([]byte, error)

type KeyboardButtonTypeRequestPoll

type KeyboardButtonTypeRequestPoll struct {

	// If true, only regular polls must be allowed to create
	ForceRegular bool `json:"force_regular"`
	// If true, only polls in quiz mode must be allowed to create
	ForceQuiz bool `json:"force_quiz"`
	// contains filtered or unexported fields
}

A button that allows the user to create and send a poll when pressed; available only in private chats

func UnmarshalKeyboardButtonTypeRequestPoll

func UnmarshalKeyboardButtonTypeRequestPoll(data json.RawMessage) (*KeyboardButtonTypeRequestPoll, error)

func (*KeyboardButtonTypeRequestPoll) GetClass

func (*KeyboardButtonTypeRequestPoll) GetType

func (*KeyboardButtonTypeRequestPoll) KeyboardButtonTypeType

func (*KeyboardButtonTypeRequestPoll) KeyboardButtonTypeType() string

func (*KeyboardButtonTypeRequestPoll) MarshalJSON

func (entity *KeyboardButtonTypeRequestPoll) MarshalJSON() ([]byte, error)

type KeyboardButtonTypeText

type KeyboardButtonTypeText struct {
	// contains filtered or unexported fields
}

A simple button, with text that must be sent when the button is pressed

func UnmarshalKeyboardButtonTypeText

func UnmarshalKeyboardButtonTypeText(data json.RawMessage) (*KeyboardButtonTypeText, error)

func (*KeyboardButtonTypeText) GetClass

func (*KeyboardButtonTypeText) GetClass() string

func (*KeyboardButtonTypeText) GetType

func (*KeyboardButtonTypeText) GetType() string

func (*KeyboardButtonTypeText) KeyboardButtonTypeType

func (*KeyboardButtonTypeText) KeyboardButtonTypeType() string

func (*KeyboardButtonTypeText) MarshalJSON

func (entity *KeyboardButtonTypeText) MarshalJSON() ([]byte, error)

type KeyboardButtonTypeWebApp added in v1.8.3

type KeyboardButtonTypeWebApp struct {

	// An HTTP URL to pass to getWebAppUrl
	Url string `json:"url"`
	// contains filtered or unexported fields
}

A button that opens a web app by calling getWebAppUrl

func UnmarshalKeyboardButtonTypeWebApp added in v1.8.3

func UnmarshalKeyboardButtonTypeWebApp(data json.RawMessage) (*KeyboardButtonTypeWebApp, error)

func (*KeyboardButtonTypeWebApp) GetClass added in v1.8.3

func (*KeyboardButtonTypeWebApp) GetClass() string

func (*KeyboardButtonTypeWebApp) GetType added in v1.8.3

func (*KeyboardButtonTypeWebApp) GetType() string

func (*KeyboardButtonTypeWebApp) KeyboardButtonTypeType added in v1.8.3

func (*KeyboardButtonTypeWebApp) KeyboardButtonTypeType() string

func (*KeyboardButtonTypeWebApp) MarshalJSON added in v1.8.3

func (entity *KeyboardButtonTypeWebApp) MarshalJSON() ([]byte, error)

type LabeledPricePart

type LabeledPricePart struct {

	// Label for this portion of the product price
	Label string `json:"label"`
	// Currency amount in the smallest units of the currency
	Amount int64 `json:"amount"`
	// contains filtered or unexported fields
}

Portion of the price of a product (e.g., "delivery cost", "tax amount")

func UnmarshalLabeledPricePart

func UnmarshalLabeledPricePart(data json.RawMessage) (*LabeledPricePart, error)

func (*LabeledPricePart) GetClass

func (*LabeledPricePart) GetClass() string

func (*LabeledPricePart) GetType

func (*LabeledPricePart) GetType() string

func (*LabeledPricePart) MarshalJSON

func (entity *LabeledPricePart) MarshalJSON() ([]byte, error)

type LanguagePackInfo

type LanguagePackInfo struct {

	// Unique language pack identifier
	Id string `json:"id"`
	// Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it must be fetched from base language pack. Unsupported in custom language packs
	BaseLanguagePackId string `json:"base_language_pack_id"`
	// Language name
	Name string `json:"name"`
	// Name of the language in that language
	NativeName string `json:"native_name"`
	// A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more information
	PluralCode string `json:"plural_code"`
	// True, if the language pack is official
	IsOfficial bool `json:"is_official"`
	// True, if the language pack strings are RTL
	IsRtl bool `json:"is_rtl"`
	// True, if the language pack is a beta language pack
	IsBeta bool `json:"is_beta"`
	// True, if the language pack is installed by the current user
	IsInstalled bool `json:"is_installed"`
	// Total number of non-deleted strings from the language pack
	TotalStringCount int32 `json:"total_string_count"`
	// Total number of translated strings from the language pack
	TranslatedStringCount int32 `json:"translated_string_count"`
	// Total number of non-deleted strings from the language pack available locally
	LocalStringCount int32 `json:"local_string_count"`
	// Link to language translation interface; empty for custom local language packs
	TranslationUrl string `json:"translation_url"`
	// contains filtered or unexported fields
}

Contains information about a language pack

func UnmarshalLanguagePackInfo

func UnmarshalLanguagePackInfo(data json.RawMessage) (*LanguagePackInfo, error)

func (*LanguagePackInfo) GetClass

func (*LanguagePackInfo) GetClass() string

func (*LanguagePackInfo) GetType

func (*LanguagePackInfo) GetType() string

func (*LanguagePackInfo) MarshalJSON

func (entity *LanguagePackInfo) MarshalJSON() ([]byte, error)

type LanguagePackString

type LanguagePackString struct {

	// String key
	Key string `json:"key"`
	// String value; pass null if the string needs to be taken from the built-in English language pack
	Value LanguagePackStringValue `json:"value"`
	// contains filtered or unexported fields
}

Represents one language pack string

func UnmarshalLanguagePackString

func UnmarshalLanguagePackString(data json.RawMessage) (*LanguagePackString, error)

func (*LanguagePackString) GetClass

func (*LanguagePackString) GetClass() string

func (*LanguagePackString) GetType

func (*LanguagePackString) GetType() string

func (*LanguagePackString) MarshalJSON

func (entity *LanguagePackString) MarshalJSON() ([]byte, error)

func (*LanguagePackString) UnmarshalJSON

func (languagePackString *LanguagePackString) UnmarshalJSON(data []byte) error

type LanguagePackStringValue

type LanguagePackStringValue interface {
	LanguagePackStringValueType() string
}

Represents the value of a string in a language pack

func UnmarshalLanguagePackStringValue

func UnmarshalLanguagePackStringValue(data json.RawMessage) (LanguagePackStringValue, error)

func UnmarshalListOfLanguagePackStringValue

func UnmarshalListOfLanguagePackStringValue(dataList []json.RawMessage) ([]LanguagePackStringValue, error)

type LanguagePackStringValueDeleted

type LanguagePackStringValueDeleted struct {
	// contains filtered or unexported fields
}

A deleted language pack string, the value must be taken from the built-in English language pack

func UnmarshalLanguagePackStringValueDeleted

func UnmarshalLanguagePackStringValueDeleted(data json.RawMessage) (*LanguagePackStringValueDeleted, error)

func (*LanguagePackStringValueDeleted) GetClass

func (*LanguagePackStringValueDeleted) GetType

func (*LanguagePackStringValueDeleted) LanguagePackStringValueType

func (*LanguagePackStringValueDeleted) LanguagePackStringValueType() string

func (*LanguagePackStringValueDeleted) MarshalJSON

func (entity *LanguagePackStringValueDeleted) MarshalJSON() ([]byte, error)

type LanguagePackStringValueOrdinary

type LanguagePackStringValueOrdinary struct {

	// String value
	Value string `json:"value"`
	// contains filtered or unexported fields
}

An ordinary language pack string

func UnmarshalLanguagePackStringValueOrdinary

func UnmarshalLanguagePackStringValueOrdinary(data json.RawMessage) (*LanguagePackStringValueOrdinary, error)

func (*LanguagePackStringValueOrdinary) GetClass

func (*LanguagePackStringValueOrdinary) GetType

func (*LanguagePackStringValueOrdinary) LanguagePackStringValueType

func (*LanguagePackStringValueOrdinary) LanguagePackStringValueType() string

func (*LanguagePackStringValueOrdinary) MarshalJSON

func (entity *LanguagePackStringValueOrdinary) MarshalJSON() ([]byte, error)

type LanguagePackStringValuePluralized

type LanguagePackStringValuePluralized struct {

	// Value for zero objects
	ZeroValue string `json:"zero_value"`
	// Value for one object
	OneValue string `json:"one_value"`
	// Value for two objects
	TwoValue string `json:"two_value"`
	// Value for few objects
	FewValue string `json:"few_value"`
	// Value for many objects
	ManyValue string `json:"many_value"`
	// Default value
	OtherValue string `json:"other_value"`
	// contains filtered or unexported fields
}

A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more information

func UnmarshalLanguagePackStringValuePluralized

func UnmarshalLanguagePackStringValuePluralized(data json.RawMessage) (*LanguagePackStringValuePluralized, error)

func (*LanguagePackStringValuePluralized) GetClass

func (*LanguagePackStringValuePluralized) GetType

func (*LanguagePackStringValuePluralized) LanguagePackStringValueType

func (*LanguagePackStringValuePluralized) LanguagePackStringValueType() string

func (*LanguagePackStringValuePluralized) MarshalJSON

func (entity *LanguagePackStringValuePluralized) MarshalJSON() ([]byte, error)

type LanguagePackStrings

type LanguagePackStrings struct {

	// A list of language pack strings
	Strings []*LanguagePackString `json:"strings"`
	// contains filtered or unexported fields
}

Contains a list of language pack strings

func UnmarshalLanguagePackStrings

func UnmarshalLanguagePackStrings(data json.RawMessage) (*LanguagePackStrings, error)

func (*LanguagePackStrings) GetClass

func (*LanguagePackStrings) GetClass() string

func (*LanguagePackStrings) GetType

func (*LanguagePackStrings) GetType() string

func (*LanguagePackStrings) MarshalJSON

func (entity *LanguagePackStrings) MarshalJSON() ([]byte, error)

type LeaveChatRequest

type LeaveChatRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type LeaveGroupCallRequest added in v1.7.10

type LeaveGroupCallRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
}

type Listener

type Listener struct {
	Updates chan Type
	// contains filtered or unexported fields
}

func (*Listener) Close

func (listener *Listener) Close()

func (*Listener) IsActive

func (listener *Listener) IsActive() bool

type LoadChatsRequest added in v1.7.10

type LoadChatsRequest struct {
	// The chat list in which to load chats; pass null to load chats from the main chat list
	ChatList ChatList `json:"chat_list"`
	// The maximum number of chats to be loaded. For optimal performance, the number of loaded chats is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached
	Limit int32 `json:"limit"`
}

type LoadGroupCallParticipantsRequest added in v1.7.10

type LoadGroupCallParticipantsRequest struct {
	// Group call identifier. The group call must be previously received through getGroupCall and must be joined or being joined
	GroupCallId int32 `json:"group_call_id"`
	// The maximum number of participants to load; up to 100
	Limit int32 `json:"limit"`
}

type LocalFile

type LocalFile struct {

	// Local path to the locally available file part; may be empty
	Path string `json:"path"`
	// True, if it is possible to download or generate the file
	CanBeDownloaded bool `json:"can_be_downloaded"`
	// True, if the file can be deleted
	CanBeDeleted bool `json:"can_be_deleted"`
	// True, if the file is currently being downloaded (or a local copy is being generated by some other means)
	IsDownloadingActive bool `json:"is_downloading_active"`
	// True, if the local copy is fully available
	IsDownloadingCompleted bool `json:"is_downloading_completed"`
	// Download will be started from this offset. downloaded_prefix_size is calculated from this offset
	DownloadOffset int32 `json:"download_offset"`
	// If is_downloading_completed is false, then only some prefix of the file starting from download_offset is ready to be read. downloaded_prefix_size is the size of that prefix in bytes
	DownloadedPrefixSize int32 `json:"downloaded_prefix_size"`
	// Total downloaded file size, in bytes. Can be used only for calculating download progress. The actual file size may be bigger, and some parts of it may contain garbage
	DownloadedSize int32 `json:"downloaded_size"`
	// contains filtered or unexported fields
}

Represents a local file

func UnmarshalLocalFile

func UnmarshalLocalFile(data json.RawMessage) (*LocalFile, error)

func (*LocalFile) GetClass

func (*LocalFile) GetClass() string

func (*LocalFile) GetType

func (*LocalFile) GetType() string

func (*LocalFile) MarshalJSON

func (entity *LocalFile) MarshalJSON() ([]byte, error)

type LocalizationTargetInfo

type LocalizationTargetInfo struct {

	// List of available language packs for this application
	LanguagePacks []*LanguagePackInfo `json:"language_packs"`
	// contains filtered or unexported fields
}

Contains information about the current localization target

func UnmarshalLocalizationTargetInfo

func UnmarshalLocalizationTargetInfo(data json.RawMessage) (*LocalizationTargetInfo, error)

func (*LocalizationTargetInfo) GetClass

func (*LocalizationTargetInfo) GetClass() string

func (*LocalizationTargetInfo) GetType

func (*LocalizationTargetInfo) GetType() string

func (*LocalizationTargetInfo) MarshalJSON

func (entity *LocalizationTargetInfo) MarshalJSON() ([]byte, error)

type Location

type Location struct {

	// Latitude of the location in degrees; as defined by the sender
	Latitude float64 `json:"latitude"`
	// Longitude of the location, in degrees; as defined by the sender
	Longitude float64 `json:"longitude"`
	// The estimated horizontal accuracy of the location, in meters; as defined by the sender. 0 if unknown
	HorizontalAccuracy float64 `json:"horizontal_accuracy"`
	// contains filtered or unexported fields
}

Describes a location on planet Earth

func UnmarshalLocation

func UnmarshalLocation(data json.RawMessage) (*Location, error)

func (*Location) GetClass

func (*Location) GetClass() string

func (*Location) GetType

func (*Location) GetType() string

func (*Location) MarshalJSON

func (entity *Location) MarshalJSON() ([]byte, error)

type LogStream

type LogStream interface {
	LogStreamType() string
}

Describes a stream to which TDLib internal log is written

func UnmarshalListOfLogStream

func UnmarshalListOfLogStream(dataList []json.RawMessage) ([]LogStream, error)

func UnmarshalLogStream

func UnmarshalLogStream(data json.RawMessage) (LogStream, error)

type LogStreamDefault

type LogStreamDefault struct {
	// contains filtered or unexported fields
}

The log is written to stderr or an OS specific log

func UnmarshalLogStreamDefault

func UnmarshalLogStreamDefault(data json.RawMessage) (*LogStreamDefault, error)

func (*LogStreamDefault) GetClass

func (*LogStreamDefault) GetClass() string

func (*LogStreamDefault) GetType

func (*LogStreamDefault) GetType() string

func (*LogStreamDefault) LogStreamType

func (*LogStreamDefault) LogStreamType() string

func (*LogStreamDefault) MarshalJSON

func (entity *LogStreamDefault) MarshalJSON() ([]byte, error)

type LogStreamEmpty

type LogStreamEmpty struct {
	// contains filtered or unexported fields
}

The log is written nowhere

func UnmarshalLogStreamEmpty

func UnmarshalLogStreamEmpty(data json.RawMessage) (*LogStreamEmpty, error)

func (*LogStreamEmpty) GetClass

func (*LogStreamEmpty) GetClass() string

func (*LogStreamEmpty) GetType

func (*LogStreamEmpty) GetType() string

func (*LogStreamEmpty) LogStreamType

func (*LogStreamEmpty) LogStreamType() string

func (*LogStreamEmpty) MarshalJSON

func (entity *LogStreamEmpty) MarshalJSON() ([]byte, error)

type LogStreamFile

type LogStreamFile struct {

	// Path to the file to where the internal TDLib log will be written
	Path string `json:"path"`
	// The maximum size of the file to where the internal TDLib log is written before the file will automatically be rotated, in bytes
	MaxFileSize int64 `json:"max_file_size"`
	// Pass true to additionally redirect stderr to the log file. Ignored on Windows
	RedirectStderr bool `json:"redirect_stderr"`
	// contains filtered or unexported fields
}

The log is written to a file

func UnmarshalLogStreamFile

func UnmarshalLogStreamFile(data json.RawMessage) (*LogStreamFile, error)

func (*LogStreamFile) GetClass

func (*LogStreamFile) GetClass() string

func (*LogStreamFile) GetType

func (*LogStreamFile) GetType() string

func (*LogStreamFile) LogStreamType

func (*LogStreamFile) LogStreamType() string

func (*LogStreamFile) MarshalJSON

func (entity *LogStreamFile) MarshalJSON() ([]byte, error)

type LogTags

type LogTags struct {

	// List of log tags
	Tags []string `json:"tags"`
	// contains filtered or unexported fields
}

Contains a list of available TDLib internal log tags

func UnmarshalLogTags

func UnmarshalLogTags(data json.RawMessage) (*LogTags, error)

func (*LogTags) GetClass

func (*LogTags) GetClass() string

func (*LogTags) GetType

func (*LogTags) GetType() string

func (*LogTags) MarshalJSON

func (entity *LogTags) MarshalJSON() ([]byte, error)

type LogVerbosityLevel

type LogVerbosityLevel struct {

	// Log verbosity level
	VerbosityLevel int32 `json:"verbosity_level"`
	// contains filtered or unexported fields
}

Contains a TDLib internal log verbosity level

func UnmarshalLogVerbosityLevel

func UnmarshalLogVerbosityLevel(data json.RawMessage) (*LogVerbosityLevel, error)

func (*LogVerbosityLevel) GetClass

func (*LogVerbosityLevel) GetClass() string

func (*LogVerbosityLevel) GetType

func (*LogVerbosityLevel) GetType() string

func (*LogVerbosityLevel) MarshalJSON

func (entity *LogVerbosityLevel) MarshalJSON() ([]byte, error)

type LoginUrlInfo

type LoginUrlInfo interface {
	LoginUrlInfoType() string
}

Contains information about an inline button of type inlineKeyboardButtonTypeLoginUrl

func UnmarshalListOfLoginUrlInfo

func UnmarshalListOfLoginUrlInfo(dataList []json.RawMessage) ([]LoginUrlInfo, error)

func UnmarshalLoginUrlInfo

func UnmarshalLoginUrlInfo(data json.RawMessage) (LoginUrlInfo, error)

type LoginUrlInfoOpen

type LoginUrlInfoOpen struct {

	// The URL to open
	Url string `json:"url"`
	// True, if there is no need to show an ordinary open URL confirm
	SkipConfirm bool `json:"skip_confirm"`
	// contains filtered or unexported fields
}

An HTTP url needs to be open

func UnmarshalLoginUrlInfoOpen

func UnmarshalLoginUrlInfoOpen(data json.RawMessage) (*LoginUrlInfoOpen, error)

func (*LoginUrlInfoOpen) GetClass

func (*LoginUrlInfoOpen) GetClass() string

func (*LoginUrlInfoOpen) GetType

func (*LoginUrlInfoOpen) GetType() string

func (*LoginUrlInfoOpen) LoginUrlInfoType

func (*LoginUrlInfoOpen) LoginUrlInfoType() string

func (*LoginUrlInfoOpen) MarshalJSON

func (entity *LoginUrlInfoOpen) MarshalJSON() ([]byte, error)

type LoginUrlInfoRequestConfirmation

type LoginUrlInfoRequestConfirmation struct {

	// An HTTP URL to be opened
	Url string `json:"url"`
	// A domain of the URL
	Domain string `json:"domain"`
	// User identifier of a bot linked with the website
	BotUserId int64 `json:"bot_user_id"`
	// True, if the user needs to be requested to give the permission to the bot to send them messages
	RequestWriteAccess bool `json:"request_write_access"`
	// contains filtered or unexported fields
}

An authorization confirmation dialog needs to be shown to the user

func UnmarshalLoginUrlInfoRequestConfirmation

func UnmarshalLoginUrlInfoRequestConfirmation(data json.RawMessage) (*LoginUrlInfoRequestConfirmation, error)

func (*LoginUrlInfoRequestConfirmation) GetClass

func (*LoginUrlInfoRequestConfirmation) GetType

func (*LoginUrlInfoRequestConfirmation) LoginUrlInfoType

func (*LoginUrlInfoRequestConfirmation) LoginUrlInfoType() string

func (*LoginUrlInfoRequestConfirmation) MarshalJSON

func (entity *LoginUrlInfoRequestConfirmation) MarshalJSON() ([]byte, error)

type MaskPoint

type MaskPoint interface {
	MaskPointType() string
}

Part of the face, relative to which a mask is placed

func UnmarshalListOfMaskPoint

func UnmarshalListOfMaskPoint(dataList []json.RawMessage) ([]MaskPoint, error)

func UnmarshalMaskPoint

func UnmarshalMaskPoint(data json.RawMessage) (MaskPoint, error)

type MaskPointChin

type MaskPointChin struct {
	// contains filtered or unexported fields
}

The mask is placed relatively to the chin

func UnmarshalMaskPointChin

func UnmarshalMaskPointChin(data json.RawMessage) (*MaskPointChin, error)

func (*MaskPointChin) GetClass

func (*MaskPointChin) GetClass() string

func (*MaskPointChin) GetType

func (*MaskPointChin) GetType() string

func (*MaskPointChin) MarshalJSON

func (entity *MaskPointChin) MarshalJSON() ([]byte, error)

func (*MaskPointChin) MaskPointType

func (*MaskPointChin) MaskPointType() string

type MaskPointEyes

type MaskPointEyes struct {
	// contains filtered or unexported fields
}

The mask is placed relatively to the eyes

func UnmarshalMaskPointEyes

func UnmarshalMaskPointEyes(data json.RawMessage) (*MaskPointEyes, error)

func (*MaskPointEyes) GetClass

func (*MaskPointEyes) GetClass() string

func (*MaskPointEyes) GetType

func (*MaskPointEyes) GetType() string

func (*MaskPointEyes) MarshalJSON

func (entity *MaskPointEyes) MarshalJSON() ([]byte, error)

func (*MaskPointEyes) MaskPointType

func (*MaskPointEyes) MaskPointType() string

type MaskPointForehead

type MaskPointForehead struct {
	// contains filtered or unexported fields
}

The mask is placed relatively to the forehead

func UnmarshalMaskPointForehead

func UnmarshalMaskPointForehead(data json.RawMessage) (*MaskPointForehead, error)

func (*MaskPointForehead) GetClass

func (*MaskPointForehead) GetClass() string

func (*MaskPointForehead) GetType

func (*MaskPointForehead) GetType() string

func (*MaskPointForehead) MarshalJSON

func (entity *MaskPointForehead) MarshalJSON() ([]byte, error)

func (*MaskPointForehead) MaskPointType

func (*MaskPointForehead) MaskPointType() string

type MaskPointMouth

type MaskPointMouth struct {
	// contains filtered or unexported fields
}

The mask is placed relatively to the mouth

func UnmarshalMaskPointMouth

func UnmarshalMaskPointMouth(data json.RawMessage) (*MaskPointMouth, error)

func (*MaskPointMouth) GetClass

func (*MaskPointMouth) GetClass() string

func (*MaskPointMouth) GetType

func (*MaskPointMouth) GetType() string

func (*MaskPointMouth) MarshalJSON

func (entity *MaskPointMouth) MarshalJSON() ([]byte, error)

func (*MaskPointMouth) MaskPointType

func (*MaskPointMouth) MaskPointType() string

type MaskPosition

type MaskPosition struct {

	// Part of the face, relative to which the mask is placed
	Point MaskPoint `json:"point"`
	// Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position)
	XShift float64 `json:"x_shift"`
	// Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. (For example, 1.0 will place the mask just below the default mask position)
	YShift float64 `json:"y_shift"`
	// Mask scaling coefficient. (For example, 2.0 means a doubled size)
	Scale float64 `json:"scale"`
	// contains filtered or unexported fields
}

Position on a photo where a mask is placed

func UnmarshalMaskPosition

func UnmarshalMaskPosition(data json.RawMessage) (*MaskPosition, error)

func (*MaskPosition) GetClass

func (*MaskPosition) GetClass() string

func (*MaskPosition) GetType

func (*MaskPosition) GetType() string

func (*MaskPosition) MarshalJSON

func (entity *MaskPosition) MarshalJSON() ([]byte, error)

func (*MaskPosition) UnmarshalJSON

func (maskPosition *MaskPosition) UnmarshalJSON(data []byte) error

type Message

type Message struct {

	// Message identifier; unique for the chat to which the message belongs
	Id int64 `json:"id"`
	// Identifier of the sender of the message
	SenderId MessageSender `json:"sender_id"`
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The sending state of the message; may be null
	SendingState MessageSendingState `json:"sending_state"`
	// The scheduling state of the message; may be null
	SchedulingState MessageSchedulingState `json:"scheduling_state"`
	// True, if the message is outgoing
	IsOutgoing bool `json:"is_outgoing"`
	// True, if the message is pinned
	IsPinned bool `json:"is_pinned"`
	// True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application
	CanBeEdited bool `json:"can_be_edited"`
	// True, if the message can be forwarded
	CanBeForwarded bool `json:"can_be_forwarded"`
	// True, if content of the message can be saved locally or copied
	CanBeSaved bool `json:"can_be_saved"`
	// True, if the message can be deleted only for the current user while other users will continue to see it
	CanBeDeletedOnlyForSelf bool `json:"can_be_deleted_only_for_self"`
	// True, if the message can be deleted for all users
	CanBeDeletedForAllUsers bool `json:"can_be_deleted_for_all_users"`
	// True, if the list of added reactions is available through getMessageAddedReactions
	CanGetAddedReactions bool `json:"can_get_added_reactions"`
	// True, if the message statistics are available through getMessageStatistics
	CanGetStatistics bool `json:"can_get_statistics"`
	// True, if information about the message thread is available through getMessageThread
	CanGetMessageThread bool `json:"can_get_message_thread"`
	// True, if chat members already viewed the message can be received through getMessageViewers
	CanGetViewers bool `json:"can_get_viewers"`
	// True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink
	CanGetMediaTimestampLinks bool `json:"can_get_media_timestamp_links"`
	// True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
	HasTimestampedMedia bool `json:"has_timestamped_media"`
	// True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
	IsChannelPost bool `json:"is_channel_post"`
	// True, if the message contains an unread mention for the current user
	ContainsUnreadMention bool `json:"contains_unread_mention"`
	// Point in time (Unix timestamp) when the message was sent
	Date int32 `json:"date"`
	// Point in time (Unix timestamp) when the message was last edited
	EditDate int32 `json:"edit_date"`
	// Information about the initial message sender; may be null
	ForwardInfo *MessageForwardInfo `json:"forward_info"`
	// Information about interactions with the message; may be null
	InteractionInfo *MessageInteractionInfo `json:"interaction_info"`
	// Information about unread reactions added to the message
	UnreadReactions []*UnreadReaction `json:"unread_reactions"`
	// If non-zero, the identifier of the chat to which the replied message belongs; Currently, only messages in the Replies chat can have different reply_in_chat_id and chat_id
	ReplyInChatId int64 `json:"reply_in_chat_id"`
	// If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message
	ReplyToMessageId int64 `json:"reply_to_message_id"`
	// If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
	MessageThreadId int64 `json:"message_thread_id"`
	// For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires
	Ttl int32 `json:"ttl"`
	// Time left before the message expires, in seconds. If the TTL timer isn't started yet, equals to the value of the ttl field
	TtlExpiresIn float64 `json:"ttl_expires_in"`
	// If non-zero, the user identifier of the bot through which this message was sent
	ViaBotUserId int64 `json:"via_bot_user_id"`
	// For channel posts and anonymous group messages, optional author signature
	AuthorSignature string `json:"author_signature"`
	// Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums
	MediaAlbumId JsonInt64 `json:"media_album_id"`
	// If non-empty, contains a human-readable description of the reason why access to this message must be restricted
	RestrictionReason string `json:"restriction_reason"`
	// Content of the message
	Content MessageContent `json:"content"`
	// Reply markup for the message; may be null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// contains filtered or unexported fields
}

Describes a message

func UnmarshalMessage

func UnmarshalMessage(data json.RawMessage) (*Message, error)

func (*Message) GetClass

func (*Message) GetClass() string

func (*Message) GetType

func (*Message) GetType() string

func (*Message) MarshalJSON

func (entity *Message) MarshalJSON() ([]byte, error)

func (*Message) UnmarshalJSON

func (message *Message) UnmarshalJSON(data []byte) error

type MessageAnimatedEmoji added in v1.7.10

type MessageAnimatedEmoji struct {

	// The animated emoji
	AnimatedEmoji *AnimatedEmoji `json:"animated_emoji"`
	// The corresponding emoji
	Emoji string `json:"emoji"`
	// contains filtered or unexported fields
}

A message with an animated emoji

func UnmarshalMessageAnimatedEmoji added in v1.7.10

func UnmarshalMessageAnimatedEmoji(data json.RawMessage) (*MessageAnimatedEmoji, error)

func (*MessageAnimatedEmoji) GetClass added in v1.7.10

func (*MessageAnimatedEmoji) GetClass() string

func (*MessageAnimatedEmoji) GetType added in v1.7.10

func (*MessageAnimatedEmoji) GetType() string

func (*MessageAnimatedEmoji) MarshalJSON added in v1.7.10

func (entity *MessageAnimatedEmoji) MarshalJSON() ([]byte, error)

func (*MessageAnimatedEmoji) MessageContentType added in v1.7.10

func (*MessageAnimatedEmoji) MessageContentType() string

type MessageAnimation

type MessageAnimation struct {

	// The animation description
	Animation *Animation `json:"animation"`
	// Animation caption
	Caption *FormattedText `json:"caption"`
	// True, if the animation thumbnail must be blurred and the animation must be shown only while tapped
	IsSecret bool `json:"is_secret"`
	// contains filtered or unexported fields
}

An animation message (GIF-style).

func UnmarshalMessageAnimation

func UnmarshalMessageAnimation(data json.RawMessage) (*MessageAnimation, error)

func (*MessageAnimation) GetClass

func (*MessageAnimation) GetClass() string

func (*MessageAnimation) GetType

func (*MessageAnimation) GetType() string

func (*MessageAnimation) MarshalJSON

func (entity *MessageAnimation) MarshalJSON() ([]byte, error)

func (*MessageAnimation) MessageContentType

func (*MessageAnimation) MessageContentType() string

type MessageAudio

type MessageAudio struct {

	// The audio description
	Audio *Audio `json:"audio"`
	// Audio caption
	Caption *FormattedText `json:"caption"`
	// contains filtered or unexported fields
}

An audio message

func UnmarshalMessageAudio

func UnmarshalMessageAudio(data json.RawMessage) (*MessageAudio, error)

func (*MessageAudio) GetClass

func (*MessageAudio) GetClass() string

func (*MessageAudio) GetType

func (*MessageAudio) GetType() string

func (*MessageAudio) MarshalJSON

func (entity *MessageAudio) MarshalJSON() ([]byte, error)

func (*MessageAudio) MessageContentType

func (*MessageAudio) MessageContentType() string

type MessageBasicGroupChatCreate

type MessageBasicGroupChatCreate struct {

	// Title of the basic group
	Title string `json:"title"`
	// User identifiers of members in the basic group
	MemberUserIds []int64 `json:"member_user_ids"`
	// contains filtered or unexported fields
}

A newly created basic group

func UnmarshalMessageBasicGroupChatCreate

func UnmarshalMessageBasicGroupChatCreate(data json.RawMessage) (*MessageBasicGroupChatCreate, error)

func (*MessageBasicGroupChatCreate) GetClass

func (*MessageBasicGroupChatCreate) GetClass() string

func (*MessageBasicGroupChatCreate) GetType

func (*MessageBasicGroupChatCreate) MarshalJSON

func (entity *MessageBasicGroupChatCreate) MarshalJSON() ([]byte, error)

func (*MessageBasicGroupChatCreate) MessageContentType

func (*MessageBasicGroupChatCreate) MessageContentType() string

type MessageCalendar added in v1.7.10

type MessageCalendar struct {

	// Total number of found messages
	TotalCount int32 `json:"total_count"`
	// Information about messages sent
	Days []*MessageCalendarDay `json:"days"`
	// contains filtered or unexported fields
}

Contains information about found messages, split by days according to the option "utc_time_offset"

func UnmarshalMessageCalendar added in v1.7.10

func UnmarshalMessageCalendar(data json.RawMessage) (*MessageCalendar, error)

func (*MessageCalendar) GetClass added in v1.7.10

func (*MessageCalendar) GetClass() string

func (*MessageCalendar) GetType added in v1.7.10

func (*MessageCalendar) GetType() string

func (*MessageCalendar) MarshalJSON added in v1.7.10

func (entity *MessageCalendar) MarshalJSON() ([]byte, error)

type MessageCalendarDay added in v1.7.10

type MessageCalendarDay struct {

	// Total number of found messages sent on the day
	TotalCount int32 `json:"total_count"`
	// First message sent on the day
	Message *Message `json:"message"`
	// contains filtered or unexported fields
}

Contains information about found messages sent on a specific day

func UnmarshalMessageCalendarDay added in v1.7.10

func UnmarshalMessageCalendarDay(data json.RawMessage) (*MessageCalendarDay, error)

func (*MessageCalendarDay) GetClass added in v1.7.10

func (*MessageCalendarDay) GetClass() string

func (*MessageCalendarDay) GetType added in v1.7.10

func (*MessageCalendarDay) GetType() string

func (*MessageCalendarDay) MarshalJSON added in v1.7.10

func (entity *MessageCalendarDay) MarshalJSON() ([]byte, error)

type MessageCall

type MessageCall struct {

	// True, if the call was a video call
	IsVideo bool `json:"is_video"`
	// Reason why the call was discarded
	DiscardReason CallDiscardReason `json:"discard_reason"`
	// Call duration, in seconds
	Duration int32 `json:"duration"`
	// contains filtered or unexported fields
}

A message with information about an ended call

func UnmarshalMessageCall

func UnmarshalMessageCall(data json.RawMessage) (*MessageCall, error)

func (*MessageCall) GetClass

func (*MessageCall) GetClass() string

func (*MessageCall) GetType

func (*MessageCall) GetType() string

func (*MessageCall) MarshalJSON

func (entity *MessageCall) MarshalJSON() ([]byte, error)

func (*MessageCall) MessageContentType

func (*MessageCall) MessageContentType() string

func (*MessageCall) UnmarshalJSON

func (messageCall *MessageCall) UnmarshalJSON(data []byte) error

type MessageChatAddMembers

type MessageChatAddMembers struct {

	// User identifiers of the new members
	MemberUserIds []int64 `json:"member_user_ids"`
	// contains filtered or unexported fields
}

New chat members were added

func UnmarshalMessageChatAddMembers

func UnmarshalMessageChatAddMembers(data json.RawMessage) (*MessageChatAddMembers, error)

func (*MessageChatAddMembers) GetClass

func (*MessageChatAddMembers) GetClass() string

func (*MessageChatAddMembers) GetType

func (*MessageChatAddMembers) GetType() string

func (*MessageChatAddMembers) MarshalJSON

func (entity *MessageChatAddMembers) MarshalJSON() ([]byte, error)

func (*MessageChatAddMembers) MessageContentType

func (*MessageChatAddMembers) MessageContentType() string

type MessageChatChangePhoto

type MessageChatChangePhoto struct {

	// New chat photo
	Photo *ChatPhoto `json:"photo"`
	// contains filtered or unexported fields
}

An updated chat photo

func UnmarshalMessageChatChangePhoto

func UnmarshalMessageChatChangePhoto(data json.RawMessage) (*MessageChatChangePhoto, error)

func (*MessageChatChangePhoto) GetClass

func (*MessageChatChangePhoto) GetClass() string

func (*MessageChatChangePhoto) GetType

func (*MessageChatChangePhoto) GetType() string

func (*MessageChatChangePhoto) MarshalJSON

func (entity *MessageChatChangePhoto) MarshalJSON() ([]byte, error)

func (*MessageChatChangePhoto) MessageContentType

func (*MessageChatChangePhoto) MessageContentType() string

type MessageChatChangeTitle

type MessageChatChangeTitle struct {

	// New chat title
	Title string `json:"title"`
	// contains filtered or unexported fields
}

An updated chat title

func UnmarshalMessageChatChangeTitle

func UnmarshalMessageChatChangeTitle(data json.RawMessage) (*MessageChatChangeTitle, error)

func (*MessageChatChangeTitle) GetClass

func (*MessageChatChangeTitle) GetClass() string

func (*MessageChatChangeTitle) GetType

func (*MessageChatChangeTitle) GetType() string

func (*MessageChatChangeTitle) MarshalJSON

func (entity *MessageChatChangeTitle) MarshalJSON() ([]byte, error)

func (*MessageChatChangeTitle) MessageContentType

func (*MessageChatChangeTitle) MessageContentType() string

type MessageChatDeleteMember

type MessageChatDeleteMember struct {

	// User identifier of the deleted chat member
	UserId int64 `json:"user_id"`
	// contains filtered or unexported fields
}

A chat member was deleted

func UnmarshalMessageChatDeleteMember

func UnmarshalMessageChatDeleteMember(data json.RawMessage) (*MessageChatDeleteMember, error)

func (*MessageChatDeleteMember) GetClass

func (*MessageChatDeleteMember) GetClass() string

func (*MessageChatDeleteMember) GetType

func (*MessageChatDeleteMember) GetType() string

func (*MessageChatDeleteMember) MarshalJSON

func (entity *MessageChatDeleteMember) MarshalJSON() ([]byte, error)

func (*MessageChatDeleteMember) MessageContentType

func (*MessageChatDeleteMember) MessageContentType() string

type MessageChatDeletePhoto

type MessageChatDeletePhoto struct {
	// contains filtered or unexported fields
}

A deleted chat photo

func UnmarshalMessageChatDeletePhoto

func UnmarshalMessageChatDeletePhoto(data json.RawMessage) (*MessageChatDeletePhoto, error)

func (*MessageChatDeletePhoto) GetClass

func (*MessageChatDeletePhoto) GetClass() string

func (*MessageChatDeletePhoto) GetType

func (*MessageChatDeletePhoto) GetType() string

func (*MessageChatDeletePhoto) MarshalJSON

func (entity *MessageChatDeletePhoto) MarshalJSON() ([]byte, error)

func (*MessageChatDeletePhoto) MessageContentType

func (*MessageChatDeletePhoto) MessageContentType() string
type MessageChatJoinByLink struct {
	// contains filtered or unexported fields
}

A new member joined the chat via an invite link

func UnmarshalMessageChatJoinByLink(data json.RawMessage) (*MessageChatJoinByLink, error)

func (*MessageChatJoinByLink) GetClass

func (*MessageChatJoinByLink) GetClass() string

func (*MessageChatJoinByLink) GetType

func (*MessageChatJoinByLink) GetType() string

func (*MessageChatJoinByLink) MarshalJSON

func (entity *MessageChatJoinByLink) MarshalJSON() ([]byte, error)

func (*MessageChatJoinByLink) MessageContentType

func (*MessageChatJoinByLink) MessageContentType() string

type MessageChatJoinByRequest added in v1.7.10

type MessageChatJoinByRequest struct {
	// contains filtered or unexported fields
}

A new member was accepted to the chat by an administrator

func UnmarshalMessageChatJoinByRequest added in v1.7.10

func UnmarshalMessageChatJoinByRequest(data json.RawMessage) (*MessageChatJoinByRequest, error)

func (*MessageChatJoinByRequest) GetClass added in v1.7.10

func (*MessageChatJoinByRequest) GetClass() string

func (*MessageChatJoinByRequest) GetType added in v1.7.10

func (*MessageChatJoinByRequest) GetType() string

func (*MessageChatJoinByRequest) MarshalJSON added in v1.7.10

func (entity *MessageChatJoinByRequest) MarshalJSON() ([]byte, error)

func (*MessageChatJoinByRequest) MessageContentType added in v1.7.10

func (*MessageChatJoinByRequest) MessageContentType() string

type MessageChatSetTheme added in v1.7.10

type MessageChatSetTheme struct {

	// If non-empty, name of a new theme, set for the chat. Otherwise chat theme was reset to the default one
	ThemeName string `json:"theme_name"`
	// contains filtered or unexported fields
}

A theme in the chat has been changed

func UnmarshalMessageChatSetTheme added in v1.7.10

func UnmarshalMessageChatSetTheme(data json.RawMessage) (*MessageChatSetTheme, error)

func (*MessageChatSetTheme) GetClass added in v1.7.10

func (*MessageChatSetTheme) GetClass() string

func (*MessageChatSetTheme) GetType added in v1.7.10

func (*MessageChatSetTheme) GetType() string

func (*MessageChatSetTheme) MarshalJSON added in v1.7.10

func (entity *MessageChatSetTheme) MarshalJSON() ([]byte, error)

func (*MessageChatSetTheme) MessageContentType added in v1.7.10

func (*MessageChatSetTheme) MessageContentType() string

type MessageChatSetTtl

type MessageChatSetTtl struct {

	// New message TTL
	Ttl int32 `json:"ttl"`
	// contains filtered or unexported fields
}

The TTL (Time To Live) setting for messages in the chat has been changed

func UnmarshalMessageChatSetTtl

func UnmarshalMessageChatSetTtl(data json.RawMessage) (*MessageChatSetTtl, error)

func (*MessageChatSetTtl) GetClass

func (*MessageChatSetTtl) GetClass() string

func (*MessageChatSetTtl) GetType

func (*MessageChatSetTtl) GetType() string

func (*MessageChatSetTtl) MarshalJSON

func (entity *MessageChatSetTtl) MarshalJSON() ([]byte, error)

func (*MessageChatSetTtl) MessageContentType

func (*MessageChatSetTtl) MessageContentType() string

type MessageChatUpgradeFrom

type MessageChatUpgradeFrom struct {

	// Title of the newly created supergroup
	Title string `json:"title"`
	// The identifier of the original basic group
	BasicGroupId int64 `json:"basic_group_id"`
	// contains filtered or unexported fields
}

A supergroup has been created from a basic group

func UnmarshalMessageChatUpgradeFrom

func UnmarshalMessageChatUpgradeFrom(data json.RawMessage) (*MessageChatUpgradeFrom, error)

func (*MessageChatUpgradeFrom) GetClass

func (*MessageChatUpgradeFrom) GetClass() string

func (*MessageChatUpgradeFrom) GetType

func (*MessageChatUpgradeFrom) GetType() string

func (*MessageChatUpgradeFrom) MarshalJSON

func (entity *MessageChatUpgradeFrom) MarshalJSON() ([]byte, error)

func (*MessageChatUpgradeFrom) MessageContentType

func (*MessageChatUpgradeFrom) MessageContentType() string

type MessageChatUpgradeTo

type MessageChatUpgradeTo struct {

	// Identifier of the supergroup to which the basic group was upgraded
	SupergroupId int64 `json:"supergroup_id"`
	// contains filtered or unexported fields
}

A basic group was upgraded to a supergroup and was deactivated as the result

func UnmarshalMessageChatUpgradeTo

func UnmarshalMessageChatUpgradeTo(data json.RawMessage) (*MessageChatUpgradeTo, error)

func (*MessageChatUpgradeTo) GetClass

func (*MessageChatUpgradeTo) GetClass() string

func (*MessageChatUpgradeTo) GetType

func (*MessageChatUpgradeTo) GetType() string

func (*MessageChatUpgradeTo) MarshalJSON

func (entity *MessageChatUpgradeTo) MarshalJSON() ([]byte, error)

func (*MessageChatUpgradeTo) MessageContentType

func (*MessageChatUpgradeTo) MessageContentType() string

type MessageContact

type MessageContact struct {

	// The contact description
	Contact *Contact `json:"contact"`
	// contains filtered or unexported fields
}

A message with a user contact

func UnmarshalMessageContact

func UnmarshalMessageContact(data json.RawMessage) (*MessageContact, error)

func (*MessageContact) GetClass

func (*MessageContact) GetClass() string

func (*MessageContact) GetType

func (*MessageContact) GetType() string

func (*MessageContact) MarshalJSON

func (entity *MessageContact) MarshalJSON() ([]byte, error)

func (*MessageContact) MessageContentType

func (*MessageContact) MessageContentType() string

type MessageContactRegistered

type MessageContactRegistered struct {
	// contains filtered or unexported fields
}

A contact has registered with Telegram

func UnmarshalMessageContactRegistered

func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error)

func (*MessageContactRegistered) GetClass

func (*MessageContactRegistered) GetClass() string

func (*MessageContactRegistered) GetType

func (*MessageContactRegistered) GetType() string

func (*MessageContactRegistered) MarshalJSON

func (entity *MessageContactRegistered) MarshalJSON() ([]byte, error)

func (*MessageContactRegistered) MessageContentType

func (*MessageContactRegistered) MessageContentType() string

type MessageContent

type MessageContent interface {
	MessageContentType() string
}

Contains the content of a message

func UnmarshalListOfMessageContent

func UnmarshalListOfMessageContent(dataList []json.RawMessage) ([]MessageContent, error)

func UnmarshalMessageContent

func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error)

type MessageCopyOptions

type MessageCopyOptions struct {

	// True, if content of the message needs to be copied without reference to the original sender. Always true if the message is forwarded to a secret chat or is local
	SendCopy bool `json:"send_copy"`
	// True, if media caption of the message copy needs to be replaced. Ignored if send_copy is false
	ReplaceCaption bool `json:"replace_caption"`
	// New message caption; pass null to copy message without caption. Ignored if replace_caption is false
	NewCaption *FormattedText `json:"new_caption"`
	// contains filtered or unexported fields
}

Options to be used when a message content is copied without reference to the original sender. Service messages and messageInvoice can't be copied

func UnmarshalMessageCopyOptions

func UnmarshalMessageCopyOptions(data json.RawMessage) (*MessageCopyOptions, error)

func (*MessageCopyOptions) GetClass

func (*MessageCopyOptions) GetClass() string

func (*MessageCopyOptions) GetType

func (*MessageCopyOptions) GetType() string

func (*MessageCopyOptions) MarshalJSON

func (entity *MessageCopyOptions) MarshalJSON() ([]byte, error)

type MessageCustomServiceAction

type MessageCustomServiceAction struct {

	// Message text to be shown in the chat
	Text string `json:"text"`
	// contains filtered or unexported fields
}

A non-standard action has happened in the chat

func UnmarshalMessageCustomServiceAction

func UnmarshalMessageCustomServiceAction(data json.RawMessage) (*MessageCustomServiceAction, error)

func (*MessageCustomServiceAction) GetClass

func (*MessageCustomServiceAction) GetClass() string

func (*MessageCustomServiceAction) GetType

func (*MessageCustomServiceAction) MarshalJSON

func (entity *MessageCustomServiceAction) MarshalJSON() ([]byte, error)

func (*MessageCustomServiceAction) MessageContentType

func (*MessageCustomServiceAction) MessageContentType() string

type MessageDice

type MessageDice struct {

	// The animated stickers with the initial dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known
	InitialState DiceStickers `json:"initial_state"`
	// The animated stickers with the final dice animation; may be null if unknown. updateMessageContent will be sent when the sticker became known
	FinalState DiceStickers `json:"final_state"`
	// Emoji on which the dice throw animation is based
	Emoji string `json:"emoji"`
	// The dice value. If the value is 0, the dice don't have final state yet
	Value int32 `json:"value"`
	// Number of frame after which a success animation like a shower of confetti needs to be shown on updateMessageSendSucceeded
	SuccessAnimationFrameNumber int32 `json:"success_animation_frame_number"`
	// contains filtered or unexported fields
}

A dice message. The dice value is randomly generated by the server

func UnmarshalMessageDice

func UnmarshalMessageDice(data json.RawMessage) (*MessageDice, error)

func (*MessageDice) GetClass

func (*MessageDice) GetClass() string

func (*MessageDice) GetType

func (*MessageDice) GetType() string

func (*MessageDice) MarshalJSON

func (entity *MessageDice) MarshalJSON() ([]byte, error)

func (*MessageDice) MessageContentType

func (*MessageDice) MessageContentType() string

func (*MessageDice) UnmarshalJSON

func (messageDice *MessageDice) UnmarshalJSON(data []byte) error

type MessageDocument

type MessageDocument struct {

	// The document description
	Document *Document `json:"document"`
	// Document caption
	Caption *FormattedText `json:"caption"`
	// contains filtered or unexported fields
}

A document message (general file)

func UnmarshalMessageDocument

func UnmarshalMessageDocument(data json.RawMessage) (*MessageDocument, error)

func (*MessageDocument) GetClass

func (*MessageDocument) GetClass() string

func (*MessageDocument) GetType

func (*MessageDocument) GetType() string

func (*MessageDocument) MarshalJSON

func (entity *MessageDocument) MarshalJSON() ([]byte, error)

func (*MessageDocument) MessageContentType

func (*MessageDocument) MessageContentType() string

type MessageExpiredPhoto

type MessageExpiredPhoto struct {
	// contains filtered or unexported fields
}

An expired photo message (self-destructed after TTL has elapsed)

func UnmarshalMessageExpiredPhoto

func UnmarshalMessageExpiredPhoto(data json.RawMessage) (*MessageExpiredPhoto, error)

func (*MessageExpiredPhoto) GetClass

func (*MessageExpiredPhoto) GetClass() string

func (*MessageExpiredPhoto) GetType

func (*MessageExpiredPhoto) GetType() string

func (*MessageExpiredPhoto) MarshalJSON

func (entity *MessageExpiredPhoto) MarshalJSON() ([]byte, error)

func (*MessageExpiredPhoto) MessageContentType

func (*MessageExpiredPhoto) MessageContentType() string

type MessageExpiredVideo

type MessageExpiredVideo struct {
	// contains filtered or unexported fields
}

An expired video message (self-destructed after TTL has elapsed)

func UnmarshalMessageExpiredVideo

func UnmarshalMessageExpiredVideo(data json.RawMessage) (*MessageExpiredVideo, error)

func (*MessageExpiredVideo) GetClass

func (*MessageExpiredVideo) GetClass() string

func (*MessageExpiredVideo) GetType

func (*MessageExpiredVideo) GetType() string

func (*MessageExpiredVideo) MarshalJSON

func (entity *MessageExpiredVideo) MarshalJSON() ([]byte, error)

func (*MessageExpiredVideo) MessageContentType

func (*MessageExpiredVideo) MessageContentType() string

type MessageFileType added in v1.7.10

type MessageFileType interface {
	MessageFileTypeType() string
}

Contains information about a file with messages exported from another app

func UnmarshalListOfMessageFileType added in v1.7.10

func UnmarshalListOfMessageFileType(dataList []json.RawMessage) ([]MessageFileType, error)

func UnmarshalMessageFileType added in v1.7.10

func UnmarshalMessageFileType(data json.RawMessage) (MessageFileType, error)

type MessageFileTypeGroup added in v1.7.10

type MessageFileTypeGroup struct {

	// Title of the group chat; may be empty if unrecognized
	Title string `json:"title"`
	// contains filtered or unexported fields
}

The messages was exported from a group chat

func UnmarshalMessageFileTypeGroup added in v1.7.10

func UnmarshalMessageFileTypeGroup(data json.RawMessage) (*MessageFileTypeGroup, error)

func (*MessageFileTypeGroup) GetClass added in v1.7.10

func (*MessageFileTypeGroup) GetClass() string

func (*MessageFileTypeGroup) GetType added in v1.7.10

func (*MessageFileTypeGroup) GetType() string

func (*MessageFileTypeGroup) MarshalJSON added in v1.7.10

func (entity *MessageFileTypeGroup) MarshalJSON() ([]byte, error)

func (*MessageFileTypeGroup) MessageFileTypeType added in v1.7.10

func (*MessageFileTypeGroup) MessageFileTypeType() string

type MessageFileTypePrivate added in v1.7.10

type MessageFileTypePrivate struct {

	// Name of the other party; may be empty if unrecognized
	Name string `json:"name"`
	// contains filtered or unexported fields
}

The messages was exported from a private chat

func UnmarshalMessageFileTypePrivate added in v1.7.10

func UnmarshalMessageFileTypePrivate(data json.RawMessage) (*MessageFileTypePrivate, error)

func (*MessageFileTypePrivate) GetClass added in v1.7.10

func (*MessageFileTypePrivate) GetClass() string

func (*MessageFileTypePrivate) GetType added in v1.7.10

func (*MessageFileTypePrivate) GetType() string

func (*MessageFileTypePrivate) MarshalJSON added in v1.7.10

func (entity *MessageFileTypePrivate) MarshalJSON() ([]byte, error)

func (*MessageFileTypePrivate) MessageFileTypeType added in v1.7.10

func (*MessageFileTypePrivate) MessageFileTypeType() string

type MessageFileTypeUnknown added in v1.7.10

type MessageFileTypeUnknown struct {
	// contains filtered or unexported fields
}

The messages was exported from a chat of unknown type

func UnmarshalMessageFileTypeUnknown added in v1.7.10

func UnmarshalMessageFileTypeUnknown(data json.RawMessage) (*MessageFileTypeUnknown, error)

func (*MessageFileTypeUnknown) GetClass added in v1.7.10

func (*MessageFileTypeUnknown) GetClass() string

func (*MessageFileTypeUnknown) GetType added in v1.7.10

func (*MessageFileTypeUnknown) GetType() string

func (*MessageFileTypeUnknown) MarshalJSON added in v1.7.10

func (entity *MessageFileTypeUnknown) MarshalJSON() ([]byte, error)

func (*MessageFileTypeUnknown) MessageFileTypeType added in v1.7.10

func (*MessageFileTypeUnknown) MessageFileTypeType() string

type MessageForwardInfo

type MessageForwardInfo struct {

	// Origin of a forwarded message
	Origin MessageForwardOrigin `json:"origin"`
	// Point in time (Unix timestamp) when the message was originally sent
	Date int32 `json:"date"`
	// The type of a public service announcement for the forwarded message
	PublicServiceAnnouncementType string `json:"public_service_announcement_type"`
	// For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, the identifier of the chat from which the message was forwarded last time; 0 if unknown
	FromChatId int64 `json:"from_chat_id"`
	// For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, the identifier of the original message from which the new message was forwarded last time; 0 if unknown
	FromMessageId int64 `json:"from_message_id"`
	// contains filtered or unexported fields
}

Contains information about a forwarded message

func UnmarshalMessageForwardInfo

func UnmarshalMessageForwardInfo(data json.RawMessage) (*MessageForwardInfo, error)

func (*MessageForwardInfo) GetClass

func (*MessageForwardInfo) GetClass() string

func (*MessageForwardInfo) GetType

func (*MessageForwardInfo) GetType() string

func (*MessageForwardInfo) MarshalJSON

func (entity *MessageForwardInfo) MarshalJSON() ([]byte, error)

func (*MessageForwardInfo) UnmarshalJSON

func (messageForwardInfo *MessageForwardInfo) UnmarshalJSON(data []byte) error

type MessageForwardOrigin

type MessageForwardOrigin interface {
	MessageForwardOriginType() string
}

Contains information about the origin of a forwarded message

func UnmarshalListOfMessageForwardOrigin

func UnmarshalListOfMessageForwardOrigin(dataList []json.RawMessage) ([]MessageForwardOrigin, error)

func UnmarshalMessageForwardOrigin

func UnmarshalMessageForwardOrigin(data json.RawMessage) (MessageForwardOrigin, error)

type MessageForwardOriginChannel

type MessageForwardOriginChannel struct {

	// Identifier of the chat from which the message was originally forwarded
	ChatId int64 `json:"chat_id"`
	// Message identifier of the original message
	MessageId int64 `json:"message_id"`
	// Original post author signature
	AuthorSignature string `json:"author_signature"`
	// contains filtered or unexported fields
}

The message was originally a post in a channel

func UnmarshalMessageForwardOriginChannel

func UnmarshalMessageForwardOriginChannel(data json.RawMessage) (*MessageForwardOriginChannel, error)

func (*MessageForwardOriginChannel) GetClass

func (*MessageForwardOriginChannel) GetClass() string

func (*MessageForwardOriginChannel) GetType

func (*MessageForwardOriginChannel) MarshalJSON

func (entity *MessageForwardOriginChannel) MarshalJSON() ([]byte, error)

func (*MessageForwardOriginChannel) MessageForwardOriginType

func (*MessageForwardOriginChannel) MessageForwardOriginType() string

type MessageForwardOriginChat

type MessageForwardOriginChat struct {

	// Identifier of the chat that originally sent the message
	SenderChatId int64 `json:"sender_chat_id"`
	// For messages originally sent by an anonymous chat administrator, original message author signature
	AuthorSignature string `json:"author_signature"`
	// contains filtered or unexported fields
}

The message was originally sent on behalf of a chat

func UnmarshalMessageForwardOriginChat

func UnmarshalMessageForwardOriginChat(data json.RawMessage) (*MessageForwardOriginChat, error)

func (*MessageForwardOriginChat) GetClass

func (*MessageForwardOriginChat) GetClass() string

func (*MessageForwardOriginChat) GetType

func (*MessageForwardOriginChat) GetType() string

func (*MessageForwardOriginChat) MarshalJSON

func (entity *MessageForwardOriginChat) MarshalJSON() ([]byte, error)

func (*MessageForwardOriginChat) MessageForwardOriginType

func (*MessageForwardOriginChat) MessageForwardOriginType() string

type MessageForwardOriginHiddenUser

type MessageForwardOriginHiddenUser struct {

	// Name of the sender
	SenderName string `json:"sender_name"`
	// contains filtered or unexported fields
}

The message was originally sent by a user, which is hidden by their privacy settings

func UnmarshalMessageForwardOriginHiddenUser

func UnmarshalMessageForwardOriginHiddenUser(data json.RawMessage) (*MessageForwardOriginHiddenUser, error)

func (*MessageForwardOriginHiddenUser) GetClass

func (*MessageForwardOriginHiddenUser) GetType

func (*MessageForwardOriginHiddenUser) MarshalJSON

func (entity *MessageForwardOriginHiddenUser) MarshalJSON() ([]byte, error)

func (*MessageForwardOriginHiddenUser) MessageForwardOriginType

func (*MessageForwardOriginHiddenUser) MessageForwardOriginType() string

type MessageForwardOriginMessageImport added in v1.7.10

type MessageForwardOriginMessageImport struct {

	// Name of the sender
	SenderName string `json:"sender_name"`
	// contains filtered or unexported fields
}

The message was imported from an exported message history

func UnmarshalMessageForwardOriginMessageImport added in v1.7.10

func UnmarshalMessageForwardOriginMessageImport(data json.RawMessage) (*MessageForwardOriginMessageImport, error)

func (*MessageForwardOriginMessageImport) GetClass added in v1.7.10

func (*MessageForwardOriginMessageImport) GetType added in v1.7.10

func (*MessageForwardOriginMessageImport) MarshalJSON added in v1.7.10

func (entity *MessageForwardOriginMessageImport) MarshalJSON() ([]byte, error)

func (*MessageForwardOriginMessageImport) MessageForwardOriginType added in v1.7.10

func (*MessageForwardOriginMessageImport) MessageForwardOriginType() string

type MessageForwardOriginUser

type MessageForwardOriginUser struct {

	// Identifier of the user that originally sent the message
	SenderUserId int64 `json:"sender_user_id"`
	// contains filtered or unexported fields
}

The message was originally sent by a known user

func UnmarshalMessageForwardOriginUser

func UnmarshalMessageForwardOriginUser(data json.RawMessage) (*MessageForwardOriginUser, error)

func (*MessageForwardOriginUser) GetClass

func (*MessageForwardOriginUser) GetClass() string

func (*MessageForwardOriginUser) GetType

func (*MessageForwardOriginUser) GetType() string

func (*MessageForwardOriginUser) MarshalJSON

func (entity *MessageForwardOriginUser) MarshalJSON() ([]byte, error)

func (*MessageForwardOriginUser) MessageForwardOriginType

func (*MessageForwardOriginUser) MessageForwardOriginType() string

type MessageGame

type MessageGame struct {

	// The game description
	Game *Game `json:"game"`
	// contains filtered or unexported fields
}

A message with a game

func UnmarshalMessageGame

func UnmarshalMessageGame(data json.RawMessage) (*MessageGame, error)

func (*MessageGame) GetClass

func (*MessageGame) GetClass() string

func (*MessageGame) GetType

func (*MessageGame) GetType() string

func (*MessageGame) MarshalJSON

func (entity *MessageGame) MarshalJSON() ([]byte, error)

func (*MessageGame) MessageContentType

func (*MessageGame) MessageContentType() string

type MessageGameScore

type MessageGameScore struct {

	// Identifier of the message with the game, can be an identifier of a deleted message
	GameMessageId int64 `json:"game_message_id"`
	// Identifier of the game; may be different from the games presented in the message with the game
	GameId JsonInt64 `json:"game_id"`
	// New score
	Score int32 `json:"score"`
	// contains filtered or unexported fields
}

A new high score was achieved in a game

func UnmarshalMessageGameScore

func UnmarshalMessageGameScore(data json.RawMessage) (*MessageGameScore, error)

func (*MessageGameScore) GetClass

func (*MessageGameScore) GetClass() string

func (*MessageGameScore) GetType

func (*MessageGameScore) GetType() string

func (*MessageGameScore) MarshalJSON

func (entity *MessageGameScore) MarshalJSON() ([]byte, error)

func (*MessageGameScore) MessageContentType

func (*MessageGameScore) MessageContentType() string

type MessageInteractionInfo

type MessageInteractionInfo struct {

	// Number of times the message was viewed
	ViewCount int32 `json:"view_count"`
	// Number of times the message was forwarded
	ForwardCount int32 `json:"forward_count"`
	// Information about direct or indirect replies to the message; may be null. Currently, available only in channels with a discussion supergroup and discussion supergroups for messages, which are not replies itself
	ReplyInfo *MessageReplyInfo `json:"reply_info"`
	// The list of reactions added to the message
	Reactions []*MessageReaction `json:"reactions"`
	// contains filtered or unexported fields
}

Contains information about interactions with a message

func UnmarshalMessageInteractionInfo

func UnmarshalMessageInteractionInfo(data json.RawMessage) (*MessageInteractionInfo, error)

func (*MessageInteractionInfo) GetClass

func (*MessageInteractionInfo) GetClass() string

func (*MessageInteractionInfo) GetType

func (*MessageInteractionInfo) GetType() string

func (*MessageInteractionInfo) MarshalJSON

func (entity *MessageInteractionInfo) MarshalJSON() ([]byte, error)

type MessageInviteVideoChatParticipants added in v1.7.10

type MessageInviteVideoChatParticipants struct {

	// Identifier of the video chat. The video chat can be received through the method getGroupCall
	GroupCallId int32 `json:"group_call_id"`
	// Invited user identifiers
	UserIds []int64 `json:"user_ids"`
	// contains filtered or unexported fields
}

A message with information about an invite to a video chat

func UnmarshalMessageInviteVideoChatParticipants added in v1.7.10

func UnmarshalMessageInviteVideoChatParticipants(data json.RawMessage) (*MessageInviteVideoChatParticipants, error)

func (*MessageInviteVideoChatParticipants) GetClass added in v1.7.10

func (*MessageInviteVideoChatParticipants) GetType added in v1.7.10

func (*MessageInviteVideoChatParticipants) MarshalJSON added in v1.7.10

func (entity *MessageInviteVideoChatParticipants) MarshalJSON() ([]byte, error)

func (*MessageInviteVideoChatParticipants) MessageContentType added in v1.7.10

func (*MessageInviteVideoChatParticipants) MessageContentType() string

type MessageInvoice

type MessageInvoice struct {

	// Product title
	Title string `json:"title"`
	// Product description
	Description string `json:"description"`
	// Product photo; may be null
	Photo *Photo `json:"photo"`
	// Currency for the product price
	Currency string `json:"currency"`
	// Product total price in the smallest units of the currency
	TotalAmount int64 `json:"total_amount"`
	// Unique invoice bot start_parameter. To share an invoice use the URL https://t.me/{bot_username}?start={start_parameter}
	StartParameter string `json:"start_parameter"`
	// True, if the invoice is a test invoice
	IsTest bool `json:"is_test"`
	// True, if the shipping address must be specified
	NeedShippingAddress bool `json:"need_shipping_address"`
	// The identifier of the message with the receipt, after the product has been purchased
	ReceiptMessageId int64 `json:"receipt_message_id"`
	// contains filtered or unexported fields
}

A message with an invoice from a bot

func UnmarshalMessageInvoice

func UnmarshalMessageInvoice(data json.RawMessage) (*MessageInvoice, error)

func (*MessageInvoice) GetClass

func (*MessageInvoice) GetClass() string

func (*MessageInvoice) GetType

func (*MessageInvoice) GetType() string

func (*MessageInvoice) MarshalJSON

func (entity *MessageInvoice) MarshalJSON() ([]byte, error)

func (*MessageInvoice) MessageContentType

func (*MessageInvoice) MessageContentType() string
type MessageLink struct {

	// Message link
	Link string `json:"link"`
	// True, if the link will work for non-members of the chat
	IsPublic bool `json:"is_public"`
	// contains filtered or unexported fields
}

Contains an HTTPS link to a message in a supergroup or channel

func UnmarshalMessageLink(data json.RawMessage) (*MessageLink, error)

func (*MessageLink) GetClass

func (*MessageLink) GetClass() string

func (*MessageLink) GetType

func (*MessageLink) GetType() string

func (*MessageLink) MarshalJSON

func (entity *MessageLink) MarshalJSON() ([]byte, error)

type MessageLinkInfo

type MessageLinkInfo struct {

	// True, if the link is a public link for a message in a chat
	IsPublic bool `json:"is_public"`
	// If found, identifier of the chat to which the message belongs, 0 otherwise
	ChatId int64 `json:"chat_id"`
	// If found, the linked message; may be null
	Message *Message `json:"message"`
	// Timestamp from which the video/audio/video note/voice note playing must start, in seconds; 0 if not specified. The media can be in the message content or in its web page preview
	MediaTimestamp int32 `json:"media_timestamp"`
	// True, if the whole media album to which the message belongs is linked
	ForAlbum bool `json:"for_album"`
	// True, if the message is linked as a channel post comment or from a message thread
	ForComment bool `json:"for_comment"`
	// contains filtered or unexported fields
}

Contains information about a link to a message in a chat

func UnmarshalMessageLinkInfo

func UnmarshalMessageLinkInfo(data json.RawMessage) (*MessageLinkInfo, error)

func (*MessageLinkInfo) GetClass

func (*MessageLinkInfo) GetClass() string

func (*MessageLinkInfo) GetType

func (*MessageLinkInfo) GetType() string

func (*MessageLinkInfo) MarshalJSON

func (entity *MessageLinkInfo) MarshalJSON() ([]byte, error)

type MessageLocation

type MessageLocation struct {

	// The location description
	Location *Location `json:"location"`
	// Time relative to the message send date, for which the location can be updated, in seconds
	LivePeriod int32 `json:"live_period"`
	// Left time for which the location can be updated, in seconds. updateMessageContent is not sent when this field changes
	ExpiresIn int32 `json:"expires_in"`
	// For live locations, a direction in which the location moves, in degrees; 1-360. If 0 the direction is unknown
	Heading int32 `json:"heading"`
	// For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). 0 if the notification is disabled. Available only for the message sender
	ProximityAlertRadius int32 `json:"proximity_alert_radius"`
	// contains filtered or unexported fields
}

A message with a location

func UnmarshalMessageLocation

func UnmarshalMessageLocation(data json.RawMessage) (*MessageLocation, error)

func (*MessageLocation) GetClass

func (*MessageLocation) GetClass() string

func (*MessageLocation) GetType

func (*MessageLocation) GetType() string

func (*MessageLocation) MarshalJSON

func (entity *MessageLocation) MarshalJSON() ([]byte, error)

func (*MessageLocation) MessageContentType

func (*MessageLocation) MessageContentType() string

type MessagePassportDataReceived

type MessagePassportDataReceived struct {

	// List of received Telegram Passport elements
	Elements []*EncryptedPassportElement `json:"elements"`
	// Encrypted data credentials
	Credentials *EncryptedCredentials `json:"credentials"`
	// contains filtered or unexported fields
}

Telegram Passport data has been received; for bots only

func UnmarshalMessagePassportDataReceived

func UnmarshalMessagePassportDataReceived(data json.RawMessage) (*MessagePassportDataReceived, error)

func (*MessagePassportDataReceived) GetClass

func (*MessagePassportDataReceived) GetClass() string

func (*MessagePassportDataReceived) GetType

func (*MessagePassportDataReceived) MarshalJSON

func (entity *MessagePassportDataReceived) MarshalJSON() ([]byte, error)

func (*MessagePassportDataReceived) MessageContentType

func (*MessagePassportDataReceived) MessageContentType() string

type MessagePassportDataSent

type MessagePassportDataSent struct {

	// List of Telegram Passport element types sent
	Types []PassportElementType `json:"types"`
	// contains filtered or unexported fields
}

Telegram Passport data has been sent to a bot

func UnmarshalMessagePassportDataSent

func UnmarshalMessagePassportDataSent(data json.RawMessage) (*MessagePassportDataSent, error)

func (*MessagePassportDataSent) GetClass

func (*MessagePassportDataSent) GetClass() string

func (*MessagePassportDataSent) GetType

func (*MessagePassportDataSent) GetType() string

func (*MessagePassportDataSent) MarshalJSON

func (entity *MessagePassportDataSent) MarshalJSON() ([]byte, error)

func (*MessagePassportDataSent) MessageContentType

func (*MessagePassportDataSent) MessageContentType() string

func (*MessagePassportDataSent) UnmarshalJSON

func (messagePassportDataSent *MessagePassportDataSent) UnmarshalJSON(data []byte) error

type MessagePaymentSuccessful

type MessagePaymentSuccessful struct {

	// Identifier of the chat, containing the corresponding invoice message; 0 if unknown
	InvoiceChatId int64 `json:"invoice_chat_id"`
	// Identifier of the message with the corresponding invoice; can be an identifier of a deleted message
	InvoiceMessageId int64 `json:"invoice_message_id"`
	// Currency for the price of the product
	Currency string `json:"currency"`
	// Total price for the product, in the smallest units of the currency
	TotalAmount int64 `json:"total_amount"`
	// contains filtered or unexported fields
}

A payment has been completed

func UnmarshalMessagePaymentSuccessful

func UnmarshalMessagePaymentSuccessful(data json.RawMessage) (*MessagePaymentSuccessful, error)

func (*MessagePaymentSuccessful) GetClass

func (*MessagePaymentSuccessful) GetClass() string

func (*MessagePaymentSuccessful) GetType

func (*MessagePaymentSuccessful) GetType() string

func (*MessagePaymentSuccessful) MarshalJSON

func (entity *MessagePaymentSuccessful) MarshalJSON() ([]byte, error)

func (*MessagePaymentSuccessful) MessageContentType

func (*MessagePaymentSuccessful) MessageContentType() string

type MessagePaymentSuccessfulBot

type MessagePaymentSuccessfulBot struct {

	// Currency for price of the product
	Currency string `json:"currency"`
	// Total price for the product, in the smallest units of the currency
	TotalAmount int64 `json:"total_amount"`
	// Invoice payload
	InvoicePayload []byte `json:"invoice_payload"`
	// Identifier of the shipping option chosen by the user; may be empty if not applicable
	ShippingOptionId string `json:"shipping_option_id"`
	// Information about the order; may be null
	OrderInfo *OrderInfo `json:"order_info"`
	// Telegram payment identifier
	TelegramPaymentChargeId string `json:"telegram_payment_charge_id"`
	// Provider payment identifier
	ProviderPaymentChargeId string `json:"provider_payment_charge_id"`
	// contains filtered or unexported fields
}

A payment has been completed; for bots only

func UnmarshalMessagePaymentSuccessfulBot

func UnmarshalMessagePaymentSuccessfulBot(data json.RawMessage) (*MessagePaymentSuccessfulBot, error)

func (*MessagePaymentSuccessfulBot) GetClass

func (*MessagePaymentSuccessfulBot) GetClass() string

func (*MessagePaymentSuccessfulBot) GetType

func (*MessagePaymentSuccessfulBot) MarshalJSON

func (entity *MessagePaymentSuccessfulBot) MarshalJSON() ([]byte, error)

func (*MessagePaymentSuccessfulBot) MessageContentType

func (*MessagePaymentSuccessfulBot) MessageContentType() string

type MessagePhoto

type MessagePhoto struct {

	// The photo description
	Photo *Photo `json:"photo"`
	// Photo caption
	Caption *FormattedText `json:"caption"`
	// True, if the photo must be blurred and must be shown only while tapped
	IsSecret bool `json:"is_secret"`
	// contains filtered or unexported fields
}

A photo message

func UnmarshalMessagePhoto

func UnmarshalMessagePhoto(data json.RawMessage) (*MessagePhoto, error)

func (*MessagePhoto) GetClass

func (*MessagePhoto) GetClass() string

func (*MessagePhoto) GetType

func (*MessagePhoto) GetType() string

func (*MessagePhoto) MarshalJSON

func (entity *MessagePhoto) MarshalJSON() ([]byte, error)

func (*MessagePhoto) MessageContentType

func (*MessagePhoto) MessageContentType() string

type MessagePinMessage

type MessagePinMessage struct {

	// Identifier of the pinned message, can be an identifier of a deleted message or 0
	MessageId int64 `json:"message_id"`
	// contains filtered or unexported fields
}

A message has been pinned

func UnmarshalMessagePinMessage

func UnmarshalMessagePinMessage(data json.RawMessage) (*MessagePinMessage, error)

func (*MessagePinMessage) GetClass

func (*MessagePinMessage) GetClass() string

func (*MessagePinMessage) GetType

func (*MessagePinMessage) GetType() string

func (*MessagePinMessage) MarshalJSON

func (entity *MessagePinMessage) MarshalJSON() ([]byte, error)

func (*MessagePinMessage) MessageContentType

func (*MessagePinMessage) MessageContentType() string

type MessagePoll

type MessagePoll struct {

	// The poll description
	Poll *Poll `json:"poll"`
	// contains filtered or unexported fields
}

A message with a poll

func UnmarshalMessagePoll

func UnmarshalMessagePoll(data json.RawMessage) (*MessagePoll, error)

func (*MessagePoll) GetClass

func (*MessagePoll) GetClass() string

func (*MessagePoll) GetType

func (*MessagePoll) GetType() string

func (*MessagePoll) MarshalJSON

func (entity *MessagePoll) MarshalJSON() ([]byte, error)

func (*MessagePoll) MessageContentType

func (*MessagePoll) MessageContentType() string

type MessagePosition added in v1.7.10

type MessagePosition struct {

	// 0-based message position in the full list of suitable messages
	Position int32 `json:"position"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// Point in time (Unix timestamp) when the message was sent
	Date int32 `json:"date"`
	// contains filtered or unexported fields
}

Contains information about a message in a specific position

func UnmarshalMessagePosition added in v1.7.10

func UnmarshalMessagePosition(data json.RawMessage) (*MessagePosition, error)

func (*MessagePosition) GetClass added in v1.7.10

func (*MessagePosition) GetClass() string

func (*MessagePosition) GetType added in v1.7.10

func (*MessagePosition) GetType() string

func (*MessagePosition) MarshalJSON added in v1.7.10

func (entity *MessagePosition) MarshalJSON() ([]byte, error)

type MessagePositions added in v1.7.10

type MessagePositions struct {

	// Total number of messages found
	TotalCount int32 `json:"total_count"`
	// List of message positions
	Positions []*MessagePosition `json:"positions"`
	// contains filtered or unexported fields
}

Contains a list of message positions

func UnmarshalMessagePositions added in v1.7.10

func UnmarshalMessagePositions(data json.RawMessage) (*MessagePositions, error)

func (*MessagePositions) GetClass added in v1.7.10

func (*MessagePositions) GetClass() string

func (*MessagePositions) GetType added in v1.7.10

func (*MessagePositions) GetType() string

func (*MessagePositions) MarshalJSON added in v1.7.10

func (entity *MessagePositions) MarshalJSON() ([]byte, error)

type MessageProximityAlertTriggered

type MessageProximityAlertTriggered struct {

	// The identifier of a user or chat that triggered the proximity alert
	TravelerId MessageSender `json:"traveler_id"`
	// The identifier of a user or chat that subscribed for the proximity alert
	WatcherId MessageSender `json:"watcher_id"`
	// The distance between the users
	Distance int32 `json:"distance"`
	// contains filtered or unexported fields
}

A user in the chat came within proximity alert range

func UnmarshalMessageProximityAlertTriggered

func UnmarshalMessageProximityAlertTriggered(data json.RawMessage) (*MessageProximityAlertTriggered, error)

func (*MessageProximityAlertTriggered) GetClass

func (*MessageProximityAlertTriggered) GetType

func (*MessageProximityAlertTriggered) MarshalJSON

func (entity *MessageProximityAlertTriggered) MarshalJSON() ([]byte, error)

func (*MessageProximityAlertTriggered) MessageContentType

func (*MessageProximityAlertTriggered) MessageContentType() string

func (*MessageProximityAlertTriggered) UnmarshalJSON

func (messageProximityAlertTriggered *MessageProximityAlertTriggered) UnmarshalJSON(data []byte) error

type MessageReaction added in v1.8.3

type MessageReaction struct {

	// Text representation of the reaction
	Reaction string `json:"reaction"`
	// Number of times the reaction was added
	TotalCount int32 `json:"total_count"`
	// True, if the reaction is chosen by the current user
	IsChosen bool `json:"is_chosen"`
	// Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats
	RecentSenderIds []MessageSender `json:"recent_sender_ids"`
	// contains filtered or unexported fields
}

Contains information about a reaction to a message

func UnmarshalMessageReaction added in v1.8.3

func UnmarshalMessageReaction(data json.RawMessage) (*MessageReaction, error)

func (*MessageReaction) GetClass added in v1.8.3

func (*MessageReaction) GetClass() string

func (*MessageReaction) GetType added in v1.8.3

func (*MessageReaction) GetType() string

func (*MessageReaction) MarshalJSON added in v1.8.3

func (entity *MessageReaction) MarshalJSON() ([]byte, error)

func (*MessageReaction) UnmarshalJSON added in v1.8.3

func (messageReaction *MessageReaction) UnmarshalJSON(data []byte) error

type MessageReplyInfo

type MessageReplyInfo struct {

	// Number of times the message was directly or indirectly replied
	ReplyCount int32 `json:"reply_count"`
	// Identifiers of at most 3 recent repliers to the message; available in channels with a discussion supergroup. The users and chats are expected to be inaccessible: only their photo and name will be available
	RecentReplierIds []MessageSender `json:"recent_replier_ids"`
	// Identifier of the last read incoming reply to the message
	LastReadInboxMessageId int64 `json:"last_read_inbox_message_id"`
	// Identifier of the last read outgoing reply to the message
	LastReadOutboxMessageId int64 `json:"last_read_outbox_message_id"`
	// Identifier of the last reply to the message
	LastMessageId int64 `json:"last_message_id"`
	// contains filtered or unexported fields
}

Contains information about replies to a message

func UnmarshalMessageReplyInfo

func UnmarshalMessageReplyInfo(data json.RawMessage) (*MessageReplyInfo, error)

func (*MessageReplyInfo) GetClass

func (*MessageReplyInfo) GetClass() string

func (*MessageReplyInfo) GetType

func (*MessageReplyInfo) GetType() string

func (*MessageReplyInfo) MarshalJSON

func (entity *MessageReplyInfo) MarshalJSON() ([]byte, error)

func (*MessageReplyInfo) UnmarshalJSON

func (messageReplyInfo *MessageReplyInfo) UnmarshalJSON(data []byte) error

type MessageSchedulingState

type MessageSchedulingState interface {
	MessageSchedulingStateType() string
}

Contains information about the time when a scheduled message will be sent

func UnmarshalListOfMessageSchedulingState

func UnmarshalListOfMessageSchedulingState(dataList []json.RawMessage) ([]MessageSchedulingState, error)

func UnmarshalMessageSchedulingState

func UnmarshalMessageSchedulingState(data json.RawMessage) (MessageSchedulingState, error)

type MessageSchedulingStateSendAtDate

type MessageSchedulingStateSendAtDate struct {

	// Date the message will be sent. The date must be within 367 days in the future
	SendDate int32 `json:"send_date"`
	// contains filtered or unexported fields
}

The message will be sent at the specified date

func UnmarshalMessageSchedulingStateSendAtDate

func UnmarshalMessageSchedulingStateSendAtDate(data json.RawMessage) (*MessageSchedulingStateSendAtDate, error)

func (*MessageSchedulingStateSendAtDate) GetClass

func (*MessageSchedulingStateSendAtDate) GetType

func (*MessageSchedulingStateSendAtDate) MarshalJSON

func (entity *MessageSchedulingStateSendAtDate) MarshalJSON() ([]byte, error)

func (*MessageSchedulingStateSendAtDate) MessageSchedulingStateType

func (*MessageSchedulingStateSendAtDate) MessageSchedulingStateType() string

type MessageSchedulingStateSendWhenOnline

type MessageSchedulingStateSendWhenOnline struct {
	// contains filtered or unexported fields
}

The message will be sent when the peer will be online. Applicable to private chats only and when the exact online status of the peer is known

func UnmarshalMessageSchedulingStateSendWhenOnline

func UnmarshalMessageSchedulingStateSendWhenOnline(data json.RawMessage) (*MessageSchedulingStateSendWhenOnline, error)

func (*MessageSchedulingStateSendWhenOnline) GetClass

func (*MessageSchedulingStateSendWhenOnline) GetType

func (*MessageSchedulingStateSendWhenOnline) MarshalJSON

func (entity *MessageSchedulingStateSendWhenOnline) MarshalJSON() ([]byte, error)

func (*MessageSchedulingStateSendWhenOnline) MessageSchedulingStateType

func (*MessageSchedulingStateSendWhenOnline) MessageSchedulingStateType() string

type MessageScreenshotTaken

type MessageScreenshotTaken struct {
	// contains filtered or unexported fields
}

A screenshot of a message in the chat has been taken

func UnmarshalMessageScreenshotTaken

func UnmarshalMessageScreenshotTaken(data json.RawMessage) (*MessageScreenshotTaken, error)

func (*MessageScreenshotTaken) GetClass

func (*MessageScreenshotTaken) GetClass() string

func (*MessageScreenshotTaken) GetType

func (*MessageScreenshotTaken) GetType() string

func (*MessageScreenshotTaken) MarshalJSON

func (entity *MessageScreenshotTaken) MarshalJSON() ([]byte, error)

func (*MessageScreenshotTaken) MessageContentType

func (*MessageScreenshotTaken) MessageContentType() string

type MessageSendOptions

type MessageSendOptions struct {

	// Pass true to disable notification for the message
	DisableNotification bool `json:"disable_notification"`
	// Pass true if the message is sent from the background
	FromBackground bool `json:"from_background"`
	// Pass true if the content of the message must be protected from forwarding and saving; for bots only
	ProtectContent bool `json:"protect_content"`
	// Message scheduling state; pass null to send message immediately. Messages sent to a secret chat, live location messages and self-destructing messages can't be scheduled
	SchedulingState MessageSchedulingState `json:"scheduling_state"`
	// contains filtered or unexported fields
}

Options to be used when a message is sent

func UnmarshalMessageSendOptions

func UnmarshalMessageSendOptions(data json.RawMessage) (*MessageSendOptions, error)

func (*MessageSendOptions) GetClass

func (*MessageSendOptions) GetClass() string

func (*MessageSendOptions) GetType

func (*MessageSendOptions) GetType() string

func (*MessageSendOptions) MarshalJSON

func (entity *MessageSendOptions) MarshalJSON() ([]byte, error)

func (*MessageSendOptions) UnmarshalJSON

func (messageSendOptions *MessageSendOptions) UnmarshalJSON(data []byte) error

type MessageSender

type MessageSender interface {
	MessageSenderType() string
}

Contains information about the sender of a message

func UnmarshalListOfMessageSender

func UnmarshalListOfMessageSender(dataList []json.RawMessage) ([]MessageSender, error)

func UnmarshalMessageSender

func UnmarshalMessageSender(data json.RawMessage) (MessageSender, error)

type MessageSenderChat

type MessageSenderChat struct {

	// Identifier of the chat that sent the message
	ChatId int64 `json:"chat_id"`
	// contains filtered or unexported fields
}

The message was sent on behalf of a chat

func UnmarshalMessageSenderChat

func UnmarshalMessageSenderChat(data json.RawMessage) (*MessageSenderChat, error)

func (*MessageSenderChat) GetClass

func (*MessageSenderChat) GetClass() string

func (*MessageSenderChat) GetType

func (*MessageSenderChat) GetType() string

func (*MessageSenderChat) MarshalJSON

func (entity *MessageSenderChat) MarshalJSON() ([]byte, error)

func (*MessageSenderChat) MessageSenderType

func (*MessageSenderChat) MessageSenderType() string

type MessageSenderUser

type MessageSenderUser struct {

	// Identifier of the user that sent the message
	UserId int64 `json:"user_id"`
	// contains filtered or unexported fields
}

The message was sent by a known user

func UnmarshalMessageSenderUser

func UnmarshalMessageSenderUser(data json.RawMessage) (*MessageSenderUser, error)

func (*MessageSenderUser) GetClass

func (*MessageSenderUser) GetClass() string

func (*MessageSenderUser) GetType

func (*MessageSenderUser) GetType() string

func (*MessageSenderUser) MarshalJSON

func (entity *MessageSenderUser) MarshalJSON() ([]byte, error)

func (*MessageSenderUser) MessageSenderType

func (*MessageSenderUser) MessageSenderType() string

type MessageSenders

type MessageSenders struct {

	// Approximate total number of messages senders found
	TotalCount int32 `json:"total_count"`
	// List of message senders
	Senders []MessageSender `json:"senders"`
	// contains filtered or unexported fields
}

Represents a list of message senders

func UnmarshalMessageSenders

func UnmarshalMessageSenders(data json.RawMessage) (*MessageSenders, error)

func (*MessageSenders) GetClass

func (*MessageSenders) GetClass() string

func (*MessageSenders) GetType

func (*MessageSenders) GetType() string

func (*MessageSenders) MarshalJSON

func (entity *MessageSenders) MarshalJSON() ([]byte, error)

func (*MessageSenders) UnmarshalJSON

func (messageSenders *MessageSenders) UnmarshalJSON(data []byte) error

type MessageSendingState

type MessageSendingState interface {
	MessageSendingStateType() string
}

Contains information about the sending state of the message

func UnmarshalListOfMessageSendingState

func UnmarshalListOfMessageSendingState(dataList []json.RawMessage) ([]MessageSendingState, error)

func UnmarshalMessageSendingState

func UnmarshalMessageSendingState(data json.RawMessage) (MessageSendingState, error)

type MessageSendingStateFailed

type MessageSendingStateFailed struct {

	// An error code; 0 if unknown
	ErrorCode int32 `json:"error_code"`
	// Error message
	ErrorMessage string `json:"error_message"`
	// True, if the message can be re-sent
	CanRetry bool `json:"can_retry"`
	// True, if the message can be re-sent only on behalf of a different sender
	NeedAnotherSender bool `json:"need_another_sender"`
	// Time left before the message can be re-sent, in seconds. No update is sent when this field changes
	RetryAfter float64 `json:"retry_after"`
	// contains filtered or unexported fields
}

The message failed to be sent

func UnmarshalMessageSendingStateFailed

func UnmarshalMessageSendingStateFailed(data json.RawMessage) (*MessageSendingStateFailed, error)

func (*MessageSendingStateFailed) GetClass

func (*MessageSendingStateFailed) GetClass() string

func (*MessageSendingStateFailed) GetType

func (*MessageSendingStateFailed) GetType() string

func (*MessageSendingStateFailed) MarshalJSON

func (entity *MessageSendingStateFailed) MarshalJSON() ([]byte, error)

func (*MessageSendingStateFailed) MessageSendingStateType

func (*MessageSendingStateFailed) MessageSendingStateType() string

type MessageSendingStatePending

type MessageSendingStatePending struct {
	// contains filtered or unexported fields
}

The message is being sent now, but has not yet been delivered to the server

func UnmarshalMessageSendingStatePending

func UnmarshalMessageSendingStatePending(data json.RawMessage) (*MessageSendingStatePending, error)

func (*MessageSendingStatePending) GetClass

func (*MessageSendingStatePending) GetClass() string

func (*MessageSendingStatePending) GetType

func (*MessageSendingStatePending) MarshalJSON

func (entity *MessageSendingStatePending) MarshalJSON() ([]byte, error)

func (*MessageSendingStatePending) MessageSendingStateType

func (*MessageSendingStatePending) MessageSendingStateType() string

type MessageStatistics

type MessageStatistics struct {

	// A graph containing number of message views and shares
	MessageInteractionGraph StatisticalGraph `json:"message_interaction_graph"`
	// contains filtered or unexported fields
}

A detailed statistics about a message

func UnmarshalMessageStatistics

func UnmarshalMessageStatistics(data json.RawMessage) (*MessageStatistics, error)

func (*MessageStatistics) GetClass

func (*MessageStatistics) GetClass() string

func (*MessageStatistics) GetType

func (*MessageStatistics) GetType() string

func (*MessageStatistics) MarshalJSON

func (entity *MessageStatistics) MarshalJSON() ([]byte, error)

func (*MessageStatistics) UnmarshalJSON

func (messageStatistics *MessageStatistics) UnmarshalJSON(data []byte) error

type MessageSticker

type MessageSticker struct {

	// The sticker description
	Sticker *Sticker `json:"sticker"`
	// contains filtered or unexported fields
}

A sticker message

func UnmarshalMessageSticker

func UnmarshalMessageSticker(data json.RawMessage) (*MessageSticker, error)

func (*MessageSticker) GetClass

func (*MessageSticker) GetClass() string

func (*MessageSticker) GetType

func (*MessageSticker) GetType() string

func (*MessageSticker) MarshalJSON

func (entity *MessageSticker) MarshalJSON() ([]byte, error)

func (*MessageSticker) MessageContentType

func (*MessageSticker) MessageContentType() string

type MessageSupergroupChatCreate

type MessageSupergroupChatCreate struct {

	// Title of the supergroup or channel
	Title string `json:"title"`
	// contains filtered or unexported fields
}

A newly created supergroup or channel

func UnmarshalMessageSupergroupChatCreate

func UnmarshalMessageSupergroupChatCreate(data json.RawMessage) (*MessageSupergroupChatCreate, error)

func (*MessageSupergroupChatCreate) GetClass

func (*MessageSupergroupChatCreate) GetClass() string

func (*MessageSupergroupChatCreate) GetType

func (*MessageSupergroupChatCreate) MarshalJSON

func (entity *MessageSupergroupChatCreate) MarshalJSON() ([]byte, error)

func (*MessageSupergroupChatCreate) MessageContentType

func (*MessageSupergroupChatCreate) MessageContentType() string

type MessageText

type MessageText struct {

	// Text of the message
	Text *FormattedText `json:"text"`
	// A preview of the web page that's mentioned in the text; may be null
	WebPage *WebPage `json:"web_page"`
	// contains filtered or unexported fields
}

A text message

func UnmarshalMessageText

func UnmarshalMessageText(data json.RawMessage) (*MessageText, error)

func (*MessageText) GetClass

func (*MessageText) GetClass() string

func (*MessageText) GetType

func (*MessageText) GetType() string

func (*MessageText) MarshalJSON

func (entity *MessageText) MarshalJSON() ([]byte, error)

func (*MessageText) MessageContentType

func (*MessageText) MessageContentType() string

type MessageThreadInfo

type MessageThreadInfo struct {

	// Identifier of the chat to which the message thread belongs
	ChatId int64 `json:"chat_id"`
	// Message thread identifier, unique within the chat
	MessageThreadId int64 `json:"message_thread_id"`
	// Information about the message thread
	ReplyInfo *MessageReplyInfo `json:"reply_info"`
	// Approximate number of unread messages in the message thread
	UnreadMessageCount int32 `json:"unread_message_count"`
	// The messages from which the thread starts. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id)
	Messages []*Message `json:"messages"`
	// A draft of a message in the message thread; may be null
	DraftMessage *DraftMessage `json:"draft_message"`
	// contains filtered or unexported fields
}

Contains information about a message thread

func UnmarshalMessageThreadInfo

func UnmarshalMessageThreadInfo(data json.RawMessage) (*MessageThreadInfo, error)

func (*MessageThreadInfo) GetClass

func (*MessageThreadInfo) GetClass() string

func (*MessageThreadInfo) GetType

func (*MessageThreadInfo) GetType() string

func (*MessageThreadInfo) MarshalJSON

func (entity *MessageThreadInfo) MarshalJSON() ([]byte, error)

type MessageUnsupported

type MessageUnsupported struct {
	// contains filtered or unexported fields
}

Message content that is not supported in the current TDLib version

func UnmarshalMessageUnsupported

func UnmarshalMessageUnsupported(data json.RawMessage) (*MessageUnsupported, error)

func (*MessageUnsupported) GetClass

func (*MessageUnsupported) GetClass() string

func (*MessageUnsupported) GetType

func (*MessageUnsupported) GetType() string

func (*MessageUnsupported) MarshalJSON

func (entity *MessageUnsupported) MarshalJSON() ([]byte, error)

func (*MessageUnsupported) MessageContentType

func (*MessageUnsupported) MessageContentType() string

type MessageVenue

type MessageVenue struct {

	// The venue description
	Venue *Venue `json:"venue"`
	// contains filtered or unexported fields
}

A message with information about a venue

func UnmarshalMessageVenue

func UnmarshalMessageVenue(data json.RawMessage) (*MessageVenue, error)

func (*MessageVenue) GetClass

func (*MessageVenue) GetClass() string

func (*MessageVenue) GetType

func (*MessageVenue) GetType() string

func (*MessageVenue) MarshalJSON

func (entity *MessageVenue) MarshalJSON() ([]byte, error)

func (*MessageVenue) MessageContentType

func (*MessageVenue) MessageContentType() string

type MessageVideo

type MessageVideo struct {

	// The video description
	Video *Video `json:"video"`
	// Video caption
	Caption *FormattedText `json:"caption"`
	// True, if the video thumbnail must be blurred and the video must be shown only while tapped
	IsSecret bool `json:"is_secret"`
	// contains filtered or unexported fields
}

A video message

func UnmarshalMessageVideo

func UnmarshalMessageVideo(data json.RawMessage) (*MessageVideo, error)

func (*MessageVideo) GetClass

func (*MessageVideo) GetClass() string

func (*MessageVideo) GetType

func (*MessageVideo) GetType() string

func (*MessageVideo) MarshalJSON

func (entity *MessageVideo) MarshalJSON() ([]byte, error)

func (*MessageVideo) MessageContentType

func (*MessageVideo) MessageContentType() string

type MessageVideoChatEnded added in v1.7.10

type MessageVideoChatEnded struct {

	// Call duration, in seconds
	Duration int32 `json:"duration"`
	// contains filtered or unexported fields
}

A message with information about an ended video chat

func UnmarshalMessageVideoChatEnded added in v1.7.10

func UnmarshalMessageVideoChatEnded(data json.RawMessage) (*MessageVideoChatEnded, error)

func (*MessageVideoChatEnded) GetClass added in v1.7.10

func (*MessageVideoChatEnded) GetClass() string

func (*MessageVideoChatEnded) GetType added in v1.7.10

func (*MessageVideoChatEnded) GetType() string

func (*MessageVideoChatEnded) MarshalJSON added in v1.7.10

func (entity *MessageVideoChatEnded) MarshalJSON() ([]byte, error)

func (*MessageVideoChatEnded) MessageContentType added in v1.7.10

func (*MessageVideoChatEnded) MessageContentType() string

type MessageVideoChatScheduled added in v1.7.10

type MessageVideoChatScheduled struct {

	// Identifier of the video chat. The video chat can be received through the method getGroupCall
	GroupCallId int32 `json:"group_call_id"`
	// Point in time (Unix timestamp) when the group call is supposed to be started by an administrator
	StartDate int32 `json:"start_date"`
	// contains filtered or unexported fields
}

A new video chat was scheduled

func UnmarshalMessageVideoChatScheduled added in v1.7.10

func UnmarshalMessageVideoChatScheduled(data json.RawMessage) (*MessageVideoChatScheduled, error)

func (*MessageVideoChatScheduled) GetClass added in v1.7.10

func (*MessageVideoChatScheduled) GetClass() string

func (*MessageVideoChatScheduled) GetType added in v1.7.10

func (*MessageVideoChatScheduled) GetType() string

func (*MessageVideoChatScheduled) MarshalJSON added in v1.7.10

func (entity *MessageVideoChatScheduled) MarshalJSON() ([]byte, error)

func (*MessageVideoChatScheduled) MessageContentType added in v1.7.10

func (*MessageVideoChatScheduled) MessageContentType() string

type MessageVideoChatStarted added in v1.7.10

type MessageVideoChatStarted struct {

	// Identifier of the video chat. The video chat can be received through the method getGroupCall
	GroupCallId int32 `json:"group_call_id"`
	// contains filtered or unexported fields
}

A newly created video chat

func UnmarshalMessageVideoChatStarted added in v1.7.10

func UnmarshalMessageVideoChatStarted(data json.RawMessage) (*MessageVideoChatStarted, error)

func (*MessageVideoChatStarted) GetClass added in v1.7.10

func (*MessageVideoChatStarted) GetClass() string

func (*MessageVideoChatStarted) GetType added in v1.7.10

func (*MessageVideoChatStarted) GetType() string

func (*MessageVideoChatStarted) MarshalJSON added in v1.7.10

func (entity *MessageVideoChatStarted) MarshalJSON() ([]byte, error)

func (*MessageVideoChatStarted) MessageContentType added in v1.7.10

func (*MessageVideoChatStarted) MessageContentType() string

type MessageVideoNote

type MessageVideoNote struct {

	// The video note description
	VideoNote *VideoNote `json:"video_note"`
	// True, if at least one of the recipients has viewed the video note
	IsViewed bool `json:"is_viewed"`
	// True, if the video note thumbnail must be blurred and the video note must be shown only while tapped
	IsSecret bool `json:"is_secret"`
	// contains filtered or unexported fields
}

A video note message

func UnmarshalMessageVideoNote

func UnmarshalMessageVideoNote(data json.RawMessage) (*MessageVideoNote, error)

func (*MessageVideoNote) GetClass

func (*MessageVideoNote) GetClass() string

func (*MessageVideoNote) GetType

func (*MessageVideoNote) GetType() string

func (*MessageVideoNote) MarshalJSON

func (entity *MessageVideoNote) MarshalJSON() ([]byte, error)

func (*MessageVideoNote) MessageContentType

func (*MessageVideoNote) MessageContentType() string

type MessageVoiceNote

type MessageVoiceNote struct {

	// The voice note description
	VoiceNote *VoiceNote `json:"voice_note"`
	// Voice note caption
	Caption *FormattedText `json:"caption"`
	// True, if at least one of the recipients has listened to the voice note
	IsListened bool `json:"is_listened"`
	// contains filtered or unexported fields
}

A voice note message

func UnmarshalMessageVoiceNote

func UnmarshalMessageVoiceNote(data json.RawMessage) (*MessageVoiceNote, error)

func (*MessageVoiceNote) GetClass

func (*MessageVoiceNote) GetClass() string

func (*MessageVoiceNote) GetType

func (*MessageVoiceNote) GetType() string

func (*MessageVoiceNote) MarshalJSON

func (entity *MessageVoiceNote) MarshalJSON() ([]byte, error)

func (*MessageVoiceNote) MessageContentType

func (*MessageVoiceNote) MessageContentType() string

type MessageWebAppDataReceived added in v1.8.3

type MessageWebAppDataReceived struct {

	// Text of the keyboardButtonTypeWebApp button, which opened the web app
	ButtonText string `json:"button_text"`
	// Received data
	Data string `json:"data"`
	// contains filtered or unexported fields
}

Data from a web app has been received; for bots only

func UnmarshalMessageWebAppDataReceived added in v1.8.3

func UnmarshalMessageWebAppDataReceived(data json.RawMessage) (*MessageWebAppDataReceived, error)

func (*MessageWebAppDataReceived) GetClass added in v1.8.3

func (*MessageWebAppDataReceived) GetClass() string

func (*MessageWebAppDataReceived) GetType added in v1.8.3

func (*MessageWebAppDataReceived) GetType() string

func (*MessageWebAppDataReceived) MarshalJSON added in v1.8.3

func (entity *MessageWebAppDataReceived) MarshalJSON() ([]byte, error)

func (*MessageWebAppDataReceived) MessageContentType added in v1.8.3

func (*MessageWebAppDataReceived) MessageContentType() string

type MessageWebAppDataSent added in v1.8.3

type MessageWebAppDataSent struct {

	// Text of the keyboardButtonTypeWebApp button, which opened the web app
	ButtonText string `json:"button_text"`
	// contains filtered or unexported fields
}

Data from a web app has been sent to a bot

func UnmarshalMessageWebAppDataSent added in v1.8.3

func UnmarshalMessageWebAppDataSent(data json.RawMessage) (*MessageWebAppDataSent, error)

func (*MessageWebAppDataSent) GetClass added in v1.8.3

func (*MessageWebAppDataSent) GetClass() string

func (*MessageWebAppDataSent) GetType added in v1.8.3

func (*MessageWebAppDataSent) GetType() string

func (*MessageWebAppDataSent) MarshalJSON added in v1.8.3

func (entity *MessageWebAppDataSent) MarshalJSON() ([]byte, error)

func (*MessageWebAppDataSent) MessageContentType added in v1.8.3

func (*MessageWebAppDataSent) MessageContentType() string

type MessageWebsiteConnected

type MessageWebsiteConnected struct {

	// Domain name of the connected website
	DomainName string `json:"domain_name"`
	// contains filtered or unexported fields
}

The current user has connected a website by logging in using Telegram Login Widget on it

func UnmarshalMessageWebsiteConnected

func UnmarshalMessageWebsiteConnected(data json.RawMessage) (*MessageWebsiteConnected, error)

func (*MessageWebsiteConnected) GetClass

func (*MessageWebsiteConnected) GetClass() string

func (*MessageWebsiteConnected) GetType

func (*MessageWebsiteConnected) GetType() string

func (*MessageWebsiteConnected) MarshalJSON

func (entity *MessageWebsiteConnected) MarshalJSON() ([]byte, error)

func (*MessageWebsiteConnected) MessageContentType

func (*MessageWebsiteConnected) MessageContentType() string

type Messages

type Messages struct {

	// Approximate total number of messages found
	TotalCount int32 `json:"total_count"`
	// List of messages; messages may be null
	Messages []*Message `json:"messages"`
	// contains filtered or unexported fields
}

Contains a list of messages

func UnmarshalMessages

func UnmarshalMessages(data json.RawMessage) (*Messages, error)

func (*Messages) GetClass

func (*Messages) GetClass() string

func (*Messages) GetType

func (*Messages) GetType() string

func (*Messages) MarshalJSON

func (entity *Messages) MarshalJSON() ([]byte, error)

type Minithumbnail

type Minithumbnail struct {

	// Thumbnail width, usually doesn't exceed 40
	Width int32 `json:"width"`
	// Thumbnail height, usually doesn't exceed 40
	Height int32 `json:"height"`
	// The thumbnail in JPEG format
	Data []byte `json:"data"`
	// contains filtered or unexported fields
}

Thumbnail image of a very poor quality and low resolution

func UnmarshalMinithumbnail

func UnmarshalMinithumbnail(data json.RawMessage) (*Minithumbnail, error)

func (*Minithumbnail) GetClass

func (*Minithumbnail) GetClass() string

func (*Minithumbnail) GetType

func (*Minithumbnail) GetType() string

func (*Minithumbnail) MarshalJSON

func (entity *Minithumbnail) MarshalJSON() ([]byte, error)

type NetworkStatistics

type NetworkStatistics struct {

	// Point in time (Unix timestamp) from which the statistics are collected
	SinceDate int32 `json:"since_date"`
	// Network statistics entries
	Entries []NetworkStatisticsEntry `json:"entries"`
	// contains filtered or unexported fields
}

A full list of available network statistic entries

func UnmarshalNetworkStatistics

func UnmarshalNetworkStatistics(data json.RawMessage) (*NetworkStatistics, error)

func (*NetworkStatistics) GetClass

func (*NetworkStatistics) GetClass() string

func (*NetworkStatistics) GetType

func (*NetworkStatistics) GetType() string

func (*NetworkStatistics) MarshalJSON

func (entity *NetworkStatistics) MarshalJSON() ([]byte, error)

func (*NetworkStatistics) UnmarshalJSON

func (networkStatistics *NetworkStatistics) UnmarshalJSON(data []byte) error

type NetworkStatisticsEntry

type NetworkStatisticsEntry interface {
	NetworkStatisticsEntryType() string
}

Contains statistics about network usage

func UnmarshalListOfNetworkStatisticsEntry

func UnmarshalListOfNetworkStatisticsEntry(dataList []json.RawMessage) ([]NetworkStatisticsEntry, error)

func UnmarshalNetworkStatisticsEntry

func UnmarshalNetworkStatisticsEntry(data json.RawMessage) (NetworkStatisticsEntry, error)

type NetworkStatisticsEntryCall

type NetworkStatisticsEntryCall struct {

	// Type of the network the data was sent through. Call setNetworkType to maintain the actual network type
	NetworkType NetworkType `json:"network_type"`
	// Total number of bytes sent
	SentBytes int64 `json:"sent_bytes"`
	// Total number of bytes received
	ReceivedBytes int64 `json:"received_bytes"`
	// Total call duration, in seconds
	Duration float64 `json:"duration"`
	// contains filtered or unexported fields
}

Contains information about the total amount of data that was used for calls

func UnmarshalNetworkStatisticsEntryCall

func UnmarshalNetworkStatisticsEntryCall(data json.RawMessage) (*NetworkStatisticsEntryCall, error)

func (*NetworkStatisticsEntryCall) GetClass

func (*NetworkStatisticsEntryCall) GetClass() string

func (*NetworkStatisticsEntryCall) GetType

func (*NetworkStatisticsEntryCall) MarshalJSON

func (entity *NetworkStatisticsEntryCall) MarshalJSON() ([]byte, error)

func (*NetworkStatisticsEntryCall) NetworkStatisticsEntryType

func (*NetworkStatisticsEntryCall) NetworkStatisticsEntryType() string

func (*NetworkStatisticsEntryCall) UnmarshalJSON

func (networkStatisticsEntryCall *NetworkStatisticsEntryCall) UnmarshalJSON(data []byte) error

type NetworkStatisticsEntryFile

type NetworkStatisticsEntryFile struct {

	// Type of the file the data is part of; pass null if the data isn't related to files
	FileType FileType `json:"file_type"`
	// Type of the network the data was sent through. Call setNetworkType to maintain the actual network type
	NetworkType NetworkType `json:"network_type"`
	// Total number of bytes sent
	SentBytes int64 `json:"sent_bytes"`
	// Total number of bytes received
	ReceivedBytes int64 `json:"received_bytes"`
	// contains filtered or unexported fields
}

Contains information about the total amount of data that was used to send and receive files

func UnmarshalNetworkStatisticsEntryFile

func UnmarshalNetworkStatisticsEntryFile(data json.RawMessage) (*NetworkStatisticsEntryFile, error)

func (*NetworkStatisticsEntryFile) GetClass

func (*NetworkStatisticsEntryFile) GetClass() string

func (*NetworkStatisticsEntryFile) GetType

func (*NetworkStatisticsEntryFile) MarshalJSON

func (entity *NetworkStatisticsEntryFile) MarshalJSON() ([]byte, error)

func (*NetworkStatisticsEntryFile) NetworkStatisticsEntryType

func (*NetworkStatisticsEntryFile) NetworkStatisticsEntryType() string

func (*NetworkStatisticsEntryFile) UnmarshalJSON

func (networkStatisticsEntryFile *NetworkStatisticsEntryFile) UnmarshalJSON(data []byte) error

type NetworkType

type NetworkType interface {
	NetworkTypeType() string
}

Represents the type of a network

func UnmarshalListOfNetworkType

func UnmarshalListOfNetworkType(dataList []json.RawMessage) ([]NetworkType, error)

func UnmarshalNetworkType

func UnmarshalNetworkType(data json.RawMessage) (NetworkType, error)

type NetworkTypeMobile

type NetworkTypeMobile struct {
	// contains filtered or unexported fields
}

A mobile network

func UnmarshalNetworkTypeMobile

func UnmarshalNetworkTypeMobile(data json.RawMessage) (*NetworkTypeMobile, error)

func (*NetworkTypeMobile) GetClass

func (*NetworkTypeMobile) GetClass() string

func (*NetworkTypeMobile) GetType

func (*NetworkTypeMobile) GetType() string

func (*NetworkTypeMobile) MarshalJSON

func (entity *NetworkTypeMobile) MarshalJSON() ([]byte, error)

func (*NetworkTypeMobile) NetworkTypeType

func (*NetworkTypeMobile) NetworkTypeType() string

type NetworkTypeMobileRoaming

type NetworkTypeMobileRoaming struct {
	// contains filtered or unexported fields
}

A mobile roaming network

func UnmarshalNetworkTypeMobileRoaming

func UnmarshalNetworkTypeMobileRoaming(data json.RawMessage) (*NetworkTypeMobileRoaming, error)

func (*NetworkTypeMobileRoaming) GetClass

func (*NetworkTypeMobileRoaming) GetClass() string

func (*NetworkTypeMobileRoaming) GetType

func (*NetworkTypeMobileRoaming) GetType() string

func (*NetworkTypeMobileRoaming) MarshalJSON

func (entity *NetworkTypeMobileRoaming) MarshalJSON() ([]byte, error)

func (*NetworkTypeMobileRoaming) NetworkTypeType

func (*NetworkTypeMobileRoaming) NetworkTypeType() string

type NetworkTypeNone

type NetworkTypeNone struct {
	// contains filtered or unexported fields
}

The network is not available

func UnmarshalNetworkTypeNone

func UnmarshalNetworkTypeNone(data json.RawMessage) (*NetworkTypeNone, error)

func (*NetworkTypeNone) GetClass

func (*NetworkTypeNone) GetClass() string

func (*NetworkTypeNone) GetType

func (*NetworkTypeNone) GetType() string

func (*NetworkTypeNone) MarshalJSON

func (entity *NetworkTypeNone) MarshalJSON() ([]byte, error)

func (*NetworkTypeNone) NetworkTypeType

func (*NetworkTypeNone) NetworkTypeType() string

type NetworkTypeOther

type NetworkTypeOther struct {
	// contains filtered or unexported fields
}

A different network type (e.g., Ethernet network)

func UnmarshalNetworkTypeOther

func UnmarshalNetworkTypeOther(data json.RawMessage) (*NetworkTypeOther, error)

func (*NetworkTypeOther) GetClass

func (*NetworkTypeOther) GetClass() string

func (*NetworkTypeOther) GetType

func (*NetworkTypeOther) GetType() string

func (*NetworkTypeOther) MarshalJSON

func (entity *NetworkTypeOther) MarshalJSON() ([]byte, error)

func (*NetworkTypeOther) NetworkTypeType

func (*NetworkTypeOther) NetworkTypeType() string

type NetworkTypeWiFi

type NetworkTypeWiFi struct {
	// contains filtered or unexported fields
}

A Wi-Fi network

func UnmarshalNetworkTypeWiFi

func UnmarshalNetworkTypeWiFi(data json.RawMessage) (*NetworkTypeWiFi, error)

func (*NetworkTypeWiFi) GetClass

func (*NetworkTypeWiFi) GetClass() string

func (*NetworkTypeWiFi) GetType

func (*NetworkTypeWiFi) GetType() string

func (*NetworkTypeWiFi) MarshalJSON

func (entity *NetworkTypeWiFi) MarshalJSON() ([]byte, error)

func (*NetworkTypeWiFi) NetworkTypeType

func (*NetworkTypeWiFi) NetworkTypeType() string

type Notification

type Notification struct {

	// Unique persistent identifier of this notification
	Id int32 `json:"id"`
	// Notification date
	Date int32 `json:"date"`
	// Identifier of the notification sound to be played; 0 if sound is disabled
	SoundId JsonInt64 `json:"sound_id"`
	// Notification type
	Type NotificationType `json:"type"`
	// contains filtered or unexported fields
}

Contains information about a notification

func UnmarshalNotification

func UnmarshalNotification(data json.RawMessage) (*Notification, error)

func (*Notification) GetClass

func (*Notification) GetClass() string

func (*Notification) GetType

func (*Notification) GetType() string

func (*Notification) MarshalJSON

func (entity *Notification) MarshalJSON() ([]byte, error)

func (*Notification) UnmarshalJSON

func (notification *Notification) UnmarshalJSON(data []byte) error

type NotificationGroup

type NotificationGroup struct {

	// Unique persistent auto-incremented from 1 identifier of the notification group
	Id int32 `json:"id"`
	// Type of the group
	Type NotificationGroupType `json:"type"`
	// Identifier of a chat to which all notifications in the group belong
	ChatId int64 `json:"chat_id"`
	// Total number of active notifications in the group
	TotalCount int32 `json:"total_count"`
	// The list of active notifications
	Notifications []*Notification `json:"notifications"`
	// contains filtered or unexported fields
}

Describes a group of notifications

func UnmarshalNotificationGroup

func UnmarshalNotificationGroup(data json.RawMessage) (*NotificationGroup, error)

func (*NotificationGroup) GetClass

func (*NotificationGroup) GetClass() string

func (*NotificationGroup) GetType

func (*NotificationGroup) GetType() string

func (*NotificationGroup) MarshalJSON

func (entity *NotificationGroup) MarshalJSON() ([]byte, error)

func (*NotificationGroup) UnmarshalJSON

func (notificationGroup *NotificationGroup) UnmarshalJSON(data []byte) error

type NotificationGroupType

type NotificationGroupType interface {
	NotificationGroupTypeType() string
}

Describes the type of notifications in a notification group

func UnmarshalListOfNotificationGroupType

func UnmarshalListOfNotificationGroupType(dataList []json.RawMessage) ([]NotificationGroupType, error)

func UnmarshalNotificationGroupType

func UnmarshalNotificationGroupType(data json.RawMessage) (NotificationGroupType, error)

type NotificationGroupTypeCalls

type NotificationGroupTypeCalls struct {
	// contains filtered or unexported fields
}

A group containing notifications of type notificationTypeNewCall

func UnmarshalNotificationGroupTypeCalls

func UnmarshalNotificationGroupTypeCalls(data json.RawMessage) (*NotificationGroupTypeCalls, error)

func (*NotificationGroupTypeCalls) GetClass

func (*NotificationGroupTypeCalls) GetClass() string

func (*NotificationGroupTypeCalls) GetType

func (*NotificationGroupTypeCalls) MarshalJSON

func (entity *NotificationGroupTypeCalls) MarshalJSON() ([]byte, error)

func (*NotificationGroupTypeCalls) NotificationGroupTypeType

func (*NotificationGroupTypeCalls) NotificationGroupTypeType() string

type NotificationGroupTypeMentions

type NotificationGroupTypeMentions struct {
	// contains filtered or unexported fields
}

A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with unread mentions of the current user, replies to their messages, or a pinned message

func UnmarshalNotificationGroupTypeMentions

func UnmarshalNotificationGroupTypeMentions(data json.RawMessage) (*NotificationGroupTypeMentions, error)

func (*NotificationGroupTypeMentions) GetClass

func (*NotificationGroupTypeMentions) GetType

func (*NotificationGroupTypeMentions) MarshalJSON

func (entity *NotificationGroupTypeMentions) MarshalJSON() ([]byte, error)

func (*NotificationGroupTypeMentions) NotificationGroupTypeType

func (*NotificationGroupTypeMentions) NotificationGroupTypeType() string

type NotificationGroupTypeMessages

type NotificationGroupTypeMessages struct {
	// contains filtered or unexported fields
}

A group containing notifications of type notificationTypeNewMessage and notificationTypeNewPushMessage with ordinary unread messages

func UnmarshalNotificationGroupTypeMessages

func UnmarshalNotificationGroupTypeMessages(data json.RawMessage) (*NotificationGroupTypeMessages, error)

func (*NotificationGroupTypeMessages) GetClass

func (*NotificationGroupTypeMessages) GetType

func (*NotificationGroupTypeMessages) MarshalJSON

func (entity *NotificationGroupTypeMessages) MarshalJSON() ([]byte, error)

func (*NotificationGroupTypeMessages) NotificationGroupTypeType

func (*NotificationGroupTypeMessages) NotificationGroupTypeType() string

type NotificationGroupTypeSecretChat

type NotificationGroupTypeSecretChat struct {
	// contains filtered or unexported fields
}

A group containing a notification of type notificationTypeNewSecretChat

func UnmarshalNotificationGroupTypeSecretChat

func UnmarshalNotificationGroupTypeSecretChat(data json.RawMessage) (*NotificationGroupTypeSecretChat, error)

func (*NotificationGroupTypeSecretChat) GetClass

func (*NotificationGroupTypeSecretChat) GetType

func (*NotificationGroupTypeSecretChat) MarshalJSON

func (entity *NotificationGroupTypeSecretChat) MarshalJSON() ([]byte, error)

func (*NotificationGroupTypeSecretChat) NotificationGroupTypeType

func (*NotificationGroupTypeSecretChat) NotificationGroupTypeType() string

type NotificationSettingsScope

type NotificationSettingsScope interface {
	NotificationSettingsScopeType() string
}

Describes the types of chats to which notification settings are relevant

func UnmarshalListOfNotificationSettingsScope

func UnmarshalListOfNotificationSettingsScope(dataList []json.RawMessage) ([]NotificationSettingsScope, error)

func UnmarshalNotificationSettingsScope

func UnmarshalNotificationSettingsScope(data json.RawMessage) (NotificationSettingsScope, error)

type NotificationSettingsScopeChannelChats

type NotificationSettingsScopeChannelChats struct {
	// contains filtered or unexported fields
}

Notification settings applied to all channel chats when the corresponding chat setting has a default value

func UnmarshalNotificationSettingsScopeChannelChats

func UnmarshalNotificationSettingsScopeChannelChats(data json.RawMessage) (*NotificationSettingsScopeChannelChats, error)

func (*NotificationSettingsScopeChannelChats) GetClass

func (*NotificationSettingsScopeChannelChats) GetType

func (*NotificationSettingsScopeChannelChats) MarshalJSON

func (entity *NotificationSettingsScopeChannelChats) MarshalJSON() ([]byte, error)

func (*NotificationSettingsScopeChannelChats) NotificationSettingsScopeType

func (*NotificationSettingsScopeChannelChats) NotificationSettingsScopeType() string

type NotificationSettingsScopeGroupChats

type NotificationSettingsScopeGroupChats struct {
	// contains filtered or unexported fields
}

Notification settings applied to all basic group and supergroup chats when the corresponding chat setting has a default value

func UnmarshalNotificationSettingsScopeGroupChats

func UnmarshalNotificationSettingsScopeGroupChats(data json.RawMessage) (*NotificationSettingsScopeGroupChats, error)

func (*NotificationSettingsScopeGroupChats) GetClass

func (*NotificationSettingsScopeGroupChats) GetType

func (*NotificationSettingsScopeGroupChats) MarshalJSON

func (entity *NotificationSettingsScopeGroupChats) MarshalJSON() ([]byte, error)

func (*NotificationSettingsScopeGroupChats) NotificationSettingsScopeType

func (*NotificationSettingsScopeGroupChats) NotificationSettingsScopeType() string

type NotificationSettingsScopePrivateChats

type NotificationSettingsScopePrivateChats struct {
	// contains filtered or unexported fields
}

Notification settings applied to all private and secret chats when the corresponding chat setting has a default value

func UnmarshalNotificationSettingsScopePrivateChats

func UnmarshalNotificationSettingsScopePrivateChats(data json.RawMessage) (*NotificationSettingsScopePrivateChats, error)

func (*NotificationSettingsScopePrivateChats) GetClass

func (*NotificationSettingsScopePrivateChats) GetType

func (*NotificationSettingsScopePrivateChats) MarshalJSON

func (entity *NotificationSettingsScopePrivateChats) MarshalJSON() ([]byte, error)

func (*NotificationSettingsScopePrivateChats) NotificationSettingsScopeType

func (*NotificationSettingsScopePrivateChats) NotificationSettingsScopeType() string

type NotificationSound added in v1.8.3

type NotificationSound struct {

	// Unique identifier of the notification sound
	Id JsonInt64 `json:"id"`
	// Duration of the sound, in seconds
	Duration int32 `json:"duration"`
	// Point in time (Unix timestamp) when the sound was created
	Date int32 `json:"date"`
	// Title of the notification sound
	Title string `json:"title"`
	// Arbitrary data, defined while the sound was uploaded
	Data string `json:"data"`
	// File containing the sound
	Sound *File `json:"sound"`
	// contains filtered or unexported fields
}

Describes a notification sound in MP3 format

func UnmarshalNotificationSound added in v1.8.3

func UnmarshalNotificationSound(data json.RawMessage) (*NotificationSound, error)

func (*NotificationSound) GetClass added in v1.8.3

func (*NotificationSound) GetClass() string

func (*NotificationSound) GetType added in v1.8.3

func (*NotificationSound) GetType() string

func (*NotificationSound) MarshalJSON added in v1.8.3

func (entity *NotificationSound) MarshalJSON() ([]byte, error)

type NotificationSounds added in v1.8.3

type NotificationSounds struct {

	// A list of notification sounds
	NotificationSounds []*NotificationSound `json:"notification_sounds"`
	// contains filtered or unexported fields
}

Contains a list of notification sounds

func UnmarshalNotificationSounds added in v1.8.3

func UnmarshalNotificationSounds(data json.RawMessage) (*NotificationSounds, error)

func (*NotificationSounds) GetClass added in v1.8.3

func (*NotificationSounds) GetClass() string

func (*NotificationSounds) GetType added in v1.8.3

func (*NotificationSounds) GetType() string

func (*NotificationSounds) MarshalJSON added in v1.8.3

func (entity *NotificationSounds) MarshalJSON() ([]byte, error)

type NotificationType

type NotificationType interface {
	NotificationTypeType() string
}

Contains detailed information about a notification

func UnmarshalListOfNotificationType

func UnmarshalListOfNotificationType(dataList []json.RawMessage) ([]NotificationType, error)

func UnmarshalNotificationType

func UnmarshalNotificationType(data json.RawMessage) (NotificationType, error)

type NotificationTypeNewCall

type NotificationTypeNewCall struct {

	// Call identifier
	CallId int32 `json:"call_id"`
	// contains filtered or unexported fields
}

New call was received

func UnmarshalNotificationTypeNewCall

func UnmarshalNotificationTypeNewCall(data json.RawMessage) (*NotificationTypeNewCall, error)

func (*NotificationTypeNewCall) GetClass

func (*NotificationTypeNewCall) GetClass() string

func (*NotificationTypeNewCall) GetType

func (*NotificationTypeNewCall) GetType() string

func (*NotificationTypeNewCall) MarshalJSON

func (entity *NotificationTypeNewCall) MarshalJSON() ([]byte, error)

func (*NotificationTypeNewCall) NotificationTypeType

func (*NotificationTypeNewCall) NotificationTypeType() string

type NotificationTypeNewMessage

type NotificationTypeNewMessage struct {

	// The message
	Message *Message `json:"message"`
	// contains filtered or unexported fields
}

New message was received

func UnmarshalNotificationTypeNewMessage

func UnmarshalNotificationTypeNewMessage(data json.RawMessage) (*NotificationTypeNewMessage, error)

func (*NotificationTypeNewMessage) GetClass

func (*NotificationTypeNewMessage) GetClass() string

func (*NotificationTypeNewMessage) GetType

func (*NotificationTypeNewMessage) MarshalJSON

func (entity *NotificationTypeNewMessage) MarshalJSON() ([]byte, error)

func (*NotificationTypeNewMessage) NotificationTypeType

func (*NotificationTypeNewMessage) NotificationTypeType() string

type NotificationTypeNewPushMessage

type NotificationTypeNewPushMessage struct {

	// The message identifier. The message will not be available in the chat history, but the ID can be used in viewMessages, or as reply_to_message_id
	MessageId int64 `json:"message_id"`
	// Identifier of the sender of the message. Corresponding user or chat may be inaccessible
	SenderId MessageSender `json:"sender_id"`
	// Name of the sender
	SenderName string `json:"sender_name"`
	// True, if the message is outgoing
	IsOutgoing bool `json:"is_outgoing"`
	// Push message content
	Content PushMessageContent `json:"content"`
	// contains filtered or unexported fields
}

New message was received through a push notification

func UnmarshalNotificationTypeNewPushMessage

func UnmarshalNotificationTypeNewPushMessage(data json.RawMessage) (*NotificationTypeNewPushMessage, error)

func (*NotificationTypeNewPushMessage) GetClass

func (*NotificationTypeNewPushMessage) GetType

func (*NotificationTypeNewPushMessage) MarshalJSON

func (entity *NotificationTypeNewPushMessage) MarshalJSON() ([]byte, error)

func (*NotificationTypeNewPushMessage) NotificationTypeType

func (*NotificationTypeNewPushMessage) NotificationTypeType() string

func (*NotificationTypeNewPushMessage) UnmarshalJSON

func (notificationTypeNewPushMessage *NotificationTypeNewPushMessage) UnmarshalJSON(data []byte) error

type NotificationTypeNewSecretChat

type NotificationTypeNewSecretChat struct {
	// contains filtered or unexported fields
}

New secret chat was created

func UnmarshalNotificationTypeNewSecretChat

func UnmarshalNotificationTypeNewSecretChat(data json.RawMessage) (*NotificationTypeNewSecretChat, error)

func (*NotificationTypeNewSecretChat) GetClass

func (*NotificationTypeNewSecretChat) GetType

func (*NotificationTypeNewSecretChat) MarshalJSON

func (entity *NotificationTypeNewSecretChat) MarshalJSON() ([]byte, error)

func (*NotificationTypeNewSecretChat) NotificationTypeType

func (*NotificationTypeNewSecretChat) NotificationTypeType() string

type Ok

type Ok struct {
	// contains filtered or unexported fields
}

An object of this type is returned on a successful function call for certain functions

func UnmarshalOk

func UnmarshalOk(data json.RawMessage) (*Ok, error)

func (*Ok) GetClass

func (*Ok) GetClass() string

func (*Ok) GetType

func (*Ok) GetType() string

func (*Ok) MarshalJSON

func (entity *Ok) MarshalJSON() ([]byte, error)

type OpenChatRequest

type OpenChatRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type OpenMessageContentRequest

type OpenMessageContentRequest struct {
	// Chat identifier of the message
	ChatId int64 `json:"chat_id"`
	// Identifier of the message with the opened content
	MessageId int64 `json:"message_id"`
}

type OpenWebAppRequest added in v1.8.3

type OpenWebAppRequest struct {
	// Identifier of the chat in which the web app is opened. Web apps can be opened only in private chats for now
	ChatId int64 `json:"chat_id"`
	// Identifier of the bot, providing the web app
	BotUserId int64 `json:"bot_user_id"`
	// The URL from an inlineKeyboardButtonTypeWebApp button, a botMenuButton button, or an internalLinkTypeAttachmentMenuBot link, or an empty string otherwise
	Url string `json:"url"`
	// Preferred web app theme; pass null to use the default theme
	Theme *ThemeParameters `json:"theme"`
	// Identifier of the replied message for the message sent by the web app; 0 if none
	ReplyToMessageId int64 `json:"reply_to_message_id"`
}

type OptimizeStorageRequest

type OptimizeStorageRequest struct {
	// Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit
	Size int64 `json:"size"`
	// Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit
	Ttl int32 `json:"ttl"`
	// Limit on the total number of files after deletion. Pass -1 to use the default limit
	Count int32 `json:"count"`
	// The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value
	ImmunityDelay int32 `json:"immunity_delay"`
	// If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted
	FileTypes []FileType `json:"file_types"`
	// If non-empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos)
	ChatIds []int64 `json:"chat_ids"`
	// If non-empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos)
	ExcludeChatIds []int64 `json:"exclude_chat_ids"`
	// Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics
	ReturnDeletedFileStatistics bool `json:"return_deleted_file_statistics"`
	// Same as in getStorageStatistics. Affects only returned statistics
	ChatLimit int32 `json:"chat_limit"`
}

type Option

type Option func(*Client)

func WithCatchTimeout

func WithCatchTimeout(timeout time.Duration) Option

func WithExtraGenerator

func WithExtraGenerator(extraGenerator ExtraGenerator) Option

func WithLogVerbosity

func WithLogVerbosity(req *SetLogVerbosityLevelRequest) Option

func WithProxy

func WithProxy(req *AddProxyRequest) Option

func WithUpdatesTimeout

func WithUpdatesTimeout(timeout time.Duration) Option

type OptionValue

type OptionValue interface {
	OptionValueType() string
}

Represents the value of an option

func UnmarshalListOfOptionValue

func UnmarshalListOfOptionValue(dataList []json.RawMessage) ([]OptionValue, error)

func UnmarshalOptionValue

func UnmarshalOptionValue(data json.RawMessage) (OptionValue, error)

type OptionValueBoolean

type OptionValueBoolean struct {

	// The value of the option
	Value bool `json:"value"`
	// contains filtered or unexported fields
}

Represents a boolean option

func UnmarshalOptionValueBoolean

func UnmarshalOptionValueBoolean(data json.RawMessage) (*OptionValueBoolean, error)

func (*OptionValueBoolean) GetClass

func (*OptionValueBoolean) GetClass() string

func (*OptionValueBoolean) GetType

func (*OptionValueBoolean) GetType() string

func (*OptionValueBoolean) MarshalJSON

func (entity *OptionValueBoolean) MarshalJSON() ([]byte, error)

func (*OptionValueBoolean) OptionValueType

func (*OptionValueBoolean) OptionValueType() string

type OptionValueEmpty

type OptionValueEmpty struct {
	// contains filtered or unexported fields
}

Represents an unknown option or an option which has a default value

func UnmarshalOptionValueEmpty

func UnmarshalOptionValueEmpty(data json.RawMessage) (*OptionValueEmpty, error)

func (*OptionValueEmpty) GetClass

func (*OptionValueEmpty) GetClass() string

func (*OptionValueEmpty) GetType

func (*OptionValueEmpty) GetType() string

func (*OptionValueEmpty) MarshalJSON

func (entity *OptionValueEmpty) MarshalJSON() ([]byte, error)

func (*OptionValueEmpty) OptionValueType

func (*OptionValueEmpty) OptionValueType() string

type OptionValueInteger

type OptionValueInteger struct {

	// The value of the option
	Value JsonInt64 `json:"value"`
	// contains filtered or unexported fields
}

Represents an integer option

func UnmarshalOptionValueInteger

func UnmarshalOptionValueInteger(data json.RawMessage) (*OptionValueInteger, error)

func (*OptionValueInteger) GetClass

func (*OptionValueInteger) GetClass() string

func (*OptionValueInteger) GetType

func (*OptionValueInteger) GetType() string

func (*OptionValueInteger) MarshalJSON

func (entity *OptionValueInteger) MarshalJSON() ([]byte, error)

func (*OptionValueInteger) OptionValueType

func (*OptionValueInteger) OptionValueType() string

type OptionValueString

type OptionValueString struct {

	// The value of the option
	Value string `json:"value"`
	// contains filtered or unexported fields
}

Represents a string option

func UnmarshalOptionValueString

func UnmarshalOptionValueString(data json.RawMessage) (*OptionValueString, error)

func (*OptionValueString) GetClass

func (*OptionValueString) GetClass() string

func (*OptionValueString) GetType

func (*OptionValueString) GetType() string

func (*OptionValueString) MarshalJSON

func (entity *OptionValueString) MarshalJSON() ([]byte, error)

func (*OptionValueString) OptionValueType

func (*OptionValueString) OptionValueType() string

type OrderInfo

type OrderInfo struct {

	// Name of the user
	Name string `json:"name"`
	// Phone number of the user
	PhoneNumber string `json:"phone_number"`
	// Email address of the user
	EmailAddress string `json:"email_address"`
	// Shipping address for this order; may be null
	ShippingAddress *Address `json:"shipping_address"`
	// contains filtered or unexported fields
}

Order information

func UnmarshalOrderInfo

func UnmarshalOrderInfo(data json.RawMessage) (*OrderInfo, error)

func (*OrderInfo) GetClass

func (*OrderInfo) GetClass() string

func (*OrderInfo) GetType

func (*OrderInfo) GetType() string

func (*OrderInfo) MarshalJSON

func (entity *OrderInfo) MarshalJSON() ([]byte, error)

type PageBlock

type PageBlock interface {
	PageBlockType() string
}

Describes a block of an instant view web page

func UnmarshalListOfPageBlock

func UnmarshalListOfPageBlock(dataList []json.RawMessage) ([]PageBlock, error)

func UnmarshalPageBlock

func UnmarshalPageBlock(data json.RawMessage) (PageBlock, error)

type PageBlockAnchor

type PageBlockAnchor struct {

	// Name of the anchor
	Name string `json:"name"`
	// contains filtered or unexported fields
}

An invisible anchor on a page, which can be used in a URL to open the page from the specified anchor

func UnmarshalPageBlockAnchor

func UnmarshalPageBlockAnchor(data json.RawMessage) (*PageBlockAnchor, error)

func (*PageBlockAnchor) GetClass

func (*PageBlockAnchor) GetClass() string

func (*PageBlockAnchor) GetType

func (*PageBlockAnchor) GetType() string

func (*PageBlockAnchor) MarshalJSON

func (entity *PageBlockAnchor) MarshalJSON() ([]byte, error)

func (*PageBlockAnchor) PageBlockType

func (*PageBlockAnchor) PageBlockType() string

type PageBlockAnimation

type PageBlockAnimation struct {

	// Animation file; may be null
	Animation *Animation `json:"animation"`
	// Animation caption
	Caption *PageBlockCaption `json:"caption"`
	// True, if the animation must be played automatically
	NeedAutoplay bool `json:"need_autoplay"`
	// contains filtered or unexported fields
}

An animation

func UnmarshalPageBlockAnimation

func UnmarshalPageBlockAnimation(data json.RawMessage) (*PageBlockAnimation, error)

func (*PageBlockAnimation) GetClass

func (*PageBlockAnimation) GetClass() string

func (*PageBlockAnimation) GetType

func (*PageBlockAnimation) GetType() string

func (*PageBlockAnimation) MarshalJSON

func (entity *PageBlockAnimation) MarshalJSON() ([]byte, error)

func (*PageBlockAnimation) PageBlockType

func (*PageBlockAnimation) PageBlockType() string

type PageBlockAudio

type PageBlockAudio struct {

	// Audio file; may be null
	Audio *Audio `json:"audio"`
	// Audio file caption
	Caption *PageBlockCaption `json:"caption"`
	// contains filtered or unexported fields
}

An audio file

func UnmarshalPageBlockAudio

func UnmarshalPageBlockAudio(data json.RawMessage) (*PageBlockAudio, error)

func (*PageBlockAudio) GetClass

func (*PageBlockAudio) GetClass() string

func (*PageBlockAudio) GetType

func (*PageBlockAudio) GetType() string

func (*PageBlockAudio) MarshalJSON

func (entity *PageBlockAudio) MarshalJSON() ([]byte, error)

func (*PageBlockAudio) PageBlockType

func (*PageBlockAudio) PageBlockType() string

type PageBlockAuthorDate

type PageBlockAuthorDate struct {

	// Author
	Author RichText `json:"author"`
	// Point in time (Unix timestamp) when the article was published; 0 if unknown
	PublishDate int32 `json:"publish_date"`
	// contains filtered or unexported fields
}

The author and publishing date of a page

func UnmarshalPageBlockAuthorDate

func UnmarshalPageBlockAuthorDate(data json.RawMessage) (*PageBlockAuthorDate, error)

func (*PageBlockAuthorDate) GetClass

func (*PageBlockAuthorDate) GetClass() string

func (*PageBlockAuthorDate) GetType

func (*PageBlockAuthorDate) GetType() string

func (*PageBlockAuthorDate) MarshalJSON

func (entity *PageBlockAuthorDate) MarshalJSON() ([]byte, error)

func (*PageBlockAuthorDate) PageBlockType

func (*PageBlockAuthorDate) PageBlockType() string

func (*PageBlockAuthorDate) UnmarshalJSON

func (pageBlockAuthorDate *PageBlockAuthorDate) UnmarshalJSON(data []byte) error

type PageBlockBlockQuote

type PageBlockBlockQuote struct {

	// Quote text
	Text RichText `json:"text"`
	// Quote credit
	Credit RichText `json:"credit"`
	// contains filtered or unexported fields
}

A block quote

func UnmarshalPageBlockBlockQuote

func UnmarshalPageBlockBlockQuote(data json.RawMessage) (*PageBlockBlockQuote, error)

func (*PageBlockBlockQuote) GetClass

func (*PageBlockBlockQuote) GetClass() string

func (*PageBlockBlockQuote) GetType

func (*PageBlockBlockQuote) GetType() string

func (*PageBlockBlockQuote) MarshalJSON

func (entity *PageBlockBlockQuote) MarshalJSON() ([]byte, error)

func (*PageBlockBlockQuote) PageBlockType

func (*PageBlockBlockQuote) PageBlockType() string

func (*PageBlockBlockQuote) UnmarshalJSON

func (pageBlockBlockQuote *PageBlockBlockQuote) UnmarshalJSON(data []byte) error

type PageBlockCaption

type PageBlockCaption struct {

	// Content of the caption
	Text RichText `json:"text"`
	// Block credit (like HTML tag <cite>)
	Credit RichText `json:"credit"`
	// contains filtered or unexported fields
}

Contains a caption of an instant view web page block, consisting of a text and a trailing credit

func UnmarshalPageBlockCaption

func UnmarshalPageBlockCaption(data json.RawMessage) (*PageBlockCaption, error)

func (*PageBlockCaption) GetClass

func (*PageBlockCaption) GetClass() string

func (*PageBlockCaption) GetType

func (*PageBlockCaption) GetType() string

func (*PageBlockCaption) MarshalJSON

func (entity *PageBlockCaption) MarshalJSON() ([]byte, error)

func (*PageBlockCaption) UnmarshalJSON

func (pageBlockCaption *PageBlockCaption) UnmarshalJSON(data []byte) error
type PageBlockChatLink struct {

	// Chat title
	Title string `json:"title"`
	// Chat photo; may be null
	Photo *ChatPhotoInfo `json:"photo"`
	// Chat username by which all other information about the chat can be resolved
	Username string `json:"username"`
	// contains filtered or unexported fields
}

A link to a chat

func UnmarshalPageBlockChatLink(data json.RawMessage) (*PageBlockChatLink, error)

func (*PageBlockChatLink) GetClass

func (*PageBlockChatLink) GetClass() string

func (*PageBlockChatLink) GetType

func (*PageBlockChatLink) GetType() string

func (*PageBlockChatLink) MarshalJSON

func (entity *PageBlockChatLink) MarshalJSON() ([]byte, error)

func (*PageBlockChatLink) PageBlockType

func (*PageBlockChatLink) PageBlockType() string

type PageBlockCollage

type PageBlockCollage struct {

	// Collage item contents
	PageBlocks []PageBlock `json:"page_blocks"`
	// Block caption
	Caption *PageBlockCaption `json:"caption"`
	// contains filtered or unexported fields
}

A collage

func UnmarshalPageBlockCollage

func UnmarshalPageBlockCollage(data json.RawMessage) (*PageBlockCollage, error)

func (*PageBlockCollage) GetClass

func (*PageBlockCollage) GetClass() string

func (*PageBlockCollage) GetType

func (*PageBlockCollage) GetType() string

func (*PageBlockCollage) MarshalJSON

func (entity *PageBlockCollage) MarshalJSON() ([]byte, error)

func (*PageBlockCollage) PageBlockType

func (*PageBlockCollage) PageBlockType() string

func (*PageBlockCollage) UnmarshalJSON

func (pageBlockCollage *PageBlockCollage) UnmarshalJSON(data []byte) error

type PageBlockCover

type PageBlockCover struct {

	// Cover
	Cover PageBlock `json:"cover"`
	// contains filtered or unexported fields
}

A page cover

func UnmarshalPageBlockCover

func UnmarshalPageBlockCover(data json.RawMessage) (*PageBlockCover, error)

func (*PageBlockCover) GetClass

func (*PageBlockCover) GetClass() string

func (*PageBlockCover) GetType

func (*PageBlockCover) GetType() string

func (*PageBlockCover) MarshalJSON

func (entity *PageBlockCover) MarshalJSON() ([]byte, error)

func (*PageBlockCover) PageBlockType

func (*PageBlockCover) PageBlockType() string

func (*PageBlockCover) UnmarshalJSON

func (pageBlockCover *PageBlockCover) UnmarshalJSON(data []byte) error

type PageBlockDetails

type PageBlockDetails struct {

	// Always visible heading for the block
	Header RichText `json:"header"`
	// Block contents
	PageBlocks []PageBlock `json:"page_blocks"`
	// True, if the block is open by default
	IsOpen bool `json:"is_open"`
	// contains filtered or unexported fields
}

A collapsible block

func UnmarshalPageBlockDetails

func UnmarshalPageBlockDetails(data json.RawMessage) (*PageBlockDetails, error)

func (*PageBlockDetails) GetClass

func (*PageBlockDetails) GetClass() string

func (*PageBlockDetails) GetType

func (*PageBlockDetails) GetType() string

func (*PageBlockDetails) MarshalJSON

func (entity *PageBlockDetails) MarshalJSON() ([]byte, error)

func (*PageBlockDetails) PageBlockType

func (*PageBlockDetails) PageBlockType() string

func (*PageBlockDetails) UnmarshalJSON

func (pageBlockDetails *PageBlockDetails) UnmarshalJSON(data []byte) error

type PageBlockDivider

type PageBlockDivider struct {
	// contains filtered or unexported fields
}

An empty block separating a page

func UnmarshalPageBlockDivider

func UnmarshalPageBlockDivider(data json.RawMessage) (*PageBlockDivider, error)

func (*PageBlockDivider) GetClass

func (*PageBlockDivider) GetClass() string

func (*PageBlockDivider) GetType

func (*PageBlockDivider) GetType() string

func (*PageBlockDivider) MarshalJSON

func (entity *PageBlockDivider) MarshalJSON() ([]byte, error)

func (*PageBlockDivider) PageBlockType

func (*PageBlockDivider) PageBlockType() string

type PageBlockEmbedded

type PageBlockEmbedded struct {

	// Web page URL, if available
	Url string `json:"url"`
	// HTML-markup of the embedded page
	Html string `json:"html"`
	// Poster photo, if available; may be null
	PosterPhoto *Photo `json:"poster_photo"`
	// Block width; 0 if unknown
	Width int32 `json:"width"`
	// Block height; 0 if unknown
	Height int32 `json:"height"`
	// Block caption
	Caption *PageBlockCaption `json:"caption"`
	// True, if the block must be full width
	IsFullWidth bool `json:"is_full_width"`
	// True, if scrolling needs to be allowed
	AllowScrolling bool `json:"allow_scrolling"`
	// contains filtered or unexported fields
}

An embedded web page

func UnmarshalPageBlockEmbedded

func UnmarshalPageBlockEmbedded(data json.RawMessage) (*PageBlockEmbedded, error)

func (*PageBlockEmbedded) GetClass

func (*PageBlockEmbedded) GetClass() string

func (*PageBlockEmbedded) GetType

func (*PageBlockEmbedded) GetType() string

func (*PageBlockEmbedded) MarshalJSON

func (entity *PageBlockEmbedded) MarshalJSON() ([]byte, error)

func (*PageBlockEmbedded) PageBlockType

func (*PageBlockEmbedded) PageBlockType() string

type PageBlockEmbeddedPost

type PageBlockEmbeddedPost struct {

	// Web page URL
	Url string `json:"url"`
	// Post author
	Author string `json:"author"`
	// Post author photo; may be null
	AuthorPhoto *Photo `json:"author_photo"`
	// Point in time (Unix timestamp) when the post was created; 0 if unknown
	Date int32 `json:"date"`
	// Post content
	PageBlocks []PageBlock `json:"page_blocks"`
	// Post caption
	Caption *PageBlockCaption `json:"caption"`
	// contains filtered or unexported fields
}

An embedded post

func UnmarshalPageBlockEmbeddedPost

func UnmarshalPageBlockEmbeddedPost(data json.RawMessage) (*PageBlockEmbeddedPost, error)

func (*PageBlockEmbeddedPost) GetClass

func (*PageBlockEmbeddedPost) GetClass() string

func (*PageBlockEmbeddedPost) GetType

func (*PageBlockEmbeddedPost) GetType() string

func (*PageBlockEmbeddedPost) MarshalJSON

func (entity *PageBlockEmbeddedPost) MarshalJSON() ([]byte, error)

func (*PageBlockEmbeddedPost) PageBlockType

func (*PageBlockEmbeddedPost) PageBlockType() string

func (*PageBlockEmbeddedPost) UnmarshalJSON

func (pageBlockEmbeddedPost *PageBlockEmbeddedPost) UnmarshalJSON(data []byte) error

type PageBlockFooter

type PageBlockFooter struct {

	// Footer
	Footer RichText `json:"footer"`
	// contains filtered or unexported fields
}

The footer of a page

func UnmarshalPageBlockFooter

func UnmarshalPageBlockFooter(data json.RawMessage) (*PageBlockFooter, error)

func (*PageBlockFooter) GetClass

func (*PageBlockFooter) GetClass() string

func (*PageBlockFooter) GetType

func (*PageBlockFooter) GetType() string

func (*PageBlockFooter) MarshalJSON

func (entity *PageBlockFooter) MarshalJSON() ([]byte, error)

func (*PageBlockFooter) PageBlockType

func (*PageBlockFooter) PageBlockType() string

func (*PageBlockFooter) UnmarshalJSON

func (pageBlockFooter *PageBlockFooter) UnmarshalJSON(data []byte) error

type PageBlockHeader

type PageBlockHeader struct {

	// Header
	Header RichText `json:"header"`
	// contains filtered or unexported fields
}

A header

func UnmarshalPageBlockHeader

func UnmarshalPageBlockHeader(data json.RawMessage) (*PageBlockHeader, error)

func (*PageBlockHeader) GetClass

func (*PageBlockHeader) GetClass() string

func (*PageBlockHeader) GetType

func (*PageBlockHeader) GetType() string

func (*PageBlockHeader) MarshalJSON

func (entity *PageBlockHeader) MarshalJSON() ([]byte, error)

func (*PageBlockHeader) PageBlockType

func (*PageBlockHeader) PageBlockType() string

func (*PageBlockHeader) UnmarshalJSON

func (pageBlockHeader *PageBlockHeader) UnmarshalJSON(data []byte) error

type PageBlockHorizontalAlignment

type PageBlockHorizontalAlignment interface {
	PageBlockHorizontalAlignmentType() string
}

Describes a horizontal alignment of a table cell content

func UnmarshalListOfPageBlockHorizontalAlignment

func UnmarshalListOfPageBlockHorizontalAlignment(dataList []json.RawMessage) ([]PageBlockHorizontalAlignment, error)

func UnmarshalPageBlockHorizontalAlignment

func UnmarshalPageBlockHorizontalAlignment(data json.RawMessage) (PageBlockHorizontalAlignment, error)

type PageBlockHorizontalAlignmentCenter

type PageBlockHorizontalAlignmentCenter struct {
	// contains filtered or unexported fields
}

The content must be center-aligned

func UnmarshalPageBlockHorizontalAlignmentCenter

func UnmarshalPageBlockHorizontalAlignmentCenter(data json.RawMessage) (*PageBlockHorizontalAlignmentCenter, error)

func (*PageBlockHorizontalAlignmentCenter) GetClass

func (*PageBlockHorizontalAlignmentCenter) GetType

func (*PageBlockHorizontalAlignmentCenter) MarshalJSON

func (entity *PageBlockHorizontalAlignmentCenter) MarshalJSON() ([]byte, error)

func (*PageBlockHorizontalAlignmentCenter) PageBlockHorizontalAlignmentType

func (*PageBlockHorizontalAlignmentCenter) PageBlockHorizontalAlignmentType() string

type PageBlockHorizontalAlignmentLeft

type PageBlockHorizontalAlignmentLeft struct {
	// contains filtered or unexported fields
}

The content must be left-aligned

func UnmarshalPageBlockHorizontalAlignmentLeft

func UnmarshalPageBlockHorizontalAlignmentLeft(data json.RawMessage) (*PageBlockHorizontalAlignmentLeft, error)

func (*PageBlockHorizontalAlignmentLeft) GetClass

func (*PageBlockHorizontalAlignmentLeft) GetType

func (*PageBlockHorizontalAlignmentLeft) MarshalJSON

func (entity *PageBlockHorizontalAlignmentLeft) MarshalJSON() ([]byte, error)

func (*PageBlockHorizontalAlignmentLeft) PageBlockHorizontalAlignmentType

func (*PageBlockHorizontalAlignmentLeft) PageBlockHorizontalAlignmentType() string

type PageBlockHorizontalAlignmentRight

type PageBlockHorizontalAlignmentRight struct {
	// contains filtered or unexported fields
}

The content must be right-aligned

func UnmarshalPageBlockHorizontalAlignmentRight

func UnmarshalPageBlockHorizontalAlignmentRight(data json.RawMessage) (*PageBlockHorizontalAlignmentRight, error)

func (*PageBlockHorizontalAlignmentRight) GetClass

func (*PageBlockHorizontalAlignmentRight) GetType

func (*PageBlockHorizontalAlignmentRight) MarshalJSON

func (entity *PageBlockHorizontalAlignmentRight) MarshalJSON() ([]byte, error)

func (*PageBlockHorizontalAlignmentRight) PageBlockHorizontalAlignmentType

func (*PageBlockHorizontalAlignmentRight) PageBlockHorizontalAlignmentType() string

type PageBlockKicker

type PageBlockKicker struct {

	// Kicker
	Kicker RichText `json:"kicker"`
	// contains filtered or unexported fields
}

A kicker

func UnmarshalPageBlockKicker

func UnmarshalPageBlockKicker(data json.RawMessage) (*PageBlockKicker, error)

func (*PageBlockKicker) GetClass

func (*PageBlockKicker) GetClass() string

func (*PageBlockKicker) GetType

func (*PageBlockKicker) GetType() string

func (*PageBlockKicker) MarshalJSON

func (entity *PageBlockKicker) MarshalJSON() ([]byte, error)

func (*PageBlockKicker) PageBlockType

func (*PageBlockKicker) PageBlockType() string

func (*PageBlockKicker) UnmarshalJSON

func (pageBlockKicker *PageBlockKicker) UnmarshalJSON(data []byte) error

type PageBlockList

type PageBlockList struct {

	// The items of the list
	Items []*PageBlockListItem `json:"items"`
	// contains filtered or unexported fields
}

A list of data blocks

func UnmarshalPageBlockList

func UnmarshalPageBlockList(data json.RawMessage) (*PageBlockList, error)

func (*PageBlockList) GetClass

func (*PageBlockList) GetClass() string

func (*PageBlockList) GetType

func (*PageBlockList) GetType() string

func (*PageBlockList) MarshalJSON

func (entity *PageBlockList) MarshalJSON() ([]byte, error)

func (*PageBlockList) PageBlockType

func (*PageBlockList) PageBlockType() string

type PageBlockListItem

type PageBlockListItem struct {

	// Item label
	Label string `json:"label"`
	// Item blocks
	PageBlocks []PageBlock `json:"page_blocks"`
	// contains filtered or unexported fields
}

Describes an item of a list page block

func UnmarshalPageBlockListItem

func UnmarshalPageBlockListItem(data json.RawMessage) (*PageBlockListItem, error)

func (*PageBlockListItem) GetClass

func (*PageBlockListItem) GetClass() string

func (*PageBlockListItem) GetType

func (*PageBlockListItem) GetType() string

func (*PageBlockListItem) MarshalJSON

func (entity *PageBlockListItem) MarshalJSON() ([]byte, error)

func (*PageBlockListItem) UnmarshalJSON

func (pageBlockListItem *PageBlockListItem) UnmarshalJSON(data []byte) error

type PageBlockMap

type PageBlockMap struct {

	// Location of the map center
	Location *Location `json:"location"`
	// Map zoom level
	Zoom int32 `json:"zoom"`
	// Map width
	Width int32 `json:"width"`
	// Map height
	Height int32 `json:"height"`
	// Block caption
	Caption *PageBlockCaption `json:"caption"`
	// contains filtered or unexported fields
}

A map

func UnmarshalPageBlockMap

func UnmarshalPageBlockMap(data json.RawMessage) (*PageBlockMap, error)

func (*PageBlockMap) GetClass

func (*PageBlockMap) GetClass() string

func (*PageBlockMap) GetType

func (*PageBlockMap) GetType() string

func (*PageBlockMap) MarshalJSON

func (entity *PageBlockMap) MarshalJSON() ([]byte, error)

func (*PageBlockMap) PageBlockType

func (*PageBlockMap) PageBlockType() string

type PageBlockParagraph

type PageBlockParagraph struct {

	// Paragraph text
	Text RichText `json:"text"`
	// contains filtered or unexported fields
}

A text paragraph

func UnmarshalPageBlockParagraph

func UnmarshalPageBlockParagraph(data json.RawMessage) (*PageBlockParagraph, error)

func (*PageBlockParagraph) GetClass

func (*PageBlockParagraph) GetClass() string

func (*PageBlockParagraph) GetType

func (*PageBlockParagraph) GetType() string

func (*PageBlockParagraph) MarshalJSON

func (entity *PageBlockParagraph) MarshalJSON() ([]byte, error)

func (*PageBlockParagraph) PageBlockType

func (*PageBlockParagraph) PageBlockType() string

func (*PageBlockParagraph) UnmarshalJSON

func (pageBlockParagraph *PageBlockParagraph) UnmarshalJSON(data []byte) error

type PageBlockPhoto

type PageBlockPhoto struct {

	// Photo file; may be null
	Photo *Photo `json:"photo"`
	// Photo caption
	Caption *PageBlockCaption `json:"caption"`
	// URL that needs to be opened when the photo is clicked
	Url string `json:"url"`
	// contains filtered or unexported fields
}

A photo

func UnmarshalPageBlockPhoto

func UnmarshalPageBlockPhoto(data json.RawMessage) (*PageBlockPhoto, error)

func (*PageBlockPhoto) GetClass

func (*PageBlockPhoto) GetClass() string

func (*PageBlockPhoto) GetType

func (*PageBlockPhoto) GetType() string

func (*PageBlockPhoto) MarshalJSON

func (entity *PageBlockPhoto) MarshalJSON() ([]byte, error)

func (*PageBlockPhoto) PageBlockType

func (*PageBlockPhoto) PageBlockType() string

type PageBlockPreformatted

type PageBlockPreformatted struct {

	// Paragraph text
	Text RichText `json:"text"`
	// Programming language for which the text needs to be formatted
	Language string `json:"language"`
	// contains filtered or unexported fields
}

A preformatted text paragraph

func UnmarshalPageBlockPreformatted

func UnmarshalPageBlockPreformatted(data json.RawMessage) (*PageBlockPreformatted, error)

func (*PageBlockPreformatted) GetClass

func (*PageBlockPreformatted) GetClass() string

func (*PageBlockPreformatted) GetType

func (*PageBlockPreformatted) GetType() string

func (*PageBlockPreformatted) MarshalJSON

func (entity *PageBlockPreformatted) MarshalJSON() ([]byte, error)

func (*PageBlockPreformatted) PageBlockType

func (*PageBlockPreformatted) PageBlockType() string

func (*PageBlockPreformatted) UnmarshalJSON

func (pageBlockPreformatted *PageBlockPreformatted) UnmarshalJSON(data []byte) error

type PageBlockPullQuote

type PageBlockPullQuote struct {

	// Quote text
	Text RichText `json:"text"`
	// Quote credit
	Credit RichText `json:"credit"`
	// contains filtered or unexported fields
}

A pull quote

func UnmarshalPageBlockPullQuote

func UnmarshalPageBlockPullQuote(data json.RawMessage) (*PageBlockPullQuote, error)

func (*PageBlockPullQuote) GetClass

func (*PageBlockPullQuote) GetClass() string

func (*PageBlockPullQuote) GetType

func (*PageBlockPullQuote) GetType() string

func (*PageBlockPullQuote) MarshalJSON

func (entity *PageBlockPullQuote) MarshalJSON() ([]byte, error)

func (*PageBlockPullQuote) PageBlockType

func (*PageBlockPullQuote) PageBlockType() string

func (*PageBlockPullQuote) UnmarshalJSON

func (pageBlockPullQuote *PageBlockPullQuote) UnmarshalJSON(data []byte) error

type PageBlockRelatedArticle

type PageBlockRelatedArticle struct {

	// Related article URL
	Url string `json:"url"`
	// Article title; may be empty
	Title string `json:"title"`
	// Article description; may be empty
	Description string `json:"description"`
	// Article photo; may be null
	Photo *Photo `json:"photo"`
	// Article author; may be empty
	Author string `json:"author"`
	// Point in time (Unix timestamp) when the article was published; 0 if unknown
	PublishDate int32 `json:"publish_date"`
	// contains filtered or unexported fields
}

Contains information about a related article

func UnmarshalPageBlockRelatedArticle

func UnmarshalPageBlockRelatedArticle(data json.RawMessage) (*PageBlockRelatedArticle, error)

func (*PageBlockRelatedArticle) GetClass

func (*PageBlockRelatedArticle) GetClass() string

func (*PageBlockRelatedArticle) GetType

func (*PageBlockRelatedArticle) GetType() string

func (*PageBlockRelatedArticle) MarshalJSON

func (entity *PageBlockRelatedArticle) MarshalJSON() ([]byte, error)

type PageBlockRelatedArticles

type PageBlockRelatedArticles struct {

	// Block header
	Header RichText `json:"header"`
	// List of related articles
	Articles []*PageBlockRelatedArticle `json:"articles"`
	// contains filtered or unexported fields
}

Related articles

func UnmarshalPageBlockRelatedArticles

func UnmarshalPageBlockRelatedArticles(data json.RawMessage) (*PageBlockRelatedArticles, error)

func (*PageBlockRelatedArticles) GetClass

func (*PageBlockRelatedArticles) GetClass() string

func (*PageBlockRelatedArticles) GetType

func (*PageBlockRelatedArticles) GetType() string

func (*PageBlockRelatedArticles) MarshalJSON

func (entity *PageBlockRelatedArticles) MarshalJSON() ([]byte, error)

func (*PageBlockRelatedArticles) PageBlockType

func (*PageBlockRelatedArticles) PageBlockType() string

func (*PageBlockRelatedArticles) UnmarshalJSON

func (pageBlockRelatedArticles *PageBlockRelatedArticles) UnmarshalJSON(data []byte) error

type PageBlockSlideshow

type PageBlockSlideshow struct {

	// Slideshow item contents
	PageBlocks []PageBlock `json:"page_blocks"`
	// Block caption
	Caption *PageBlockCaption `json:"caption"`
	// contains filtered or unexported fields
}

A slideshow

func UnmarshalPageBlockSlideshow

func UnmarshalPageBlockSlideshow(data json.RawMessage) (*PageBlockSlideshow, error)

func (*PageBlockSlideshow) GetClass

func (*PageBlockSlideshow) GetClass() string

func (*PageBlockSlideshow) GetType

func (*PageBlockSlideshow) GetType() string

func (*PageBlockSlideshow) MarshalJSON

func (entity *PageBlockSlideshow) MarshalJSON() ([]byte, error)

func (*PageBlockSlideshow) PageBlockType

func (*PageBlockSlideshow) PageBlockType() string

func (*PageBlockSlideshow) UnmarshalJSON

func (pageBlockSlideshow *PageBlockSlideshow) UnmarshalJSON(data []byte) error

type PageBlockSubheader

type PageBlockSubheader struct {

	// Subheader
	Subheader RichText `json:"subheader"`
	// contains filtered or unexported fields
}

A subheader

func UnmarshalPageBlockSubheader

func UnmarshalPageBlockSubheader(data json.RawMessage) (*PageBlockSubheader, error)

func (*PageBlockSubheader) GetClass

func (*PageBlockSubheader) GetClass() string

func (*PageBlockSubheader) GetType

func (*PageBlockSubheader) GetType() string

func (*PageBlockSubheader) MarshalJSON

func (entity *PageBlockSubheader) MarshalJSON() ([]byte, error)

func (*PageBlockSubheader) PageBlockType

func (*PageBlockSubheader) PageBlockType() string

func (*PageBlockSubheader) UnmarshalJSON

func (pageBlockSubheader *PageBlockSubheader) UnmarshalJSON(data []byte) error

type PageBlockSubtitle

type PageBlockSubtitle struct {

	// Subtitle
	Subtitle RichText `json:"subtitle"`
	// contains filtered or unexported fields
}

The subtitle of a page

func UnmarshalPageBlockSubtitle

func UnmarshalPageBlockSubtitle(data json.RawMessage) (*PageBlockSubtitle, error)

func (*PageBlockSubtitle) GetClass

func (*PageBlockSubtitle) GetClass() string

func (*PageBlockSubtitle) GetType

func (*PageBlockSubtitle) GetType() string

func (*PageBlockSubtitle) MarshalJSON

func (entity *PageBlockSubtitle) MarshalJSON() ([]byte, error)

func (*PageBlockSubtitle) PageBlockType

func (*PageBlockSubtitle) PageBlockType() string

func (*PageBlockSubtitle) UnmarshalJSON

func (pageBlockSubtitle *PageBlockSubtitle) UnmarshalJSON(data []byte) error

type PageBlockTable

type PageBlockTable struct {

	// Table caption
	Caption RichText `json:"caption"`
	// Table cells
	Cells [][]*PageBlockTableCell `json:"cells"`
	// True, if the table is bordered
	IsBordered bool `json:"is_bordered"`
	// True, if the table is striped
	IsStriped bool `json:"is_striped"`
	// contains filtered or unexported fields
}

A table

func UnmarshalPageBlockTable

func UnmarshalPageBlockTable(data json.RawMessage) (*PageBlockTable, error)

func (*PageBlockTable) GetClass

func (*PageBlockTable) GetClass() string

func (*PageBlockTable) GetType

func (*PageBlockTable) GetType() string

func (*PageBlockTable) MarshalJSON

func (entity *PageBlockTable) MarshalJSON() ([]byte, error)

func (*PageBlockTable) PageBlockType

func (*PageBlockTable) PageBlockType() string

func (*PageBlockTable) UnmarshalJSON

func (pageBlockTable *PageBlockTable) UnmarshalJSON(data []byte) error

type PageBlockTableCell

type PageBlockTableCell struct {

	// Cell text; may be null. If the text is null, then the cell must be invisible
	Text RichText `json:"text"`
	// True, if it is a header cell
	IsHeader bool `json:"is_header"`
	// The number of columns the cell spans
	Colspan int32 `json:"colspan"`
	// The number of rows the cell spans
	Rowspan int32 `json:"rowspan"`
	// Horizontal cell content alignment
	Align PageBlockHorizontalAlignment `json:"align"`
	// Vertical cell content alignment
	Valign PageBlockVerticalAlignment `json:"valign"`
	// contains filtered or unexported fields
}

Represents a cell of a table

func UnmarshalPageBlockTableCell

func UnmarshalPageBlockTableCell(data json.RawMessage) (*PageBlockTableCell, error)

func (*PageBlockTableCell) GetClass

func (*PageBlockTableCell) GetClass() string

func (*PageBlockTableCell) GetType

func (*PageBlockTableCell) GetType() string

func (*PageBlockTableCell) MarshalJSON

func (entity *PageBlockTableCell) MarshalJSON() ([]byte, error)

func (*PageBlockTableCell) UnmarshalJSON

func (pageBlockTableCell *PageBlockTableCell) UnmarshalJSON(data []byte) error

type PageBlockTitle

type PageBlockTitle struct {

	// Title
	Title RichText `json:"title"`
	// contains filtered or unexported fields
}

The title of a page

func UnmarshalPageBlockTitle

func UnmarshalPageBlockTitle(data json.RawMessage) (*PageBlockTitle, error)

func (*PageBlockTitle) GetClass

func (*PageBlockTitle) GetClass() string

func (*PageBlockTitle) GetType

func (*PageBlockTitle) GetType() string

func (*PageBlockTitle) MarshalJSON

func (entity *PageBlockTitle) MarshalJSON() ([]byte, error)

func (*PageBlockTitle) PageBlockType

func (*PageBlockTitle) PageBlockType() string

func (*PageBlockTitle) UnmarshalJSON

func (pageBlockTitle *PageBlockTitle) UnmarshalJSON(data []byte) error

type PageBlockVerticalAlignment

type PageBlockVerticalAlignment interface {
	PageBlockVerticalAlignmentType() string
}

Describes a Vertical alignment of a table cell content

func UnmarshalListOfPageBlockVerticalAlignment

func UnmarshalListOfPageBlockVerticalAlignment(dataList []json.RawMessage) ([]PageBlockVerticalAlignment, error)

func UnmarshalPageBlockVerticalAlignment

func UnmarshalPageBlockVerticalAlignment(data json.RawMessage) (PageBlockVerticalAlignment, error)

type PageBlockVerticalAlignmentBottom

type PageBlockVerticalAlignmentBottom struct {
	// contains filtered or unexported fields
}

The content must be bottom-aligned

func UnmarshalPageBlockVerticalAlignmentBottom

func UnmarshalPageBlockVerticalAlignmentBottom(data json.RawMessage) (*PageBlockVerticalAlignmentBottom, error)

func (*PageBlockVerticalAlignmentBottom) GetClass

func (*PageBlockVerticalAlignmentBottom) GetType

func (*PageBlockVerticalAlignmentBottom) MarshalJSON

func (entity *PageBlockVerticalAlignmentBottom) MarshalJSON() ([]byte, error)

func (*PageBlockVerticalAlignmentBottom) PageBlockVerticalAlignmentType

func (*PageBlockVerticalAlignmentBottom) PageBlockVerticalAlignmentType() string

type PageBlockVerticalAlignmentMiddle

type PageBlockVerticalAlignmentMiddle struct {
	// contains filtered or unexported fields
}

The content must be middle-aligned

func UnmarshalPageBlockVerticalAlignmentMiddle

func UnmarshalPageBlockVerticalAlignmentMiddle(data json.RawMessage) (*PageBlockVerticalAlignmentMiddle, error)

func (*PageBlockVerticalAlignmentMiddle) GetClass

func (*PageBlockVerticalAlignmentMiddle) GetType

func (*PageBlockVerticalAlignmentMiddle) MarshalJSON

func (entity *PageBlockVerticalAlignmentMiddle) MarshalJSON() ([]byte, error)

func (*PageBlockVerticalAlignmentMiddle) PageBlockVerticalAlignmentType

func (*PageBlockVerticalAlignmentMiddle) PageBlockVerticalAlignmentType() string

type PageBlockVerticalAlignmentTop

type PageBlockVerticalAlignmentTop struct {
	// contains filtered or unexported fields
}

The content must be top-aligned

func UnmarshalPageBlockVerticalAlignmentTop

func UnmarshalPageBlockVerticalAlignmentTop(data json.RawMessage) (*PageBlockVerticalAlignmentTop, error)

func (*PageBlockVerticalAlignmentTop) GetClass

func (*PageBlockVerticalAlignmentTop) GetType

func (*PageBlockVerticalAlignmentTop) MarshalJSON

func (entity *PageBlockVerticalAlignmentTop) MarshalJSON() ([]byte, error)

func (*PageBlockVerticalAlignmentTop) PageBlockVerticalAlignmentType

func (*PageBlockVerticalAlignmentTop) PageBlockVerticalAlignmentType() string

type PageBlockVideo

type PageBlockVideo struct {

	// Video file; may be null
	Video *Video `json:"video"`
	// Video caption
	Caption *PageBlockCaption `json:"caption"`
	// True, if the video must be played automatically
	NeedAutoplay bool `json:"need_autoplay"`
	// True, if the video must be looped
	IsLooped bool `json:"is_looped"`
	// contains filtered or unexported fields
}

A video

func UnmarshalPageBlockVideo

func UnmarshalPageBlockVideo(data json.RawMessage) (*PageBlockVideo, error)

func (*PageBlockVideo) GetClass

func (*PageBlockVideo) GetClass() string

func (*PageBlockVideo) GetType

func (*PageBlockVideo) GetType() string

func (*PageBlockVideo) MarshalJSON

func (entity *PageBlockVideo) MarshalJSON() ([]byte, error)

func (*PageBlockVideo) PageBlockType

func (*PageBlockVideo) PageBlockType() string

type PageBlockVoiceNote

type PageBlockVoiceNote struct {

	// Voice note; may be null
	VoiceNote *VoiceNote `json:"voice_note"`
	// Voice note caption
	Caption *PageBlockCaption `json:"caption"`
	// contains filtered or unexported fields
}

A voice note

func UnmarshalPageBlockVoiceNote

func UnmarshalPageBlockVoiceNote(data json.RawMessage) (*PageBlockVoiceNote, error)

func (*PageBlockVoiceNote) GetClass

func (*PageBlockVoiceNote) GetClass() string

func (*PageBlockVoiceNote) GetType

func (*PageBlockVoiceNote) GetType() string

func (*PageBlockVoiceNote) MarshalJSON

func (entity *PageBlockVoiceNote) MarshalJSON() ([]byte, error)

func (*PageBlockVoiceNote) PageBlockType

func (*PageBlockVoiceNote) PageBlockType() string

type ParseMarkdownRequest

type ParseMarkdownRequest struct {
	// The text to parse. For example, "__italic__ ~~strikethrough~~ ||spoiler|| **bold** `code` “`pre“` __[italic__ text_url](telegram.org) __italic**bold italic__bold**"
	Text *FormattedText `json:"text"`
}

type ParseTextEntitiesRequest

type ParseTextEntitiesRequest struct {
	// The text to parse
	Text string `json:"text"`
	// Text parse mode
	ParseMode TextParseMode `json:"parse_mode"`
}

type PassportAuthorizationForm

type PassportAuthorizationForm struct {

	// Unique identifier of the authorization form
	Id int32 `json:"id"`
	// Telegram Passport elements that must be provided to complete the form
	RequiredElements []*PassportRequiredElement `json:"required_elements"`
	// URL for the privacy policy of the service; may be empty
	PrivacyPolicyUrl string `json:"privacy_policy_url"`
	// contains filtered or unexported fields
}

Contains information about a Telegram Passport authorization form that was requested

func UnmarshalPassportAuthorizationForm

func UnmarshalPassportAuthorizationForm(data json.RawMessage) (*PassportAuthorizationForm, error)

func (*PassportAuthorizationForm) GetClass

func (*PassportAuthorizationForm) GetClass() string

func (*PassportAuthorizationForm) GetType

func (*PassportAuthorizationForm) GetType() string

func (*PassportAuthorizationForm) MarshalJSON

func (entity *PassportAuthorizationForm) MarshalJSON() ([]byte, error)

type PassportElement

type PassportElement interface {
	PassportElementType() string
}

Contains information about a Telegram Passport element

func UnmarshalListOfPassportElement

func UnmarshalListOfPassportElement(dataList []json.RawMessage) ([]PassportElement, error)

func UnmarshalPassportElement

func UnmarshalPassportElement(data json.RawMessage) (PassportElement, error)

type PassportElementAddress

type PassportElementAddress struct {

	// Address
	Address *Address `json:"address"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's address

func UnmarshalPassportElementAddress

func UnmarshalPassportElementAddress(data json.RawMessage) (*PassportElementAddress, error)

func (*PassportElementAddress) GetClass

func (*PassportElementAddress) GetClass() string

func (*PassportElementAddress) GetType

func (*PassportElementAddress) GetType() string

func (*PassportElementAddress) MarshalJSON

func (entity *PassportElementAddress) MarshalJSON() ([]byte, error)

func (*PassportElementAddress) PassportElementType

func (*PassportElementAddress) PassportElementType() string

type PassportElementBankStatement

type PassportElementBankStatement struct {

	// Bank statement
	BankStatement *PersonalDocument `json:"bank_statement"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's bank statement

func UnmarshalPassportElementBankStatement

func UnmarshalPassportElementBankStatement(data json.RawMessage) (*PassportElementBankStatement, error)

func (*PassportElementBankStatement) GetClass

func (*PassportElementBankStatement) GetType

func (*PassportElementBankStatement) MarshalJSON

func (entity *PassportElementBankStatement) MarshalJSON() ([]byte, error)

func (*PassportElementBankStatement) PassportElementType

func (*PassportElementBankStatement) PassportElementType() string

type PassportElementDriverLicense

type PassportElementDriverLicense struct {

	// Driver license
	DriverLicense *IdentityDocument `json:"driver_license"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's driver license

func UnmarshalPassportElementDriverLicense

func UnmarshalPassportElementDriverLicense(data json.RawMessage) (*PassportElementDriverLicense, error)

func (*PassportElementDriverLicense) GetClass

func (*PassportElementDriverLicense) GetType

func (*PassportElementDriverLicense) MarshalJSON

func (entity *PassportElementDriverLicense) MarshalJSON() ([]byte, error)

func (*PassportElementDriverLicense) PassportElementType

func (*PassportElementDriverLicense) PassportElementType() string

type PassportElementEmailAddress

type PassportElementEmailAddress struct {

	// Email address
	EmailAddress string `json:"email_address"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's email address

func UnmarshalPassportElementEmailAddress

func UnmarshalPassportElementEmailAddress(data json.RawMessage) (*PassportElementEmailAddress, error)

func (*PassportElementEmailAddress) GetClass

func (*PassportElementEmailAddress) GetClass() string

func (*PassportElementEmailAddress) GetType

func (*PassportElementEmailAddress) MarshalJSON

func (entity *PassportElementEmailAddress) MarshalJSON() ([]byte, error)

func (*PassportElementEmailAddress) PassportElementType

func (*PassportElementEmailAddress) PassportElementType() string

type PassportElementError

type PassportElementError struct {

	// Type of the Telegram Passport element which has the error
	Type PassportElementType `json:"type"`
	// Error message
	Message string `json:"message"`
	// Error source
	Source PassportElementErrorSource `json:"source"`
	// contains filtered or unexported fields
}

Contains the description of an error in a Telegram Passport element

func UnmarshalPassportElementError

func UnmarshalPassportElementError(data json.RawMessage) (*PassportElementError, error)

func (*PassportElementError) GetClass

func (*PassportElementError) GetClass() string

func (*PassportElementError) GetType

func (*PassportElementError) GetType() string

func (*PassportElementError) MarshalJSON

func (entity *PassportElementError) MarshalJSON() ([]byte, error)

func (*PassportElementError) UnmarshalJSON

func (passportElementError *PassportElementError) UnmarshalJSON(data []byte) error

type PassportElementErrorSource

type PassportElementErrorSource interface {
	PassportElementErrorSourceType() string
}

Contains the description of an error in a Telegram Passport element

func UnmarshalListOfPassportElementErrorSource

func UnmarshalListOfPassportElementErrorSource(dataList []json.RawMessage) ([]PassportElementErrorSource, error)

func UnmarshalPassportElementErrorSource

func UnmarshalPassportElementErrorSource(data json.RawMessage) (PassportElementErrorSource, error)

type PassportElementErrorSourceDataField

type PassportElementErrorSourceDataField struct {

	// Field name
	FieldName string `json:"field_name"`
	// contains filtered or unexported fields
}

One of the data fields contains an error. The error will be considered resolved when the value of the field changes

func UnmarshalPassportElementErrorSourceDataField

func UnmarshalPassportElementErrorSourceDataField(data json.RawMessage) (*PassportElementErrorSourceDataField, error)

func (*PassportElementErrorSourceDataField) GetClass

func (*PassportElementErrorSourceDataField) GetType

func (*PassportElementErrorSourceDataField) MarshalJSON

func (entity *PassportElementErrorSourceDataField) MarshalJSON() ([]byte, error)

func (*PassportElementErrorSourceDataField) PassportElementErrorSourceType

func (*PassportElementErrorSourceDataField) PassportElementErrorSourceType() string

type PassportElementErrorSourceFile

type PassportElementErrorSourceFile struct {

	// Index of a file with the error
	FileIndex int32 `json:"file_index"`
	// contains filtered or unexported fields
}

The file contains an error. The error will be considered resolved when the file changes

func UnmarshalPassportElementErrorSourceFile

func UnmarshalPassportElementErrorSourceFile(data json.RawMessage) (*PassportElementErrorSourceFile, error)

func (*PassportElementErrorSourceFile) GetClass

func (*PassportElementErrorSourceFile) GetType

func (*PassportElementErrorSourceFile) MarshalJSON

func (entity *PassportElementErrorSourceFile) MarshalJSON() ([]byte, error)

func (*PassportElementErrorSourceFile) PassportElementErrorSourceType

func (*PassportElementErrorSourceFile) PassportElementErrorSourceType() string

type PassportElementErrorSourceFiles

type PassportElementErrorSourceFiles struct {
	// contains filtered or unexported fields
}

The list of attached files contains an error. The error will be considered resolved when the list of files changes

func UnmarshalPassportElementErrorSourceFiles

func UnmarshalPassportElementErrorSourceFiles(data json.RawMessage) (*PassportElementErrorSourceFiles, error)

func (*PassportElementErrorSourceFiles) GetClass

func (*PassportElementErrorSourceFiles) GetType

func (*PassportElementErrorSourceFiles) MarshalJSON

func (entity *PassportElementErrorSourceFiles) MarshalJSON() ([]byte, error)

func (*PassportElementErrorSourceFiles) PassportElementErrorSourceType

func (*PassportElementErrorSourceFiles) PassportElementErrorSourceType() string

type PassportElementErrorSourceFrontSide

type PassportElementErrorSourceFrontSide struct {
	// contains filtered or unexported fields
}

The front side of the document contains an error. The error will be considered resolved when the file with the front side changes

func UnmarshalPassportElementErrorSourceFrontSide

func UnmarshalPassportElementErrorSourceFrontSide(data json.RawMessage) (*PassportElementErrorSourceFrontSide, error)

func (*PassportElementErrorSourceFrontSide) GetClass

func (*PassportElementErrorSourceFrontSide) GetType

func (*PassportElementErrorSourceFrontSide) MarshalJSON

func (entity *PassportElementErrorSourceFrontSide) MarshalJSON() ([]byte, error)

func (*PassportElementErrorSourceFrontSide) PassportElementErrorSourceType

func (*PassportElementErrorSourceFrontSide) PassportElementErrorSourceType() string

type PassportElementErrorSourceReverseSide

type PassportElementErrorSourceReverseSide struct {
	// contains filtered or unexported fields
}

The reverse side of the document contains an error. The error will be considered resolved when the file with the reverse side changes

func UnmarshalPassportElementErrorSourceReverseSide

func UnmarshalPassportElementErrorSourceReverseSide(data json.RawMessage) (*PassportElementErrorSourceReverseSide, error)

func (*PassportElementErrorSourceReverseSide) GetClass

func (*PassportElementErrorSourceReverseSide) GetType

func (*PassportElementErrorSourceReverseSide) MarshalJSON

func (entity *PassportElementErrorSourceReverseSide) MarshalJSON() ([]byte, error)

func (*PassportElementErrorSourceReverseSide) PassportElementErrorSourceType

func (*PassportElementErrorSourceReverseSide) PassportElementErrorSourceType() string

type PassportElementErrorSourceSelfie

type PassportElementErrorSourceSelfie struct {
	// contains filtered or unexported fields
}

The selfie with the document contains an error. The error will be considered resolved when the file with the selfie changes

func UnmarshalPassportElementErrorSourceSelfie

func UnmarshalPassportElementErrorSourceSelfie(data json.RawMessage) (*PassportElementErrorSourceSelfie, error)

func (*PassportElementErrorSourceSelfie) GetClass

func (*PassportElementErrorSourceSelfie) GetType

func (*PassportElementErrorSourceSelfie) MarshalJSON

func (entity *PassportElementErrorSourceSelfie) MarshalJSON() ([]byte, error)

func (*PassportElementErrorSourceSelfie) PassportElementErrorSourceType

func (*PassportElementErrorSourceSelfie) PassportElementErrorSourceType() string

type PassportElementErrorSourceTranslationFile

type PassportElementErrorSourceTranslationFile struct {

	// Index of a file with the error
	FileIndex int32 `json:"file_index"`
	// contains filtered or unexported fields
}

One of files with the translation of the document contains an error. The error will be considered resolved when the file changes

func UnmarshalPassportElementErrorSourceTranslationFile

func UnmarshalPassportElementErrorSourceTranslationFile(data json.RawMessage) (*PassportElementErrorSourceTranslationFile, error)

func (*PassportElementErrorSourceTranslationFile) GetClass

func (*PassportElementErrorSourceTranslationFile) GetType

func (*PassportElementErrorSourceTranslationFile) MarshalJSON

func (entity *PassportElementErrorSourceTranslationFile) MarshalJSON() ([]byte, error)

func (*PassportElementErrorSourceTranslationFile) PassportElementErrorSourceType

func (*PassportElementErrorSourceTranslationFile) PassportElementErrorSourceType() string

type PassportElementErrorSourceTranslationFiles

type PassportElementErrorSourceTranslationFiles struct {
	// contains filtered or unexported fields
}

The translation of the document contains an error. The error will be considered resolved when the list of translation files changes

func UnmarshalPassportElementErrorSourceTranslationFiles

func UnmarshalPassportElementErrorSourceTranslationFiles(data json.RawMessage) (*PassportElementErrorSourceTranslationFiles, error)

func (*PassportElementErrorSourceTranslationFiles) GetClass

func (*PassportElementErrorSourceTranslationFiles) GetType

func (*PassportElementErrorSourceTranslationFiles) MarshalJSON

func (entity *PassportElementErrorSourceTranslationFiles) MarshalJSON() ([]byte, error)

func (*PassportElementErrorSourceTranslationFiles) PassportElementErrorSourceType

func (*PassportElementErrorSourceTranslationFiles) PassportElementErrorSourceType() string

type PassportElementErrorSourceUnspecified

type PassportElementErrorSourceUnspecified struct {
	// contains filtered or unexported fields
}

The element contains an error in an unspecified place. The error will be considered resolved when new data is added

func UnmarshalPassportElementErrorSourceUnspecified

func UnmarshalPassportElementErrorSourceUnspecified(data json.RawMessage) (*PassportElementErrorSourceUnspecified, error)

func (*PassportElementErrorSourceUnspecified) GetClass

func (*PassportElementErrorSourceUnspecified) GetType

func (*PassportElementErrorSourceUnspecified) MarshalJSON

func (entity *PassportElementErrorSourceUnspecified) MarshalJSON() ([]byte, error)

func (*PassportElementErrorSourceUnspecified) PassportElementErrorSourceType

func (*PassportElementErrorSourceUnspecified) PassportElementErrorSourceType() string

type PassportElementIdentityCard

type PassportElementIdentityCard struct {

	// Identity card
	IdentityCard *IdentityDocument `json:"identity_card"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's identity card

func UnmarshalPassportElementIdentityCard

func UnmarshalPassportElementIdentityCard(data json.RawMessage) (*PassportElementIdentityCard, error)

func (*PassportElementIdentityCard) GetClass

func (*PassportElementIdentityCard) GetClass() string

func (*PassportElementIdentityCard) GetType

func (*PassportElementIdentityCard) MarshalJSON

func (entity *PassportElementIdentityCard) MarshalJSON() ([]byte, error)

func (*PassportElementIdentityCard) PassportElementType

func (*PassportElementIdentityCard) PassportElementType() string

type PassportElementInternalPassport

type PassportElementInternalPassport struct {

	// Internal passport
	InternalPassport *IdentityDocument `json:"internal_passport"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's internal passport

func UnmarshalPassportElementInternalPassport

func UnmarshalPassportElementInternalPassport(data json.RawMessage) (*PassportElementInternalPassport, error)

func (*PassportElementInternalPassport) GetClass

func (*PassportElementInternalPassport) GetType

func (*PassportElementInternalPassport) MarshalJSON

func (entity *PassportElementInternalPassport) MarshalJSON() ([]byte, error)

func (*PassportElementInternalPassport) PassportElementType

func (*PassportElementInternalPassport) PassportElementType() string

type PassportElementPassport

type PassportElementPassport struct {

	// Passport
	Passport *IdentityDocument `json:"passport"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's passport

func UnmarshalPassportElementPassport

func UnmarshalPassportElementPassport(data json.RawMessage) (*PassportElementPassport, error)

func (*PassportElementPassport) GetClass

func (*PassportElementPassport) GetClass() string

func (*PassportElementPassport) GetType

func (*PassportElementPassport) GetType() string

func (*PassportElementPassport) MarshalJSON

func (entity *PassportElementPassport) MarshalJSON() ([]byte, error)

func (*PassportElementPassport) PassportElementType

func (*PassportElementPassport) PassportElementType() string

type PassportElementPassportRegistration

type PassportElementPassportRegistration struct {

	// Passport registration pages
	PassportRegistration *PersonalDocument `json:"passport_registration"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's passport registration pages

func UnmarshalPassportElementPassportRegistration

func UnmarshalPassportElementPassportRegistration(data json.RawMessage) (*PassportElementPassportRegistration, error)

func (*PassportElementPassportRegistration) GetClass

func (*PassportElementPassportRegistration) GetType

func (*PassportElementPassportRegistration) MarshalJSON

func (entity *PassportElementPassportRegistration) MarshalJSON() ([]byte, error)

func (*PassportElementPassportRegistration) PassportElementType

func (*PassportElementPassportRegistration) PassportElementType() string

type PassportElementPersonalDetails

type PassportElementPersonalDetails struct {

	// Personal details of the user
	PersonalDetails *PersonalDetails `json:"personal_details"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's personal details

func UnmarshalPassportElementPersonalDetails

func UnmarshalPassportElementPersonalDetails(data json.RawMessage) (*PassportElementPersonalDetails, error)

func (*PassportElementPersonalDetails) GetClass

func (*PassportElementPersonalDetails) GetType

func (*PassportElementPersonalDetails) MarshalJSON

func (entity *PassportElementPersonalDetails) MarshalJSON() ([]byte, error)

func (*PassportElementPersonalDetails) PassportElementType

func (*PassportElementPersonalDetails) PassportElementType() string

type PassportElementPhoneNumber

type PassportElementPhoneNumber struct {

	// Phone number
	PhoneNumber string `json:"phone_number"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's phone number

func UnmarshalPassportElementPhoneNumber

func UnmarshalPassportElementPhoneNumber(data json.RawMessage) (*PassportElementPhoneNumber, error)

func (*PassportElementPhoneNumber) GetClass

func (*PassportElementPhoneNumber) GetClass() string

func (*PassportElementPhoneNumber) GetType

func (*PassportElementPhoneNumber) MarshalJSON

func (entity *PassportElementPhoneNumber) MarshalJSON() ([]byte, error)

func (*PassportElementPhoneNumber) PassportElementType

func (*PassportElementPhoneNumber) PassportElementType() string

type PassportElementRentalAgreement

type PassportElementRentalAgreement struct {

	// Rental agreement
	RentalAgreement *PersonalDocument `json:"rental_agreement"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's rental agreement

func UnmarshalPassportElementRentalAgreement

func UnmarshalPassportElementRentalAgreement(data json.RawMessage) (*PassportElementRentalAgreement, error)

func (*PassportElementRentalAgreement) GetClass

func (*PassportElementRentalAgreement) GetType

func (*PassportElementRentalAgreement) MarshalJSON

func (entity *PassportElementRentalAgreement) MarshalJSON() ([]byte, error)

func (*PassportElementRentalAgreement) PassportElementType

func (*PassportElementRentalAgreement) PassportElementType() string

type PassportElementTemporaryRegistration

type PassportElementTemporaryRegistration struct {

	// Temporary registration
	TemporaryRegistration *PersonalDocument `json:"temporary_registration"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's temporary registration

func UnmarshalPassportElementTemporaryRegistration

func UnmarshalPassportElementTemporaryRegistration(data json.RawMessage) (*PassportElementTemporaryRegistration, error)

func (*PassportElementTemporaryRegistration) GetClass

func (*PassportElementTemporaryRegistration) GetType

func (*PassportElementTemporaryRegistration) MarshalJSON

func (entity *PassportElementTemporaryRegistration) MarshalJSON() ([]byte, error)

func (*PassportElementTemporaryRegistration) PassportElementType

func (*PassportElementTemporaryRegistration) PassportElementType() string

type PassportElementType

type PassportElementType interface {
	PassportElementTypeType() string
}

Contains the type of a Telegram Passport element

func UnmarshalListOfPassportElementType

func UnmarshalListOfPassportElementType(dataList []json.RawMessage) ([]PassportElementType, error)

func UnmarshalPassportElementType

func UnmarshalPassportElementType(data json.RawMessage) (PassportElementType, error)

type PassportElementTypeAddress

type PassportElementTypeAddress struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's address

func UnmarshalPassportElementTypeAddress

func UnmarshalPassportElementTypeAddress(data json.RawMessage) (*PassportElementTypeAddress, error)

func (*PassportElementTypeAddress) GetClass

func (*PassportElementTypeAddress) GetClass() string

func (*PassportElementTypeAddress) GetType

func (*PassportElementTypeAddress) MarshalJSON

func (entity *PassportElementTypeAddress) MarshalJSON() ([]byte, error)

func (*PassportElementTypeAddress) PassportElementTypeType

func (*PassportElementTypeAddress) PassportElementTypeType() string

type PassportElementTypeBankStatement

type PassportElementTypeBankStatement struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's bank statement

func UnmarshalPassportElementTypeBankStatement

func UnmarshalPassportElementTypeBankStatement(data json.RawMessage) (*PassportElementTypeBankStatement, error)

func (*PassportElementTypeBankStatement) GetClass

func (*PassportElementTypeBankStatement) GetType

func (*PassportElementTypeBankStatement) MarshalJSON

func (entity *PassportElementTypeBankStatement) MarshalJSON() ([]byte, error)

func (*PassportElementTypeBankStatement) PassportElementTypeType

func (*PassportElementTypeBankStatement) PassportElementTypeType() string

type PassportElementTypeDriverLicense

type PassportElementTypeDriverLicense struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's driver license

func UnmarshalPassportElementTypeDriverLicense

func UnmarshalPassportElementTypeDriverLicense(data json.RawMessage) (*PassportElementTypeDriverLicense, error)

func (*PassportElementTypeDriverLicense) GetClass

func (*PassportElementTypeDriverLicense) GetType

func (*PassportElementTypeDriverLicense) MarshalJSON

func (entity *PassportElementTypeDriverLicense) MarshalJSON() ([]byte, error)

func (*PassportElementTypeDriverLicense) PassportElementTypeType

func (*PassportElementTypeDriverLicense) PassportElementTypeType() string

type PassportElementTypeEmailAddress

type PassportElementTypeEmailAddress struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's email address

func UnmarshalPassportElementTypeEmailAddress

func UnmarshalPassportElementTypeEmailAddress(data json.RawMessage) (*PassportElementTypeEmailAddress, error)

func (*PassportElementTypeEmailAddress) GetClass

func (*PassportElementTypeEmailAddress) GetType

func (*PassportElementTypeEmailAddress) MarshalJSON

func (entity *PassportElementTypeEmailAddress) MarshalJSON() ([]byte, error)

func (*PassportElementTypeEmailAddress) PassportElementTypeType

func (*PassportElementTypeEmailAddress) PassportElementTypeType() string

type PassportElementTypeIdentityCard

type PassportElementTypeIdentityCard struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's identity card

func UnmarshalPassportElementTypeIdentityCard

func UnmarshalPassportElementTypeIdentityCard(data json.RawMessage) (*PassportElementTypeIdentityCard, error)

func (*PassportElementTypeIdentityCard) GetClass

func (*PassportElementTypeIdentityCard) GetType

func (*PassportElementTypeIdentityCard) MarshalJSON

func (entity *PassportElementTypeIdentityCard) MarshalJSON() ([]byte, error)

func (*PassportElementTypeIdentityCard) PassportElementTypeType

func (*PassportElementTypeIdentityCard) PassportElementTypeType() string

type PassportElementTypeInternalPassport

type PassportElementTypeInternalPassport struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's internal passport

func UnmarshalPassportElementTypeInternalPassport

func UnmarshalPassportElementTypeInternalPassport(data json.RawMessage) (*PassportElementTypeInternalPassport, error)

func (*PassportElementTypeInternalPassport) GetClass

func (*PassportElementTypeInternalPassport) GetType

func (*PassportElementTypeInternalPassport) MarshalJSON

func (entity *PassportElementTypeInternalPassport) MarshalJSON() ([]byte, error)

func (*PassportElementTypeInternalPassport) PassportElementTypeType

func (*PassportElementTypeInternalPassport) PassportElementTypeType() string

type PassportElementTypePassport

type PassportElementTypePassport struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's passport

func UnmarshalPassportElementTypePassport

func UnmarshalPassportElementTypePassport(data json.RawMessage) (*PassportElementTypePassport, error)

func (*PassportElementTypePassport) GetClass

func (*PassportElementTypePassport) GetClass() string

func (*PassportElementTypePassport) GetType

func (*PassportElementTypePassport) MarshalJSON

func (entity *PassportElementTypePassport) MarshalJSON() ([]byte, error)

func (*PassportElementTypePassport) PassportElementTypeType

func (*PassportElementTypePassport) PassportElementTypeType() string

type PassportElementTypePassportRegistration

type PassportElementTypePassportRegistration struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the registration page of the user's passport

func UnmarshalPassportElementTypePassportRegistration

func UnmarshalPassportElementTypePassportRegistration(data json.RawMessage) (*PassportElementTypePassportRegistration, error)

func (*PassportElementTypePassportRegistration) GetClass

func (*PassportElementTypePassportRegistration) GetType

func (*PassportElementTypePassportRegistration) MarshalJSON

func (entity *PassportElementTypePassportRegistration) MarshalJSON() ([]byte, error)

func (*PassportElementTypePassportRegistration) PassportElementTypeType

func (*PassportElementTypePassportRegistration) PassportElementTypeType() string

type PassportElementTypePersonalDetails

type PassportElementTypePersonalDetails struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's personal details

func UnmarshalPassportElementTypePersonalDetails

func UnmarshalPassportElementTypePersonalDetails(data json.RawMessage) (*PassportElementTypePersonalDetails, error)

func (*PassportElementTypePersonalDetails) GetClass

func (*PassportElementTypePersonalDetails) GetType

func (*PassportElementTypePersonalDetails) MarshalJSON

func (entity *PassportElementTypePersonalDetails) MarshalJSON() ([]byte, error)

func (*PassportElementTypePersonalDetails) PassportElementTypeType

func (*PassportElementTypePersonalDetails) PassportElementTypeType() string

type PassportElementTypePhoneNumber

type PassportElementTypePhoneNumber struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's phone number

func UnmarshalPassportElementTypePhoneNumber

func UnmarshalPassportElementTypePhoneNumber(data json.RawMessage) (*PassportElementTypePhoneNumber, error)

func (*PassportElementTypePhoneNumber) GetClass

func (*PassportElementTypePhoneNumber) GetType

func (*PassportElementTypePhoneNumber) MarshalJSON

func (entity *PassportElementTypePhoneNumber) MarshalJSON() ([]byte, error)

func (*PassportElementTypePhoneNumber) PassportElementTypeType

func (*PassportElementTypePhoneNumber) PassportElementTypeType() string

type PassportElementTypeRentalAgreement

type PassportElementTypeRentalAgreement struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's rental agreement

func UnmarshalPassportElementTypeRentalAgreement

func UnmarshalPassportElementTypeRentalAgreement(data json.RawMessage) (*PassportElementTypeRentalAgreement, error)

func (*PassportElementTypeRentalAgreement) GetClass

func (*PassportElementTypeRentalAgreement) GetType

func (*PassportElementTypeRentalAgreement) MarshalJSON

func (entity *PassportElementTypeRentalAgreement) MarshalJSON() ([]byte, error)

func (*PassportElementTypeRentalAgreement) PassportElementTypeType

func (*PassportElementTypeRentalAgreement) PassportElementTypeType() string

type PassportElementTypeTemporaryRegistration

type PassportElementTypeTemporaryRegistration struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's temporary registration

func UnmarshalPassportElementTypeTemporaryRegistration

func UnmarshalPassportElementTypeTemporaryRegistration(data json.RawMessage) (*PassportElementTypeTemporaryRegistration, error)

func (*PassportElementTypeTemporaryRegistration) GetClass

func (*PassportElementTypeTemporaryRegistration) GetType

func (*PassportElementTypeTemporaryRegistration) MarshalJSON

func (entity *PassportElementTypeTemporaryRegistration) MarshalJSON() ([]byte, error)

func (*PassportElementTypeTemporaryRegistration) PassportElementTypeType

func (*PassportElementTypeTemporaryRegistration) PassportElementTypeType() string

type PassportElementTypeUtilityBill

type PassportElementTypeUtilityBill struct {
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's utility bill

func UnmarshalPassportElementTypeUtilityBill

func UnmarshalPassportElementTypeUtilityBill(data json.RawMessage) (*PassportElementTypeUtilityBill, error)

func (*PassportElementTypeUtilityBill) GetClass

func (*PassportElementTypeUtilityBill) GetType

func (*PassportElementTypeUtilityBill) MarshalJSON

func (entity *PassportElementTypeUtilityBill) MarshalJSON() ([]byte, error)

func (*PassportElementTypeUtilityBill) PassportElementTypeType

func (*PassportElementTypeUtilityBill) PassportElementTypeType() string

type PassportElementUtilityBill

type PassportElementUtilityBill struct {

	// Utility bill
	UtilityBill *PersonalDocument `json:"utility_bill"`
	// contains filtered or unexported fields
}

A Telegram Passport element containing the user's utility bill

func UnmarshalPassportElementUtilityBill

func UnmarshalPassportElementUtilityBill(data json.RawMessage) (*PassportElementUtilityBill, error)

func (*PassportElementUtilityBill) GetClass

func (*PassportElementUtilityBill) GetClass() string

func (*PassportElementUtilityBill) GetType

func (*PassportElementUtilityBill) MarshalJSON

func (entity *PassportElementUtilityBill) MarshalJSON() ([]byte, error)

func (*PassportElementUtilityBill) PassportElementType

func (*PassportElementUtilityBill) PassportElementType() string

type PassportElements

type PassportElements struct {

	// Telegram Passport elements
	Elements []PassportElement `json:"elements"`
	// contains filtered or unexported fields
}

Contains information about saved Telegram Passport elements

func UnmarshalPassportElements

func UnmarshalPassportElements(data json.RawMessage) (*PassportElements, error)

func (*PassportElements) GetClass

func (*PassportElements) GetClass() string

func (*PassportElements) GetType

func (*PassportElements) GetType() string

func (*PassportElements) MarshalJSON

func (entity *PassportElements) MarshalJSON() ([]byte, error)

func (*PassportElements) UnmarshalJSON

func (passportElements *PassportElements) UnmarshalJSON(data []byte) error

type PassportElementsWithErrors

type PassportElementsWithErrors struct {

	// Telegram Passport elements
	Elements []PassportElement `json:"elements"`
	// Errors in the elements that are already available
	Errors []*PassportElementError `json:"errors"`
	// contains filtered or unexported fields
}

Contains information about a Telegram Passport elements and corresponding errors

func UnmarshalPassportElementsWithErrors

func UnmarshalPassportElementsWithErrors(data json.RawMessage) (*PassportElementsWithErrors, error)

func (*PassportElementsWithErrors) GetClass

func (*PassportElementsWithErrors) GetClass() string

func (*PassportElementsWithErrors) GetType

func (*PassportElementsWithErrors) MarshalJSON

func (entity *PassportElementsWithErrors) MarshalJSON() ([]byte, error)

func (*PassportElementsWithErrors) UnmarshalJSON

func (passportElementsWithErrors *PassportElementsWithErrors) UnmarshalJSON(data []byte) error

type PassportRequiredElement

type PassportRequiredElement struct {

	// List of Telegram Passport elements any of which is enough to provide
	SuitableElements []*PassportSuitableElement `json:"suitable_elements"`
	// contains filtered or unexported fields
}

Contains a description of the required Telegram Passport element that was requested by a service

func UnmarshalPassportRequiredElement

func UnmarshalPassportRequiredElement(data json.RawMessage) (*PassportRequiredElement, error)

func (*PassportRequiredElement) GetClass

func (*PassportRequiredElement) GetClass() string

func (*PassportRequiredElement) GetType

func (*PassportRequiredElement) GetType() string

func (*PassportRequiredElement) MarshalJSON

func (entity *PassportRequiredElement) MarshalJSON() ([]byte, error)

type PassportSuitableElement

type PassportSuitableElement struct {

	// Type of the element
	Type PassportElementType `json:"type"`
	// True, if a selfie is required with the identity document
	IsSelfieRequired bool `json:"is_selfie_required"`
	// True, if a certified English translation is required with the document
	IsTranslationRequired bool `json:"is_translation_required"`
	// True, if personal details must include the user's name in the language of their country of residence
	IsNativeNameRequired bool `json:"is_native_name_required"`
	// contains filtered or unexported fields
}

Contains information about a Telegram Passport element that was requested by a service

func UnmarshalPassportSuitableElement

func UnmarshalPassportSuitableElement(data json.RawMessage) (*PassportSuitableElement, error)

func (*PassportSuitableElement) GetClass

func (*PassportSuitableElement) GetClass() string

func (*PassportSuitableElement) GetType

func (*PassportSuitableElement) GetType() string

func (*PassportSuitableElement) MarshalJSON

func (entity *PassportSuitableElement) MarshalJSON() ([]byte, error)

func (*PassportSuitableElement) UnmarshalJSON

func (passportSuitableElement *PassportSuitableElement) UnmarshalJSON(data []byte) error

type PasswordState

type PasswordState struct {

	// True, if a 2-step verification password is set
	HasPassword bool `json:"has_password"`
	// Hint for the password; may be empty
	PasswordHint string `json:"password_hint"`
	// True, if a recovery email is set
	HasRecoveryEmailAddress bool `json:"has_recovery_email_address"`
	// True, if some Telegram Passport elements were saved
	HasPassportData bool `json:"has_passport_data"`
	// Information about the recovery email address to which the confirmation email was sent; may be null
	RecoveryEmailAddressCodeInfo *EmailAddressAuthenticationCodeInfo `json:"recovery_email_address_code_info"`
	// If not 0, point in time (Unix timestamp) after which the password can be reset immediately using resetPassword
	PendingResetDate int32 `json:"pending_reset_date"`
	// contains filtered or unexported fields
}

Represents the current state of 2-step verification

func UnmarshalPasswordState

func UnmarshalPasswordState(data json.RawMessage) (*PasswordState, error)

func (*PasswordState) GetClass

func (*PasswordState) GetClass() string

func (*PasswordState) GetType

func (*PasswordState) GetType() string

func (*PasswordState) MarshalJSON

func (entity *PasswordState) MarshalJSON() ([]byte, error)

type PaymentForm

type PaymentForm struct {

	// The payment form identifier
	Id JsonInt64 `json:"id"`
	// Full information of the invoice
	Invoice *Invoice `json:"invoice"`
	// Payment form URL
	Url string `json:"url"`
	// User identifier of the seller bot
	SellerBotUserId int64 `json:"seller_bot_user_id"`
	// User identifier of the payment provider bot
	PaymentsProviderUserId int64 `json:"payments_provider_user_id"`
	// Information about the payment provider, if available, to support it natively without the need for opening the URL; may be null
	PaymentsProvider *PaymentsProviderStripe `json:"payments_provider"`
	// Saved server-side order information; may be null
	SavedOrderInfo *OrderInfo `json:"saved_order_info"`
	// Information about saved card credentials; may be null
	SavedCredentials *SavedCredentials `json:"saved_credentials"`
	// True, if the user can choose to save credentials
	CanSaveCredentials bool `json:"can_save_credentials"`
	// True, if the user will be able to save credentials protected by a password they set up
	NeedPassword bool `json:"need_password"`
	// contains filtered or unexported fields
}

Contains information about an invoice payment form

func UnmarshalPaymentForm

func UnmarshalPaymentForm(data json.RawMessage) (*PaymentForm, error)

func (*PaymentForm) GetClass

func (*PaymentForm) GetClass() string

func (*PaymentForm) GetType

func (*PaymentForm) GetType() string

func (*PaymentForm) MarshalJSON

func (entity *PaymentForm) MarshalJSON() ([]byte, error)

type PaymentReceipt

type PaymentReceipt struct {

	// Product title
	Title string `json:"title"`
	// Product description
	Description string `json:"description"`
	// Product photo; may be null
	Photo *Photo `json:"photo"`
	// Point in time (Unix timestamp) when the payment was made
	Date int32 `json:"date"`
	// User identifier of the seller bot
	SellerBotUserId int64 `json:"seller_bot_user_id"`
	// User identifier of the payment provider bot
	PaymentsProviderUserId int64 `json:"payments_provider_user_id"`
	// Information about the invoice
	Invoice *Invoice `json:"invoice"`
	// Order information; may be null
	OrderInfo *OrderInfo `json:"order_info"`
	// Chosen shipping option; may be null
	ShippingOption *ShippingOption `json:"shipping_option"`
	// Title of the saved credentials chosen by the buyer
	CredentialsTitle string `json:"credentials_title"`
	// The amount of tip chosen by the buyer in the smallest units of the currency
	TipAmount int64 `json:"tip_amount"`
	// contains filtered or unexported fields
}

Contains information about a successful payment

func UnmarshalPaymentReceipt

func UnmarshalPaymentReceipt(data json.RawMessage) (*PaymentReceipt, error)

func (*PaymentReceipt) GetClass

func (*PaymentReceipt) GetClass() string

func (*PaymentReceipt) GetType

func (*PaymentReceipt) GetType() string

func (*PaymentReceipt) MarshalJSON

func (entity *PaymentReceipt) MarshalJSON() ([]byte, error)

type PaymentResult

type PaymentResult struct {

	// True, if the payment request was successful; otherwise the verification_url will be non-empty
	Success bool `json:"success"`
	// URL for additional payment credentials verification
	VerificationUrl string `json:"verification_url"`
	// contains filtered or unexported fields
}

Contains the result of a payment request

func UnmarshalPaymentResult

func UnmarshalPaymentResult(data json.RawMessage) (*PaymentResult, error)

func (*PaymentResult) GetClass

func (*PaymentResult) GetClass() string

func (*PaymentResult) GetType

func (*PaymentResult) GetType() string

func (*PaymentResult) MarshalJSON

func (entity *PaymentResult) MarshalJSON() ([]byte, error)

type PaymentsProviderStripe

type PaymentsProviderStripe struct {

	// Stripe API publishable key
	PublishableKey string `json:"publishable_key"`
	// True, if the user country must be provided
	NeedCountry bool `json:"need_country"`
	// True, if the user ZIP/postal code must be provided
	NeedPostalCode bool `json:"need_postal_code"`
	// True, if the cardholder name must be provided
	NeedCardholderName bool `json:"need_cardholder_name"`
	// contains filtered or unexported fields
}

Stripe payment provider

func UnmarshalPaymentsProviderStripe

func UnmarshalPaymentsProviderStripe(data json.RawMessage) (*PaymentsProviderStripe, error)

func (*PaymentsProviderStripe) GetClass

func (*PaymentsProviderStripe) GetClass() string

func (*PaymentsProviderStripe) GetType

func (*PaymentsProviderStripe) GetType() string

func (*PaymentsProviderStripe) MarshalJSON

func (entity *PaymentsProviderStripe) MarshalJSON() ([]byte, error)

type PersonalDetails

type PersonalDetails struct {

	// First name of the user written in English; 1-255 characters
	FirstName string `json:"first_name"`
	// Middle name of the user written in English; 0-255 characters
	MiddleName string `json:"middle_name"`
	// Last name of the user written in English; 1-255 characters
	LastName string `json:"last_name"`
	// Native first name of the user; 1-255 characters
	NativeFirstName string `json:"native_first_name"`
	// Native middle name of the user; 0-255 characters
	NativeMiddleName string `json:"native_middle_name"`
	// Native last name of the user; 1-255 characters
	NativeLastName string `json:"native_last_name"`
	// Birthdate of the user
	Birthdate *Date `json:"birthdate"`
	// Gender of the user, "male" or "female"
	Gender string `json:"gender"`
	// A two-letter ISO 3166-1 alpha-2 country code of the user's country
	CountryCode string `json:"country_code"`
	// A two-letter ISO 3166-1 alpha-2 country code of the user's residence country
	ResidenceCountryCode string `json:"residence_country_code"`
	// contains filtered or unexported fields
}

Contains the user's personal details

func UnmarshalPersonalDetails

func UnmarshalPersonalDetails(data json.RawMessage) (*PersonalDetails, error)

func (*PersonalDetails) GetClass

func (*PersonalDetails) GetClass() string

func (*PersonalDetails) GetType

func (*PersonalDetails) GetType() string

func (*PersonalDetails) MarshalJSON

func (entity *PersonalDetails) MarshalJSON() ([]byte, error)

type PersonalDocument

type PersonalDocument struct {

	// List of files containing the pages of the document
	Files []*DatedFile `json:"files"`
	// List of files containing a certified English translation of the document
	Translation []*DatedFile `json:"translation"`
	// contains filtered or unexported fields
}

A personal document, containing some information about a user

func UnmarshalPersonalDocument

func UnmarshalPersonalDocument(data json.RawMessage) (*PersonalDocument, error)

func (*PersonalDocument) GetClass

func (*PersonalDocument) GetClass() string

func (*PersonalDocument) GetType

func (*PersonalDocument) GetType() string

func (*PersonalDocument) MarshalJSON

func (entity *PersonalDocument) MarshalJSON() ([]byte, error)

type PhoneNumberAuthenticationSettings

type PhoneNumberAuthenticationSettings struct {

	// Pass true if the authentication code may be sent via a flash call to the specified phone number
	AllowFlashCall bool `json:"allow_flash_call"`
	// Pass true if the authentication code may be sent via a missed call to the specified phone number
	AllowMissedCall bool `json:"allow_missed_call"`
	// Pass true if the authenticated phone number is used on the current device
	IsCurrentPhoneNumber bool `json:"is_current_phone_number"`
	// For official applications only. True, if the application can use Android SMS Retriever API (requires Google Play Services >= 10.2) to automatically receive the authentication code from the SMS. See https://developers.google.com/identity/sms-retriever/ for more details
	AllowSmsRetrieverApi bool `json:"allow_sms_retriever_api"`
	// List of up to 20 authentication tokens, recently received in updateOption("authentication_token") in previously logged out sessions
	AuthenticationTokens []string `json:"authentication_tokens"`
	// contains filtered or unexported fields
}

Contains settings for the authentication of the user's phone number

func UnmarshalPhoneNumberAuthenticationSettings

func UnmarshalPhoneNumberAuthenticationSettings(data json.RawMessage) (*PhoneNumberAuthenticationSettings, error)

func (*PhoneNumberAuthenticationSettings) GetClass

func (*PhoneNumberAuthenticationSettings) GetType

func (*PhoneNumberAuthenticationSettings) MarshalJSON

func (entity *PhoneNumberAuthenticationSettings) MarshalJSON() ([]byte, error)

type PhoneNumberInfo

type PhoneNumberInfo struct {

	// Information about the country to which the phone number belongs; may be null
	Country *CountryInfo `json:"country"`
	// The part of the phone number denoting country calling code or its part
	CountryCallingCode string `json:"country_calling_code"`
	// The phone number without country calling code formatted accordingly to local rules. Expected digits are returned as '-', but even more digits might be entered by the user
	FormattedPhoneNumber string `json:"formatted_phone_number"`
	// contains filtered or unexported fields
}

Contains information about a phone number

func UnmarshalPhoneNumberInfo

func UnmarshalPhoneNumberInfo(data json.RawMessage) (*PhoneNumberInfo, error)

func (*PhoneNumberInfo) GetClass

func (*PhoneNumberInfo) GetClass() string

func (*PhoneNumberInfo) GetType

func (*PhoneNumberInfo) GetType() string

func (*PhoneNumberInfo) MarshalJSON

func (entity *PhoneNumberInfo) MarshalJSON() ([]byte, error)

type Photo

type Photo struct {

	// True, if stickers were added to the photo. The list of corresponding sticker sets can be received using getAttachedStickerSets
	HasStickers bool `json:"has_stickers"`
	// Photo minithumbnail; may be null
	Minithumbnail *Minithumbnail `json:"minithumbnail"`
	// Available variants of the photo, in different sizes
	Sizes []*PhotoSize `json:"sizes"`
	// contains filtered or unexported fields
}

Describes a photo

func UnmarshalPhoto

func UnmarshalPhoto(data json.RawMessage) (*Photo, error)

func (*Photo) GetClass

func (*Photo) GetClass() string

func (*Photo) GetType

func (*Photo) GetType() string

func (*Photo) MarshalJSON

func (entity *Photo) MarshalJSON() ([]byte, error)

type PhotoSize

type PhotoSize struct {

	// Image type (see https://core.telegram.org/constructor/photoSize)
	Type string `json:"type"`
	// Information about the image file
	Photo *File `json:"photo"`
	// Image width
	Width int32 `json:"width"`
	// Image height
	Height int32 `json:"height"`
	// Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image; in bytes
	ProgressiveSizes []int32 `json:"progressive_sizes"`
	// contains filtered or unexported fields
}

Describes an image in JPEG format

func UnmarshalPhotoSize

func UnmarshalPhotoSize(data json.RawMessage) (*PhotoSize, error)

func (*PhotoSize) GetClass

func (*PhotoSize) GetClass() string

func (*PhotoSize) GetType

func (*PhotoSize) GetType() string

func (*PhotoSize) MarshalJSON

func (entity *PhotoSize) MarshalJSON() ([]byte, error)

type PinChatMessageRequest

type PinChatMessageRequest struct {
	// Identifier of the chat
	ChatId int64 `json:"chat_id"`
	// Identifier of the new pinned message
	MessageId int64 `json:"message_id"`
	// Pass true to disable notification about the pinned message. Notifications are always disabled in channels and private chats
	DisableNotification bool `json:"disable_notification"`
	// Pass true to pin the message only for self; private chats only
	OnlyForSelf bool `json:"only_for_self"`
}

type PingProxyRequest

type PingProxyRequest struct {
	// Proxy identifier. Use 0 to ping a Telegram server without a proxy
	ProxyId int32 `json:"proxy_id"`
}

type Point added in v1.7.10

type Point struct {

	// The point's first coordinate
	X float64 `json:"x"`
	// The point's second coordinate
	Y float64 `json:"y"`
	// contains filtered or unexported fields
}

A point on a Cartesian plane

func UnmarshalPoint added in v1.7.10

func UnmarshalPoint(data json.RawMessage) (*Point, error)

func (*Point) GetClass added in v1.7.10

func (*Point) GetClass() string

func (*Point) GetType added in v1.7.10

func (*Point) GetType() string

func (*Point) MarshalJSON added in v1.7.10

func (entity *Point) MarshalJSON() ([]byte, error)

type Poll

type Poll struct {

	// Unique poll identifier
	Id JsonInt64 `json:"id"`
	// Poll question; 1-300 characters
	Question string `json:"question"`
	// List of poll answer options
	Options []*PollOption `json:"options"`
	// Total number of voters, participating in the poll
	TotalVoterCount int32 `json:"total_voter_count"`
	// User identifiers of recent voters, if the poll is non-anonymous
	RecentVoterUserIds []int64 `json:"recent_voter_user_ids"`
	// True, if the poll is anonymous
	IsAnonymous bool `json:"is_anonymous"`
	// Type of the poll
	Type PollType `json:"type"`
	// Amount of time the poll will be active after creation, in seconds
	OpenPeriod int32 `json:"open_period"`
	// Point in time (Unix timestamp) when the poll will automatically be closed
	CloseDate int32 `json:"close_date"`
	// True, if the poll is closed
	IsClosed bool `json:"is_closed"`
	// contains filtered or unexported fields
}

Describes a poll

func UnmarshalPoll

func UnmarshalPoll(data json.RawMessage) (*Poll, error)

func (*Poll) GetClass

func (*Poll) GetClass() string

func (*Poll) GetType

func (*Poll) GetType() string

func (*Poll) MarshalJSON

func (entity *Poll) MarshalJSON() ([]byte, error)

func (*Poll) UnmarshalJSON

func (poll *Poll) UnmarshalJSON(data []byte) error

type PollOption

type PollOption struct {

	// Option text; 1-100 characters
	Text string `json:"text"`
	// Number of voters for this option, available only for closed or voted polls
	VoterCount int32 `json:"voter_count"`
	// The percentage of votes for this option; 0-100
	VotePercentage int32 `json:"vote_percentage"`
	// True, if the option was chosen by the user
	IsChosen bool `json:"is_chosen"`
	// True, if the option is being chosen by a pending setPollAnswer request
	IsBeingChosen bool `json:"is_being_chosen"`
	// contains filtered or unexported fields
}

Describes one answer option of a poll

func UnmarshalPollOption

func UnmarshalPollOption(data json.RawMessage) (*PollOption, error)

func (*PollOption) GetClass

func (*PollOption) GetClass() string

func (*PollOption) GetType

func (*PollOption) GetType() string

func (*PollOption) MarshalJSON

func (entity *PollOption) MarshalJSON() ([]byte, error)

type PollType

type PollType interface {
	PollTypeType() string
}

Describes the type of a poll

func UnmarshalListOfPollType

func UnmarshalListOfPollType(dataList []json.RawMessage) ([]PollType, error)

func UnmarshalPollType

func UnmarshalPollType(data json.RawMessage) (PollType, error)

type PollTypeQuiz

type PollTypeQuiz struct {

	// 0-based identifier of the correct answer option; -1 for a yet unanswered poll
	CorrectOptionId int32 `json:"correct_option_id"`
	// Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; 0-200 characters with at most 2 line feeds; empty for a yet unanswered poll
	Explanation *FormattedText `json:"explanation"`
	// contains filtered or unexported fields
}

A poll in quiz mode, which has exactly one correct answer option and can be answered only once

func UnmarshalPollTypeQuiz

func UnmarshalPollTypeQuiz(data json.RawMessage) (*PollTypeQuiz, error)

func (*PollTypeQuiz) GetClass

func (*PollTypeQuiz) GetClass() string

func (*PollTypeQuiz) GetType

func (*PollTypeQuiz) GetType() string

func (*PollTypeQuiz) MarshalJSON

func (entity *PollTypeQuiz) MarshalJSON() ([]byte, error)

func (*PollTypeQuiz) PollTypeType

func (*PollTypeQuiz) PollTypeType() string

type PollTypeRegular

type PollTypeRegular struct {

	// True, if multiple answer options can be chosen simultaneously
	AllowMultipleAnswers bool `json:"allow_multiple_answers"`
	// contains filtered or unexported fields
}

A regular poll

func UnmarshalPollTypeRegular

func UnmarshalPollTypeRegular(data json.RawMessage) (*PollTypeRegular, error)

func (*PollTypeRegular) GetClass

func (*PollTypeRegular) GetClass() string

func (*PollTypeRegular) GetType

func (*PollTypeRegular) GetType() string

func (*PollTypeRegular) MarshalJSON

func (entity *PollTypeRegular) MarshalJSON() ([]byte, error)

func (*PollTypeRegular) PollTypeType

func (*PollTypeRegular) PollTypeType() string

type ProcessChatJoinRequestRequest added in v1.7.10

type ProcessChatJoinRequestRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the user that sent the request
	UserId int64 `json:"user_id"`
	// Pass true to approve the request; pass false to decline it
	Approve bool `json:"approve"`
}

type ProcessChatJoinRequestsRequest added in v1.7.10

type ProcessChatJoinRequestsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Invite link for which to process join requests. If empty, all join requests will be processed. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links
	InviteLink string `json:"invite_link"`
	// Pass true to approve all requests; pass false to decline them
	Approve bool `json:"approve"`
}

type ProcessPushNotificationRequest

type ProcessPushNotificationRequest struct {
	// JSON-encoded push notification payload with all fields sent by the server, and "google.sent_time" and "google.notification.sound" fields added
	Payload string `json:"payload"`
}

type ProfilePhoto

type ProfilePhoto struct {

	// Photo identifier; 0 for an empty photo. Can be used to find a photo in a list of user profile photos
	Id JsonInt64 `json:"id"`
	// A small (160x160) user profile photo. The file can be downloaded only before the photo is changed
	Small *File `json:"small"`
	// A big (640x640) user profile photo. The file can be downloaded only before the photo is changed
	Big *File `json:"big"`
	// User profile photo minithumbnail; may be null
	Minithumbnail *Minithumbnail `json:"minithumbnail"`
	// True, if the photo has animated variant
	HasAnimation bool `json:"has_animation"`
	// contains filtered or unexported fields
}

Describes a user profile photo

func UnmarshalProfilePhoto

func UnmarshalProfilePhoto(data json.RawMessage) (*ProfilePhoto, error)

func (*ProfilePhoto) GetClass

func (*ProfilePhoto) GetClass() string

func (*ProfilePhoto) GetType

func (*ProfilePhoto) GetType() string

func (*ProfilePhoto) MarshalJSON

func (entity *ProfilePhoto) MarshalJSON() ([]byte, error)

type Proxies

type Proxies struct {

	// List of proxy servers
	Proxies []*Proxy `json:"proxies"`
	// contains filtered or unexported fields
}

Represents a list of proxy servers

func UnmarshalProxies

func UnmarshalProxies(data json.RawMessage) (*Proxies, error)

func (*Proxies) GetClass

func (*Proxies) GetClass() string

func (*Proxies) GetType

func (*Proxies) GetType() string

func (*Proxies) MarshalJSON

func (entity *Proxies) MarshalJSON() ([]byte, error)

type Proxy

type Proxy struct {

	// Unique identifier of the proxy
	Id int32 `json:"id"`
	// Proxy server IP address
	Server string `json:"server"`
	// Proxy server port
	Port int32 `json:"port"`
	// Point in time (Unix timestamp) when the proxy was last used; 0 if never
	LastUsedDate int32 `json:"last_used_date"`
	// True, if the proxy is enabled now
	IsEnabled bool `json:"is_enabled"`
	// Type of the proxy
	Type ProxyType `json:"type"`
	// contains filtered or unexported fields
}

Contains information about a proxy server

func UnmarshalProxy

func UnmarshalProxy(data json.RawMessage) (*Proxy, error)

func (*Proxy) GetClass

func (*Proxy) GetClass() string

func (*Proxy) GetType

func (*Proxy) GetType() string

func (*Proxy) MarshalJSON

func (entity *Proxy) MarshalJSON() ([]byte, error)

func (*Proxy) UnmarshalJSON

func (proxy *Proxy) UnmarshalJSON(data []byte) error

type ProxyType

type ProxyType interface {
	ProxyTypeType() string
}

Describes the type of a proxy server

func UnmarshalListOfProxyType

func UnmarshalListOfProxyType(dataList []json.RawMessage) ([]ProxyType, error)

func UnmarshalProxyType

func UnmarshalProxyType(data json.RawMessage) (ProxyType, error)

type ProxyTypeHttp

type ProxyTypeHttp struct {

	// Username for logging in; may be empty
	Username string `json:"username"`
	// Password for logging in; may be empty
	Password string `json:"password"`
	// Pass true if the proxy supports only HTTP requests and doesn't support transparent TCP connections via HTTP CONNECT method
	HttpOnly bool `json:"http_only"`
	// contains filtered or unexported fields
}

A HTTP transparent proxy server

func UnmarshalProxyTypeHttp

func UnmarshalProxyTypeHttp(data json.RawMessage) (*ProxyTypeHttp, error)

func (*ProxyTypeHttp) GetClass

func (*ProxyTypeHttp) GetClass() string

func (*ProxyTypeHttp) GetType

func (*ProxyTypeHttp) GetType() string

func (*ProxyTypeHttp) MarshalJSON

func (entity *ProxyTypeHttp) MarshalJSON() ([]byte, error)

func (*ProxyTypeHttp) ProxyTypeType

func (*ProxyTypeHttp) ProxyTypeType() string

type ProxyTypeMtproto

type ProxyTypeMtproto struct {

	// The proxy's secret in hexadecimal encoding
	Secret string `json:"secret"`
	// contains filtered or unexported fields
}

An MTProto proxy server

func UnmarshalProxyTypeMtproto

func UnmarshalProxyTypeMtproto(data json.RawMessage) (*ProxyTypeMtproto, error)

func (*ProxyTypeMtproto) GetClass

func (*ProxyTypeMtproto) GetClass() string

func (*ProxyTypeMtproto) GetType

func (*ProxyTypeMtproto) GetType() string

func (*ProxyTypeMtproto) MarshalJSON

func (entity *ProxyTypeMtproto) MarshalJSON() ([]byte, error)

func (*ProxyTypeMtproto) ProxyTypeType

func (*ProxyTypeMtproto) ProxyTypeType() string

type ProxyTypeSocks5

type ProxyTypeSocks5 struct {

	// Username for logging in; may be empty
	Username string `json:"username"`
	// Password for logging in; may be empty
	Password string `json:"password"`
	// contains filtered or unexported fields
}

A SOCKS5 proxy server

func UnmarshalProxyTypeSocks5

func UnmarshalProxyTypeSocks5(data json.RawMessage) (*ProxyTypeSocks5, error)

func (*ProxyTypeSocks5) GetClass

func (*ProxyTypeSocks5) GetClass() string

func (*ProxyTypeSocks5) GetType

func (*ProxyTypeSocks5) GetType() string

func (*ProxyTypeSocks5) MarshalJSON

func (entity *ProxyTypeSocks5) MarshalJSON() ([]byte, error)

func (*ProxyTypeSocks5) ProxyTypeType

func (*ProxyTypeSocks5) ProxyTypeType() string

type PublicChatType

type PublicChatType interface {
	PublicChatTypeType() string
}

Describes a type of public chats

func UnmarshalListOfPublicChatType

func UnmarshalListOfPublicChatType(dataList []json.RawMessage) ([]PublicChatType, error)

func UnmarshalPublicChatType

func UnmarshalPublicChatType(data json.RawMessage) (PublicChatType, error)

type PublicChatTypeHasUsername

type PublicChatTypeHasUsername struct {
	// contains filtered or unexported fields
}

The chat is public, because it has username

func UnmarshalPublicChatTypeHasUsername

func UnmarshalPublicChatTypeHasUsername(data json.RawMessage) (*PublicChatTypeHasUsername, error)

func (*PublicChatTypeHasUsername) GetClass

func (*PublicChatTypeHasUsername) GetClass() string

func (*PublicChatTypeHasUsername) GetType

func (*PublicChatTypeHasUsername) GetType() string

func (*PublicChatTypeHasUsername) MarshalJSON

func (entity *PublicChatTypeHasUsername) MarshalJSON() ([]byte, error)

func (*PublicChatTypeHasUsername) PublicChatTypeType

func (*PublicChatTypeHasUsername) PublicChatTypeType() string

type PublicChatTypeIsLocationBased

type PublicChatTypeIsLocationBased struct {
	// contains filtered or unexported fields
}

The chat is public, because it is a location-based supergroup

func UnmarshalPublicChatTypeIsLocationBased

func UnmarshalPublicChatTypeIsLocationBased(data json.RawMessage) (*PublicChatTypeIsLocationBased, error)

func (*PublicChatTypeIsLocationBased) GetClass

func (*PublicChatTypeIsLocationBased) GetType

func (*PublicChatTypeIsLocationBased) MarshalJSON

func (entity *PublicChatTypeIsLocationBased) MarshalJSON() ([]byte, error)

func (*PublicChatTypeIsLocationBased) PublicChatTypeType

func (*PublicChatTypeIsLocationBased) PublicChatTypeType() string

type PushMessageContent

type PushMessageContent interface {
	PushMessageContentType() string
}

Contains content of a push message notification

func UnmarshalListOfPushMessageContent

func UnmarshalListOfPushMessageContent(dataList []json.RawMessage) ([]PushMessageContent, error)

func UnmarshalPushMessageContent

func UnmarshalPushMessageContent(data json.RawMessage) (PushMessageContent, error)

type PushMessageContentAnimation

type PushMessageContentAnimation struct {

	// Message content; may be null
	Animation *Animation `json:"animation"`
	// Animation caption
	Caption string `json:"caption"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

An animation message (GIF-style).

func UnmarshalPushMessageContentAnimation

func UnmarshalPushMessageContentAnimation(data json.RawMessage) (*PushMessageContentAnimation, error)

func (*PushMessageContentAnimation) GetClass

func (*PushMessageContentAnimation) GetClass() string

func (*PushMessageContentAnimation) GetType

func (*PushMessageContentAnimation) MarshalJSON

func (entity *PushMessageContentAnimation) MarshalJSON() ([]byte, error)

func (*PushMessageContentAnimation) PushMessageContentType

func (*PushMessageContentAnimation) PushMessageContentType() string

type PushMessageContentAudio

type PushMessageContentAudio struct {

	// Message content; may be null
	Audio *Audio `json:"audio"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

An audio message

func UnmarshalPushMessageContentAudio

func UnmarshalPushMessageContentAudio(data json.RawMessage) (*PushMessageContentAudio, error)

func (*PushMessageContentAudio) GetClass

func (*PushMessageContentAudio) GetClass() string

func (*PushMessageContentAudio) GetType

func (*PushMessageContentAudio) GetType() string

func (*PushMessageContentAudio) MarshalJSON

func (entity *PushMessageContentAudio) MarshalJSON() ([]byte, error)

func (*PushMessageContentAudio) PushMessageContentType

func (*PushMessageContentAudio) PushMessageContentType() string

type PushMessageContentBasicGroupChatCreate

type PushMessageContentBasicGroupChatCreate struct {
	// contains filtered or unexported fields
}

A newly created basic group

func UnmarshalPushMessageContentBasicGroupChatCreate

func UnmarshalPushMessageContentBasicGroupChatCreate(data json.RawMessage) (*PushMessageContentBasicGroupChatCreate, error)

func (*PushMessageContentBasicGroupChatCreate) GetClass

func (*PushMessageContentBasicGroupChatCreate) GetType

func (*PushMessageContentBasicGroupChatCreate) MarshalJSON

func (entity *PushMessageContentBasicGroupChatCreate) MarshalJSON() ([]byte, error)

func (*PushMessageContentBasicGroupChatCreate) PushMessageContentType

func (*PushMessageContentBasicGroupChatCreate) PushMessageContentType() string

type PushMessageContentChatAddMembers

type PushMessageContentChatAddMembers struct {

	// Name of the added member
	MemberName string `json:"member_name"`
	// True, if the current user was added to the group
	IsCurrentUser bool `json:"is_current_user"`
	// True, if the user has returned to the group themselves
	IsReturned bool `json:"is_returned"`
	// contains filtered or unexported fields
}

New chat members were invited to a group

func UnmarshalPushMessageContentChatAddMembers

func UnmarshalPushMessageContentChatAddMembers(data json.RawMessage) (*PushMessageContentChatAddMembers, error)

func (*PushMessageContentChatAddMembers) GetClass

func (*PushMessageContentChatAddMembers) GetType

func (*PushMessageContentChatAddMembers) MarshalJSON

func (entity *PushMessageContentChatAddMembers) MarshalJSON() ([]byte, error)

func (*PushMessageContentChatAddMembers) PushMessageContentType

func (*PushMessageContentChatAddMembers) PushMessageContentType() string

type PushMessageContentChatChangePhoto

type PushMessageContentChatChangePhoto struct {
	// contains filtered or unexported fields
}

A chat photo was edited

func UnmarshalPushMessageContentChatChangePhoto

func UnmarshalPushMessageContentChatChangePhoto(data json.RawMessage) (*PushMessageContentChatChangePhoto, error)

func (*PushMessageContentChatChangePhoto) GetClass

func (*PushMessageContentChatChangePhoto) GetType

func (*PushMessageContentChatChangePhoto) MarshalJSON

func (entity *PushMessageContentChatChangePhoto) MarshalJSON() ([]byte, error)

func (*PushMessageContentChatChangePhoto) PushMessageContentType

func (*PushMessageContentChatChangePhoto) PushMessageContentType() string

type PushMessageContentChatChangeTitle

type PushMessageContentChatChangeTitle struct {

	// New chat title
	Title string `json:"title"`
	// contains filtered or unexported fields
}

A chat title was edited

func UnmarshalPushMessageContentChatChangeTitle

func UnmarshalPushMessageContentChatChangeTitle(data json.RawMessage) (*PushMessageContentChatChangeTitle, error)

func (*PushMessageContentChatChangeTitle) GetClass

func (*PushMessageContentChatChangeTitle) GetType

func (*PushMessageContentChatChangeTitle) MarshalJSON

func (entity *PushMessageContentChatChangeTitle) MarshalJSON() ([]byte, error)

func (*PushMessageContentChatChangeTitle) PushMessageContentType

func (*PushMessageContentChatChangeTitle) PushMessageContentType() string

type PushMessageContentChatDeleteMember

type PushMessageContentChatDeleteMember struct {

	// Name of the deleted member
	MemberName string `json:"member_name"`
	// True, if the current user was deleted from the group
	IsCurrentUser bool `json:"is_current_user"`
	// True, if the user has left the group themselves
	IsLeft bool `json:"is_left"`
	// contains filtered or unexported fields
}

A chat member was deleted

func UnmarshalPushMessageContentChatDeleteMember

func UnmarshalPushMessageContentChatDeleteMember(data json.RawMessage) (*PushMessageContentChatDeleteMember, error)

func (*PushMessageContentChatDeleteMember) GetClass

func (*PushMessageContentChatDeleteMember) GetType

func (*PushMessageContentChatDeleteMember) MarshalJSON

func (entity *PushMessageContentChatDeleteMember) MarshalJSON() ([]byte, error)

func (*PushMessageContentChatDeleteMember) PushMessageContentType

func (*PushMessageContentChatDeleteMember) PushMessageContentType() string
type PushMessageContentChatJoinByLink struct {
	// contains filtered or unexported fields
}

A new member joined the chat via an invite link

func UnmarshalPushMessageContentChatJoinByLink(data json.RawMessage) (*PushMessageContentChatJoinByLink, error)

func (*PushMessageContentChatJoinByLink) GetClass

func (*PushMessageContentChatJoinByLink) GetType

func (*PushMessageContentChatJoinByLink) MarshalJSON

func (entity *PushMessageContentChatJoinByLink) MarshalJSON() ([]byte, error)

func (*PushMessageContentChatJoinByLink) PushMessageContentType

func (*PushMessageContentChatJoinByLink) PushMessageContentType() string

type PushMessageContentChatJoinByRequest added in v1.7.10

type PushMessageContentChatJoinByRequest struct {
	// contains filtered or unexported fields
}

A new member was accepted to the chat by an administrator

func UnmarshalPushMessageContentChatJoinByRequest added in v1.7.10

func UnmarshalPushMessageContentChatJoinByRequest(data json.RawMessage) (*PushMessageContentChatJoinByRequest, error)

func (*PushMessageContentChatJoinByRequest) GetClass added in v1.7.10

func (*PushMessageContentChatJoinByRequest) GetType added in v1.7.10

func (*PushMessageContentChatJoinByRequest) MarshalJSON added in v1.7.10

func (entity *PushMessageContentChatJoinByRequest) MarshalJSON() ([]byte, error)

func (*PushMessageContentChatJoinByRequest) PushMessageContentType added in v1.7.10

func (*PushMessageContentChatJoinByRequest) PushMessageContentType() string

type PushMessageContentChatSetTheme added in v1.7.10

type PushMessageContentChatSetTheme struct {

	// If non-empty, name of a new theme, set for the chat. Otherwise chat theme was reset to the default one
	ThemeName string `json:"theme_name"`
	// contains filtered or unexported fields
}

A chat theme was edited

func UnmarshalPushMessageContentChatSetTheme added in v1.7.10

func UnmarshalPushMessageContentChatSetTheme(data json.RawMessage) (*PushMessageContentChatSetTheme, error)

func (*PushMessageContentChatSetTheme) GetClass added in v1.7.10

func (*PushMessageContentChatSetTheme) GetType added in v1.7.10

func (*PushMessageContentChatSetTheme) MarshalJSON added in v1.7.10

func (entity *PushMessageContentChatSetTheme) MarshalJSON() ([]byte, error)

func (*PushMessageContentChatSetTheme) PushMessageContentType added in v1.7.10

func (*PushMessageContentChatSetTheme) PushMessageContentType() string

type PushMessageContentContact

type PushMessageContentContact struct {

	// Contact's name
	Name string `json:"name"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A message with a user contact

func UnmarshalPushMessageContentContact

func UnmarshalPushMessageContentContact(data json.RawMessage) (*PushMessageContentContact, error)

func (*PushMessageContentContact) GetClass

func (*PushMessageContentContact) GetClass() string

func (*PushMessageContentContact) GetType

func (*PushMessageContentContact) GetType() string

func (*PushMessageContentContact) MarshalJSON

func (entity *PushMessageContentContact) MarshalJSON() ([]byte, error)

func (*PushMessageContentContact) PushMessageContentType

func (*PushMessageContentContact) PushMessageContentType() string

type PushMessageContentContactRegistered

type PushMessageContentContactRegistered struct {
	// contains filtered or unexported fields
}

A contact has registered with Telegram

func UnmarshalPushMessageContentContactRegistered

func UnmarshalPushMessageContentContactRegistered(data json.RawMessage) (*PushMessageContentContactRegistered, error)

func (*PushMessageContentContactRegistered) GetClass

func (*PushMessageContentContactRegistered) GetType

func (*PushMessageContentContactRegistered) MarshalJSON

func (entity *PushMessageContentContactRegistered) MarshalJSON() ([]byte, error)

func (*PushMessageContentContactRegistered) PushMessageContentType

func (*PushMessageContentContactRegistered) PushMessageContentType() string

type PushMessageContentDocument

type PushMessageContentDocument struct {

	// Message content; may be null
	Document *Document `json:"document"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A document message (a general file)

func UnmarshalPushMessageContentDocument

func UnmarshalPushMessageContentDocument(data json.RawMessage) (*PushMessageContentDocument, error)

func (*PushMessageContentDocument) GetClass

func (*PushMessageContentDocument) GetClass() string

func (*PushMessageContentDocument) GetType

func (*PushMessageContentDocument) MarshalJSON

func (entity *PushMessageContentDocument) MarshalJSON() ([]byte, error)

func (*PushMessageContentDocument) PushMessageContentType

func (*PushMessageContentDocument) PushMessageContentType() string

type PushMessageContentGame

type PushMessageContentGame struct {

	// Game title, empty for pinned game message
	Title string `json:"title"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A message with a game

func UnmarshalPushMessageContentGame

func UnmarshalPushMessageContentGame(data json.RawMessage) (*PushMessageContentGame, error)

func (*PushMessageContentGame) GetClass

func (*PushMessageContentGame) GetClass() string

func (*PushMessageContentGame) GetType

func (*PushMessageContentGame) GetType() string

func (*PushMessageContentGame) MarshalJSON

func (entity *PushMessageContentGame) MarshalJSON() ([]byte, error)

func (*PushMessageContentGame) PushMessageContentType

func (*PushMessageContentGame) PushMessageContentType() string

type PushMessageContentGameScore

type PushMessageContentGameScore struct {

	// Game title, empty for pinned message
	Title string `json:"title"`
	// New score, 0 for pinned message
	Score int32 `json:"score"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A new high score was achieved in a game

func UnmarshalPushMessageContentGameScore

func UnmarshalPushMessageContentGameScore(data json.RawMessage) (*PushMessageContentGameScore, error)

func (*PushMessageContentGameScore) GetClass

func (*PushMessageContentGameScore) GetClass() string

func (*PushMessageContentGameScore) GetType

func (*PushMessageContentGameScore) MarshalJSON

func (entity *PushMessageContentGameScore) MarshalJSON() ([]byte, error)

func (*PushMessageContentGameScore) PushMessageContentType

func (*PushMessageContentGameScore) PushMessageContentType() string

type PushMessageContentHidden

type PushMessageContentHidden struct {

	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A general message with hidden content

func UnmarshalPushMessageContentHidden

func UnmarshalPushMessageContentHidden(data json.RawMessage) (*PushMessageContentHidden, error)

func (*PushMessageContentHidden) GetClass

func (*PushMessageContentHidden) GetClass() string

func (*PushMessageContentHidden) GetType

func (*PushMessageContentHidden) GetType() string

func (*PushMessageContentHidden) MarshalJSON

func (entity *PushMessageContentHidden) MarshalJSON() ([]byte, error)

func (*PushMessageContentHidden) PushMessageContentType

func (*PushMessageContentHidden) PushMessageContentType() string

type PushMessageContentInvoice

type PushMessageContentInvoice struct {

	// Product price
	Price string `json:"price"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A message with an invoice from a bot

func UnmarshalPushMessageContentInvoice

func UnmarshalPushMessageContentInvoice(data json.RawMessage) (*PushMessageContentInvoice, error)

func (*PushMessageContentInvoice) GetClass

func (*PushMessageContentInvoice) GetClass() string

func (*PushMessageContentInvoice) GetType

func (*PushMessageContentInvoice) GetType() string

func (*PushMessageContentInvoice) MarshalJSON

func (entity *PushMessageContentInvoice) MarshalJSON() ([]byte, error)

func (*PushMessageContentInvoice) PushMessageContentType

func (*PushMessageContentInvoice) PushMessageContentType() string

type PushMessageContentLocation

type PushMessageContentLocation struct {

	// True, if the location is live
	IsLive bool `json:"is_live"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A message with a location

func UnmarshalPushMessageContentLocation

func UnmarshalPushMessageContentLocation(data json.RawMessage) (*PushMessageContentLocation, error)

func (*PushMessageContentLocation) GetClass

func (*PushMessageContentLocation) GetClass() string

func (*PushMessageContentLocation) GetType

func (*PushMessageContentLocation) MarshalJSON

func (entity *PushMessageContentLocation) MarshalJSON() ([]byte, error)

func (*PushMessageContentLocation) PushMessageContentType

func (*PushMessageContentLocation) PushMessageContentType() string

type PushMessageContentMediaAlbum

type PushMessageContentMediaAlbum struct {

	// Number of messages in the album
	TotalCount int32 `json:"total_count"`
	// True, if the album has at least one photo
	HasPhotos bool `json:"has_photos"`
	// True, if the album has at least one video
	HasVideos bool `json:"has_videos"`
	// True, if the album has at least one audio file
	HasAudios bool `json:"has_audios"`
	// True, if the album has at least one document
	HasDocuments bool `json:"has_documents"`
	// contains filtered or unexported fields
}

A media album

func UnmarshalPushMessageContentMediaAlbum

func UnmarshalPushMessageContentMediaAlbum(data json.RawMessage) (*PushMessageContentMediaAlbum, error)

func (*PushMessageContentMediaAlbum) GetClass

func (*PushMessageContentMediaAlbum) GetType

func (*PushMessageContentMediaAlbum) MarshalJSON

func (entity *PushMessageContentMediaAlbum) MarshalJSON() ([]byte, error)

func (*PushMessageContentMediaAlbum) PushMessageContentType

func (*PushMessageContentMediaAlbum) PushMessageContentType() string

type PushMessageContentMessageForwards

type PushMessageContentMessageForwards struct {

	// Number of forwarded messages
	TotalCount int32 `json:"total_count"`
	// contains filtered or unexported fields
}

A forwarded messages

func UnmarshalPushMessageContentMessageForwards

func UnmarshalPushMessageContentMessageForwards(data json.RawMessage) (*PushMessageContentMessageForwards, error)

func (*PushMessageContentMessageForwards) GetClass

func (*PushMessageContentMessageForwards) GetType

func (*PushMessageContentMessageForwards) MarshalJSON

func (entity *PushMessageContentMessageForwards) MarshalJSON() ([]byte, error)

func (*PushMessageContentMessageForwards) PushMessageContentType

func (*PushMessageContentMessageForwards) PushMessageContentType() string

type PushMessageContentPhoto

type PushMessageContentPhoto struct {

	// Message content; may be null
	Photo *Photo `json:"photo"`
	// Photo caption
	Caption string `json:"caption"`
	// True, if the photo is secret
	IsSecret bool `json:"is_secret"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A photo message

func UnmarshalPushMessageContentPhoto

func UnmarshalPushMessageContentPhoto(data json.RawMessage) (*PushMessageContentPhoto, error)

func (*PushMessageContentPhoto) GetClass

func (*PushMessageContentPhoto) GetClass() string

func (*PushMessageContentPhoto) GetType

func (*PushMessageContentPhoto) GetType() string

func (*PushMessageContentPhoto) MarshalJSON

func (entity *PushMessageContentPhoto) MarshalJSON() ([]byte, error)

func (*PushMessageContentPhoto) PushMessageContentType

func (*PushMessageContentPhoto) PushMessageContentType() string

type PushMessageContentPoll

type PushMessageContentPoll struct {

	// Poll question
	Question string `json:"question"`
	// True, if the poll is regular and not in quiz mode
	IsRegular bool `json:"is_regular"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A message with a poll

func UnmarshalPushMessageContentPoll

func UnmarshalPushMessageContentPoll(data json.RawMessage) (*PushMessageContentPoll, error)

func (*PushMessageContentPoll) GetClass

func (*PushMessageContentPoll) GetClass() string

func (*PushMessageContentPoll) GetType

func (*PushMessageContentPoll) GetType() string

func (*PushMessageContentPoll) MarshalJSON

func (entity *PushMessageContentPoll) MarshalJSON() ([]byte, error)

func (*PushMessageContentPoll) PushMessageContentType

func (*PushMessageContentPoll) PushMessageContentType() string

type PushMessageContentScreenshotTaken

type PushMessageContentScreenshotTaken struct {
	// contains filtered or unexported fields
}

A screenshot of a message in the chat has been taken

func UnmarshalPushMessageContentScreenshotTaken

func UnmarshalPushMessageContentScreenshotTaken(data json.RawMessage) (*PushMessageContentScreenshotTaken, error)

func (*PushMessageContentScreenshotTaken) GetClass

func (*PushMessageContentScreenshotTaken) GetType

func (*PushMessageContentScreenshotTaken) MarshalJSON

func (entity *PushMessageContentScreenshotTaken) MarshalJSON() ([]byte, error)

func (*PushMessageContentScreenshotTaken) PushMessageContentType

func (*PushMessageContentScreenshotTaken) PushMessageContentType() string

type PushMessageContentSticker

type PushMessageContentSticker struct {

	// Message content; may be null
	Sticker *Sticker `json:"sticker"`
	// Emoji corresponding to the sticker; may be empty
	Emoji string `json:"emoji"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A message with a sticker

func UnmarshalPushMessageContentSticker

func UnmarshalPushMessageContentSticker(data json.RawMessage) (*PushMessageContentSticker, error)

func (*PushMessageContentSticker) GetClass

func (*PushMessageContentSticker) GetClass() string

func (*PushMessageContentSticker) GetType

func (*PushMessageContentSticker) GetType() string

func (*PushMessageContentSticker) MarshalJSON

func (entity *PushMessageContentSticker) MarshalJSON() ([]byte, error)

func (*PushMessageContentSticker) PushMessageContentType

func (*PushMessageContentSticker) PushMessageContentType() string

type PushMessageContentText

type PushMessageContentText struct {

	// Message text
	Text string `json:"text"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A text message

func UnmarshalPushMessageContentText

func UnmarshalPushMessageContentText(data json.RawMessage) (*PushMessageContentText, error)

func (*PushMessageContentText) GetClass

func (*PushMessageContentText) GetClass() string

func (*PushMessageContentText) GetType

func (*PushMessageContentText) GetType() string

func (*PushMessageContentText) MarshalJSON

func (entity *PushMessageContentText) MarshalJSON() ([]byte, error)

func (*PushMessageContentText) PushMessageContentType

func (*PushMessageContentText) PushMessageContentType() string

type PushMessageContentVideo

type PushMessageContentVideo struct {

	// Message content; may be null
	Video *Video `json:"video"`
	// Video caption
	Caption string `json:"caption"`
	// True, if the video is secret
	IsSecret bool `json:"is_secret"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A video message

func UnmarshalPushMessageContentVideo

func UnmarshalPushMessageContentVideo(data json.RawMessage) (*PushMessageContentVideo, error)

func (*PushMessageContentVideo) GetClass

func (*PushMessageContentVideo) GetClass() string

func (*PushMessageContentVideo) GetType

func (*PushMessageContentVideo) GetType() string

func (*PushMessageContentVideo) MarshalJSON

func (entity *PushMessageContentVideo) MarshalJSON() ([]byte, error)

func (*PushMessageContentVideo) PushMessageContentType

func (*PushMessageContentVideo) PushMessageContentType() string

type PushMessageContentVideoNote

type PushMessageContentVideoNote struct {

	// Message content; may be null
	VideoNote *VideoNote `json:"video_note"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A video note message

func UnmarshalPushMessageContentVideoNote

func UnmarshalPushMessageContentVideoNote(data json.RawMessage) (*PushMessageContentVideoNote, error)

func (*PushMessageContentVideoNote) GetClass

func (*PushMessageContentVideoNote) GetClass() string

func (*PushMessageContentVideoNote) GetType

func (*PushMessageContentVideoNote) MarshalJSON

func (entity *PushMessageContentVideoNote) MarshalJSON() ([]byte, error)

func (*PushMessageContentVideoNote) PushMessageContentType

func (*PushMessageContentVideoNote) PushMessageContentType() string

type PushMessageContentVoiceNote

type PushMessageContentVoiceNote struct {

	// Message content; may be null
	VoiceNote *VoiceNote `json:"voice_note"`
	// True, if the message is a pinned message with the specified content
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

A voice note message

func UnmarshalPushMessageContentVoiceNote

func UnmarshalPushMessageContentVoiceNote(data json.RawMessage) (*PushMessageContentVoiceNote, error)

func (*PushMessageContentVoiceNote) GetClass

func (*PushMessageContentVoiceNote) GetClass() string

func (*PushMessageContentVoiceNote) GetType

func (*PushMessageContentVoiceNote) MarshalJSON

func (entity *PushMessageContentVoiceNote) MarshalJSON() ([]byte, error)

func (*PushMessageContentVoiceNote) PushMessageContentType

func (*PushMessageContentVoiceNote) PushMessageContentType() string

type PushReceiverId

type PushReceiverId struct {

	// The globally unique identifier of push notification subscription
	Id JsonInt64 `json:"id"`
	// contains filtered or unexported fields
}

Contains a globally unique push receiver identifier, which can be used to identify which account has received a push notification

func UnmarshalPushReceiverId

func UnmarshalPushReceiverId(data json.RawMessage) (*PushReceiverId, error)

func (*PushReceiverId) GetClass

func (*PushReceiverId) GetClass() string

func (*PushReceiverId) GetType

func (*PushReceiverId) GetType() string

func (*PushReceiverId) MarshalJSON

func (entity *PushReceiverId) MarshalJSON() ([]byte, error)

type Reaction added in v1.8.3

type Reaction struct {

	// Text representation of the reaction
	Reaction string `json:"reaction"`
	// Reaction title
	Title string `json:"title"`
	// True, if the reaction can be added to new messages and enabled in chats
	IsActive bool `json:"is_active"`
	// Static icon for the reaction
	StaticIcon *Sticker `json:"static_icon"`
	// Appear animation for the reaction
	AppearAnimation *Sticker `json:"appear_animation"`
	// Select animation for the reaction
	SelectAnimation *Sticker `json:"select_animation"`
	// Activate animation for the reaction
	ActivateAnimation *Sticker `json:"activate_animation"`
	// Effect animation for the reaction
	EffectAnimation *Sticker `json:"effect_animation"`
	// Around animation for the reaction; may be null
	AroundAnimation *Sticker `json:"around_animation"`
	// Center animation for the reaction; may be null
	CenterAnimation *Sticker `json:"center_animation"`
	// contains filtered or unexported fields
}

Contains stickers which must be used for reaction animation rendering

func UnmarshalReaction added in v1.8.3

func UnmarshalReaction(data json.RawMessage) (*Reaction, error)

func (*Reaction) GetClass added in v1.8.3

func (*Reaction) GetClass() string

func (*Reaction) GetType added in v1.8.3

func (*Reaction) GetType() string

func (*Reaction) MarshalJSON added in v1.8.3

func (entity *Reaction) MarshalJSON() ([]byte, error)

type ReadAllChatMentionsRequest

type ReadAllChatMentionsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type ReadAllChatReactionsRequest added in v1.8.3

type ReadAllChatReactionsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type ReadFilePartRequest

type ReadFilePartRequest struct {
	// Identifier of the file. The file must be located in the TDLib file cache
	FileId int32 `json:"file_id"`
	// The offset from which to read the file
	Offset int32 `json:"offset"`
	// Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position
	Count int32 `json:"count"`
}

type RecommendedChatFilter

type RecommendedChatFilter struct {

	// The chat filter
	Filter *ChatFilter `json:"filter"`
	// Chat filter description
	Description string `json:"description"`
	// contains filtered or unexported fields
}

Describes a recommended chat filter

func UnmarshalRecommendedChatFilter

func UnmarshalRecommendedChatFilter(data json.RawMessage) (*RecommendedChatFilter, error)

func (*RecommendedChatFilter) GetClass

func (*RecommendedChatFilter) GetClass() string

func (*RecommendedChatFilter) GetType

func (*RecommendedChatFilter) GetType() string

func (*RecommendedChatFilter) MarshalJSON

func (entity *RecommendedChatFilter) MarshalJSON() ([]byte, error)

type RecommendedChatFilters

type RecommendedChatFilters struct {

	// List of recommended chat filters
	ChatFilters []*RecommendedChatFilter `json:"chat_filters"`
	// contains filtered or unexported fields
}

Contains a list of recommended chat filters

func UnmarshalRecommendedChatFilters

func UnmarshalRecommendedChatFilters(data json.RawMessage) (*RecommendedChatFilters, error)

func (*RecommendedChatFilters) GetClass

func (*RecommendedChatFilters) GetClass() string

func (*RecommendedChatFilters) GetType

func (*RecommendedChatFilters) GetType() string

func (*RecommendedChatFilters) MarshalJSON

func (entity *RecommendedChatFilters) MarshalJSON() ([]byte, error)

type RecoverAuthenticationPasswordRequest

type RecoverAuthenticationPasswordRequest struct {
	// Recovery code to check
	RecoveryCode string `json:"recovery_code"`
	// New password of the user; may be empty to remove the password
	NewPassword string `json:"new_password"`
	// New password hint; may be empty
	NewHint string `json:"new_hint"`
}

type RecoverPasswordRequest

type RecoverPasswordRequest struct {
	// Recovery code to check
	RecoveryCode string `json:"recovery_code"`
	// New password of the user; may be empty to remove the password
	NewPassword string `json:"new_password"`
	// New password hint; may be empty
	NewHint string `json:"new_hint"`
}

type RecoveryEmailAddress

type RecoveryEmailAddress struct {

	// Recovery email address
	RecoveryEmailAddress string `json:"recovery_email_address"`
	// contains filtered or unexported fields
}

Contains information about the current recovery email address

func UnmarshalRecoveryEmailAddress

func UnmarshalRecoveryEmailAddress(data json.RawMessage) (*RecoveryEmailAddress, error)

func (*RecoveryEmailAddress) GetClass

func (*RecoveryEmailAddress) GetClass() string

func (*RecoveryEmailAddress) GetType

func (*RecoveryEmailAddress) GetType() string

func (*RecoveryEmailAddress) MarshalJSON

func (entity *RecoveryEmailAddress) MarshalJSON() ([]byte, error)

type RegisterDeviceRequest

type RegisterDeviceRequest struct {
	// Device token
	DeviceToken DeviceToken `json:"device_token"`
	// List of user identifiers of other users currently using the application
	OtherUserIds []int64 `json:"other_user_ids"`
}

type RegisterUserRequest

type RegisterUserRequest struct {
	// The first name of the user; 1-64 characters
	FirstName string `json:"first_name"`
	// The last name of the user; 0-64 characters
	LastName string `json:"last_name"`
}

type RemoteFile

type RemoteFile struct {

	// Remote file identifier; may be empty. Can be used by the current user across application restarts or even from other devices. Uniquely identifies a file, but a file can have a lot of different valid identifiers. If the ID starts with "http://" or "https://", it represents the HTTP URL of the file. TDLib is currently unable to download files if only their URL is known. If downloadFile/addFileToDownloads is called on such a file or if it is sent to a secret chat, TDLib starts a file generation process by sending updateFileGenerationStart to the application with the HTTP URL in the original_path and "#url#" as the conversion string. Application must generate the file by downloading it to the specified location
	Id string `json:"id"`
	// Unique file identifier; may be empty if unknown. The unique file identifier which is the same for the same file even for different users and is persistent over time
	UniqueId string `json:"unique_id"`
	// True, if the file is currently being uploaded (or a remote copy is being generated by some other means)
	IsUploadingActive bool `json:"is_uploading_active"`
	// True, if a remote copy is fully available
	IsUploadingCompleted bool `json:"is_uploading_completed"`
	// Size of the remote available part of the file, in bytes; 0 if unknown
	UploadedSize int32 `json:"uploaded_size"`
	// contains filtered or unexported fields
}

Represents a remote file

func UnmarshalRemoteFile

func UnmarshalRemoteFile(data json.RawMessage) (*RemoteFile, error)

func (*RemoteFile) GetClass

func (*RemoteFile) GetClass() string

func (*RemoteFile) GetType

func (*RemoteFile) GetType() string

func (*RemoteFile) MarshalJSON

func (entity *RemoteFile) MarshalJSON() ([]byte, error)

type RemoveAllFilesFromDownloadsRequest added in v1.8.3

type RemoveAllFilesFromDownloadsRequest struct {
	// Pass true to remove only active downloads, including paused
	OnlyActive bool `json:"only_active"`
	// Pass true to remove only completed downloads
	OnlyCompleted bool `json:"only_completed"`
	// Pass true to delete the file from the TDLib file cache
	DeleteFromCache bool `json:"delete_from_cache"`
}

type RemoveBackgroundRequest

type RemoveBackgroundRequest struct {
	// The background identifier
	BackgroundId JsonInt64 `json:"background_id"`
}

type RemoveChatActionBarRequest

type RemoveChatActionBarRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type RemoveContactsRequest

type RemoveContactsRequest struct {
	// Identifiers of users to be deleted
	UserIds []int64 `json:"user_ids"`
}

type RemoveFavoriteStickerRequest

type RemoveFavoriteStickerRequest struct {
	// Sticker file to delete from the list
	Sticker InputFile `json:"sticker"`
}

type RemoveFileFromDownloadsRequest added in v1.8.3

type RemoveFileFromDownloadsRequest struct {
	// Identifier of the downloaded file
	FileId int32 `json:"file_id"`
	// Pass true to delete the file from the TDLib file cache
	DeleteFromCache bool `json:"delete_from_cache"`
}

type RemoveNotificationGroupRequest

type RemoveNotificationGroupRequest struct {
	// Notification group identifier
	NotificationGroupId int32 `json:"notification_group_id"`
	// The maximum identifier of removed notifications
	MaxNotificationId int32 `json:"max_notification_id"`
}

type RemoveNotificationRequest

type RemoveNotificationRequest struct {
	// Identifier of notification group to which the notification belongs
	NotificationGroupId int32 `json:"notification_group_id"`
	// Identifier of removed notification
	NotificationId int32 `json:"notification_id"`
}

type RemoveProxyRequest

type RemoveProxyRequest struct {
	// Proxy identifier
	ProxyId int32 `json:"proxy_id"`
}

type RemoveRecentHashtagRequest

type RemoveRecentHashtagRequest struct {
	// Hashtag to delete
	Hashtag string `json:"hashtag"`
}

type RemoveRecentStickerRequest

type RemoveRecentStickerRequest struct {
	// Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers
	IsAttached bool `json:"is_attached"`
	// Sticker file to delete
	Sticker InputFile `json:"sticker"`
}

type RemoveRecentlyFoundChatRequest

type RemoveRecentlyFoundChatRequest struct {
	// Identifier of the chat to be removed
	ChatId int64 `json:"chat_id"`
}

type RemoveSavedAnimationRequest

type RemoveSavedAnimationRequest struct {
	// Animation file to be removed
	Animation InputFile `json:"animation"`
}

type RemoveSavedNotificationSoundRequest added in v1.8.3

type RemoveSavedNotificationSoundRequest struct {
	// Identifier of the notification sound
	NotificationSoundId JsonInt64 `json:"notification_sound_id"`
}

type RemoveStickerFromSetRequest

type RemoveStickerFromSetRequest struct {
	// Sticker
	Sticker InputFile `json:"sticker"`
}

type RemoveTopChatRequest

type RemoveTopChatRequest struct {
	// Category of frequently used chats
	Category TopChatCategory `json:"category"`
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type ReorderChatFiltersRequest

type ReorderChatFiltersRequest struct {
	// Identifiers of chat filters in the new correct order
	ChatFilterIds []int32 `json:"chat_filter_ids"`
}

type ReorderInstalledStickerSetsRequest

type ReorderInstalledStickerSetsRequest struct {
	// Pass true to change the order of mask sticker sets; pass false to change the order of ordinary sticker sets
	IsMasks bool `json:"is_masks"`
	// Identifiers of installed sticker sets in the new correct order
	StickerSetIds []JsonInt64 `json:"sticker_set_ids"`
}

type ReplacePrimaryChatInviteLinkRequest added in v1.7.10

type ReplacePrimaryChatInviteLinkRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type ReplaceVideoChatRtmpUrlRequest added in v1.8.3

type ReplaceVideoChatRtmpUrlRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type ReplyMarkup

type ReplyMarkup interface {
	ReplyMarkupType() string
}

Contains a description of a custom keyboard and actions that can be done with it to quickly reply to bots

func UnmarshalListOfReplyMarkup

func UnmarshalListOfReplyMarkup(dataList []json.RawMessage) ([]ReplyMarkup, error)

func UnmarshalReplyMarkup

func UnmarshalReplyMarkup(data json.RawMessage) (ReplyMarkup, error)

type ReplyMarkupForceReply

type ReplyMarkupForceReply struct {

	// True, if a forced reply must automatically be shown to the current user. For outgoing messages, specify true to show the forced reply only for the mentioned users and for the target user of a reply
	IsPersonal bool `json:"is_personal"`
	// If non-empty, the placeholder to be shown in the input field when the reply is active; 0-64 characters
	InputFieldPlaceholder string `json:"input_field_placeholder"`
	// contains filtered or unexported fields
}

Instructs application to force a reply to this message

func UnmarshalReplyMarkupForceReply

func UnmarshalReplyMarkupForceReply(data json.RawMessage) (*ReplyMarkupForceReply, error)

func (*ReplyMarkupForceReply) GetClass

func (*ReplyMarkupForceReply) GetClass() string

func (*ReplyMarkupForceReply) GetType

func (*ReplyMarkupForceReply) GetType() string

func (*ReplyMarkupForceReply) MarshalJSON

func (entity *ReplyMarkupForceReply) MarshalJSON() ([]byte, error)

func (*ReplyMarkupForceReply) ReplyMarkupType

func (*ReplyMarkupForceReply) ReplyMarkupType() string

type ReplyMarkupInlineKeyboard

type ReplyMarkupInlineKeyboard struct {

	// A list of rows of inline keyboard buttons
	Rows [][]*InlineKeyboardButton `json:"rows"`
	// contains filtered or unexported fields
}

Contains an inline keyboard layout

func UnmarshalReplyMarkupInlineKeyboard

func UnmarshalReplyMarkupInlineKeyboard(data json.RawMessage) (*ReplyMarkupInlineKeyboard, error)

func (*ReplyMarkupInlineKeyboard) GetClass

func (*ReplyMarkupInlineKeyboard) GetClass() string

func (*ReplyMarkupInlineKeyboard) GetType

func (*ReplyMarkupInlineKeyboard) GetType() string

func (*ReplyMarkupInlineKeyboard) MarshalJSON

func (entity *ReplyMarkupInlineKeyboard) MarshalJSON() ([]byte, error)

func (*ReplyMarkupInlineKeyboard) ReplyMarkupType

func (*ReplyMarkupInlineKeyboard) ReplyMarkupType() string

type ReplyMarkupRemoveKeyboard

type ReplyMarkupRemoveKeyboard struct {

	// True, if the keyboard is removed only for the mentioned users or the target user of a reply
	IsPersonal bool `json:"is_personal"`
	// contains filtered or unexported fields
}

Instructs application to remove the keyboard once this message has been received. This kind of keyboard can't be received in an incoming message; instead, UpdateChatReplyMarkup with message_id == 0 will be sent

func UnmarshalReplyMarkupRemoveKeyboard

func UnmarshalReplyMarkupRemoveKeyboard(data json.RawMessage) (*ReplyMarkupRemoveKeyboard, error)

func (*ReplyMarkupRemoveKeyboard) GetClass

func (*ReplyMarkupRemoveKeyboard) GetClass() string

func (*ReplyMarkupRemoveKeyboard) GetType

func (*ReplyMarkupRemoveKeyboard) GetType() string

func (*ReplyMarkupRemoveKeyboard) MarshalJSON

func (entity *ReplyMarkupRemoveKeyboard) MarshalJSON() ([]byte, error)

func (*ReplyMarkupRemoveKeyboard) ReplyMarkupType

func (*ReplyMarkupRemoveKeyboard) ReplyMarkupType() string

type ReplyMarkupShowKeyboard

type ReplyMarkupShowKeyboard struct {

	// A list of rows of bot keyboard buttons
	Rows [][]*KeyboardButton `json:"rows"`
	// True, if the application needs to resize the keyboard vertically
	ResizeKeyboard bool `json:"resize_keyboard"`
	// True, if the application needs to hide the keyboard after use
	OneTime bool `json:"one_time"`
	// True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply
	IsPersonal bool `json:"is_personal"`
	// If non-empty, the placeholder to be shown in the input field when the keyboard is active; 0-64 characters
	InputFieldPlaceholder string `json:"input_field_placeholder"`
	// contains filtered or unexported fields
}

Contains a custom keyboard layout to quickly reply to bots

func UnmarshalReplyMarkupShowKeyboard

func UnmarshalReplyMarkupShowKeyboard(data json.RawMessage) (*ReplyMarkupShowKeyboard, error)

func (*ReplyMarkupShowKeyboard) GetClass

func (*ReplyMarkupShowKeyboard) GetClass() string

func (*ReplyMarkupShowKeyboard) GetType

func (*ReplyMarkupShowKeyboard) GetType() string

func (*ReplyMarkupShowKeyboard) MarshalJSON

func (entity *ReplyMarkupShowKeyboard) MarshalJSON() ([]byte, error)

func (*ReplyMarkupShowKeyboard) ReplyMarkupType

func (*ReplyMarkupShowKeyboard) ReplyMarkupType() string

type ReportChatPhotoRequest added in v1.7.10

type ReportChatPhotoRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the photo to report. Only full photos from chatPhoto can be reported
	FileId int32 `json:"file_id"`
	// The reason for reporting the chat photo
	Reason ChatReportReason `json:"reason"`
	// Additional report details; 0-1024 characters
	Text string `json:"text"`
}

type ReportChatRequest

type ReportChatRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifiers of reported messages; may be empty to report the whole chat
	MessageIds []int64 `json:"message_ids"`
	// The reason for reporting the chat
	Reason ChatReportReason `json:"reason"`
	// Additional report details; 0-1024 characters
	Text string `json:"text"`
}

type ReportSupergroupSpamRequest

type ReportSupergroupSpamRequest struct {
	// Supergroup identifier
	SupergroupId int64 `json:"supergroup_id"`
	// Identifiers of messages to report
	MessageIds []int64 `json:"message_ids"`
}

type Request

type Request struct {
	Data map[string]interface{}
	// contains filtered or unexported fields
}

func (Request) MarshalJSON

func (req Request) MarshalJSON() ([]byte, error)

type RequestQrCodeAuthenticationRequest

type RequestQrCodeAuthenticationRequest struct {
	// List of user identifiers of other users currently using the application
	OtherUserIds []int64 `json:"other_user_ids"`
}

type ResendMessagesRequest

type ResendMessagesRequest struct {
	// Identifier of the chat to send messages
	ChatId int64 `json:"chat_id"`
	// Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order
	MessageIds []int64 `json:"message_ids"`
}

type ResetPasswordResult added in v1.7.10

type ResetPasswordResult interface {
	ResetPasswordResultType() string
}

Represents result of 2-step verification password reset

func UnmarshalListOfResetPasswordResult added in v1.7.10

func UnmarshalListOfResetPasswordResult(dataList []json.RawMessage) ([]ResetPasswordResult, error)

func UnmarshalResetPasswordResult added in v1.7.10

func UnmarshalResetPasswordResult(data json.RawMessage) (ResetPasswordResult, error)

type ResetPasswordResultDeclined added in v1.7.10

type ResetPasswordResultDeclined struct {

	// Point in time (Unix timestamp) when the password reset can be retried
	RetryDate int32 `json:"retry_date"`
	// contains filtered or unexported fields
}

The password reset request was declined

func UnmarshalResetPasswordResultDeclined added in v1.7.10

func UnmarshalResetPasswordResultDeclined(data json.RawMessage) (*ResetPasswordResultDeclined, error)

func (*ResetPasswordResultDeclined) GetClass added in v1.7.10

func (*ResetPasswordResultDeclined) GetClass() string

func (*ResetPasswordResultDeclined) GetType added in v1.7.10

func (*ResetPasswordResultDeclined) MarshalJSON added in v1.7.10

func (entity *ResetPasswordResultDeclined) MarshalJSON() ([]byte, error)

func (*ResetPasswordResultDeclined) ResetPasswordResultType added in v1.7.10

func (*ResetPasswordResultDeclined) ResetPasswordResultType() string

type ResetPasswordResultOk added in v1.7.10

type ResetPasswordResultOk struct {
	// contains filtered or unexported fields
}

The password was reset

func UnmarshalResetPasswordResultOk added in v1.7.10

func UnmarshalResetPasswordResultOk(data json.RawMessage) (*ResetPasswordResultOk, error)

func (*ResetPasswordResultOk) GetClass added in v1.7.10

func (*ResetPasswordResultOk) GetClass() string

func (*ResetPasswordResultOk) GetType added in v1.7.10

func (*ResetPasswordResultOk) GetType() string

func (*ResetPasswordResultOk) MarshalJSON added in v1.7.10

func (entity *ResetPasswordResultOk) MarshalJSON() ([]byte, error)

func (*ResetPasswordResultOk) ResetPasswordResultType added in v1.7.10

func (*ResetPasswordResultOk) ResetPasswordResultType() string

type ResetPasswordResultPending added in v1.7.10

type ResetPasswordResultPending struct {

	// Point in time (Unix timestamp) after which the password can be reset immediately using resetPassword
	PendingResetDate int32 `json:"pending_reset_date"`
	// contains filtered or unexported fields
}

The password reset request is pending

func UnmarshalResetPasswordResultPending added in v1.7.10

func UnmarshalResetPasswordResultPending(data json.RawMessage) (*ResetPasswordResultPending, error)

func (*ResetPasswordResultPending) GetClass added in v1.7.10

func (*ResetPasswordResultPending) GetClass() string

func (*ResetPasswordResultPending) GetType added in v1.7.10

func (*ResetPasswordResultPending) MarshalJSON added in v1.7.10

func (entity *ResetPasswordResultPending) MarshalJSON() ([]byte, error)

func (*ResetPasswordResultPending) ResetPasswordResultType added in v1.7.10

func (*ResetPasswordResultPending) ResetPasswordResultType() string

type Response

type Response struct {
	Data json.RawMessage
	// contains filtered or unexported fields
}

type ResponseError

type ResponseError struct {
	Err *Error
}

func (ResponseError) Error

func (responseError ResponseError) Error() string

type RevokeChatInviteLinkRequest added in v1.7.10

type RevokeChatInviteLinkRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Invite link to be revoked
	InviteLink string `json:"invite_link"`
}

type RevokeGroupCallInviteLinkRequest added in v1.7.10

type RevokeGroupCallInviteLinkRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
}

type RichText

type RichText interface {
	RichTextType() string
}

Describes a text object inside an instant-view web page

func UnmarshalListOfRichText

func UnmarshalListOfRichText(dataList []json.RawMessage) ([]RichText, error)

func UnmarshalRichText

func UnmarshalRichText(data json.RawMessage) (RichText, error)

type RichTextAnchor

type RichTextAnchor struct {

	// Anchor name
	Name string `json:"name"`
	// contains filtered or unexported fields
}

An anchor

func UnmarshalRichTextAnchor

func UnmarshalRichTextAnchor(data json.RawMessage) (*RichTextAnchor, error)

func (*RichTextAnchor) GetClass

func (*RichTextAnchor) GetClass() string

func (*RichTextAnchor) GetType

func (*RichTextAnchor) GetType() string

func (*RichTextAnchor) MarshalJSON

func (entity *RichTextAnchor) MarshalJSON() ([]byte, error)

func (*RichTextAnchor) RichTextType

func (*RichTextAnchor) RichTextType() string
type RichTextAnchorLink struct {

	// The link text
	Text RichText `json:"text"`
	// The anchor name. If the name is empty, the link must bring back to top
	AnchorName string `json:"anchor_name"`
	// An HTTP URL, opening the anchor
	Url string `json:"url"`
	// contains filtered or unexported fields
}

A link to an anchor on the same web page

func UnmarshalRichTextAnchorLink(data json.RawMessage) (*RichTextAnchorLink, error)

func (*RichTextAnchorLink) GetClass

func (*RichTextAnchorLink) GetClass() string

func (*RichTextAnchorLink) GetType

func (*RichTextAnchorLink) GetType() string

func (*RichTextAnchorLink) MarshalJSON

func (entity *RichTextAnchorLink) MarshalJSON() ([]byte, error)

func (*RichTextAnchorLink) RichTextType

func (*RichTextAnchorLink) RichTextType() string

func (*RichTextAnchorLink) UnmarshalJSON

func (richTextAnchorLink *RichTextAnchorLink) UnmarshalJSON(data []byte) error

type RichTextBold

type RichTextBold struct {

	// Text
	Text RichText `json:"text"`
	// contains filtered or unexported fields
}

A bold rich text

func UnmarshalRichTextBold

func UnmarshalRichTextBold(data json.RawMessage) (*RichTextBold, error)

func (*RichTextBold) GetClass

func (*RichTextBold) GetClass() string

func (*RichTextBold) GetType

func (*RichTextBold) GetType() string

func (*RichTextBold) MarshalJSON

func (entity *RichTextBold) MarshalJSON() ([]byte, error)

func (*RichTextBold) RichTextType

func (*RichTextBold) RichTextType() string

func (*RichTextBold) UnmarshalJSON

func (richTextBold *RichTextBold) UnmarshalJSON(data []byte) error

type RichTextEmailAddress

type RichTextEmailAddress struct {

	// Text
	Text RichText `json:"text"`
	// Email address
	EmailAddress string `json:"email_address"`
	// contains filtered or unexported fields
}

A rich text email link

func UnmarshalRichTextEmailAddress

func UnmarshalRichTextEmailAddress(data json.RawMessage) (*RichTextEmailAddress, error)

func (*RichTextEmailAddress) GetClass

func (*RichTextEmailAddress) GetClass() string

func (*RichTextEmailAddress) GetType

func (*RichTextEmailAddress) GetType() string

func (*RichTextEmailAddress) MarshalJSON

func (entity *RichTextEmailAddress) MarshalJSON() ([]byte, error)

func (*RichTextEmailAddress) RichTextType

func (*RichTextEmailAddress) RichTextType() string

func (*RichTextEmailAddress) UnmarshalJSON

func (richTextEmailAddress *RichTextEmailAddress) UnmarshalJSON(data []byte) error

type RichTextFixed

type RichTextFixed struct {

	// Text
	Text RichText `json:"text"`
	// contains filtered or unexported fields
}

A fixed-width rich text

func UnmarshalRichTextFixed

func UnmarshalRichTextFixed(data json.RawMessage) (*RichTextFixed, error)

func (*RichTextFixed) GetClass

func (*RichTextFixed) GetClass() string

func (*RichTextFixed) GetType

func (*RichTextFixed) GetType() string

func (*RichTextFixed) MarshalJSON

func (entity *RichTextFixed) MarshalJSON() ([]byte, error)

func (*RichTextFixed) RichTextType

func (*RichTextFixed) RichTextType() string

func (*RichTextFixed) UnmarshalJSON

func (richTextFixed *RichTextFixed) UnmarshalJSON(data []byte) error

type RichTextIcon

type RichTextIcon struct {

	// The image represented as a document. The image can be in GIF, JPEG or PNG format
	Document *Document `json:"document"`
	// Width of a bounding box in which the image must be shown; 0 if unknown
	Width int32 `json:"width"`
	// Height of a bounding box in which the image must be shown; 0 if unknown
	Height int32 `json:"height"`
	// contains filtered or unexported fields
}

A small image inside the text

func UnmarshalRichTextIcon

func UnmarshalRichTextIcon(data json.RawMessage) (*RichTextIcon, error)

func (*RichTextIcon) GetClass

func (*RichTextIcon) GetClass() string

func (*RichTextIcon) GetType

func (*RichTextIcon) GetType() string

func (*RichTextIcon) MarshalJSON

func (entity *RichTextIcon) MarshalJSON() ([]byte, error)

func (*RichTextIcon) RichTextType

func (*RichTextIcon) RichTextType() string

type RichTextItalic

type RichTextItalic struct {

	// Text
	Text RichText `json:"text"`
	// contains filtered or unexported fields
}

An italicized rich text

func UnmarshalRichTextItalic

func UnmarshalRichTextItalic(data json.RawMessage) (*RichTextItalic, error)

func (*RichTextItalic) GetClass

func (*RichTextItalic) GetClass() string

func (*RichTextItalic) GetType

func (*RichTextItalic) GetType() string

func (*RichTextItalic) MarshalJSON

func (entity *RichTextItalic) MarshalJSON() ([]byte, error)

func (*RichTextItalic) RichTextType

func (*RichTextItalic) RichTextType() string

func (*RichTextItalic) UnmarshalJSON

func (richTextItalic *RichTextItalic) UnmarshalJSON(data []byte) error

type RichTextMarked

type RichTextMarked struct {

	// Text
	Text RichText `json:"text"`
	// contains filtered or unexported fields
}

A marked rich text

func UnmarshalRichTextMarked

func UnmarshalRichTextMarked(data json.RawMessage) (*RichTextMarked, error)

func (*RichTextMarked) GetClass

func (*RichTextMarked) GetClass() string

func (*RichTextMarked) GetType

func (*RichTextMarked) GetType() string

func (*RichTextMarked) MarshalJSON

func (entity *RichTextMarked) MarshalJSON() ([]byte, error)

func (*RichTextMarked) RichTextType

func (*RichTextMarked) RichTextType() string

func (*RichTextMarked) UnmarshalJSON

func (richTextMarked *RichTextMarked) UnmarshalJSON(data []byte) error

type RichTextPhoneNumber

type RichTextPhoneNumber struct {

	// Text
	Text RichText `json:"text"`
	// Phone number
	PhoneNumber string `json:"phone_number"`
	// contains filtered or unexported fields
}

A rich text phone number

func UnmarshalRichTextPhoneNumber

func UnmarshalRichTextPhoneNumber(data json.RawMessage) (*RichTextPhoneNumber, error)

func (*RichTextPhoneNumber) GetClass

func (*RichTextPhoneNumber) GetClass() string

func (*RichTextPhoneNumber) GetType

func (*RichTextPhoneNumber) GetType() string

func (*RichTextPhoneNumber) MarshalJSON

func (entity *RichTextPhoneNumber) MarshalJSON() ([]byte, error)

func (*RichTextPhoneNumber) RichTextType

func (*RichTextPhoneNumber) RichTextType() string

func (*RichTextPhoneNumber) UnmarshalJSON

func (richTextPhoneNumber *RichTextPhoneNumber) UnmarshalJSON(data []byte) error

type RichTextPlain

type RichTextPlain struct {

	// Text
	Text string `json:"text"`
	// contains filtered or unexported fields
}

A plain text

func UnmarshalRichTextPlain

func UnmarshalRichTextPlain(data json.RawMessage) (*RichTextPlain, error)

func (*RichTextPlain) GetClass

func (*RichTextPlain) GetClass() string

func (*RichTextPlain) GetType

func (*RichTextPlain) GetType() string

func (*RichTextPlain) MarshalJSON

func (entity *RichTextPlain) MarshalJSON() ([]byte, error)

func (*RichTextPlain) RichTextType

func (*RichTextPlain) RichTextType() string

type RichTextReference

type RichTextReference struct {

	// The text
	Text RichText `json:"text"`
	// The name of a richTextAnchor object, which is the first element of the target richTexts object
	AnchorName string `json:"anchor_name"`
	// An HTTP URL, opening the reference
	Url string `json:"url"`
	// contains filtered or unexported fields
}

A reference to a richTexts object on the same web page

func UnmarshalRichTextReference

func UnmarshalRichTextReference(data json.RawMessage) (*RichTextReference, error)

func (*RichTextReference) GetClass

func (*RichTextReference) GetClass() string

func (*RichTextReference) GetType

func (*RichTextReference) GetType() string

func (*RichTextReference) MarshalJSON

func (entity *RichTextReference) MarshalJSON() ([]byte, error)

func (*RichTextReference) RichTextType

func (*RichTextReference) RichTextType() string

func (*RichTextReference) UnmarshalJSON

func (richTextReference *RichTextReference) UnmarshalJSON(data []byte) error

type RichTextStrikethrough

type RichTextStrikethrough struct {

	// Text
	Text RichText `json:"text"`
	// contains filtered or unexported fields
}

A strikethrough rich text

func UnmarshalRichTextStrikethrough

func UnmarshalRichTextStrikethrough(data json.RawMessage) (*RichTextStrikethrough, error)

func (*RichTextStrikethrough) GetClass

func (*RichTextStrikethrough) GetClass() string

func (*RichTextStrikethrough) GetType

func (*RichTextStrikethrough) GetType() string

func (*RichTextStrikethrough) MarshalJSON

func (entity *RichTextStrikethrough) MarshalJSON() ([]byte, error)

func (*RichTextStrikethrough) RichTextType

func (*RichTextStrikethrough) RichTextType() string

func (*RichTextStrikethrough) UnmarshalJSON

func (richTextStrikethrough *RichTextStrikethrough) UnmarshalJSON(data []byte) error

type RichTextSubscript

type RichTextSubscript struct {

	// Text
	Text RichText `json:"text"`
	// contains filtered or unexported fields
}

A subscript rich text

func UnmarshalRichTextSubscript

func UnmarshalRichTextSubscript(data json.RawMessage) (*RichTextSubscript, error)

func (*RichTextSubscript) GetClass

func (*RichTextSubscript) GetClass() string

func (*RichTextSubscript) GetType

func (*RichTextSubscript) GetType() string

func (*RichTextSubscript) MarshalJSON

func (entity *RichTextSubscript) MarshalJSON() ([]byte, error)

func (*RichTextSubscript) RichTextType

func (*RichTextSubscript) RichTextType() string

func (*RichTextSubscript) UnmarshalJSON

func (richTextSubscript *RichTextSubscript) UnmarshalJSON(data []byte) error

type RichTextSuperscript

type RichTextSuperscript struct {

	// Text
	Text RichText `json:"text"`
	// contains filtered or unexported fields
}

A superscript rich text

func UnmarshalRichTextSuperscript

func UnmarshalRichTextSuperscript(data json.RawMessage) (*RichTextSuperscript, error)

func (*RichTextSuperscript) GetClass

func (*RichTextSuperscript) GetClass() string

func (*RichTextSuperscript) GetType

func (*RichTextSuperscript) GetType() string

func (*RichTextSuperscript) MarshalJSON

func (entity *RichTextSuperscript) MarshalJSON() ([]byte, error)

func (*RichTextSuperscript) RichTextType

func (*RichTextSuperscript) RichTextType() string

func (*RichTextSuperscript) UnmarshalJSON

func (richTextSuperscript *RichTextSuperscript) UnmarshalJSON(data []byte) error

type RichTextUnderline

type RichTextUnderline struct {

	// Text
	Text RichText `json:"text"`
	// contains filtered or unexported fields
}

An underlined rich text

func UnmarshalRichTextUnderline

func UnmarshalRichTextUnderline(data json.RawMessage) (*RichTextUnderline, error)

func (*RichTextUnderline) GetClass

func (*RichTextUnderline) GetClass() string

func (*RichTextUnderline) GetType

func (*RichTextUnderline) GetType() string

func (*RichTextUnderline) MarshalJSON

func (entity *RichTextUnderline) MarshalJSON() ([]byte, error)

func (*RichTextUnderline) RichTextType

func (*RichTextUnderline) RichTextType() string

func (*RichTextUnderline) UnmarshalJSON

func (richTextUnderline *RichTextUnderline) UnmarshalJSON(data []byte) error

type RichTextUrl

type RichTextUrl struct {

	// Text
	Text RichText `json:"text"`
	// URL
	Url string `json:"url"`
	// True, if the URL has cached instant view server-side
	IsCached bool `json:"is_cached"`
	// contains filtered or unexported fields
}

A rich text URL link

func UnmarshalRichTextUrl

func UnmarshalRichTextUrl(data json.RawMessage) (*RichTextUrl, error)

func (*RichTextUrl) GetClass

func (*RichTextUrl) GetClass() string

func (*RichTextUrl) GetType

func (*RichTextUrl) GetType() string

func (*RichTextUrl) MarshalJSON

func (entity *RichTextUrl) MarshalJSON() ([]byte, error)

func (*RichTextUrl) RichTextType

func (*RichTextUrl) RichTextType() string

func (*RichTextUrl) UnmarshalJSON

func (richTextUrl *RichTextUrl) UnmarshalJSON(data []byte) error

type RichTexts

type RichTexts struct {

	// Texts
	Texts []RichText `json:"texts"`
	// contains filtered or unexported fields
}

A concatenation of rich texts

func UnmarshalRichTexts

func UnmarshalRichTexts(data json.RawMessage) (*RichTexts, error)

func (*RichTexts) GetClass

func (*RichTexts) GetClass() string

func (*RichTexts) GetType

func (*RichTexts) GetType() string

func (*RichTexts) MarshalJSON

func (entity *RichTexts) MarshalJSON() ([]byte, error)

func (*RichTexts) RichTextType

func (*RichTexts) RichTextType() string

func (*RichTexts) UnmarshalJSON

func (richTexts *RichTexts) UnmarshalJSON(data []byte) error

type RtmpUrl added in v1.8.3

type RtmpUrl struct {

	// The URL
	Url string `json:"url"`
	// Stream key
	StreamKey string `json:"stream_key"`
	// contains filtered or unexported fields
}

Represents an RTMP url

func UnmarshalRtmpUrl added in v1.8.3

func UnmarshalRtmpUrl(data json.RawMessage) (*RtmpUrl, error)

func (*RtmpUrl) GetClass added in v1.8.3

func (*RtmpUrl) GetClass() string

func (*RtmpUrl) GetType added in v1.8.3

func (*RtmpUrl) GetType() string

func (*RtmpUrl) MarshalJSON added in v1.8.3

func (entity *RtmpUrl) MarshalJSON() ([]byte, error)

type SaveApplicationLogEventRequest

type SaveApplicationLogEventRequest struct {
	// Event type
	Type string `json:"type"`
	// Optional chat identifier, associated with the event
	ChatId int64 `json:"chat_id"`
	// The log event data
	Data JsonValue `json:"data"`
}

type SavedCredentials

type SavedCredentials struct {

	// Unique identifier of the saved credentials
	Id string `json:"id"`
	// Title of the saved credentials
	Title string `json:"title"`
	// contains filtered or unexported fields
}

Contains information about saved card credentials

func UnmarshalSavedCredentials

func UnmarshalSavedCredentials(data json.RawMessage) (*SavedCredentials, error)

func (*SavedCredentials) GetClass

func (*SavedCredentials) GetClass() string

func (*SavedCredentials) GetType

func (*SavedCredentials) GetType() string

func (*SavedCredentials) MarshalJSON

func (entity *SavedCredentials) MarshalJSON() ([]byte, error)

type ScopeNotificationSettings

type ScopeNotificationSettings struct {

	// Time left before notifications will be unmuted, in seconds
	MuteFor int32 `json:"mute_for"`
	// Identifier of the notification sound to be played; 0 if sound is disabled
	SoundId JsonInt64 `json:"sound_id"`
	// True, if message content must be displayed in notifications
	ShowPreview bool `json:"show_preview"`
	// True, if notifications for incoming pinned messages will be created as for an ordinary unread message
	DisablePinnedMessageNotifications bool `json:"disable_pinned_message_notifications"`
	// True, if notifications for messages with mentions will be created as for an ordinary unread message
	DisableMentionNotifications bool `json:"disable_mention_notifications"`
	// contains filtered or unexported fields
}

Contains information about notification settings for several chats

func UnmarshalScopeNotificationSettings

func UnmarshalScopeNotificationSettings(data json.RawMessage) (*ScopeNotificationSettings, error)

func (*ScopeNotificationSettings) GetClass

func (*ScopeNotificationSettings) GetClass() string

func (*ScopeNotificationSettings) GetType

func (*ScopeNotificationSettings) GetType() string

func (*ScopeNotificationSettings) MarshalJSON

func (entity *ScopeNotificationSettings) MarshalJSON() ([]byte, error)

type SearchBackgroundRequest

type SearchBackgroundRequest struct {
	// The name of the background
	Name string `json:"name"`
}

type SearchCallMessagesRequest

type SearchCallMessagesRequest struct {
	// Identifier of the message from which to search; use 0 to get results from the last message
	FromMessageId int64 `json:"from_message_id"`
	// The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
	Limit int32 `json:"limit"`
	// Pass true to search only for messages with missed/declined calls
	OnlyMissed bool `json:"only_missed"`
}

type SearchChatMembersRequest

type SearchChatMembersRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Query to search for
	Query string `json:"query"`
	// The maximum number of users to be returned; up to 200
	Limit int32 `json:"limit"`
	// The type of users to search for; pass null to search among all chat members
	Filter ChatMembersFilter `json:"filter"`
}

type SearchChatMessagesRequest

type SearchChatMessagesRequest struct {
	// Identifier of the chat in which to search messages
	ChatId int64 `json:"chat_id"`
	// Query to search for
	Query string `json:"query"`
	// Identifier of the sender of messages to search for; pass null to search for messages from any sender. Not supported in secret chats
	SenderId MessageSender `json:"sender_id"`
	// Identifier of the message starting from which history must be fetched; use 0 to get results from the last message
	FromMessageId int64 `json:"from_message_id"`
	// Specify 0 to get results from exactly the from_message_id or a negative offset to get the specified message and some newer messages
	Offset int32 `json:"offset"`
	// The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
	Limit int32 `json:"limit"`
	// Additional filter for messages to search; pass null to search for all messages
	Filter SearchMessagesFilter `json:"filter"`
	// If not 0, only messages in the specified thread will be returned; supergroups only
	MessageThreadId int64 `json:"message_thread_id"`
}

type SearchChatRecentLocationMessagesRequest

type SearchChatRecentLocationMessagesRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The maximum number of messages to be returned
	Limit int32 `json:"limit"`
}

type SearchChatsNearbyRequest

type SearchChatsNearbyRequest struct {
	// Current user location
	Location *Location `json:"location"`
}

type SearchChatsOnServerRequest

type SearchChatsOnServerRequest struct {
	// Query to search for
	Query string `json:"query"`
	// The maximum number of chats to be returned
	Limit int32 `json:"limit"`
}

type SearchChatsRequest

type SearchChatsRequest struct {
	// Query to search for. If the query is empty, returns up to 50 recently found chats
	Query string `json:"query"`
	// The maximum number of chats to be returned
	Limit int32 `json:"limit"`
}

type SearchContactsRequest

type SearchContactsRequest struct {
	// Query to search for; may be empty to return all contacts
	Query string `json:"query"`
	// The maximum number of users to be returned
	Limit int32 `json:"limit"`
}

type SearchEmojisRequest

type SearchEmojisRequest struct {
	// Text to search for
	Text string `json:"text"`
	// Pass true if only emojis, which exactly match the text, needs to be returned
	ExactMatch bool `json:"exact_match"`
	// List of possible IETF language tags of the user's input language; may be empty if unknown
	InputLanguageCodes []string `json:"input_language_codes"`
}

type SearchFileDownloadsRequest added in v1.8.3

type SearchFileDownloadsRequest struct {
	// Query to search for; may be empty to return all downloaded files
	Query string `json:"query"`
	// Pass true to search only for active downloads, including paused
	OnlyActive bool `json:"only_active"`
	// Pass true to search only for completed downloads
	OnlyCompleted bool `json:"only_completed"`
	// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
	Offset string `json:"offset"`
	// The maximum number of files to be returned
	Limit int32 `json:"limit"`
}

type SearchHashtagsRequest

type SearchHashtagsRequest struct {
	// Hashtag prefix to search for
	Prefix string `json:"prefix"`
	// The maximum number of hashtags to be returned
	Limit int32 `json:"limit"`
}

type SearchInstalledStickerSetsRequest

type SearchInstalledStickerSetsRequest struct {
	// Pass true to return mask sticker sets; pass false to return ordinary sticker sets
	IsMasks bool `json:"is_masks"`
	// Query to search for
	Query string `json:"query"`
	// The maximum number of sticker sets to return
	Limit int32 `json:"limit"`
}

type SearchMessagesFilter

type SearchMessagesFilter interface {
	SearchMessagesFilterType() string
}

Represents a filter for message search results

func UnmarshalListOfSearchMessagesFilter

func UnmarshalListOfSearchMessagesFilter(dataList []json.RawMessage) ([]SearchMessagesFilter, error)

func UnmarshalSearchMessagesFilter

func UnmarshalSearchMessagesFilter(data json.RawMessage) (SearchMessagesFilter, error)

type SearchMessagesFilterAnimation

type SearchMessagesFilterAnimation struct {
	// contains filtered or unexported fields
}

Returns only animation messages

func UnmarshalSearchMessagesFilterAnimation

func UnmarshalSearchMessagesFilterAnimation(data json.RawMessage) (*SearchMessagesFilterAnimation, error)

func (*SearchMessagesFilterAnimation) GetClass

func (*SearchMessagesFilterAnimation) GetType

func (*SearchMessagesFilterAnimation) MarshalJSON

func (entity *SearchMessagesFilterAnimation) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterAnimation) SearchMessagesFilterType

func (*SearchMessagesFilterAnimation) SearchMessagesFilterType() string

type SearchMessagesFilterAudio

type SearchMessagesFilterAudio struct {
	// contains filtered or unexported fields
}

Returns only audio messages

func UnmarshalSearchMessagesFilterAudio

func UnmarshalSearchMessagesFilterAudio(data json.RawMessage) (*SearchMessagesFilterAudio, error)

func (*SearchMessagesFilterAudio) GetClass

func (*SearchMessagesFilterAudio) GetClass() string

func (*SearchMessagesFilterAudio) GetType

func (*SearchMessagesFilterAudio) GetType() string

func (*SearchMessagesFilterAudio) MarshalJSON

func (entity *SearchMessagesFilterAudio) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterAudio) SearchMessagesFilterType

func (*SearchMessagesFilterAudio) SearchMessagesFilterType() string

type SearchMessagesFilterChatPhoto

type SearchMessagesFilterChatPhoto struct {
	// contains filtered or unexported fields
}

Returns only messages containing chat photos

func UnmarshalSearchMessagesFilterChatPhoto

func UnmarshalSearchMessagesFilterChatPhoto(data json.RawMessage) (*SearchMessagesFilterChatPhoto, error)

func (*SearchMessagesFilterChatPhoto) GetClass

func (*SearchMessagesFilterChatPhoto) GetType

func (*SearchMessagesFilterChatPhoto) MarshalJSON

func (entity *SearchMessagesFilterChatPhoto) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterChatPhoto) SearchMessagesFilterType

func (*SearchMessagesFilterChatPhoto) SearchMessagesFilterType() string

type SearchMessagesFilterDocument

type SearchMessagesFilterDocument struct {
	// contains filtered or unexported fields
}

Returns only document messages

func UnmarshalSearchMessagesFilterDocument

func UnmarshalSearchMessagesFilterDocument(data json.RawMessage) (*SearchMessagesFilterDocument, error)

func (*SearchMessagesFilterDocument) GetClass

func (*SearchMessagesFilterDocument) GetType

func (*SearchMessagesFilterDocument) MarshalJSON

func (entity *SearchMessagesFilterDocument) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterDocument) SearchMessagesFilterType

func (*SearchMessagesFilterDocument) SearchMessagesFilterType() string

type SearchMessagesFilterEmpty

type SearchMessagesFilterEmpty struct {
	// contains filtered or unexported fields
}

Returns all found messages, no filter is applied

func UnmarshalSearchMessagesFilterEmpty

func UnmarshalSearchMessagesFilterEmpty(data json.RawMessage) (*SearchMessagesFilterEmpty, error)

func (*SearchMessagesFilterEmpty) GetClass

func (*SearchMessagesFilterEmpty) GetClass() string

func (*SearchMessagesFilterEmpty) GetType

func (*SearchMessagesFilterEmpty) GetType() string

func (*SearchMessagesFilterEmpty) MarshalJSON

func (entity *SearchMessagesFilterEmpty) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterEmpty) SearchMessagesFilterType

func (*SearchMessagesFilterEmpty) SearchMessagesFilterType() string

type SearchMessagesFilterFailedToSend

type SearchMessagesFilterFailedToSend struct {
	// contains filtered or unexported fields
}

Returns only failed to send messages. This filter can be used only if the message database is used

func UnmarshalSearchMessagesFilterFailedToSend

func UnmarshalSearchMessagesFilterFailedToSend(data json.RawMessage) (*SearchMessagesFilterFailedToSend, error)

func (*SearchMessagesFilterFailedToSend) GetClass

func (*SearchMessagesFilterFailedToSend) GetType

func (*SearchMessagesFilterFailedToSend) MarshalJSON

func (entity *SearchMessagesFilterFailedToSend) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterFailedToSend) SearchMessagesFilterType

func (*SearchMessagesFilterFailedToSend) SearchMessagesFilterType() string

type SearchMessagesFilterMention

type SearchMessagesFilterMention struct {
	// contains filtered or unexported fields
}

Returns only messages with mentions of the current user, or messages that are replies to their messages

func UnmarshalSearchMessagesFilterMention

func UnmarshalSearchMessagesFilterMention(data json.RawMessage) (*SearchMessagesFilterMention, error)

func (*SearchMessagesFilterMention) GetClass

func (*SearchMessagesFilterMention) GetClass() string

func (*SearchMessagesFilterMention) GetType

func (*SearchMessagesFilterMention) MarshalJSON

func (entity *SearchMessagesFilterMention) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterMention) SearchMessagesFilterType

func (*SearchMessagesFilterMention) SearchMessagesFilterType() string

type SearchMessagesFilterPhoto

type SearchMessagesFilterPhoto struct {
	// contains filtered or unexported fields
}

Returns only photo messages

func UnmarshalSearchMessagesFilterPhoto

func UnmarshalSearchMessagesFilterPhoto(data json.RawMessage) (*SearchMessagesFilterPhoto, error)

func (*SearchMessagesFilterPhoto) GetClass

func (*SearchMessagesFilterPhoto) GetClass() string

func (*SearchMessagesFilterPhoto) GetType

func (*SearchMessagesFilterPhoto) GetType() string

func (*SearchMessagesFilterPhoto) MarshalJSON

func (entity *SearchMessagesFilterPhoto) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterPhoto) SearchMessagesFilterType

func (*SearchMessagesFilterPhoto) SearchMessagesFilterType() string

type SearchMessagesFilterPhotoAndVideo

type SearchMessagesFilterPhotoAndVideo struct {
	// contains filtered or unexported fields
}

Returns only photo and video messages

func UnmarshalSearchMessagesFilterPhotoAndVideo

func UnmarshalSearchMessagesFilterPhotoAndVideo(data json.RawMessage) (*SearchMessagesFilterPhotoAndVideo, error)

func (*SearchMessagesFilterPhotoAndVideo) GetClass

func (*SearchMessagesFilterPhotoAndVideo) GetType

func (*SearchMessagesFilterPhotoAndVideo) MarshalJSON

func (entity *SearchMessagesFilterPhotoAndVideo) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterPhotoAndVideo) SearchMessagesFilterType

func (*SearchMessagesFilterPhotoAndVideo) SearchMessagesFilterType() string

type SearchMessagesFilterPinned

type SearchMessagesFilterPinned struct {
	// contains filtered or unexported fields
}

Returns only pinned messages

func UnmarshalSearchMessagesFilterPinned

func UnmarshalSearchMessagesFilterPinned(data json.RawMessage) (*SearchMessagesFilterPinned, error)

func (*SearchMessagesFilterPinned) GetClass

func (*SearchMessagesFilterPinned) GetClass() string

func (*SearchMessagesFilterPinned) GetType

func (*SearchMessagesFilterPinned) MarshalJSON

func (entity *SearchMessagesFilterPinned) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterPinned) SearchMessagesFilterType

func (*SearchMessagesFilterPinned) SearchMessagesFilterType() string

type SearchMessagesFilterUnreadMention

type SearchMessagesFilterUnreadMention struct {
	// contains filtered or unexported fields
}

Returns only messages with unread mentions of the current user, or messages that are replies to their messages. When using this filter the results can't be additionally filtered by a query, a message thread or by the sending user

func UnmarshalSearchMessagesFilterUnreadMention

func UnmarshalSearchMessagesFilterUnreadMention(data json.RawMessage) (*SearchMessagesFilterUnreadMention, error)

func (*SearchMessagesFilterUnreadMention) GetClass

func (*SearchMessagesFilterUnreadMention) GetType

func (*SearchMessagesFilterUnreadMention) MarshalJSON

func (entity *SearchMessagesFilterUnreadMention) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterUnreadMention) SearchMessagesFilterType

func (*SearchMessagesFilterUnreadMention) SearchMessagesFilterType() string

type SearchMessagesFilterUnreadReaction added in v1.8.3

type SearchMessagesFilterUnreadReaction struct {
	// contains filtered or unexported fields
}

Returns only messages with unread reactions for the current user. When using this filter the results can't be additionally filtered by a query, a message thread or by the sending user

func UnmarshalSearchMessagesFilterUnreadReaction added in v1.8.3

func UnmarshalSearchMessagesFilterUnreadReaction(data json.RawMessage) (*SearchMessagesFilterUnreadReaction, error)

func (*SearchMessagesFilterUnreadReaction) GetClass added in v1.8.3

func (*SearchMessagesFilterUnreadReaction) GetType added in v1.8.3

func (*SearchMessagesFilterUnreadReaction) MarshalJSON added in v1.8.3

func (entity *SearchMessagesFilterUnreadReaction) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterUnreadReaction) SearchMessagesFilterType added in v1.8.3

func (*SearchMessagesFilterUnreadReaction) SearchMessagesFilterType() string

type SearchMessagesFilterUrl

type SearchMessagesFilterUrl struct {
	// contains filtered or unexported fields
}

Returns only messages containing URLs

func UnmarshalSearchMessagesFilterUrl

func UnmarshalSearchMessagesFilterUrl(data json.RawMessage) (*SearchMessagesFilterUrl, error)

func (*SearchMessagesFilterUrl) GetClass

func (*SearchMessagesFilterUrl) GetClass() string

func (*SearchMessagesFilterUrl) GetType

func (*SearchMessagesFilterUrl) GetType() string

func (*SearchMessagesFilterUrl) MarshalJSON

func (entity *SearchMessagesFilterUrl) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterUrl) SearchMessagesFilterType

func (*SearchMessagesFilterUrl) SearchMessagesFilterType() string

type SearchMessagesFilterVideo

type SearchMessagesFilterVideo struct {
	// contains filtered or unexported fields
}

Returns only video messages

func UnmarshalSearchMessagesFilterVideo

func UnmarshalSearchMessagesFilterVideo(data json.RawMessage) (*SearchMessagesFilterVideo, error)

func (*SearchMessagesFilterVideo) GetClass

func (*SearchMessagesFilterVideo) GetClass() string

func (*SearchMessagesFilterVideo) GetType

func (*SearchMessagesFilterVideo) GetType() string

func (*SearchMessagesFilterVideo) MarshalJSON

func (entity *SearchMessagesFilterVideo) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterVideo) SearchMessagesFilterType

func (*SearchMessagesFilterVideo) SearchMessagesFilterType() string

type SearchMessagesFilterVideoNote

type SearchMessagesFilterVideoNote struct {
	// contains filtered or unexported fields
}

Returns only video note messages

func UnmarshalSearchMessagesFilterVideoNote

func UnmarshalSearchMessagesFilterVideoNote(data json.RawMessage) (*SearchMessagesFilterVideoNote, error)

func (*SearchMessagesFilterVideoNote) GetClass

func (*SearchMessagesFilterVideoNote) GetType

func (*SearchMessagesFilterVideoNote) MarshalJSON

func (entity *SearchMessagesFilterVideoNote) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterVideoNote) SearchMessagesFilterType

func (*SearchMessagesFilterVideoNote) SearchMessagesFilterType() string

type SearchMessagesFilterVoiceAndVideoNote

type SearchMessagesFilterVoiceAndVideoNote struct {
	// contains filtered or unexported fields
}

Returns only voice and video note messages

func UnmarshalSearchMessagesFilterVoiceAndVideoNote

func UnmarshalSearchMessagesFilterVoiceAndVideoNote(data json.RawMessage) (*SearchMessagesFilterVoiceAndVideoNote, error)

func (*SearchMessagesFilterVoiceAndVideoNote) GetClass

func (*SearchMessagesFilterVoiceAndVideoNote) GetType

func (*SearchMessagesFilterVoiceAndVideoNote) MarshalJSON

func (entity *SearchMessagesFilterVoiceAndVideoNote) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterVoiceAndVideoNote) SearchMessagesFilterType

func (*SearchMessagesFilterVoiceAndVideoNote) SearchMessagesFilterType() string

type SearchMessagesFilterVoiceNote

type SearchMessagesFilterVoiceNote struct {
	// contains filtered or unexported fields
}

Returns only voice note messages

func UnmarshalSearchMessagesFilterVoiceNote

func UnmarshalSearchMessagesFilterVoiceNote(data json.RawMessage) (*SearchMessagesFilterVoiceNote, error)

func (*SearchMessagesFilterVoiceNote) GetClass

func (*SearchMessagesFilterVoiceNote) GetType

func (*SearchMessagesFilterVoiceNote) MarshalJSON

func (entity *SearchMessagesFilterVoiceNote) MarshalJSON() ([]byte, error)

func (*SearchMessagesFilterVoiceNote) SearchMessagesFilterType

func (*SearchMessagesFilterVoiceNote) SearchMessagesFilterType() string

type SearchMessagesRequest

type SearchMessagesRequest struct {
	// Chat list in which to search messages; pass null to search in all chats regardless of their chat list. Only Main and Archive chat lists are supported
	ChatList ChatList `json:"chat_list"`
	// Query to search for
	Query string `json:"query"`
	// The date of the message starting from which the results need to be fetched. Use 0 or any date in the future to get results from the last message
	OffsetDate int32 `json:"offset_date"`
	// The chat identifier of the last found message, or 0 for the first request
	OffsetChatId int64 `json:"offset_chat_id"`
	// The message identifier of the last found message, or 0 for the first request
	OffsetMessageId int64 `json:"offset_message_id"`
	// The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
	Limit int32 `json:"limit"`
	// Additional filter for messages to search; pass null to search for all messages. Filters searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, searchMessagesFilterFailedToSend, and searchMessagesFilterPinned are unsupported in this function
	Filter SearchMessagesFilter `json:"filter"`
	// If not 0, the minimum date of the messages to return
	MinDate int32 `json:"min_date"`
	// If not 0, the maximum date of the messages to return
	MaxDate int32 `json:"max_date"`
}

type SearchOutgoingDocumentMessagesRequest added in v1.8.3

type SearchOutgoingDocumentMessagesRequest struct {
	// Query to search for in document file name and message caption
	Query string `json:"query"`
	// The maximum number of messages to be returned; up to 100
	Limit int32 `json:"limit"`
}

type SearchPublicChatRequest

type SearchPublicChatRequest struct {
	// Username to be resolved
	Username string `json:"username"`
}

type SearchPublicChatsRequest

type SearchPublicChatsRequest struct {
	// Query to search for
	Query string `json:"query"`
}

type SearchSecretMessagesRequest

type SearchSecretMessagesRequest struct {
	// Identifier of the chat in which to search. Specify 0 to search in all secret chats
	ChatId int64 `json:"chat_id"`
	// Query to search for. If empty, searchChatMessages must be used instead
	Query string `json:"query"`
	// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
	Offset string `json:"offset"`
	// The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
	Limit int32 `json:"limit"`
	// Additional filter for messages to search; pass null to search for all messages
	Filter SearchMessagesFilter `json:"filter"`
}

type SearchStickerSetRequest

type SearchStickerSetRequest struct {
	// Name of the sticker set
	Name string `json:"name"`
}

type SearchStickerSetsRequest

type SearchStickerSetsRequest struct {
	// Query to search for
	Query string `json:"query"`
}

type SearchStickersRequest

type SearchStickersRequest struct {
	// String representation of emoji; must be non-empty
	Emoji string `json:"emoji"`
	// The maximum number of stickers to be returned
	Limit int32 `json:"limit"`
}

type SearchUserByPhoneNumberRequest added in v1.8.3

type SearchUserByPhoneNumberRequest struct {
	// Phone number to search for
	PhoneNumber string `json:"phone_number"`
}

type Seconds

type Seconds struct {

	// Number of seconds
	Seconds float64 `json:"seconds"`
	// contains filtered or unexported fields
}

Contains a value representing a number of seconds

func UnmarshalSeconds

func UnmarshalSeconds(data json.RawMessage) (*Seconds, error)

func (*Seconds) GetClass

func (*Seconds) GetClass() string

func (*Seconds) GetType

func (*Seconds) GetType() string

func (*Seconds) MarshalJSON

func (entity *Seconds) MarshalJSON() ([]byte, error)

type SecretChat

type SecretChat struct {

	// Secret chat identifier
	Id int32 `json:"id"`
	// Identifier of the chat partner
	UserId int64 `json:"user_id"`
	// State of the secret chat
	State SecretChatState `json:"state"`
	// True, if the chat was created by the current user; otherwise false
	IsOutbound bool `json:"is_outbound"`
	// Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers
	KeyHash []byte `json:"key_hash"`
	// Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101
	Layer int32 `json:"layer"`
	// contains filtered or unexported fields
}

Represents a secret chat

func UnmarshalSecretChat

func UnmarshalSecretChat(data json.RawMessage) (*SecretChat, error)

func (*SecretChat) GetClass

func (*SecretChat) GetClass() string

func (*SecretChat) GetType

func (*SecretChat) GetType() string

func (*SecretChat) MarshalJSON

func (entity *SecretChat) MarshalJSON() ([]byte, error)

func (*SecretChat) UnmarshalJSON

func (secretChat *SecretChat) UnmarshalJSON(data []byte) error

type SecretChatState

type SecretChatState interface {
	SecretChatStateType() string
}

Describes the current secret chat state

func UnmarshalListOfSecretChatState

func UnmarshalListOfSecretChatState(dataList []json.RawMessage) ([]SecretChatState, error)

func UnmarshalSecretChatState

func UnmarshalSecretChatState(data json.RawMessage) (SecretChatState, error)

type SecretChatStateClosed

type SecretChatStateClosed struct {
	// contains filtered or unexported fields
}

The secret chat is closed

func UnmarshalSecretChatStateClosed

func UnmarshalSecretChatStateClosed(data json.RawMessage) (*SecretChatStateClosed, error)

func (*SecretChatStateClosed) GetClass

func (*SecretChatStateClosed) GetClass() string

func (*SecretChatStateClosed) GetType

func (*SecretChatStateClosed) GetType() string

func (*SecretChatStateClosed) MarshalJSON

func (entity *SecretChatStateClosed) MarshalJSON() ([]byte, error)

func (*SecretChatStateClosed) SecretChatStateType

func (*SecretChatStateClosed) SecretChatStateType() string

type SecretChatStatePending

type SecretChatStatePending struct {
	// contains filtered or unexported fields
}

The secret chat is not yet created; waiting for the other user to get online

func UnmarshalSecretChatStatePending

func UnmarshalSecretChatStatePending(data json.RawMessage) (*SecretChatStatePending, error)

func (*SecretChatStatePending) GetClass

func (*SecretChatStatePending) GetClass() string

func (*SecretChatStatePending) GetType

func (*SecretChatStatePending) GetType() string

func (*SecretChatStatePending) MarshalJSON

func (entity *SecretChatStatePending) MarshalJSON() ([]byte, error)

func (*SecretChatStatePending) SecretChatStateType

func (*SecretChatStatePending) SecretChatStateType() string

type SecretChatStateReady

type SecretChatStateReady struct {
	// contains filtered or unexported fields
}

The secret chat is ready to use

func UnmarshalSecretChatStateReady

func UnmarshalSecretChatStateReady(data json.RawMessage) (*SecretChatStateReady, error)

func (*SecretChatStateReady) GetClass

func (*SecretChatStateReady) GetClass() string

func (*SecretChatStateReady) GetType

func (*SecretChatStateReady) GetType() string

func (*SecretChatStateReady) MarshalJSON

func (entity *SecretChatStateReady) MarshalJSON() ([]byte, error)

func (*SecretChatStateReady) SecretChatStateType

func (*SecretChatStateReady) SecretChatStateType() string

type SendBotStartMessageRequest

type SendBotStartMessageRequest struct {
	// Identifier of the bot
	BotUserId int64 `json:"bot_user_id"`
	// Identifier of the target chat
	ChatId int64 `json:"chat_id"`
	// A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking)
	Parameter string `json:"parameter"`
}

type SendCallDebugInformationRequest

type SendCallDebugInformationRequest struct {
	// Call identifier
	CallId int32 `json:"call_id"`
	// Debug information in application-specific format
	DebugInformation string `json:"debug_information"`
}

type SendCallRatingRequest

type SendCallRatingRequest struct {
	// Call identifier
	CallId int32 `json:"call_id"`
	// Call rating; 1-5
	Rating int32 `json:"rating"`
	// An optional user comment if the rating is less than 5
	Comment string `json:"comment"`
	// List of the exact types of problems with the call, specified by the user
	Problems []CallProblem `json:"problems"`
}

type SendCallSignalingDataRequest

type SendCallSignalingDataRequest struct {
	// Call identifier
	CallId int32 `json:"call_id"`
	// The data
	Data []byte `json:"data"`
}

type SendChatActionRequest

type SendChatActionRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// If not 0, a message thread identifier in which the action was performed
	MessageThreadId int64 `json:"message_thread_id"`
	// The action description; pass null to cancel the currently active action
	Action ChatAction `json:"action"`
}

type SendChatScreenshotTakenNotificationRequest

type SendChatScreenshotTakenNotificationRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
}

type SendCustomRequestRequest

type SendCustomRequestRequest struct {
	// The method name
	Method string `json:"method"`
	// JSON-serialized method parameters
	Parameters string `json:"parameters"`
}

type SendEmailAddressVerificationCodeRequest

type SendEmailAddressVerificationCodeRequest struct {
	// Email address
	EmailAddress string `json:"email_address"`
}

type SendInlineQueryResultMessageRequest

type SendInlineQueryResultMessageRequest struct {
	// Target chat
	ChatId int64 `json:"chat_id"`
	// If not 0, a message thread identifier in which the message will be sent
	MessageThreadId int64 `json:"message_thread_id"`
	// Identifier of a replied message; 0 if none
	ReplyToMessageId int64 `json:"reply_to_message_id"`
	// Options to be used to send the message; pass null to use default options
	Options *MessageSendOptions `json:"options"`
	// Identifier of the inline query
	QueryId JsonInt64 `json:"query_id"`
	// Identifier of the inline result
	ResultId string `json:"result_id"`
	// Pass true to hide the bot, via which the message is sent. Can be used only for bots GetOption("animation_search_bot_username"), GetOption("photo_search_bot_username"), and GetOption("venue_search_bot_username")
	HideViaBot bool `json:"hide_via_bot"`
}

type SendMessageAlbumRequest

type SendMessageAlbumRequest struct {
	// Target chat
	ChatId int64 `json:"chat_id"`
	// If not 0, a message thread identifier in which the messages will be sent
	MessageThreadId int64 `json:"message_thread_id"`
	// Identifier of a replied message; 0 if none
	ReplyToMessageId int64 `json:"reply_to_message_id"`
	// Options to be used to send the messages; pass null to use default options
	Options *MessageSendOptions `json:"options"`
	// Contents of messages to be sent. At most 10 messages can be added to an album
	InputMessageContents []InputMessageContent `json:"input_message_contents"`
	// Pass true to get fake messages instead of actually sending them
	OnlyPreview bool `json:"only_preview"`
}

type SendMessageRequest

type SendMessageRequest struct {
	// Target chat
	ChatId int64 `json:"chat_id"`
	// If not 0, a message thread identifier in which the message will be sent
	MessageThreadId int64 `json:"message_thread_id"`
	// Identifier of the replied message; 0 if none
	ReplyToMessageId int64 `json:"reply_to_message_id"`
	// Options to be used to send the message; pass null to use default options
	Options *MessageSendOptions `json:"options"`
	// Markup for replying to the message; pass null if none; for bots only
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// The content of the message to be sent
	InputMessageContent InputMessageContent `json:"input_message_content"`
}

type SendPassportAuthorizationFormRequest

type SendPassportAuthorizationFormRequest struct {
	// Authorization form identifier
	AutorizationFormId int32 `json:"autorization_form_id"`
	// Types of Telegram Passport elements chosen by user to complete the authorization form
	Types []PassportElementType `json:"types"`
}

type SendPaymentFormRequest

type SendPaymentFormRequest struct {
	// Chat identifier of the Invoice message
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// Payment form identifier returned by getPaymentForm
	PaymentFormId JsonInt64 `json:"payment_form_id"`
	// Identifier returned by validateOrderInfo, or an empty string
	OrderInfoId string `json:"order_info_id"`
	// Identifier of a chosen shipping option, if applicable
	ShippingOptionId string `json:"shipping_option_id"`
	// The credentials chosen by user for payment
	Credentials InputCredentials `json:"credentials"`
	// Chosen by the user amount of tip in the smallest units of the currency
	TipAmount int64 `json:"tip_amount"`
}

type SendPhoneNumberConfirmationCodeRequest

type SendPhoneNumberConfirmationCodeRequest struct {
	// Hash value from the link
	Hash string `json:"hash"`
	// Phone number value from the link
	PhoneNumber string `json:"phone_number"`
	// Settings for the authentication of the user's phone number; pass null to use default settings
	Settings *PhoneNumberAuthenticationSettings `json:"settings"`
}

type SendPhoneNumberVerificationCodeRequest

type SendPhoneNumberVerificationCodeRequest struct {
	// The phone number of the user, in international format
	PhoneNumber string `json:"phone_number"`
	// Settings for the authentication of the user's phone number; pass null to use default settings
	Settings *PhoneNumberAuthenticationSettings `json:"settings"`
}

type SendWebAppDataRequest added in v1.8.3

type SendWebAppDataRequest struct {
	// Identifier of the target bot
	BotUserId int64 `json:"bot_user_id"`
	// Text of the keyboardButtonTypeWebApp button, which opened the web app
	ButtonText string `json:"button_text"`
	// Received data
	Data string `json:"data"`
}

type SentWebAppMessage added in v1.8.3

type SentWebAppMessage struct {

	// Identifier of the sent inline message, if known
	InlineMessageId string `json:"inline_message_id"`
	// contains filtered or unexported fields
}

Information about the message sent by answerWebAppQuery

func UnmarshalSentWebAppMessage added in v1.8.3

func UnmarshalSentWebAppMessage(data json.RawMessage) (*SentWebAppMessage, error)

func (*SentWebAppMessage) GetClass added in v1.8.3

func (*SentWebAppMessage) GetClass() string

func (*SentWebAppMessage) GetType added in v1.8.3

func (*SentWebAppMessage) GetType() string

func (*SentWebAppMessage) MarshalJSON added in v1.8.3

func (entity *SentWebAppMessage) MarshalJSON() ([]byte, error)

type Session

type Session struct {

	// Session identifier
	Id JsonInt64 `json:"id"`
	// True, if this session is the current session
	IsCurrent bool `json:"is_current"`
	// True, if a password is needed to complete authorization of the session
	IsPasswordPending bool `json:"is_password_pending"`
	// True, if incoming secret chats can be accepted by the session
	CanAcceptSecretChats bool `json:"can_accept_secret_chats"`
	// True, if incoming calls can be accepted by the session
	CanAcceptCalls bool `json:"can_accept_calls"`
	// Telegram API identifier, as provided by the application
	ApiId int32 `json:"api_id"`
	// Name of the application, as provided by the application
	ApplicationName string `json:"application_name"`
	// The version of the application, as provided by the application
	ApplicationVersion string `json:"application_version"`
	// True, if the application is an official application or uses the api_id of an official application
	IsOfficialApplication bool `json:"is_official_application"`
	// Model of the device the application has been run or is running on, as provided by the application
	DeviceModel string `json:"device_model"`
	// Operating system the application has been run or is running on, as provided by the application
	Platform string `json:"platform"`
	// Version of the operating system the application has been run or is running on, as provided by the application
	SystemVersion string `json:"system_version"`
	// Point in time (Unix timestamp) when the user has logged in
	LogInDate int32 `json:"log_in_date"`
	// Point in time (Unix timestamp) when the session was last used
	LastActiveDate int32 `json:"last_active_date"`
	// IP address from which the session was created, in human-readable format
	Ip string `json:"ip"`
	// A two-letter country code for the country from which the session was created, based on the IP address
	Country string `json:"country"`
	// Region code from which the session was created, based on the IP address
	Region string `json:"region"`
	// contains filtered or unexported fields
}

Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order

func UnmarshalSession

func UnmarshalSession(data json.RawMessage) (*Session, error)

func (*Session) GetClass

func (*Session) GetClass() string

func (*Session) GetType

func (*Session) GetType() string

func (*Session) MarshalJSON

func (entity *Session) MarshalJSON() ([]byte, error)

type Sessions

type Sessions struct {

	// List of sessions
	Sessions []*Session `json:"sessions"`
	// Number of days of inactivity before sessions will automatically be terminated; 1-366 days
	InactiveSessionTtlDays int32 `json:"inactive_session_ttl_days"`
	// contains filtered or unexported fields
}

Contains a list of sessions

func UnmarshalSessions

func UnmarshalSessions(data json.RawMessage) (*Sessions, error)

func (*Sessions) GetClass

func (*Sessions) GetClass() string

func (*Sessions) GetType

func (*Sessions) GetType() string

func (*Sessions) MarshalJSON

func (entity *Sessions) MarshalJSON() ([]byte, error)

type SetAccountTtlRequest

type SetAccountTtlRequest struct {
	// New account TTL
	Ttl *AccountTtl `json:"ttl"`
}

type SetAlarmRequest

type SetAlarmRequest struct {
	// Number of seconds before the function returns
	Seconds float64 `json:"seconds"`
}

type SetAuthenticationPhoneNumberRequest

type SetAuthenticationPhoneNumberRequest struct {
	// The phone number of the user, in international format
	PhoneNumber string `json:"phone_number"`
	// Settings for the authentication of the user's phone number; pass null to use default settings
	Settings *PhoneNumberAuthenticationSettings `json:"settings"`
}

type SetAutoDownloadSettingsRequest

type SetAutoDownloadSettingsRequest struct {
	// New user auto-download settings
	Settings *AutoDownloadSettings `json:"settings"`
	// Type of the network for which the new settings are relevant
	Type NetworkType `json:"type"`
}

type SetBackgroundRequest

type SetBackgroundRequest struct {
	// The input background to use; pass null to create a new filled backgrounds or to remove the current background
	Background InputBackground `json:"background"`
	// Background type; pass null to use the default type of the remote background or to remove the current background
	Type BackgroundType `json:"type"`
	// Pass true if the background is changed for a dark theme
	ForDarkTheme bool `json:"for_dark_theme"`
}

type SetBioRequest

type SetBioRequest struct {
	// The new value of the user bio; 0-70 characters without line feeds
	Bio string `json:"bio"`
}

type SetBotUpdatesStatusRequest

type SetBotUpdatesStatusRequest struct {
	// The number of pending updates
	PendingUpdateCount int32 `json:"pending_update_count"`
	// The last error message
	ErrorMessage string `json:"error_message"`
}

type SetChatAvailableReactionsRequest added in v1.8.3

type SetChatAvailableReactionsRequest struct {
	// Identifier of the chat
	ChatId int64 `json:"chat_id"`
	// New list of reactions, available in the chat. All reactions must be active
	AvailableReactions []string `json:"available_reactions"`
}

type SetChatClientDataRequest

type SetChatClientDataRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of client_data
	ClientData string `json:"client_data"`
}

type SetChatDescriptionRequest

type SetChatDescriptionRequest struct {
	// Identifier of the chat
	ChatId int64 `json:"chat_id"`
	// New chat description; 0-255 characters
	Description string `json:"description"`
}

type SetChatDiscussionGroupRequest

type SetChatDiscussionGroupRequest struct {
	// Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages rights in the supergroup)
	ChatId int64 `json:"chat_id"`
	// Identifier of a new channel's discussion group. Use 0 to remove the discussion group. Use the method getSuitableDiscussionChats to find all suitable groups. Basic group chats must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that
	DiscussionChatId int64 `json:"discussion_chat_id"`
}

type SetChatDraftMessageRequest

type SetChatDraftMessageRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// If not 0, a message thread identifier in which the draft was changed
	MessageThreadId int64 `json:"message_thread_id"`
	// New draft message; pass null to remove the draft
	DraftMessage *DraftMessage `json:"draft_message"`
}

type SetChatLocationRequest

type SetChatLocationRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New location for the chat; must be valid and not null
	Location *ChatLocation `json:"location"`
}

type SetChatMemberStatusRequest

type SetChatMemberStatusRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Member identifier. Chats can be only banned and unbanned in supergroups and channels
	MemberId MessageSender `json:"member_id"`
	// The new status of the member in the chat
	Status ChatMemberStatus `json:"status"`
}

type SetChatMessageSenderRequest added in v1.8.3

type SetChatMessageSenderRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New message sender for the chat
	MessageSenderId MessageSender `json:"message_sender_id"`
}

type SetChatMessageTtlRequest added in v1.8.3

type SetChatMessageTtlRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New TTL value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400
	Ttl int32 `json:"ttl"`
}

type SetChatNotificationSettingsRequest

type SetChatNotificationSettingsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New notification settings for the chat. If the chat is muted for more than 1 week, it is considered to be muted forever
	NotificationSettings *ChatNotificationSettings `json:"notification_settings"`
}

type SetChatPermissionsRequest

type SetChatPermissionsRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New non-administrator members permissions in the chat
	Permissions *ChatPermissions `json:"permissions"`
}

type SetChatPhotoRequest

type SetChatPhotoRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New chat photo; pass null to delete the chat photo
	Photo InputChatPhoto `json:"photo"`
}

type SetChatSlowModeDelayRequest

type SetChatSlowModeDelayRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New slow mode delay for the chat, in seconds; must be one of 0, 10, 30, 60, 300, 900, 3600
	SlowModeDelay int32 `json:"slow_mode_delay"`
}

type SetChatThemeRequest added in v1.7.10

type SetChatThemeRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Name of the new chat theme; pass an empty string to return the default theme
	ThemeName string `json:"theme_name"`
}

type SetChatTitleRequest

type SetChatTitleRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New title of the chat; 1-128 characters
	Title string `json:"title"`
}

type SetCommandsRequest

type SetCommandsRequest struct {
	// The scope to which the commands are relevant; pass null to change commands in the default bot command scope
	Scope BotCommandScope `json:"scope"`
	// A two-letter ISO 639-1 language code. If empty, the commands will be applied to all users from the given scope, for which language there are no dedicated commands
	LanguageCode string `json:"language_code"`
	// List of the bot's commands
	Commands []*BotCommand `json:"commands"`
}

type SetCustomLanguagePackRequest

type SetCustomLanguagePackRequest struct {
	// Information about the language pack. Language pack ID must start with 'X', consist only of English letters, digits and hyphens, and must not exceed 64 characters. Can be called before authorization
	Info *LanguagePackInfo `json:"info"`
	// Strings of the new language pack
	Strings []*LanguagePackString `json:"strings"`
}

type SetCustomLanguagePackStringRequest

type SetCustomLanguagePackStringRequest struct {
	// Identifier of a previously added custom local language pack in the current localization target
	LanguagePackId string `json:"language_pack_id"`
	// New language pack string
	NewString *LanguagePackString `json:"new_string"`
}

type SetDatabaseEncryptionKeyRequest

type SetDatabaseEncryptionKeyRequest struct {
	// New encryption key
	NewEncryptionKey []byte `json:"new_encryption_key"`
}

type SetDefaultChannelAdministratorRightsRequest added in v1.8.3

type SetDefaultChannelAdministratorRightsRequest struct {
	// Default administrator rights for adding the bot to channels; may be null
	DefaultChannelAdministratorRights *ChatAdministratorRights `json:"default_channel_administrator_rights"`
}

type SetDefaultGroupAdministratorRightsRequest added in v1.8.3

type SetDefaultGroupAdministratorRightsRequest struct {
	// Default administrator rights for adding the bot to basic group and supergroup chats; may be null
	DefaultGroupAdministratorRights *ChatAdministratorRights `json:"default_group_administrator_rights"`
}

type SetFileGenerationProgressRequest

type SetFileGenerationProgressRequest struct {
	// The identifier of the generation process
	GenerationId JsonInt64 `json:"generation_id"`
	// Expected size of the generated file, in bytes; 0 if unknown
	ExpectedSize int32 `json:"expected_size"`
	// The number of bytes already generated
	LocalPrefixSize int32 `json:"local_prefix_size"`
}

type SetGameScoreRequest

type SetGameScoreRequest struct {
	// The chat to which the message with the game belongs
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// Pass true to edit the game message to include the current scoreboard
	EditMessage bool `json:"edit_message"`
	// User identifier
	UserId int64 `json:"user_id"`
	// The new score
	Score int32 `json:"score"`
	// Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table
	Force bool `json:"force"`
}

type SetGroupCallParticipantIsSpeakingRequest added in v1.7.10

type SetGroupCallParticipantIsSpeakingRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Group call participant's synchronization audio source identifier, or 0 for the current user
	AudioSource int32 `json:"audio_source"`
	// Pass true if the user is speaking
	IsSpeaking bool `json:"is_speaking"`
}

type SetGroupCallParticipantVolumeLevelRequest added in v1.7.10

type SetGroupCallParticipantVolumeLevelRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Participant identifier
	ParticipantId MessageSender `json:"participant_id"`
	// New participant's volume level; 1-20000 in hundreds of percents
	VolumeLevel int32 `json:"volume_level"`
}

type SetGroupCallTitleRequest added in v1.7.10

type SetGroupCallTitleRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// New group call title; 1-64 characters
	Title string `json:"title"`
}

type SetInactiveSessionTtlRequest added in v1.7.10

type SetInactiveSessionTtlRequest struct {
	// New number of days of inactivity before sessions will be automatically terminated; 1-366 days
	InactiveSessionTtlDays int32 `json:"inactive_session_ttl_days"`
}

type SetInlineGameScoreRequest

type SetInlineGameScoreRequest struct {
	// Inline message identifier
	InlineMessageId string `json:"inline_message_id"`
	// Pass true to edit the game message to include the current scoreboard
	EditMessage bool `json:"edit_message"`
	// User identifier
	UserId int64 `json:"user_id"`
	// The new score
	Score int32 `json:"score"`
	// Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table
	Force bool `json:"force"`
}

type SetLocationRequest

type SetLocationRequest struct {
	// The new location of the user
	Location *Location `json:"location"`
}

type SetLogStreamRequest

type SetLogStreamRequest struct {
	// New log stream
	LogStream LogStream `json:"log_stream"`
}

type SetLogTagVerbosityLevelRequest

type SetLogTagVerbosityLevelRequest struct {
	// Logging tag to change verbosity level
	Tag string `json:"tag"`
	// New verbosity level; 1-1024
	NewVerbosityLevel int32 `json:"new_verbosity_level"`
}

type SetLogVerbosityLevelRequest

type SetLogVerbosityLevelRequest struct {
	// New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging
	NewVerbosityLevel int32 `json:"new_verbosity_level"`
}

type SetMenuButtonRequest added in v1.8.3

type SetMenuButtonRequest struct {
	// Identifier of the user or 0 to set menu button for all users
	UserId int64 `json:"user_id"`
	// New menu button
	MenuButton *BotMenuButton `json:"menu_button"`
}

type SetMessageReactionRequest added in v1.8.3

type SetMessageReactionRequest struct {
	// Identifier of the chat to which the message belongs
	ChatId int64 `json:"chat_id"`
	// Identifier of the message
	MessageId int64 `json:"message_id"`
	// Text representation of the new chosen reaction. Can be an empty string or the currently chosen non-big reaction to remove the reaction
	Reaction string `json:"reaction"`
	// Pass true if the reaction is added with a big animation
	IsBig bool `json:"is_big"`
}

type SetNameRequest

type SetNameRequest struct {
	// The new value of the first name for the current user; 1-64 characters
	FirstName string `json:"first_name"`
	// The new value of the optional last name for the current user; 0-64 characters
	LastName string `json:"last_name"`
}

type SetNetworkTypeRequest

type SetNetworkTypeRequest struct {
	// The new network type; pass null to set network type to networkTypeOther
	Type NetworkType `json:"type"`
}

type SetOptionRequest

type SetOptionRequest struct {
	// The name of the option
	Name string `json:"name"`
	// The new value of the option; pass null to reset option value to a default value
	Value OptionValue `json:"value"`
}

type SetPassportElementErrorsRequest

type SetPassportElementErrorsRequest struct {
	// User identifier
	UserId int64 `json:"user_id"`
	// The errors
	Errors []*InputPassportElementError `json:"errors"`
}

type SetPassportElementRequest

type SetPassportElementRequest struct {
	// Input Telegram Passport element
	Element InputPassportElement `json:"element"`
	// Password of the current user
	Password string `json:"password"`
}

type SetPasswordRequest

type SetPasswordRequest struct {
	// Previous password of the user
	OldPassword string `json:"old_password"`
	// New password of the user; may be empty to remove the password
	NewPassword string `json:"new_password"`
	// New password hint; may be empty
	NewHint string `json:"new_hint"`
	// Pass true to change also the recovery email address
	SetRecoveryEmailAddress bool `json:"set_recovery_email_address"`
	// New recovery email address; may be empty
	NewRecoveryEmailAddress string `json:"new_recovery_email_address"`
}

type SetPinnedChatsRequest

type SetPinnedChatsRequest struct {
	// Chat list in which to change the order of pinned chats
	ChatList ChatList `json:"chat_list"`
	// The new list of pinned chats
	ChatIds []int64 `json:"chat_ids"`
}

type SetPollAnswerRequest

type SetPollAnswerRequest struct {
	// Identifier of the chat to which the poll belongs
	ChatId int64 `json:"chat_id"`
	// Identifier of the message containing the poll
	MessageId int64 `json:"message_id"`
	// 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers
	OptionIds []int32 `json:"option_ids"`
}

type SetProfilePhotoRequest

type SetProfilePhotoRequest struct {
	// Profile photo to set
	Photo InputChatPhoto `json:"photo"`
}

type SetRecoveryEmailAddressRequest

type SetRecoveryEmailAddressRequest struct {
	// Password of the current user
	Password string `json:"password"`
	// New recovery email address
	NewRecoveryEmailAddress string `json:"new_recovery_email_address"`
}

type SetScopeNotificationSettingsRequest

type SetScopeNotificationSettingsRequest struct {
	// Types of chats for which to change the notification settings
	Scope NotificationSettingsScope `json:"scope"`
	// The new notification settings for the given scope
	NotificationSettings *ScopeNotificationSettings `json:"notification_settings"`
}

type SetStickerPositionInSetRequest

type SetStickerPositionInSetRequest struct {
	// Sticker
	Sticker InputFile `json:"sticker"`
	// New position of the sticker in the set, zero-based
	Position int32 `json:"position"`
}

type SetStickerSetThumbnailRequest

type SetStickerSetThumbnailRequest struct {
	// Sticker set owner
	UserId int64 `json:"user_id"`
	// Sticker set name
	Name string `json:"name"`
	// Thumbnail to set in PNG, TGS, or WEBM format; pass null to remove the sticker set thumbnail. Thumbnail format must match the format of stickers in the set
	Thumbnail InputFile `json:"thumbnail"`
}

type SetSupergroupStickerSetRequest

type SetSupergroupStickerSetRequest struct {
	// Identifier of the supergroup
	SupergroupId int64 `json:"supergroup_id"`
	// New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set
	StickerSetId JsonInt64 `json:"sticker_set_id"`
}

type SetSupergroupUsernameRequest

type SetSupergroupUsernameRequest struct {
	// Identifier of the supergroup or channel
	SupergroupId int64 `json:"supergroup_id"`
	// New value of the username. Use an empty string to remove the username
	Username string `json:"username"`
}

type SetTdlibParametersRequest

type SetTdlibParametersRequest struct {
	// Parameters for TDLib initialization
	Parameters *TdlibParameters `json:"parameters"`
}

type SetUserPrivacySettingRulesRequest

type SetUserPrivacySettingRulesRequest struct {
	// The privacy setting
	Setting UserPrivacySetting `json:"setting"`
	// The new privacy rules
	Rules *UserPrivacySettingRules `json:"rules"`
}

type SetUsernameRequest

type SetUsernameRequest struct {
	// The new value of the username. Use an empty string to remove the username
	Username string `json:"username"`
}

type SetVideoChatDefaultParticipantRequest added in v1.7.10

type SetVideoChatDefaultParticipantRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Default group call participant identifier to join the video chats
	DefaultParticipantId MessageSender `json:"default_participant_id"`
}

type SharePhoneNumberRequest

type SharePhoneNumberRequest struct {
	// Identifier of the user with whom to share the phone number. The user must be a mutual contact
	UserId int64 `json:"user_id"`
}

type ShippingOption

type ShippingOption struct {

	// Shipping option identifier
	Id string `json:"id"`
	// Option title
	Title string `json:"title"`
	// A list of objects used to calculate the total shipping costs
	PriceParts []*LabeledPricePart `json:"price_parts"`
	// contains filtered or unexported fields
}

One shipping option

func UnmarshalShippingOption

func UnmarshalShippingOption(data json.RawMessage) (*ShippingOption, error)

func (*ShippingOption) GetClass

func (*ShippingOption) GetClass() string

func (*ShippingOption) GetType

func (*ShippingOption) GetType() string

func (*ShippingOption) MarshalJSON

func (entity *ShippingOption) MarshalJSON() ([]byte, error)

type SponsoredMessage added in v1.7.10

type SponsoredMessage struct {

	// Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages
	MessageId int64 `json:"message_id"`
	// Sponsor chat identifier; 0 if the sponsor chat is accessible through an invite link
	SponsorChatId int64 `json:"sponsor_chat_id"`
	// Information about the sponsor chat; may be null unless sponsor_chat_id == 0
	SponsorChatInfo *ChatInviteLinkInfo `json:"sponsor_chat_info"`
	// An internal link to be opened when the sponsored message is clicked; may be null if the sponsor chat needs to be opened instead
	Link InternalLinkType `json:"link"`
	// Content of the message. Currently, can be only of the type messageText
	Content MessageContent `json:"content"`
	// contains filtered or unexported fields
}

Describes a sponsored message

func UnmarshalSponsoredMessage added in v1.7.10

func UnmarshalSponsoredMessage(data json.RawMessage) (*SponsoredMessage, error)

func (*SponsoredMessage) GetClass added in v1.7.10

func (*SponsoredMessage) GetClass() string

func (*SponsoredMessage) GetType added in v1.7.10

func (*SponsoredMessage) GetType() string

func (*SponsoredMessage) MarshalJSON added in v1.7.10

func (entity *SponsoredMessage) MarshalJSON() ([]byte, error)

func (*SponsoredMessage) UnmarshalJSON added in v1.7.10

func (sponsoredMessage *SponsoredMessage) UnmarshalJSON(data []byte) error

type StartGroupCallRecordingRequest added in v1.7.10

type StartGroupCallRecordingRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Group call recording title; 0-64 characters
	Title string `json:"title"`
	// Pass true to record a video file instead of an audio file
	RecordVideo bool `json:"record_video"`
	// Pass true to use portrait orientation for video instead of landscape one
	UsePortraitOrientation bool `json:"use_portrait_orientation"`
}

type StartGroupCallScreenSharingRequest added in v1.7.10

type StartGroupCallScreenSharingRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Screen sharing audio channel synchronization source identifier; received from tgcalls
	AudioSourceId int32 `json:"audio_source_id"`
	// Group call join payload; received from tgcalls
	Payload string `json:"payload"`
}

type StartScheduledGroupCallRequest added in v1.7.10

type StartScheduledGroupCallRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
}

type StatisticalGraph

type StatisticalGraph interface {
	StatisticalGraphType() string
}

Describes a statistical graph

func UnmarshalListOfStatisticalGraph

func UnmarshalListOfStatisticalGraph(dataList []json.RawMessage) ([]StatisticalGraph, error)

func UnmarshalStatisticalGraph

func UnmarshalStatisticalGraph(data json.RawMessage) (StatisticalGraph, error)

type StatisticalGraphAsync

type StatisticalGraphAsync struct {

	// The token to use for data loading
	Token string `json:"token"`
	// contains filtered or unexported fields
}

The graph data to be asynchronously loaded through getStatisticalGraph

func UnmarshalStatisticalGraphAsync

func UnmarshalStatisticalGraphAsync(data json.RawMessage) (*StatisticalGraphAsync, error)

func (*StatisticalGraphAsync) GetClass

func (*StatisticalGraphAsync) GetClass() string

func (*StatisticalGraphAsync) GetType

func (*StatisticalGraphAsync) GetType() string

func (*StatisticalGraphAsync) MarshalJSON

func (entity *StatisticalGraphAsync) MarshalJSON() ([]byte, error)

func (*StatisticalGraphAsync) StatisticalGraphType

func (*StatisticalGraphAsync) StatisticalGraphType() string

type StatisticalGraphData

type StatisticalGraphData struct {

	// Graph data in JSON format
	JsonData string `json:"json_data"`
	// If non-empty, a token which can be used to receive a zoomed in graph
	ZoomToken string `json:"zoom_token"`
	// contains filtered or unexported fields
}

A graph data

func UnmarshalStatisticalGraphData

func UnmarshalStatisticalGraphData(data json.RawMessage) (*StatisticalGraphData, error)

func (*StatisticalGraphData) GetClass

func (*StatisticalGraphData) GetClass() string

func (*StatisticalGraphData) GetType

func (*StatisticalGraphData) GetType() string

func (*StatisticalGraphData) MarshalJSON

func (entity *StatisticalGraphData) MarshalJSON() ([]byte, error)

func (*StatisticalGraphData) StatisticalGraphType

func (*StatisticalGraphData) StatisticalGraphType() string

type StatisticalGraphError

type StatisticalGraphError struct {

	// The error message
	ErrorMessage string `json:"error_message"`
	// contains filtered or unexported fields
}

An error message to be shown to the user instead of the graph

func UnmarshalStatisticalGraphError

func UnmarshalStatisticalGraphError(data json.RawMessage) (*StatisticalGraphError, error)

func (*StatisticalGraphError) GetClass

func (*StatisticalGraphError) GetClass() string

func (*StatisticalGraphError) GetType

func (*StatisticalGraphError) GetType() string

func (*StatisticalGraphError) MarshalJSON

func (entity *StatisticalGraphError) MarshalJSON() ([]byte, error)

func (*StatisticalGraphError) StatisticalGraphType

func (*StatisticalGraphError) StatisticalGraphType() string

type StatisticalValue

type StatisticalValue struct {

	// The current value
	Value float64 `json:"value"`
	// The value for the previous day
	PreviousValue float64 `json:"previous_value"`
	// The growth rate of the value, as a percentage
	GrowthRatePercentage float64 `json:"growth_rate_percentage"`
	// contains filtered or unexported fields
}

A value with information about its recent changes

func UnmarshalStatisticalValue

func UnmarshalStatisticalValue(data json.RawMessage) (*StatisticalValue, error)

func (*StatisticalValue) GetClass

func (*StatisticalValue) GetClass() string

func (*StatisticalValue) GetType

func (*StatisticalValue) GetType() string

func (*StatisticalValue) MarshalJSON

func (entity *StatisticalValue) MarshalJSON() ([]byte, error)

type Sticker

type Sticker struct {

	// The identifier of the sticker set to which the sticker belongs; 0 if none
	SetId JsonInt64 `json:"set_id"`
	// Sticker width; as defined by the sender
	Width int32 `json:"width"`
	// Sticker height; as defined by the sender
	Height int32 `json:"height"`
	// Emoji corresponding to the sticker
	Emoji string `json:"emoji"`
	// Sticker type
	Type StickerType `json:"type"`
	// Sticker's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
	Outline []*ClosedVectorPath `json:"outline"`
	// Sticker thumbnail in WEBP or JPEG format; may be null
	Thumbnail *Thumbnail `json:"thumbnail"`
	// File containing the sticker
	Sticker *File `json:"sticker"`
	// contains filtered or unexported fields
}

Describes a sticker

func UnmarshalSticker

func UnmarshalSticker(data json.RawMessage) (*Sticker, error)

func (*Sticker) GetClass

func (*Sticker) GetClass() string

func (*Sticker) GetType

func (*Sticker) GetType() string

func (*Sticker) MarshalJSON

func (entity *Sticker) MarshalJSON() ([]byte, error)

func (*Sticker) UnmarshalJSON added in v1.8.3

func (sticker *Sticker) UnmarshalJSON(data []byte) error

type StickerSet

type StickerSet struct {

	// Identifier of the sticker set
	Id JsonInt64 `json:"id"`
	// Title of the sticker set
	Title string `json:"title"`
	// Name of the sticker set
	Name string `json:"name"`
	// Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null. The file can be downloaded only before the thumbnail is changed
	Thumbnail *Thumbnail `json:"thumbnail"`
	// Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
	ThumbnailOutline []*ClosedVectorPath `json:"thumbnail_outline"`
	// True, if the sticker set has been installed by the current user
	IsInstalled bool `json:"is_installed"`
	// True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously
	IsArchived bool `json:"is_archived"`
	// True, if the sticker set is official
	IsOfficial bool `json:"is_official"`
	// Type of the stickers in the set
	StickerType StickerType `json:"sticker_type"`
	// True for already viewed trending sticker sets
	IsViewed bool `json:"is_viewed"`
	// List of stickers in this set
	Stickers []*Sticker `json:"stickers"`
	// A list of emoji corresponding to the stickers in the same order. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object
	Emojis []*Emojis `json:"emojis"`
	// contains filtered or unexported fields
}

Represents a sticker set

func UnmarshalStickerSet

func UnmarshalStickerSet(data json.RawMessage) (*StickerSet, error)

func (*StickerSet) GetClass

func (*StickerSet) GetClass() string

func (*StickerSet) GetType

func (*StickerSet) GetType() string

func (*StickerSet) MarshalJSON

func (entity *StickerSet) MarshalJSON() ([]byte, error)

func (*StickerSet) UnmarshalJSON added in v1.8.3

func (stickerSet *StickerSet) UnmarshalJSON(data []byte) error

type StickerSetInfo

type StickerSetInfo struct {

	// Identifier of the sticker set
	Id JsonInt64 `json:"id"`
	// Title of the sticker set
	Title string `json:"title"`
	// Name of the sticker set
	Name string `json:"name"`
	// Sticker set thumbnail in WEBP, TGS, or WEBM format with width and height 100; may be null
	Thumbnail *Thumbnail `json:"thumbnail"`
	// Sticker set thumbnail's outline represented as a list of closed vector paths; may be empty. The coordinate system origin is in the upper-left corner
	ThumbnailOutline []*ClosedVectorPath `json:"thumbnail_outline"`
	// True, if the sticker set has been installed by the current user
	IsInstalled bool `json:"is_installed"`
	// True, if the sticker set has been archived. A sticker set can't be installed and archived simultaneously
	IsArchived bool `json:"is_archived"`
	// True, if the sticker set is official
	IsOfficial bool `json:"is_official"`
	// Type of the stickers in the set
	StickerType StickerType `json:"sticker_type"`
	// True for already viewed trending sticker sets
	IsViewed bool `json:"is_viewed"`
	// Total number of stickers in the set
	Size int32 `json:"size"`
	// Up to the first 5 stickers from the set, depending on the context. If the application needs more stickers the full sticker set needs to be requested
	Covers []*Sticker `json:"covers"`
	// contains filtered or unexported fields
}

Represents short information about a sticker set

func UnmarshalStickerSetInfo

func UnmarshalStickerSetInfo(data json.RawMessage) (*StickerSetInfo, error)

func (*StickerSetInfo) GetClass

func (*StickerSetInfo) GetClass() string

func (*StickerSetInfo) GetType

func (*StickerSetInfo) GetType() string

func (*StickerSetInfo) MarshalJSON

func (entity *StickerSetInfo) MarshalJSON() ([]byte, error)

func (*StickerSetInfo) UnmarshalJSON added in v1.8.3

func (stickerSetInfo *StickerSetInfo) UnmarshalJSON(data []byte) error

type StickerSets

type StickerSets struct {

	// Approximate total number of sticker sets found
	TotalCount int32 `json:"total_count"`
	// List of sticker sets
	Sets []*StickerSetInfo `json:"sets"`
	// contains filtered or unexported fields
}

Represents a list of sticker sets

func UnmarshalStickerSets

func UnmarshalStickerSets(data json.RawMessage) (*StickerSets, error)

func (*StickerSets) GetClass

func (*StickerSets) GetClass() string

func (*StickerSets) GetType

func (*StickerSets) GetType() string

func (*StickerSets) MarshalJSON

func (entity *StickerSets) MarshalJSON() ([]byte, error)

type StickerType added in v1.8.3

type StickerType interface {
	StickerTypeType() string
}

Describes type of a sticker

func UnmarshalListOfStickerType added in v1.8.3

func UnmarshalListOfStickerType(dataList []json.RawMessage) ([]StickerType, error)

func UnmarshalStickerType added in v1.8.3

func UnmarshalStickerType(data json.RawMessage) (StickerType, error)

type StickerTypeAnimated added in v1.8.3

type StickerTypeAnimated struct {
	// contains filtered or unexported fields
}

The sticker is an animation in TGS format

func UnmarshalStickerTypeAnimated added in v1.8.3

func UnmarshalStickerTypeAnimated(data json.RawMessage) (*StickerTypeAnimated, error)

func (*StickerTypeAnimated) GetClass added in v1.8.3

func (*StickerTypeAnimated) GetClass() string

func (*StickerTypeAnimated) GetType added in v1.8.3

func (*StickerTypeAnimated) GetType() string

func (*StickerTypeAnimated) MarshalJSON added in v1.8.3

func (entity *StickerTypeAnimated) MarshalJSON() ([]byte, error)

func (*StickerTypeAnimated) StickerTypeType added in v1.8.3

func (*StickerTypeAnimated) StickerTypeType() string

type StickerTypeMask added in v1.8.3

type StickerTypeMask struct {

	// Position where the mask is placed; may be null
	MaskPosition *MaskPosition `json:"mask_position"`
	// contains filtered or unexported fields
}

The sticker is a mask in WEBP format to be placed on photos or videos

func UnmarshalStickerTypeMask added in v1.8.3

func UnmarshalStickerTypeMask(data json.RawMessage) (*StickerTypeMask, error)

func (*StickerTypeMask) GetClass added in v1.8.3

func (*StickerTypeMask) GetClass() string

func (*StickerTypeMask) GetType added in v1.8.3

func (*StickerTypeMask) GetType() string

func (*StickerTypeMask) MarshalJSON added in v1.8.3

func (entity *StickerTypeMask) MarshalJSON() ([]byte, error)

func (*StickerTypeMask) StickerTypeType added in v1.8.3

func (*StickerTypeMask) StickerTypeType() string

type StickerTypeStatic added in v1.8.3

type StickerTypeStatic struct {
	// contains filtered or unexported fields
}

The sticker is an image in WEBP format

func UnmarshalStickerTypeStatic added in v1.8.3

func UnmarshalStickerTypeStatic(data json.RawMessage) (*StickerTypeStatic, error)

func (*StickerTypeStatic) GetClass added in v1.8.3

func (*StickerTypeStatic) GetClass() string

func (*StickerTypeStatic) GetType added in v1.8.3

func (*StickerTypeStatic) GetType() string

func (*StickerTypeStatic) MarshalJSON added in v1.8.3

func (entity *StickerTypeStatic) MarshalJSON() ([]byte, error)

func (*StickerTypeStatic) StickerTypeType added in v1.8.3

func (*StickerTypeStatic) StickerTypeType() string

type StickerTypeVideo added in v1.8.3

type StickerTypeVideo struct {
	// contains filtered or unexported fields
}

The sticker is a video in WEBM format

func UnmarshalStickerTypeVideo added in v1.8.3

func UnmarshalStickerTypeVideo(data json.RawMessage) (*StickerTypeVideo, error)

func (*StickerTypeVideo) GetClass added in v1.8.3

func (*StickerTypeVideo) GetClass() string

func (*StickerTypeVideo) GetType added in v1.8.3

func (*StickerTypeVideo) GetType() string

func (*StickerTypeVideo) MarshalJSON added in v1.8.3

func (entity *StickerTypeVideo) MarshalJSON() ([]byte, error)

func (*StickerTypeVideo) StickerTypeType added in v1.8.3

func (*StickerTypeVideo) StickerTypeType() string

type Stickers

type Stickers struct {

	// List of stickers
	Stickers []*Sticker `json:"stickers"`
	// contains filtered or unexported fields
}

Represents a list of stickers

func UnmarshalStickers

func UnmarshalStickers(data json.RawMessage) (*Stickers, error)

func (*Stickers) GetClass

func (*Stickers) GetClass() string

func (*Stickers) GetType

func (*Stickers) GetType() string

func (*Stickers) MarshalJSON

func (entity *Stickers) MarshalJSON() ([]byte, error)

type StopPollRequest

type StopPollRequest struct {
	// Identifier of the chat to which the poll belongs
	ChatId int64 `json:"chat_id"`
	// Identifier of the message containing the poll
	MessageId int64 `json:"message_id"`
	// The new message reply markup; pass null if none; for bots only
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
}

type StorageStatistics

type StorageStatistics struct {

	// Total size of files, in bytes
	Size int64 `json:"size"`
	// Total number of files
	Count int32 `json:"count"`
	// Statistics split by chats
	ByChat []*StorageStatisticsByChat `json:"by_chat"`
	// contains filtered or unexported fields
}

Contains the exact storage usage statistics split by chats and file type

func UnmarshalStorageStatistics

func UnmarshalStorageStatistics(data json.RawMessage) (*StorageStatistics, error)

func (*StorageStatistics) GetClass

func (*StorageStatistics) GetClass() string

func (*StorageStatistics) GetType

func (*StorageStatistics) GetType() string

func (*StorageStatistics) MarshalJSON

func (entity *StorageStatistics) MarshalJSON() ([]byte, error)

type StorageStatisticsByChat

type StorageStatisticsByChat struct {

	// Chat identifier; 0 if none
	ChatId int64 `json:"chat_id"`
	// Total size of the files in the chat, in bytes
	Size int64 `json:"size"`
	// Total number of files in the chat
	Count int32 `json:"count"`
	// Statistics split by file types
	ByFileType []*StorageStatisticsByFileType `json:"by_file_type"`
	// contains filtered or unexported fields
}

Contains the storage usage statistics for a specific chat

func UnmarshalStorageStatisticsByChat

func UnmarshalStorageStatisticsByChat(data json.RawMessage) (*StorageStatisticsByChat, error)

func (*StorageStatisticsByChat) GetClass

func (*StorageStatisticsByChat) GetClass() string

func (*StorageStatisticsByChat) GetType

func (*StorageStatisticsByChat) GetType() string

func (*StorageStatisticsByChat) MarshalJSON

func (entity *StorageStatisticsByChat) MarshalJSON() ([]byte, error)

type StorageStatisticsByFileType

type StorageStatisticsByFileType struct {

	// File type
	FileType FileType `json:"file_type"`
	// Total size of the files, in bytes
	Size int64 `json:"size"`
	// Total number of files
	Count int32 `json:"count"`
	// contains filtered or unexported fields
}

Contains the storage usage statistics for a specific file type

func UnmarshalStorageStatisticsByFileType

func UnmarshalStorageStatisticsByFileType(data json.RawMessage) (*StorageStatisticsByFileType, error)

func (*StorageStatisticsByFileType) GetClass

func (*StorageStatisticsByFileType) GetClass() string

func (*StorageStatisticsByFileType) GetType

func (*StorageStatisticsByFileType) MarshalJSON

func (entity *StorageStatisticsByFileType) MarshalJSON() ([]byte, error)

func (*StorageStatisticsByFileType) UnmarshalJSON

func (storageStatisticsByFileType *StorageStatisticsByFileType) UnmarshalJSON(data []byte) error

type StorageStatisticsFast

type StorageStatisticsFast struct {

	// Approximate total size of files, in bytes
	FilesSize int64 `json:"files_size"`
	// Approximate number of files
	FileCount int32 `json:"file_count"`
	// Size of the database
	DatabaseSize int64 `json:"database_size"`
	// Size of the language pack database
	LanguagePackDatabaseSize int64 `json:"language_pack_database_size"`
	// Size of the TDLib internal log
	LogSize int64 `json:"log_size"`
	// contains filtered or unexported fields
}

Contains approximate storage usage statistics, excluding files of unknown file type

func UnmarshalStorageStatisticsFast

func UnmarshalStorageStatisticsFast(data json.RawMessage) (*StorageStatisticsFast, error)

func (*StorageStatisticsFast) GetClass

func (*StorageStatisticsFast) GetClass() string

func (*StorageStatisticsFast) GetType

func (*StorageStatisticsFast) GetType() string

func (*StorageStatisticsFast) MarshalJSON

func (entity *StorageStatisticsFast) MarshalJSON() ([]byte, error)

type SuggestedAction

type SuggestedAction interface {
	SuggestedActionType() string
}

Describes an action suggested to the current user

func UnmarshalListOfSuggestedAction

func UnmarshalListOfSuggestedAction(dataList []json.RawMessage) ([]SuggestedAction, error)

func UnmarshalSuggestedAction

func UnmarshalSuggestedAction(data json.RawMessage) (SuggestedAction, error)

type SuggestedActionCheckPassword added in v1.7.10

type SuggestedActionCheckPassword struct {
	// contains filtered or unexported fields
}

Suggests the user to check whether they still remember their 2-step verification password

func UnmarshalSuggestedActionCheckPassword added in v1.7.10

func UnmarshalSuggestedActionCheckPassword(data json.RawMessage) (*SuggestedActionCheckPassword, error)

func (*SuggestedActionCheckPassword) GetClass added in v1.7.10

func (*SuggestedActionCheckPassword) GetType added in v1.7.10

func (*SuggestedActionCheckPassword) MarshalJSON added in v1.7.10

func (entity *SuggestedActionCheckPassword) MarshalJSON() ([]byte, error)

func (*SuggestedActionCheckPassword) SuggestedActionType added in v1.7.10

func (*SuggestedActionCheckPassword) SuggestedActionType() string

type SuggestedActionCheckPhoneNumber

type SuggestedActionCheckPhoneNumber struct {
	// contains filtered or unexported fields
}

Suggests the user to check whether authorization phone number is correct and change the phone number if it is inaccessible

func UnmarshalSuggestedActionCheckPhoneNumber

func UnmarshalSuggestedActionCheckPhoneNumber(data json.RawMessage) (*SuggestedActionCheckPhoneNumber, error)

func (*SuggestedActionCheckPhoneNumber) GetClass

func (*SuggestedActionCheckPhoneNumber) GetType

func (*SuggestedActionCheckPhoneNumber) MarshalJSON

func (entity *SuggestedActionCheckPhoneNumber) MarshalJSON() ([]byte, error)

func (*SuggestedActionCheckPhoneNumber) SuggestedActionType

func (*SuggestedActionCheckPhoneNumber) SuggestedActionType() string

type SuggestedActionConvertToBroadcastGroup added in v1.7.10

type SuggestedActionConvertToBroadcastGroup struct {

	// Supergroup identifier
	SupergroupId int64 `json:"supergroup_id"`
	// contains filtered or unexported fields
}

Suggests the user to convert specified supergroup to a broadcast group

func UnmarshalSuggestedActionConvertToBroadcastGroup added in v1.7.10

func UnmarshalSuggestedActionConvertToBroadcastGroup(data json.RawMessage) (*SuggestedActionConvertToBroadcastGroup, error)

func (*SuggestedActionConvertToBroadcastGroup) GetClass added in v1.7.10

func (*SuggestedActionConvertToBroadcastGroup) GetType added in v1.7.10

func (*SuggestedActionConvertToBroadcastGroup) MarshalJSON added in v1.7.10

func (entity *SuggestedActionConvertToBroadcastGroup) MarshalJSON() ([]byte, error)

func (*SuggestedActionConvertToBroadcastGroup) SuggestedActionType added in v1.7.10

func (*SuggestedActionConvertToBroadcastGroup) SuggestedActionType() string

type SuggestedActionEnableArchiveAndMuteNewChats

type SuggestedActionEnableArchiveAndMuteNewChats struct {
	// contains filtered or unexported fields
}

Suggests the user to enable "archive_and_mute_new_chats_from_unknown_users" option

func UnmarshalSuggestedActionEnableArchiveAndMuteNewChats

func UnmarshalSuggestedActionEnableArchiveAndMuteNewChats(data json.RawMessage) (*SuggestedActionEnableArchiveAndMuteNewChats, error)

func (*SuggestedActionEnableArchiveAndMuteNewChats) GetClass

func (*SuggestedActionEnableArchiveAndMuteNewChats) GetType

func (*SuggestedActionEnableArchiveAndMuteNewChats) MarshalJSON

func (entity *SuggestedActionEnableArchiveAndMuteNewChats) MarshalJSON() ([]byte, error)

func (*SuggestedActionEnableArchiveAndMuteNewChats) SuggestedActionType

func (*SuggestedActionEnableArchiveAndMuteNewChats) SuggestedActionType() string

type SuggestedActionSetPassword added in v1.7.10

type SuggestedActionSetPassword struct {

	// The number of days to pass between consecutive authorizations if the user declines to set password
	AuthorizationDelay int32 `json:"authorization_delay"`
	// contains filtered or unexported fields
}

Suggests the user to set a 2-step verification password to be able to log in again

func UnmarshalSuggestedActionSetPassword added in v1.7.10

func UnmarshalSuggestedActionSetPassword(data json.RawMessage) (*SuggestedActionSetPassword, error)

func (*SuggestedActionSetPassword) GetClass added in v1.7.10

func (*SuggestedActionSetPassword) GetClass() string

func (*SuggestedActionSetPassword) GetType added in v1.7.10

func (*SuggestedActionSetPassword) MarshalJSON added in v1.7.10

func (entity *SuggestedActionSetPassword) MarshalJSON() ([]byte, error)

func (*SuggestedActionSetPassword) SuggestedActionType added in v1.7.10

func (*SuggestedActionSetPassword) SuggestedActionType() string

type SuggestedActionViewChecksHint added in v1.8.3

type SuggestedActionViewChecksHint struct {
	// contains filtered or unexported fields
}

Suggests the user to view a hint about the meaning of one and two check marks on sent messages

func UnmarshalSuggestedActionViewChecksHint added in v1.8.3

func UnmarshalSuggestedActionViewChecksHint(data json.RawMessage) (*SuggestedActionViewChecksHint, error)

func (*SuggestedActionViewChecksHint) GetClass added in v1.8.3

func (*SuggestedActionViewChecksHint) GetType added in v1.8.3

func (*SuggestedActionViewChecksHint) MarshalJSON added in v1.8.3

func (entity *SuggestedActionViewChecksHint) MarshalJSON() ([]byte, error)

func (*SuggestedActionViewChecksHint) SuggestedActionType added in v1.8.3

func (*SuggestedActionViewChecksHint) SuggestedActionType() string

type Supergroup

type Supergroup struct {

	// Supergroup or channel identifier
	Id int64 `json:"id"`
	// Username of the supergroup or channel; empty for private supergroups or channels
	Username string `json:"username"`
	// Point in time (Unix timestamp) when the current user joined, or the point in time when the supergroup or channel was created, in case the user is not a member
	Date int32 `json:"date"`
	// Status of the current user in the supergroup or channel; custom title will be always empty
	Status ChatMemberStatus `json:"status"`
	// Number of members in the supergroup or channel; 0 if unknown. Currently, it is guaranteed to be known only if the supergroup or channel was received through searchPublicChats, searchChatsNearby, getInactiveSupergroupChats, getSuitableDiscussionChats, getGroupsInCommon, or getUserPrivacySettingRules
	MemberCount int32 `json:"member_count"`
	// True, if the channel has a discussion group, or the supergroup is the designated discussion group for a channel
	HasLinkedChat bool `json:"has_linked_chat"`
	// True, if the supergroup is connected to a location, i.e. the supergroup is a location-based supergroup
	HasLocation bool `json:"has_location"`
	// True, if messages sent to the channel need to contain information about the sender. This field is only applicable to channels
	SignMessages bool `json:"sign_messages"`
	// True, if the slow mode is enabled in the supergroup
	IsSlowModeEnabled bool `json:"is_slow_mode_enabled"`
	// True, if the supergroup is a channel
	IsChannel bool `json:"is_channel"`
	// True, if the supergroup is a broadcast group, i.e. only administrators can send messages and there is no limit on the number of members
	IsBroadcastGroup bool `json:"is_broadcast_group"`
	// True, if the supergroup or channel is verified
	IsVerified bool `json:"is_verified"`
	// If non-empty, contains a human-readable description of the reason why access to this supergroup or channel must be restricted
	RestrictionReason string `json:"restriction_reason"`
	// True, if many users reported this supergroup or channel as a scam
	IsScam bool `json:"is_scam"`
	// True, if many users reported this supergroup or channel as a fake account
	IsFake bool `json:"is_fake"`
	// contains filtered or unexported fields
}

Represents a supergroup or channel with zero or more members (subscribers in the case of channels). From the point of view of the system, a channel is a special kind of a supergroup: only administrators can post and see the list of members, and posts from all administrators use the name and photo of the channel instead of individual names and profile photos. Unlike supergroups, channels can have an unlimited number of subscribers

func UnmarshalSupergroup

func UnmarshalSupergroup(data json.RawMessage) (*Supergroup, error)

func (*Supergroup) GetClass

func (*Supergroup) GetClass() string

func (*Supergroup) GetType

func (*Supergroup) GetType() string

func (*Supergroup) MarshalJSON

func (entity *Supergroup) MarshalJSON() ([]byte, error)

func (*Supergroup) UnmarshalJSON

func (supergroup *Supergroup) UnmarshalJSON(data []byte) error

type SupergroupFullInfo

type SupergroupFullInfo struct {

	// Chat photo; may be null
	Photo *ChatPhoto `json:"photo"`
	// Supergroup or channel description
	Description string `json:"description"`
	// Number of members in the supergroup or channel; 0 if unknown
	MemberCount int32 `json:"member_count"`
	// Number of privileged users in the supergroup or channel; 0 if unknown
	AdministratorCount int32 `json:"administrator_count"`
	// Number of restricted users in the supergroup; 0 if unknown
	RestrictedCount int32 `json:"restricted_count"`
	// Number of users banned from chat; 0 if unknown
	BannedCount int32 `json:"banned_count"`
	// Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group; 0 if none or unknown
	LinkedChatId int64 `json:"linked_chat_id"`
	// Delay between consecutive sent messages for non-administrator supergroup members, in seconds
	SlowModeDelay int32 `json:"slow_mode_delay"`
	// Time left before next message can be sent in the supergroup, in seconds. An updateSupergroupFullInfo update is not triggered when value of this field changes, but both new and old values are non-zero
	SlowModeDelayExpiresIn float64 `json:"slow_mode_delay_expires_in"`
	// True, if members of the chat can be retrieved
	CanGetMembers bool `json:"can_get_members"`
	// True, if the chat username can be changed
	CanSetUsername bool `json:"can_set_username"`
	// True, if the supergroup sticker set can be changed
	CanSetStickerSet bool `json:"can_set_sticker_set"`
	// True, if the supergroup location can be changed
	CanSetLocation bool `json:"can_set_location"`
	// True, if the supergroup or channel statistics are available
	CanGetStatistics bool `json:"can_get_statistics"`
	// True, if new chat members will have access to old messages. In public or discussion groups and both public and private channels, old messages are always available, so this option affects only private supergroups without a linked chat. The value of this field is only available for chat administrators
	IsAllHistoryAvailable bool `json:"is_all_history_available"`
	// Identifier of the supergroup sticker set; 0 if none
	StickerSetId JsonInt64 `json:"sticker_set_id"`
	// Location to which the supergroup is connected; may be null
	Location *ChatLocation `json:"location"`
	// Primary invite link for the chat; may be null. For chat administrators with can_invite_users right only
	InviteLink *ChatInviteLink `json:"invite_link"`
	// List of commands of bots in the group
	BotCommands []*BotCommands `json:"bot_commands"`
	// Identifier of the basic group from which supergroup was upgraded; 0 if none
	UpgradedFromBasicGroupId int64 `json:"upgraded_from_basic_group_id"`
	// Identifier of the last message in the basic group from which supergroup was upgraded; 0 if none
	UpgradedFromMaxMessageId int64 `json:"upgraded_from_max_message_id"`
	// contains filtered or unexported fields
}

Contains full information about a supergroup or channel

func UnmarshalSupergroupFullInfo

func UnmarshalSupergroupFullInfo(data json.RawMessage) (*SupergroupFullInfo, error)

func (*SupergroupFullInfo) GetClass

func (*SupergroupFullInfo) GetClass() string

func (*SupergroupFullInfo) GetType

func (*SupergroupFullInfo) GetType() string

func (*SupergroupFullInfo) MarshalJSON

func (entity *SupergroupFullInfo) MarshalJSON() ([]byte, error)

type SupergroupMembersFilter

type SupergroupMembersFilter interface {
	SupergroupMembersFilterType() string
}

Specifies the kind of chat members to return in getSupergroupMembers

func UnmarshalListOfSupergroupMembersFilter

func UnmarshalListOfSupergroupMembersFilter(dataList []json.RawMessage) ([]SupergroupMembersFilter, error)

func UnmarshalSupergroupMembersFilter

func UnmarshalSupergroupMembersFilter(data json.RawMessage) (SupergroupMembersFilter, error)

type SupergroupMembersFilterAdministrators

type SupergroupMembersFilterAdministrators struct {
	// contains filtered or unexported fields
}

Returns the owner and administrators

func UnmarshalSupergroupMembersFilterAdministrators

func UnmarshalSupergroupMembersFilterAdministrators(data json.RawMessage) (*SupergroupMembersFilterAdministrators, error)

func (*SupergroupMembersFilterAdministrators) GetClass

func (*SupergroupMembersFilterAdministrators) GetType

func (*SupergroupMembersFilterAdministrators) MarshalJSON

func (entity *SupergroupMembersFilterAdministrators) MarshalJSON() ([]byte, error)

func (*SupergroupMembersFilterAdministrators) SupergroupMembersFilterType

func (*SupergroupMembersFilterAdministrators) SupergroupMembersFilterType() string

type SupergroupMembersFilterBanned

type SupergroupMembersFilterBanned struct {

	// Query to search for
	Query string `json:"query"`
	// contains filtered or unexported fields
}

Returns users banned from the supergroup or channel; can be used only by administrators

func UnmarshalSupergroupMembersFilterBanned

func UnmarshalSupergroupMembersFilterBanned(data json.RawMessage) (*SupergroupMembersFilterBanned, error)

func (*SupergroupMembersFilterBanned) GetClass

func (*SupergroupMembersFilterBanned) GetType

func (*SupergroupMembersFilterBanned) MarshalJSON

func (entity *SupergroupMembersFilterBanned) MarshalJSON() ([]byte, error)

func (*SupergroupMembersFilterBanned) SupergroupMembersFilterType

func (*SupergroupMembersFilterBanned) SupergroupMembersFilterType() string

type SupergroupMembersFilterBots

type SupergroupMembersFilterBots struct {
	// contains filtered or unexported fields
}

Returns bot members of the supergroup or channel

func UnmarshalSupergroupMembersFilterBots

func UnmarshalSupergroupMembersFilterBots(data json.RawMessage) (*SupergroupMembersFilterBots, error)

func (*SupergroupMembersFilterBots) GetClass

func (*SupergroupMembersFilterBots) GetClass() string

func (*SupergroupMembersFilterBots) GetType

func (*SupergroupMembersFilterBots) MarshalJSON

func (entity *SupergroupMembersFilterBots) MarshalJSON() ([]byte, error)

func (*SupergroupMembersFilterBots) SupergroupMembersFilterType

func (*SupergroupMembersFilterBots) SupergroupMembersFilterType() string

type SupergroupMembersFilterContacts

type SupergroupMembersFilterContacts struct {

	// Query to search for
	Query string `json:"query"`
	// contains filtered or unexported fields
}

Returns contacts of the user, which are members of the supergroup or channel

func UnmarshalSupergroupMembersFilterContacts

func UnmarshalSupergroupMembersFilterContacts(data json.RawMessage) (*SupergroupMembersFilterContacts, error)

func (*SupergroupMembersFilterContacts) GetClass

func (*SupergroupMembersFilterContacts) GetType

func (*SupergroupMembersFilterContacts) MarshalJSON

func (entity *SupergroupMembersFilterContacts) MarshalJSON() ([]byte, error)

func (*SupergroupMembersFilterContacts) SupergroupMembersFilterType

func (*SupergroupMembersFilterContacts) SupergroupMembersFilterType() string

type SupergroupMembersFilterMention

type SupergroupMembersFilterMention struct {

	// Query to search for
	Query string `json:"query"`
	// If non-zero, the identifier of the current message thread
	MessageThreadId int64 `json:"message_thread_id"`
	// contains filtered or unexported fields
}

Returns users which can be mentioned in the supergroup

func UnmarshalSupergroupMembersFilterMention

func UnmarshalSupergroupMembersFilterMention(data json.RawMessage) (*SupergroupMembersFilterMention, error)

func (*SupergroupMembersFilterMention) GetClass

func (*SupergroupMembersFilterMention) GetType

func (*SupergroupMembersFilterMention) MarshalJSON

func (entity *SupergroupMembersFilterMention) MarshalJSON() ([]byte, error)

func (*SupergroupMembersFilterMention) SupergroupMembersFilterType

func (*SupergroupMembersFilterMention) SupergroupMembersFilterType() string

type SupergroupMembersFilterRecent

type SupergroupMembersFilterRecent struct {
	// contains filtered or unexported fields
}

Returns recently active users in reverse chronological order

func UnmarshalSupergroupMembersFilterRecent

func UnmarshalSupergroupMembersFilterRecent(data json.RawMessage) (*SupergroupMembersFilterRecent, error)

func (*SupergroupMembersFilterRecent) GetClass

func (*SupergroupMembersFilterRecent) GetType

func (*SupergroupMembersFilterRecent) MarshalJSON

func (entity *SupergroupMembersFilterRecent) MarshalJSON() ([]byte, error)

func (*SupergroupMembersFilterRecent) SupergroupMembersFilterType

func (*SupergroupMembersFilterRecent) SupergroupMembersFilterType() string

type SupergroupMembersFilterRestricted

type SupergroupMembersFilterRestricted struct {

	// Query to search for
	Query string `json:"query"`
	// contains filtered or unexported fields
}

Returns restricted supergroup members; can be used only by administrators

func UnmarshalSupergroupMembersFilterRestricted

func UnmarshalSupergroupMembersFilterRestricted(data json.RawMessage) (*SupergroupMembersFilterRestricted, error)

func (*SupergroupMembersFilterRestricted) GetClass

func (*SupergroupMembersFilterRestricted) GetType

func (*SupergroupMembersFilterRestricted) MarshalJSON

func (entity *SupergroupMembersFilterRestricted) MarshalJSON() ([]byte, error)

func (*SupergroupMembersFilterRestricted) SupergroupMembersFilterType

func (*SupergroupMembersFilterRestricted) SupergroupMembersFilterType() string

type SupergroupMembersFilterSearch

type SupergroupMembersFilterSearch struct {

	// Query to search for
	Query string `json:"query"`
	// contains filtered or unexported fields
}

Used to search for supergroup or channel members via a (string) query

func UnmarshalSupergroupMembersFilterSearch

func UnmarshalSupergroupMembersFilterSearch(data json.RawMessage) (*SupergroupMembersFilterSearch, error)

func (*SupergroupMembersFilterSearch) GetClass

func (*SupergroupMembersFilterSearch) GetType

func (*SupergroupMembersFilterSearch) MarshalJSON

func (entity *SupergroupMembersFilterSearch) MarshalJSON() ([]byte, error)

func (*SupergroupMembersFilterSearch) SupergroupMembersFilterType

func (*SupergroupMembersFilterSearch) SupergroupMembersFilterType() string

type SynchronizeLanguagePackRequest

type SynchronizeLanguagePackRequest struct {
	// Language pack identifier
	LanguagePackId string `json:"language_pack_id"`
}

type TMeUrl

type TMeUrl struct {

	// URL
	Url string `json:"url"`
	// Type of the URL
	Type TMeUrlType `json:"type"`
	// contains filtered or unexported fields
}

Represents a URL linking to an internal Telegram entity

func UnmarshalTMeUrl

func UnmarshalTMeUrl(data json.RawMessage) (*TMeUrl, error)

func (*TMeUrl) GetClass

func (*TMeUrl) GetClass() string

func (*TMeUrl) GetType

func (*TMeUrl) GetType() string

func (*TMeUrl) MarshalJSON

func (entity *TMeUrl) MarshalJSON() ([]byte, error)

func (*TMeUrl) UnmarshalJSON

func (tMeUrl *TMeUrl) UnmarshalJSON(data []byte) error

type TMeUrlType

type TMeUrlType interface {
	TMeUrlTypeType() string
}

Describes the type of a URL linking to an internal Telegram entity

func UnmarshalListOfTMeUrlType

func UnmarshalListOfTMeUrlType(dataList []json.RawMessage) ([]TMeUrlType, error)

func UnmarshalTMeUrlType

func UnmarshalTMeUrlType(data json.RawMessage) (TMeUrlType, error)

type TMeUrlTypeChatInvite

type TMeUrlTypeChatInvite struct {

	// Information about the chat invite link
	Info *ChatInviteLinkInfo `json:"info"`
	// contains filtered or unexported fields
}

A chat invite link

func UnmarshalTMeUrlTypeChatInvite

func UnmarshalTMeUrlTypeChatInvite(data json.RawMessage) (*TMeUrlTypeChatInvite, error)

func (*TMeUrlTypeChatInvite) GetClass

func (*TMeUrlTypeChatInvite) GetClass() string

func (*TMeUrlTypeChatInvite) GetType

func (*TMeUrlTypeChatInvite) GetType() string

func (*TMeUrlTypeChatInvite) MarshalJSON

func (entity *TMeUrlTypeChatInvite) MarshalJSON() ([]byte, error)

func (*TMeUrlTypeChatInvite) TMeUrlTypeType

func (*TMeUrlTypeChatInvite) TMeUrlTypeType() string

type TMeUrlTypeStickerSet

type TMeUrlTypeStickerSet struct {

	// Identifier of the sticker set
	StickerSetId JsonInt64 `json:"sticker_set_id"`
	// contains filtered or unexported fields
}

A URL linking to a sticker set

func UnmarshalTMeUrlTypeStickerSet

func UnmarshalTMeUrlTypeStickerSet(data json.RawMessage) (*TMeUrlTypeStickerSet, error)

func (*TMeUrlTypeStickerSet) GetClass

func (*TMeUrlTypeStickerSet) GetClass() string

func (*TMeUrlTypeStickerSet) GetType

func (*TMeUrlTypeStickerSet) GetType() string

func (*TMeUrlTypeStickerSet) MarshalJSON

func (entity *TMeUrlTypeStickerSet) MarshalJSON() ([]byte, error)

func (*TMeUrlTypeStickerSet) TMeUrlTypeType

func (*TMeUrlTypeStickerSet) TMeUrlTypeType() string

type TMeUrlTypeSupergroup

type TMeUrlTypeSupergroup struct {

	// Identifier of the supergroup or channel
	SupergroupId int64 `json:"supergroup_id"`
	// contains filtered or unexported fields
}

A URL linking to a public supergroup or channel

func UnmarshalTMeUrlTypeSupergroup

func UnmarshalTMeUrlTypeSupergroup(data json.RawMessage) (*TMeUrlTypeSupergroup, error)

func (*TMeUrlTypeSupergroup) GetClass

func (*TMeUrlTypeSupergroup) GetClass() string

func (*TMeUrlTypeSupergroup) GetType

func (*TMeUrlTypeSupergroup) GetType() string

func (*TMeUrlTypeSupergroup) MarshalJSON

func (entity *TMeUrlTypeSupergroup) MarshalJSON() ([]byte, error)

func (*TMeUrlTypeSupergroup) TMeUrlTypeType

func (*TMeUrlTypeSupergroup) TMeUrlTypeType() string

type TMeUrlTypeUser

type TMeUrlTypeUser struct {

	// Identifier of the user
	UserId int64 `json:"user_id"`
	// contains filtered or unexported fields
}

A URL linking to a user

func UnmarshalTMeUrlTypeUser

func UnmarshalTMeUrlTypeUser(data json.RawMessage) (*TMeUrlTypeUser, error)

func (*TMeUrlTypeUser) GetClass

func (*TMeUrlTypeUser) GetClass() string

func (*TMeUrlTypeUser) GetType

func (*TMeUrlTypeUser) GetType() string

func (*TMeUrlTypeUser) MarshalJSON

func (entity *TMeUrlTypeUser) MarshalJSON() ([]byte, error)

func (*TMeUrlTypeUser) TMeUrlTypeType

func (*TMeUrlTypeUser) TMeUrlTypeType() string

type TMeUrls

type TMeUrls struct {

	// List of URLs
	Urls []*TMeUrl `json:"urls"`
	// contains filtered or unexported fields
}

Contains a list of t.me URLs

func UnmarshalTMeUrls

func UnmarshalTMeUrls(data json.RawMessage) (*TMeUrls, error)

func (*TMeUrls) GetClass

func (*TMeUrls) GetClass() string

func (*TMeUrls) GetType

func (*TMeUrls) GetType() string

func (*TMeUrls) MarshalJSON

func (entity *TMeUrls) MarshalJSON() ([]byte, error)

type TdlibParameters

type TdlibParameters struct {

	// If set to true, the Telegram test environment will be used instead of the production environment
	UseTestDc bool `json:"use_test_dc"`
	// The path to the directory for the persistent database; if empty, the current working directory will be used
	DatabaseDirectory string `json:"database_directory"`
	// The path to the directory for storing files; if empty, database_directory will be used
	FilesDirectory string `json:"files_directory"`
	// If set to true, information about downloaded and uploaded files will be saved between application restarts
	UseFileDatabase bool `json:"use_file_database"`
	// If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database
	UseChatInfoDatabase bool `json:"use_chat_info_database"`
	// If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database
	UseMessageDatabase bool `json:"use_message_database"`
	// If set to true, support for secret chats will be enabled
	UseSecretChats bool `json:"use_secret_chats"`
	// Application identifier for Telegram API access, which can be obtained at https://my.telegram.org
	ApiId int32 `json:"api_id"`
	// Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org
	ApiHash string `json:"api_hash"`
	// IETF language tag of the user's operating system language; must be non-empty
	SystemLanguageCode string `json:"system_language_code"`
	// Model of the device the application is being run on; must be non-empty
	DeviceModel string `json:"device_model"`
	// Version of the operating system the application is being run on. If empty, the version is automatically detected by TDLib
	SystemVersion string `json:"system_version"`
	// Application version; must be non-empty
	ApplicationVersion string `json:"application_version"`
	// If set to true, old files will automatically be deleted
	EnableStorageOptimizer bool `json:"enable_storage_optimizer"`
	// If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name
	IgnoreFileNames bool `json:"ignore_file_names"`
	// contains filtered or unexported fields
}

Contains parameters for TDLib initialization

func UnmarshalTdlibParameters

func UnmarshalTdlibParameters(data json.RawMessage) (*TdlibParameters, error)

func (*TdlibParameters) GetClass

func (*TdlibParameters) GetClass() string

func (*TdlibParameters) GetType

func (*TdlibParameters) GetType() string

func (*TdlibParameters) MarshalJSON

func (entity *TdlibParameters) MarshalJSON() ([]byte, error)

type TemporaryPasswordState

type TemporaryPasswordState struct {

	// True, if a temporary password is available
	HasPassword bool `json:"has_password"`
	// Time left before the temporary password expires, in seconds
	ValidFor int32 `json:"valid_for"`
	// contains filtered or unexported fields
}

Returns information about the availability of a temporary password, which can be used for payments

func UnmarshalTemporaryPasswordState

func UnmarshalTemporaryPasswordState(data json.RawMessage) (*TemporaryPasswordState, error)

func (*TemporaryPasswordState) GetClass

func (*TemporaryPasswordState) GetClass() string

func (*TemporaryPasswordState) GetType

func (*TemporaryPasswordState) GetType() string

func (*TemporaryPasswordState) MarshalJSON

func (entity *TemporaryPasswordState) MarshalJSON() ([]byte, error)

type TerminateSessionRequest

type TerminateSessionRequest struct {
	// Session identifier
	SessionId JsonInt64 `json:"session_id"`
}

type TermsOfService

type TermsOfService struct {

	// Text of the terms of service
	Text *FormattedText `json:"text"`
	// The minimum age of a user to be able to accept the terms; 0 if age isn't restricted
	MinUserAge int32 `json:"min_user_age"`
	// True, if a blocking popup with terms of service must be shown to the user
	ShowPopup bool `json:"show_popup"`
	// contains filtered or unexported fields
}

Contains Telegram terms of service

func UnmarshalTermsOfService

func UnmarshalTermsOfService(data json.RawMessage) (*TermsOfService, error)

func (*TermsOfService) GetClass

func (*TermsOfService) GetClass() string

func (*TermsOfService) GetType

func (*TermsOfService) GetType() string

func (*TermsOfService) MarshalJSON

func (entity *TermsOfService) MarshalJSON() ([]byte, error)

type TestBytes

type TestBytes struct {

	// Bytes
	Value []byte `json:"value"`
	// contains filtered or unexported fields
}

A simple object containing a sequence of bytes; for testing only

func UnmarshalTestBytes

func UnmarshalTestBytes(data json.RawMessage) (*TestBytes, error)

func (*TestBytes) GetClass

func (*TestBytes) GetClass() string

func (*TestBytes) GetType

func (*TestBytes) GetType() string

func (*TestBytes) MarshalJSON

func (entity *TestBytes) MarshalJSON() ([]byte, error)

type TestCallBytesRequest

type TestCallBytesRequest struct {
	// Bytes to return
	X []byte `json:"x"`
}

type TestCallStringRequest

type TestCallStringRequest struct {
	// String to return
	X string `json:"x"`
}

type TestCallVectorIntObjectRequest

type TestCallVectorIntObjectRequest struct {
	// Vector of objects to return
	X []*TestInt `json:"x"`
}

type TestCallVectorIntRequest

type TestCallVectorIntRequest struct {
	// Vector of numbers to return
	X []int32 `json:"x"`
}

type TestCallVectorStringObjectRequest

type TestCallVectorStringObjectRequest struct {
	// Vector of objects to return
	X []*TestString `json:"x"`
}

type TestCallVectorStringRequest

type TestCallVectorStringRequest struct {
	// Vector of strings to return
	X []string `json:"x"`
}

type TestInt

type TestInt struct {

	// Number
	Value int32 `json:"value"`
	// contains filtered or unexported fields
}

A simple object containing a number; for testing only

func UnmarshalTestInt

func UnmarshalTestInt(data json.RawMessage) (*TestInt, error)

func (*TestInt) GetClass

func (*TestInt) GetClass() string

func (*TestInt) GetType

func (*TestInt) GetType() string

func (*TestInt) MarshalJSON

func (entity *TestInt) MarshalJSON() ([]byte, error)

type TestProxyRequest

type TestProxyRequest struct {
	// Proxy server IP address
	Server string `json:"server"`
	// Proxy server port
	Port int32 `json:"port"`
	// Proxy type
	Type ProxyType `json:"type"`
	// Identifier of a datacenter with which to test connection
	DcId int32 `json:"dc_id"`
	// The maximum overall timeout for the request
	Timeout float64 `json:"timeout"`
}

type TestReturnErrorRequest

type TestReturnErrorRequest struct {
	// The error to be returned
	Error *Error `json:"error"`
}

type TestSquareIntRequest

type TestSquareIntRequest struct {
	// Number to square
	X int32 `json:"x"`
}

type TestString

type TestString struct {

	// String
	Value string `json:"value"`
	// contains filtered or unexported fields
}

A simple object containing a string; for testing only

func UnmarshalTestString

func UnmarshalTestString(data json.RawMessage) (*TestString, error)

func (*TestString) GetClass

func (*TestString) GetClass() string

func (*TestString) GetType

func (*TestString) GetType() string

func (*TestString) MarshalJSON

func (entity *TestString) MarshalJSON() ([]byte, error)

type TestVectorInt

type TestVectorInt struct {

	// Vector of numbers
	Value []int32 `json:"value"`
	// contains filtered or unexported fields
}

A simple object containing a vector of numbers; for testing only

func UnmarshalTestVectorInt

func UnmarshalTestVectorInt(data json.RawMessage) (*TestVectorInt, error)

func (*TestVectorInt) GetClass

func (*TestVectorInt) GetClass() string

func (*TestVectorInt) GetType

func (*TestVectorInt) GetType() string

func (*TestVectorInt) MarshalJSON

func (entity *TestVectorInt) MarshalJSON() ([]byte, error)

type TestVectorIntObject

type TestVectorIntObject struct {

	// Vector of objects
	Value []*TestInt `json:"value"`
	// contains filtered or unexported fields
}

A simple object containing a vector of objects that hold a number; for testing only

func UnmarshalTestVectorIntObject

func UnmarshalTestVectorIntObject(data json.RawMessage) (*TestVectorIntObject, error)

func (*TestVectorIntObject) GetClass

func (*TestVectorIntObject) GetClass() string

func (*TestVectorIntObject) GetType

func (*TestVectorIntObject) GetType() string

func (*TestVectorIntObject) MarshalJSON

func (entity *TestVectorIntObject) MarshalJSON() ([]byte, error)

type TestVectorString

type TestVectorString struct {

	// Vector of strings
	Value []string `json:"value"`
	// contains filtered or unexported fields
}

A simple object containing a vector of strings; for testing only

func UnmarshalTestVectorString

func UnmarshalTestVectorString(data json.RawMessage) (*TestVectorString, error)

func (*TestVectorString) GetClass

func (*TestVectorString) GetClass() string

func (*TestVectorString) GetType

func (*TestVectorString) GetType() string

func (*TestVectorString) MarshalJSON

func (entity *TestVectorString) MarshalJSON() ([]byte, error)

type TestVectorStringObject

type TestVectorStringObject struct {

	// Vector of objects
	Value []*TestString `json:"value"`
	// contains filtered or unexported fields
}

A simple object containing a vector of objects that hold a string; for testing only

func UnmarshalTestVectorStringObject

func UnmarshalTestVectorStringObject(data json.RawMessage) (*TestVectorStringObject, error)

func (*TestVectorStringObject) GetClass

func (*TestVectorStringObject) GetClass() string

func (*TestVectorStringObject) GetType

func (*TestVectorStringObject) GetType() string

func (*TestVectorStringObject) MarshalJSON

func (entity *TestVectorStringObject) MarshalJSON() ([]byte, error)

type Text

type Text struct {

	// Text
	Text string `json:"text"`
	// contains filtered or unexported fields
}

Contains some text

func UnmarshalText

func UnmarshalText(data json.RawMessage) (*Text, error)

func (*Text) GetClass

func (*Text) GetClass() string

func (*Text) GetType

func (*Text) GetType() string

func (*Text) MarshalJSON

func (entity *Text) MarshalJSON() ([]byte, error)

type TextEntities

type TextEntities struct {

	// List of text entities
	Entities []*TextEntity `json:"entities"`
	// contains filtered or unexported fields
}

Contains a list of text entities

func UnmarshalTextEntities

func UnmarshalTextEntities(data json.RawMessage) (*TextEntities, error)

func (*TextEntities) GetClass

func (*TextEntities) GetClass() string

func (*TextEntities) GetType

func (*TextEntities) GetType() string

func (*TextEntities) MarshalJSON

func (entity *TextEntities) MarshalJSON() ([]byte, error)

type TextEntity

type TextEntity struct {

	// Offset of the entity, in UTF-16 code units
	Offset int32 `json:"offset"`
	// Length of the entity, in UTF-16 code units
	Length int32 `json:"length"`
	// Type of the entity
	Type TextEntityType `json:"type"`
	// contains filtered or unexported fields
}

Represents a part of the text that needs to be formatted in some unusual way

func UnmarshalTextEntity

func UnmarshalTextEntity(data json.RawMessage) (*TextEntity, error)

func (*TextEntity) GetClass

func (*TextEntity) GetClass() string

func (*TextEntity) GetType

func (*TextEntity) GetType() string

func (*TextEntity) MarshalJSON

func (entity *TextEntity) MarshalJSON() ([]byte, error)

func (*TextEntity) UnmarshalJSON

func (textEntity *TextEntity) UnmarshalJSON(data []byte) error

type TextEntityType

type TextEntityType interface {
	TextEntityTypeType() string
}

Represents a part of the text which must be formatted differently

func UnmarshalListOfTextEntityType

func UnmarshalListOfTextEntityType(dataList []json.RawMessage) ([]TextEntityType, error)

func UnmarshalTextEntityType

func UnmarshalTextEntityType(data json.RawMessage) (TextEntityType, error)

type TextEntityTypeBankCardNumber

type TextEntityTypeBankCardNumber struct {
	// contains filtered or unexported fields
}

A bank card number. The getBankCardInfo method can be used to get information about the bank card

func UnmarshalTextEntityTypeBankCardNumber

func UnmarshalTextEntityTypeBankCardNumber(data json.RawMessage) (*TextEntityTypeBankCardNumber, error)

func (*TextEntityTypeBankCardNumber) GetClass

func (*TextEntityTypeBankCardNumber) GetType

func (*TextEntityTypeBankCardNumber) MarshalJSON

func (entity *TextEntityTypeBankCardNumber) MarshalJSON() ([]byte, error)

func (*TextEntityTypeBankCardNumber) TextEntityTypeType

func (*TextEntityTypeBankCardNumber) TextEntityTypeType() string

type TextEntityTypeBold

type TextEntityTypeBold struct {
	// contains filtered or unexported fields
}

A bold text

func UnmarshalTextEntityTypeBold

func UnmarshalTextEntityTypeBold(data json.RawMessage) (*TextEntityTypeBold, error)

func (*TextEntityTypeBold) GetClass

func (*TextEntityTypeBold) GetClass() string

func (*TextEntityTypeBold) GetType

func (*TextEntityTypeBold) GetType() string

func (*TextEntityTypeBold) MarshalJSON

func (entity *TextEntityTypeBold) MarshalJSON() ([]byte, error)

func (*TextEntityTypeBold) TextEntityTypeType

func (*TextEntityTypeBold) TextEntityTypeType() string

type TextEntityTypeBotCommand

type TextEntityTypeBotCommand struct {
	// contains filtered or unexported fields
}

A bot command, beginning with "/"

func UnmarshalTextEntityTypeBotCommand

func UnmarshalTextEntityTypeBotCommand(data json.RawMessage) (*TextEntityTypeBotCommand, error)

func (*TextEntityTypeBotCommand) GetClass

func (*TextEntityTypeBotCommand) GetClass() string

func (*TextEntityTypeBotCommand) GetType

func (*TextEntityTypeBotCommand) GetType() string

func (*TextEntityTypeBotCommand) MarshalJSON

func (entity *TextEntityTypeBotCommand) MarshalJSON() ([]byte, error)

func (*TextEntityTypeBotCommand) TextEntityTypeType

func (*TextEntityTypeBotCommand) TextEntityTypeType() string

type TextEntityTypeCashtag

type TextEntityTypeCashtag struct {
	// contains filtered or unexported fields
}

A cashtag text, beginning with "$" and consisting of capital English letters (e.g., "$USD")

func UnmarshalTextEntityTypeCashtag

func UnmarshalTextEntityTypeCashtag(data json.RawMessage) (*TextEntityTypeCashtag, error)

func (*TextEntityTypeCashtag) GetClass

func (*TextEntityTypeCashtag) GetClass() string

func (*TextEntityTypeCashtag) GetType

func (*TextEntityTypeCashtag) GetType() string

func (*TextEntityTypeCashtag) MarshalJSON

func (entity *TextEntityTypeCashtag) MarshalJSON() ([]byte, error)

func (*TextEntityTypeCashtag) TextEntityTypeType

func (*TextEntityTypeCashtag) TextEntityTypeType() string

type TextEntityTypeCode

type TextEntityTypeCode struct {
	// contains filtered or unexported fields
}

Text that must be formatted as if inside a code HTML tag

func UnmarshalTextEntityTypeCode

func UnmarshalTextEntityTypeCode(data json.RawMessage) (*TextEntityTypeCode, error)

func (*TextEntityTypeCode) GetClass

func (*TextEntityTypeCode) GetClass() string

func (*TextEntityTypeCode) GetType

func (*TextEntityTypeCode) GetType() string

func (*TextEntityTypeCode) MarshalJSON

func (entity *TextEntityTypeCode) MarshalJSON() ([]byte, error)

func (*TextEntityTypeCode) TextEntityTypeType

func (*TextEntityTypeCode) TextEntityTypeType() string

type TextEntityTypeEmailAddress

type TextEntityTypeEmailAddress struct {
	// contains filtered or unexported fields
}

An email address

func UnmarshalTextEntityTypeEmailAddress

func UnmarshalTextEntityTypeEmailAddress(data json.RawMessage) (*TextEntityTypeEmailAddress, error)

func (*TextEntityTypeEmailAddress) GetClass

func (*TextEntityTypeEmailAddress) GetClass() string

func (*TextEntityTypeEmailAddress) GetType

func (*TextEntityTypeEmailAddress) MarshalJSON

func (entity *TextEntityTypeEmailAddress) MarshalJSON() ([]byte, error)

func (*TextEntityTypeEmailAddress) TextEntityTypeType

func (*TextEntityTypeEmailAddress) TextEntityTypeType() string

type TextEntityTypeHashtag

type TextEntityTypeHashtag struct {
	// contains filtered or unexported fields
}

A hashtag text, beginning with "#"

func UnmarshalTextEntityTypeHashtag

func UnmarshalTextEntityTypeHashtag(data json.RawMessage) (*TextEntityTypeHashtag, error)

func (*TextEntityTypeHashtag) GetClass

func (*TextEntityTypeHashtag) GetClass() string

func (*TextEntityTypeHashtag) GetType

func (*TextEntityTypeHashtag) GetType() string

func (*TextEntityTypeHashtag) MarshalJSON

func (entity *TextEntityTypeHashtag) MarshalJSON() ([]byte, error)

func (*TextEntityTypeHashtag) TextEntityTypeType

func (*TextEntityTypeHashtag) TextEntityTypeType() string

type TextEntityTypeItalic

type TextEntityTypeItalic struct {
	// contains filtered or unexported fields
}

An italic text

func UnmarshalTextEntityTypeItalic

func UnmarshalTextEntityTypeItalic(data json.RawMessage) (*TextEntityTypeItalic, error)

func (*TextEntityTypeItalic) GetClass

func (*TextEntityTypeItalic) GetClass() string

func (*TextEntityTypeItalic) GetType

func (*TextEntityTypeItalic) GetType() string

func (*TextEntityTypeItalic) MarshalJSON

func (entity *TextEntityTypeItalic) MarshalJSON() ([]byte, error)

func (*TextEntityTypeItalic) TextEntityTypeType

func (*TextEntityTypeItalic) TextEntityTypeType() string

type TextEntityTypeMediaTimestamp added in v1.7.10

type TextEntityTypeMediaTimestamp struct {

	// Timestamp from which a video/audio/video note/voice note playing must start, in seconds. The media can be in the content or the web page preview of the current message, or in the same places in the replied message
	MediaTimestamp int32 `json:"media_timestamp"`
	// contains filtered or unexported fields
}

A media timestamp

func UnmarshalTextEntityTypeMediaTimestamp added in v1.7.10

func UnmarshalTextEntityTypeMediaTimestamp(data json.RawMessage) (*TextEntityTypeMediaTimestamp, error)

func (*TextEntityTypeMediaTimestamp) GetClass added in v1.7.10

func (*TextEntityTypeMediaTimestamp) GetType added in v1.7.10

func (*TextEntityTypeMediaTimestamp) MarshalJSON added in v1.7.10

func (entity *TextEntityTypeMediaTimestamp) MarshalJSON() ([]byte, error)

func (*TextEntityTypeMediaTimestamp) TextEntityTypeType added in v1.7.10

func (*TextEntityTypeMediaTimestamp) TextEntityTypeType() string

type TextEntityTypeMention

type TextEntityTypeMention struct {
	// contains filtered or unexported fields
}

A mention of a user by their username

func UnmarshalTextEntityTypeMention

func UnmarshalTextEntityTypeMention(data json.RawMessage) (*TextEntityTypeMention, error)

func (*TextEntityTypeMention) GetClass

func (*TextEntityTypeMention) GetClass() string

func (*TextEntityTypeMention) GetType

func (*TextEntityTypeMention) GetType() string

func (*TextEntityTypeMention) MarshalJSON

func (entity *TextEntityTypeMention) MarshalJSON() ([]byte, error)

func (*TextEntityTypeMention) TextEntityTypeType

func (*TextEntityTypeMention) TextEntityTypeType() string

type TextEntityTypeMentionName

type TextEntityTypeMentionName struct {

	// Identifier of the mentioned user
	UserId int64 `json:"user_id"`
	// contains filtered or unexported fields
}

A text shows instead of a raw mention of the user (e.g., when the user has no username)

func UnmarshalTextEntityTypeMentionName

func UnmarshalTextEntityTypeMentionName(data json.RawMessage) (*TextEntityTypeMentionName, error)

func (*TextEntityTypeMentionName) GetClass

func (*TextEntityTypeMentionName) GetClass() string

func (*TextEntityTypeMentionName) GetType

func (*TextEntityTypeMentionName) GetType() string

func (*TextEntityTypeMentionName) MarshalJSON

func (entity *TextEntityTypeMentionName) MarshalJSON() ([]byte, error)

func (*TextEntityTypeMentionName) TextEntityTypeType

func (*TextEntityTypeMentionName) TextEntityTypeType() string

type TextEntityTypePhoneNumber

type TextEntityTypePhoneNumber struct {
	// contains filtered or unexported fields
}

A phone number

func UnmarshalTextEntityTypePhoneNumber

func UnmarshalTextEntityTypePhoneNumber(data json.RawMessage) (*TextEntityTypePhoneNumber, error)

func (*TextEntityTypePhoneNumber) GetClass

func (*TextEntityTypePhoneNumber) GetClass() string

func (*TextEntityTypePhoneNumber) GetType

func (*TextEntityTypePhoneNumber) GetType() string

func (*TextEntityTypePhoneNumber) MarshalJSON

func (entity *TextEntityTypePhoneNumber) MarshalJSON() ([]byte, error)

func (*TextEntityTypePhoneNumber) TextEntityTypeType

func (*TextEntityTypePhoneNumber) TextEntityTypeType() string

type TextEntityTypePre

type TextEntityTypePre struct {
	// contains filtered or unexported fields
}

Text that must be formatted as if inside a pre HTML tag

func UnmarshalTextEntityTypePre

func UnmarshalTextEntityTypePre(data json.RawMessage) (*TextEntityTypePre, error)

func (*TextEntityTypePre) GetClass

func (*TextEntityTypePre) GetClass() string

func (*TextEntityTypePre) GetType

func (*TextEntityTypePre) GetType() string

func (*TextEntityTypePre) MarshalJSON

func (entity *TextEntityTypePre) MarshalJSON() ([]byte, error)

func (*TextEntityTypePre) TextEntityTypeType

func (*TextEntityTypePre) TextEntityTypeType() string

type TextEntityTypePreCode

type TextEntityTypePreCode struct {

	// Programming language of the code; as defined by the sender
	Language string `json:"language"`
	// contains filtered or unexported fields
}

Text that must be formatted as if inside pre, and code HTML tags

func UnmarshalTextEntityTypePreCode

func UnmarshalTextEntityTypePreCode(data json.RawMessage) (*TextEntityTypePreCode, error)

func (*TextEntityTypePreCode) GetClass

func (*TextEntityTypePreCode) GetClass() string

func (*TextEntityTypePreCode) GetType

func (*TextEntityTypePreCode) GetType() string

func (*TextEntityTypePreCode) MarshalJSON

func (entity *TextEntityTypePreCode) MarshalJSON() ([]byte, error)

func (*TextEntityTypePreCode) TextEntityTypeType

func (*TextEntityTypePreCode) TextEntityTypeType() string

type TextEntityTypeSpoiler added in v1.8.3

type TextEntityTypeSpoiler struct {
	// contains filtered or unexported fields
}

A spoiler text. Not supported in secret chats

func UnmarshalTextEntityTypeSpoiler added in v1.8.3

func UnmarshalTextEntityTypeSpoiler(data json.RawMessage) (*TextEntityTypeSpoiler, error)

func (*TextEntityTypeSpoiler) GetClass added in v1.8.3

func (*TextEntityTypeSpoiler) GetClass() string

func (*TextEntityTypeSpoiler) GetType added in v1.8.3

func (*TextEntityTypeSpoiler) GetType() string

func (*TextEntityTypeSpoiler) MarshalJSON added in v1.8.3

func (entity *TextEntityTypeSpoiler) MarshalJSON() ([]byte, error)

func (*TextEntityTypeSpoiler) TextEntityTypeType added in v1.8.3

func (*TextEntityTypeSpoiler) TextEntityTypeType() string

type TextEntityTypeStrikethrough

type TextEntityTypeStrikethrough struct {
	// contains filtered or unexported fields
}

A strikethrough text

func UnmarshalTextEntityTypeStrikethrough

func UnmarshalTextEntityTypeStrikethrough(data json.RawMessage) (*TextEntityTypeStrikethrough, error)

func (*TextEntityTypeStrikethrough) GetClass

func (*TextEntityTypeStrikethrough) GetClass() string

func (*TextEntityTypeStrikethrough) GetType

func (*TextEntityTypeStrikethrough) MarshalJSON

func (entity *TextEntityTypeStrikethrough) MarshalJSON() ([]byte, error)

func (*TextEntityTypeStrikethrough) TextEntityTypeType

func (*TextEntityTypeStrikethrough) TextEntityTypeType() string

type TextEntityTypeTextUrl

type TextEntityTypeTextUrl struct {

	// HTTP or tg:// URL to be opened when the link is clicked
	Url string `json:"url"`
	// contains filtered or unexported fields
}

A text description shown instead of a raw URL

func UnmarshalTextEntityTypeTextUrl

func UnmarshalTextEntityTypeTextUrl(data json.RawMessage) (*TextEntityTypeTextUrl, error)

func (*TextEntityTypeTextUrl) GetClass

func (*TextEntityTypeTextUrl) GetClass() string

func (*TextEntityTypeTextUrl) GetType

func (*TextEntityTypeTextUrl) GetType() string

func (*TextEntityTypeTextUrl) MarshalJSON

func (entity *TextEntityTypeTextUrl) MarshalJSON() ([]byte, error)

func (*TextEntityTypeTextUrl) TextEntityTypeType

func (*TextEntityTypeTextUrl) TextEntityTypeType() string

type TextEntityTypeUnderline

type TextEntityTypeUnderline struct {
	// contains filtered or unexported fields
}

An underlined text

func UnmarshalTextEntityTypeUnderline

func UnmarshalTextEntityTypeUnderline(data json.RawMessage) (*TextEntityTypeUnderline, error)

func (*TextEntityTypeUnderline) GetClass

func (*TextEntityTypeUnderline) GetClass() string

func (*TextEntityTypeUnderline) GetType

func (*TextEntityTypeUnderline) GetType() string

func (*TextEntityTypeUnderline) MarshalJSON

func (entity *TextEntityTypeUnderline) MarshalJSON() ([]byte, error)

func (*TextEntityTypeUnderline) TextEntityTypeType

func (*TextEntityTypeUnderline) TextEntityTypeType() string

type TextEntityTypeUrl

type TextEntityTypeUrl struct {
	// contains filtered or unexported fields
}

An HTTP URL

func UnmarshalTextEntityTypeUrl

func UnmarshalTextEntityTypeUrl(data json.RawMessage) (*TextEntityTypeUrl, error)

func (*TextEntityTypeUrl) GetClass

func (*TextEntityTypeUrl) GetClass() string

func (*TextEntityTypeUrl) GetType

func (*TextEntityTypeUrl) GetType() string

func (*TextEntityTypeUrl) MarshalJSON

func (entity *TextEntityTypeUrl) MarshalJSON() ([]byte, error)

func (*TextEntityTypeUrl) TextEntityTypeType

func (*TextEntityTypeUrl) TextEntityTypeType() string

type TextParseMode

type TextParseMode interface {
	TextParseModeType() string
}

Describes the way the text needs to be parsed for TextEntities

func UnmarshalListOfTextParseMode

func UnmarshalListOfTextParseMode(dataList []json.RawMessage) ([]TextParseMode, error)

func UnmarshalTextParseMode

func UnmarshalTextParseMode(data json.RawMessage) (TextParseMode, error)

type TextParseModeHTML

type TextParseModeHTML struct {
	// contains filtered or unexported fields
}

The text uses HTML-style formatting. The same as Telegram Bot API "HTML" parse mode

func UnmarshalTextParseModeHTML

func UnmarshalTextParseModeHTML(data json.RawMessage) (*TextParseModeHTML, error)

func (*TextParseModeHTML) GetClass

func (*TextParseModeHTML) GetClass() string

func (*TextParseModeHTML) GetType

func (*TextParseModeHTML) GetType() string

func (*TextParseModeHTML) MarshalJSON

func (entity *TextParseModeHTML) MarshalJSON() ([]byte, error)

func (*TextParseModeHTML) TextParseModeType

func (*TextParseModeHTML) TextParseModeType() string

type TextParseModeMarkdown

type TextParseModeMarkdown struct {

	// Version of the parser: 0 or 1 - Telegram Bot API "Markdown" parse mode, 2 - Telegram Bot API "MarkdownV2" parse mode
	Version int32 `json:"version"`
	// contains filtered or unexported fields
}

The text uses Markdown-style formatting

func UnmarshalTextParseModeMarkdown

func UnmarshalTextParseModeMarkdown(data json.RawMessage) (*TextParseModeMarkdown, error)

func (*TextParseModeMarkdown) GetClass

func (*TextParseModeMarkdown) GetClass() string

func (*TextParseModeMarkdown) GetType

func (*TextParseModeMarkdown) GetType() string

func (*TextParseModeMarkdown) MarshalJSON

func (entity *TextParseModeMarkdown) MarshalJSON() ([]byte, error)

func (*TextParseModeMarkdown) TextParseModeType

func (*TextParseModeMarkdown) TextParseModeType() string

type ThemeParameters added in v1.8.3

type ThemeParameters struct {

	// A color of the background in the RGB24 format
	BackgroundColor int32 `json:"background_color"`
	// A color of text in the RGB24 format
	TextColor int32 `json:"text_color"`
	// A color of hints in the RGB24 format
	HintColor int32 `json:"hint_color"`
	// A color of links in the RGB24 format
	LinkColor int32 `json:"link_color"`
	// A color of the buttons in the RGB24 format
	ButtonColor int32 `json:"button_color"`
	// A color of text on the buttons in the RGB24 format
	ButtonTextColor int32 `json:"button_text_color"`
	// contains filtered or unexported fields
}

Contains parameters of the app theme

func UnmarshalThemeParameters added in v1.8.3

func UnmarshalThemeParameters(data json.RawMessage) (*ThemeParameters, error)

func (*ThemeParameters) GetClass added in v1.8.3

func (*ThemeParameters) GetClass() string

func (*ThemeParameters) GetType added in v1.8.3

func (*ThemeParameters) GetType() string

func (*ThemeParameters) MarshalJSON added in v1.8.3

func (entity *ThemeParameters) MarshalJSON() ([]byte, error)

type ThemeSettings added in v1.7.10

type ThemeSettings struct {

	// Theme accent color in ARGB format
	AccentColor int32 `json:"accent_color"`
	// The background to be used in chats; may be null
	Background *Background `json:"background"`
	// The fill to be used as a background for outgoing messages
	OutgoingMessageFill BackgroundFill `json:"outgoing_message_fill"`
	// If true, the freeform gradient fill needs to be animated on every sent message
	AnimateOutgoingMessageFill bool `json:"animate_outgoing_message_fill"`
	// Accent color of outgoing messages in ARGB format
	OutgoingMessageAccentColor int32 `json:"outgoing_message_accent_color"`
	// contains filtered or unexported fields
}

Describes theme settings

func UnmarshalThemeSettings added in v1.7.10

func UnmarshalThemeSettings(data json.RawMessage) (*ThemeSettings, error)

func (*ThemeSettings) GetClass added in v1.7.10

func (*ThemeSettings) GetClass() string

func (*ThemeSettings) GetType added in v1.7.10

func (*ThemeSettings) GetType() string

func (*ThemeSettings) MarshalJSON added in v1.7.10

func (entity *ThemeSettings) MarshalJSON() ([]byte, error)

func (*ThemeSettings) UnmarshalJSON added in v1.7.10

func (themeSettings *ThemeSettings) UnmarshalJSON(data []byte) error

type Thumbnail

type Thumbnail struct {

	// Thumbnail format
	Format ThumbnailFormat `json:"format"`
	// Thumbnail width
	Width int32 `json:"width"`
	// Thumbnail height
	Height int32 `json:"height"`
	// The thumbnail
	File *File `json:"file"`
	// contains filtered or unexported fields
}

Represents a thumbnail

func UnmarshalThumbnail

func UnmarshalThumbnail(data json.RawMessage) (*Thumbnail, error)

func (*Thumbnail) GetClass

func (*Thumbnail) GetClass() string

func (*Thumbnail) GetType

func (*Thumbnail) GetType() string

func (*Thumbnail) MarshalJSON

func (entity *Thumbnail) MarshalJSON() ([]byte, error)

func (*Thumbnail) UnmarshalJSON

func (thumbnail *Thumbnail) UnmarshalJSON(data []byte) error

type ThumbnailFormat

type ThumbnailFormat interface {
	ThumbnailFormatType() string
}

Describes format of a thumbnail

func UnmarshalListOfThumbnailFormat

func UnmarshalListOfThumbnailFormat(dataList []json.RawMessage) ([]ThumbnailFormat, error)

func UnmarshalThumbnailFormat

func UnmarshalThumbnailFormat(data json.RawMessage) (ThumbnailFormat, error)

type ThumbnailFormatGif

type ThumbnailFormatGif struct {
	// contains filtered or unexported fields
}

The thumbnail is in static GIF format. It will be used only for some bot inline results

func UnmarshalThumbnailFormatGif

func UnmarshalThumbnailFormatGif(data json.RawMessage) (*ThumbnailFormatGif, error)

func (*ThumbnailFormatGif) GetClass

func (*ThumbnailFormatGif) GetClass() string

func (*ThumbnailFormatGif) GetType

func (*ThumbnailFormatGif) GetType() string

func (*ThumbnailFormatGif) MarshalJSON

func (entity *ThumbnailFormatGif) MarshalJSON() ([]byte, error)

func (*ThumbnailFormatGif) ThumbnailFormatType

func (*ThumbnailFormatGif) ThumbnailFormatType() string

type ThumbnailFormatJpeg

type ThumbnailFormatJpeg struct {
	// contains filtered or unexported fields
}

The thumbnail is in JPEG format

func UnmarshalThumbnailFormatJpeg

func UnmarshalThumbnailFormatJpeg(data json.RawMessage) (*ThumbnailFormatJpeg, error)

func (*ThumbnailFormatJpeg) GetClass

func (*ThumbnailFormatJpeg) GetClass() string

func (*ThumbnailFormatJpeg) GetType

func (*ThumbnailFormatJpeg) GetType() string

func (*ThumbnailFormatJpeg) MarshalJSON

func (entity *ThumbnailFormatJpeg) MarshalJSON() ([]byte, error)

func (*ThumbnailFormatJpeg) ThumbnailFormatType

func (*ThumbnailFormatJpeg) ThumbnailFormatType() string

type ThumbnailFormatMpeg4

type ThumbnailFormatMpeg4 struct {
	// contains filtered or unexported fields
}

The thumbnail is in MPEG4 format. It will be used only for some animations and videos

func UnmarshalThumbnailFormatMpeg4

func UnmarshalThumbnailFormatMpeg4(data json.RawMessage) (*ThumbnailFormatMpeg4, error)

func (*ThumbnailFormatMpeg4) GetClass

func (*ThumbnailFormatMpeg4) GetClass() string

func (*ThumbnailFormatMpeg4) GetType

func (*ThumbnailFormatMpeg4) GetType() string

func (*ThumbnailFormatMpeg4) MarshalJSON

func (entity *ThumbnailFormatMpeg4) MarshalJSON() ([]byte, error)

func (*ThumbnailFormatMpeg4) ThumbnailFormatType

func (*ThumbnailFormatMpeg4) ThumbnailFormatType() string

type ThumbnailFormatPng

type ThumbnailFormatPng struct {
	// contains filtered or unexported fields
}

The thumbnail is in PNG format. It will be used only for background patterns

func UnmarshalThumbnailFormatPng

func UnmarshalThumbnailFormatPng(data json.RawMessage) (*ThumbnailFormatPng, error)

func (*ThumbnailFormatPng) GetClass

func (*ThumbnailFormatPng) GetClass() string

func (*ThumbnailFormatPng) GetType

func (*ThumbnailFormatPng) GetType() string

func (*ThumbnailFormatPng) MarshalJSON

func (entity *ThumbnailFormatPng) MarshalJSON() ([]byte, error)

func (*ThumbnailFormatPng) ThumbnailFormatType

func (*ThumbnailFormatPng) ThumbnailFormatType() string

type ThumbnailFormatTgs

type ThumbnailFormatTgs struct {
	// contains filtered or unexported fields
}

The thumbnail is in TGS format. It will be used only for TGS sticker sets

func UnmarshalThumbnailFormatTgs

func UnmarshalThumbnailFormatTgs(data json.RawMessage) (*ThumbnailFormatTgs, error)

func (*ThumbnailFormatTgs) GetClass

func (*ThumbnailFormatTgs) GetClass() string

func (*ThumbnailFormatTgs) GetType

func (*ThumbnailFormatTgs) GetType() string

func (*ThumbnailFormatTgs) MarshalJSON

func (entity *ThumbnailFormatTgs) MarshalJSON() ([]byte, error)

func (*ThumbnailFormatTgs) ThumbnailFormatType

func (*ThumbnailFormatTgs) ThumbnailFormatType() string

type ThumbnailFormatWebm added in v1.8.3

type ThumbnailFormatWebm struct {
	// contains filtered or unexported fields
}

The thumbnail is in WEBM format. It will be used only for WEBM sticker sets

func UnmarshalThumbnailFormatWebm added in v1.8.3

func UnmarshalThumbnailFormatWebm(data json.RawMessage) (*ThumbnailFormatWebm, error)

func (*ThumbnailFormatWebm) GetClass added in v1.8.3

func (*ThumbnailFormatWebm) GetClass() string

func (*ThumbnailFormatWebm) GetType added in v1.8.3

func (*ThumbnailFormatWebm) GetType() string

func (*ThumbnailFormatWebm) MarshalJSON added in v1.8.3

func (entity *ThumbnailFormatWebm) MarshalJSON() ([]byte, error)

func (*ThumbnailFormatWebm) ThumbnailFormatType added in v1.8.3

func (*ThumbnailFormatWebm) ThumbnailFormatType() string

type ThumbnailFormatWebp

type ThumbnailFormatWebp struct {
	// contains filtered or unexported fields
}

The thumbnail is in WEBP format. It will be used only for some stickers

func UnmarshalThumbnailFormatWebp

func UnmarshalThumbnailFormatWebp(data json.RawMessage) (*ThumbnailFormatWebp, error)

func (*ThumbnailFormatWebp) GetClass

func (*ThumbnailFormatWebp) GetClass() string

func (*ThumbnailFormatWebp) GetType

func (*ThumbnailFormatWebp) GetType() string

func (*ThumbnailFormatWebp) MarshalJSON

func (entity *ThumbnailFormatWebp) MarshalJSON() ([]byte, error)

func (*ThumbnailFormatWebp) ThumbnailFormatType

func (*ThumbnailFormatWebp) ThumbnailFormatType() string

type ToggleAllDownloadsArePausedRequest added in v1.8.3

type ToggleAllDownloadsArePausedRequest struct {
	// Pass true to pause all downloads; pass false to unpause them
	ArePaused bool `json:"are_paused"`
}

type ToggleBotIsAddedToAttachmentMenuRequest added in v1.8.3

type ToggleBotIsAddedToAttachmentMenuRequest struct {
	// Bot's user identifier
	BotUserId int64 `json:"bot_user_id"`
	// Pass true to add the bot to attachment menu; pass false to remove the bot from attachment menu
	IsAdded bool `json:"is_added"`
}

type ToggleChatDefaultDisableNotificationRequest

type ToggleChatDefaultDisableNotificationRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of default_disable_notification
	DefaultDisableNotification bool `json:"default_disable_notification"`
}

type ToggleChatHasProtectedContentRequest added in v1.7.10

type ToggleChatHasProtectedContentRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of has_protected_content
	HasProtectedContent bool `json:"has_protected_content"`
}

type ToggleChatIsMarkedAsUnreadRequest

type ToggleChatIsMarkedAsUnreadRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of is_marked_as_unread
	IsMarkedAsUnread bool `json:"is_marked_as_unread"`
}

type ToggleChatIsPinnedRequest

type ToggleChatIsPinnedRequest struct {
	// Chat list in which to change the pinned state of the chat
	ChatList ChatList `json:"chat_list"`
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Pass true to pin the chat; pass false to unpin it
	IsPinned bool `json:"is_pinned"`
}

type ToggleDownloadIsPausedRequest added in v1.8.3

type ToggleDownloadIsPausedRequest struct {
	// Identifier of the downloaded file
	FileId int32 `json:"file_id"`
	// Pass true if the download is paused
	IsPaused bool `json:"is_paused"`
}

type ToggleGroupCallEnabledStartNotificationRequest added in v1.7.10

type ToggleGroupCallEnabledStartNotificationRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// New value of the enabled_start_notification setting
	EnabledStartNotification bool `json:"enabled_start_notification"`
}

type ToggleGroupCallIsMyVideoEnabledRequest added in v1.7.10

type ToggleGroupCallIsMyVideoEnabledRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Pass true if the current user's video is enabled
	IsMyVideoEnabled bool `json:"is_my_video_enabled"`
}

type ToggleGroupCallIsMyVideoPausedRequest added in v1.7.10

type ToggleGroupCallIsMyVideoPausedRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Pass true if the current user's video is paused
	IsMyVideoPaused bool `json:"is_my_video_paused"`
}

type ToggleGroupCallMuteNewParticipantsRequest added in v1.7.10

type ToggleGroupCallMuteNewParticipantsRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// New value of the mute_new_participants setting
	MuteNewParticipants bool `json:"mute_new_participants"`
}

type ToggleGroupCallParticipantIsHandRaisedRequest added in v1.7.10

type ToggleGroupCallParticipantIsHandRaisedRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Participant identifier
	ParticipantId MessageSender `json:"participant_id"`
	// Pass true if the user's hand needs to be raised. Only self hand can be raised. Requires groupCall.can_be_managed group call flag to lower other's hand
	IsHandRaised bool `json:"is_hand_raised"`
}

type ToggleGroupCallParticipantIsMutedRequest added in v1.7.10

type ToggleGroupCallParticipantIsMutedRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// Participant identifier
	ParticipantId MessageSender `json:"participant_id"`
	// Pass true to mute the user; pass false to unmute the them
	IsMuted bool `json:"is_muted"`
}

type ToggleGroupCallScreenSharingIsPausedRequest added in v1.7.10

type ToggleGroupCallScreenSharingIsPausedRequest struct {
	// Group call identifier
	GroupCallId int32 `json:"group_call_id"`
	// True if screen sharing is paused
	IsPaused bool `json:"is_paused"`
}

type ToggleMessageSenderIsBlockedRequest

type ToggleMessageSenderIsBlockedRequest struct {
	// Identifier of a message sender to block/unblock
	SenderId MessageSender `json:"sender_id"`
	// New value of is_blocked
	IsBlocked bool `json:"is_blocked"`
}

type ToggleSessionCanAcceptCallsRequest added in v1.7.10

type ToggleSessionCanAcceptCallsRequest struct {
	// Session identifier
	SessionId JsonInt64 `json:"session_id"`
	// Pass true to allow accepting incoming calls by the session; pass false otherwise
	CanAcceptCalls bool `json:"can_accept_calls"`
}

type ToggleSessionCanAcceptSecretChatsRequest added in v1.7.10

type ToggleSessionCanAcceptSecretChatsRequest struct {
	// Session identifier
	SessionId JsonInt64 `json:"session_id"`
	// Pass true to allow accepring secret chats by the session; pass false otherwise
	CanAcceptSecretChats bool `json:"can_accept_secret_chats"`
}

type ToggleSupergroupIsAllHistoryAvailableRequest

type ToggleSupergroupIsAllHistoryAvailableRequest struct {
	// The identifier of the supergroup
	SupergroupId int64 `json:"supergroup_id"`
	// The new value of is_all_history_available
	IsAllHistoryAvailable bool `json:"is_all_history_available"`
}

type ToggleSupergroupIsBroadcastGroupRequest added in v1.7.10

type ToggleSupergroupIsBroadcastGroupRequest struct {
	// Identifier of the supergroup
	SupergroupId int64 `json:"supergroup_id"`
}

type ToggleSupergroupSignMessagesRequest

type ToggleSupergroupSignMessagesRequest struct {
	// Identifier of the channel
	SupergroupId int64 `json:"supergroup_id"`
	// New value of sign_messages
	SignMessages bool `json:"sign_messages"`
}

type TopChatCategory

type TopChatCategory interface {
	TopChatCategoryType() string
}

Represents the categories of chats for which a list of frequently used chats can be retrieved

func UnmarshalListOfTopChatCategory

func UnmarshalListOfTopChatCategory(dataList []json.RawMessage) ([]TopChatCategory, error)

func UnmarshalTopChatCategory

func UnmarshalTopChatCategory(data json.RawMessage) (TopChatCategory, error)

type TopChatCategoryBots

type TopChatCategoryBots struct {
	// contains filtered or unexported fields
}

A category containing frequently used private chats with bot users

func UnmarshalTopChatCategoryBots

func UnmarshalTopChatCategoryBots(data json.RawMessage) (*TopChatCategoryBots, error)

func (*TopChatCategoryBots) GetClass

func (*TopChatCategoryBots) GetClass() string

func (*TopChatCategoryBots) GetType

func (*TopChatCategoryBots) GetType() string

func (*TopChatCategoryBots) MarshalJSON

func (entity *TopChatCategoryBots) MarshalJSON() ([]byte, error)

func (*TopChatCategoryBots) TopChatCategoryType

func (*TopChatCategoryBots) TopChatCategoryType() string

type TopChatCategoryCalls

type TopChatCategoryCalls struct {
	// contains filtered or unexported fields
}

A category containing frequently used chats used for calls

func UnmarshalTopChatCategoryCalls

func UnmarshalTopChatCategoryCalls(data json.RawMessage) (*TopChatCategoryCalls, error)

func (*TopChatCategoryCalls) GetClass

func (*TopChatCategoryCalls) GetClass() string

func (*TopChatCategoryCalls) GetType

func (*TopChatCategoryCalls) GetType() string

func (*TopChatCategoryCalls) MarshalJSON

func (entity *TopChatCategoryCalls) MarshalJSON() ([]byte, error)

func (*TopChatCategoryCalls) TopChatCategoryType

func (*TopChatCategoryCalls) TopChatCategoryType() string

type TopChatCategoryChannels

type TopChatCategoryChannels struct {
	// contains filtered or unexported fields
}

A category containing frequently used channels

func UnmarshalTopChatCategoryChannels

func UnmarshalTopChatCategoryChannels(data json.RawMessage) (*TopChatCategoryChannels, error)

func (*TopChatCategoryChannels) GetClass

func (*TopChatCategoryChannels) GetClass() string

func (*TopChatCategoryChannels) GetType

func (*TopChatCategoryChannels) GetType() string

func (*TopChatCategoryChannels) MarshalJSON

func (entity *TopChatCategoryChannels) MarshalJSON() ([]byte, error)

func (*TopChatCategoryChannels) TopChatCategoryType

func (*TopChatCategoryChannels) TopChatCategoryType() string

type TopChatCategoryForwardChats

type TopChatCategoryForwardChats struct {
	// contains filtered or unexported fields
}

A category containing frequently used chats used to forward messages

func UnmarshalTopChatCategoryForwardChats

func UnmarshalTopChatCategoryForwardChats(data json.RawMessage) (*TopChatCategoryForwardChats, error)

func (*TopChatCategoryForwardChats) GetClass

func (*TopChatCategoryForwardChats) GetClass() string

func (*TopChatCategoryForwardChats) GetType

func (*TopChatCategoryForwardChats) MarshalJSON

func (entity *TopChatCategoryForwardChats) MarshalJSON() ([]byte, error)

func (*TopChatCategoryForwardChats) TopChatCategoryType

func (*TopChatCategoryForwardChats) TopChatCategoryType() string

type TopChatCategoryGroups

type TopChatCategoryGroups struct {
	// contains filtered or unexported fields
}

A category containing frequently used basic groups and supergroups

func UnmarshalTopChatCategoryGroups

func UnmarshalTopChatCategoryGroups(data json.RawMessage) (*TopChatCategoryGroups, error)

func (*TopChatCategoryGroups) GetClass

func (*TopChatCategoryGroups) GetClass() string

func (*TopChatCategoryGroups) GetType

func (*TopChatCategoryGroups) GetType() string

func (*TopChatCategoryGroups) MarshalJSON

func (entity *TopChatCategoryGroups) MarshalJSON() ([]byte, error)

func (*TopChatCategoryGroups) TopChatCategoryType

func (*TopChatCategoryGroups) TopChatCategoryType() string

type TopChatCategoryInlineBots

type TopChatCategoryInlineBots struct {
	// contains filtered or unexported fields
}

A category containing frequently used chats with inline bots sorted by their usage in inline mode

func UnmarshalTopChatCategoryInlineBots

func UnmarshalTopChatCategoryInlineBots(data json.RawMessage) (*TopChatCategoryInlineBots, error)

func (*TopChatCategoryInlineBots) GetClass

func (*TopChatCategoryInlineBots) GetClass() string

func (*TopChatCategoryInlineBots) GetType

func (*TopChatCategoryInlineBots) GetType() string

func (*TopChatCategoryInlineBots) MarshalJSON

func (entity *TopChatCategoryInlineBots) MarshalJSON() ([]byte, error)

func (*TopChatCategoryInlineBots) TopChatCategoryType

func (*TopChatCategoryInlineBots) TopChatCategoryType() string

type TopChatCategoryUsers

type TopChatCategoryUsers struct {
	// contains filtered or unexported fields
}

A category containing frequently used private chats with non-bot users

func UnmarshalTopChatCategoryUsers

func UnmarshalTopChatCategoryUsers(data json.RawMessage) (*TopChatCategoryUsers, error)

func (*TopChatCategoryUsers) GetClass

func (*TopChatCategoryUsers) GetClass() string

func (*TopChatCategoryUsers) GetType

func (*TopChatCategoryUsers) GetType() string

func (*TopChatCategoryUsers) MarshalJSON

func (entity *TopChatCategoryUsers) MarshalJSON() ([]byte, error)

func (*TopChatCategoryUsers) TopChatCategoryType

func (*TopChatCategoryUsers) TopChatCategoryType() string

type TransferChatOwnershipRequest

type TransferChatOwnershipRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user
	UserId int64 `json:"user_id"`
	// The password of the current user
	Password string `json:"password"`
}

type TranslateTextRequest added in v1.8.3

type TranslateTextRequest struct {
	// Text to translate
	Text string `json:"text"`
	// A two-letter ISO 639-1 language code of the language from which the message is translated. If empty, the language will be detected automatically
	FromLanguageCode string `json:"from_language_code"`
	// A two-letter ISO 639-1 language code of the language to which the message is translated
	ToLanguageCode string `json:"to_language_code"`
}

type Type

type Type interface {
	GetType() string
	GetClass() string
}

func UnmarshalType

func UnmarshalType(data json.RawMessage) (Type, error)

type UnpinAllChatMessagesRequest

type UnpinAllChatMessagesRequest struct {
	// Identifier of the chat
	ChatId int64 `json:"chat_id"`
}

type UnpinChatMessageRequest

type UnpinChatMessageRequest struct {
	// Identifier of the chat
	ChatId int64 `json:"chat_id"`
	// Identifier of the removed pinned message
	MessageId int64 `json:"message_id"`
}

type UnreadReaction added in v1.8.3

type UnreadReaction struct {

	// Text representation of the reaction
	Reaction string `json:"reaction"`
	// Identifier of the sender, added the reaction
	SenderId MessageSender `json:"sender_id"`
	// True, if the reaction was added with a big animation
	IsBig bool `json:"is_big"`
	// contains filtered or unexported fields
}

Contains information about an unread reaction to a message

func UnmarshalUnreadReaction added in v1.8.3

func UnmarshalUnreadReaction(data json.RawMessage) (*UnreadReaction, error)

func (*UnreadReaction) GetClass added in v1.8.3

func (*UnreadReaction) GetClass() string

func (*UnreadReaction) GetType added in v1.8.3

func (*UnreadReaction) GetType() string

func (*UnreadReaction) MarshalJSON added in v1.8.3

func (entity *UnreadReaction) MarshalJSON() ([]byte, error)

func (*UnreadReaction) UnmarshalJSON added in v1.8.3

func (unreadReaction *UnreadReaction) UnmarshalJSON(data []byte) error

type Update

type Update interface {
	UpdateType() string
}

Contains notifications about data changes

func UnmarshalListOfUpdate

func UnmarshalListOfUpdate(dataList []json.RawMessage) ([]Update, error)

func UnmarshalUpdate

func UnmarshalUpdate(data json.RawMessage) (Update, error)

type UpdateActiveNotifications

type UpdateActiveNotifications struct {

	// Lists of active notification groups
	Groups []*NotificationGroup `json:"groups"`
	// contains filtered or unexported fields
}

Contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update

func UnmarshalUpdateActiveNotifications

func UnmarshalUpdateActiveNotifications(data json.RawMessage) (*UpdateActiveNotifications, error)

func (*UpdateActiveNotifications) GetClass

func (*UpdateActiveNotifications) GetClass() string

func (*UpdateActiveNotifications) GetType

func (*UpdateActiveNotifications) GetType() string

func (*UpdateActiveNotifications) MarshalJSON

func (entity *UpdateActiveNotifications) MarshalJSON() ([]byte, error)

func (*UpdateActiveNotifications) UpdateType

func (*UpdateActiveNotifications) UpdateType() string

type UpdateAnimatedEmojiMessageClicked added in v1.7.10

type UpdateAnimatedEmojiMessageClicked struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// The animated sticker to be played
	Sticker *Sticker `json:"sticker"`
	// contains filtered or unexported fields
}

Some animated emoji message was clicked and a big animated sticker must be played if the message is visible on the screen. chatActionWatchingAnimations with the text of the message needs to be sent if the sticker is played

func UnmarshalUpdateAnimatedEmojiMessageClicked added in v1.7.10

func UnmarshalUpdateAnimatedEmojiMessageClicked(data json.RawMessage) (*UpdateAnimatedEmojiMessageClicked, error)

func (*UpdateAnimatedEmojiMessageClicked) GetClass added in v1.7.10

func (*UpdateAnimatedEmojiMessageClicked) GetType added in v1.7.10

func (*UpdateAnimatedEmojiMessageClicked) MarshalJSON added in v1.7.10

func (entity *UpdateAnimatedEmojiMessageClicked) MarshalJSON() ([]byte, error)

func (*UpdateAnimatedEmojiMessageClicked) UpdateType added in v1.7.10

type UpdateAnimationSearchParameters

type UpdateAnimationSearchParameters struct {

	// Name of the animation search provider
	Provider string `json:"provider"`
	// The new list of emojis suggested for searching
	Emojis []string `json:"emojis"`
	// contains filtered or unexported fields
}

The parameters of animation search through GetOption("animation_search_bot_username") bot has changed

func UnmarshalUpdateAnimationSearchParameters

func UnmarshalUpdateAnimationSearchParameters(data json.RawMessage) (*UpdateAnimationSearchParameters, error)

func (*UpdateAnimationSearchParameters) GetClass

func (*UpdateAnimationSearchParameters) GetType

func (*UpdateAnimationSearchParameters) MarshalJSON

func (entity *UpdateAnimationSearchParameters) MarshalJSON() ([]byte, error)

func (*UpdateAnimationSearchParameters) UpdateType

type UpdateAttachmentMenuBots added in v1.8.3

type UpdateAttachmentMenuBots struct {

	// The new list of bots added to attachment menu. The bots must be shown in attachment menu only in private chats. The bots must not be shown on scheduled messages screen
	Bots []*AttachmentMenuBot `json:"bots"`
	// contains filtered or unexported fields
}

The list of bots added to attachment menu has changed

func UnmarshalUpdateAttachmentMenuBots added in v1.8.3

func UnmarshalUpdateAttachmentMenuBots(data json.RawMessage) (*UpdateAttachmentMenuBots, error)

func (*UpdateAttachmentMenuBots) GetClass added in v1.8.3

func (*UpdateAttachmentMenuBots) GetClass() string

func (*UpdateAttachmentMenuBots) GetType added in v1.8.3

func (*UpdateAttachmentMenuBots) GetType() string

func (*UpdateAttachmentMenuBots) MarshalJSON added in v1.8.3

func (entity *UpdateAttachmentMenuBots) MarshalJSON() ([]byte, error)

func (*UpdateAttachmentMenuBots) UpdateType added in v1.8.3

func (*UpdateAttachmentMenuBots) UpdateType() string

type UpdateAuthorizationState

type UpdateAuthorizationState struct {

	// New authorization state
	AuthorizationState AuthorizationState `json:"authorization_state"`
	// contains filtered or unexported fields
}

The user authorization state has changed

func UnmarshalUpdateAuthorizationState

func UnmarshalUpdateAuthorizationState(data json.RawMessage) (*UpdateAuthorizationState, error)

func (*UpdateAuthorizationState) GetClass

func (*UpdateAuthorizationState) GetClass() string

func (*UpdateAuthorizationState) GetType

func (*UpdateAuthorizationState) GetType() string

func (*UpdateAuthorizationState) MarshalJSON

func (entity *UpdateAuthorizationState) MarshalJSON() ([]byte, error)

func (*UpdateAuthorizationState) UnmarshalJSON

func (updateAuthorizationState *UpdateAuthorizationState) UnmarshalJSON(data []byte) error

func (*UpdateAuthorizationState) UpdateType

func (*UpdateAuthorizationState) UpdateType() string

type UpdateBasicGroup

type UpdateBasicGroup struct {

	// New data about the group
	BasicGroup *BasicGroup `json:"basic_group"`
	// contains filtered or unexported fields
}

Some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the application

func UnmarshalUpdateBasicGroup

func UnmarshalUpdateBasicGroup(data json.RawMessage) (*UpdateBasicGroup, error)

func (*UpdateBasicGroup) GetClass

func (*UpdateBasicGroup) GetClass() string

func (*UpdateBasicGroup) GetType

func (*UpdateBasicGroup) GetType() string

func (*UpdateBasicGroup) MarshalJSON

func (entity *UpdateBasicGroup) MarshalJSON() ([]byte, error)

func (*UpdateBasicGroup) UpdateType

func (*UpdateBasicGroup) UpdateType() string

type UpdateBasicGroupFullInfo

type UpdateBasicGroupFullInfo struct {

	// Identifier of a basic group
	BasicGroupId int64 `json:"basic_group_id"`
	// New full information about the group
	BasicGroupFullInfo *BasicGroupFullInfo `json:"basic_group_full_info"`
	// contains filtered or unexported fields
}

Some data in basicGroupFullInfo has been changed

func UnmarshalUpdateBasicGroupFullInfo

func UnmarshalUpdateBasicGroupFullInfo(data json.RawMessage) (*UpdateBasicGroupFullInfo, error)

func (*UpdateBasicGroupFullInfo) GetClass

func (*UpdateBasicGroupFullInfo) GetClass() string

func (*UpdateBasicGroupFullInfo) GetType

func (*UpdateBasicGroupFullInfo) GetType() string

func (*UpdateBasicGroupFullInfo) MarshalJSON

func (entity *UpdateBasicGroupFullInfo) MarshalJSON() ([]byte, error)

func (*UpdateBasicGroupFullInfo) UpdateType

func (*UpdateBasicGroupFullInfo) UpdateType() string

type UpdateCall

type UpdateCall struct {

	// New data about a call
	Call *Call `json:"call"`
	// contains filtered or unexported fields
}

New call was created or information about a call was updated

func UnmarshalUpdateCall

func UnmarshalUpdateCall(data json.RawMessage) (*UpdateCall, error)

func (*UpdateCall) GetClass

func (*UpdateCall) GetClass() string

func (*UpdateCall) GetType

func (*UpdateCall) GetType() string

func (*UpdateCall) MarshalJSON

func (entity *UpdateCall) MarshalJSON() ([]byte, error)

func (*UpdateCall) UpdateType

func (*UpdateCall) UpdateType() string

type UpdateChatAction added in v1.7.10

type UpdateChatAction struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// If not 0, a message thread identifier in which the action was performed
	MessageThreadId int64 `json:"message_thread_id"`
	// Identifier of a message sender performing the action
	SenderId MessageSender `json:"sender_id"`
	// The action
	Action ChatAction `json:"action"`
	// contains filtered or unexported fields
}

A message sender activity in the chat has changed

func UnmarshalUpdateChatAction added in v1.7.10

func UnmarshalUpdateChatAction(data json.RawMessage) (*UpdateChatAction, error)

func (*UpdateChatAction) GetClass added in v1.7.10

func (*UpdateChatAction) GetClass() string

func (*UpdateChatAction) GetType added in v1.7.10

func (*UpdateChatAction) GetType() string

func (*UpdateChatAction) MarshalJSON added in v1.7.10

func (entity *UpdateChatAction) MarshalJSON() ([]byte, error)

func (*UpdateChatAction) UnmarshalJSON added in v1.7.10

func (updateChatAction *UpdateChatAction) UnmarshalJSON(data []byte) error

func (*UpdateChatAction) UpdateType added in v1.7.10

func (*UpdateChatAction) UpdateType() string

type UpdateChatActionBar

type UpdateChatActionBar struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new value of the action bar; may be null
	ActionBar ChatActionBar `json:"action_bar"`
	// contains filtered or unexported fields
}

The chat action bar was changed

func UnmarshalUpdateChatActionBar

func UnmarshalUpdateChatActionBar(data json.RawMessage) (*UpdateChatActionBar, error)

func (*UpdateChatActionBar) GetClass

func (*UpdateChatActionBar) GetClass() string

func (*UpdateChatActionBar) GetType

func (*UpdateChatActionBar) GetType() string

func (*UpdateChatActionBar) MarshalJSON

func (entity *UpdateChatActionBar) MarshalJSON() ([]byte, error)

func (*UpdateChatActionBar) UnmarshalJSON

func (updateChatActionBar *UpdateChatActionBar) UnmarshalJSON(data []byte) error

func (*UpdateChatActionBar) UpdateType

func (*UpdateChatActionBar) UpdateType() string

type UpdateChatAvailableReactions added in v1.8.3

type UpdateChatAvailableReactions struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new list of reactions, available in the chat
	AvailableReactions []string `json:"available_reactions"`
	// contains filtered or unexported fields
}

The chat available reactions were changed

func UnmarshalUpdateChatAvailableReactions added in v1.8.3

func UnmarshalUpdateChatAvailableReactions(data json.RawMessage) (*UpdateChatAvailableReactions, error)

func (*UpdateChatAvailableReactions) GetClass added in v1.8.3

func (*UpdateChatAvailableReactions) GetType added in v1.8.3

func (*UpdateChatAvailableReactions) MarshalJSON added in v1.8.3

func (entity *UpdateChatAvailableReactions) MarshalJSON() ([]byte, error)

func (*UpdateChatAvailableReactions) UpdateType added in v1.8.3

func (*UpdateChatAvailableReactions) UpdateType() string

type UpdateChatDefaultDisableNotification

type UpdateChatDefaultDisableNotification struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new default_disable_notification value
	DefaultDisableNotification bool `json:"default_disable_notification"`
	// contains filtered or unexported fields
}

The value of the default disable_notification parameter, used when a message is sent to the chat, was changed

func UnmarshalUpdateChatDefaultDisableNotification

func UnmarshalUpdateChatDefaultDisableNotification(data json.RawMessage) (*UpdateChatDefaultDisableNotification, error)

func (*UpdateChatDefaultDisableNotification) GetClass

func (*UpdateChatDefaultDisableNotification) GetType

func (*UpdateChatDefaultDisableNotification) MarshalJSON

func (entity *UpdateChatDefaultDisableNotification) MarshalJSON() ([]byte, error)

func (*UpdateChatDefaultDisableNotification) UpdateType

type UpdateChatDraftMessage

type UpdateChatDraftMessage struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new draft message; may be null
	DraftMessage *DraftMessage `json:"draft_message"`
	// The new chat positions in the chat lists
	Positions []*ChatPosition `json:"positions"`
	// contains filtered or unexported fields
}

A chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update mustn't be applied

func UnmarshalUpdateChatDraftMessage

func UnmarshalUpdateChatDraftMessage(data json.RawMessage) (*UpdateChatDraftMessage, error)

func (*UpdateChatDraftMessage) GetClass

func (*UpdateChatDraftMessage) GetClass() string

func (*UpdateChatDraftMessage) GetType

func (*UpdateChatDraftMessage) GetType() string

func (*UpdateChatDraftMessage) MarshalJSON

func (entity *UpdateChatDraftMessage) MarshalJSON() ([]byte, error)

func (*UpdateChatDraftMessage) UpdateType

func (*UpdateChatDraftMessage) UpdateType() string

type UpdateChatFilters

type UpdateChatFilters struct {

	// The new list of chat filters
	ChatFilters []*ChatFilterInfo `json:"chat_filters"`
	// contains filtered or unexported fields
}

The list of chat filters or a chat filter has changed

func UnmarshalUpdateChatFilters

func UnmarshalUpdateChatFilters(data json.RawMessage) (*UpdateChatFilters, error)

func (*UpdateChatFilters) GetClass

func (*UpdateChatFilters) GetClass() string

func (*UpdateChatFilters) GetType

func (*UpdateChatFilters) GetType() string

func (*UpdateChatFilters) MarshalJSON

func (entity *UpdateChatFilters) MarshalJSON() ([]byte, error)

func (*UpdateChatFilters) UpdateType

func (*UpdateChatFilters) UpdateType() string

type UpdateChatHasProtectedContent added in v1.7.10

type UpdateChatHasProtectedContent struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of has_protected_content
	HasProtectedContent bool `json:"has_protected_content"`
	// contains filtered or unexported fields
}

A chat content was allowed or restricted for saving

func UnmarshalUpdateChatHasProtectedContent added in v1.7.10

func UnmarshalUpdateChatHasProtectedContent(data json.RawMessage) (*UpdateChatHasProtectedContent, error)

func (*UpdateChatHasProtectedContent) GetClass added in v1.7.10

func (*UpdateChatHasProtectedContent) GetType added in v1.7.10

func (*UpdateChatHasProtectedContent) MarshalJSON added in v1.7.10

func (entity *UpdateChatHasProtectedContent) MarshalJSON() ([]byte, error)

func (*UpdateChatHasProtectedContent) UpdateType added in v1.7.10

func (*UpdateChatHasProtectedContent) UpdateType() string

type UpdateChatHasScheduledMessages

type UpdateChatHasScheduledMessages struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of has_scheduled_messages
	HasScheduledMessages bool `json:"has_scheduled_messages"`
	// contains filtered or unexported fields
}

A chat's has_scheduled_messages field has changed

func UnmarshalUpdateChatHasScheduledMessages

func UnmarshalUpdateChatHasScheduledMessages(data json.RawMessage) (*UpdateChatHasScheduledMessages, error)

func (*UpdateChatHasScheduledMessages) GetClass

func (*UpdateChatHasScheduledMessages) GetType

func (*UpdateChatHasScheduledMessages) MarshalJSON

func (entity *UpdateChatHasScheduledMessages) MarshalJSON() ([]byte, error)

func (*UpdateChatHasScheduledMessages) UpdateType

func (*UpdateChatHasScheduledMessages) UpdateType() string

type UpdateChatIsBlocked

type UpdateChatIsBlocked struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of is_blocked
	IsBlocked bool `json:"is_blocked"`
	// contains filtered or unexported fields
}

A chat was blocked or unblocked

func UnmarshalUpdateChatIsBlocked

func UnmarshalUpdateChatIsBlocked(data json.RawMessage) (*UpdateChatIsBlocked, error)

func (*UpdateChatIsBlocked) GetClass

func (*UpdateChatIsBlocked) GetClass() string

func (*UpdateChatIsBlocked) GetType

func (*UpdateChatIsBlocked) GetType() string

func (*UpdateChatIsBlocked) MarshalJSON

func (entity *UpdateChatIsBlocked) MarshalJSON() ([]byte, error)

func (*UpdateChatIsBlocked) UpdateType

func (*UpdateChatIsBlocked) UpdateType() string

type UpdateChatIsMarkedAsUnread

type UpdateChatIsMarkedAsUnread struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of is_marked_as_unread
	IsMarkedAsUnread bool `json:"is_marked_as_unread"`
	// contains filtered or unexported fields
}

A chat was marked as unread or was read

func UnmarshalUpdateChatIsMarkedAsUnread

func UnmarshalUpdateChatIsMarkedAsUnread(data json.RawMessage) (*UpdateChatIsMarkedAsUnread, error)

func (*UpdateChatIsMarkedAsUnread) GetClass

func (*UpdateChatIsMarkedAsUnread) GetClass() string

func (*UpdateChatIsMarkedAsUnread) GetType

func (*UpdateChatIsMarkedAsUnread) MarshalJSON

func (entity *UpdateChatIsMarkedAsUnread) MarshalJSON() ([]byte, error)

func (*UpdateChatIsMarkedAsUnread) UpdateType

func (*UpdateChatIsMarkedAsUnread) UpdateType() string

type UpdateChatLastMessage

type UpdateChatLastMessage struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new last message in the chat; may be null
	LastMessage *Message `json:"last_message"`
	// The new chat positions in the chat lists
	Positions []*ChatPosition `json:"positions"`
	// contains filtered or unexported fields
}

The last message of a chat was changed. If last_message is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case

func UnmarshalUpdateChatLastMessage

func UnmarshalUpdateChatLastMessage(data json.RawMessage) (*UpdateChatLastMessage, error)

func (*UpdateChatLastMessage) GetClass

func (*UpdateChatLastMessage) GetClass() string

func (*UpdateChatLastMessage) GetType

func (*UpdateChatLastMessage) GetType() string

func (*UpdateChatLastMessage) MarshalJSON

func (entity *UpdateChatLastMessage) MarshalJSON() ([]byte, error)

func (*UpdateChatLastMessage) UpdateType

func (*UpdateChatLastMessage) UpdateType() string

type UpdateChatMember added in v1.7.10

type UpdateChatMember struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the user, changing the rights
	ActorUserId int64 `json:"actor_user_id"`
	// Point in time (Unix timestamp) when the user rights was changed
	Date int32 `json:"date"`
	// If user has joined the chat using an invite link, the invite link; may be null
	InviteLink *ChatInviteLink `json:"invite_link"`
	// Previous chat member
	OldChatMember *ChatMember `json:"old_chat_member"`
	// New chat member
	NewChatMember *ChatMember `json:"new_chat_member"`
	// contains filtered or unexported fields
}

User rights changed in a chat; for bots only

func UnmarshalUpdateChatMember added in v1.7.10

func UnmarshalUpdateChatMember(data json.RawMessage) (*UpdateChatMember, error)

func (*UpdateChatMember) GetClass added in v1.7.10

func (*UpdateChatMember) GetClass() string

func (*UpdateChatMember) GetType added in v1.7.10

func (*UpdateChatMember) GetType() string

func (*UpdateChatMember) MarshalJSON added in v1.7.10

func (entity *UpdateChatMember) MarshalJSON() ([]byte, error)

func (*UpdateChatMember) UpdateType added in v1.7.10

func (*UpdateChatMember) UpdateType() string

type UpdateChatMessageSender added in v1.8.3

type UpdateChatMessageSender struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of message_sender_id; may be null if the user can't change message sender
	MessageSenderId MessageSender `json:"message_sender_id"`
	// contains filtered or unexported fields
}

The message sender that is selected to send messages in a chat has changed

func UnmarshalUpdateChatMessageSender added in v1.8.3

func UnmarshalUpdateChatMessageSender(data json.RawMessage) (*UpdateChatMessageSender, error)

func (*UpdateChatMessageSender) GetClass added in v1.8.3

func (*UpdateChatMessageSender) GetClass() string

func (*UpdateChatMessageSender) GetType added in v1.8.3

func (*UpdateChatMessageSender) GetType() string

func (*UpdateChatMessageSender) MarshalJSON added in v1.8.3

func (entity *UpdateChatMessageSender) MarshalJSON() ([]byte, error)

func (*UpdateChatMessageSender) UnmarshalJSON added in v1.8.3

func (updateChatMessageSender *UpdateChatMessageSender) UnmarshalJSON(data []byte) error

func (*UpdateChatMessageSender) UpdateType added in v1.8.3

func (*UpdateChatMessageSender) UpdateType() string

type UpdateChatMessageTtl added in v1.8.3

type UpdateChatMessageTtl struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of message_ttl
	MessageTtl int32 `json:"message_ttl"`
	// contains filtered or unexported fields
}

The message Time To Live setting for a chat was changed

func UnmarshalUpdateChatMessageTtl added in v1.8.3

func UnmarshalUpdateChatMessageTtl(data json.RawMessage) (*UpdateChatMessageTtl, error)

func (*UpdateChatMessageTtl) GetClass added in v1.8.3

func (*UpdateChatMessageTtl) GetClass() string

func (*UpdateChatMessageTtl) GetType added in v1.8.3

func (*UpdateChatMessageTtl) GetType() string

func (*UpdateChatMessageTtl) MarshalJSON added in v1.8.3

func (entity *UpdateChatMessageTtl) MarshalJSON() ([]byte, error)

func (*UpdateChatMessageTtl) UpdateType added in v1.8.3

func (*UpdateChatMessageTtl) UpdateType() string

type UpdateChatNotificationSettings

type UpdateChatNotificationSettings struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new notification settings
	NotificationSettings *ChatNotificationSettings `json:"notification_settings"`
	// contains filtered or unexported fields
}

Notification settings for a chat were changed

func UnmarshalUpdateChatNotificationSettings

func UnmarshalUpdateChatNotificationSettings(data json.RawMessage) (*UpdateChatNotificationSettings, error)

func (*UpdateChatNotificationSettings) GetClass

func (*UpdateChatNotificationSettings) GetType

func (*UpdateChatNotificationSettings) MarshalJSON

func (entity *UpdateChatNotificationSettings) MarshalJSON() ([]byte, error)

func (*UpdateChatNotificationSettings) UpdateType

func (*UpdateChatNotificationSettings) UpdateType() string

type UpdateChatOnlineMemberCount

type UpdateChatOnlineMemberCount struct {

	// Identifier of the chat
	ChatId int64 `json:"chat_id"`
	// New number of online members in the chat, or 0 if unknown
	OnlineMemberCount int32 `json:"online_member_count"`
	// contains filtered or unexported fields
}

The number of online group members has changed. This update with non-zero number of online group members is sent only for currently opened chats. There is no guarantee that it will be sent just after the number of online users has changed

func UnmarshalUpdateChatOnlineMemberCount

func UnmarshalUpdateChatOnlineMemberCount(data json.RawMessage) (*UpdateChatOnlineMemberCount, error)

func (*UpdateChatOnlineMemberCount) GetClass

func (*UpdateChatOnlineMemberCount) GetClass() string

func (*UpdateChatOnlineMemberCount) GetType

func (*UpdateChatOnlineMemberCount) MarshalJSON

func (entity *UpdateChatOnlineMemberCount) MarshalJSON() ([]byte, error)

func (*UpdateChatOnlineMemberCount) UpdateType

func (*UpdateChatOnlineMemberCount) UpdateType() string

type UpdateChatPendingJoinRequests added in v1.7.10

type UpdateChatPendingJoinRequests struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new data about pending join requests; may be null
	PendingJoinRequests *ChatJoinRequestsInfo `json:"pending_join_requests"`
	// contains filtered or unexported fields
}

The chat pending join requests were changed

func UnmarshalUpdateChatPendingJoinRequests added in v1.7.10

func UnmarshalUpdateChatPendingJoinRequests(data json.RawMessage) (*UpdateChatPendingJoinRequests, error)

func (*UpdateChatPendingJoinRequests) GetClass added in v1.7.10

func (*UpdateChatPendingJoinRequests) GetType added in v1.7.10

func (*UpdateChatPendingJoinRequests) MarshalJSON added in v1.7.10

func (entity *UpdateChatPendingJoinRequests) MarshalJSON() ([]byte, error)

func (*UpdateChatPendingJoinRequests) UpdateType added in v1.7.10

func (*UpdateChatPendingJoinRequests) UpdateType() string

type UpdateChatPermissions

type UpdateChatPermissions struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new chat permissions
	Permissions *ChatPermissions `json:"permissions"`
	// contains filtered or unexported fields
}

Chat permissions was changed

func UnmarshalUpdateChatPermissions

func UnmarshalUpdateChatPermissions(data json.RawMessage) (*UpdateChatPermissions, error)

func (*UpdateChatPermissions) GetClass

func (*UpdateChatPermissions) GetClass() string

func (*UpdateChatPermissions) GetType

func (*UpdateChatPermissions) GetType() string

func (*UpdateChatPermissions) MarshalJSON

func (entity *UpdateChatPermissions) MarshalJSON() ([]byte, error)

func (*UpdateChatPermissions) UpdateType

func (*UpdateChatPermissions) UpdateType() string

type UpdateChatPhoto

type UpdateChatPhoto struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new chat photo; may be null
	Photo *ChatPhotoInfo `json:"photo"`
	// contains filtered or unexported fields
}

A chat photo was changed

func UnmarshalUpdateChatPhoto

func UnmarshalUpdateChatPhoto(data json.RawMessage) (*UpdateChatPhoto, error)

func (*UpdateChatPhoto) GetClass

func (*UpdateChatPhoto) GetClass() string

func (*UpdateChatPhoto) GetType

func (*UpdateChatPhoto) GetType() string

func (*UpdateChatPhoto) MarshalJSON

func (entity *UpdateChatPhoto) MarshalJSON() ([]byte, error)

func (*UpdateChatPhoto) UpdateType

func (*UpdateChatPhoto) UpdateType() string

type UpdateChatPosition

type UpdateChatPosition struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New chat position. If new order is 0, then the chat needs to be removed from the list
	Position *ChatPosition `json:"position"`
	// contains filtered or unexported fields
}

The position of a chat in a chat list has changed. Instead of this update updateChatLastMessage or updateChatDraftMessage might be sent

func UnmarshalUpdateChatPosition

func UnmarshalUpdateChatPosition(data json.RawMessage) (*UpdateChatPosition, error)

func (*UpdateChatPosition) GetClass

func (*UpdateChatPosition) GetClass() string

func (*UpdateChatPosition) GetType

func (*UpdateChatPosition) GetType() string

func (*UpdateChatPosition) MarshalJSON

func (entity *UpdateChatPosition) MarshalJSON() ([]byte, error)

func (*UpdateChatPosition) UpdateType

func (*UpdateChatPosition) UpdateType() string

type UpdateChatReadInbox

type UpdateChatReadInbox struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the last read incoming message
	LastReadInboxMessageId int64 `json:"last_read_inbox_message_id"`
	// The number of unread messages left in the chat
	UnreadCount int32 `json:"unread_count"`
	// contains filtered or unexported fields
}

Incoming messages were read or the number of unread messages has been changed

func UnmarshalUpdateChatReadInbox

func UnmarshalUpdateChatReadInbox(data json.RawMessage) (*UpdateChatReadInbox, error)

func (*UpdateChatReadInbox) GetClass

func (*UpdateChatReadInbox) GetClass() string

func (*UpdateChatReadInbox) GetType

func (*UpdateChatReadInbox) GetType() string

func (*UpdateChatReadInbox) MarshalJSON

func (entity *UpdateChatReadInbox) MarshalJSON() ([]byte, error)

func (*UpdateChatReadInbox) UpdateType

func (*UpdateChatReadInbox) UpdateType() string

type UpdateChatReadOutbox

type UpdateChatReadOutbox struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of last read outgoing message
	LastReadOutboxMessageId int64 `json:"last_read_outbox_message_id"`
	// contains filtered or unexported fields
}

Outgoing messages were read

func UnmarshalUpdateChatReadOutbox

func UnmarshalUpdateChatReadOutbox(data json.RawMessage) (*UpdateChatReadOutbox, error)

func (*UpdateChatReadOutbox) GetClass

func (*UpdateChatReadOutbox) GetClass() string

func (*UpdateChatReadOutbox) GetType

func (*UpdateChatReadOutbox) GetType() string

func (*UpdateChatReadOutbox) MarshalJSON

func (entity *UpdateChatReadOutbox) MarshalJSON() ([]byte, error)

func (*UpdateChatReadOutbox) UpdateType

func (*UpdateChatReadOutbox) UpdateType() string

type UpdateChatReplyMarkup

type UpdateChatReplyMarkup struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifier of the message from which reply markup needs to be used; 0 if there is no default custom reply markup in the chat
	ReplyMarkupMessageId int64 `json:"reply_markup_message_id"`
	// contains filtered or unexported fields
}

The default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user

func UnmarshalUpdateChatReplyMarkup

func UnmarshalUpdateChatReplyMarkup(data json.RawMessage) (*UpdateChatReplyMarkup, error)

func (*UpdateChatReplyMarkup) GetClass

func (*UpdateChatReplyMarkup) GetClass() string

func (*UpdateChatReplyMarkup) GetType

func (*UpdateChatReplyMarkup) GetType() string

func (*UpdateChatReplyMarkup) MarshalJSON

func (entity *UpdateChatReplyMarkup) MarshalJSON() ([]byte, error)

func (*UpdateChatReplyMarkup) UpdateType

func (*UpdateChatReplyMarkup) UpdateType() string

type UpdateChatTheme added in v1.7.10

type UpdateChatTheme struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new name of the chat theme; may be empty if theme was reset to default
	ThemeName string `json:"theme_name"`
	// contains filtered or unexported fields
}

The chat theme was changed

func UnmarshalUpdateChatTheme added in v1.7.10

func UnmarshalUpdateChatTheme(data json.RawMessage) (*UpdateChatTheme, error)

func (*UpdateChatTheme) GetClass added in v1.7.10

func (*UpdateChatTheme) GetClass() string

func (*UpdateChatTheme) GetType added in v1.7.10

func (*UpdateChatTheme) GetType() string

func (*UpdateChatTheme) MarshalJSON added in v1.7.10

func (entity *UpdateChatTheme) MarshalJSON() ([]byte, error)

func (*UpdateChatTheme) UpdateType added in v1.7.10

func (*UpdateChatTheme) UpdateType() string

type UpdateChatThemes added in v1.7.10

type UpdateChatThemes struct {

	// The new list of chat themes
	ChatThemes []*ChatTheme `json:"chat_themes"`
	// contains filtered or unexported fields
}

The list of available chat themes has changed

func UnmarshalUpdateChatThemes added in v1.7.10

func UnmarshalUpdateChatThemes(data json.RawMessage) (*UpdateChatThemes, error)

func (*UpdateChatThemes) GetClass added in v1.7.10

func (*UpdateChatThemes) GetClass() string

func (*UpdateChatThemes) GetType added in v1.7.10

func (*UpdateChatThemes) GetType() string

func (*UpdateChatThemes) MarshalJSON added in v1.7.10

func (entity *UpdateChatThemes) MarshalJSON() ([]byte, error)

func (*UpdateChatThemes) UpdateType added in v1.7.10

func (*UpdateChatThemes) UpdateType() string

type UpdateChatTitle

type UpdateChatTitle struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The new chat title
	Title string `json:"title"`
	// contains filtered or unexported fields
}

The title of a chat was changed

func UnmarshalUpdateChatTitle

func UnmarshalUpdateChatTitle(data json.RawMessage) (*UpdateChatTitle, error)

func (*UpdateChatTitle) GetClass

func (*UpdateChatTitle) GetClass() string

func (*UpdateChatTitle) GetType

func (*UpdateChatTitle) GetType() string

func (*UpdateChatTitle) MarshalJSON

func (entity *UpdateChatTitle) MarshalJSON() ([]byte, error)

func (*UpdateChatTitle) UpdateType

func (*UpdateChatTitle) UpdateType() string

type UpdateChatUnreadMentionCount

type UpdateChatUnreadMentionCount struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The number of unread mention messages left in the chat
	UnreadMentionCount int32 `json:"unread_mention_count"`
	// contains filtered or unexported fields
}

The chat unread_mention_count has changed

func UnmarshalUpdateChatUnreadMentionCount

func UnmarshalUpdateChatUnreadMentionCount(data json.RawMessage) (*UpdateChatUnreadMentionCount, error)

func (*UpdateChatUnreadMentionCount) GetClass

func (*UpdateChatUnreadMentionCount) GetType

func (*UpdateChatUnreadMentionCount) MarshalJSON

func (entity *UpdateChatUnreadMentionCount) MarshalJSON() ([]byte, error)

func (*UpdateChatUnreadMentionCount) UpdateType

func (*UpdateChatUnreadMentionCount) UpdateType() string

type UpdateChatUnreadReactionCount added in v1.8.3

type UpdateChatUnreadReactionCount struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The number of messages with unread reactions left in the chat
	UnreadReactionCount int32 `json:"unread_reaction_count"`
	// contains filtered or unexported fields
}

The chat unread_reaction_count has changed

func UnmarshalUpdateChatUnreadReactionCount added in v1.8.3

func UnmarshalUpdateChatUnreadReactionCount(data json.RawMessage) (*UpdateChatUnreadReactionCount, error)

func (*UpdateChatUnreadReactionCount) GetClass added in v1.8.3

func (*UpdateChatUnreadReactionCount) GetType added in v1.8.3

func (*UpdateChatUnreadReactionCount) MarshalJSON added in v1.8.3

func (entity *UpdateChatUnreadReactionCount) MarshalJSON() ([]byte, error)

func (*UpdateChatUnreadReactionCount) UpdateType added in v1.8.3

func (*UpdateChatUnreadReactionCount) UpdateType() string

type UpdateChatVideoChat added in v1.7.10

type UpdateChatVideoChat struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// New value of video_chat
	VideoChat *VideoChat `json:"video_chat"`
	// contains filtered or unexported fields
}

A chat video chat state has changed

func UnmarshalUpdateChatVideoChat added in v1.7.10

func UnmarshalUpdateChatVideoChat(data json.RawMessage) (*UpdateChatVideoChat, error)

func (*UpdateChatVideoChat) GetClass added in v1.7.10

func (*UpdateChatVideoChat) GetClass() string

func (*UpdateChatVideoChat) GetType added in v1.7.10

func (*UpdateChatVideoChat) GetType() string

func (*UpdateChatVideoChat) MarshalJSON added in v1.7.10

func (entity *UpdateChatVideoChat) MarshalJSON() ([]byte, error)

func (*UpdateChatVideoChat) UpdateType added in v1.7.10

func (*UpdateChatVideoChat) UpdateType() string

type UpdateConnectionState

type UpdateConnectionState struct {

	// The new connection state
	State ConnectionState `json:"state"`
	// contains filtered or unexported fields
}

The connection state has changed. This update must be used only to show a human-readable description of the connection state

func UnmarshalUpdateConnectionState

func UnmarshalUpdateConnectionState(data json.RawMessage) (*UpdateConnectionState, error)

func (*UpdateConnectionState) GetClass

func (*UpdateConnectionState) GetClass() string

func (*UpdateConnectionState) GetType

func (*UpdateConnectionState) GetType() string

func (*UpdateConnectionState) MarshalJSON

func (entity *UpdateConnectionState) MarshalJSON() ([]byte, error)

func (*UpdateConnectionState) UnmarshalJSON

func (updateConnectionState *UpdateConnectionState) UnmarshalJSON(data []byte) error

func (*UpdateConnectionState) UpdateType

func (*UpdateConnectionState) UpdateType() string

type UpdateDeleteMessages

type UpdateDeleteMessages struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Identifiers of the deleted messages
	MessageIds []int64 `json:"message_ids"`
	// True, if the messages are permanently deleted by a user (as opposed to just becoming inaccessible)
	IsPermanent bool `json:"is_permanent"`
	// True, if the messages are deleted only from the cache and can possibly be retrieved again in the future
	FromCache bool `json:"from_cache"`
	// contains filtered or unexported fields
}

Some messages were deleted

func UnmarshalUpdateDeleteMessages

func UnmarshalUpdateDeleteMessages(data json.RawMessage) (*UpdateDeleteMessages, error)

func (*UpdateDeleteMessages) GetClass

func (*UpdateDeleteMessages) GetClass() string

func (*UpdateDeleteMessages) GetType

func (*UpdateDeleteMessages) GetType() string

func (*UpdateDeleteMessages) MarshalJSON

func (entity *UpdateDeleteMessages) MarshalJSON() ([]byte, error)

func (*UpdateDeleteMessages) UpdateType

func (*UpdateDeleteMessages) UpdateType() string

type UpdateDiceEmojis

type UpdateDiceEmojis struct {

	// The new list of supported dice emojis
	Emojis []string `json:"emojis"`
	// contains filtered or unexported fields
}

The list of supported dice emojis has changed

func UnmarshalUpdateDiceEmojis

func UnmarshalUpdateDiceEmojis(data json.RawMessage) (*UpdateDiceEmojis, error)

func (*UpdateDiceEmojis) GetClass

func (*UpdateDiceEmojis) GetClass() string

func (*UpdateDiceEmojis) GetType

func (*UpdateDiceEmojis) GetType() string

func (*UpdateDiceEmojis) MarshalJSON

func (entity *UpdateDiceEmojis) MarshalJSON() ([]byte, error)

func (*UpdateDiceEmojis) UpdateType

func (*UpdateDiceEmojis) UpdateType() string

type UpdateFavoriteStickers

type UpdateFavoriteStickers struct {

	// The new list of file identifiers of favorite stickers
	StickerIds []int32 `json:"sticker_ids"`
	// contains filtered or unexported fields
}

The list of favorite stickers was updated

func UnmarshalUpdateFavoriteStickers

func UnmarshalUpdateFavoriteStickers(data json.RawMessage) (*UpdateFavoriteStickers, error)

func (*UpdateFavoriteStickers) GetClass

func (*UpdateFavoriteStickers) GetClass() string

func (*UpdateFavoriteStickers) GetType

func (*UpdateFavoriteStickers) GetType() string

func (*UpdateFavoriteStickers) MarshalJSON

func (entity *UpdateFavoriteStickers) MarshalJSON() ([]byte, error)

func (*UpdateFavoriteStickers) UpdateType

func (*UpdateFavoriteStickers) UpdateType() string

type UpdateFile

type UpdateFile struct {

	// New data about the file
	File *File `json:"file"`
	// contains filtered or unexported fields
}

Information about a file was updated

func UnmarshalUpdateFile

func UnmarshalUpdateFile(data json.RawMessage) (*UpdateFile, error)

func (*UpdateFile) GetClass

func (*UpdateFile) GetClass() string

func (*UpdateFile) GetType

func (*UpdateFile) GetType() string

func (*UpdateFile) MarshalJSON

func (entity *UpdateFile) MarshalJSON() ([]byte, error)

func (*UpdateFile) UpdateType

func (*UpdateFile) UpdateType() string

type UpdateFileAddedToDownloads added in v1.8.3

type UpdateFileAddedToDownloads struct {

	// The added file download
	FileDownload *FileDownload `json:"file_download"`
	// New number of being downloaded and recently downloaded files found
	Counts *DownloadedFileCounts `json:"counts"`
	// contains filtered or unexported fields
}

A file was added to the file download list. This update is sent only after file download list is loaded for the first time

func UnmarshalUpdateFileAddedToDownloads added in v1.8.3

func UnmarshalUpdateFileAddedToDownloads(data json.RawMessage) (*UpdateFileAddedToDownloads, error)

func (*UpdateFileAddedToDownloads) GetClass added in v1.8.3

func (*UpdateFileAddedToDownloads) GetClass() string

func (*UpdateFileAddedToDownloads) GetType added in v1.8.3

func (*UpdateFileAddedToDownloads) MarshalJSON added in v1.8.3

func (entity *UpdateFileAddedToDownloads) MarshalJSON() ([]byte, error)

func (*UpdateFileAddedToDownloads) UpdateType added in v1.8.3

func (*UpdateFileAddedToDownloads) UpdateType() string

type UpdateFileDownload added in v1.8.3

type UpdateFileDownload struct {

	// File identifier
	FileId int32 `json:"file_id"`
	// Point in time (Unix timestamp) when the file downloading was completed; 0 if the file downloading isn't completed
	CompleteDate int32 `json:"complete_date"`
	// True, if downloading of the file is paused
	IsPaused bool `json:"is_paused"`
	// New number of being downloaded and recently downloaded files found
	Counts *DownloadedFileCounts `json:"counts"`
	// contains filtered or unexported fields
}

A file download was changed. This update is sent only after file download list is loaded for the first time

func UnmarshalUpdateFileDownload added in v1.8.3

func UnmarshalUpdateFileDownload(data json.RawMessage) (*UpdateFileDownload, error)

func (*UpdateFileDownload) GetClass added in v1.8.3

func (*UpdateFileDownload) GetClass() string

func (*UpdateFileDownload) GetType added in v1.8.3

func (*UpdateFileDownload) GetType() string

func (*UpdateFileDownload) MarshalJSON added in v1.8.3

func (entity *UpdateFileDownload) MarshalJSON() ([]byte, error)

func (*UpdateFileDownload) UpdateType added in v1.8.3

func (*UpdateFileDownload) UpdateType() string

type UpdateFileDownloads added in v1.8.3

type UpdateFileDownloads struct {

	// Total size of files in the file download list, in bytes
	TotalSize int64 `json:"total_size"`
	// Total number of files in the file download list
	TotalCount int32 `json:"total_count"`
	// Total downloaded size of files in the file download list, in bytes
	DownloadedSize int64 `json:"downloaded_size"`
	// contains filtered or unexported fields
}

The state of the file download list has changed

func UnmarshalUpdateFileDownloads added in v1.8.3

func UnmarshalUpdateFileDownloads(data json.RawMessage) (*UpdateFileDownloads, error)

func (*UpdateFileDownloads) GetClass added in v1.8.3

func (*UpdateFileDownloads) GetClass() string

func (*UpdateFileDownloads) GetType added in v1.8.3

func (*UpdateFileDownloads) GetType() string

func (*UpdateFileDownloads) MarshalJSON added in v1.8.3

func (entity *UpdateFileDownloads) MarshalJSON() ([]byte, error)

func (*UpdateFileDownloads) UpdateType added in v1.8.3

func (*UpdateFileDownloads) UpdateType() string

type UpdateFileGenerationStart

type UpdateFileGenerationStart struct {

	// Unique identifier for the generation process
	GenerationId JsonInt64 `json:"generation_id"`
	// The path to a file from which a new file is generated; may be empty
	OriginalPath string `json:"original_path"`
	// The path to a file that must be created and where the new file is generated
	DestinationPath string `json:"destination_path"`
	// String specifying the conversion applied to the original file. If conversion is "#url#" than original_path contains an HTTP/HTTPS URL of a file, which must be downloaded by the application
	Conversion string `json:"conversion"`
	// contains filtered or unexported fields
}

The file generation process needs to be started by the application

func UnmarshalUpdateFileGenerationStart

func UnmarshalUpdateFileGenerationStart(data json.RawMessage) (*UpdateFileGenerationStart, error)

func (*UpdateFileGenerationStart) GetClass

func (*UpdateFileGenerationStart) GetClass() string

func (*UpdateFileGenerationStart) GetType

func (*UpdateFileGenerationStart) GetType() string

func (*UpdateFileGenerationStart) MarshalJSON

func (entity *UpdateFileGenerationStart) MarshalJSON() ([]byte, error)

func (*UpdateFileGenerationStart) UpdateType

func (*UpdateFileGenerationStart) UpdateType() string

type UpdateFileGenerationStop

type UpdateFileGenerationStop struct {

	// Unique identifier for the generation process
	GenerationId JsonInt64 `json:"generation_id"`
	// contains filtered or unexported fields
}

File generation is no longer needed

func UnmarshalUpdateFileGenerationStop

func UnmarshalUpdateFileGenerationStop(data json.RawMessage) (*UpdateFileGenerationStop, error)

func (*UpdateFileGenerationStop) GetClass

func (*UpdateFileGenerationStop) GetClass() string

func (*UpdateFileGenerationStop) GetType

func (*UpdateFileGenerationStop) GetType() string

func (*UpdateFileGenerationStop) MarshalJSON

func (entity *UpdateFileGenerationStop) MarshalJSON() ([]byte, error)

func (*UpdateFileGenerationStop) UpdateType

func (*UpdateFileGenerationStop) UpdateType() string

type UpdateFileRemovedFromDownloads added in v1.8.3

type UpdateFileRemovedFromDownloads struct {

	// File identifier
	FileId int32 `json:"file_id"`
	// New number of being downloaded and recently downloaded files found
	Counts *DownloadedFileCounts `json:"counts"`
	// contains filtered or unexported fields
}

A file was removed from the file download list. This update is sent only after file download list is loaded for the first time

func UnmarshalUpdateFileRemovedFromDownloads added in v1.8.3

func UnmarshalUpdateFileRemovedFromDownloads(data json.RawMessage) (*UpdateFileRemovedFromDownloads, error)

func (*UpdateFileRemovedFromDownloads) GetClass added in v1.8.3

func (*UpdateFileRemovedFromDownloads) GetType added in v1.8.3

func (*UpdateFileRemovedFromDownloads) MarshalJSON added in v1.8.3

func (entity *UpdateFileRemovedFromDownloads) MarshalJSON() ([]byte, error)

func (*UpdateFileRemovedFromDownloads) UpdateType added in v1.8.3

func (*UpdateFileRemovedFromDownloads) UpdateType() string

type UpdateGroupCall added in v1.7.10

type UpdateGroupCall struct {

	// New data about a group call
	GroupCall *GroupCall `json:"group_call"`
	// contains filtered or unexported fields
}

Information about a group call was updated

func UnmarshalUpdateGroupCall added in v1.7.10

func UnmarshalUpdateGroupCall(data json.RawMessage) (*UpdateGroupCall, error)

func (*UpdateGroupCall) GetClass added in v1.7.10

func (*UpdateGroupCall) GetClass() string

func (*UpdateGroupCall) GetType added in v1.7.10

func (*UpdateGroupCall) GetType() string

func (*UpdateGroupCall) MarshalJSON added in v1.7.10

func (entity *UpdateGroupCall) MarshalJSON() ([]byte, error)

func (*UpdateGroupCall) UpdateType added in v1.7.10

func (*UpdateGroupCall) UpdateType() string

type UpdateGroupCallParticipant added in v1.7.10

type UpdateGroupCallParticipant struct {

	// Identifier of group call
	GroupCallId int32 `json:"group_call_id"`
	// New data about a participant
	Participant *GroupCallParticipant `json:"participant"`
	// contains filtered or unexported fields
}

Information about a group call participant was changed. The updates are sent only after the group call is received through getGroupCall and only if the call is joined or being joined

func UnmarshalUpdateGroupCallParticipant added in v1.7.10

func UnmarshalUpdateGroupCallParticipant(data json.RawMessage) (*UpdateGroupCallParticipant, error)

func (*UpdateGroupCallParticipant) GetClass added in v1.7.10

func (*UpdateGroupCallParticipant) GetClass() string

func (*UpdateGroupCallParticipant) GetType added in v1.7.10

func (*UpdateGroupCallParticipant) MarshalJSON added in v1.7.10

func (entity *UpdateGroupCallParticipant) MarshalJSON() ([]byte, error)

func (*UpdateGroupCallParticipant) UpdateType added in v1.7.10

func (*UpdateGroupCallParticipant) UpdateType() string

type UpdateHavePendingNotifications

type UpdateHavePendingNotifications struct {

	// True, if there are some delayed notification updates, which will be sent soon
	HaveDelayedNotifications bool `json:"have_delayed_notifications"`
	// True, if there can be some yet unreceived notifications, which are being fetched from the server
	HaveUnreceivedNotifications bool `json:"have_unreceived_notifications"`
	// contains filtered or unexported fields
}

Describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications

func UnmarshalUpdateHavePendingNotifications

func UnmarshalUpdateHavePendingNotifications(data json.RawMessage) (*UpdateHavePendingNotifications, error)

func (*UpdateHavePendingNotifications) GetClass

func (*UpdateHavePendingNotifications) GetType

func (*UpdateHavePendingNotifications) MarshalJSON

func (entity *UpdateHavePendingNotifications) MarshalJSON() ([]byte, error)

func (*UpdateHavePendingNotifications) UpdateType

func (*UpdateHavePendingNotifications) UpdateType() string

type UpdateInstalledStickerSets

type UpdateInstalledStickerSets struct {

	// True, if the list of installed mask sticker sets was updated
	IsMasks bool `json:"is_masks"`
	// The new list of installed ordinary sticker sets
	StickerSetIds []JsonInt64 `json:"sticker_set_ids"`
	// contains filtered or unexported fields
}

The list of installed sticker sets was updated

func UnmarshalUpdateInstalledStickerSets

func UnmarshalUpdateInstalledStickerSets(data json.RawMessage) (*UpdateInstalledStickerSets, error)

func (*UpdateInstalledStickerSets) GetClass

func (*UpdateInstalledStickerSets) GetClass() string

func (*UpdateInstalledStickerSets) GetType

func (*UpdateInstalledStickerSets) MarshalJSON

func (entity *UpdateInstalledStickerSets) MarshalJSON() ([]byte, error)

func (*UpdateInstalledStickerSets) UpdateType

func (*UpdateInstalledStickerSets) UpdateType() string

type UpdateLanguagePackStrings

type UpdateLanguagePackStrings struct {

	// Localization target to which the language pack belongs
	LocalizationTarget string `json:"localization_target"`
	// Identifier of the updated language pack
	LanguagePackId string `json:"language_pack_id"`
	// List of changed language pack strings
	Strings []*LanguagePackString `json:"strings"`
	// contains filtered or unexported fields
}

Some language pack strings have been updated

func UnmarshalUpdateLanguagePackStrings

func UnmarshalUpdateLanguagePackStrings(data json.RawMessage) (*UpdateLanguagePackStrings, error)

func (*UpdateLanguagePackStrings) GetClass

func (*UpdateLanguagePackStrings) GetClass() string

func (*UpdateLanguagePackStrings) GetType

func (*UpdateLanguagePackStrings) GetType() string

func (*UpdateLanguagePackStrings) MarshalJSON

func (entity *UpdateLanguagePackStrings) MarshalJSON() ([]byte, error)

func (*UpdateLanguagePackStrings) UpdateType

func (*UpdateLanguagePackStrings) UpdateType() string

type UpdateMessageContent

type UpdateMessageContent struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// New message content
	NewContent MessageContent `json:"new_content"`
	// contains filtered or unexported fields
}

The message content has changed

func UnmarshalUpdateMessageContent

func UnmarshalUpdateMessageContent(data json.RawMessage) (*UpdateMessageContent, error)

func (*UpdateMessageContent) GetClass

func (*UpdateMessageContent) GetClass() string

func (*UpdateMessageContent) GetType

func (*UpdateMessageContent) GetType() string

func (*UpdateMessageContent) MarshalJSON

func (entity *UpdateMessageContent) MarshalJSON() ([]byte, error)

func (*UpdateMessageContent) UnmarshalJSON

func (updateMessageContent *UpdateMessageContent) UnmarshalJSON(data []byte) error

func (*UpdateMessageContent) UpdateType

func (*UpdateMessageContent) UpdateType() string

type UpdateMessageContentOpened

type UpdateMessageContentOpened struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// contains filtered or unexported fields
}

The message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the TTL timer for self-destructing messages

func UnmarshalUpdateMessageContentOpened

func UnmarshalUpdateMessageContentOpened(data json.RawMessage) (*UpdateMessageContentOpened, error)

func (*UpdateMessageContentOpened) GetClass

func (*UpdateMessageContentOpened) GetClass() string

func (*UpdateMessageContentOpened) GetType

func (*UpdateMessageContentOpened) MarshalJSON

func (entity *UpdateMessageContentOpened) MarshalJSON() ([]byte, error)

func (*UpdateMessageContentOpened) UpdateType

func (*UpdateMessageContentOpened) UpdateType() string

type UpdateMessageEdited

type UpdateMessageEdited struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// Point in time (Unix timestamp) when the message was edited
	EditDate int32 `json:"edit_date"`
	// New message reply markup; may be null
	ReplyMarkup ReplyMarkup `json:"reply_markup"`
	// contains filtered or unexported fields
}

A message was edited. Changes in the message content will come in a separate updateMessageContent

func UnmarshalUpdateMessageEdited

func UnmarshalUpdateMessageEdited(data json.RawMessage) (*UpdateMessageEdited, error)

func (*UpdateMessageEdited) GetClass

func (*UpdateMessageEdited) GetClass() string

func (*UpdateMessageEdited) GetType

func (*UpdateMessageEdited) GetType() string

func (*UpdateMessageEdited) MarshalJSON

func (entity *UpdateMessageEdited) MarshalJSON() ([]byte, error)

func (*UpdateMessageEdited) UnmarshalJSON

func (updateMessageEdited *UpdateMessageEdited) UnmarshalJSON(data []byte) error

func (*UpdateMessageEdited) UpdateType

func (*UpdateMessageEdited) UpdateType() string

type UpdateMessageInteractionInfo

type UpdateMessageInteractionInfo struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// New information about interactions with the message; may be null
	InteractionInfo *MessageInteractionInfo `json:"interaction_info"`
	// contains filtered or unexported fields
}

The information about interactions with a message has changed

func UnmarshalUpdateMessageInteractionInfo

func UnmarshalUpdateMessageInteractionInfo(data json.RawMessage) (*UpdateMessageInteractionInfo, error)

func (*UpdateMessageInteractionInfo) GetClass

func (*UpdateMessageInteractionInfo) GetType

func (*UpdateMessageInteractionInfo) MarshalJSON

func (entity *UpdateMessageInteractionInfo) MarshalJSON() ([]byte, error)

func (*UpdateMessageInteractionInfo) UpdateType

func (*UpdateMessageInteractionInfo) UpdateType() string

type UpdateMessageIsPinned

type UpdateMessageIsPinned struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// The message identifier
	MessageId int64 `json:"message_id"`
	// True, if the message is pinned
	IsPinned bool `json:"is_pinned"`
	// contains filtered or unexported fields
}

The message pinned state was changed

func UnmarshalUpdateMessageIsPinned

func UnmarshalUpdateMessageIsPinned(data json.RawMessage) (*UpdateMessageIsPinned, error)

func (*UpdateMessageIsPinned) GetClass

func (*UpdateMessageIsPinned) GetClass() string

func (*UpdateMessageIsPinned) GetType

func (*UpdateMessageIsPinned) GetType() string

func (*UpdateMessageIsPinned) MarshalJSON

func (entity *UpdateMessageIsPinned) MarshalJSON() ([]byte, error)

func (*UpdateMessageIsPinned) UpdateType

func (*UpdateMessageIsPinned) UpdateType() string

type UpdateMessageLiveLocationViewed

type UpdateMessageLiveLocationViewed struct {

	// Identifier of the chat with the live location message
	ChatId int64 `json:"chat_id"`
	// Identifier of the message with live location
	MessageId int64 `json:"message_id"`
	// contains filtered or unexported fields
}

A message with a live location was viewed. When the update is received, the application is supposed to update the live location

func UnmarshalUpdateMessageLiveLocationViewed

func UnmarshalUpdateMessageLiveLocationViewed(data json.RawMessage) (*UpdateMessageLiveLocationViewed, error)

func (*UpdateMessageLiveLocationViewed) GetClass

func (*UpdateMessageLiveLocationViewed) GetType

func (*UpdateMessageLiveLocationViewed) MarshalJSON

func (entity *UpdateMessageLiveLocationViewed) MarshalJSON() ([]byte, error)

func (*UpdateMessageLiveLocationViewed) UpdateType

type UpdateMessageMentionRead

type UpdateMessageMentionRead struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// The new number of unread mention messages left in the chat
	UnreadMentionCount int32 `json:"unread_mention_count"`
	// contains filtered or unexported fields
}

A message with an unread mention was read

func UnmarshalUpdateMessageMentionRead

func UnmarshalUpdateMessageMentionRead(data json.RawMessage) (*UpdateMessageMentionRead, error)

func (*UpdateMessageMentionRead) GetClass

func (*UpdateMessageMentionRead) GetClass() string

func (*UpdateMessageMentionRead) GetType

func (*UpdateMessageMentionRead) GetType() string

func (*UpdateMessageMentionRead) MarshalJSON

func (entity *UpdateMessageMentionRead) MarshalJSON() ([]byte, error)

func (*UpdateMessageMentionRead) UpdateType

func (*UpdateMessageMentionRead) UpdateType() string

type UpdateMessageSendAcknowledged

type UpdateMessageSendAcknowledged struct {

	// The chat identifier of the sent message
	ChatId int64 `json:"chat_id"`
	// A temporary message identifier
	MessageId int64 `json:"message_id"`
	// contains filtered or unexported fields
}

A request to send a message has reached the Telegram server. This doesn't mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message

func UnmarshalUpdateMessageSendAcknowledged

func UnmarshalUpdateMessageSendAcknowledged(data json.RawMessage) (*UpdateMessageSendAcknowledged, error)

func (*UpdateMessageSendAcknowledged) GetClass

func (*UpdateMessageSendAcknowledged) GetType

func (*UpdateMessageSendAcknowledged) MarshalJSON

func (entity *UpdateMessageSendAcknowledged) MarshalJSON() ([]byte, error)

func (*UpdateMessageSendAcknowledged) UpdateType

func (*UpdateMessageSendAcknowledged) UpdateType() string

type UpdateMessageSendFailed

type UpdateMessageSendFailed struct {

	// The failed to send message
	Message *Message `json:"message"`
	// The previous temporary message identifier
	OldMessageId int64 `json:"old_message_id"`
	// An error code
	ErrorCode int32 `json:"error_code"`
	// Error message
	ErrorMessage string `json:"error_message"`
	// contains filtered or unexported fields
}

A message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update

func UnmarshalUpdateMessageSendFailed

func UnmarshalUpdateMessageSendFailed(data json.RawMessage) (*UpdateMessageSendFailed, error)

func (*UpdateMessageSendFailed) GetClass

func (*UpdateMessageSendFailed) GetClass() string

func (*UpdateMessageSendFailed) GetType

func (*UpdateMessageSendFailed) GetType() string

func (*UpdateMessageSendFailed) MarshalJSON

func (entity *UpdateMessageSendFailed) MarshalJSON() ([]byte, error)

func (*UpdateMessageSendFailed) UpdateType

func (*UpdateMessageSendFailed) UpdateType() string

type UpdateMessageSendSucceeded

type UpdateMessageSendSucceeded struct {

	// The sent message. Usually only the message identifier, date, and content are changed, but almost all other fields can also change
	Message *Message `json:"message"`
	// The previous temporary message identifier
	OldMessageId int64 `json:"old_message_id"`
	// contains filtered or unexported fields
}

A message has been successfully sent

func UnmarshalUpdateMessageSendSucceeded

func UnmarshalUpdateMessageSendSucceeded(data json.RawMessage) (*UpdateMessageSendSucceeded, error)

func (*UpdateMessageSendSucceeded) GetClass

func (*UpdateMessageSendSucceeded) GetClass() string

func (*UpdateMessageSendSucceeded) GetType

func (*UpdateMessageSendSucceeded) MarshalJSON

func (entity *UpdateMessageSendSucceeded) MarshalJSON() ([]byte, error)

func (*UpdateMessageSendSucceeded) UpdateType

func (*UpdateMessageSendSucceeded) UpdateType() string

type UpdateMessageUnreadReactions added in v1.8.3

type UpdateMessageUnreadReactions struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// The new list of unread reactions
	UnreadReactions []*UnreadReaction `json:"unread_reactions"`
	// The new number of messages with unread reactions left in the chat
	UnreadReactionCount int32 `json:"unread_reaction_count"`
	// contains filtered or unexported fields
}

The list of unread reactions added to a message was changed

func UnmarshalUpdateMessageUnreadReactions added in v1.8.3

func UnmarshalUpdateMessageUnreadReactions(data json.RawMessage) (*UpdateMessageUnreadReactions, error)

func (*UpdateMessageUnreadReactions) GetClass added in v1.8.3

func (*UpdateMessageUnreadReactions) GetType added in v1.8.3

func (*UpdateMessageUnreadReactions) MarshalJSON added in v1.8.3

func (entity *UpdateMessageUnreadReactions) MarshalJSON() ([]byte, error)

func (*UpdateMessageUnreadReactions) UpdateType added in v1.8.3

func (*UpdateMessageUnreadReactions) UpdateType() string

type UpdateNewCallSignalingData

type UpdateNewCallSignalingData struct {

	// The call identifier
	CallId int32 `json:"call_id"`
	// The data
	Data []byte `json:"data"`
	// contains filtered or unexported fields
}

New call signaling data arrived

func UnmarshalUpdateNewCallSignalingData

func UnmarshalUpdateNewCallSignalingData(data json.RawMessage) (*UpdateNewCallSignalingData, error)

func (*UpdateNewCallSignalingData) GetClass

func (*UpdateNewCallSignalingData) GetClass() string

func (*UpdateNewCallSignalingData) GetType

func (*UpdateNewCallSignalingData) MarshalJSON

func (entity *UpdateNewCallSignalingData) MarshalJSON() ([]byte, error)

func (*UpdateNewCallSignalingData) UpdateType

func (*UpdateNewCallSignalingData) UpdateType() string

type UpdateNewCallbackQuery

type UpdateNewCallbackQuery struct {

	// Unique query identifier
	Id JsonInt64 `json:"id"`
	// Identifier of the user who sent the query
	SenderUserId int64 `json:"sender_user_id"`
	// Identifier of the chat where the query was sent
	ChatId int64 `json:"chat_id"`
	// Identifier of the message from which the query originated
	MessageId int64 `json:"message_id"`
	// Identifier that uniquely corresponds to the chat to which the message was sent
	ChatInstance JsonInt64 `json:"chat_instance"`
	// Query payload
	Payload CallbackQueryPayload `json:"payload"`
	// contains filtered or unexported fields
}

A new incoming callback query; for bots only

func UnmarshalUpdateNewCallbackQuery

func UnmarshalUpdateNewCallbackQuery(data json.RawMessage) (*UpdateNewCallbackQuery, error)

func (*UpdateNewCallbackQuery) GetClass

func (*UpdateNewCallbackQuery) GetClass() string

func (*UpdateNewCallbackQuery) GetType

func (*UpdateNewCallbackQuery) GetType() string

func (*UpdateNewCallbackQuery) MarshalJSON

func (entity *UpdateNewCallbackQuery) MarshalJSON() ([]byte, error)

func (*UpdateNewCallbackQuery) UnmarshalJSON

func (updateNewCallbackQuery *UpdateNewCallbackQuery) UnmarshalJSON(data []byte) error

func (*UpdateNewCallbackQuery) UpdateType

func (*UpdateNewCallbackQuery) UpdateType() string

type UpdateNewChat

type UpdateNewChat struct {

	// The chat
	Chat *Chat `json:"chat"`
	// contains filtered or unexported fields
}

A new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the application. The chat field changes will be reported through separate updates

func UnmarshalUpdateNewChat

func UnmarshalUpdateNewChat(data json.RawMessage) (*UpdateNewChat, error)

func (*UpdateNewChat) GetClass

func (*UpdateNewChat) GetClass() string

func (*UpdateNewChat) GetType

func (*UpdateNewChat) GetType() string

func (*UpdateNewChat) MarshalJSON

func (entity *UpdateNewChat) MarshalJSON() ([]byte, error)

func (*UpdateNewChat) UpdateType

func (*UpdateNewChat) UpdateType() string

type UpdateNewChatJoinRequest added in v1.7.10

type UpdateNewChatJoinRequest struct {

	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// Join request
	Request *ChatJoinRequest `json:"request"`
	// The invite link, which was used to send join request; may be null
	InviteLink *ChatInviteLink `json:"invite_link"`
	// contains filtered or unexported fields
}

A user sent a join request to a chat; for bots only

func UnmarshalUpdateNewChatJoinRequest added in v1.7.10

func UnmarshalUpdateNewChatJoinRequest(data json.RawMessage) (*UpdateNewChatJoinRequest, error)

func (*UpdateNewChatJoinRequest) GetClass added in v1.7.10

func (*UpdateNewChatJoinRequest) GetClass() string

func (*UpdateNewChatJoinRequest) GetType added in v1.7.10

func (*UpdateNewChatJoinRequest) GetType() string

func (*UpdateNewChatJoinRequest) MarshalJSON added in v1.7.10

func (entity *UpdateNewChatJoinRequest) MarshalJSON() ([]byte, error)

func (*UpdateNewChatJoinRequest) UpdateType added in v1.7.10

func (*UpdateNewChatJoinRequest) UpdateType() string

type UpdateNewChosenInlineResult

type UpdateNewChosenInlineResult struct {

	// Identifier of the user who sent the query
	SenderUserId int64 `json:"sender_user_id"`
	// User location; may be null
	UserLocation *Location `json:"user_location"`
	// Text of the query
	Query string `json:"query"`
	// Identifier of the chosen result
	ResultId string `json:"result_id"`
	// Identifier of the sent inline message, if known
	InlineMessageId string `json:"inline_message_id"`
	// contains filtered or unexported fields
}

The user has chosen a result of an inline query; for bots only

func UnmarshalUpdateNewChosenInlineResult

func UnmarshalUpdateNewChosenInlineResult(data json.RawMessage) (*UpdateNewChosenInlineResult, error)

func (*UpdateNewChosenInlineResult) GetClass

func (*UpdateNewChosenInlineResult) GetClass() string

func (*UpdateNewChosenInlineResult) GetType

func (*UpdateNewChosenInlineResult) MarshalJSON

func (entity *UpdateNewChosenInlineResult) MarshalJSON() ([]byte, error)

func (*UpdateNewChosenInlineResult) UpdateType

func (*UpdateNewChosenInlineResult) UpdateType() string

type UpdateNewCustomEvent

type UpdateNewCustomEvent struct {

	// A JSON-serialized event
	Event string `json:"event"`
	// contains filtered or unexported fields
}

A new incoming event; for bots only

func UnmarshalUpdateNewCustomEvent

func UnmarshalUpdateNewCustomEvent(data json.RawMessage) (*UpdateNewCustomEvent, error)

func (*UpdateNewCustomEvent) GetClass

func (*UpdateNewCustomEvent) GetClass() string

func (*UpdateNewCustomEvent) GetType

func (*UpdateNewCustomEvent) GetType() string

func (*UpdateNewCustomEvent) MarshalJSON

func (entity *UpdateNewCustomEvent) MarshalJSON() ([]byte, error)

func (*UpdateNewCustomEvent) UpdateType

func (*UpdateNewCustomEvent) UpdateType() string

type UpdateNewCustomQuery

type UpdateNewCustomQuery struct {

	// The query identifier
	Id JsonInt64 `json:"id"`
	// JSON-serialized query data
	Data string `json:"data"`
	// Query timeout
	Timeout int32 `json:"timeout"`
	// contains filtered or unexported fields
}

A new incoming query; for bots only

func UnmarshalUpdateNewCustomQuery

func UnmarshalUpdateNewCustomQuery(data json.RawMessage) (*UpdateNewCustomQuery, error)

func (*UpdateNewCustomQuery) GetClass

func (*UpdateNewCustomQuery) GetClass() string

func (*UpdateNewCustomQuery) GetType

func (*UpdateNewCustomQuery) GetType() string

func (*UpdateNewCustomQuery) MarshalJSON

func (entity *UpdateNewCustomQuery) MarshalJSON() ([]byte, error)

func (*UpdateNewCustomQuery) UpdateType

func (*UpdateNewCustomQuery) UpdateType() string

type UpdateNewInlineCallbackQuery

type UpdateNewInlineCallbackQuery struct {

	// Unique query identifier
	Id JsonInt64 `json:"id"`
	// Identifier of the user who sent the query
	SenderUserId int64 `json:"sender_user_id"`
	// Identifier of the inline message from which the query originated
	InlineMessageId string `json:"inline_message_id"`
	// An identifier uniquely corresponding to the chat a message was sent to
	ChatInstance JsonInt64 `json:"chat_instance"`
	// Query payload
	Payload CallbackQueryPayload `json:"payload"`
	// contains filtered or unexported fields
}

A new incoming callback query from a message sent via a bot; for bots only

func UnmarshalUpdateNewInlineCallbackQuery

func UnmarshalUpdateNewInlineCallbackQuery(data json.RawMessage) (*UpdateNewInlineCallbackQuery, error)

func (*UpdateNewInlineCallbackQuery) GetClass

func (*UpdateNewInlineCallbackQuery) GetType

func (*UpdateNewInlineCallbackQuery) MarshalJSON

func (entity *UpdateNewInlineCallbackQuery) MarshalJSON() ([]byte, error)

func (*UpdateNewInlineCallbackQuery) UnmarshalJSON

func (updateNewInlineCallbackQuery *UpdateNewInlineCallbackQuery) UnmarshalJSON(data []byte) error

func (*UpdateNewInlineCallbackQuery) UpdateType

func (*UpdateNewInlineCallbackQuery) UpdateType() string

type UpdateNewInlineQuery

type UpdateNewInlineQuery struct {

	// Unique query identifier
	Id JsonInt64 `json:"id"`
	// Identifier of the user who sent the query
	SenderUserId int64 `json:"sender_user_id"`
	// User location; may be null
	UserLocation *Location `json:"user_location"`
	// The type of the chat from which the query originated; may be null if unknown
	ChatType ChatType `json:"chat_type"`
	// Text of the query
	Query string `json:"query"`
	// Offset of the first entry to return
	Offset string `json:"offset"`
	// contains filtered or unexported fields
}

A new incoming inline query; for bots only

func UnmarshalUpdateNewInlineQuery

func UnmarshalUpdateNewInlineQuery(data json.RawMessage) (*UpdateNewInlineQuery, error)

func (*UpdateNewInlineQuery) GetClass

func (*UpdateNewInlineQuery) GetClass() string

func (*UpdateNewInlineQuery) GetType

func (*UpdateNewInlineQuery) GetType() string

func (*UpdateNewInlineQuery) MarshalJSON

func (entity *UpdateNewInlineQuery) MarshalJSON() ([]byte, error)

func (*UpdateNewInlineQuery) UnmarshalJSON added in v1.7.10

func (updateNewInlineQuery *UpdateNewInlineQuery) UnmarshalJSON(data []byte) error

func (*UpdateNewInlineQuery) UpdateType

func (*UpdateNewInlineQuery) UpdateType() string

type UpdateNewMessage

type UpdateNewMessage struct {

	// The new message
	Message *Message `json:"message"`
	// contains filtered or unexported fields
}

A new message was received; can also be an outgoing message

func UnmarshalUpdateNewMessage

func UnmarshalUpdateNewMessage(data json.RawMessage) (*UpdateNewMessage, error)

func (*UpdateNewMessage) GetClass

func (*UpdateNewMessage) GetClass() string

func (*UpdateNewMessage) GetType

func (*UpdateNewMessage) GetType() string

func (*UpdateNewMessage) MarshalJSON

func (entity *UpdateNewMessage) MarshalJSON() ([]byte, error)

func (*UpdateNewMessage) UpdateType

func (*UpdateNewMessage) UpdateType() string

type UpdateNewPreCheckoutQuery

type UpdateNewPreCheckoutQuery struct {

	// Unique query identifier
	Id JsonInt64 `json:"id"`
	// Identifier of the user who sent the query
	SenderUserId int64 `json:"sender_user_id"`
	// Currency for the product price
	Currency string `json:"currency"`
	// Total price for the product, in the smallest units of the currency
	TotalAmount int64 `json:"total_amount"`
	// Invoice payload
	InvoicePayload []byte `json:"invoice_payload"`
	// Identifier of a shipping option chosen by the user; may be empty if not applicable
	ShippingOptionId string `json:"shipping_option_id"`
	// Information about the order; may be null
	OrderInfo *OrderInfo `json:"order_info"`
	// contains filtered or unexported fields
}

A new incoming pre-checkout query; for bots only. Contains full information about a checkout

func UnmarshalUpdateNewPreCheckoutQuery

func UnmarshalUpdateNewPreCheckoutQuery(data json.RawMessage) (*UpdateNewPreCheckoutQuery, error)

func (*UpdateNewPreCheckoutQuery) GetClass

func (*UpdateNewPreCheckoutQuery) GetClass() string

func (*UpdateNewPreCheckoutQuery) GetType

func (*UpdateNewPreCheckoutQuery) GetType() string

func (*UpdateNewPreCheckoutQuery) MarshalJSON

func (entity *UpdateNewPreCheckoutQuery) MarshalJSON() ([]byte, error)

func (*UpdateNewPreCheckoutQuery) UpdateType

func (*UpdateNewPreCheckoutQuery) UpdateType() string

type UpdateNewShippingQuery

type UpdateNewShippingQuery struct {

	// Unique query identifier
	Id JsonInt64 `json:"id"`
	// Identifier of the user who sent the query
	SenderUserId int64 `json:"sender_user_id"`
	// Invoice payload
	InvoicePayload string `json:"invoice_payload"`
	// User shipping address
	ShippingAddress *Address `json:"shipping_address"`
	// contains filtered or unexported fields
}

A new incoming shipping query; for bots only. Only for invoices with flexible price

func UnmarshalUpdateNewShippingQuery

func UnmarshalUpdateNewShippingQuery(data json.RawMessage) (*UpdateNewShippingQuery, error)

func (*UpdateNewShippingQuery) GetClass

func (*UpdateNewShippingQuery) GetClass() string

func (*UpdateNewShippingQuery) GetType

func (*UpdateNewShippingQuery) GetType() string

func (*UpdateNewShippingQuery) MarshalJSON

func (entity *UpdateNewShippingQuery) MarshalJSON() ([]byte, error)

func (*UpdateNewShippingQuery) UpdateType

func (*UpdateNewShippingQuery) UpdateType() string

type UpdateNotification

type UpdateNotification struct {

	// Unique notification group identifier
	NotificationGroupId int32 `json:"notification_group_id"`
	// Changed notification
	Notification *Notification `json:"notification"`
	// contains filtered or unexported fields
}

A notification was changed

func UnmarshalUpdateNotification

func UnmarshalUpdateNotification(data json.RawMessage) (*UpdateNotification, error)

func (*UpdateNotification) GetClass

func (*UpdateNotification) GetClass() string

func (*UpdateNotification) GetType

func (*UpdateNotification) GetType() string

func (*UpdateNotification) MarshalJSON

func (entity *UpdateNotification) MarshalJSON() ([]byte, error)

func (*UpdateNotification) UpdateType

func (*UpdateNotification) UpdateType() string

type UpdateNotificationGroup

type UpdateNotificationGroup struct {

	// Unique notification group identifier
	NotificationGroupId int32 `json:"notification_group_id"`
	// New type of the notification group
	Type NotificationGroupType `json:"type"`
	// Identifier of a chat to which all notifications in the group belong
	ChatId int64 `json:"chat_id"`
	// Chat identifier, which notification settings must be applied to the added notifications
	NotificationSettingsChatId int64 `json:"notification_settings_chat_id"`
	// Identifier of the notification sound to be played; 0 if sound is disabled
	NotificationSoundId JsonInt64 `json:"notification_sound_id"`
	// Total number of unread notifications in the group, can be bigger than number of active notifications
	TotalCount int32 `json:"total_count"`
	// List of added group notifications, sorted by notification ID
	AddedNotifications []*Notification `json:"added_notifications"`
	// Identifiers of removed group notifications, sorted by notification ID
	RemovedNotificationIds []int32 `json:"removed_notification_ids"`
	// contains filtered or unexported fields
}

A list of active notifications in a notification group has changed

func UnmarshalUpdateNotificationGroup

func UnmarshalUpdateNotificationGroup(data json.RawMessage) (*UpdateNotificationGroup, error)

func (*UpdateNotificationGroup) GetClass

func (*UpdateNotificationGroup) GetClass() string

func (*UpdateNotificationGroup) GetType

func (*UpdateNotificationGroup) GetType() string

func (*UpdateNotificationGroup) MarshalJSON

func (entity *UpdateNotificationGroup) MarshalJSON() ([]byte, error)

func (*UpdateNotificationGroup) UnmarshalJSON

func (updateNotificationGroup *UpdateNotificationGroup) UnmarshalJSON(data []byte) error

func (*UpdateNotificationGroup) UpdateType

func (*UpdateNotificationGroup) UpdateType() string

type UpdateOption

type UpdateOption struct {

	// The option name
	Name string `json:"name"`
	// The new option value
	Value OptionValue `json:"value"`
	// contains filtered or unexported fields
}

An option changed its value

func UnmarshalUpdateOption

func UnmarshalUpdateOption(data json.RawMessage) (*UpdateOption, error)

func (*UpdateOption) GetClass

func (*UpdateOption) GetClass() string

func (*UpdateOption) GetType

func (*UpdateOption) GetType() string

func (*UpdateOption) MarshalJSON

func (entity *UpdateOption) MarshalJSON() ([]byte, error)

func (*UpdateOption) UnmarshalJSON

func (updateOption *UpdateOption) UnmarshalJSON(data []byte) error

func (*UpdateOption) UpdateType

func (*UpdateOption) UpdateType() string

type UpdatePoll

type UpdatePoll struct {

	// New data about the poll
	Poll *Poll `json:"poll"`
	// contains filtered or unexported fields
}

A poll was updated; for bots only

func UnmarshalUpdatePoll

func UnmarshalUpdatePoll(data json.RawMessage) (*UpdatePoll, error)

func (*UpdatePoll) GetClass

func (*UpdatePoll) GetClass() string

func (*UpdatePoll) GetType

func (*UpdatePoll) GetType() string

func (*UpdatePoll) MarshalJSON

func (entity *UpdatePoll) MarshalJSON() ([]byte, error)

func (*UpdatePoll) UpdateType

func (*UpdatePoll) UpdateType() string

type UpdatePollAnswer

type UpdatePollAnswer struct {

	// Unique poll identifier
	PollId JsonInt64 `json:"poll_id"`
	// The user, who changed the answer to the poll
	UserId int64 `json:"user_id"`
	// 0-based identifiers of answer options, chosen by the user
	OptionIds []int32 `json:"option_ids"`
	// contains filtered or unexported fields
}

A user changed the answer to a poll; for bots only

func UnmarshalUpdatePollAnswer

func UnmarshalUpdatePollAnswer(data json.RawMessage) (*UpdatePollAnswer, error)

func (*UpdatePollAnswer) GetClass

func (*UpdatePollAnswer) GetClass() string

func (*UpdatePollAnswer) GetType

func (*UpdatePollAnswer) GetType() string

func (*UpdatePollAnswer) MarshalJSON

func (entity *UpdatePollAnswer) MarshalJSON() ([]byte, error)

func (*UpdatePollAnswer) UpdateType

func (*UpdatePollAnswer) UpdateType() string

type UpdateReactions added in v1.8.3

type UpdateReactions struct {

	// The new list of supported reactions
	Reactions []*Reaction `json:"reactions"`
	// contains filtered or unexported fields
}

The list of supported reactions has changed

func UnmarshalUpdateReactions added in v1.8.3

func UnmarshalUpdateReactions(data json.RawMessage) (*UpdateReactions, error)

func (*UpdateReactions) GetClass added in v1.8.3

func (*UpdateReactions) GetClass() string

func (*UpdateReactions) GetType added in v1.8.3

func (*UpdateReactions) GetType() string

func (*UpdateReactions) MarshalJSON added in v1.8.3

func (entity *UpdateReactions) MarshalJSON() ([]byte, error)

func (*UpdateReactions) UpdateType added in v1.8.3

func (*UpdateReactions) UpdateType() string

type UpdateRecentStickers

type UpdateRecentStickers struct {

	// True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated
	IsAttached bool `json:"is_attached"`
	// The new list of file identifiers of recently used stickers
	StickerIds []int32 `json:"sticker_ids"`
	// contains filtered or unexported fields
}

The list of recently used stickers was updated

func UnmarshalUpdateRecentStickers

func UnmarshalUpdateRecentStickers(data json.RawMessage) (*UpdateRecentStickers, error)

func (*UpdateRecentStickers) GetClass

func (*UpdateRecentStickers) GetClass() string

func (*UpdateRecentStickers) GetType

func (*UpdateRecentStickers) GetType() string

func (*UpdateRecentStickers) MarshalJSON

func (entity *UpdateRecentStickers) MarshalJSON() ([]byte, error)

func (*UpdateRecentStickers) UpdateType

func (*UpdateRecentStickers) UpdateType() string

type UpdateSavedAnimations

type UpdateSavedAnimations struct {

	// The new list of file identifiers of saved animations
	AnimationIds []int32 `json:"animation_ids"`
	// contains filtered or unexported fields
}

The list of saved animations was updated

func UnmarshalUpdateSavedAnimations

func UnmarshalUpdateSavedAnimations(data json.RawMessage) (*UpdateSavedAnimations, error)

func (*UpdateSavedAnimations) GetClass

func (*UpdateSavedAnimations) GetClass() string

func (*UpdateSavedAnimations) GetType

func (*UpdateSavedAnimations) GetType() string

func (*UpdateSavedAnimations) MarshalJSON

func (entity *UpdateSavedAnimations) MarshalJSON() ([]byte, error)

func (*UpdateSavedAnimations) UpdateType

func (*UpdateSavedAnimations) UpdateType() string

type UpdateSavedNotificationSounds added in v1.8.3

type UpdateSavedNotificationSounds struct {

	// The new list of identifiers of saved notification sounds
	NotificationSoundIds []JsonInt64 `json:"notification_sound_ids"`
	// contains filtered or unexported fields
}

The list of saved notifications sounds was updated. This update may not be sent until information about a notification sound was requested for the first time

func UnmarshalUpdateSavedNotificationSounds added in v1.8.3

func UnmarshalUpdateSavedNotificationSounds(data json.RawMessage) (*UpdateSavedNotificationSounds, error)

func (*UpdateSavedNotificationSounds) GetClass added in v1.8.3

func (*UpdateSavedNotificationSounds) GetType added in v1.8.3

func (*UpdateSavedNotificationSounds) MarshalJSON added in v1.8.3

func (entity *UpdateSavedNotificationSounds) MarshalJSON() ([]byte, error)

func (*UpdateSavedNotificationSounds) UpdateType added in v1.8.3

func (*UpdateSavedNotificationSounds) UpdateType() string

type UpdateScopeNotificationSettings

type UpdateScopeNotificationSettings struct {

	// Types of chats for which notification settings were updated
	Scope NotificationSettingsScope `json:"scope"`
	// The new notification settings
	NotificationSettings *ScopeNotificationSettings `json:"notification_settings"`
	// contains filtered or unexported fields
}

Notification settings for some type of chats were updated

func UnmarshalUpdateScopeNotificationSettings

func UnmarshalUpdateScopeNotificationSettings(data json.RawMessage) (*UpdateScopeNotificationSettings, error)

func (*UpdateScopeNotificationSettings) GetClass

func (*UpdateScopeNotificationSettings) GetType

func (*UpdateScopeNotificationSettings) MarshalJSON

func (entity *UpdateScopeNotificationSettings) MarshalJSON() ([]byte, error)

func (*UpdateScopeNotificationSettings) UnmarshalJSON

func (updateScopeNotificationSettings *UpdateScopeNotificationSettings) UnmarshalJSON(data []byte) error

func (*UpdateScopeNotificationSettings) UpdateType

type UpdateSecretChat

type UpdateSecretChat struct {

	// New data about the secret chat
	SecretChat *SecretChat `json:"secret_chat"`
	// contains filtered or unexported fields
}

Some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the application

func UnmarshalUpdateSecretChat

func UnmarshalUpdateSecretChat(data json.RawMessage) (*UpdateSecretChat, error)

func (*UpdateSecretChat) GetClass

func (*UpdateSecretChat) GetClass() string

func (*UpdateSecretChat) GetType

func (*UpdateSecretChat) GetType() string

func (*UpdateSecretChat) MarshalJSON

func (entity *UpdateSecretChat) MarshalJSON() ([]byte, error)

func (*UpdateSecretChat) UpdateType

func (*UpdateSecretChat) UpdateType() string

type UpdateSelectedBackground

type UpdateSelectedBackground struct {

	// True, if background for dark theme has changed
	ForDarkTheme bool `json:"for_dark_theme"`
	// The new selected background; may be null
	Background *Background `json:"background"`
	// contains filtered or unexported fields
}

The selected background has changed

func UnmarshalUpdateSelectedBackground

func UnmarshalUpdateSelectedBackground(data json.RawMessage) (*UpdateSelectedBackground, error)

func (*UpdateSelectedBackground) GetClass

func (*UpdateSelectedBackground) GetClass() string

func (*UpdateSelectedBackground) GetType

func (*UpdateSelectedBackground) GetType() string

func (*UpdateSelectedBackground) MarshalJSON

func (entity *UpdateSelectedBackground) MarshalJSON() ([]byte, error)

func (*UpdateSelectedBackground) UpdateType

func (*UpdateSelectedBackground) UpdateType() string

type UpdateServiceNotification

type UpdateServiceNotification struct {

	// Notification type. If type begins with "AUTH_KEY_DROP_", then two buttons "Cancel" and "Log out" must be shown under notification; if user presses the second, all local data must be destroyed using Destroy method
	Type string `json:"type"`
	// Notification content
	Content MessageContent `json:"content"`
	// contains filtered or unexported fields
}

A service notification from the server was received. Upon receiving this the application must show a popup with the content of the notification

func UnmarshalUpdateServiceNotification

func UnmarshalUpdateServiceNotification(data json.RawMessage) (*UpdateServiceNotification, error)

func (*UpdateServiceNotification) GetClass

func (*UpdateServiceNotification) GetClass() string

func (*UpdateServiceNotification) GetType

func (*UpdateServiceNotification) GetType() string

func (*UpdateServiceNotification) MarshalJSON

func (entity *UpdateServiceNotification) MarshalJSON() ([]byte, error)

func (*UpdateServiceNotification) UnmarshalJSON

func (updateServiceNotification *UpdateServiceNotification) UnmarshalJSON(data []byte) error

func (*UpdateServiceNotification) UpdateType

func (*UpdateServiceNotification) UpdateType() string

type UpdateStickerSet

type UpdateStickerSet struct {

	// The sticker set
	StickerSet *StickerSet `json:"sticker_set"`
	// contains filtered or unexported fields
}

A sticker set has changed

func UnmarshalUpdateStickerSet

func UnmarshalUpdateStickerSet(data json.RawMessage) (*UpdateStickerSet, error)

func (*UpdateStickerSet) GetClass

func (*UpdateStickerSet) GetClass() string

func (*UpdateStickerSet) GetType

func (*UpdateStickerSet) GetType() string

func (*UpdateStickerSet) MarshalJSON

func (entity *UpdateStickerSet) MarshalJSON() ([]byte, error)

func (*UpdateStickerSet) UpdateType

func (*UpdateStickerSet) UpdateType() string

type UpdateSuggestedActions

type UpdateSuggestedActions struct {

	// Added suggested actions
	AddedActions []SuggestedAction `json:"added_actions"`
	// Removed suggested actions
	RemovedActions []SuggestedAction `json:"removed_actions"`
	// contains filtered or unexported fields
}

The list of suggested to the user actions has changed

func UnmarshalUpdateSuggestedActions

func UnmarshalUpdateSuggestedActions(data json.RawMessage) (*UpdateSuggestedActions, error)

func (*UpdateSuggestedActions) GetClass

func (*UpdateSuggestedActions) GetClass() string

func (*UpdateSuggestedActions) GetType

func (*UpdateSuggestedActions) GetType() string

func (*UpdateSuggestedActions) MarshalJSON

func (entity *UpdateSuggestedActions) MarshalJSON() ([]byte, error)

func (*UpdateSuggestedActions) UnmarshalJSON

func (updateSuggestedActions *UpdateSuggestedActions) UnmarshalJSON(data []byte) error

func (*UpdateSuggestedActions) UpdateType

func (*UpdateSuggestedActions) UpdateType() string

type UpdateSupergroup

type UpdateSupergroup struct {

	// New data about the supergroup
	Supergroup *Supergroup `json:"supergroup"`
	// contains filtered or unexported fields
}

Some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the application

func UnmarshalUpdateSupergroup

func UnmarshalUpdateSupergroup(data json.RawMessage) (*UpdateSupergroup, error)

func (*UpdateSupergroup) GetClass

func (*UpdateSupergroup) GetClass() string

func (*UpdateSupergroup) GetType

func (*UpdateSupergroup) GetType() string

func (*UpdateSupergroup) MarshalJSON

func (entity *UpdateSupergroup) MarshalJSON() ([]byte, error)

func (*UpdateSupergroup) UpdateType

func (*UpdateSupergroup) UpdateType() string

type UpdateSupergroupFullInfo

type UpdateSupergroupFullInfo struct {

	// Identifier of the supergroup or channel
	SupergroupId int64 `json:"supergroup_id"`
	// New full information about the supergroup
	SupergroupFullInfo *SupergroupFullInfo `json:"supergroup_full_info"`
	// contains filtered or unexported fields
}

Some data in supergroupFullInfo has been changed

func UnmarshalUpdateSupergroupFullInfo

func UnmarshalUpdateSupergroupFullInfo(data json.RawMessage) (*UpdateSupergroupFullInfo, error)

func (*UpdateSupergroupFullInfo) GetClass

func (*UpdateSupergroupFullInfo) GetClass() string

func (*UpdateSupergroupFullInfo) GetType

func (*UpdateSupergroupFullInfo) GetType() string

func (*UpdateSupergroupFullInfo) MarshalJSON

func (entity *UpdateSupergroupFullInfo) MarshalJSON() ([]byte, error)

func (*UpdateSupergroupFullInfo) UpdateType

func (*UpdateSupergroupFullInfo) UpdateType() string

type UpdateTermsOfService

type UpdateTermsOfService struct {

	// Identifier of the terms of service
	TermsOfServiceId string `json:"terms_of_service_id"`
	// The new terms of service
	TermsOfService *TermsOfService `json:"terms_of_service"`
	// contains filtered or unexported fields
}

New terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method must be called with the reason "Decline ToS update"

func UnmarshalUpdateTermsOfService

func UnmarshalUpdateTermsOfService(data json.RawMessage) (*UpdateTermsOfService, error)

func (*UpdateTermsOfService) GetClass

func (*UpdateTermsOfService) GetClass() string

func (*UpdateTermsOfService) GetType

func (*UpdateTermsOfService) GetType() string

func (*UpdateTermsOfService) MarshalJSON

func (entity *UpdateTermsOfService) MarshalJSON() ([]byte, error)

func (*UpdateTermsOfService) UpdateType

func (*UpdateTermsOfService) UpdateType() string

type UpdateTrendingStickerSets

type UpdateTrendingStickerSets struct {

	// The prefix of the list of trending sticker sets with the newest trending sticker sets
	StickerSets *StickerSets `json:"sticker_sets"`
	// contains filtered or unexported fields
}

The list of trending sticker sets was updated or some of them were viewed

func UnmarshalUpdateTrendingStickerSets

func UnmarshalUpdateTrendingStickerSets(data json.RawMessage) (*UpdateTrendingStickerSets, error)

func (*UpdateTrendingStickerSets) GetClass

func (*UpdateTrendingStickerSets) GetClass() string

func (*UpdateTrendingStickerSets) GetType

func (*UpdateTrendingStickerSets) GetType() string

func (*UpdateTrendingStickerSets) MarshalJSON

func (entity *UpdateTrendingStickerSets) MarshalJSON() ([]byte, error)

func (*UpdateTrendingStickerSets) UpdateType

func (*UpdateTrendingStickerSets) UpdateType() string

type UpdateUnreadChatCount

type UpdateUnreadChatCount struct {

	// The chat list with changed number of unread messages
	ChatList ChatList `json:"chat_list"`
	// Approximate total number of chats in the chat list
	TotalCount int32 `json:"total_count"`
	// Total number of unread chats
	UnreadCount int32 `json:"unread_count"`
	// Total number of unread unmuted chats
	UnreadUnmutedCount int32 `json:"unread_unmuted_count"`
	// Total number of chats marked as unread
	MarkedAsUnreadCount int32 `json:"marked_as_unread_count"`
	// Total number of unmuted chats marked as unread
	MarkedAsUnreadUnmutedCount int32 `json:"marked_as_unread_unmuted_count"`
	// contains filtered or unexported fields
}

Number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used

func UnmarshalUpdateUnreadChatCount

func UnmarshalUpdateUnreadChatCount(data json.RawMessage) (*UpdateUnreadChatCount, error)

func (*UpdateUnreadChatCount) GetClass

func (*UpdateUnreadChatCount) GetClass() string

func (*UpdateUnreadChatCount) GetType

func (*UpdateUnreadChatCount) GetType() string

func (*UpdateUnreadChatCount) MarshalJSON

func (entity *UpdateUnreadChatCount) MarshalJSON() ([]byte, error)

func (*UpdateUnreadChatCount) UnmarshalJSON

func (updateUnreadChatCount *UpdateUnreadChatCount) UnmarshalJSON(data []byte) error

func (*UpdateUnreadChatCount) UpdateType

func (*UpdateUnreadChatCount) UpdateType() string

type UpdateUnreadMessageCount

type UpdateUnreadMessageCount struct {

	// The chat list with changed number of unread messages
	ChatList ChatList `json:"chat_list"`
	// Total number of unread messages
	UnreadCount int32 `json:"unread_count"`
	// Total number of unread messages in unmuted chats
	UnreadUnmutedCount int32 `json:"unread_unmuted_count"`
	// contains filtered or unexported fields
}

Number of unread messages in a chat list has changed. This update is sent only if the message database is used

func UnmarshalUpdateUnreadMessageCount

func UnmarshalUpdateUnreadMessageCount(data json.RawMessage) (*UpdateUnreadMessageCount, error)

func (*UpdateUnreadMessageCount) GetClass

func (*UpdateUnreadMessageCount) GetClass() string

func (*UpdateUnreadMessageCount) GetType

func (*UpdateUnreadMessageCount) GetType() string

func (*UpdateUnreadMessageCount) MarshalJSON

func (entity *UpdateUnreadMessageCount) MarshalJSON() ([]byte, error)

func (*UpdateUnreadMessageCount) UnmarshalJSON

func (updateUnreadMessageCount *UpdateUnreadMessageCount) UnmarshalJSON(data []byte) error

func (*UpdateUnreadMessageCount) UpdateType

func (*UpdateUnreadMessageCount) UpdateType() string

type UpdateUser

type UpdateUser struct {

	// New data about the user
	User *User `json:"user"`
	// contains filtered or unexported fields
}

Some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the application

func UnmarshalUpdateUser

func UnmarshalUpdateUser(data json.RawMessage) (*UpdateUser, error)

func (*UpdateUser) GetClass

func (*UpdateUser) GetClass() string

func (*UpdateUser) GetType

func (*UpdateUser) GetType() string

func (*UpdateUser) MarshalJSON

func (entity *UpdateUser) MarshalJSON() ([]byte, error)

func (*UpdateUser) UpdateType

func (*UpdateUser) UpdateType() string

type UpdateUserFullInfo

type UpdateUserFullInfo struct {

	// User identifier
	UserId int64 `json:"user_id"`
	// New full information about the user
	UserFullInfo *UserFullInfo `json:"user_full_info"`
	// contains filtered or unexported fields
}

Some data in userFullInfo has been changed

func UnmarshalUpdateUserFullInfo

func UnmarshalUpdateUserFullInfo(data json.RawMessage) (*UpdateUserFullInfo, error)

func (*UpdateUserFullInfo) GetClass

func (*UpdateUserFullInfo) GetClass() string

func (*UpdateUserFullInfo) GetType

func (*UpdateUserFullInfo) GetType() string

func (*UpdateUserFullInfo) MarshalJSON

func (entity *UpdateUserFullInfo) MarshalJSON() ([]byte, error)

func (*UpdateUserFullInfo) UpdateType

func (*UpdateUserFullInfo) UpdateType() string

type UpdateUserPrivacySettingRules

type UpdateUserPrivacySettingRules struct {

	// The privacy setting
	Setting UserPrivacySetting `json:"setting"`
	// New privacy rules
	Rules *UserPrivacySettingRules `json:"rules"`
	// contains filtered or unexported fields
}

Some privacy setting rules have been changed

func UnmarshalUpdateUserPrivacySettingRules

func UnmarshalUpdateUserPrivacySettingRules(data json.RawMessage) (*UpdateUserPrivacySettingRules, error)

func (*UpdateUserPrivacySettingRules) GetClass

func (*UpdateUserPrivacySettingRules) GetType

func (*UpdateUserPrivacySettingRules) MarshalJSON

func (entity *UpdateUserPrivacySettingRules) MarshalJSON() ([]byte, error)

func (*UpdateUserPrivacySettingRules) UnmarshalJSON

func (updateUserPrivacySettingRules *UpdateUserPrivacySettingRules) UnmarshalJSON(data []byte) error

func (*UpdateUserPrivacySettingRules) UpdateType

func (*UpdateUserPrivacySettingRules) UpdateType() string

type UpdateUserStatus

type UpdateUserStatus struct {

	// User identifier
	UserId int64 `json:"user_id"`
	// New status of the user
	Status UserStatus `json:"status"`
	// contains filtered or unexported fields
}

The user went online or offline

func UnmarshalUpdateUserStatus

func UnmarshalUpdateUserStatus(data json.RawMessage) (*UpdateUserStatus, error)

func (*UpdateUserStatus) GetClass

func (*UpdateUserStatus) GetClass() string

func (*UpdateUserStatus) GetType

func (*UpdateUserStatus) GetType() string

func (*UpdateUserStatus) MarshalJSON

func (entity *UpdateUserStatus) MarshalJSON() ([]byte, error)

func (*UpdateUserStatus) UnmarshalJSON

func (updateUserStatus *UpdateUserStatus) UnmarshalJSON(data []byte) error

func (*UpdateUserStatus) UpdateType

func (*UpdateUserStatus) UpdateType() string

type UpdateUsersNearby

type UpdateUsersNearby struct {

	// The new list of users nearby
	UsersNearby []*ChatNearby `json:"users_nearby"`
	// contains filtered or unexported fields
}

The list of users nearby has changed. The update is guaranteed to be sent only 60 seconds after a successful searchChatsNearby request

func UnmarshalUpdateUsersNearby

func UnmarshalUpdateUsersNearby(data json.RawMessage) (*UpdateUsersNearby, error)

func (*UpdateUsersNearby) GetClass

func (*UpdateUsersNearby) GetClass() string

func (*UpdateUsersNearby) GetType

func (*UpdateUsersNearby) GetType() string

func (*UpdateUsersNearby) MarshalJSON

func (entity *UpdateUsersNearby) MarshalJSON() ([]byte, error)

func (*UpdateUsersNearby) UpdateType

func (*UpdateUsersNearby) UpdateType() string

type UpdateWebAppMessageSent added in v1.8.3

type UpdateWebAppMessageSent struct {

	// Identifier of web app launch
	WebAppLaunchId JsonInt64 `json:"web_app_launch_id"`
	// contains filtered or unexported fields
}

A message was sent by an opened web app, so the web app needs to be closed

func UnmarshalUpdateWebAppMessageSent added in v1.8.3

func UnmarshalUpdateWebAppMessageSent(data json.RawMessage) (*UpdateWebAppMessageSent, error)

func (*UpdateWebAppMessageSent) GetClass added in v1.8.3

func (*UpdateWebAppMessageSent) GetClass() string

func (*UpdateWebAppMessageSent) GetType added in v1.8.3

func (*UpdateWebAppMessageSent) GetType() string

func (*UpdateWebAppMessageSent) MarshalJSON added in v1.8.3

func (entity *UpdateWebAppMessageSent) MarshalJSON() ([]byte, error)

func (*UpdateWebAppMessageSent) UpdateType added in v1.8.3

func (*UpdateWebAppMessageSent) UpdateType() string

type Updates

type Updates struct {

	// List of updates
	Updates []Update `json:"updates"`
	// contains filtered or unexported fields
}

Contains a list of updates

func UnmarshalUpdates

func UnmarshalUpdates(data json.RawMessage) (*Updates, error)

func (*Updates) GetClass

func (*Updates) GetClass() string

func (*Updates) GetType

func (*Updates) GetType() string

func (*Updates) MarshalJSON

func (entity *Updates) MarshalJSON() ([]byte, error)

func (*Updates) UnmarshalJSON

func (updates *Updates) UnmarshalJSON(data []byte) error

type UpgradeBasicGroupChatToSupergroupChatRequest

type UpgradeBasicGroupChatToSupergroupChatRequest struct {
	// Identifier of the chat to upgrade
	ChatId int64 `json:"chat_id"`
}

type UploadFileRequest

type UploadFileRequest struct {
	// File to upload
	File InputFile `json:"file"`
	// File type; pass null if unknown
	FileType FileType `json:"file_type"`
	// Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which uploadFile was called will be uploaded first
	Priority int32 `json:"priority"`
}

type UploadStickerFileRequest

type UploadStickerFileRequest struct {
	// Sticker file owner; ignored for regular users
	UserId int64 `json:"user_id"`
	// Sticker file to upload
	Sticker *InputSticker `json:"sticker"`
}

type User

type User struct {

	// User identifier
	Id int64 `json:"id"`
	// First name of the user
	FirstName string `json:"first_name"`
	// Last name of the user
	LastName string `json:"last_name"`
	// Username of the user
	Username string `json:"username"`
	// Phone number of the user
	PhoneNumber string `json:"phone_number"`
	// Current online status of the user
	Status UserStatus `json:"status"`
	// Profile photo of the user; may be null
	ProfilePhoto *ProfilePhoto `json:"profile_photo"`
	// The user is a contact of the current user
	IsContact bool `json:"is_contact"`
	// The user is a contact of the current user and the current user is a contact of the user
	IsMutualContact bool `json:"is_mutual_contact"`
	// True, if the user is verified
	IsVerified bool `json:"is_verified"`
	// True, if the user is Telegram support account
	IsSupport bool `json:"is_support"`
	// If non-empty, it contains a human-readable description of the reason why access to this user must be restricted
	RestrictionReason string `json:"restriction_reason"`
	// True, if many users reported this user as a scam
	IsScam bool `json:"is_scam"`
	// True, if many users reported this user as a fake account
	IsFake bool `json:"is_fake"`
	// If false, the user is inaccessible, and the only information known about the user is inside this class. Identifier of the user can't be passed to any method except GetUser
	HaveAccess bool `json:"have_access"`
	// Type of the user
	Type UserType `json:"type"`
	// IETF language tag of the user's language; only available to bots
	LanguageCode string `json:"language_code"`
	// contains filtered or unexported fields
}

Represents a user

func UnmarshalUser

func UnmarshalUser(data json.RawMessage) (*User, error)

func (*User) GetClass

func (*User) GetClass() string

func (*User) GetType

func (*User) GetType() string

func (*User) MarshalJSON

func (entity *User) MarshalJSON() ([]byte, error)

func (*User) UnmarshalJSON

func (user *User) UnmarshalJSON(data []byte) error

type UserFullInfo

type UserFullInfo struct {

	// User profile photo; may be null
	Photo *ChatPhoto `json:"photo"`
	// True, if the user is blocked by the current user
	IsBlocked bool `json:"is_blocked"`
	// True, if the user can be called
	CanBeCalled bool `json:"can_be_called"`
	// True, if a video call can be created with the user
	SupportsVideoCalls bool `json:"supports_video_calls"`
	// True, if the user can't be called due to their privacy settings
	HasPrivateCalls bool `json:"has_private_calls"`
	// True, if the user can't be linked in forwarded messages due to their privacy settings
	HasPrivateForwards bool `json:"has_private_forwards"`
	// True, if the current user needs to explicitly allow to share their phone number with the user when the method addContact is used
	NeedPhoneNumberPrivacyException bool `json:"need_phone_number_privacy_exception"`
	// A short user bio
	Bio string `json:"bio"`
	// Number of group chats where both the other user and the current user are a member; 0 for the current user
	GroupInCommonCount int32 `json:"group_in_common_count"`
	// For bots, information about the bot; may be null
	BotInfo *BotInfo `json:"bot_info"`
	// contains filtered or unexported fields
}

Contains full information about a user

func UnmarshalUserFullInfo

func UnmarshalUserFullInfo(data json.RawMessage) (*UserFullInfo, error)

func (*UserFullInfo) GetClass

func (*UserFullInfo) GetClass() string

func (*UserFullInfo) GetType

func (*UserFullInfo) GetType() string

func (*UserFullInfo) MarshalJSON

func (entity *UserFullInfo) MarshalJSON() ([]byte, error)

type UserPrivacySetting

type UserPrivacySetting interface {
	UserPrivacySettingType() string
}

Describes available user privacy settings

func UnmarshalListOfUserPrivacySetting

func UnmarshalListOfUserPrivacySetting(dataList []json.RawMessage) ([]UserPrivacySetting, error)

func UnmarshalUserPrivacySetting

func UnmarshalUserPrivacySetting(data json.RawMessage) (UserPrivacySetting, error)

type UserPrivacySettingAllowCalls

type UserPrivacySettingAllowCalls struct {
	// contains filtered or unexported fields
}

A privacy setting for managing whether the user can be called

func UnmarshalUserPrivacySettingAllowCalls

func UnmarshalUserPrivacySettingAllowCalls(data json.RawMessage) (*UserPrivacySettingAllowCalls, error)

func (*UserPrivacySettingAllowCalls) GetClass

func (*UserPrivacySettingAllowCalls) GetType

func (*UserPrivacySettingAllowCalls) MarshalJSON

func (entity *UserPrivacySettingAllowCalls) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingAllowCalls) UserPrivacySettingType

func (*UserPrivacySettingAllowCalls) UserPrivacySettingType() string

type UserPrivacySettingAllowChatInvites

type UserPrivacySettingAllowChatInvites struct {
	// contains filtered or unexported fields
}

A privacy setting for managing whether the user can be invited to chats

func UnmarshalUserPrivacySettingAllowChatInvites

func UnmarshalUserPrivacySettingAllowChatInvites(data json.RawMessage) (*UserPrivacySettingAllowChatInvites, error)

func (*UserPrivacySettingAllowChatInvites) GetClass

func (*UserPrivacySettingAllowChatInvites) GetType

func (*UserPrivacySettingAllowChatInvites) MarshalJSON

func (entity *UserPrivacySettingAllowChatInvites) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingAllowChatInvites) UserPrivacySettingType

func (*UserPrivacySettingAllowChatInvites) UserPrivacySettingType() string

type UserPrivacySettingAllowFindingByPhoneNumber

type UserPrivacySettingAllowFindingByPhoneNumber struct {
	// contains filtered or unexported fields
}

A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to "Allow contacts" or "Allow all"

func UnmarshalUserPrivacySettingAllowFindingByPhoneNumber

func UnmarshalUserPrivacySettingAllowFindingByPhoneNumber(data json.RawMessage) (*UserPrivacySettingAllowFindingByPhoneNumber, error)

func (*UserPrivacySettingAllowFindingByPhoneNumber) GetClass

func (*UserPrivacySettingAllowFindingByPhoneNumber) GetType

func (*UserPrivacySettingAllowFindingByPhoneNumber) MarshalJSON

func (entity *UserPrivacySettingAllowFindingByPhoneNumber) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingAllowFindingByPhoneNumber) UserPrivacySettingType

func (*UserPrivacySettingAllowFindingByPhoneNumber) UserPrivacySettingType() string

type UserPrivacySettingAllowPeerToPeerCalls

type UserPrivacySettingAllowPeerToPeerCalls struct {
	// contains filtered or unexported fields
}

A privacy setting for managing whether peer-to-peer connections can be used for calls

func UnmarshalUserPrivacySettingAllowPeerToPeerCalls

func UnmarshalUserPrivacySettingAllowPeerToPeerCalls(data json.RawMessage) (*UserPrivacySettingAllowPeerToPeerCalls, error)

func (*UserPrivacySettingAllowPeerToPeerCalls) GetClass

func (*UserPrivacySettingAllowPeerToPeerCalls) GetType

func (*UserPrivacySettingAllowPeerToPeerCalls) MarshalJSON

func (entity *UserPrivacySettingAllowPeerToPeerCalls) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingAllowPeerToPeerCalls) UserPrivacySettingType

func (*UserPrivacySettingAllowPeerToPeerCalls) UserPrivacySettingType() string

type UserPrivacySettingRule

type UserPrivacySettingRule interface {
	UserPrivacySettingRuleType() string
}

Represents a single rule for managing privacy settings

func UnmarshalListOfUserPrivacySettingRule

func UnmarshalListOfUserPrivacySettingRule(dataList []json.RawMessage) ([]UserPrivacySettingRule, error)

func UnmarshalUserPrivacySettingRule

func UnmarshalUserPrivacySettingRule(data json.RawMessage) (UserPrivacySettingRule, error)

type UserPrivacySettingRuleAllowAll

type UserPrivacySettingRuleAllowAll struct {
	// contains filtered or unexported fields
}

A rule to allow all users to do something

func UnmarshalUserPrivacySettingRuleAllowAll

func UnmarshalUserPrivacySettingRuleAllowAll(data json.RawMessage) (*UserPrivacySettingRuleAllowAll, error)

func (*UserPrivacySettingRuleAllowAll) GetClass

func (*UserPrivacySettingRuleAllowAll) GetType

func (*UserPrivacySettingRuleAllowAll) MarshalJSON

func (entity *UserPrivacySettingRuleAllowAll) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingRuleAllowAll) UserPrivacySettingRuleType

func (*UserPrivacySettingRuleAllowAll) UserPrivacySettingRuleType() string

type UserPrivacySettingRuleAllowChatMembers

type UserPrivacySettingRuleAllowChatMembers struct {

	// The chat identifiers, total number of chats in all rules must not exceed 20
	ChatIds []int64 `json:"chat_ids"`
	// contains filtered or unexported fields
}

A rule to allow all members of certain specified basic groups and supergroups to doing something

func UnmarshalUserPrivacySettingRuleAllowChatMembers

func UnmarshalUserPrivacySettingRuleAllowChatMembers(data json.RawMessage) (*UserPrivacySettingRuleAllowChatMembers, error)

func (*UserPrivacySettingRuleAllowChatMembers) GetClass

func (*UserPrivacySettingRuleAllowChatMembers) GetType

func (*UserPrivacySettingRuleAllowChatMembers) MarshalJSON

func (entity *UserPrivacySettingRuleAllowChatMembers) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingRuleAllowChatMembers) UserPrivacySettingRuleType

func (*UserPrivacySettingRuleAllowChatMembers) UserPrivacySettingRuleType() string

type UserPrivacySettingRuleAllowContacts

type UserPrivacySettingRuleAllowContacts struct {
	// contains filtered or unexported fields
}

A rule to allow all of a user's contacts to do something

func UnmarshalUserPrivacySettingRuleAllowContacts

func UnmarshalUserPrivacySettingRuleAllowContacts(data json.RawMessage) (*UserPrivacySettingRuleAllowContacts, error)

func (*UserPrivacySettingRuleAllowContacts) GetClass

func (*UserPrivacySettingRuleAllowContacts) GetType

func (*UserPrivacySettingRuleAllowContacts) MarshalJSON

func (entity *UserPrivacySettingRuleAllowContacts) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingRuleAllowContacts) UserPrivacySettingRuleType

func (*UserPrivacySettingRuleAllowContacts) UserPrivacySettingRuleType() string

type UserPrivacySettingRuleAllowUsers

type UserPrivacySettingRuleAllowUsers struct {

	// The user identifiers, total number of users in all rules must not exceed 1000
	UserIds []int64 `json:"user_ids"`
	// contains filtered or unexported fields
}

A rule to allow certain specified users to do something

func UnmarshalUserPrivacySettingRuleAllowUsers

func UnmarshalUserPrivacySettingRuleAllowUsers(data json.RawMessage) (*UserPrivacySettingRuleAllowUsers, error)

func (*UserPrivacySettingRuleAllowUsers) GetClass

func (*UserPrivacySettingRuleAllowUsers) GetType

func (*UserPrivacySettingRuleAllowUsers) MarshalJSON

func (entity *UserPrivacySettingRuleAllowUsers) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingRuleAllowUsers) UserPrivacySettingRuleType

func (*UserPrivacySettingRuleAllowUsers) UserPrivacySettingRuleType() string

type UserPrivacySettingRuleRestrictAll

type UserPrivacySettingRuleRestrictAll struct {
	// contains filtered or unexported fields
}

A rule to restrict all users from doing something

func UnmarshalUserPrivacySettingRuleRestrictAll

func UnmarshalUserPrivacySettingRuleRestrictAll(data json.RawMessage) (*UserPrivacySettingRuleRestrictAll, error)

func (*UserPrivacySettingRuleRestrictAll) GetClass

func (*UserPrivacySettingRuleRestrictAll) GetType

func (*UserPrivacySettingRuleRestrictAll) MarshalJSON

func (entity *UserPrivacySettingRuleRestrictAll) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingRuleRestrictAll) UserPrivacySettingRuleType

func (*UserPrivacySettingRuleRestrictAll) UserPrivacySettingRuleType() string

type UserPrivacySettingRuleRestrictChatMembers

type UserPrivacySettingRuleRestrictChatMembers struct {

	// The chat identifiers, total number of chats in all rules must not exceed 20
	ChatIds []int64 `json:"chat_ids"`
	// contains filtered or unexported fields
}

A rule to restrict all members of specified basic groups and supergroups from doing something

func UnmarshalUserPrivacySettingRuleRestrictChatMembers

func UnmarshalUserPrivacySettingRuleRestrictChatMembers(data json.RawMessage) (*UserPrivacySettingRuleRestrictChatMembers, error)

func (*UserPrivacySettingRuleRestrictChatMembers) GetClass

func (*UserPrivacySettingRuleRestrictChatMembers) GetType

func (*UserPrivacySettingRuleRestrictChatMembers) MarshalJSON

func (entity *UserPrivacySettingRuleRestrictChatMembers) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingRuleRestrictChatMembers) UserPrivacySettingRuleType

func (*UserPrivacySettingRuleRestrictChatMembers) UserPrivacySettingRuleType() string

type UserPrivacySettingRuleRestrictContacts

type UserPrivacySettingRuleRestrictContacts struct {
	// contains filtered or unexported fields
}

A rule to restrict all contacts of a user from doing something

func UnmarshalUserPrivacySettingRuleRestrictContacts

func UnmarshalUserPrivacySettingRuleRestrictContacts(data json.RawMessage) (*UserPrivacySettingRuleRestrictContacts, error)

func (*UserPrivacySettingRuleRestrictContacts) GetClass

func (*UserPrivacySettingRuleRestrictContacts) GetType

func (*UserPrivacySettingRuleRestrictContacts) MarshalJSON

func (entity *UserPrivacySettingRuleRestrictContacts) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingRuleRestrictContacts) UserPrivacySettingRuleType

func (*UserPrivacySettingRuleRestrictContacts) UserPrivacySettingRuleType() string

type UserPrivacySettingRuleRestrictUsers

type UserPrivacySettingRuleRestrictUsers struct {

	// The user identifiers, total number of users in all rules must not exceed 1000
	UserIds []int64 `json:"user_ids"`
	// contains filtered or unexported fields
}

A rule to restrict all specified users from doing something

func UnmarshalUserPrivacySettingRuleRestrictUsers

func UnmarshalUserPrivacySettingRuleRestrictUsers(data json.RawMessage) (*UserPrivacySettingRuleRestrictUsers, error)

func (*UserPrivacySettingRuleRestrictUsers) GetClass

func (*UserPrivacySettingRuleRestrictUsers) GetType

func (*UserPrivacySettingRuleRestrictUsers) MarshalJSON

func (entity *UserPrivacySettingRuleRestrictUsers) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingRuleRestrictUsers) UserPrivacySettingRuleType

func (*UserPrivacySettingRuleRestrictUsers) UserPrivacySettingRuleType() string

type UserPrivacySettingRules

type UserPrivacySettingRules struct {

	// A list of rules
	Rules []UserPrivacySettingRule `json:"rules"`
	// contains filtered or unexported fields
}

A list of privacy rules. Rules are matched in the specified order. The first matched rule defines the privacy setting for a given user. If no rule matches, the action is not allowed

func UnmarshalUserPrivacySettingRules

func UnmarshalUserPrivacySettingRules(data json.RawMessage) (*UserPrivacySettingRules, error)

func (*UserPrivacySettingRules) GetClass

func (*UserPrivacySettingRules) GetClass() string

func (*UserPrivacySettingRules) GetType

func (*UserPrivacySettingRules) GetType() string

func (*UserPrivacySettingRules) MarshalJSON

func (entity *UserPrivacySettingRules) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingRules) UnmarshalJSON

func (userPrivacySettingRules *UserPrivacySettingRules) UnmarshalJSON(data []byte) error

type UserPrivacySettingShowLinkInForwardedMessages

type UserPrivacySettingShowLinkInForwardedMessages struct {
	// contains filtered or unexported fields
}

A privacy setting for managing whether a link to the user's account is included in forwarded messages

func UnmarshalUserPrivacySettingShowLinkInForwardedMessages

func UnmarshalUserPrivacySettingShowLinkInForwardedMessages(data json.RawMessage) (*UserPrivacySettingShowLinkInForwardedMessages, error)

func (*UserPrivacySettingShowLinkInForwardedMessages) GetClass

func (*UserPrivacySettingShowLinkInForwardedMessages) GetType

func (*UserPrivacySettingShowLinkInForwardedMessages) MarshalJSON

func (entity *UserPrivacySettingShowLinkInForwardedMessages) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingShowLinkInForwardedMessages) UserPrivacySettingType

func (*UserPrivacySettingShowLinkInForwardedMessages) UserPrivacySettingType() string

type UserPrivacySettingShowPhoneNumber

type UserPrivacySettingShowPhoneNumber struct {
	// contains filtered or unexported fields
}

A privacy setting for managing whether the user's phone number is visible

func UnmarshalUserPrivacySettingShowPhoneNumber

func UnmarshalUserPrivacySettingShowPhoneNumber(data json.RawMessage) (*UserPrivacySettingShowPhoneNumber, error)

func (*UserPrivacySettingShowPhoneNumber) GetClass

func (*UserPrivacySettingShowPhoneNumber) GetType

func (*UserPrivacySettingShowPhoneNumber) MarshalJSON

func (entity *UserPrivacySettingShowPhoneNumber) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingShowPhoneNumber) UserPrivacySettingType

func (*UserPrivacySettingShowPhoneNumber) UserPrivacySettingType() string

type UserPrivacySettingShowProfilePhoto

type UserPrivacySettingShowProfilePhoto struct {
	// contains filtered or unexported fields
}

A privacy setting for managing whether the user's profile photo is visible

func UnmarshalUserPrivacySettingShowProfilePhoto

func UnmarshalUserPrivacySettingShowProfilePhoto(data json.RawMessage) (*UserPrivacySettingShowProfilePhoto, error)

func (*UserPrivacySettingShowProfilePhoto) GetClass

func (*UserPrivacySettingShowProfilePhoto) GetType

func (*UserPrivacySettingShowProfilePhoto) MarshalJSON

func (entity *UserPrivacySettingShowProfilePhoto) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingShowProfilePhoto) UserPrivacySettingType

func (*UserPrivacySettingShowProfilePhoto) UserPrivacySettingType() string

type UserPrivacySettingShowStatus

type UserPrivacySettingShowStatus struct {
	// contains filtered or unexported fields
}

A privacy setting for managing whether the user's online status is visible

func UnmarshalUserPrivacySettingShowStatus

func UnmarshalUserPrivacySettingShowStatus(data json.RawMessage) (*UserPrivacySettingShowStatus, error)

func (*UserPrivacySettingShowStatus) GetClass

func (*UserPrivacySettingShowStatus) GetType

func (*UserPrivacySettingShowStatus) MarshalJSON

func (entity *UserPrivacySettingShowStatus) MarshalJSON() ([]byte, error)

func (*UserPrivacySettingShowStatus) UserPrivacySettingType

func (*UserPrivacySettingShowStatus) UserPrivacySettingType() string

type UserStatus

type UserStatus interface {
	UserStatusType() string
}

Describes the last time the user was online

func UnmarshalListOfUserStatus

func UnmarshalListOfUserStatus(dataList []json.RawMessage) ([]UserStatus, error)

func UnmarshalUserStatus

func UnmarshalUserStatus(data json.RawMessage) (UserStatus, error)

type UserStatusEmpty

type UserStatusEmpty struct {
	// contains filtered or unexported fields
}

The user status was never changed

func UnmarshalUserStatusEmpty

func UnmarshalUserStatusEmpty(data json.RawMessage) (*UserStatusEmpty, error)

func (*UserStatusEmpty) GetClass

func (*UserStatusEmpty) GetClass() string

func (*UserStatusEmpty) GetType

func (*UserStatusEmpty) GetType() string

func (*UserStatusEmpty) MarshalJSON

func (entity *UserStatusEmpty) MarshalJSON() ([]byte, error)

func (*UserStatusEmpty) UserStatusType

func (*UserStatusEmpty) UserStatusType() string

type UserStatusLastMonth

type UserStatusLastMonth struct {
	// contains filtered or unexported fields
}

The user is offline, but was online last month

func UnmarshalUserStatusLastMonth

func UnmarshalUserStatusLastMonth(data json.RawMessage) (*UserStatusLastMonth, error)

func (*UserStatusLastMonth) GetClass

func (*UserStatusLastMonth) GetClass() string

func (*UserStatusLastMonth) GetType

func (*UserStatusLastMonth) GetType() string

func (*UserStatusLastMonth) MarshalJSON

func (entity *UserStatusLastMonth) MarshalJSON() ([]byte, error)

func (*UserStatusLastMonth) UserStatusType

func (*UserStatusLastMonth) UserStatusType() string

type UserStatusLastWeek

type UserStatusLastWeek struct {
	// contains filtered or unexported fields
}

The user is offline, but was online last week

func UnmarshalUserStatusLastWeek

func UnmarshalUserStatusLastWeek(data json.RawMessage) (*UserStatusLastWeek, error)

func (*UserStatusLastWeek) GetClass

func (*UserStatusLastWeek) GetClass() string

func (*UserStatusLastWeek) GetType

func (*UserStatusLastWeek) GetType() string

func (*UserStatusLastWeek) MarshalJSON

func (entity *UserStatusLastWeek) MarshalJSON() ([]byte, error)

func (*UserStatusLastWeek) UserStatusType

func (*UserStatusLastWeek) UserStatusType() string

type UserStatusOffline

type UserStatusOffline struct {

	// Point in time (Unix timestamp) when the user was last online
	WasOnline int32 `json:"was_online"`
	// contains filtered or unexported fields
}

The user is offline

func UnmarshalUserStatusOffline

func UnmarshalUserStatusOffline(data json.RawMessage) (*UserStatusOffline, error)

func (*UserStatusOffline) GetClass

func (*UserStatusOffline) GetClass() string

func (*UserStatusOffline) GetType

func (*UserStatusOffline) GetType() string

func (*UserStatusOffline) MarshalJSON

func (entity *UserStatusOffline) MarshalJSON() ([]byte, error)

func (*UserStatusOffline) UserStatusType

func (*UserStatusOffline) UserStatusType() string

type UserStatusOnline

type UserStatusOnline struct {

	// Point in time (Unix timestamp) when the user's online status will expire
	Expires int32 `json:"expires"`
	// contains filtered or unexported fields
}

The user is online

func UnmarshalUserStatusOnline

func UnmarshalUserStatusOnline(data json.RawMessage) (*UserStatusOnline, error)

func (*UserStatusOnline) GetClass

func (*UserStatusOnline) GetClass() string

func (*UserStatusOnline) GetType

func (*UserStatusOnline) GetType() string

func (*UserStatusOnline) MarshalJSON

func (entity *UserStatusOnline) MarshalJSON() ([]byte, error)

func (*UserStatusOnline) UserStatusType

func (*UserStatusOnline) UserStatusType() string

type UserStatusRecently

type UserStatusRecently struct {
	// contains filtered or unexported fields
}

The user was online recently

func UnmarshalUserStatusRecently

func UnmarshalUserStatusRecently(data json.RawMessage) (*UserStatusRecently, error)

func (*UserStatusRecently) GetClass

func (*UserStatusRecently) GetClass() string

func (*UserStatusRecently) GetType

func (*UserStatusRecently) GetType() string

func (*UserStatusRecently) MarshalJSON

func (entity *UserStatusRecently) MarshalJSON() ([]byte, error)

func (*UserStatusRecently) UserStatusType

func (*UserStatusRecently) UserStatusType() string

type UserType

type UserType interface {
	UserTypeType() string
}

Represents the type of a user. The following types are possible: regular users, deleted users and bots

func UnmarshalListOfUserType

func UnmarshalListOfUserType(dataList []json.RawMessage) ([]UserType, error)

func UnmarshalUserType

func UnmarshalUserType(data json.RawMessage) (UserType, error)

type UserTypeBot

type UserTypeBot struct {

	// True, if the bot can be invited to basic group and supergroup chats
	CanJoinGroups bool `json:"can_join_groups"`
	// True, if the bot can read all messages in basic group or supergroup chats and not just those addressed to the bot. In private and channel chats a bot can always read all messages
	CanReadAllGroupMessages bool `json:"can_read_all_group_messages"`
	// True, if the bot supports inline queries
	IsInline bool `json:"is_inline"`
	// Placeholder for inline queries (displayed on the application input field)
	InlineQueryPlaceholder string `json:"inline_query_placeholder"`
	// True, if the location of the user is expected to be sent with every inline query to this bot
	NeedLocation bool `json:"need_location"`
	// True, if the bot can be added to attachment menu
	CanBeAddedToAttachmentMenu bool `json:"can_be_added_to_attachment_menu"`
	// contains filtered or unexported fields
}

A bot (see https://core.telegram.org/bots)

func UnmarshalUserTypeBot

func UnmarshalUserTypeBot(data json.RawMessage) (*UserTypeBot, error)

func (*UserTypeBot) GetClass

func (*UserTypeBot) GetClass() string

func (*UserTypeBot) GetType

func (*UserTypeBot) GetType() string

func (*UserTypeBot) MarshalJSON

func (entity *UserTypeBot) MarshalJSON() ([]byte, error)

func (*UserTypeBot) UserTypeType

func (*UserTypeBot) UserTypeType() string

type UserTypeDeleted

type UserTypeDeleted struct {
	// contains filtered or unexported fields
}

A deleted user or deleted bot. No information on the user besides the user identifier is available. It is not possible to perform any active actions on this type of user

func UnmarshalUserTypeDeleted

func UnmarshalUserTypeDeleted(data json.RawMessage) (*UserTypeDeleted, error)

func (*UserTypeDeleted) GetClass

func (*UserTypeDeleted) GetClass() string

func (*UserTypeDeleted) GetType

func (*UserTypeDeleted) GetType() string

func (*UserTypeDeleted) MarshalJSON

func (entity *UserTypeDeleted) MarshalJSON() ([]byte, error)

func (*UserTypeDeleted) UserTypeType

func (*UserTypeDeleted) UserTypeType() string

type UserTypeRegular

type UserTypeRegular struct {
	// contains filtered or unexported fields
}

A regular user

func UnmarshalUserTypeRegular

func UnmarshalUserTypeRegular(data json.RawMessage) (*UserTypeRegular, error)

func (*UserTypeRegular) GetClass

func (*UserTypeRegular) GetClass() string

func (*UserTypeRegular) GetType

func (*UserTypeRegular) GetType() string

func (*UserTypeRegular) MarshalJSON

func (entity *UserTypeRegular) MarshalJSON() ([]byte, error)

func (*UserTypeRegular) UserTypeType

func (*UserTypeRegular) UserTypeType() string

type UserTypeUnknown

type UserTypeUnknown struct {
	// contains filtered or unexported fields
}

No information on the user besides the user identifier is available, yet this user has not been deleted. This object is extremely rare and must be handled like a deleted user. It is not possible to perform any actions on users of this type

func UnmarshalUserTypeUnknown

func UnmarshalUserTypeUnknown(data json.RawMessage) (*UserTypeUnknown, error)

func (*UserTypeUnknown) GetClass

func (*UserTypeUnknown) GetClass() string

func (*UserTypeUnknown) GetType

func (*UserTypeUnknown) GetType() string

func (*UserTypeUnknown) MarshalJSON

func (entity *UserTypeUnknown) MarshalJSON() ([]byte, error)

func (*UserTypeUnknown) UserTypeType

func (*UserTypeUnknown) UserTypeType() string

type Users

type Users struct {

	// Approximate total number of users found
	TotalCount int32 `json:"total_count"`
	// A list of user identifiers
	UserIds []int64 `json:"user_ids"`
	// contains filtered or unexported fields
}

Represents a list of users

func UnmarshalUsers

func UnmarshalUsers(data json.RawMessage) (*Users, error)

func (*Users) GetClass

func (*Users) GetClass() string

func (*Users) GetType

func (*Users) GetType() string

func (*Users) MarshalJSON

func (entity *Users) MarshalJSON() ([]byte, error)

type ValidateOrderInfoRequest

type ValidateOrderInfoRequest struct {
	// Chat identifier of the Invoice message
	ChatId int64 `json:"chat_id"`
	// Message identifier
	MessageId int64 `json:"message_id"`
	// The order information, provided by the user; pass null if empty
	OrderInfo *OrderInfo `json:"order_info"`
	// Pass true to save the order information
	AllowSave bool `json:"allow_save"`
}

type ValidatedOrderInfo

type ValidatedOrderInfo struct {

	// Temporary identifier of the order information
	OrderInfoId string `json:"order_info_id"`
	// Available shipping options
	ShippingOptions []*ShippingOption `json:"shipping_options"`
	// contains filtered or unexported fields
}

Contains a temporary identifier of validated order information, which is stored for one hour. Also contains the available shipping options

func UnmarshalValidatedOrderInfo

func UnmarshalValidatedOrderInfo(data json.RawMessage) (*ValidatedOrderInfo, error)

func (*ValidatedOrderInfo) GetClass

func (*ValidatedOrderInfo) GetClass() string

func (*ValidatedOrderInfo) GetType

func (*ValidatedOrderInfo) GetType() string

func (*ValidatedOrderInfo) MarshalJSON

func (entity *ValidatedOrderInfo) MarshalJSON() ([]byte, error)

type VectorPathCommand added in v1.7.10

type VectorPathCommand interface {
	VectorPathCommandType() string
}

Represents a vector path command

func UnmarshalListOfVectorPathCommand added in v1.7.10

func UnmarshalListOfVectorPathCommand(dataList []json.RawMessage) ([]VectorPathCommand, error)

func UnmarshalVectorPathCommand added in v1.7.10

func UnmarshalVectorPathCommand(data json.RawMessage) (VectorPathCommand, error)

type VectorPathCommandCubicBezierCurve added in v1.7.10

type VectorPathCommandCubicBezierCurve struct {

	// The start control point of the curve
	StartControlPoint *Point `json:"start_control_point"`
	// The end control point of the curve
	EndControlPoint *Point `json:"end_control_point"`
	// The end point of the curve
	EndPoint *Point `json:"end_point"`
	// contains filtered or unexported fields
}

A cubic Bézier curve to a given point

func UnmarshalVectorPathCommandCubicBezierCurve added in v1.7.10

func UnmarshalVectorPathCommandCubicBezierCurve(data json.RawMessage) (*VectorPathCommandCubicBezierCurve, error)

func (*VectorPathCommandCubicBezierCurve) GetClass added in v1.7.10

func (*VectorPathCommandCubicBezierCurve) GetType added in v1.7.10

func (*VectorPathCommandCubicBezierCurve) MarshalJSON added in v1.7.10

func (entity *VectorPathCommandCubicBezierCurve) MarshalJSON() ([]byte, error)

func (*VectorPathCommandCubicBezierCurve) VectorPathCommandType added in v1.7.10

func (*VectorPathCommandCubicBezierCurve) VectorPathCommandType() string

type VectorPathCommandLine added in v1.7.10

type VectorPathCommandLine struct {

	// The end point of the straight line
	EndPoint *Point `json:"end_point"`
	// contains filtered or unexported fields
}

A straight line to a given point

func UnmarshalVectorPathCommandLine added in v1.7.10

func UnmarshalVectorPathCommandLine(data json.RawMessage) (*VectorPathCommandLine, error)

func (*VectorPathCommandLine) GetClass added in v1.7.10

func (*VectorPathCommandLine) GetClass() string

func (*VectorPathCommandLine) GetType added in v1.7.10

func (*VectorPathCommandLine) GetType() string

func (*VectorPathCommandLine) MarshalJSON added in v1.7.10

func (entity *VectorPathCommandLine) MarshalJSON() ([]byte, error)

func (*VectorPathCommandLine) VectorPathCommandType added in v1.7.10

func (*VectorPathCommandLine) VectorPathCommandType() string

type Venue

type Venue struct {

	// Venue location; as defined by the sender
	Location *Location `json:"location"`
	// Venue name; as defined by the sender
	Title string `json:"title"`
	// Venue address; as defined by the sender
	Address string `json:"address"`
	// Provider of the venue database; as defined by the sender. Currently, only "foursquare" and "gplaces" (Google Places) need to be supported
	Provider string `json:"provider"`
	// Identifier of the venue in the provider database; as defined by the sender
	Id string `json:"id"`
	// Type of the venue in the provider database; as defined by the sender
	Type string `json:"type"`
	// contains filtered or unexported fields
}

Describes a venue

func UnmarshalVenue

func UnmarshalVenue(data json.RawMessage) (*Venue, error)

func (*Venue) GetClass

func (*Venue) GetClass() string

func (*Venue) GetType

func (*Venue) GetType() string

func (*Venue) MarshalJSON

func (entity *Venue) MarshalJSON() ([]byte, error)

type Video

type Video struct {

	// Duration of the video, in seconds; as defined by the sender
	Duration int32 `json:"duration"`
	// Video width; as defined by the sender
	Width int32 `json:"width"`
	// Video height; as defined by the sender
	Height int32 `json:"height"`
	// Original name of the file; as defined by the sender
	FileName string `json:"file_name"`
	// MIME type of the file; as defined by the sender
	MimeType string `json:"mime_type"`
	// True, if stickers were added to the video. The list of corresponding sticker sets can be received using getAttachedStickerSets
	HasStickers bool `json:"has_stickers"`
	// True, if the video is supposed to be streamed
	SupportsStreaming bool `json:"supports_streaming"`
	// Video minithumbnail; may be null
	Minithumbnail *Minithumbnail `json:"minithumbnail"`
	// Video thumbnail in JPEG or MPEG4 format; as defined by the sender; may be null
	Thumbnail *Thumbnail `json:"thumbnail"`
	// File containing the video
	Video *File `json:"video"`
	// contains filtered or unexported fields
}

Describes a video file

func UnmarshalVideo

func UnmarshalVideo(data json.RawMessage) (*Video, error)

func (*Video) GetClass

func (*Video) GetClass() string

func (*Video) GetType

func (*Video) GetType() string

func (*Video) MarshalJSON

func (entity *Video) MarshalJSON() ([]byte, error)

type VideoChat added in v1.7.10

type VideoChat struct {

	// Group call identifier of an active video chat; 0 if none. Full information about the video chat can be received through the method getGroupCall
	GroupCallId int32 `json:"group_call_id"`
	// True, if the video chat has participants
	HasParticipants bool `json:"has_participants"`
	// Default group call participant identifier to join the video chat; may be null
	DefaultParticipantId MessageSender `json:"default_participant_id"`
	// contains filtered or unexported fields
}

Describes a video chat

func UnmarshalVideoChat added in v1.7.10

func UnmarshalVideoChat(data json.RawMessage) (*VideoChat, error)

func (*VideoChat) GetClass added in v1.7.10

func (*VideoChat) GetClass() string

func (*VideoChat) GetType added in v1.7.10

func (*VideoChat) GetType() string

func (*VideoChat) MarshalJSON added in v1.7.10

func (entity *VideoChat) MarshalJSON() ([]byte, error)

func (*VideoChat) UnmarshalJSON added in v1.7.10

func (videoChat *VideoChat) UnmarshalJSON(data []byte) error

type VideoNote

type VideoNote struct {

	// Duration of the video, in seconds; as defined by the sender
	Duration int32 `json:"duration"`
	// Video width and height; as defined by the sender
	Length int32 `json:"length"`
	// Video minithumbnail; may be null
	Minithumbnail *Minithumbnail `json:"minithumbnail"`
	// Video thumbnail in JPEG format; as defined by the sender; may be null
	Thumbnail *Thumbnail `json:"thumbnail"`
	// File containing the video
	Video *File `json:"video"`
	// contains filtered or unexported fields
}

Describes a video note. The video must be equal in width and height, cropped to a circle, and stored in MPEG4 format

func UnmarshalVideoNote

func UnmarshalVideoNote(data json.RawMessage) (*VideoNote, error)

func (*VideoNote) GetClass

func (*VideoNote) GetClass() string

func (*VideoNote) GetType

func (*VideoNote) GetType() string

func (*VideoNote) MarshalJSON

func (entity *VideoNote) MarshalJSON() ([]byte, error)

type ViewMessagesRequest

type ViewMessagesRequest struct {
	// Chat identifier
	ChatId int64 `json:"chat_id"`
	// If not 0, a message thread identifier in which the messages are being viewed
	MessageThreadId int64 `json:"message_thread_id"`
	// The identifiers of the messages being viewed
	MessageIds []int64 `json:"message_ids"`
	// Pass true to mark as read the specified messages even the chat is closed
	ForceRead bool `json:"force_read"`
}

type ViewTrendingStickerSetsRequest

type ViewTrendingStickerSetsRequest struct {
	// Identifiers of viewed trending sticker sets
	StickerSetIds []JsonInt64 `json:"sticker_set_ids"`
}

type VoiceNote

type VoiceNote struct {

	// Duration of the voice note, in seconds; as defined by the sender
	Duration int32 `json:"duration"`
	// A waveform representation of the voice note in 5-bit format
	Waveform []byte `json:"waveform"`
	// MIME type of the file; as defined by the sender
	MimeType string `json:"mime_type"`
	// File containing the voice note
	Voice *File `json:"voice"`
	// contains filtered or unexported fields
}

Describes a voice note. The voice note must be encoded with the Opus codec, and stored inside an OGG container. Voice notes can have only a single audio channel

func UnmarshalVoiceNote

func UnmarshalVoiceNote(data json.RawMessage) (*VoiceNote, error)

func (*VoiceNote) GetClass

func (*VoiceNote) GetClass() string

func (*VoiceNote) GetType

func (*VoiceNote) GetType() string

func (*VoiceNote) MarshalJSON

func (entity *VoiceNote) MarshalJSON() ([]byte, error)

type WebAppInfo added in v1.8.3

type WebAppInfo struct {

	// Unique identifier for the web app launch
	LaunchId JsonInt64 `json:"launch_id"`
	// A web app URL to open in a web view
	Url string `json:"url"`
	// contains filtered or unexported fields
}

Contains information about a web app

func UnmarshalWebAppInfo added in v1.8.3

func UnmarshalWebAppInfo(data json.RawMessage) (*WebAppInfo, error)

func (*WebAppInfo) GetClass added in v1.8.3

func (*WebAppInfo) GetClass() string

func (*WebAppInfo) GetType added in v1.8.3

func (*WebAppInfo) GetType() string

func (*WebAppInfo) MarshalJSON added in v1.8.3

func (entity *WebAppInfo) MarshalJSON() ([]byte, error)

type WebPage

type WebPage struct {

	// Original URL of the link
	Url string `json:"url"`
	// URL to display
	DisplayUrl string `json:"display_url"`
	// Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else
	Type string `json:"type"`
	// Short name of the site (e.g., Google Docs, App Store)
	SiteName string `json:"site_name"`
	// Title of the content
	Title string `json:"title"`
	// Description of the content
	Description *FormattedText `json:"description"`
	// Image representing the content; may be null
	Photo *Photo `json:"photo"`
	// URL to show in the embedded preview
	EmbedUrl string `json:"embed_url"`
	// MIME type of the embedded preview, (e.g., text/html or video/mp4)
	EmbedType string `json:"embed_type"`
	// Width of the embedded preview
	EmbedWidth int32 `json:"embed_width"`
	// Height of the embedded preview
	EmbedHeight int32 `json:"embed_height"`
	// Duration of the content, in seconds
	Duration int32 `json:"duration"`
	// Author of the content
	Author string `json:"author"`
	// Preview of the content as an animation, if available; may be null
	Animation *Animation `json:"animation"`
	// Preview of the content as an audio file, if available; may be null
	Audio *Audio `json:"audio"`
	// Preview of the content as a document, if available; may be null
	Document *Document `json:"document"`
	// Preview of the content as a sticker for small WEBP files, if available; may be null
	Sticker *Sticker `json:"sticker"`
	// Preview of the content as a video, if available; may be null
	Video *Video `json:"video"`
	// Preview of the content as a video note, if available; may be null
	VideoNote *VideoNote `json:"video_note"`
	// Preview of the content as a voice note, if available; may be null
	VoiceNote *VoiceNote `json:"voice_note"`
	// Version of instant view, available for the web page (currently, can be 1 or 2), 0 if none
	InstantViewVersion int32 `json:"instant_view_version"`
	// contains filtered or unexported fields
}

Describes a web page preview

func UnmarshalWebPage

func UnmarshalWebPage(data json.RawMessage) (*WebPage, error)

func (*WebPage) GetClass

func (*WebPage) GetClass() string

func (*WebPage) GetType

func (*WebPage) GetType() string

func (*WebPage) MarshalJSON

func (entity *WebPage) MarshalJSON() ([]byte, error)

type WebPageInstantView

type WebPageInstantView struct {

	// Content of the web page
	PageBlocks []PageBlock `json:"page_blocks"`
	// Number of the instant view views; 0 if unknown
	ViewCount int32 `json:"view_count"`
	// Version of the instant view; currently, can be 1 or 2
	Version int32 `json:"version"`
	// True, if the instant view must be shown from right to left
	IsRtl bool `json:"is_rtl"`
	// True, if the instant view contains the full page. A network request might be needed to get the full web page instant view
	IsFull bool `json:"is_full"`
	// An internal link to be opened to leave feedback about the instant view
	FeedbackLink InternalLinkType `json:"feedback_link"`
	// contains filtered or unexported fields
}

Describes an instant view page for a web page

func UnmarshalWebPageInstantView

func UnmarshalWebPageInstantView(data json.RawMessage) (*WebPageInstantView, error)

func (*WebPageInstantView) GetClass

func (*WebPageInstantView) GetClass() string

func (*WebPageInstantView) GetType

func (*WebPageInstantView) GetType() string

func (*WebPageInstantView) MarshalJSON

func (entity *WebPageInstantView) MarshalJSON() ([]byte, error)

func (*WebPageInstantView) UnmarshalJSON

func (webPageInstantView *WebPageInstantView) UnmarshalJSON(data []byte) error

type WriteGeneratedFilePartRequest

type WriteGeneratedFilePartRequest struct {
	// The identifier of the generation process
	GenerationId JsonInt64 `json:"generation_id"`
	// The offset from which to write the data to the file
	Offset int32 `json:"offset"`
	// The data to write
	Data []byte `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL