tg

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 4 Imported by: 378

Documentation

Overview

Package tg contains generated types from MTProto Telegram API.

Index

Constants

View Source
const AccountAcceptAuthorizationRequestTypeID = 0xe7027c94

AccountAcceptAuthorizationRequestTypeID is TL type id of AccountAcceptAuthorizationRequest.

View Source
const AccountAuthorizationFormTypeID = 0xad2e1cd8

AccountAuthorizationFormTypeID is TL type id of AccountAuthorizationForm.

View Source
const AccountAuthorizationsTypeID = 0x1250abde

AccountAuthorizationsTypeID is TL type id of AccountAuthorizations.

View Source
const AccountAutoDownloadSettingsTypeID = 0x63cacf26

AccountAutoDownloadSettingsTypeID is TL type id of AccountAutoDownloadSettings.

View Source
const AccountCancelPasswordEmailRequestTypeID = 0xc1cbd5b6

AccountCancelPasswordEmailRequestTypeID is TL type id of AccountCancelPasswordEmailRequest.

View Source
const AccountChangePhoneRequestTypeID = 0x70c32edb

AccountChangePhoneRequestTypeID is TL type id of AccountChangePhoneRequest.

View Source
const AccountCheckUsernameRequestTypeID = 0x2714d86c

AccountCheckUsernameRequestTypeID is TL type id of AccountCheckUsernameRequest.

View Source
const AccountConfirmPasswordEmailRequestTypeID = 0x8fdf1920

AccountConfirmPasswordEmailRequestTypeID is TL type id of AccountConfirmPasswordEmailRequest.

View Source
const AccountConfirmPhoneRequestTypeID = 0x5f2178c3

AccountConfirmPhoneRequestTypeID is TL type id of AccountConfirmPhoneRequest.

View Source
const AccountContentSettingsTypeID = 0x57e28221

AccountContentSettingsTypeID is TL type id of AccountContentSettings.

View Source
const AccountCreateThemeRequestTypeID = 0x8432c21f

AccountCreateThemeRequestTypeID is TL type id of AccountCreateThemeRequest.

View Source
const AccountDaysTTLTypeID = 0xb8d0afdf

AccountDaysTTLTypeID is TL type id of AccountDaysTTL.

View Source
const AccountDeleteAccountRequestTypeID = 0x418d4e0b

AccountDeleteAccountRequestTypeID is TL type id of AccountDeleteAccountRequest.

View Source
const AccountDeleteSecureValueRequestTypeID = 0xb880bc4b

AccountDeleteSecureValueRequestTypeID is TL type id of AccountDeleteSecureValueRequest.

View Source
const AccountFinishTakeoutSessionRequestTypeID = 0x1d2652ee

AccountFinishTakeoutSessionRequestTypeID is TL type id of AccountFinishTakeoutSessionRequest.

View Source
const AccountGetAccountTTLRequestTypeID = 0x8fc711d

AccountGetAccountTTLRequestTypeID is TL type id of AccountGetAccountTTLRequest.

View Source
const AccountGetAllSecureValuesRequestTypeID = 0xb288bc7d

AccountGetAllSecureValuesRequestTypeID is TL type id of AccountGetAllSecureValuesRequest.

View Source
const AccountGetAuthorizationFormRequestTypeID = 0xb86ba8e1

AccountGetAuthorizationFormRequestTypeID is TL type id of AccountGetAuthorizationFormRequest.

View Source
const AccountGetAuthorizationsRequestTypeID = 0xe320c158

AccountGetAuthorizationsRequestTypeID is TL type id of AccountGetAuthorizationsRequest.

View Source
const AccountGetAutoDownloadSettingsRequestTypeID = 0x56da0b3f

AccountGetAutoDownloadSettingsRequestTypeID is TL type id of AccountGetAutoDownloadSettingsRequest.

View Source
const AccountGetContactSignUpNotificationRequestTypeID = 0x9f07c728

AccountGetContactSignUpNotificationRequestTypeID is TL type id of AccountGetContactSignUpNotificationRequest.

View Source
const AccountGetContentSettingsRequestTypeID = 0x8b9b4dae

AccountGetContentSettingsRequestTypeID is TL type id of AccountGetContentSettingsRequest.

View Source
const AccountGetGlobalPrivacySettingsRequestTypeID = 0xeb2b4cf6

AccountGetGlobalPrivacySettingsRequestTypeID is TL type id of AccountGetGlobalPrivacySettingsRequest.

View Source
const AccountGetMultiWallPapersRequestTypeID = 0x65ad71dc

AccountGetMultiWallPapersRequestTypeID is TL type id of AccountGetMultiWallPapersRequest.

View Source
const AccountGetNotifyExceptionsRequestTypeID = 0x53577479

AccountGetNotifyExceptionsRequestTypeID is TL type id of AccountGetNotifyExceptionsRequest.

View Source
const AccountGetNotifySettingsRequestTypeID = 0x12b3ad31

AccountGetNotifySettingsRequestTypeID is TL type id of AccountGetNotifySettingsRequest.

View Source
const AccountGetPasswordRequestTypeID = 0x548a30f5

AccountGetPasswordRequestTypeID is TL type id of AccountGetPasswordRequest.

View Source
const AccountGetPasswordSettingsRequestTypeID = 0x9cd4eaf9

AccountGetPasswordSettingsRequestTypeID is TL type id of AccountGetPasswordSettingsRequest.

View Source
const AccountGetPrivacyRequestTypeID = 0xdadbc950

AccountGetPrivacyRequestTypeID is TL type id of AccountGetPrivacyRequest.

View Source
const AccountGetSecureValueRequestTypeID = 0x73665bc2

AccountGetSecureValueRequestTypeID is TL type id of AccountGetSecureValueRequest.

View Source
const AccountGetThemeRequestTypeID = 0x8d9d742b

AccountGetThemeRequestTypeID is TL type id of AccountGetThemeRequest.

View Source
const AccountGetThemesRequestTypeID = 0x285946f8

AccountGetThemesRequestTypeID is TL type id of AccountGetThemesRequest.

View Source
const AccountGetTmpPasswordRequestTypeID = 0x449e0b51

AccountGetTmpPasswordRequestTypeID is TL type id of AccountGetTmpPasswordRequest.

View Source
const AccountGetWallPaperRequestTypeID = 0xfc8ddbea

AccountGetWallPaperRequestTypeID is TL type id of AccountGetWallPaperRequest.

View Source
const AccountGetWallPapersRequestTypeID = 0xaabb1763

AccountGetWallPapersRequestTypeID is TL type id of AccountGetWallPapersRequest.

View Source
const AccountGetWebAuthorizationsRequestTypeID = 0x182e6d6f

AccountGetWebAuthorizationsRequestTypeID is TL type id of AccountGetWebAuthorizationsRequest.

View Source
const AccountInitTakeoutSessionRequestTypeID = 0xf05b4804

AccountInitTakeoutSessionRequestTypeID is TL type id of AccountInitTakeoutSessionRequest.

View Source
const AccountInstallThemeRequestTypeID = 0x7ae43737

AccountInstallThemeRequestTypeID is TL type id of AccountInstallThemeRequest.

View Source
const AccountInstallWallPaperRequestTypeID = 0xfeed5769

AccountInstallWallPaperRequestTypeID is TL type id of AccountInstallWallPaperRequest.

View Source
const AccountPasswordInputSettingsTypeID = 0xc23727c9

AccountPasswordInputSettingsTypeID is TL type id of AccountPasswordInputSettings.

View Source
const AccountPasswordSettingsTypeID = 0x9a5c33e5

AccountPasswordSettingsTypeID is TL type id of AccountPasswordSettings.

View Source
const AccountPasswordTypeID = 0xad2641f8

AccountPasswordTypeID is TL type id of AccountPassword.

View Source
const AccountPrivacyRulesTypeID = 0x50a04e45

AccountPrivacyRulesTypeID is TL type id of AccountPrivacyRules.

View Source
const AccountRegisterDeviceRequestTypeID = 0x68976c6f

AccountRegisterDeviceRequestTypeID is TL type id of AccountRegisterDeviceRequest.

View Source
const AccountReportPeerRequestTypeID = 0xae189d5f

AccountReportPeerRequestTypeID is TL type id of AccountReportPeerRequest.

View Source
const AccountResendPasswordEmailRequestTypeID = 0x7a7f2a15

AccountResendPasswordEmailRequestTypeID is TL type id of AccountResendPasswordEmailRequest.

View Source
const AccountResetAuthorizationRequestTypeID = 0xdf77f3bc

AccountResetAuthorizationRequestTypeID is TL type id of AccountResetAuthorizationRequest.

View Source
const AccountResetNotifySettingsRequestTypeID = 0xdb7e1747

AccountResetNotifySettingsRequestTypeID is TL type id of AccountResetNotifySettingsRequest.

View Source
const AccountResetWallPapersRequestTypeID = 0xbb3b9804

AccountResetWallPapersRequestTypeID is TL type id of AccountResetWallPapersRequest.

View Source
const AccountResetWebAuthorizationRequestTypeID = 0x2d01b9ef

AccountResetWebAuthorizationRequestTypeID is TL type id of AccountResetWebAuthorizationRequest.

View Source
const AccountResetWebAuthorizationsRequestTypeID = 0x682d2594

AccountResetWebAuthorizationsRequestTypeID is TL type id of AccountResetWebAuthorizationsRequest.

View Source
const AccountSaveAutoDownloadSettingsRequestTypeID = 0x76f36233

AccountSaveAutoDownloadSettingsRequestTypeID is TL type id of AccountSaveAutoDownloadSettingsRequest.

View Source
const AccountSaveSecureValueRequestTypeID = 0x899fe31d

AccountSaveSecureValueRequestTypeID is TL type id of AccountSaveSecureValueRequest.

View Source
const AccountSaveThemeRequestTypeID = 0xf257106c

AccountSaveThemeRequestTypeID is TL type id of AccountSaveThemeRequest.

View Source
const AccountSaveWallPaperRequestTypeID = 0x6c5a5b37

AccountSaveWallPaperRequestTypeID is TL type id of AccountSaveWallPaperRequest.

View Source
const AccountSendChangePhoneCodeRequestTypeID = 0x82574ae5

AccountSendChangePhoneCodeRequestTypeID is TL type id of AccountSendChangePhoneCodeRequest.

View Source
const AccountSendConfirmPhoneCodeRequestTypeID = 0x1b3faa88

AccountSendConfirmPhoneCodeRequestTypeID is TL type id of AccountSendConfirmPhoneCodeRequest.

View Source
const AccountSendVerifyEmailCodeRequestTypeID = 0x7011509f

AccountSendVerifyEmailCodeRequestTypeID is TL type id of AccountSendVerifyEmailCodeRequest.

View Source
const AccountSendVerifyPhoneCodeRequestTypeID = 0xa5a356f9

AccountSendVerifyPhoneCodeRequestTypeID is TL type id of AccountSendVerifyPhoneCodeRequest.

View Source
const AccountSentEmailCodeTypeID = 0x811f854f

AccountSentEmailCodeTypeID is TL type id of AccountSentEmailCode.

View Source
const AccountSetAccountTTLRequestTypeID = 0x2442485e

AccountSetAccountTTLRequestTypeID is TL type id of AccountSetAccountTTLRequest.

View Source
const AccountSetContactSignUpNotificationRequestTypeID = 0xcff43f61

AccountSetContactSignUpNotificationRequestTypeID is TL type id of AccountSetContactSignUpNotificationRequest.

View Source
const AccountSetContentSettingsRequestTypeID = 0xb574b16b

AccountSetContentSettingsRequestTypeID is TL type id of AccountSetContentSettingsRequest.

View Source
const AccountSetGlobalPrivacySettingsRequestTypeID = 0x1edaaac2

AccountSetGlobalPrivacySettingsRequestTypeID is TL type id of AccountSetGlobalPrivacySettingsRequest.

View Source
const AccountSetPrivacyRequestTypeID = 0xc9f81ce8

AccountSetPrivacyRequestTypeID is TL type id of AccountSetPrivacyRequest.

View Source
const AccountTakeoutTypeID = 0x4dba4501

AccountTakeoutTypeID is TL type id of AccountTakeout.

View Source
const AccountThemesNotModifiedTypeID = 0xf41eb622

AccountThemesNotModifiedTypeID is TL type id of AccountThemesNotModified.

View Source
const AccountThemesTypeID = 0x7f676421

AccountThemesTypeID is TL type id of AccountThemes.

View Source
const AccountTmpPasswordTypeID = 0xdb64fd34

AccountTmpPasswordTypeID is TL type id of AccountTmpPassword.

View Source
const AccountUnregisterDeviceRequestTypeID = 0x3076c4bf

AccountUnregisterDeviceRequestTypeID is TL type id of AccountUnregisterDeviceRequest.

View Source
const AccountUpdateDeviceLockedRequestTypeID = 0x38df3532

AccountUpdateDeviceLockedRequestTypeID is TL type id of AccountUpdateDeviceLockedRequest.

View Source
const AccountUpdateNotifySettingsRequestTypeID = 0x84be5b93

AccountUpdateNotifySettingsRequestTypeID is TL type id of AccountUpdateNotifySettingsRequest.

View Source
const AccountUpdatePasswordSettingsRequestTypeID = 0xa59b102f

AccountUpdatePasswordSettingsRequestTypeID is TL type id of AccountUpdatePasswordSettingsRequest.

View Source
const AccountUpdateProfileRequestTypeID = 0x78515775

AccountUpdateProfileRequestTypeID is TL type id of AccountUpdateProfileRequest.

View Source
const AccountUpdateStatusRequestTypeID = 0x6628562c

AccountUpdateStatusRequestTypeID is TL type id of AccountUpdateStatusRequest.

View Source
const AccountUpdateThemeRequestTypeID = 0x5cb367d5

AccountUpdateThemeRequestTypeID is TL type id of AccountUpdateThemeRequest.

View Source
const AccountUpdateUsernameRequestTypeID = 0x3e0bdd7c

AccountUpdateUsernameRequestTypeID is TL type id of AccountUpdateUsernameRequest.

View Source
const AccountUploadThemeRequestTypeID = 0x1c3db333

AccountUploadThemeRequestTypeID is TL type id of AccountUploadThemeRequest.

View Source
const AccountUploadWallPaperRequestTypeID = 0xdd853661

AccountUploadWallPaperRequestTypeID is TL type id of AccountUploadWallPaperRequest.

View Source
const AccountVerifyEmailRequestTypeID = 0xecba39db

AccountVerifyEmailRequestTypeID is TL type id of AccountVerifyEmailRequest.

View Source
const AccountVerifyPhoneRequestTypeID = 0x4dd3a7f6

AccountVerifyPhoneRequestTypeID is TL type id of AccountVerifyPhoneRequest.

View Source
const AccountWallPapersNotModifiedTypeID = 0x1c199183

AccountWallPapersNotModifiedTypeID is TL type id of AccountWallPapersNotModified.

View Source
const AccountWallPapersTypeID = 0x702b65a9

AccountWallPapersTypeID is TL type id of AccountWallPapers.

View Source
const AccountWebAuthorizationsTypeID = 0xed56c9fc

AccountWebAuthorizationsTypeID is TL type id of AccountWebAuthorizations.

View Source
const AuthAcceptLoginTokenRequestTypeID = 0xe894ad4d

AuthAcceptLoginTokenRequestTypeID is TL type id of AuthAcceptLoginTokenRequest.

View Source
const AuthAuthorizationSignUpRequiredTypeID = 0x44747e9a

AuthAuthorizationSignUpRequiredTypeID is TL type id of AuthAuthorizationSignUpRequired.

View Source
const AuthAuthorizationTypeID = 0xcd050916

AuthAuthorizationTypeID is TL type id of AuthAuthorization.

View Source
const AuthBindTempAuthKeyRequestTypeID = 0xcdd42a05

AuthBindTempAuthKeyRequestTypeID is TL type id of AuthBindTempAuthKeyRequest.

View Source
const AuthCancelCodeRequestTypeID = 0x1f040578

AuthCancelCodeRequestTypeID is TL type id of AuthCancelCodeRequest.

View Source
const AuthCheckPasswordRequestTypeID = 0xd18b4d16

AuthCheckPasswordRequestTypeID is TL type id of AuthCheckPasswordRequest.

View Source
const AuthCodeTypeCallTypeID = 0x741cd3e3

AuthCodeTypeCallTypeID is TL type id of AuthCodeTypeCall.

View Source
const AuthCodeTypeFlashCallTypeID = 0x226ccefb

AuthCodeTypeFlashCallTypeID is TL type id of AuthCodeTypeFlashCall.

View Source
const AuthCodeTypeSmsTypeID = 0x72a3158c

AuthCodeTypeSmsTypeID is TL type id of AuthCodeTypeSms.

View Source
const AuthDropTempAuthKeysRequestTypeID = 0x8e48a188

AuthDropTempAuthKeysRequestTypeID is TL type id of AuthDropTempAuthKeysRequest.

View Source
const AuthExportAuthorizationRequestTypeID = 0xe5bfffcd

AuthExportAuthorizationRequestTypeID is TL type id of AuthExportAuthorizationRequest.

View Source
const AuthExportLoginTokenRequestTypeID = 0xb1b41517

AuthExportLoginTokenRequestTypeID is TL type id of AuthExportLoginTokenRequest.

View Source
const AuthExportedAuthorizationTypeID = 0xdf969c2d

AuthExportedAuthorizationTypeID is TL type id of AuthExportedAuthorization.

View Source
const AuthImportAuthorizationRequestTypeID = 0xe3ef9613

AuthImportAuthorizationRequestTypeID is TL type id of AuthImportAuthorizationRequest.

View Source
const AuthImportBotAuthorizationRequestTypeID = 0x67a3ff2c

AuthImportBotAuthorizationRequestTypeID is TL type id of AuthImportBotAuthorizationRequest.

View Source
const AuthImportLoginTokenRequestTypeID = 0x95ac5ce4

AuthImportLoginTokenRequestTypeID is TL type id of AuthImportLoginTokenRequest.

View Source
const AuthLogOutRequestTypeID = 0x5717da40

AuthLogOutRequestTypeID is TL type id of AuthLogOutRequest.

View Source
const AuthLoginTokenMigrateToTypeID = 0x68e9916

AuthLoginTokenMigrateToTypeID is TL type id of AuthLoginTokenMigrateTo.

View Source
const AuthLoginTokenSuccessTypeID = 0x390d5c5e

AuthLoginTokenSuccessTypeID is TL type id of AuthLoginTokenSuccess.

View Source
const AuthLoginTokenTypeID = 0x629f1980

AuthLoginTokenTypeID is TL type id of AuthLoginToken.

View Source
const AuthPasswordRecoveryTypeID = 0x137948a5

AuthPasswordRecoveryTypeID is TL type id of AuthPasswordRecovery.

View Source
const AuthRecoverPasswordRequestTypeID = 0x4ea56e92

AuthRecoverPasswordRequestTypeID is TL type id of AuthRecoverPasswordRequest.

View Source
const AuthRequestPasswordRecoveryRequestTypeID = 0xd897bc66

AuthRequestPasswordRecoveryRequestTypeID is TL type id of AuthRequestPasswordRecoveryRequest.

View Source
const AuthResendCodeRequestTypeID = 0x3ef1a9bf

AuthResendCodeRequestTypeID is TL type id of AuthResendCodeRequest.

View Source
const AuthResetAuthorizationsRequestTypeID = 0x9fab0d1a

AuthResetAuthorizationsRequestTypeID is TL type id of AuthResetAuthorizationsRequest.

View Source
const AuthSendCodeRequestTypeID = 0xa677244f

AuthSendCodeRequestTypeID is TL type id of AuthSendCodeRequest.

View Source
const AuthSentCodeTypeAppTypeID = 0x3dbb5986

AuthSentCodeTypeAppTypeID is TL type id of AuthSentCodeTypeApp.

View Source
const AuthSentCodeTypeCallTypeID = 0x5353e5a7

AuthSentCodeTypeCallTypeID is TL type id of AuthSentCodeTypeCall.

View Source
const AuthSentCodeTypeFlashCallTypeID = 0xab03c6d9

AuthSentCodeTypeFlashCallTypeID is TL type id of AuthSentCodeTypeFlashCall.

View Source
const AuthSentCodeTypeID = 0x5e002502

AuthSentCodeTypeID is TL type id of AuthSentCode.

View Source
const AuthSentCodeTypeSmsTypeID = 0xc000bba2

AuthSentCodeTypeSmsTypeID is TL type id of AuthSentCodeTypeSms.

View Source
const AuthSignInRequestTypeID = 0xbcd51581

AuthSignInRequestTypeID is TL type id of AuthSignInRequest.

View Source
const AuthSignUpRequestTypeID = 0x80eee427

AuthSignUpRequestTypeID is TL type id of AuthSignUpRequest.

View Source
const AuthorizationTypeID = 0xad01d61d

AuthorizationTypeID is TL type id of Authorization.

View Source
const AutoDownloadSettingsTypeID = 0xe04232f3

AutoDownloadSettingsTypeID is TL type id of AutoDownloadSettings.

View Source
const BankCardOpenUrlTypeID = 0xf568028a

BankCardOpenUrlTypeID is TL type id of BankCardOpenUrl.

View Source
const BaseThemeArcticTypeID = 0x5b11125a

BaseThemeArcticTypeID is TL type id of BaseThemeArctic.

View Source
const BaseThemeClassicTypeID = 0xc3a12462

BaseThemeClassicTypeID is TL type id of BaseThemeClassic.

View Source
const BaseThemeDayTypeID = 0xfbd81688

BaseThemeDayTypeID is TL type id of BaseThemeDay.

View Source
const BaseThemeNightTypeID = 0xb7b31ea8

BaseThemeNightTypeID is TL type id of BaseThemeNight.

View Source
const BaseThemeTintedTypeID = 0x6d5f77ee

BaseThemeTintedTypeID is TL type id of BaseThemeTinted.

View Source
const BoolFalseTypeID = 0xbc799737

BoolFalseTypeID is TL type id of BoolFalse.

View Source
const BoolTrueTypeID = 0x997275b5

BoolTrueTypeID is TL type id of BoolTrue.

View Source
const BotCommandTypeID = 0xc27ac8c7

BotCommandTypeID is TL type id of BotCommand.

View Source
const BotInfoTypeID = 0x98e81d3a

BotInfoTypeID is TL type id of BotInfo.

View Source
const BotInlineMediaResultTypeID = 0x17db940b

BotInlineMediaResultTypeID is TL type id of BotInlineMediaResult.

View Source
const BotInlineMessageMediaAutoTypeID = 0x764cf810

BotInlineMessageMediaAutoTypeID is TL type id of BotInlineMessageMediaAuto.

View Source
const BotInlineMessageMediaContactTypeID = 0x18d1cdc2

BotInlineMessageMediaContactTypeID is TL type id of BotInlineMessageMediaContact.

View Source
const BotInlineMessageMediaGeoTypeID = 0x51846fd

BotInlineMessageMediaGeoTypeID is TL type id of BotInlineMessageMediaGeo.

View Source
const BotInlineMessageMediaVenueTypeID = 0x8a86659c

BotInlineMessageMediaVenueTypeID is TL type id of BotInlineMessageMediaVenue.

View Source
const BotInlineMessageTextTypeID = 0x8c7f65e2

BotInlineMessageTextTypeID is TL type id of BotInlineMessageText.

View Source
const BotInlineResultTypeID = 0x11965f3a

BotInlineResultTypeID is TL type id of BotInlineResult.

View Source
const BotsAnswerWebhookJSONQueryRequestTypeID = 0xe6213f4d

BotsAnswerWebhookJSONQueryRequestTypeID is TL type id of BotsAnswerWebhookJSONQueryRequest.

View Source
const BotsSendCustomRequestRequestTypeID = 0xaa2769ed

BotsSendCustomRequestRequestTypeID is TL type id of BotsSendCustomRequestRequest.

View Source
const BotsSetBotCommandsRequestTypeID = 0x805d46f6

BotsSetBotCommandsRequestTypeID is TL type id of BotsSetBotCommandsRequest.

View Source
const CdnConfigTypeID = 0x5725e40a

CdnConfigTypeID is TL type id of CdnConfig.

View Source
const CdnPublicKeyTypeID = 0xc982eaba

CdnPublicKeyTypeID is TL type id of CdnPublicKey.

View Source
const ChannelAdminLogEventActionChangeAboutTypeID = 0x55188a2e

ChannelAdminLogEventActionChangeAboutTypeID is TL type id of ChannelAdminLogEventActionChangeAbout.

View Source
const ChannelAdminLogEventActionChangeLinkedChatTypeID = 0xa26f881b

ChannelAdminLogEventActionChangeLinkedChatTypeID is TL type id of ChannelAdminLogEventActionChangeLinkedChat.

View Source
const ChannelAdminLogEventActionChangeLocationTypeID = 0xe6b76ae

ChannelAdminLogEventActionChangeLocationTypeID is TL type id of ChannelAdminLogEventActionChangeLocation.

View Source
const ChannelAdminLogEventActionChangePhotoTypeID = 0x434bd2af

ChannelAdminLogEventActionChangePhotoTypeID is TL type id of ChannelAdminLogEventActionChangePhoto.

View Source
const ChannelAdminLogEventActionChangeStickerSetTypeID = 0xb1c3caa7

ChannelAdminLogEventActionChangeStickerSetTypeID is TL type id of ChannelAdminLogEventActionChangeStickerSet.

View Source
const ChannelAdminLogEventActionChangeTitleTypeID = 0xe6dfb825

ChannelAdminLogEventActionChangeTitleTypeID is TL type id of ChannelAdminLogEventActionChangeTitle.

View Source
const ChannelAdminLogEventActionChangeUsernameTypeID = 0x6a4afc38

ChannelAdminLogEventActionChangeUsernameTypeID is TL type id of ChannelAdminLogEventActionChangeUsername.

View Source
const ChannelAdminLogEventActionDefaultBannedRightsTypeID = 0x2df5fc0a

ChannelAdminLogEventActionDefaultBannedRightsTypeID is TL type id of ChannelAdminLogEventActionDefaultBannedRights.

View Source
const ChannelAdminLogEventActionDeleteMessageTypeID = 0x42e047bb

ChannelAdminLogEventActionDeleteMessageTypeID is TL type id of ChannelAdminLogEventActionDeleteMessage.

View Source
const ChannelAdminLogEventActionDiscardGroupCallTypeID = 0xdb9f9140

ChannelAdminLogEventActionDiscardGroupCallTypeID is TL type id of ChannelAdminLogEventActionDiscardGroupCall.

View Source
const ChannelAdminLogEventActionEditMessageTypeID = 0x709b2405

ChannelAdminLogEventActionEditMessageTypeID is TL type id of ChannelAdminLogEventActionEditMessage.

View Source
const ChannelAdminLogEventActionParticipantInviteTypeID = 0xe31c34d8

ChannelAdminLogEventActionParticipantInviteTypeID is TL type id of ChannelAdminLogEventActionParticipantInvite.

View Source
const ChannelAdminLogEventActionParticipantJoinTypeID = 0x183040d3

ChannelAdminLogEventActionParticipantJoinTypeID is TL type id of ChannelAdminLogEventActionParticipantJoin.

View Source
const ChannelAdminLogEventActionParticipantLeaveTypeID = 0xf89777f2

ChannelAdminLogEventActionParticipantLeaveTypeID is TL type id of ChannelAdminLogEventActionParticipantLeave.

View Source
const ChannelAdminLogEventActionParticipantMuteTypeID = 0xf92424d2

ChannelAdminLogEventActionParticipantMuteTypeID is TL type id of ChannelAdminLogEventActionParticipantMute.

View Source
const ChannelAdminLogEventActionParticipantToggleAdminTypeID = 0xd5676710

ChannelAdminLogEventActionParticipantToggleAdminTypeID is TL type id of ChannelAdminLogEventActionParticipantToggleAdmin.

View Source
const ChannelAdminLogEventActionParticipantToggleBanTypeID = 0xe6d83d7e

ChannelAdminLogEventActionParticipantToggleBanTypeID is TL type id of ChannelAdminLogEventActionParticipantToggleBan.

View Source
const ChannelAdminLogEventActionParticipantUnmuteTypeID = 0xe64429c0

ChannelAdminLogEventActionParticipantUnmuteTypeID is TL type id of ChannelAdminLogEventActionParticipantUnmute.

View Source
const ChannelAdminLogEventActionStartGroupCallTypeID = 0x23209745

ChannelAdminLogEventActionStartGroupCallTypeID is TL type id of ChannelAdminLogEventActionStartGroupCall.

View Source
const ChannelAdminLogEventActionStopPollTypeID = 0x8f079643

ChannelAdminLogEventActionStopPollTypeID is TL type id of ChannelAdminLogEventActionStopPoll.

View Source
const ChannelAdminLogEventActionToggleGroupCallSettingTypeID = 0x56d6a247

ChannelAdminLogEventActionToggleGroupCallSettingTypeID is TL type id of ChannelAdminLogEventActionToggleGroupCallSetting.

View Source
const ChannelAdminLogEventActionToggleInvitesTypeID = 0x1b7907ae

ChannelAdminLogEventActionToggleInvitesTypeID is TL type id of ChannelAdminLogEventActionToggleInvites.

View Source
const ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID = 0x5f5c95f1

ChannelAdminLogEventActionTogglePreHistoryHiddenTypeID is TL type id of ChannelAdminLogEventActionTogglePreHistoryHidden.

View Source
const ChannelAdminLogEventActionToggleSignaturesTypeID = 0x26ae0971

ChannelAdminLogEventActionToggleSignaturesTypeID is TL type id of ChannelAdminLogEventActionToggleSignatures.

View Source
const ChannelAdminLogEventActionToggleSlowModeTypeID = 0x53909779

ChannelAdminLogEventActionToggleSlowModeTypeID is TL type id of ChannelAdminLogEventActionToggleSlowMode.

View Source
const ChannelAdminLogEventActionUpdatePinnedTypeID = 0xe9e82c18

ChannelAdminLogEventActionUpdatePinnedTypeID is TL type id of ChannelAdminLogEventActionUpdatePinned.

View Source
const ChannelAdminLogEventTypeID = 0x3b5a3e40

ChannelAdminLogEventTypeID is TL type id of ChannelAdminLogEvent.

View Source
const ChannelAdminLogEventsFilterTypeID = 0xea107ae4

ChannelAdminLogEventsFilterTypeID is TL type id of ChannelAdminLogEventsFilter.

View Source
const ChannelForbiddenTypeID = 0x289da732

ChannelForbiddenTypeID is TL type id of ChannelForbidden.

View Source
const ChannelFullTypeID = 0xef3a6acd

ChannelFullTypeID is TL type id of ChannelFull.

View Source
const ChannelLocationEmptyTypeID = 0xbfb5ad8b

ChannelLocationEmptyTypeID is TL type id of ChannelLocationEmpty.

View Source
const ChannelLocationTypeID = 0x209b82db

ChannelLocationTypeID is TL type id of ChannelLocation.

View Source
const ChannelMessagesFilterEmptyTypeID = 0x94d42ee7

ChannelMessagesFilterEmptyTypeID is TL type id of ChannelMessagesFilterEmpty.

View Source
const ChannelMessagesFilterTypeID = 0xcd77d957

ChannelMessagesFilterTypeID is TL type id of ChannelMessagesFilter.

View Source
const ChannelParticipantAdminTypeID = 0xccbebbaf

ChannelParticipantAdminTypeID is TL type id of ChannelParticipantAdmin.

View Source
const ChannelParticipantBannedTypeID = 0x1c0facaf

ChannelParticipantBannedTypeID is TL type id of ChannelParticipantBanned.

View Source
const ChannelParticipantCreatorTypeID = 0x447dca4b

ChannelParticipantCreatorTypeID is TL type id of ChannelParticipantCreator.

View Source
const ChannelParticipantLeftTypeID = 0xc3c6796b

ChannelParticipantLeftTypeID is TL type id of ChannelParticipantLeft.

View Source
const ChannelParticipantSelfTypeID = 0xa3289a6d

ChannelParticipantSelfTypeID is TL type id of ChannelParticipantSelf.

View Source
const ChannelParticipantTypeID = 0x15ebac1d

ChannelParticipantTypeID is TL type id of ChannelParticipant.

View Source
const ChannelParticipantsAdminsTypeID = 0xb4608969

ChannelParticipantsAdminsTypeID is TL type id of ChannelParticipantsAdmins.

View Source
const ChannelParticipantsBannedTypeID = 0x1427a5e1

ChannelParticipantsBannedTypeID is TL type id of ChannelParticipantsBanned.

View Source
const ChannelParticipantsBotsTypeID = 0xb0d1865b

ChannelParticipantsBotsTypeID is TL type id of ChannelParticipantsBots.

View Source
const ChannelParticipantsContactsTypeID = 0xbb6ae88d

ChannelParticipantsContactsTypeID is TL type id of ChannelParticipantsContacts.

View Source
const ChannelParticipantsKickedTypeID = 0xa3b54985

ChannelParticipantsKickedTypeID is TL type id of ChannelParticipantsKicked.

View Source
const ChannelParticipantsMentionsTypeID = 0xe04b5ceb

ChannelParticipantsMentionsTypeID is TL type id of ChannelParticipantsMentions.

View Source
const ChannelParticipantsRecentTypeID = 0xde3f3c79

ChannelParticipantsRecentTypeID is TL type id of ChannelParticipantsRecent.

View Source
const ChannelParticipantsSearchTypeID = 0x656ac4b

ChannelParticipantsSearchTypeID is TL type id of ChannelParticipantsSearch.

View Source
const ChannelTypeID = 0xd31a961e

ChannelTypeID is TL type id of Channel.

View Source
const ChannelsAdminLogResultsTypeID = 0xed8af74d

ChannelsAdminLogResultsTypeID is TL type id of ChannelsAdminLogResults.

View Source
const ChannelsChannelParticipantTypeID = 0xd0d9b163

ChannelsChannelParticipantTypeID is TL type id of ChannelsChannelParticipant.

View Source
const ChannelsChannelParticipantsNotModifiedTypeID = 0xf0173fe9

ChannelsChannelParticipantsNotModifiedTypeID is TL type id of ChannelsChannelParticipantsNotModified.

View Source
const ChannelsChannelParticipantsTypeID = 0xf56ee2a8

ChannelsChannelParticipantsTypeID is TL type id of ChannelsChannelParticipants.

View Source
const ChannelsCheckUsernameRequestTypeID = 0x10e6bd2c

ChannelsCheckUsernameRequestTypeID is TL type id of ChannelsCheckUsernameRequest.

View Source
const ChannelsCreateChannelRequestTypeID = 0x3d5fb10f

ChannelsCreateChannelRequestTypeID is TL type id of ChannelsCreateChannelRequest.

View Source
const ChannelsDeleteChannelRequestTypeID = 0xc0111fe3

ChannelsDeleteChannelRequestTypeID is TL type id of ChannelsDeleteChannelRequest.

View Source
const ChannelsDeleteHistoryRequestTypeID = 0xaf369d42

ChannelsDeleteHistoryRequestTypeID is TL type id of ChannelsDeleteHistoryRequest.

View Source
const ChannelsDeleteMessagesRequestTypeID = 0x84c1fd4e

ChannelsDeleteMessagesRequestTypeID is TL type id of ChannelsDeleteMessagesRequest.

View Source
const ChannelsDeleteUserHistoryRequestTypeID = 0xd10dd71b

ChannelsDeleteUserHistoryRequestTypeID is TL type id of ChannelsDeleteUserHistoryRequest.

View Source
const ChannelsEditAdminRequestTypeID = 0xd33c8902

ChannelsEditAdminRequestTypeID is TL type id of ChannelsEditAdminRequest.

View Source
const ChannelsEditBannedRequestTypeID = 0x72796912

ChannelsEditBannedRequestTypeID is TL type id of ChannelsEditBannedRequest.

View Source
const ChannelsEditCreatorRequestTypeID = 0x8f38cd1f

ChannelsEditCreatorRequestTypeID is TL type id of ChannelsEditCreatorRequest.

View Source
const ChannelsEditLocationRequestTypeID = 0x58e63f6d

ChannelsEditLocationRequestTypeID is TL type id of ChannelsEditLocationRequest.

View Source
const ChannelsEditPhotoRequestTypeID = 0xf12e57c9

ChannelsEditPhotoRequestTypeID is TL type id of ChannelsEditPhotoRequest.

View Source
const ChannelsEditTitleRequestTypeID = 0x566decd0

ChannelsEditTitleRequestTypeID is TL type id of ChannelsEditTitleRequest.

View Source
const ChannelsExportMessageLinkRequestTypeID = 0xe63fadeb

ChannelsExportMessageLinkRequestTypeID is TL type id of ChannelsExportMessageLinkRequest.

View Source
const ChannelsGetAdminLogRequestTypeID = 0x33ddf480

ChannelsGetAdminLogRequestTypeID is TL type id of ChannelsGetAdminLogRequest.

View Source
const ChannelsGetAdminedPublicChannelsRequestTypeID = 0xf8b036af

ChannelsGetAdminedPublicChannelsRequestTypeID is TL type id of ChannelsGetAdminedPublicChannelsRequest.

View Source
const ChannelsGetChannelsRequestTypeID = 0xa7f6bbb

ChannelsGetChannelsRequestTypeID is TL type id of ChannelsGetChannelsRequest.

View Source
const ChannelsGetFullChannelRequestTypeID = 0x8736a09

ChannelsGetFullChannelRequestTypeID is TL type id of ChannelsGetFullChannelRequest.

View Source
const ChannelsGetGroupsForDiscussionRequestTypeID = 0xf5dad378

ChannelsGetGroupsForDiscussionRequestTypeID is TL type id of ChannelsGetGroupsForDiscussionRequest.

View Source
const ChannelsGetInactiveChannelsRequestTypeID = 0x11e831ee

ChannelsGetInactiveChannelsRequestTypeID is TL type id of ChannelsGetInactiveChannelsRequest.

View Source
const ChannelsGetLeftChannelsRequestTypeID = 0x8341ecc0

ChannelsGetLeftChannelsRequestTypeID is TL type id of ChannelsGetLeftChannelsRequest.

View Source
const ChannelsGetMessagesRequestTypeID = 0xad8c9a23

ChannelsGetMessagesRequestTypeID is TL type id of ChannelsGetMessagesRequest.

View Source
const ChannelsGetParticipantRequestTypeID = 0x546dd7a6

ChannelsGetParticipantRequestTypeID is TL type id of ChannelsGetParticipantRequest.

View Source
const ChannelsGetParticipantsRequestTypeID = 0x123e05e9

ChannelsGetParticipantsRequestTypeID is TL type id of ChannelsGetParticipantsRequest.

View Source
const ChannelsInviteToChannelRequestTypeID = 0x199f3a6c

ChannelsInviteToChannelRequestTypeID is TL type id of ChannelsInviteToChannelRequest.

View Source
const ChannelsJoinChannelRequestTypeID = 0x24b524c5

ChannelsJoinChannelRequestTypeID is TL type id of ChannelsJoinChannelRequest.

View Source
const ChannelsLeaveChannelRequestTypeID = 0xf836aa95

ChannelsLeaveChannelRequestTypeID is TL type id of ChannelsLeaveChannelRequest.

View Source
const ChannelsReadHistoryRequestTypeID = 0xcc104937

ChannelsReadHistoryRequestTypeID is TL type id of ChannelsReadHistoryRequest.

View Source
const ChannelsReadMessageContentsRequestTypeID = 0xeab5dc38

ChannelsReadMessageContentsRequestTypeID is TL type id of ChannelsReadMessageContentsRequest.

View Source
const ChannelsReportSpamRequestTypeID = 0xfe087810

ChannelsReportSpamRequestTypeID is TL type id of ChannelsReportSpamRequest.

View Source
const ChannelsSetDiscussionGroupRequestTypeID = 0x40582bb2

ChannelsSetDiscussionGroupRequestTypeID is TL type id of ChannelsSetDiscussionGroupRequest.

View Source
const ChannelsSetStickersRequestTypeID = 0xea8ca4f9

ChannelsSetStickersRequestTypeID is TL type id of ChannelsSetStickersRequest.

View Source
const ChannelsTogglePreHistoryHiddenRequestTypeID = 0xeabbb94c

ChannelsTogglePreHistoryHiddenRequestTypeID is TL type id of ChannelsTogglePreHistoryHiddenRequest.

View Source
const ChannelsToggleSignaturesRequestTypeID = 0x1f69b606

ChannelsToggleSignaturesRequestTypeID is TL type id of ChannelsToggleSignaturesRequest.

View Source
const ChannelsToggleSlowModeRequestTypeID = 0xedd49ef0

ChannelsToggleSlowModeRequestTypeID is TL type id of ChannelsToggleSlowModeRequest.

View Source
const ChannelsUpdateUsernameRequestTypeID = 0x3514b3de

ChannelsUpdateUsernameRequestTypeID is TL type id of ChannelsUpdateUsernameRequest.

View Source
const ChatAdminRightsTypeID = 0x5fb224d5

ChatAdminRightsTypeID is TL type id of ChatAdminRights.

View Source
const ChatBannedRightsTypeID = 0x9f120418

ChatBannedRightsTypeID is TL type id of ChatBannedRights.

View Source
const ChatEmptyTypeID = 0x9ba2d800

ChatEmptyTypeID is TL type id of ChatEmpty.

View Source
const ChatForbiddenTypeID = 0x7328bdb

ChatForbiddenTypeID is TL type id of ChatForbidden.

View Source
const ChatFullTypeID = 0xdc8c181

ChatFullTypeID is TL type id of ChatFull.

View Source
const ChatInviteAlreadyTypeID = 0x5a686d7c

ChatInviteAlreadyTypeID is TL type id of ChatInviteAlready.

View Source
const ChatInviteEmptyTypeID = 0x69df3769

ChatInviteEmptyTypeID is TL type id of ChatInviteEmpty.

View Source
const ChatInviteExportedTypeID = 0xfc2e05bc

ChatInviteExportedTypeID is TL type id of ChatInviteExported.

View Source
const ChatInvitePeekTypeID = 0x61695cb0

ChatInvitePeekTypeID is TL type id of ChatInvitePeek.

View Source
const ChatInviteTypeID = 0xdfc2f58e

ChatInviteTypeID is TL type id of ChatInvite.

View Source
const ChatOnlinesTypeID = 0xf041e250

ChatOnlinesTypeID is TL type id of ChatOnlines.

View Source
const ChatParticipantAdminTypeID = 0xe2d6e436

ChatParticipantAdminTypeID is TL type id of ChatParticipantAdmin.

View Source
const ChatParticipantCreatorTypeID = 0xda13538a

ChatParticipantCreatorTypeID is TL type id of ChatParticipantCreator.

View Source
const ChatParticipantTypeID = 0xc8d7493e

ChatParticipantTypeID is TL type id of ChatParticipant.

View Source
const ChatParticipantsForbiddenTypeID = 0xfc900c2b

ChatParticipantsForbiddenTypeID is TL type id of ChatParticipantsForbidden.

View Source
const ChatParticipantsTypeID = 0x3f460fed

ChatParticipantsTypeID is TL type id of ChatParticipants.

View Source
const ChatPhotoEmptyTypeID = 0x37c1011c

ChatPhotoEmptyTypeID is TL type id of ChatPhotoEmpty.

View Source
const ChatPhotoTypeID = 0xd20b9f3c

ChatPhotoTypeID is TL type id of ChatPhoto.

View Source
const ChatTypeID = 0x3bda1bde

ChatTypeID is TL type id of Chat.

View Source
const CodeSettingsTypeID = 0xdebebe83

CodeSettingsTypeID is TL type id of CodeSettings.

View Source
const ConfigTypeID = 0x330b4067

ConfigTypeID is TL type id of Config.

View Source
const ContactStatusTypeID = 0xd3680c61

ContactStatusTypeID is TL type id of ContactStatus.

View Source
const ContactTypeID = 0xf911c994

ContactTypeID is TL type id of Contact.

View Source
const ContactsAcceptContactRequestTypeID = 0xf831a20f

ContactsAcceptContactRequestTypeID is TL type id of ContactsAcceptContactRequest.

View Source
const ContactsAddContactRequestTypeID = 0xe8f463d0

ContactsAddContactRequestTypeID is TL type id of ContactsAddContactRequest.

View Source
const ContactsBlockFromRepliesRequestTypeID = 0x29a8962c

ContactsBlockFromRepliesRequestTypeID is TL type id of ContactsBlockFromRepliesRequest.

View Source
const ContactsBlockRequestTypeID = 0x68cc1411

ContactsBlockRequestTypeID is TL type id of ContactsBlockRequest.

View Source
const ContactsBlockedSliceTypeID = 0xe1664194

ContactsBlockedSliceTypeID is TL type id of ContactsBlockedSlice.

View Source
const ContactsBlockedTypeID = 0xade1591

ContactsBlockedTypeID is TL type id of ContactsBlocked.

View Source
const ContactsContactsNotModifiedTypeID = 0xb74ba9d2

ContactsContactsNotModifiedTypeID is TL type id of ContactsContactsNotModified.

View Source
const ContactsContactsTypeID = 0xeae87e42

ContactsContactsTypeID is TL type id of ContactsContacts.

View Source
const ContactsDeleteByPhonesRequestTypeID = 0x1013fd9e

ContactsDeleteByPhonesRequestTypeID is TL type id of ContactsDeleteByPhonesRequest.

View Source
const ContactsDeleteContactsRequestTypeID = 0x96a0e00

ContactsDeleteContactsRequestTypeID is TL type id of ContactsDeleteContactsRequest.

View Source
const ContactsFoundTypeID = 0xb3134d9d

ContactsFoundTypeID is TL type id of ContactsFound.

View Source
const ContactsGetBlockedRequestTypeID = 0xf57c350f

ContactsGetBlockedRequestTypeID is TL type id of ContactsGetBlockedRequest.

View Source
const ContactsGetContactIDsRequestTypeID = 0x2caa4a42

ContactsGetContactIDsRequestTypeID is TL type id of ContactsGetContactIDsRequest.

View Source
const ContactsGetContactsRequestTypeID = 0xc023849f

ContactsGetContactsRequestTypeID is TL type id of ContactsGetContactsRequest.

View Source
const ContactsGetLocatedRequestTypeID = 0xd348bc44

ContactsGetLocatedRequestTypeID is TL type id of ContactsGetLocatedRequest.

View Source
const ContactsGetSavedRequestTypeID = 0x82f1e39f

ContactsGetSavedRequestTypeID is TL type id of ContactsGetSavedRequest.

View Source
const ContactsGetStatusesRequestTypeID = 0xc4a353ee

ContactsGetStatusesRequestTypeID is TL type id of ContactsGetStatusesRequest.

View Source
const ContactsGetTopPeersRequestTypeID = 0xd4982db5

ContactsGetTopPeersRequestTypeID is TL type id of ContactsGetTopPeersRequest.

View Source
const ContactsImportContactsRequestTypeID = 0x2c800be5

ContactsImportContactsRequestTypeID is TL type id of ContactsImportContactsRequest.

View Source
const ContactsImportedContactsTypeID = 0x77d01c3b

ContactsImportedContactsTypeID is TL type id of ContactsImportedContacts.

View Source
const ContactsResetSavedRequestTypeID = 0x879537f1

ContactsResetSavedRequestTypeID is TL type id of ContactsResetSavedRequest.

View Source
const ContactsResetTopPeerRatingRequestTypeID = 0x1ae373ac

ContactsResetTopPeerRatingRequestTypeID is TL type id of ContactsResetTopPeerRatingRequest.

View Source
const ContactsResolveUsernameRequestTypeID = 0xf93ccba3

ContactsResolveUsernameRequestTypeID is TL type id of ContactsResolveUsernameRequest.

View Source
const ContactsResolvedPeerTypeID = 0x7f077ad9

ContactsResolvedPeerTypeID is TL type id of ContactsResolvedPeer.

View Source
const ContactsSearchRequestTypeID = 0x11f812d8

ContactsSearchRequestTypeID is TL type id of ContactsSearchRequest.

View Source
const ContactsToggleTopPeersRequestTypeID = 0x8514bdda

ContactsToggleTopPeersRequestTypeID is TL type id of ContactsToggleTopPeersRequest.

View Source
const ContactsTopPeersDisabledTypeID = 0xb52c939d

ContactsTopPeersDisabledTypeID is TL type id of ContactsTopPeersDisabled.

View Source
const ContactsTopPeersNotModifiedTypeID = 0xde266ef5

ContactsTopPeersNotModifiedTypeID is TL type id of ContactsTopPeersNotModified.

View Source
const ContactsTopPeersTypeID = 0x70b772a8

ContactsTopPeersTypeID is TL type id of ContactsTopPeers.

View Source
const ContactsUnblockRequestTypeID = 0xbea65d50

ContactsUnblockRequestTypeID is TL type id of ContactsUnblockRequest.

View Source
const DataJSONTypeID = 0x7d748d04

DataJSONTypeID is TL type id of DataJSON.

View Source
const DcOptionTypeID = 0x18b7a10d

DcOptionTypeID is TL type id of DcOption.

View Source
const DialogFilterSuggestedTypeID = 0x77744d4a

DialogFilterSuggestedTypeID is TL type id of DialogFilterSuggested.

View Source
const DialogFilterTypeID = 0x7438f7e8

DialogFilterTypeID is TL type id of DialogFilter.

View Source
const DialogFolderTypeID = 0x71bd134c

DialogFolderTypeID is TL type id of DialogFolder.

View Source
const DialogPeerFolderTypeID = 0x514519e2

DialogPeerFolderTypeID is TL type id of DialogPeerFolder.

View Source
const DialogPeerTypeID = 0xe56dbf05

DialogPeerTypeID is TL type id of DialogPeer.

View Source
const DialogTypeID = 0x2c171f72

DialogTypeID is TL type id of Dialog.

View Source
const DocumentAttributeAnimatedTypeID = 0x11b58939

DocumentAttributeAnimatedTypeID is TL type id of DocumentAttributeAnimated.

View Source
const DocumentAttributeAudioTypeID = 0x9852f9c6

DocumentAttributeAudioTypeID is TL type id of DocumentAttributeAudio.

View Source
const DocumentAttributeFilenameTypeID = 0x15590068

DocumentAttributeFilenameTypeID is TL type id of DocumentAttributeFilename.

View Source
const DocumentAttributeHasStickersTypeID = 0x9801d2f7

DocumentAttributeHasStickersTypeID is TL type id of DocumentAttributeHasStickers.

View Source
const DocumentAttributeImageSizeTypeID = 0x6c37c15c

DocumentAttributeImageSizeTypeID is TL type id of DocumentAttributeImageSize.

View Source
const DocumentAttributeStickerTypeID = 0x6319d612

DocumentAttributeStickerTypeID is TL type id of DocumentAttributeSticker.

View Source
const DocumentAttributeVideoTypeID = 0xef02ce6

DocumentAttributeVideoTypeID is TL type id of DocumentAttributeVideo.

View Source
const DocumentEmptyTypeID = 0x36f8c871

DocumentEmptyTypeID is TL type id of DocumentEmpty.

View Source
const DocumentTypeID = 0x1e87342b

DocumentTypeID is TL type id of Document.

View Source
const DraftMessageEmptyTypeID = 0x1b0c841a

DraftMessageEmptyTypeID is TL type id of DraftMessageEmpty.

View Source
const DraftMessageTypeID = 0xfd8e711f

DraftMessageTypeID is TL type id of DraftMessage.

View Source
const EmojiKeywordDeletedTypeID = 0x236df622

EmojiKeywordDeletedTypeID is TL type id of EmojiKeywordDeleted.

View Source
const EmojiKeywordTypeID = 0xd5b3b9f9

EmojiKeywordTypeID is TL type id of EmojiKeyword.

View Source
const EmojiKeywordsDifferenceTypeID = 0x5cc761bd

EmojiKeywordsDifferenceTypeID is TL type id of EmojiKeywordsDifference.

View Source
const EmojiLanguageTypeID = 0xb3fb5361

EmojiLanguageTypeID is TL type id of EmojiLanguage.

View Source
const EmojiURLTypeID = 0xa575739d

EmojiURLTypeID is TL type id of EmojiURL.

View Source
const EncryptedChatDiscardedTypeID = 0x13d6dd27

EncryptedChatDiscardedTypeID is TL type id of EncryptedChatDiscarded.

View Source
const EncryptedChatEmptyTypeID = 0xab7ec0a0

EncryptedChatEmptyTypeID is TL type id of EncryptedChatEmpty.

View Source
const EncryptedChatRequestedTypeID = 0x62718a82

EncryptedChatRequestedTypeID is TL type id of EncryptedChatRequested.

View Source
const EncryptedChatTypeID = 0xfa56ce36

EncryptedChatTypeID is TL type id of EncryptedChat.

View Source
const EncryptedChatWaitingTypeID = 0x3bf703dc

EncryptedChatWaitingTypeID is TL type id of EncryptedChatWaiting.

View Source
const EncryptedFileEmptyTypeID = 0xc21f497e

EncryptedFileEmptyTypeID is TL type id of EncryptedFileEmpty.

View Source
const EncryptedFileTypeID = 0x4a70994c

EncryptedFileTypeID is TL type id of EncryptedFile.

View Source
const EncryptedMessageServiceTypeID = 0x23734b06

EncryptedMessageServiceTypeID is TL type id of EncryptedMessageService.

View Source
const EncryptedMessageTypeID = 0xed18c118

EncryptedMessageTypeID is TL type id of EncryptedMessage.

View Source
const ErrorTypeID = 0xc4b9f9bb

ErrorTypeID is TL type id of Error.

View Source
const ExportedMessageLinkTypeID = 0x5dab1af4

ExportedMessageLinkTypeID is TL type id of ExportedMessageLink.

View Source
const FileHashTypeID = 0x6242c773

FileHashTypeID is TL type id of FileHash.

View Source
const FileLocationToBeDeprecatedTypeID = 0xbc7fc6cd

FileLocationToBeDeprecatedTypeID is TL type id of FileLocationToBeDeprecated.

View Source
const FolderPeerTypeID = 0xe9baa668

FolderPeerTypeID is TL type id of FolderPeer.

View Source
const FolderTypeID = 0xff544e65

FolderTypeID is TL type id of Folder.

View Source
const FoldersDeleteFolderRequestTypeID = 0x1c295881

FoldersDeleteFolderRequestTypeID is TL type id of FoldersDeleteFolderRequest.

View Source
const FoldersEditPeerFoldersRequestTypeID = 0x6847d0ab

FoldersEditPeerFoldersRequestTypeID is TL type id of FoldersEditPeerFoldersRequest.

View Source
const GameTypeID = 0xbdf9653b

GameTypeID is TL type id of Game.

View Source
const GeoPointEmptyTypeID = 0x1117dd5f

GeoPointEmptyTypeID is TL type id of GeoPointEmpty.

View Source
const GeoPointTypeID = 0xb2a2f663

GeoPointTypeID is TL type id of GeoPoint.

View Source
const GlobalPrivacySettingsTypeID = 0xbea2f424

GlobalPrivacySettingsTypeID is TL type id of GlobalPrivacySettings.

View Source
const GroupCallDiscardedTypeID = 0x7780bcb4

GroupCallDiscardedTypeID is TL type id of GroupCallDiscarded.

View Source
const GroupCallParticipantTypeID = 0x56b087c9

GroupCallParticipantTypeID is TL type id of GroupCallParticipant.

View Source
const GroupCallTypeID = 0x55903081

GroupCallTypeID is TL type id of GroupCall.

View Source
const HelpAcceptTermsOfServiceRequestTypeID = 0xee72f79a

HelpAcceptTermsOfServiceRequestTypeID is TL type id of HelpAcceptTermsOfServiceRequest.

View Source
const HelpAppUpdateTypeID = 0x1da7158f

HelpAppUpdateTypeID is TL type id of HelpAppUpdate.

View Source
const HelpCountriesListNotModifiedTypeID = 0x93cc1f32

HelpCountriesListNotModifiedTypeID is TL type id of HelpCountriesListNotModified.

View Source
const HelpCountriesListTypeID = 0x87d0759e

HelpCountriesListTypeID is TL type id of HelpCountriesList.

View Source
const HelpCountryCodeTypeID = 0x4203c5ef

HelpCountryCodeTypeID is TL type id of HelpCountryCode.

View Source
const HelpCountryTypeID = 0xc3878e23

HelpCountryTypeID is TL type id of HelpCountry.

View Source
const HelpDeepLinkInfoEmptyTypeID = 0x66afa166

HelpDeepLinkInfoEmptyTypeID is TL type id of HelpDeepLinkInfoEmpty.

View Source
const HelpDeepLinkInfoTypeID = 0x6a4ee832

HelpDeepLinkInfoTypeID is TL type id of HelpDeepLinkInfo.

View Source
const HelpDismissSuggestionRequestTypeID = 0x77fa99f

HelpDismissSuggestionRequestTypeID is TL type id of HelpDismissSuggestionRequest.

View Source
const HelpEditUserInfoRequestTypeID = 0x66b91b70

HelpEditUserInfoRequestTypeID is TL type id of HelpEditUserInfoRequest.

View Source
const HelpGetAppChangelogRequestTypeID = 0x9010ef6f

HelpGetAppChangelogRequestTypeID is TL type id of HelpGetAppChangelogRequest.

View Source
const HelpGetAppConfigRequestTypeID = 0x98914110

HelpGetAppConfigRequestTypeID is TL type id of HelpGetAppConfigRequest.

View Source
const HelpGetAppUpdateRequestTypeID = 0x522d5a7d

HelpGetAppUpdateRequestTypeID is TL type id of HelpGetAppUpdateRequest.

View Source
const HelpGetCdnConfigRequestTypeID = 0x52029342

HelpGetCdnConfigRequestTypeID is TL type id of HelpGetCdnConfigRequest.

View Source
const HelpGetConfigRequestTypeID = 0xc4f9186b

HelpGetConfigRequestTypeID is TL type id of HelpGetConfigRequest.

View Source
const HelpGetCountriesListRequestTypeID = 0x735787a8

HelpGetCountriesListRequestTypeID is TL type id of HelpGetCountriesListRequest.

View Source
const HelpGetDeepLinkInfoRequestTypeID = 0x3fedc75f

HelpGetDeepLinkInfoRequestTypeID is TL type id of HelpGetDeepLinkInfoRequest.

View Source
const HelpGetInviteTextRequestTypeID = 0x4d392343

HelpGetInviteTextRequestTypeID is TL type id of HelpGetInviteTextRequest.

View Source
const HelpGetNearestDcRequestTypeID = 0x1fb33026

HelpGetNearestDcRequestTypeID is TL type id of HelpGetNearestDcRequest.

View Source
const HelpGetPassportConfigRequestTypeID = 0xc661ad08

HelpGetPassportConfigRequestTypeID is TL type id of HelpGetPassportConfigRequest.

View Source
const HelpGetPromoDataRequestTypeID = 0xc0977421

HelpGetPromoDataRequestTypeID is TL type id of HelpGetPromoDataRequest.

View Source
const HelpGetRecentMeUrlsRequestTypeID = 0x3dc0f114

HelpGetRecentMeUrlsRequestTypeID is TL type id of HelpGetRecentMeUrlsRequest.

View Source
const HelpGetSupportNameRequestTypeID = 0xd360e72c

HelpGetSupportNameRequestTypeID is TL type id of HelpGetSupportNameRequest.

View Source
const HelpGetSupportRequestTypeID = 0x9cdf08cd

HelpGetSupportRequestTypeID is TL type id of HelpGetSupportRequest.

View Source
const HelpGetTermsOfServiceUpdateRequestTypeID = 0x2ca51fd1

HelpGetTermsOfServiceUpdateRequestTypeID is TL type id of HelpGetTermsOfServiceUpdateRequest.

View Source
const HelpGetUserInfoRequestTypeID = 0x38a08d3

HelpGetUserInfoRequestTypeID is TL type id of HelpGetUserInfoRequest.

View Source
const HelpHidePromoDataRequestTypeID = 0x1e251c95

HelpHidePromoDataRequestTypeID is TL type id of HelpHidePromoDataRequest.

View Source
const HelpInviteTextTypeID = 0x18cb9f78

HelpInviteTextTypeID is TL type id of HelpInviteText.

View Source
const HelpNoAppUpdateTypeID = 0xc45a6536

HelpNoAppUpdateTypeID is TL type id of HelpNoAppUpdate.

View Source
const HelpPassportConfigNotModifiedTypeID = 0xbfb9f457

HelpPassportConfigNotModifiedTypeID is TL type id of HelpPassportConfigNotModified.

View Source
const HelpPassportConfigTypeID = 0xa098d6af

HelpPassportConfigTypeID is TL type id of HelpPassportConfig.

View Source
const HelpPromoDataEmptyTypeID = 0x98f6ac75

HelpPromoDataEmptyTypeID is TL type id of HelpPromoDataEmpty.

View Source
const HelpPromoDataTypeID = 0x8c39793f

HelpPromoDataTypeID is TL type id of HelpPromoData.

View Source
const HelpRecentMeUrlsTypeID = 0xe0310d7

HelpRecentMeUrlsTypeID is TL type id of HelpRecentMeUrls.

View Source
const HelpSaveAppLogRequestTypeID = 0x6f02f748

HelpSaveAppLogRequestTypeID is TL type id of HelpSaveAppLogRequest.

View Source
const HelpSetBotUpdatesStatusRequestTypeID = 0xec22cfcd

HelpSetBotUpdatesStatusRequestTypeID is TL type id of HelpSetBotUpdatesStatusRequest.

View Source
const HelpSupportNameTypeID = 0x8c05f1c9

HelpSupportNameTypeID is TL type id of HelpSupportName.

View Source
const HelpSupportTypeID = 0x17c6b5f6

HelpSupportTypeID is TL type id of HelpSupport.

View Source
const HelpTermsOfServiceTypeID = 0x780a0310

HelpTermsOfServiceTypeID is TL type id of HelpTermsOfService.

View Source
const HelpTermsOfServiceUpdateEmptyTypeID = 0xe3309f7f

HelpTermsOfServiceUpdateEmptyTypeID is TL type id of HelpTermsOfServiceUpdateEmpty.

View Source
const HelpTermsOfServiceUpdateTypeID = 0x28ecf961

HelpTermsOfServiceUpdateTypeID is TL type id of HelpTermsOfServiceUpdate.

View Source
const HelpUserInfoEmptyTypeID = 0xf3ae2eed

HelpUserInfoEmptyTypeID is TL type id of HelpUserInfoEmpty.

View Source
const HelpUserInfoTypeID = 0x1eb3758

HelpUserInfoTypeID is TL type id of HelpUserInfo.

View Source
const HighScoreTypeID = 0x58fffcd0

HighScoreTypeID is TL type id of HighScore.

View Source
const ImportedContactTypeID = 0xd0028438

ImportedContactTypeID is TL type id of ImportedContact.

View Source
const InlineBotSwitchPMTypeID = 0x3c20629f

InlineBotSwitchPMTypeID is TL type id of InlineBotSwitchPM.

View Source
const InlineQueryPeerTypeBroadcastTypeID = 0x6334ee9a

InlineQueryPeerTypeBroadcastTypeID is TL type id of InlineQueryPeerTypeBroadcast.

View Source
const InlineQueryPeerTypeChatTypeID = 0xd766c50a

InlineQueryPeerTypeChatTypeID is TL type id of InlineQueryPeerTypeChat.

View Source
const InlineQueryPeerTypeMegagroupTypeID = 0x5ec4be43

InlineQueryPeerTypeMegagroupTypeID is TL type id of InlineQueryPeerTypeMegagroup.

View Source
const InlineQueryPeerTypePMTypeID = 0x833c0fac

InlineQueryPeerTypePMTypeID is TL type id of InlineQueryPeerTypePM.

View Source
const InlineQueryPeerTypeSameBotPMTypeID = 0x3081ed9d

InlineQueryPeerTypeSameBotPMTypeID is TL type id of InlineQueryPeerTypeSameBotPM.

View Source
const InputAppEventTypeID = 0x1d1b1245

InputAppEventTypeID is TL type id of InputAppEvent.

View Source
const InputBotInlineMessageGameTypeID = 0x4b425864

InputBotInlineMessageGameTypeID is TL type id of InputBotInlineMessageGame.

View Source
const InputBotInlineMessageIDTypeID = 0x890c3d89

InputBotInlineMessageIDTypeID is TL type id of InputBotInlineMessageID.

View Source
const InputBotInlineMessageMediaAutoTypeID = 0x3380c786

InputBotInlineMessageMediaAutoTypeID is TL type id of InputBotInlineMessageMediaAuto.

View Source
const InputBotInlineMessageMediaContactTypeID = 0xa6edbffd

InputBotInlineMessageMediaContactTypeID is TL type id of InputBotInlineMessageMediaContact.

View Source
const InputBotInlineMessageMediaGeoTypeID = 0x96929a85

InputBotInlineMessageMediaGeoTypeID is TL type id of InputBotInlineMessageMediaGeo.

View Source
const InputBotInlineMessageMediaVenueTypeID = 0x417bbf11

InputBotInlineMessageMediaVenueTypeID is TL type id of InputBotInlineMessageMediaVenue.

View Source
const InputBotInlineMessageTextTypeID = 0x3dcd7a87

InputBotInlineMessageTextTypeID is TL type id of InputBotInlineMessageText.

View Source
const InputBotInlineResultDocumentTypeID = 0xfff8fdc4

InputBotInlineResultDocumentTypeID is TL type id of InputBotInlineResultDocument.

View Source
const InputBotInlineResultGameTypeID = 0x4fa417f2

InputBotInlineResultGameTypeID is TL type id of InputBotInlineResultGame.

View Source
const InputBotInlineResultPhotoTypeID = 0xa8d864a7

InputBotInlineResultPhotoTypeID is TL type id of InputBotInlineResultPhoto.

View Source
const InputBotInlineResultTypeID = 0x88bf9319

InputBotInlineResultTypeID is TL type id of InputBotInlineResult.

View Source
const InputChannelEmptyTypeID = 0xee8c1e86

InputChannelEmptyTypeID is TL type id of InputChannelEmpty.

View Source
const InputChannelFromMessageTypeID = 0x2a286531

InputChannelFromMessageTypeID is TL type id of InputChannelFromMessage.

View Source
const InputChannelTypeID = 0xafeb712e

InputChannelTypeID is TL type id of InputChannel.

View Source
const InputChatPhotoEmptyTypeID = 0x1ca48f57

InputChatPhotoEmptyTypeID is TL type id of InputChatPhotoEmpty.

View Source
const InputChatPhotoTypeID = 0x8953ad37

InputChatPhotoTypeID is TL type id of InputChatPhoto.

View Source
const InputChatUploadedPhotoTypeID = 0xc642724e

InputChatUploadedPhotoTypeID is TL type id of InputChatUploadedPhoto.

View Source
const InputCheckPasswordEmptyTypeID = 0x9880f658

InputCheckPasswordEmptyTypeID is TL type id of InputCheckPasswordEmpty.

View Source
const InputCheckPasswordSRPTypeID = 0xd27ff082

InputCheckPasswordSRPTypeID is TL type id of InputCheckPasswordSRP.

View Source
const InputClientProxyTypeID = 0x75588b3f

InputClientProxyTypeID is TL type id of InputClientProxy.

View Source
const InputDialogPeerFolderTypeID = 0x64600527

InputDialogPeerFolderTypeID is TL type id of InputDialogPeerFolder.

View Source
const InputDialogPeerTypeID = 0xfcaafeb7

InputDialogPeerTypeID is TL type id of InputDialogPeer.

View Source
const InputDocumentEmptyTypeID = 0x72f0eaae

InputDocumentEmptyTypeID is TL type id of InputDocumentEmpty.

View Source
const InputDocumentFileLocationTypeID = 0xbad07584

InputDocumentFileLocationTypeID is TL type id of InputDocumentFileLocation.

View Source
const InputDocumentTypeID = 0x1abfb575

InputDocumentTypeID is TL type id of InputDocument.

View Source
const InputEncryptedChatTypeID = 0xf141b5e1

InputEncryptedChatTypeID is TL type id of InputEncryptedChat.

View Source
const InputEncryptedFileBigUploadedTypeID = 0x2dc173c8

InputEncryptedFileBigUploadedTypeID is TL type id of InputEncryptedFileBigUploaded.

View Source
const InputEncryptedFileEmptyTypeID = 0x1837c364

InputEncryptedFileEmptyTypeID is TL type id of InputEncryptedFileEmpty.

View Source
const InputEncryptedFileLocationTypeID = 0xf5235d55

InputEncryptedFileLocationTypeID is TL type id of InputEncryptedFileLocation.

View Source
const InputEncryptedFileTypeID = 0x5a17b5e5

InputEncryptedFileTypeID is TL type id of InputEncryptedFile.

View Source
const InputEncryptedFileUploadedTypeID = 0x64bd0306

InputEncryptedFileUploadedTypeID is TL type id of InputEncryptedFileUploaded.

View Source
const InputFileBigTypeID = 0xfa4f0bb5

InputFileBigTypeID is TL type id of InputFileBig.

View Source
const InputFileLocationTypeID = 0xdfdaabe1

InputFileLocationTypeID is TL type id of InputFileLocation.

View Source
const InputFileTypeID = 0xf52ff27f

InputFileTypeID is TL type id of InputFile.

View Source
const InputFolderPeerTypeID = 0xfbd2c296

InputFolderPeerTypeID is TL type id of InputFolderPeer.

View Source
const InputGameIDTypeID = 0x32c3e77

InputGameIDTypeID is TL type id of InputGameID.

View Source
const InputGameShortNameTypeID = 0xc331e80a

InputGameShortNameTypeID is TL type id of InputGameShortName.

View Source
const InputGeoPointEmptyTypeID = 0xe4c123d6

InputGeoPointEmptyTypeID is TL type id of InputGeoPointEmpty.

View Source
const InputGeoPointTypeID = 0x48222faf

InputGeoPointTypeID is TL type id of InputGeoPoint.

View Source
const InputGroupCallTypeID = 0xd8aa840f

InputGroupCallTypeID is TL type id of InputGroupCall.

View Source
const InputKeyboardButtonUrlAuthTypeID = 0xd02e7fd4

InputKeyboardButtonUrlAuthTypeID is TL type id of InputKeyboardButtonUrlAuth.

View Source
const InputMediaContactTypeID = 0xf8ab7dfb

InputMediaContactTypeID is TL type id of InputMediaContact.

View Source
const InputMediaDiceTypeID = 0xe66fbf7b

InputMediaDiceTypeID is TL type id of InputMediaDice.

View Source
const InputMediaDocumentExternalTypeID = 0xfb52dc99

InputMediaDocumentExternalTypeID is TL type id of InputMediaDocumentExternal.

View Source
const InputMediaDocumentTypeID = 0x33473058

InputMediaDocumentTypeID is TL type id of InputMediaDocument.

View Source
const InputMediaEmptyTypeID = 0x9664f57f

InputMediaEmptyTypeID is TL type id of InputMediaEmpty.

View Source
const InputMediaGameTypeID = 0xd33f43f3

InputMediaGameTypeID is TL type id of InputMediaGame.

View Source
const InputMediaGeoLiveTypeID = 0x971fa843

InputMediaGeoLiveTypeID is TL type id of InputMediaGeoLive.

View Source
const InputMediaGeoPointTypeID = 0xf9c44144

InputMediaGeoPointTypeID is TL type id of InputMediaGeoPoint.

View Source
const InputMediaInvoiceTypeID = 0xf4e096c3

InputMediaInvoiceTypeID is TL type id of InputMediaInvoice.

View Source
const InputMediaPhotoExternalTypeID = 0xe5bbfe1a

InputMediaPhotoExternalTypeID is TL type id of InputMediaPhotoExternal.

View Source
const InputMediaPhotoTypeID = 0xb3ba0635

InputMediaPhotoTypeID is TL type id of InputMediaPhoto.

View Source
const InputMediaPollTypeID = 0xf94e5f1

InputMediaPollTypeID is TL type id of InputMediaPoll.

View Source
const InputMediaUploadedDocumentTypeID = 0x5b38c6c1

InputMediaUploadedDocumentTypeID is TL type id of InputMediaUploadedDocument.

View Source
const InputMediaUploadedPhotoTypeID = 0x1e287d04

InputMediaUploadedPhotoTypeID is TL type id of InputMediaUploadedPhoto.

View Source
const InputMediaVenueTypeID = 0xc13d1c11

InputMediaVenueTypeID is TL type id of InputMediaVenue.

View Source
const InputMessageCallbackQueryTypeID = 0xacfa1a7e

InputMessageCallbackQueryTypeID is TL type id of InputMessageCallbackQuery.

View Source
const InputMessageEntityMentionNameTypeID = 0x208e68c9

InputMessageEntityMentionNameTypeID is TL type id of InputMessageEntityMentionName.

View Source
const InputMessageIDTypeID = 0xa676a322

InputMessageIDTypeID is TL type id of InputMessageID.

View Source
const InputMessagePinnedTypeID = 0x86872538

InputMessagePinnedTypeID is TL type id of InputMessagePinned.

View Source
const InputMessageReplyToTypeID = 0xbad88395

InputMessageReplyToTypeID is TL type id of InputMessageReplyTo.

View Source
const InputMessagesFilterChatPhotosTypeID = 0x3a20ecb8

InputMessagesFilterChatPhotosTypeID is TL type id of InputMessagesFilterChatPhotos.

View Source
const InputMessagesFilterContactsTypeID = 0xe062db83

InputMessagesFilterContactsTypeID is TL type id of InputMessagesFilterContacts.

View Source
const InputMessagesFilterDocumentTypeID = 0x9eddf188

InputMessagesFilterDocumentTypeID is TL type id of InputMessagesFilterDocument.

View Source
const InputMessagesFilterEmptyTypeID = 0x57e2f66c

InputMessagesFilterEmptyTypeID is TL type id of InputMessagesFilterEmpty.

View Source
const InputMessagesFilterGeoTypeID = 0xe7026d0d

InputMessagesFilterGeoTypeID is TL type id of InputMessagesFilterGeo.

View Source
const InputMessagesFilterGifTypeID = 0xffc86587

InputMessagesFilterGifTypeID is TL type id of InputMessagesFilterGif.

View Source
const InputMessagesFilterMusicTypeID = 0x3751b49e

InputMessagesFilterMusicTypeID is TL type id of InputMessagesFilterMusic.

View Source
const InputMessagesFilterMyMentionsTypeID = 0xc1f8e69a

InputMessagesFilterMyMentionsTypeID is TL type id of InputMessagesFilterMyMentions.

View Source
const InputMessagesFilterPhoneCallsTypeID = 0x80c99768

InputMessagesFilterPhoneCallsTypeID is TL type id of InputMessagesFilterPhoneCalls.

View Source
const InputMessagesFilterPhotoVideoTypeID = 0x56e9f0e4

InputMessagesFilterPhotoVideoTypeID is TL type id of InputMessagesFilterPhotoVideo.

View Source
const InputMessagesFilterPhotosTypeID = 0x9609a51c

InputMessagesFilterPhotosTypeID is TL type id of InputMessagesFilterPhotos.

View Source
const InputMessagesFilterPinnedTypeID = 0x1bb00451

InputMessagesFilterPinnedTypeID is TL type id of InputMessagesFilterPinned.

View Source
const InputMessagesFilterRoundVideoTypeID = 0xb549da53

InputMessagesFilterRoundVideoTypeID is TL type id of InputMessagesFilterRoundVideo.

View Source
const InputMessagesFilterRoundVoiceTypeID = 0x7a7c17a4

InputMessagesFilterRoundVoiceTypeID is TL type id of InputMessagesFilterRoundVoice.

View Source
const InputMessagesFilterUrlTypeID = 0x7ef0dd87

InputMessagesFilterUrlTypeID is TL type id of InputMessagesFilterUrl.

View Source
const InputMessagesFilterVideoTypeID = 0x9fc00e65

InputMessagesFilterVideoTypeID is TL type id of InputMessagesFilterVideo.

View Source
const InputMessagesFilterVoiceTypeID = 0x50f5c392

InputMessagesFilterVoiceTypeID is TL type id of InputMessagesFilterVoice.

View Source
const InputNotifyBroadcastsTypeID = 0xb1db7c7e

InputNotifyBroadcastsTypeID is TL type id of InputNotifyBroadcasts.

View Source
const InputNotifyChatsTypeID = 0x4a95e84e

InputNotifyChatsTypeID is TL type id of InputNotifyChats.

View Source
const InputNotifyPeerTypeID = 0xb8bc5b0c

InputNotifyPeerTypeID is TL type id of InputNotifyPeer.

View Source
const InputNotifyUsersTypeID = 0x193b4417

InputNotifyUsersTypeID is TL type id of InputNotifyUsers.

View Source
const InputPaymentCredentialsAndroidPayTypeID = 0xca05d50e

InputPaymentCredentialsAndroidPayTypeID is TL type id of InputPaymentCredentialsAndroidPay.

View Source
const InputPaymentCredentialsApplePayTypeID = 0xaa1c39f

InputPaymentCredentialsApplePayTypeID is TL type id of InputPaymentCredentialsApplePay.

View Source
const InputPaymentCredentialsSavedTypeID = 0xc10eb2cf

InputPaymentCredentialsSavedTypeID is TL type id of InputPaymentCredentialsSaved.

View Source
const InputPaymentCredentialsTypeID = 0x3417d728

InputPaymentCredentialsTypeID is TL type id of InputPaymentCredentials.

View Source
const InputPeerChannelFromMessageTypeID = 0x9c95f7bb

InputPeerChannelFromMessageTypeID is TL type id of InputPeerChannelFromMessage.

View Source
const InputPeerChannelTypeID = 0x20adaef8

InputPeerChannelTypeID is TL type id of InputPeerChannel.

View Source
const InputPeerChatTypeID = 0x179be863

InputPeerChatTypeID is TL type id of InputPeerChat.

View Source
const InputPeerEmptyTypeID = 0x7f3b18ea

InputPeerEmptyTypeID is TL type id of InputPeerEmpty.

View Source
const InputPeerNotifySettingsTypeID = 0x9c3d198e

InputPeerNotifySettingsTypeID is TL type id of InputPeerNotifySettings.

View Source
const InputPeerPhotoFileLocationTypeID = 0x27d69997

InputPeerPhotoFileLocationTypeID is TL type id of InputPeerPhotoFileLocation.

View Source
const InputPeerSelfTypeID = 0x7da07ec9

InputPeerSelfTypeID is TL type id of InputPeerSelf.

View Source
const InputPeerUserFromMessageTypeID = 0x17bae2e6

InputPeerUserFromMessageTypeID is TL type id of InputPeerUserFromMessage.

View Source
const InputPeerUserTypeID = 0x7b8e7de6

InputPeerUserTypeID is TL type id of InputPeerUser.

View Source
const InputPhoneCallTypeID = 0x1e36fded

InputPhoneCallTypeID is TL type id of InputPhoneCall.

View Source
const InputPhoneContactTypeID = 0xf392b7f4

InputPhoneContactTypeID is TL type id of InputPhoneContact.

View Source
const InputPhotoEmptyTypeID = 0x1cd7bf0d

InputPhotoEmptyTypeID is TL type id of InputPhotoEmpty.

View Source
const InputPhotoFileLocationTypeID = 0x40181ffe

InputPhotoFileLocationTypeID is TL type id of InputPhotoFileLocation.

View Source
const InputPhotoLegacyFileLocationTypeID = 0xd83466f3

InputPhotoLegacyFileLocationTypeID is TL type id of InputPhotoLegacyFileLocation.

View Source
const InputPhotoTypeID = 0x3bb3b94a

InputPhotoTypeID is TL type id of InputPhoto.

View Source
const InputPrivacyKeyAddedByPhoneTypeID = 0xd1219bdd

InputPrivacyKeyAddedByPhoneTypeID is TL type id of InputPrivacyKeyAddedByPhone.

View Source
const InputPrivacyKeyChatInviteTypeID = 0xbdfb0426

InputPrivacyKeyChatInviteTypeID is TL type id of InputPrivacyKeyChatInvite.

View Source
const InputPrivacyKeyForwardsTypeID = 0xa4dd4c08

InputPrivacyKeyForwardsTypeID is TL type id of InputPrivacyKeyForwards.

View Source
const InputPrivacyKeyPhoneCallTypeID = 0xfabadc5f

InputPrivacyKeyPhoneCallTypeID is TL type id of InputPrivacyKeyPhoneCall.

View Source
const InputPrivacyKeyPhoneNumberTypeID = 0x352dafa

InputPrivacyKeyPhoneNumberTypeID is TL type id of InputPrivacyKeyPhoneNumber.

View Source
const InputPrivacyKeyPhoneP2PTypeID = 0xdb9e70d2

InputPrivacyKeyPhoneP2PTypeID is TL type id of InputPrivacyKeyPhoneP2P.

View Source
const InputPrivacyKeyProfilePhotoTypeID = 0x5719bacc

InputPrivacyKeyProfilePhotoTypeID is TL type id of InputPrivacyKeyProfilePhoto.

View Source
const InputPrivacyKeyStatusTimestampTypeID = 0x4f96cb18

InputPrivacyKeyStatusTimestampTypeID is TL type id of InputPrivacyKeyStatusTimestamp.

View Source
const InputPrivacyValueAllowAllTypeID = 0x184b35ce

InputPrivacyValueAllowAllTypeID is TL type id of InputPrivacyValueAllowAll.

View Source
const InputPrivacyValueAllowChatParticipantsTypeID = 0x4c81c1ba

InputPrivacyValueAllowChatParticipantsTypeID is TL type id of InputPrivacyValueAllowChatParticipants.

View Source
const InputPrivacyValueAllowContactsTypeID = 0xd09e07b

InputPrivacyValueAllowContactsTypeID is TL type id of InputPrivacyValueAllowContacts.

View Source
const InputPrivacyValueAllowUsersTypeID = 0x131cc67f

InputPrivacyValueAllowUsersTypeID is TL type id of InputPrivacyValueAllowUsers.

View Source
const InputPrivacyValueDisallowAllTypeID = 0xd66b66c9

InputPrivacyValueDisallowAllTypeID is TL type id of InputPrivacyValueDisallowAll.

View Source
const InputPrivacyValueDisallowChatParticipantsTypeID = 0xd82363af

InputPrivacyValueDisallowChatParticipantsTypeID is TL type id of InputPrivacyValueDisallowChatParticipants.

View Source
const InputPrivacyValueDisallowContactsTypeID = 0xba52007

InputPrivacyValueDisallowContactsTypeID is TL type id of InputPrivacyValueDisallowContacts.

View Source
const InputPrivacyValueDisallowUsersTypeID = 0x90110467

InputPrivacyValueDisallowUsersTypeID is TL type id of InputPrivacyValueDisallowUsers.

View Source
const InputReportReasonChildAbuseTypeID = 0xadf44ee3

InputReportReasonChildAbuseTypeID is TL type id of InputReportReasonChildAbuse.

View Source
const InputReportReasonCopyrightTypeID = 0x9b89f93a

InputReportReasonCopyrightTypeID is TL type id of InputReportReasonCopyright.

View Source
const InputReportReasonGeoIrrelevantTypeID = 0xdbd4feed

InputReportReasonGeoIrrelevantTypeID is TL type id of InputReportReasonGeoIrrelevant.

View Source
const InputReportReasonOtherTypeID = 0xe1746d0a

InputReportReasonOtherTypeID is TL type id of InputReportReasonOther.

View Source
const InputReportReasonPornographyTypeID = 0x2e59d922

InputReportReasonPornographyTypeID is TL type id of InputReportReasonPornography.

View Source
const InputReportReasonSpamTypeID = 0x58dbcab8

InputReportReasonSpamTypeID is TL type id of InputReportReasonSpam.

View Source
const InputReportReasonViolenceTypeID = 0x1e22c78d

InputReportReasonViolenceTypeID is TL type id of InputReportReasonViolence.

View Source
const InputSecureFileLocationTypeID = 0xcbc7ee28

InputSecureFileLocationTypeID is TL type id of InputSecureFileLocation.

View Source
const InputSecureFileTypeID = 0x5367e5be

InputSecureFileTypeID is TL type id of InputSecureFile.

View Source
const InputSecureFileUploadedTypeID = 0x3334b0f0

InputSecureFileUploadedTypeID is TL type id of InputSecureFileUploaded.

View Source
const InputSecureValueTypeID = 0xdb21d0a7

InputSecureValueTypeID is TL type id of InputSecureValue.

View Source
const InputSingleMediaTypeID = 0x1cc6e91f

InputSingleMediaTypeID is TL type id of InputSingleMedia.

View Source
const InputStickerSetAnimatedEmojiTypeID = 0x28703c8

InputStickerSetAnimatedEmojiTypeID is TL type id of InputStickerSetAnimatedEmoji.

View Source
const InputStickerSetDiceTypeID = 0xe67f520e

InputStickerSetDiceTypeID is TL type id of InputStickerSetDice.

View Source
const InputStickerSetEmptyTypeID = 0xffb62b95

InputStickerSetEmptyTypeID is TL type id of InputStickerSetEmpty.

View Source
const InputStickerSetIDTypeID = 0x9de7a269

InputStickerSetIDTypeID is TL type id of InputStickerSetID.

View Source
const InputStickerSetItemTypeID = 0xffa0a496

InputStickerSetItemTypeID is TL type id of InputStickerSetItem.

View Source
const InputStickerSetShortNameTypeID = 0x861cc8a0

InputStickerSetShortNameTypeID is TL type id of InputStickerSetShortName.

View Source
const InputStickerSetThumbTypeID = 0xdbaeae9

InputStickerSetThumbTypeID is TL type id of InputStickerSetThumb.

View Source
const InputStickeredMediaDocumentTypeID = 0x438865b

InputStickeredMediaDocumentTypeID is TL type id of InputStickeredMediaDocument.

View Source
const InputStickeredMediaPhotoTypeID = 0x4a992157

InputStickeredMediaPhotoTypeID is TL type id of InputStickeredMediaPhoto.

View Source
const InputTakeoutFileLocationTypeID = 0x29be5899

InputTakeoutFileLocationTypeID is TL type id of InputTakeoutFileLocation.

View Source
const InputThemeSettingsTypeID = 0xbd507cd1

InputThemeSettingsTypeID is TL type id of InputThemeSettings.

View Source
const InputThemeSlugTypeID = 0xf5890df1

InputThemeSlugTypeID is TL type id of InputThemeSlug.

View Source
const InputThemeTypeID = 0x3c5693e9

InputThemeTypeID is TL type id of InputTheme.

View Source
const InputUserEmptyTypeID = 0xb98886cf

InputUserEmptyTypeID is TL type id of InputUserEmpty.

View Source
const InputUserFromMessageTypeID = 0x2d117597

InputUserFromMessageTypeID is TL type id of InputUserFromMessage.

View Source
const InputUserSelfTypeID = 0xf7c1b13f

InputUserSelfTypeID is TL type id of InputUserSelf.

View Source
const InputUserTypeID = 0xd8292816

InputUserTypeID is TL type id of InputUser.

View Source
const InputWallPaperNoFileTypeID = 0x8427bbac

InputWallPaperNoFileTypeID is TL type id of InputWallPaperNoFile.

View Source
const InputWallPaperSlugTypeID = 0x72091c80

InputWallPaperSlugTypeID is TL type id of InputWallPaperSlug.

View Source
const InputWallPaperTypeID = 0xe630b979

InputWallPaperTypeID is TL type id of InputWallPaper.

View Source
const InputWebDocumentTypeID = 0x9bed434d

InputWebDocumentTypeID is TL type id of InputWebDocument.

View Source
const InputWebFileGeoPointLocationTypeID = 0x9f2221c9

InputWebFileGeoPointLocationTypeID is TL type id of InputWebFileGeoPointLocation.

View Source
const InputWebFileLocationTypeID = 0xc239d686

InputWebFileLocationTypeID is TL type id of InputWebFileLocation.

View Source
const InvoiceTypeID = 0xc30aa358

InvoiceTypeID is TL type id of Invoice.

View Source
const JsonArrayTypeID = 0xf7444763

JsonArrayTypeID is TL type id of JsonArray.

View Source
const JsonBoolTypeID = 0xc7345e6a

JsonBoolTypeID is TL type id of JsonBool.

View Source
const JsonNullTypeID = 0x3f6d7b68

JsonNullTypeID is TL type id of JsonNull.

View Source
const JsonNumberTypeID = 0x2be0dfa4

JsonNumberTypeID is TL type id of JsonNumber.

View Source
const JsonObjectTypeID = 0x99c1d49d

JsonObjectTypeID is TL type id of JsonObject.

View Source
const JsonObjectValueTypeID = 0xc0de1bd9

JsonObjectValueTypeID is TL type id of JsonObjectValue.

View Source
const JsonStringTypeID = 0xb71e767a

JsonStringTypeID is TL type id of JsonString.

View Source
const KeyboardButtonBuyTypeID = 0xafd93fbb

KeyboardButtonBuyTypeID is TL type id of KeyboardButtonBuy.

View Source
const KeyboardButtonCallbackTypeID = 0x35bbdb6b

KeyboardButtonCallbackTypeID is TL type id of KeyboardButtonCallback.

View Source
const KeyboardButtonGameTypeID = 0x50f41ccf

KeyboardButtonGameTypeID is TL type id of KeyboardButtonGame.

View Source
const KeyboardButtonRequestGeoLocationTypeID = 0xfc796b3f

KeyboardButtonRequestGeoLocationTypeID is TL type id of KeyboardButtonRequestGeoLocation.

View Source
const KeyboardButtonRequestPhoneTypeID = 0xb16a6c29

KeyboardButtonRequestPhoneTypeID is TL type id of KeyboardButtonRequestPhone.

View Source
const KeyboardButtonRequestPollTypeID = 0xbbc7515d

KeyboardButtonRequestPollTypeID is TL type id of KeyboardButtonRequestPoll.

View Source
const KeyboardButtonRowTypeID = 0x77608b83

KeyboardButtonRowTypeID is TL type id of KeyboardButtonRow.

View Source
const KeyboardButtonSwitchInlineTypeID = 0x568a748

KeyboardButtonSwitchInlineTypeID is TL type id of KeyboardButtonSwitchInline.

View Source
const KeyboardButtonTypeID = 0xa2fa4880

KeyboardButtonTypeID is TL type id of KeyboardButton.

View Source
const KeyboardButtonUrlAuthTypeID = 0x10b78d29

KeyboardButtonUrlAuthTypeID is TL type id of KeyboardButtonUrlAuth.

View Source
const KeyboardButtonUrlTypeID = 0x258aff05

KeyboardButtonUrlTypeID is TL type id of KeyboardButtonUrl.

View Source
const LabeledPriceTypeID = 0xcb296bf8

LabeledPriceTypeID is TL type id of LabeledPrice.

View Source
const LangPackDifferenceTypeID = 0xf385c1f6

LangPackDifferenceTypeID is TL type id of LangPackDifference.

View Source
const LangPackLanguageTypeID = 0xeeca5ce3

LangPackLanguageTypeID is TL type id of LangPackLanguage.

View Source
const LangPackStringDeletedTypeID = 0x2979eeb2

LangPackStringDeletedTypeID is TL type id of LangPackStringDeleted.

View Source
const LangPackStringPluralizedTypeID = 0x6c47ac9f

LangPackStringPluralizedTypeID is TL type id of LangPackStringPluralized.

View Source
const LangPackStringTypeID = 0xcad181f6

LangPackStringTypeID is TL type id of LangPackString.

View Source
const LangpackGetDifferenceRequestTypeID = 0xcd984aa5

LangpackGetDifferenceRequestTypeID is TL type id of LangpackGetDifferenceRequest.

View Source
const LangpackGetLangPackRequestTypeID = 0xf2f2330a

LangpackGetLangPackRequestTypeID is TL type id of LangpackGetLangPackRequest.

View Source
const LangpackGetLanguageRequestTypeID = 0x6a596502

LangpackGetLanguageRequestTypeID is TL type id of LangpackGetLanguageRequest.

View Source
const LangpackGetLanguagesRequestTypeID = 0x42c6978f

LangpackGetLanguagesRequestTypeID is TL type id of LangpackGetLanguagesRequest.

View Source
const LangpackGetStringsRequestTypeID = 0xefea3803

LangpackGetStringsRequestTypeID is TL type id of LangpackGetStringsRequest.

View Source
const Layer = 122

Layer version of schema.

View Source
const MaskCoordsTypeID = 0xaed6dbb2

MaskCoordsTypeID is TL type id of MaskCoords.

View Source
const MessageActionBotAllowedTypeID = 0xabe9affe

MessageActionBotAllowedTypeID is TL type id of MessageActionBotAllowed.

View Source
const MessageActionChannelCreateTypeID = 0x95d2ac92

MessageActionChannelCreateTypeID is TL type id of MessageActionChannelCreate.

View Source
const MessageActionChannelMigrateFromTypeID = 0xb055eaee

MessageActionChannelMigrateFromTypeID is TL type id of MessageActionChannelMigrateFrom.

View Source
const MessageActionChatAddUserTypeID = 0x488a7337

MessageActionChatAddUserTypeID is TL type id of MessageActionChatAddUser.

View Source
const MessageActionChatCreateTypeID = 0xa6638b9a

MessageActionChatCreateTypeID is TL type id of MessageActionChatCreate.

View Source
const MessageActionChatDeletePhotoTypeID = 0x95e3fbef

MessageActionChatDeletePhotoTypeID is TL type id of MessageActionChatDeletePhoto.

View Source
const MessageActionChatDeleteUserTypeID = 0xb2ae9b0c

MessageActionChatDeleteUserTypeID is TL type id of MessageActionChatDeleteUser.

View Source
const MessageActionChatEditPhotoTypeID = 0x7fcb13a8

MessageActionChatEditPhotoTypeID is TL type id of MessageActionChatEditPhoto.

View Source
const MessageActionChatEditTitleTypeID = 0xb5a1ce5a

MessageActionChatEditTitleTypeID is TL type id of MessageActionChatEditTitle.

View Source
const MessageActionChatJoinedByLinkTypeID = 0xf89cf5e8

MessageActionChatJoinedByLinkTypeID is TL type id of MessageActionChatJoinedByLink.

View Source
const MessageActionChatMigrateToTypeID = 0x51bdb021

MessageActionChatMigrateToTypeID is TL type id of MessageActionChatMigrateTo.

View Source
const MessageActionContactSignUpTypeID = 0xf3f25f76

MessageActionContactSignUpTypeID is TL type id of MessageActionContactSignUp.

View Source
const MessageActionCustomActionTypeID = 0xfae69f56

MessageActionCustomActionTypeID is TL type id of MessageActionCustomAction.

View Source
const MessageActionEmptyTypeID = 0xb6aef7b0

MessageActionEmptyTypeID is TL type id of MessageActionEmpty.

View Source
const MessageActionGameScoreTypeID = 0x92a72876

MessageActionGameScoreTypeID is TL type id of MessageActionGameScore.

View Source
const MessageActionGeoProximityReachedTypeID = 0x98e0d697

MessageActionGeoProximityReachedTypeID is TL type id of MessageActionGeoProximityReached.

View Source
const MessageActionGroupCallTypeID = 0x7a0d7f42

MessageActionGroupCallTypeID is TL type id of MessageActionGroupCall.

View Source
const MessageActionHistoryClearTypeID = 0x9fbab604

MessageActionHistoryClearTypeID is TL type id of MessageActionHistoryClear.

View Source
const MessageActionInviteToGroupCallTypeID = 0x76b9f11a

MessageActionInviteToGroupCallTypeID is TL type id of MessageActionInviteToGroupCall.

View Source
const MessageActionPaymentSentMeTypeID = 0x8f31b327

MessageActionPaymentSentMeTypeID is TL type id of MessageActionPaymentSentMe.

View Source
const MessageActionPaymentSentTypeID = 0x40699cd0

MessageActionPaymentSentTypeID is TL type id of MessageActionPaymentSent.

View Source
const MessageActionPhoneCallTypeID = 0x80e11a7f

MessageActionPhoneCallTypeID is TL type id of MessageActionPhoneCall.

View Source
const MessageActionPinMessageTypeID = 0x94bd38ed

MessageActionPinMessageTypeID is TL type id of MessageActionPinMessage.

View Source
const MessageActionScreenshotTakenTypeID = 0x4792929b

MessageActionScreenshotTakenTypeID is TL type id of MessageActionScreenshotTaken.

View Source
const MessageActionSecureValuesSentMeTypeID = 0x1b287353

MessageActionSecureValuesSentMeTypeID is TL type id of MessageActionSecureValuesSentMe.

View Source
const MessageActionSecureValuesSentTypeID = 0xd95c6154

MessageActionSecureValuesSentTypeID is TL type id of MessageActionSecureValuesSent.

View Source
const MessageEmptyTypeID = 0x83e5de54

MessageEmptyTypeID is TL type id of MessageEmpty.

View Source
const MessageEntityBankCardTypeID = 0x761e6af4

MessageEntityBankCardTypeID is TL type id of MessageEntityBankCard.

View Source
const MessageEntityBlockquoteTypeID = 0x20df5d0

MessageEntityBlockquoteTypeID is TL type id of MessageEntityBlockquote.

View Source
const MessageEntityBoldTypeID = 0xbd610bc9

MessageEntityBoldTypeID is TL type id of MessageEntityBold.

View Source
const MessageEntityBotCommandTypeID = 0x6cef8ac7

MessageEntityBotCommandTypeID is TL type id of MessageEntityBotCommand.

View Source
const MessageEntityCashtagTypeID = 0x4c4e743f

MessageEntityCashtagTypeID is TL type id of MessageEntityCashtag.

View Source
const MessageEntityCodeTypeID = 0x28a20571

MessageEntityCodeTypeID is TL type id of MessageEntityCode.

View Source
const MessageEntityEmailTypeID = 0x64e475c2

MessageEntityEmailTypeID is TL type id of MessageEntityEmail.

View Source
const MessageEntityHashtagTypeID = 0x6f635b0d

MessageEntityHashtagTypeID is TL type id of MessageEntityHashtag.

View Source
const MessageEntityItalicTypeID = 0x826f8b60

MessageEntityItalicTypeID is TL type id of MessageEntityItalic.

View Source
const MessageEntityMentionNameTypeID = 0x352dca58

MessageEntityMentionNameTypeID is TL type id of MessageEntityMentionName.

View Source
const MessageEntityMentionTypeID = 0xfa04579d

MessageEntityMentionTypeID is TL type id of MessageEntityMention.

View Source
const MessageEntityPhoneTypeID = 0x9b69e34b

MessageEntityPhoneTypeID is TL type id of MessageEntityPhone.

View Source
const MessageEntityPreTypeID = 0x73924be0

MessageEntityPreTypeID is TL type id of MessageEntityPre.

View Source
const MessageEntityStrikeTypeID = 0xbf0693d4

MessageEntityStrikeTypeID is TL type id of MessageEntityStrike.

View Source
const MessageEntityTextUrlTypeID = 0x76a6d327

MessageEntityTextUrlTypeID is TL type id of MessageEntityTextUrl.

View Source
const MessageEntityUnderlineTypeID = 0x9c4e7e8b

MessageEntityUnderlineTypeID is TL type id of MessageEntityUnderline.

View Source
const MessageEntityUnknownTypeID = 0xbb92ba95

MessageEntityUnknownTypeID is TL type id of MessageEntityUnknown.

View Source
const MessageEntityUrlTypeID = 0x6ed02538

MessageEntityUrlTypeID is TL type id of MessageEntityUrl.

View Source
const MessageFwdHeaderTypeID = 0x5f777dce

MessageFwdHeaderTypeID is TL type id of MessageFwdHeader.

View Source
const MessageInteractionCountersTypeID = 0xad4fc9bd

MessageInteractionCountersTypeID is TL type id of MessageInteractionCounters.

View Source
const MessageMediaContactTypeID = 0xcbf24940

MessageMediaContactTypeID is TL type id of MessageMediaContact.

View Source
const MessageMediaDiceTypeID = 0x3f7ee58b

MessageMediaDiceTypeID is TL type id of MessageMediaDice.

View Source
const MessageMediaDocumentTypeID = 0x9cb070d7

MessageMediaDocumentTypeID is TL type id of MessageMediaDocument.

View Source
const MessageMediaEmptyTypeID = 0x3ded6320

MessageMediaEmptyTypeID is TL type id of MessageMediaEmpty.

View Source
const MessageMediaGameTypeID = 0xfdb19008

MessageMediaGameTypeID is TL type id of MessageMediaGame.

View Source
const MessageMediaGeoLiveTypeID = 0xb940c666

MessageMediaGeoLiveTypeID is TL type id of MessageMediaGeoLive.

View Source
const MessageMediaGeoTypeID = 0x56e0d474

MessageMediaGeoTypeID is TL type id of MessageMediaGeo.

View Source
const MessageMediaInvoiceTypeID = 0x84551347

MessageMediaInvoiceTypeID is TL type id of MessageMediaInvoice.

View Source
const MessageMediaPhotoTypeID = 0x695150d7

MessageMediaPhotoTypeID is TL type id of MessageMediaPhoto.

View Source
const MessageMediaPollTypeID = 0x4bd6e798

MessageMediaPollTypeID is TL type id of MessageMediaPoll.

View Source
const MessageMediaUnsupportedTypeID = 0x9f84f49e

MessageMediaUnsupportedTypeID is TL type id of MessageMediaUnsupported.

View Source
const MessageMediaVenueTypeID = 0x2ec0533f

MessageMediaVenueTypeID is TL type id of MessageMediaVenue.

View Source
const MessageMediaWebPageTypeID = 0xa32dd600

MessageMediaWebPageTypeID is TL type id of MessageMediaWebPage.

View Source
const MessageRangeTypeID = 0xae30253

MessageRangeTypeID is TL type id of MessageRange.

View Source
const MessageRepliesTypeID = 0x4128faac

MessageRepliesTypeID is TL type id of MessageReplies.

View Source
const MessageReplyHeaderTypeID = 0xa6d57763

MessageReplyHeaderTypeID is TL type id of MessageReplyHeader.

View Source
const MessageServiceTypeID = 0x286fa604

MessageServiceTypeID is TL type id of MessageService.

View Source
const MessageTypeID = 0x58ae39c9

MessageTypeID is TL type id of Message.

View Source
const MessageUserVoteInputOptionTypeID = 0x36377430

MessageUserVoteInputOptionTypeID is TL type id of MessageUserVoteInputOption.

View Source
const MessageUserVoteMultipleTypeID = 0xe8fe0de

MessageUserVoteMultipleTypeID is TL type id of MessageUserVoteMultiple.

View Source
const MessageUserVoteTypeID = 0xa28e5559

MessageUserVoteTypeID is TL type id of MessageUserVote.

View Source
const MessageViewsTypeID = 0x455b853d

MessageViewsTypeID is TL type id of MessageViews.

View Source
const MessagesAcceptEncryptionRequestTypeID = 0x3dbc0415

MessagesAcceptEncryptionRequestTypeID is TL type id of MessagesAcceptEncryptionRequest.

View Source
const MessagesAcceptUrlAuthRequestTypeID = 0xf729ea98

MessagesAcceptUrlAuthRequestTypeID is TL type id of MessagesAcceptUrlAuthRequest.

View Source
const MessagesAddChatUserRequestTypeID = 0xf9a0aa09

MessagesAddChatUserRequestTypeID is TL type id of MessagesAddChatUserRequest.

View Source
const MessagesAffectedHistoryTypeID = 0xb45c69d1

MessagesAffectedHistoryTypeID is TL type id of MessagesAffectedHistory.

View Source
const MessagesAffectedMessagesTypeID = 0x84d19185

MessagesAffectedMessagesTypeID is TL type id of MessagesAffectedMessages.

View Source
const MessagesAllStickersNotModifiedTypeID = 0xe86602c3

MessagesAllStickersNotModifiedTypeID is TL type id of MessagesAllStickersNotModified.

View Source
const MessagesAllStickersTypeID = 0xedfd405f

MessagesAllStickersTypeID is TL type id of MessagesAllStickers.

View Source
const MessagesArchivedStickersTypeID = 0x4fcba9c8

MessagesArchivedStickersTypeID is TL type id of MessagesArchivedStickers.

View Source
const MessagesBotCallbackAnswerTypeID = 0x36585ea4

MessagesBotCallbackAnswerTypeID is TL type id of MessagesBotCallbackAnswer.

View Source
const MessagesBotResultsTypeID = 0x947ca848

MessagesBotResultsTypeID is TL type id of MessagesBotResults.

View Source
const MessagesChannelMessagesTypeID = 0x64479808

MessagesChannelMessagesTypeID is TL type id of MessagesChannelMessages.

View Source
const MessagesChatFullTypeID = 0xe5d7d19c

MessagesChatFullTypeID is TL type id of MessagesChatFull.

View Source
const MessagesChatsSliceTypeID = 0x9cd81144

MessagesChatsSliceTypeID is TL type id of MessagesChatsSlice.

View Source
const MessagesChatsTypeID = 0x64ff9fd5

MessagesChatsTypeID is TL type id of MessagesChats.

View Source
const MessagesCheckChatInviteRequestTypeID = 0x3eadb1bb

MessagesCheckChatInviteRequestTypeID is TL type id of MessagesCheckChatInviteRequest.

View Source
const MessagesClearAllDraftsRequestTypeID = 0x7e58ee9c

MessagesClearAllDraftsRequestTypeID is TL type id of MessagesClearAllDraftsRequest.

View Source
const MessagesClearRecentStickersRequestTypeID = 0x8999602d

MessagesClearRecentStickersRequestTypeID is TL type id of MessagesClearRecentStickersRequest.

View Source
const MessagesCreateChatRequestTypeID = 0x9cb126e

MessagesCreateChatRequestTypeID is TL type id of MessagesCreateChatRequest.

View Source
const MessagesDeleteChatUserRequestTypeID = 0xe0611f16

MessagesDeleteChatUserRequestTypeID is TL type id of MessagesDeleteChatUserRequest.

View Source
const MessagesDeleteHistoryRequestTypeID = 0x1c015b09

MessagesDeleteHistoryRequestTypeID is TL type id of MessagesDeleteHistoryRequest.

View Source
const MessagesDeleteMessagesRequestTypeID = 0xe58e95d2

MessagesDeleteMessagesRequestTypeID is TL type id of MessagesDeleteMessagesRequest.

View Source
const MessagesDeleteScheduledMessagesRequestTypeID = 0x59ae2b16

MessagesDeleteScheduledMessagesRequestTypeID is TL type id of MessagesDeleteScheduledMessagesRequest.

View Source
const MessagesDhConfigNotModifiedTypeID = 0xc0e24635

MessagesDhConfigNotModifiedTypeID is TL type id of MessagesDhConfigNotModified.

View Source
const MessagesDhConfigTypeID = 0x2c221edd

MessagesDhConfigTypeID is TL type id of MessagesDhConfig.

View Source
const MessagesDialogsNotModifiedTypeID = 0xf0e3e596

MessagesDialogsNotModifiedTypeID is TL type id of MessagesDialogsNotModified.

View Source
const MessagesDialogsSliceTypeID = 0x71e094f3

MessagesDialogsSliceTypeID is TL type id of MessagesDialogsSlice.

View Source
const MessagesDialogsTypeID = 0x15ba6c40

MessagesDialogsTypeID is TL type id of MessagesDialogs.

View Source
const MessagesDiscardEncryptionRequestTypeID = 0xedd923c5

MessagesDiscardEncryptionRequestTypeID is TL type id of MessagesDiscardEncryptionRequest.

View Source
const MessagesDiscussionMessageTypeID = 0xf5dd8f9d

MessagesDiscussionMessageTypeID is TL type id of MessagesDiscussionMessage.

View Source
const MessagesEditChatAboutRequestTypeID = 0xdef60797

MessagesEditChatAboutRequestTypeID is TL type id of MessagesEditChatAboutRequest.

View Source
const MessagesEditChatAdminRequestTypeID = 0xa9e69f2e

MessagesEditChatAdminRequestTypeID is TL type id of MessagesEditChatAdminRequest.

View Source
const MessagesEditChatDefaultBannedRightsRequestTypeID = 0xa5866b41

MessagesEditChatDefaultBannedRightsRequestTypeID is TL type id of MessagesEditChatDefaultBannedRightsRequest.

View Source
const MessagesEditChatPhotoRequestTypeID = 0xca4c79d8

MessagesEditChatPhotoRequestTypeID is TL type id of MessagesEditChatPhotoRequest.

View Source
const MessagesEditChatTitleRequestTypeID = 0xdc452855

MessagesEditChatTitleRequestTypeID is TL type id of MessagesEditChatTitleRequest.

View Source
const MessagesEditInlineBotMessageRequestTypeID = 0x83557dba

MessagesEditInlineBotMessageRequestTypeID is TL type id of MessagesEditInlineBotMessageRequest.

View Source
const MessagesEditMessageRequestTypeID = 0x48f71778

MessagesEditMessageRequestTypeID is TL type id of MessagesEditMessageRequest.

View Source
const MessagesExportChatInviteRequestTypeID = 0xdf7534c

MessagesExportChatInviteRequestTypeID is TL type id of MessagesExportChatInviteRequest.

View Source
const MessagesFaveStickerRequestTypeID = 0xb9ffc55b

MessagesFaveStickerRequestTypeID is TL type id of MessagesFaveStickerRequest.

View Source
const MessagesFavedStickersNotModifiedTypeID = 0x9e8fa6d3

MessagesFavedStickersNotModifiedTypeID is TL type id of MessagesFavedStickersNotModified.

View Source
const MessagesFavedStickersTypeID = 0xf37f2f16

MessagesFavedStickersTypeID is TL type id of MessagesFavedStickers.

View Source
const MessagesFeaturedStickersNotModifiedTypeID = 0xc6dc0c66

MessagesFeaturedStickersNotModifiedTypeID is TL type id of MessagesFeaturedStickersNotModified.

View Source
const MessagesFeaturedStickersTypeID = 0xb6abc341

MessagesFeaturedStickersTypeID is TL type id of MessagesFeaturedStickers.

View Source
const MessagesForwardMessagesRequestTypeID = 0xd9fee60e

MessagesForwardMessagesRequestTypeID is TL type id of MessagesForwardMessagesRequest.

View Source
const MessagesFoundStickerSetsNotModifiedTypeID = 0xd54b65d

MessagesFoundStickerSetsNotModifiedTypeID is TL type id of MessagesFoundStickerSetsNotModified.

View Source
const MessagesFoundStickerSetsTypeID = 0x5108d648

MessagesFoundStickerSetsTypeID is TL type id of MessagesFoundStickerSets.

View Source
const MessagesGetAllChatsRequestTypeID = 0xeba80ff0

MessagesGetAllChatsRequestTypeID is TL type id of MessagesGetAllChatsRequest.

View Source
const MessagesGetAllDraftsRequestTypeID = 0x6a3f8d65

MessagesGetAllDraftsRequestTypeID is TL type id of MessagesGetAllDraftsRequest.

View Source
const MessagesGetAllStickersRequestTypeID = 0x1c9618b1

MessagesGetAllStickersRequestTypeID is TL type id of MessagesGetAllStickersRequest.

View Source
const MessagesGetArchivedStickersRequestTypeID = 0x57f17692

MessagesGetArchivedStickersRequestTypeID is TL type id of MessagesGetArchivedStickersRequest.

View Source
const MessagesGetAttachedStickersRequestTypeID = 0xcc5b67cc

MessagesGetAttachedStickersRequestTypeID is TL type id of MessagesGetAttachedStickersRequest.

View Source
const MessagesGetBotCallbackAnswerRequestTypeID = 0x9342ca07

MessagesGetBotCallbackAnswerRequestTypeID is TL type id of MessagesGetBotCallbackAnswerRequest.

View Source
const MessagesGetChatsRequestTypeID = 0x3c6aa187

MessagesGetChatsRequestTypeID is TL type id of MessagesGetChatsRequest.

View Source
const MessagesGetCommonChatsRequestTypeID = 0xd0a48c4

MessagesGetCommonChatsRequestTypeID is TL type id of MessagesGetCommonChatsRequest.

View Source
const MessagesGetDhConfigRequestTypeID = 0x26cf8950

MessagesGetDhConfigRequestTypeID is TL type id of MessagesGetDhConfigRequest.

View Source
const MessagesGetDialogFiltersRequestTypeID = 0xf19ed96d

MessagesGetDialogFiltersRequestTypeID is TL type id of MessagesGetDialogFiltersRequest.

View Source
const MessagesGetDialogUnreadMarksRequestTypeID = 0x22e24e22

MessagesGetDialogUnreadMarksRequestTypeID is TL type id of MessagesGetDialogUnreadMarksRequest.

View Source
const MessagesGetDialogsRequestTypeID = 0xa0ee3b73

MessagesGetDialogsRequestTypeID is TL type id of MessagesGetDialogsRequest.

View Source
const MessagesGetDiscussionMessageRequestTypeID = 0x446972fd

MessagesGetDiscussionMessageRequestTypeID is TL type id of MessagesGetDiscussionMessageRequest.

View Source
const MessagesGetDocumentByHashRequestTypeID = 0x338e2464

MessagesGetDocumentByHashRequestTypeID is TL type id of MessagesGetDocumentByHashRequest.

View Source
const MessagesGetEmojiKeywordsDifferenceRequestTypeID = 0x1508b6af

MessagesGetEmojiKeywordsDifferenceRequestTypeID is TL type id of MessagesGetEmojiKeywordsDifferenceRequest.

View Source
const MessagesGetEmojiKeywordsLanguagesRequestTypeID = 0x4e9963b2

MessagesGetEmojiKeywordsLanguagesRequestTypeID is TL type id of MessagesGetEmojiKeywordsLanguagesRequest.

View Source
const MessagesGetEmojiKeywordsRequestTypeID = 0x35a0e062

MessagesGetEmojiKeywordsRequestTypeID is TL type id of MessagesGetEmojiKeywordsRequest.

View Source
const MessagesGetEmojiURLRequestTypeID = 0xd5b10c26

MessagesGetEmojiURLRequestTypeID is TL type id of MessagesGetEmojiURLRequest.

View Source
const MessagesGetFavedStickersRequestTypeID = 0x21ce0b0e

MessagesGetFavedStickersRequestTypeID is TL type id of MessagesGetFavedStickersRequest.

View Source
const MessagesGetFeaturedStickersRequestTypeID = 0x2dacca4f

MessagesGetFeaturedStickersRequestTypeID is TL type id of MessagesGetFeaturedStickersRequest.

View Source
const MessagesGetFullChatRequestTypeID = 0x3b831c66

MessagesGetFullChatRequestTypeID is TL type id of MessagesGetFullChatRequest.

View Source
const MessagesGetGameHighScoresRequestTypeID = 0xe822649d

MessagesGetGameHighScoresRequestTypeID is TL type id of MessagesGetGameHighScoresRequest.

View Source
const MessagesGetHistoryRequestTypeID = 0xdcbb8260

MessagesGetHistoryRequestTypeID is TL type id of MessagesGetHistoryRequest.

View Source
const MessagesGetInlineBotResultsRequestTypeID = 0x514e999d

MessagesGetInlineBotResultsRequestTypeID is TL type id of MessagesGetInlineBotResultsRequest.

View Source
const MessagesGetInlineGameHighScoresRequestTypeID = 0xf635e1b

MessagesGetInlineGameHighScoresRequestTypeID is TL type id of MessagesGetInlineGameHighScoresRequest.

View Source
const MessagesGetMaskStickersRequestTypeID = 0x65b8c79f

MessagesGetMaskStickersRequestTypeID is TL type id of MessagesGetMaskStickersRequest.

View Source
const MessagesGetMessageEditDataRequestTypeID = 0xfda68d36

MessagesGetMessageEditDataRequestTypeID is TL type id of MessagesGetMessageEditDataRequest.

View Source
const MessagesGetMessagesRequestTypeID = 0x63c66506

MessagesGetMessagesRequestTypeID is TL type id of MessagesGetMessagesRequest.

View Source
const MessagesGetMessagesViewsRequestTypeID = 0x5784d3e1

MessagesGetMessagesViewsRequestTypeID is TL type id of MessagesGetMessagesViewsRequest.

View Source
const MessagesGetOldFeaturedStickersRequestTypeID = 0x5fe7025b

MessagesGetOldFeaturedStickersRequestTypeID is TL type id of MessagesGetOldFeaturedStickersRequest.

View Source
const MessagesGetOnlinesRequestTypeID = 0x6e2be050

MessagesGetOnlinesRequestTypeID is TL type id of MessagesGetOnlinesRequest.

View Source
const MessagesGetPeerDialogsRequestTypeID = 0xe470bcfd

MessagesGetPeerDialogsRequestTypeID is TL type id of MessagesGetPeerDialogsRequest.

View Source
const MessagesGetPeerSettingsRequestTypeID = 0x3672e09c

MessagesGetPeerSettingsRequestTypeID is TL type id of MessagesGetPeerSettingsRequest.

View Source
const MessagesGetPinnedDialogsRequestTypeID = 0xd6b94df2

MessagesGetPinnedDialogsRequestTypeID is TL type id of MessagesGetPinnedDialogsRequest.

View Source
const MessagesGetPollResultsRequestTypeID = 0x73bb643b

MessagesGetPollResultsRequestTypeID is TL type id of MessagesGetPollResultsRequest.

View Source
const MessagesGetPollVotesRequestTypeID = 0xb86e380e

MessagesGetPollVotesRequestTypeID is TL type id of MessagesGetPollVotesRequest.

View Source
const MessagesGetRecentLocationsRequestTypeID = 0xbbc45b09

MessagesGetRecentLocationsRequestTypeID is TL type id of MessagesGetRecentLocationsRequest.

View Source
const MessagesGetRecentStickersRequestTypeID = 0x5ea192c9

MessagesGetRecentStickersRequestTypeID is TL type id of MessagesGetRecentStickersRequest.

View Source
const MessagesGetRepliesRequestTypeID = 0x24b581ba

MessagesGetRepliesRequestTypeID is TL type id of MessagesGetRepliesRequest.

View Source
const MessagesGetSavedGifsRequestTypeID = 0x83bf3d52

MessagesGetSavedGifsRequestTypeID is TL type id of MessagesGetSavedGifsRequest.

View Source
const MessagesGetScheduledHistoryRequestTypeID = 0xe2c2685b

MessagesGetScheduledHistoryRequestTypeID is TL type id of MessagesGetScheduledHistoryRequest.

View Source
const MessagesGetScheduledMessagesRequestTypeID = 0xbdbb0464

MessagesGetScheduledMessagesRequestTypeID is TL type id of MessagesGetScheduledMessagesRequest.

View Source
const MessagesGetSearchCountersRequestTypeID = 0x732eef00

MessagesGetSearchCountersRequestTypeID is TL type id of MessagesGetSearchCountersRequest.

View Source
const MessagesGetSplitRangesRequestTypeID = 0x1cff7e08

MessagesGetSplitRangesRequestTypeID is TL type id of MessagesGetSplitRangesRequest.

View Source
const MessagesGetStatsURLRequestTypeID = 0x812c2ae6

MessagesGetStatsURLRequestTypeID is TL type id of MessagesGetStatsURLRequest.

View Source
const MessagesGetStickerSetRequestTypeID = 0x2619a90e

MessagesGetStickerSetRequestTypeID is TL type id of MessagesGetStickerSetRequest.

View Source
const MessagesGetStickersRequestTypeID = 0x43d4f2c

MessagesGetStickersRequestTypeID is TL type id of MessagesGetStickersRequest.

View Source
const MessagesGetSuggestedDialogFiltersRequestTypeID = 0xa29cd42c

MessagesGetSuggestedDialogFiltersRequestTypeID is TL type id of MessagesGetSuggestedDialogFiltersRequest.

View Source
const MessagesGetUnreadMentionsRequestTypeID = 0x46578472

MessagesGetUnreadMentionsRequestTypeID is TL type id of MessagesGetUnreadMentionsRequest.

View Source
const MessagesGetWebPagePreviewRequestTypeID = 0x8b68b0cc

MessagesGetWebPagePreviewRequestTypeID is TL type id of MessagesGetWebPagePreviewRequest.

View Source
const MessagesGetWebPageRequestTypeID = 0x32ca8f91

MessagesGetWebPageRequestTypeID is TL type id of MessagesGetWebPageRequest.

View Source
const MessagesHidePeerSettingsBarRequestTypeID = 0x4facb138

MessagesHidePeerSettingsBarRequestTypeID is TL type id of MessagesHidePeerSettingsBarRequest.

View Source
const MessagesHighScoresTypeID = 0x9a3bfd99

MessagesHighScoresTypeID is TL type id of MessagesHighScores.

View Source
const MessagesImportChatInviteRequestTypeID = 0x6c50051c

MessagesImportChatInviteRequestTypeID is TL type id of MessagesImportChatInviteRequest.

View Source
const MessagesInactiveChatsTypeID = 0xa927fec5

MessagesInactiveChatsTypeID is TL type id of MessagesInactiveChats.

View Source
const MessagesInstallStickerSetRequestTypeID = 0xc78fe460

MessagesInstallStickerSetRequestTypeID is TL type id of MessagesInstallStickerSetRequest.

View Source
const MessagesMarkDialogUnreadRequestTypeID = 0xc286d98f

MessagesMarkDialogUnreadRequestTypeID is TL type id of MessagesMarkDialogUnreadRequest.

View Source
const MessagesMessageEditDataTypeID = 0x26b5dde6

MessagesMessageEditDataTypeID is TL type id of MessagesMessageEditData.

View Source
const MessagesMessageViewsTypeID = 0xb6c4f543

MessagesMessageViewsTypeID is TL type id of MessagesMessageViews.

View Source
const MessagesMessagesNotModifiedTypeID = 0x74535f21

MessagesMessagesNotModifiedTypeID is TL type id of MessagesMessagesNotModified.

View Source
const MessagesMessagesSliceTypeID = 0x3a54685e

MessagesMessagesSliceTypeID is TL type id of MessagesMessagesSlice.

View Source
const MessagesMessagesTypeID = 0x8c718e87

MessagesMessagesTypeID is TL type id of MessagesMessages.

View Source
const MessagesMigrateChatRequestTypeID = 0x15a3b8e3

MessagesMigrateChatRequestTypeID is TL type id of MessagesMigrateChatRequest.

View Source
const MessagesPeerDialogsTypeID = 0x3371c354

MessagesPeerDialogsTypeID is TL type id of MessagesPeerDialogs.

View Source
const MessagesReadDiscussionRequestTypeID = 0xf731a9f4

MessagesReadDiscussionRequestTypeID is TL type id of MessagesReadDiscussionRequest.

View Source
const MessagesReadEncryptedHistoryRequestTypeID = 0x7f4b690a

MessagesReadEncryptedHistoryRequestTypeID is TL type id of MessagesReadEncryptedHistoryRequest.

View Source
const MessagesReadFeaturedStickersRequestTypeID = 0x5b118126

MessagesReadFeaturedStickersRequestTypeID is TL type id of MessagesReadFeaturedStickersRequest.

View Source
const MessagesReadHistoryRequestTypeID = 0xe306d3a

MessagesReadHistoryRequestTypeID is TL type id of MessagesReadHistoryRequest.

View Source
const MessagesReadMentionsRequestTypeID = 0xf0189d3

MessagesReadMentionsRequestTypeID is TL type id of MessagesReadMentionsRequest.

View Source
const MessagesReadMessageContentsRequestTypeID = 0x36a73f77

MessagesReadMessageContentsRequestTypeID is TL type id of MessagesReadMessageContentsRequest.

View Source
const MessagesReceivedMessagesRequestTypeID = 0x5a954c0

MessagesReceivedMessagesRequestTypeID is TL type id of MessagesReceivedMessagesRequest.

View Source
const MessagesReceivedQueueRequestTypeID = 0x55a5bb66

MessagesReceivedQueueRequestTypeID is TL type id of MessagesReceivedQueueRequest.

View Source
const MessagesRecentStickersNotModifiedTypeID = 0xb17f890

MessagesRecentStickersNotModifiedTypeID is TL type id of MessagesRecentStickersNotModified.

View Source
const MessagesRecentStickersTypeID = 0x22f3afb3

MessagesRecentStickersTypeID is TL type id of MessagesRecentStickers.

View Source
const MessagesReorderPinnedDialogsRequestTypeID = 0x3b1adf37

MessagesReorderPinnedDialogsRequestTypeID is TL type id of MessagesReorderPinnedDialogsRequest.

View Source
const MessagesReorderStickerSetsRequestTypeID = 0x78337739

MessagesReorderStickerSetsRequestTypeID is TL type id of MessagesReorderStickerSetsRequest.

View Source
const MessagesReportEncryptedSpamRequestTypeID = 0x4b0c8c0f

MessagesReportEncryptedSpamRequestTypeID is TL type id of MessagesReportEncryptedSpamRequest.

View Source
const MessagesReportRequestTypeID = 0xbd82b658

MessagesReportRequestTypeID is TL type id of MessagesReportRequest.

View Source
const MessagesReportSpamRequestTypeID = 0xcf1592db

MessagesReportSpamRequestTypeID is TL type id of MessagesReportSpamRequest.

View Source
const MessagesRequestEncryptionRequestTypeID = 0xf64daf43

MessagesRequestEncryptionRequestTypeID is TL type id of MessagesRequestEncryptionRequest.

View Source
const MessagesRequestUrlAuthRequestTypeID = 0xe33f5613

MessagesRequestUrlAuthRequestTypeID is TL type id of MessagesRequestUrlAuthRequest.

View Source
const MessagesSaveDraftRequestTypeID = 0xbc39e14b

MessagesSaveDraftRequestTypeID is TL type id of MessagesSaveDraftRequest.

View Source
const MessagesSaveGifRequestTypeID = 0x327a30cb

MessagesSaveGifRequestTypeID is TL type id of MessagesSaveGifRequest.

View Source
const MessagesSaveRecentStickerRequestTypeID = 0x392718f8

MessagesSaveRecentStickerRequestTypeID is TL type id of MessagesSaveRecentStickerRequest.

View Source
const MessagesSavedGifsNotModifiedTypeID = 0xe8025ca2

MessagesSavedGifsNotModifiedTypeID is TL type id of MessagesSavedGifsNotModified.

View Source
const MessagesSavedGifsTypeID = 0x2e0709a5

MessagesSavedGifsTypeID is TL type id of MessagesSavedGifs.

View Source
const MessagesSearchCounterTypeID = 0xe844ebff

MessagesSearchCounterTypeID is TL type id of MessagesSearchCounter.

View Source
const MessagesSearchGlobalRequestTypeID = 0x4bc6589a

MessagesSearchGlobalRequestTypeID is TL type id of MessagesSearchGlobalRequest.

View Source
const MessagesSearchRequestTypeID = 0xc352eec

MessagesSearchRequestTypeID is TL type id of MessagesSearchRequest.

View Source
const MessagesSearchStickerSetsRequestTypeID = 0xc2b7d08b

MessagesSearchStickerSetsRequestTypeID is TL type id of MessagesSearchStickerSetsRequest.

View Source
const MessagesSendEncryptedFileRequestTypeID = 0x5559481d

MessagesSendEncryptedFileRequestTypeID is TL type id of MessagesSendEncryptedFileRequest.

View Source
const MessagesSendEncryptedRequestTypeID = 0x44fa7a15

MessagesSendEncryptedRequestTypeID is TL type id of MessagesSendEncryptedRequest.

View Source
const MessagesSendEncryptedServiceRequestTypeID = 0x32d439a4

MessagesSendEncryptedServiceRequestTypeID is TL type id of MessagesSendEncryptedServiceRequest.

View Source
const MessagesSendInlineBotResultRequestTypeID = 0x220815b0

MessagesSendInlineBotResultRequestTypeID is TL type id of MessagesSendInlineBotResultRequest.

View Source
const MessagesSendMediaRequestTypeID = 0x3491eba9

MessagesSendMediaRequestTypeID is TL type id of MessagesSendMediaRequest.

View Source
const MessagesSendMessageRequestTypeID = 0x520c3870

MessagesSendMessageRequestTypeID is TL type id of MessagesSendMessageRequest.

View Source
const MessagesSendMultiMediaRequestTypeID = 0xcc0110cb

MessagesSendMultiMediaRequestTypeID is TL type id of MessagesSendMultiMediaRequest.

View Source
const MessagesSendScheduledMessagesRequestTypeID = 0xbd38850a

MessagesSendScheduledMessagesRequestTypeID is TL type id of MessagesSendScheduledMessagesRequest.

View Source
const MessagesSendScreenshotNotificationRequestTypeID = 0xc97df020

MessagesSendScreenshotNotificationRequestTypeID is TL type id of MessagesSendScreenshotNotificationRequest.

View Source
const MessagesSendVoteRequestTypeID = 0x10ea6184

MessagesSendVoteRequestTypeID is TL type id of MessagesSendVoteRequest.

View Source
const MessagesSentEncryptedFileTypeID = 0x9493ff32

MessagesSentEncryptedFileTypeID is TL type id of MessagesSentEncryptedFile.

View Source
const MessagesSentEncryptedMessageTypeID = 0x560f8935

MessagesSentEncryptedMessageTypeID is TL type id of MessagesSentEncryptedMessage.

View Source
const MessagesSetBotCallbackAnswerRequestTypeID = 0xd58f130a

MessagesSetBotCallbackAnswerRequestTypeID is TL type id of MessagesSetBotCallbackAnswerRequest.

View Source
const MessagesSetBotPrecheckoutResultsRequestTypeID = 0x9c2dd95

MessagesSetBotPrecheckoutResultsRequestTypeID is TL type id of MessagesSetBotPrecheckoutResultsRequest.

View Source
const MessagesSetBotShippingResultsRequestTypeID = 0xe5f672fa

MessagesSetBotShippingResultsRequestTypeID is TL type id of MessagesSetBotShippingResultsRequest.

View Source
const MessagesSetEncryptedTypingRequestTypeID = 0x791451ed

MessagesSetEncryptedTypingRequestTypeID is TL type id of MessagesSetEncryptedTypingRequest.

View Source
const MessagesSetGameScoreRequestTypeID = 0x8ef8ecc0

MessagesSetGameScoreRequestTypeID is TL type id of MessagesSetGameScoreRequest.

View Source
const MessagesSetInlineBotResultsRequestTypeID = 0xeb5ea206

MessagesSetInlineBotResultsRequestTypeID is TL type id of MessagesSetInlineBotResultsRequest.

View Source
const MessagesSetInlineGameScoreRequestTypeID = 0x15ad9f64

MessagesSetInlineGameScoreRequestTypeID is TL type id of MessagesSetInlineGameScoreRequest.

View Source
const MessagesSetTypingRequestTypeID = 0x58943ee2

MessagesSetTypingRequestTypeID is TL type id of MessagesSetTypingRequest.

View Source
const MessagesStartBotRequestTypeID = 0xe6df7378

MessagesStartBotRequestTypeID is TL type id of MessagesStartBotRequest.

View Source
const MessagesStickerSetInstallResultArchiveTypeID = 0x35e410a8

MessagesStickerSetInstallResultArchiveTypeID is TL type id of MessagesStickerSetInstallResultArchive.

View Source
const MessagesStickerSetInstallResultSuccessTypeID = 0x38641628

MessagesStickerSetInstallResultSuccessTypeID is TL type id of MessagesStickerSetInstallResultSuccess.

View Source
const MessagesStickerSetTypeID = 0xb60a24a6

MessagesStickerSetTypeID is TL type id of MessagesStickerSet.

View Source
const MessagesStickersNotModifiedTypeID = 0xf1749a22

MessagesStickersNotModifiedTypeID is TL type id of MessagesStickersNotModified.

View Source
const MessagesStickersTypeID = 0xe4599bbd

MessagesStickersTypeID is TL type id of MessagesStickers.

View Source
const MessagesToggleDialogPinRequestTypeID = 0xa731e257

MessagesToggleDialogPinRequestTypeID is TL type id of MessagesToggleDialogPinRequest.

View Source
const MessagesToggleStickerSetsRequestTypeID = 0xb5052fea

MessagesToggleStickerSetsRequestTypeID is TL type id of MessagesToggleStickerSetsRequest.

View Source
const MessagesUninstallStickerSetRequestTypeID = 0xf96e55de

MessagesUninstallStickerSetRequestTypeID is TL type id of MessagesUninstallStickerSetRequest.

View Source
const MessagesUnpinAllMessagesRequestTypeID = 0xf025bc8b

MessagesUnpinAllMessagesRequestTypeID is TL type id of MessagesUnpinAllMessagesRequest.

View Source
const MessagesUpdateDialogFilterRequestTypeID = 0x1ad4a04a

MessagesUpdateDialogFilterRequestTypeID is TL type id of MessagesUpdateDialogFilterRequest.

View Source
const MessagesUpdateDialogFiltersOrderRequestTypeID = 0xc563c1e4

MessagesUpdateDialogFiltersOrderRequestTypeID is TL type id of MessagesUpdateDialogFiltersOrderRequest.

View Source
const MessagesUpdatePinnedMessageRequestTypeID = 0xd2aaf7ec

MessagesUpdatePinnedMessageRequestTypeID is TL type id of MessagesUpdatePinnedMessageRequest.

View Source
const MessagesUploadEncryptedFileRequestTypeID = 0x5057c497

MessagesUploadEncryptedFileRequestTypeID is TL type id of MessagesUploadEncryptedFileRequest.

View Source
const MessagesUploadMediaRequestTypeID = 0x519bc2b1

MessagesUploadMediaRequestTypeID is TL type id of MessagesUploadMediaRequest.

View Source
const MessagesVotesListTypeID = 0x823f649

MessagesVotesListTypeID is TL type id of MessagesVotesList.

View Source
const NearestDcTypeID = 0x8e1a1775

NearestDcTypeID is TL type id of NearestDc.

View Source
const NotifyBroadcastsTypeID = 0xd612e8ef

NotifyBroadcastsTypeID is TL type id of NotifyBroadcasts.

View Source
const NotifyChatsTypeID = 0xc007cec3

NotifyChatsTypeID is TL type id of NotifyChats.

View Source
const NotifyPeerTypeID = 0x9fd40bd8

NotifyPeerTypeID is TL type id of NotifyPeer.

View Source
const NotifyUsersTypeID = 0xb4c83b4c

NotifyUsersTypeID is TL type id of NotifyUsers.

View Source
const NullTypeID = 0x56730bcc

NullTypeID is TL type id of Null.

View Source
const PageBlockAnchorTypeID = 0xce0d37b0

PageBlockAnchorTypeID is TL type id of PageBlockAnchor.

View Source
const PageBlockAudioTypeID = 0x804361ea

PageBlockAudioTypeID is TL type id of PageBlockAudio.

View Source
const PageBlockAuthorDateTypeID = 0xbaafe5e0

PageBlockAuthorDateTypeID is TL type id of PageBlockAuthorDate.

View Source
const PageBlockBlockquoteTypeID = 0x263d7c26

PageBlockBlockquoteTypeID is TL type id of PageBlockBlockquote.

View Source
const PageBlockChannelTypeID = 0xef1751b5

PageBlockChannelTypeID is TL type id of PageBlockChannel.

View Source
const PageBlockCollageTypeID = 0x65a0fa4d

PageBlockCollageTypeID is TL type id of PageBlockCollage.

View Source
const PageBlockCoverTypeID = 0x39f23300

PageBlockCoverTypeID is TL type id of PageBlockCover.

View Source
const PageBlockDetailsTypeID = 0x76768bed

PageBlockDetailsTypeID is TL type id of PageBlockDetails.

View Source
const PageBlockDividerTypeID = 0xdb20b188

PageBlockDividerTypeID is TL type id of PageBlockDivider.

View Source
const PageBlockEmbedPostTypeID = 0xf259a80b

PageBlockEmbedPostTypeID is TL type id of PageBlockEmbedPost.

View Source
const PageBlockEmbedTypeID = 0xa8718dc5

PageBlockEmbedTypeID is TL type id of PageBlockEmbed.

View Source
const PageBlockFooterTypeID = 0x48870999

PageBlockFooterTypeID is TL type id of PageBlockFooter.

View Source
const PageBlockHeaderTypeID = 0xbfd064ec

PageBlockHeaderTypeID is TL type id of PageBlockHeader.

View Source
const PageBlockKickerTypeID = 0x1e148390

PageBlockKickerTypeID is TL type id of PageBlockKicker.

View Source
const PageBlockListTypeID = 0xe4e88011

PageBlockListTypeID is TL type id of PageBlockList.

View Source
const PageBlockMapTypeID = 0xa44f3ef6

PageBlockMapTypeID is TL type id of PageBlockMap.

View Source
const PageBlockOrderedListTypeID = 0x9a8ae1e1

PageBlockOrderedListTypeID is TL type id of PageBlockOrderedList.

View Source
const PageBlockParagraphTypeID = 0x467a0766

PageBlockParagraphTypeID is TL type id of PageBlockParagraph.

View Source
const PageBlockPhotoTypeID = 0x1759c560

PageBlockPhotoTypeID is TL type id of PageBlockPhoto.

View Source
const PageBlockPreformattedTypeID = 0xc070d93e

PageBlockPreformattedTypeID is TL type id of PageBlockPreformatted.

View Source
const PageBlockPullquoteTypeID = 0x4f4456d3

PageBlockPullquoteTypeID is TL type id of PageBlockPullquote.

View Source
const PageBlockRelatedArticlesTypeID = 0x16115a96

PageBlockRelatedArticlesTypeID is TL type id of PageBlockRelatedArticles.

View Source
const PageBlockSlideshowTypeID = 0x31f9590

PageBlockSlideshowTypeID is TL type id of PageBlockSlideshow.

View Source
const PageBlockSubheaderTypeID = 0xf12bb6e1

PageBlockSubheaderTypeID is TL type id of PageBlockSubheader.

View Source
const PageBlockSubtitleTypeID = 0x8ffa9a1f

PageBlockSubtitleTypeID is TL type id of PageBlockSubtitle.

View Source
const PageBlockTableTypeID = 0xbf4dea82

PageBlockTableTypeID is TL type id of PageBlockTable.

View Source
const PageBlockTitleTypeID = 0x70abc3fd

PageBlockTitleTypeID is TL type id of PageBlockTitle.

View Source
const PageBlockUnsupportedTypeID = 0x13567e8a

PageBlockUnsupportedTypeID is TL type id of PageBlockUnsupported.

View Source
const PageBlockVideoTypeID = 0x7c8fe7b6

PageBlockVideoTypeID is TL type id of PageBlockVideo.

View Source
const PageCaptionTypeID = 0x6f747657

PageCaptionTypeID is TL type id of PageCaption.

View Source
const PageListItemBlocksTypeID = 0x25e073fc

PageListItemBlocksTypeID is TL type id of PageListItemBlocks.

View Source
const PageListItemTextTypeID = 0xb92fb6cd

PageListItemTextTypeID is TL type id of PageListItemText.

View Source
const PageListOrderedItemBlocksTypeID = 0x98dd8936

PageListOrderedItemBlocksTypeID is TL type id of PageListOrderedItemBlocks.

View Source
const PageListOrderedItemTextTypeID = 0x5e068047

PageListOrderedItemTextTypeID is TL type id of PageListOrderedItemText.

View Source
const PageRelatedArticleTypeID = 0xb390dc08

PageRelatedArticleTypeID is TL type id of PageRelatedArticle.

View Source
const PageTableCellTypeID = 0x34566b6a

PageTableCellTypeID is TL type id of PageTableCell.

View Source
const PageTableRowTypeID = 0xe0c0c5e5

PageTableRowTypeID is TL type id of PageTableRow.

View Source
const PageTypeID = 0x98657f0d

PageTypeID is TL type id of Page.

View Source
const PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowTypeID = 0x3a912d4a

PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPowTypeID is TL type id of PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.

View Source
const PasswordKdfAlgoUnknownTypeID = 0xd45ab096

PasswordKdfAlgoUnknownTypeID is TL type id of PasswordKdfAlgoUnknown.

View Source
const PaymentChargeTypeID = 0xea02c27e

PaymentChargeTypeID is TL type id of PaymentCharge.

View Source
const PaymentRequestedInfoTypeID = 0x909c3f94

PaymentRequestedInfoTypeID is TL type id of PaymentRequestedInfo.

View Source
const PaymentSavedCredentialsCardTypeID = 0xcdc27a1f

PaymentSavedCredentialsCardTypeID is TL type id of PaymentSavedCredentialsCard.

View Source
const PaymentsBankCardDataTypeID = 0x3e24e573

PaymentsBankCardDataTypeID is TL type id of PaymentsBankCardData.

View Source
const PaymentsClearSavedInfoRequestTypeID = 0xd83d70c1

PaymentsClearSavedInfoRequestTypeID is TL type id of PaymentsClearSavedInfoRequest.

View Source
const PaymentsGetBankCardDataRequestTypeID = 0x2e79d779

PaymentsGetBankCardDataRequestTypeID is TL type id of PaymentsGetBankCardDataRequest.

View Source
const PaymentsGetPaymentFormRequestTypeID = 0x99f09745

PaymentsGetPaymentFormRequestTypeID is TL type id of PaymentsGetPaymentFormRequest.

View Source
const PaymentsGetPaymentReceiptRequestTypeID = 0xa092a980

PaymentsGetPaymentReceiptRequestTypeID is TL type id of PaymentsGetPaymentReceiptRequest.

View Source
const PaymentsGetSavedInfoRequestTypeID = 0x227d824b

PaymentsGetSavedInfoRequestTypeID is TL type id of PaymentsGetSavedInfoRequest.

View Source
const PaymentsPaymentFormTypeID = 0x3f56aea3

PaymentsPaymentFormTypeID is TL type id of PaymentsPaymentForm.

View Source
const PaymentsPaymentReceiptTypeID = 0x500911e1

PaymentsPaymentReceiptTypeID is TL type id of PaymentsPaymentReceipt.

View Source
const PaymentsPaymentResultTypeID = 0x4e5f810d

PaymentsPaymentResultTypeID is TL type id of PaymentsPaymentResult.

View Source
const PaymentsPaymentVerificationNeededTypeID = 0xd8411139

PaymentsPaymentVerificationNeededTypeID is TL type id of PaymentsPaymentVerificationNeeded.

View Source
const PaymentsSavedInfoTypeID = 0xfb8fe43c

PaymentsSavedInfoTypeID is TL type id of PaymentsSavedInfo.

View Source
const PaymentsSendPaymentFormRequestTypeID = 0x2b8879b3

PaymentsSendPaymentFormRequestTypeID is TL type id of PaymentsSendPaymentFormRequest.

View Source
const PaymentsValidateRequestedInfoRequestTypeID = 0x770a8e74

PaymentsValidateRequestedInfoRequestTypeID is TL type id of PaymentsValidateRequestedInfoRequest.

View Source
const PaymentsValidatedRequestedInfoTypeID = 0xd1451883

PaymentsValidatedRequestedInfoTypeID is TL type id of PaymentsValidatedRequestedInfo.

View Source
const PeerBlockedTypeID = 0xe8fd8014

PeerBlockedTypeID is TL type id of PeerBlocked.

View Source
const PeerChannelTypeID = 0xbddde532

PeerChannelTypeID is TL type id of PeerChannel.

View Source
const PeerChatTypeID = 0xbad0e5bb

PeerChatTypeID is TL type id of PeerChat.

View Source
const PeerLocatedTypeID = 0xca461b5d

PeerLocatedTypeID is TL type id of PeerLocated.

View Source
const PeerNotifySettingsTypeID = 0xaf509d20

PeerNotifySettingsTypeID is TL type id of PeerNotifySettings.

View Source
const PeerSelfLocatedTypeID = 0xf8ec284b

PeerSelfLocatedTypeID is TL type id of PeerSelfLocated.

View Source
const PeerSettingsTypeID = 0x733f2961

PeerSettingsTypeID is TL type id of PeerSettings.

View Source
const PeerUserTypeID = 0x9db1bc6d

PeerUserTypeID is TL type id of PeerUser.

View Source
const PhoneAcceptCallRequestTypeID = 0x3bd2b4a0

PhoneAcceptCallRequestTypeID is TL type id of PhoneAcceptCallRequest.

View Source
const PhoneCallAcceptedTypeID = 0x997c454a

PhoneCallAcceptedTypeID is TL type id of PhoneCallAccepted.

View Source
const PhoneCallDiscardReasonBusyTypeID = 0xfaf7e8c9

PhoneCallDiscardReasonBusyTypeID is TL type id of PhoneCallDiscardReasonBusy.

View Source
const PhoneCallDiscardReasonDisconnectTypeID = 0xe095c1a0

PhoneCallDiscardReasonDisconnectTypeID is TL type id of PhoneCallDiscardReasonDisconnect.

View Source
const PhoneCallDiscardReasonHangupTypeID = 0x57adc690

PhoneCallDiscardReasonHangupTypeID is TL type id of PhoneCallDiscardReasonHangup.

View Source
const PhoneCallDiscardReasonMissedTypeID = 0x85e42301

PhoneCallDiscardReasonMissedTypeID is TL type id of PhoneCallDiscardReasonMissed.

View Source
const PhoneCallDiscardedTypeID = 0x50ca4de1

PhoneCallDiscardedTypeID is TL type id of PhoneCallDiscarded.

View Source
const PhoneCallEmptyTypeID = 0x5366c915

PhoneCallEmptyTypeID is TL type id of PhoneCallEmpty.

View Source
const PhoneCallProtocolTypeID = 0xfc878fc8

PhoneCallProtocolTypeID is TL type id of PhoneCallProtocol.

View Source
const PhoneCallRequestedTypeID = 0x87eabb53

PhoneCallRequestedTypeID is TL type id of PhoneCallRequested.

View Source
const PhoneCallTypeID = 0x8742ae7f

PhoneCallTypeID is TL type id of PhoneCall.

View Source
const PhoneCallWaitingTypeID = 0x1b8f4ad1

PhoneCallWaitingTypeID is TL type id of PhoneCallWaiting.

View Source
const PhoneCheckGroupCallRequestTypeID = 0xb74a7bea

PhoneCheckGroupCallRequestTypeID is TL type id of PhoneCheckGroupCallRequest.

View Source
const PhoneConfirmCallRequestTypeID = 0x2efe1722

PhoneConfirmCallRequestTypeID is TL type id of PhoneConfirmCallRequest.

View Source
const PhoneConnectionTypeID = 0x9d4c17c0

PhoneConnectionTypeID is TL type id of PhoneConnection.

View Source
const PhoneConnectionWebrtcTypeID = 0x635fe375

PhoneConnectionWebrtcTypeID is TL type id of PhoneConnectionWebrtc.

View Source
const PhoneCreateGroupCallRequestTypeID = 0xbd3dabe0

PhoneCreateGroupCallRequestTypeID is TL type id of PhoneCreateGroupCallRequest.

View Source
const PhoneDiscardCallRequestTypeID = 0xb2cbc1c0

PhoneDiscardCallRequestTypeID is TL type id of PhoneDiscardCallRequest.

View Source
const PhoneDiscardGroupCallRequestTypeID = 0x7a777135

PhoneDiscardGroupCallRequestTypeID is TL type id of PhoneDiscardGroupCallRequest.

View Source
const PhoneEditGroupCallMemberRequestTypeID = 0x63146ae4

PhoneEditGroupCallMemberRequestTypeID is TL type id of PhoneEditGroupCallMemberRequest.

View Source
const PhoneGetCallConfigRequestTypeID = 0x55451fa9

PhoneGetCallConfigRequestTypeID is TL type id of PhoneGetCallConfigRequest.

View Source
const PhoneGetGroupCallRequestTypeID = 0xc7cb017

PhoneGetGroupCallRequestTypeID is TL type id of PhoneGetGroupCallRequest.

View Source
const PhoneGetGroupParticipantsRequestTypeID = 0xc9f1d285

PhoneGetGroupParticipantsRequestTypeID is TL type id of PhoneGetGroupParticipantsRequest.

View Source
const PhoneGroupCallTypeID = 0x66ab0bfc

PhoneGroupCallTypeID is TL type id of PhoneGroupCall.

View Source
const PhoneGroupParticipantsTypeID = 0x9cfeb92d

PhoneGroupParticipantsTypeID is TL type id of PhoneGroupParticipants.

View Source
const PhoneInviteToGroupCallRequestTypeID = 0x7b393160

PhoneInviteToGroupCallRequestTypeID is TL type id of PhoneInviteToGroupCallRequest.

View Source
const PhoneJoinGroupCallRequestTypeID = 0x5f9c8e62

PhoneJoinGroupCallRequestTypeID is TL type id of PhoneJoinGroupCallRequest.

View Source
const PhoneLeaveGroupCallRequestTypeID = 0x500377f9

PhoneLeaveGroupCallRequestTypeID is TL type id of PhoneLeaveGroupCallRequest.

View Source
const PhonePhoneCallTypeID = 0xec82e140

PhonePhoneCallTypeID is TL type id of PhonePhoneCall.

View Source
const PhoneReceivedCallRequestTypeID = 0x17d54f61

PhoneReceivedCallRequestTypeID is TL type id of PhoneReceivedCallRequest.

View Source
const PhoneRequestCallRequestTypeID = 0x42ff96ed

PhoneRequestCallRequestTypeID is TL type id of PhoneRequestCallRequest.

View Source
const PhoneSaveCallDebugRequestTypeID = 0x277add7e

PhoneSaveCallDebugRequestTypeID is TL type id of PhoneSaveCallDebugRequest.

View Source
const PhoneSendSignalingDataRequestTypeID = 0xff7a9383

PhoneSendSignalingDataRequestTypeID is TL type id of PhoneSendSignalingDataRequest.

View Source
const PhoneSetCallRatingRequestTypeID = 0x59ead627

PhoneSetCallRatingRequestTypeID is TL type id of PhoneSetCallRatingRequest.

View Source
const PhoneToggleGroupCallSettingsRequestTypeID = 0x74bbb43d

PhoneToggleGroupCallSettingsRequestTypeID is TL type id of PhoneToggleGroupCallSettingsRequest.

View Source
const PhotoCachedSizeTypeID = 0xe9a734fa

PhotoCachedSizeTypeID is TL type id of PhotoCachedSize.

View Source
const PhotoEmptyTypeID = 0x2331b22d

PhotoEmptyTypeID is TL type id of PhotoEmpty.

View Source
const PhotoPathSizeTypeID = 0xd8214d41

PhotoPathSizeTypeID is TL type id of PhotoPathSize.

View Source
const PhotoSizeEmptyTypeID = 0xe17e23c

PhotoSizeEmptyTypeID is TL type id of PhotoSizeEmpty.

View Source
const PhotoSizeProgressiveTypeID = 0x5aa86a51

PhotoSizeProgressiveTypeID is TL type id of PhotoSizeProgressive.

View Source
const PhotoSizeTypeID = 0x77bfb61b

PhotoSizeTypeID is TL type id of PhotoSize.

View Source
const PhotoStrippedSizeTypeID = 0xe0b0bc2e

PhotoStrippedSizeTypeID is TL type id of PhotoStrippedSize.

View Source
const PhotoTypeID = 0xfb197a65

PhotoTypeID is TL type id of Photo.

View Source
const PhotosDeletePhotosRequestTypeID = 0x87cf7f2f

PhotosDeletePhotosRequestTypeID is TL type id of PhotosDeletePhotosRequest.

View Source
const PhotosGetUserPhotosRequestTypeID = 0x91cd32a8

PhotosGetUserPhotosRequestTypeID is TL type id of PhotosGetUserPhotosRequest.

View Source
const PhotosPhotoTypeID = 0x20212ca8

PhotosPhotoTypeID is TL type id of PhotosPhoto.

View Source
const PhotosPhotosSliceTypeID = 0x15051f54

PhotosPhotosSliceTypeID is TL type id of PhotosPhotosSlice.

View Source
const PhotosPhotosTypeID = 0x8dca6aa5

PhotosPhotosTypeID is TL type id of PhotosPhotos.

View Source
const PhotosUpdateProfilePhotoRequestTypeID = 0x72d4742c

PhotosUpdateProfilePhotoRequestTypeID is TL type id of PhotosUpdateProfilePhotoRequest.

View Source
const PhotosUploadProfilePhotoRequestTypeID = 0x89f30f69

PhotosUploadProfilePhotoRequestTypeID is TL type id of PhotosUploadProfilePhotoRequest.

View Source
const PollAnswerTypeID = 0x6ca9c2e9

PollAnswerTypeID is TL type id of PollAnswer.

View Source
const PollAnswerVotersTypeID = 0x3b6ddad2

PollAnswerVotersTypeID is TL type id of PollAnswerVoters.

View Source
const PollResultsTypeID = 0xbadcc1a3

PollResultsTypeID is TL type id of PollResults.

View Source
const PollTypeID = 0x86e18161

PollTypeID is TL type id of Poll.

View Source
const PopularContactTypeID = 0x5ce14175

PopularContactTypeID is TL type id of PopularContact.

View Source
const PostAddressTypeID = 0x1e8caaeb

PostAddressTypeID is TL type id of PostAddress.

View Source
const PrivacyKeyAddedByPhoneTypeID = 0x42ffd42b

PrivacyKeyAddedByPhoneTypeID is TL type id of PrivacyKeyAddedByPhone.

View Source
const PrivacyKeyChatInviteTypeID = 0x500e6dfa

PrivacyKeyChatInviteTypeID is TL type id of PrivacyKeyChatInvite.

View Source
const PrivacyKeyForwardsTypeID = 0x69ec56a3

PrivacyKeyForwardsTypeID is TL type id of PrivacyKeyForwards.

View Source
const PrivacyKeyPhoneCallTypeID = 0x3d662b7b

PrivacyKeyPhoneCallTypeID is TL type id of PrivacyKeyPhoneCall.

View Source
const PrivacyKeyPhoneNumberTypeID = 0xd19ae46d

PrivacyKeyPhoneNumberTypeID is TL type id of PrivacyKeyPhoneNumber.

View Source
const PrivacyKeyPhoneP2PTypeID = 0x39491cc8

PrivacyKeyPhoneP2PTypeID is TL type id of PrivacyKeyPhoneP2P.

View Source
const PrivacyKeyProfilePhotoTypeID = 0x96151fed

PrivacyKeyProfilePhotoTypeID is TL type id of PrivacyKeyProfilePhoto.

View Source
const PrivacyKeyStatusTimestampTypeID = 0xbc2eab30

PrivacyKeyStatusTimestampTypeID is TL type id of PrivacyKeyStatusTimestamp.

View Source
const PrivacyValueAllowAllTypeID = 0x65427b82

PrivacyValueAllowAllTypeID is TL type id of PrivacyValueAllowAll.

View Source
const PrivacyValueAllowChatParticipantsTypeID = 0x18be796b

PrivacyValueAllowChatParticipantsTypeID is TL type id of PrivacyValueAllowChatParticipants.

View Source
const PrivacyValueAllowContactsTypeID = 0xfffe1bac

PrivacyValueAllowContactsTypeID is TL type id of PrivacyValueAllowContacts.

View Source
const PrivacyValueAllowUsersTypeID = 0x4d5bbe0c

PrivacyValueAllowUsersTypeID is TL type id of PrivacyValueAllowUsers.

View Source
const PrivacyValueDisallowAllTypeID = 0x8b73e763

PrivacyValueDisallowAllTypeID is TL type id of PrivacyValueDisallowAll.

View Source
const PrivacyValueDisallowChatParticipantsTypeID = 0xacae0690

PrivacyValueDisallowChatParticipantsTypeID is TL type id of PrivacyValueDisallowChatParticipants.

View Source
const PrivacyValueDisallowContactsTypeID = 0xf888fa1a

PrivacyValueDisallowContactsTypeID is TL type id of PrivacyValueDisallowContacts.

View Source
const PrivacyValueDisallowUsersTypeID = 0xc7f49b7

PrivacyValueDisallowUsersTypeID is TL type id of PrivacyValueDisallowUsers.

View Source
const ReceivedNotifyMessageTypeID = 0xa384b779

ReceivedNotifyMessageTypeID is TL type id of ReceivedNotifyMessage.

View Source
const RecentMeUrlChatInviteTypeID = 0xeb49081d

RecentMeUrlChatInviteTypeID is TL type id of RecentMeUrlChatInvite.

View Source
const RecentMeUrlChatTypeID = 0xa01b22f9

RecentMeUrlChatTypeID is TL type id of RecentMeUrlChat.

View Source
const RecentMeUrlStickerSetTypeID = 0xbc0a57dc

RecentMeUrlStickerSetTypeID is TL type id of RecentMeUrlStickerSet.

View Source
const RecentMeUrlUnknownTypeID = 0x46e1d13d

RecentMeUrlUnknownTypeID is TL type id of RecentMeUrlUnknown.

View Source
const RecentMeUrlUserTypeID = 0x8dbc3336

RecentMeUrlUserTypeID is TL type id of RecentMeUrlUser.

View Source
const ReplyInlineMarkupTypeID = 0x48a30254

ReplyInlineMarkupTypeID is TL type id of ReplyInlineMarkup.

View Source
const ReplyKeyboardForceReplyTypeID = 0xf4108aa0

ReplyKeyboardForceReplyTypeID is TL type id of ReplyKeyboardForceReply.

View Source
const ReplyKeyboardHideTypeID = 0xa03e5b85

ReplyKeyboardHideTypeID is TL type id of ReplyKeyboardHide.

View Source
const ReplyKeyboardMarkupTypeID = 0x3502758c

ReplyKeyboardMarkupTypeID is TL type id of ReplyKeyboardMarkup.

View Source
const RestrictionReasonTypeID = 0xd072acb4

RestrictionReasonTypeID is TL type id of RestrictionReason.

View Source
const SavedPhoneContactTypeID = 0x1142bd56

SavedPhoneContactTypeID is TL type id of SavedPhoneContact.

View Source
const SecureCredentialsEncryptedTypeID = 0x33f0ea47

SecureCredentialsEncryptedTypeID is TL type id of SecureCredentialsEncrypted.

View Source
const SecureDataTypeID = 0x8aeabec3

SecureDataTypeID is TL type id of SecureData.

View Source
const SecureFileEmptyTypeID = 0x64199744

SecureFileEmptyTypeID is TL type id of SecureFileEmpty.

View Source
const SecureFileTypeID = 0xe0277a62

SecureFileTypeID is TL type id of SecureFile.

View Source
const SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000TypeID = 0xbbf2dda0

SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000TypeID is TL type id of SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000.

View Source
const SecurePasswordKdfAlgoSHA512TypeID = 0x86471d92

SecurePasswordKdfAlgoSHA512TypeID is TL type id of SecurePasswordKdfAlgoSHA512.

View Source
const SecurePasswordKdfAlgoUnknownTypeID = 0x4a8537

SecurePasswordKdfAlgoUnknownTypeID is TL type id of SecurePasswordKdfAlgoUnknown.

View Source
const SecurePlainEmailTypeID = 0x21ec5a5f

SecurePlainEmailTypeID is TL type id of SecurePlainEmail.

View Source
const SecurePlainPhoneTypeID = 0x7d6099dd

SecurePlainPhoneTypeID is TL type id of SecurePlainPhone.

View Source
const SecureRequiredTypeOneOfTypeID = 0x27477b4

SecureRequiredTypeOneOfTypeID is TL type id of SecureRequiredTypeOneOf.

View Source
const SecureRequiredTypeTypeID = 0x829d99da

SecureRequiredTypeTypeID is TL type id of SecureRequiredType.

View Source
const SecureSecretSettingsTypeID = 0x1527bcac

SecureSecretSettingsTypeID is TL type id of SecureSecretSettings.

View Source
const SecureValueErrorDataTypeID = 0xe8a40bd9

SecureValueErrorDataTypeID is TL type id of SecureValueErrorData.

View Source
const SecureValueErrorFileTypeID = 0x7a700873

SecureValueErrorFileTypeID is TL type id of SecureValueErrorFile.

View Source
const SecureValueErrorFilesTypeID = 0x666220e9

SecureValueErrorFilesTypeID is TL type id of SecureValueErrorFiles.

View Source
const SecureValueErrorFrontSideTypeID = 0xbe3dfa

SecureValueErrorFrontSideTypeID is TL type id of SecureValueErrorFrontSide.

View Source
const SecureValueErrorReverseSideTypeID = 0x868a2aa5

SecureValueErrorReverseSideTypeID is TL type id of SecureValueErrorReverseSide.

View Source
const SecureValueErrorSelfieTypeID = 0xe537ced6

SecureValueErrorSelfieTypeID is TL type id of SecureValueErrorSelfie.

View Source
const SecureValueErrorTranslationFileTypeID = 0xa1144770

SecureValueErrorTranslationFileTypeID is TL type id of SecureValueErrorTranslationFile.

View Source
const SecureValueErrorTranslationFilesTypeID = 0x34636dd8

SecureValueErrorTranslationFilesTypeID is TL type id of SecureValueErrorTranslationFiles.

View Source
const SecureValueErrorTypeID = 0x869d758f

SecureValueErrorTypeID is TL type id of SecureValueError.

View Source
const SecureValueHashTypeID = 0xed1ecdb0

SecureValueHashTypeID is TL type id of SecureValueHash.

View Source
const SecureValueTypeAddressTypeID = 0xcbe31e26

SecureValueTypeAddressTypeID is TL type id of SecureValueTypeAddress.

View Source
const SecureValueTypeBankStatementTypeID = 0x89137c0d

SecureValueTypeBankStatementTypeID is TL type id of SecureValueTypeBankStatement.

View Source
const SecureValueTypeDriverLicenseTypeID = 0x6e425c4

SecureValueTypeDriverLicenseTypeID is TL type id of SecureValueTypeDriverLicense.

View Source
const SecureValueTypeEmailTypeID = 0x8e3ca7ee

SecureValueTypeEmailTypeID is TL type id of SecureValueTypeEmail.

View Source
const SecureValueTypeID = 0x187fa0ca

SecureValueTypeID is TL type id of SecureValue.

View Source
const SecureValueTypeIdentityCardTypeID = 0xa0d0744b

SecureValueTypeIdentityCardTypeID is TL type id of SecureValueTypeIdentityCard.

View Source
const SecureValueTypeInternalPassportTypeID = 0x99a48f23

SecureValueTypeInternalPassportTypeID is TL type id of SecureValueTypeInternalPassport.

View Source
const SecureValueTypePassportRegistrationTypeID = 0x99e3806a

SecureValueTypePassportRegistrationTypeID is TL type id of SecureValueTypePassportRegistration.

View Source
const SecureValueTypePassportTypeID = 0x3dac6a00

SecureValueTypePassportTypeID is TL type id of SecureValueTypePassport.

View Source
const SecureValueTypePersonalDetailsTypeID = 0x9d2a81e3

SecureValueTypePersonalDetailsTypeID is TL type id of SecureValueTypePersonalDetails.

View Source
const SecureValueTypePhoneTypeID = 0xb320aadb

SecureValueTypePhoneTypeID is TL type id of SecureValueTypePhone.

View Source
const SecureValueTypeRentalAgreementTypeID = 0x8b883488

SecureValueTypeRentalAgreementTypeID is TL type id of SecureValueTypeRentalAgreement.

View Source
const SecureValueTypeTemporaryRegistrationTypeID = 0xea02ec33

SecureValueTypeTemporaryRegistrationTypeID is TL type id of SecureValueTypeTemporaryRegistration.

View Source
const SecureValueTypeUtilityBillTypeID = 0xfc36954e

SecureValueTypeUtilityBillTypeID is TL type id of SecureValueTypeUtilityBill.

View Source
const SendMessageCancelActionTypeID = 0xfd5ec8f5

SendMessageCancelActionTypeID is TL type id of SendMessageCancelAction.

View Source
const SendMessageChooseContactActionTypeID = 0x628cbc6f

SendMessageChooseContactActionTypeID is TL type id of SendMessageChooseContactAction.

View Source
const SendMessageGamePlayActionTypeID = 0xdd6a8f48

SendMessageGamePlayActionTypeID is TL type id of SendMessageGamePlayAction.

View Source
const SendMessageGeoLocationActionTypeID = 0x176f8ba1

SendMessageGeoLocationActionTypeID is TL type id of SendMessageGeoLocationAction.

View Source
const SendMessageRecordAudioActionTypeID = 0xd52f73f7

SendMessageRecordAudioActionTypeID is TL type id of SendMessageRecordAudioAction.

View Source
const SendMessageRecordRoundActionTypeID = 0x88f27fbc

SendMessageRecordRoundActionTypeID is TL type id of SendMessageRecordRoundAction.

View Source
const SendMessageRecordVideoActionTypeID = 0xa187d66f

SendMessageRecordVideoActionTypeID is TL type id of SendMessageRecordVideoAction.

View Source
const SendMessageTypingActionTypeID = 0x16bf744e

SendMessageTypingActionTypeID is TL type id of SendMessageTypingAction.

View Source
const SendMessageUploadAudioActionTypeID = 0xf351d7ab

SendMessageUploadAudioActionTypeID is TL type id of SendMessageUploadAudioAction.

View Source
const SendMessageUploadDocumentActionTypeID = 0xaa0cd9e4

SendMessageUploadDocumentActionTypeID is TL type id of SendMessageUploadDocumentAction.

View Source
const SendMessageUploadPhotoActionTypeID = 0xd1d34a26

SendMessageUploadPhotoActionTypeID is TL type id of SendMessageUploadPhotoAction.

View Source
const SendMessageUploadRoundActionTypeID = 0x243e1c66

SendMessageUploadRoundActionTypeID is TL type id of SendMessageUploadRoundAction.

View Source
const SendMessageUploadVideoActionTypeID = 0xe9763aec

SendMessageUploadVideoActionTypeID is TL type id of SendMessageUploadVideoAction.

View Source
const ShippingOptionTypeID = 0xb6213cdf

ShippingOptionTypeID is TL type id of ShippingOption.

View Source
const SpeakingInGroupCallActionTypeID = 0xd92c2285

SpeakingInGroupCallActionTypeID is TL type id of SpeakingInGroupCallAction.

View Source
const StatsAbsValueAndPrevTypeID = 0xcb43acde

StatsAbsValueAndPrevTypeID is TL type id of StatsAbsValueAndPrev.

View Source
const StatsBroadcastStatsTypeID = 0xbdf78394

StatsBroadcastStatsTypeID is TL type id of StatsBroadcastStats.

View Source
const StatsDateRangeDaysTypeID = 0xb637edaf

StatsDateRangeDaysTypeID is TL type id of StatsDateRangeDays.

View Source
const StatsGetBroadcastStatsRequestTypeID = 0xab42441a

StatsGetBroadcastStatsRequestTypeID is TL type id of StatsGetBroadcastStatsRequest.

View Source
const StatsGetMegagroupStatsRequestTypeID = 0xdcdf8607

StatsGetMegagroupStatsRequestTypeID is TL type id of StatsGetMegagroupStatsRequest.

View Source
const StatsGetMessagePublicForwardsRequestTypeID = 0x5630281b

StatsGetMessagePublicForwardsRequestTypeID is TL type id of StatsGetMessagePublicForwardsRequest.

View Source
const StatsGetMessageStatsRequestTypeID = 0xb6e0a3f5

StatsGetMessageStatsRequestTypeID is TL type id of StatsGetMessageStatsRequest.

View Source
const StatsGraphAsyncTypeID = 0x4a27eb2d

StatsGraphAsyncTypeID is TL type id of StatsGraphAsync.

View Source
const StatsGraphErrorTypeID = 0xbedc9822

StatsGraphErrorTypeID is TL type id of StatsGraphError.

View Source
const StatsGraphTypeID = 0x8ea464b6

StatsGraphTypeID is TL type id of StatsGraph.

View Source
const StatsGroupTopAdminTypeID = 0x6014f412

StatsGroupTopAdminTypeID is TL type id of StatsGroupTopAdmin.

View Source
const StatsGroupTopInviterTypeID = 0x31962a4c

StatsGroupTopInviterTypeID is TL type id of StatsGroupTopInviter.

View Source
const StatsGroupTopPosterTypeID = 0x18f3d0f7

StatsGroupTopPosterTypeID is TL type id of StatsGroupTopPoster.

View Source
const StatsLoadAsyncGraphRequestTypeID = 0x621d5fa0

StatsLoadAsyncGraphRequestTypeID is TL type id of StatsLoadAsyncGraphRequest.

View Source
const StatsMegagroupStatsTypeID = 0xef7ff916

StatsMegagroupStatsTypeID is TL type id of StatsMegagroupStats.

View Source
const StatsMessageStatsTypeID = 0x8999f295

StatsMessageStatsTypeID is TL type id of StatsMessageStats.

View Source
const StatsPercentValueTypeID = 0xcbce2fe0

StatsPercentValueTypeID is TL type id of StatsPercentValue.

View Source
const StatsURLTypeID = 0x47a971e0

StatsURLTypeID is TL type id of StatsURL.

View Source
const StickerPackTypeID = 0x12b299d4

StickerPackTypeID is TL type id of StickerPack.

View Source
const StickerSetCoveredTypeID = 0x6410a5d2

StickerSetCoveredTypeID is TL type id of StickerSetCovered.

View Source
const StickerSetMultiCoveredTypeID = 0x3407e51b

StickerSetMultiCoveredTypeID is TL type id of StickerSetMultiCovered.

View Source
const StickerSetTypeID = 0x40e237a8

StickerSetTypeID is TL type id of StickerSet.

View Source
const StickersAddStickerToSetRequestTypeID = 0x8653febe

StickersAddStickerToSetRequestTypeID is TL type id of StickersAddStickerToSetRequest.

View Source
const StickersChangeStickerPositionRequestTypeID = 0xffb6d4ca

StickersChangeStickerPositionRequestTypeID is TL type id of StickersChangeStickerPositionRequest.

View Source
const StickersCreateStickerSetRequestTypeID = 0xf1036780

StickersCreateStickerSetRequestTypeID is TL type id of StickersCreateStickerSetRequest.

View Source
const StickersRemoveStickerFromSetRequestTypeID = 0xf7760f51

StickersRemoveStickerFromSetRequestTypeID is TL type id of StickersRemoveStickerFromSetRequest.

View Source
const StickersSetStickerSetThumbRequestTypeID = 0x9a364e30

StickersSetStickerSetThumbRequestTypeID is TL type id of StickersSetStickerSetThumbRequest.

View Source
const StorageFileGifTypeID = 0xcae1aadf

StorageFileGifTypeID is TL type id of StorageFileGif.

View Source
const StorageFileJpegTypeID = 0x7efe0e

StorageFileJpegTypeID is TL type id of StorageFileJpeg.

View Source
const StorageFileMovTypeID = 0x4b09ebbc

StorageFileMovTypeID is TL type id of StorageFileMov.

View Source
const StorageFileMp3TypeID = 0x528a0677

StorageFileMp3TypeID is TL type id of StorageFileMp3.

View Source
const StorageFileMp4TypeID = 0xb3cea0e4

StorageFileMp4TypeID is TL type id of StorageFileMp4.

View Source
const StorageFilePartialTypeID = 0x40bc6f52

StorageFilePartialTypeID is TL type id of StorageFilePartial.

View Source
const StorageFilePdfTypeID = 0xae1e508d

StorageFilePdfTypeID is TL type id of StorageFilePdf.

View Source
const StorageFilePngTypeID = 0xa4f63c0

StorageFilePngTypeID is TL type id of StorageFilePng.

View Source
const StorageFileUnknownTypeID = 0xaa963b05

StorageFileUnknownTypeID is TL type id of StorageFileUnknown.

View Source
const StorageFileWebpTypeID = 0x1081464c

StorageFileWebpTypeID is TL type id of StorageFileWebp.

View Source
const TextAnchorTypeID = 0x35553762

TextAnchorTypeID is TL type id of TextAnchor.

View Source
const TextBoldTypeID = 0x6724abc4

TextBoldTypeID is TL type id of TextBold.

View Source
const TextConcatTypeID = 0x7e6260d7

TextConcatTypeID is TL type id of TextConcat.

View Source
const TextEmailTypeID = 0xde5a0dd6

TextEmailTypeID is TL type id of TextEmail.

View Source
const TextEmptyTypeID = 0xdc3d824f

TextEmptyTypeID is TL type id of TextEmpty.

View Source
const TextFixedTypeID = 0x6c3f19b9

TextFixedTypeID is TL type id of TextFixed.

View Source
const TextImageTypeID = 0x81ccf4f

TextImageTypeID is TL type id of TextImage.

View Source
const TextItalicTypeID = 0xd912a59c

TextItalicTypeID is TL type id of TextItalic.

View Source
const TextMarkedTypeID = 0x34b8621

TextMarkedTypeID is TL type id of TextMarked.

View Source
const TextPhoneTypeID = 0x1ccb966a

TextPhoneTypeID is TL type id of TextPhone.

View Source
const TextPlainTypeID = 0x744694e0

TextPlainTypeID is TL type id of TextPlain.

View Source
const TextStrikeTypeID = 0x9bf8bb95

TextStrikeTypeID is TL type id of TextStrike.

View Source
const TextSubscriptTypeID = 0xed6a8504

TextSubscriptTypeID is TL type id of TextSubscript.

View Source
const TextSuperscriptTypeID = 0xc7fb5e01

TextSuperscriptTypeID is TL type id of TextSuperscript.

View Source
const TextUnderlineTypeID = 0xc12622c4

TextUnderlineTypeID is TL type id of TextUnderline.

View Source
const TextUrlTypeID = 0x3c2884c1

TextUrlTypeID is TL type id of TextUrl.

View Source
const ThemeSettingsTypeID = 0x9c14984a

ThemeSettingsTypeID is TL type id of ThemeSettings.

View Source
const ThemeTypeID = 0x28f1114

ThemeTypeID is TL type id of Theme.

View Source
const TopPeerCategoryBotsInlineTypeID = 0x148677e2

TopPeerCategoryBotsInlineTypeID is TL type id of TopPeerCategoryBotsInline.

View Source
const TopPeerCategoryBotsPMTypeID = 0xab661b5b

TopPeerCategoryBotsPMTypeID is TL type id of TopPeerCategoryBotsPM.

View Source
const TopPeerCategoryChannelsTypeID = 0x161d9628

TopPeerCategoryChannelsTypeID is TL type id of TopPeerCategoryChannels.

View Source
const TopPeerCategoryCorrespondentsTypeID = 0x637b7ed

TopPeerCategoryCorrespondentsTypeID is TL type id of TopPeerCategoryCorrespondents.

View Source
const TopPeerCategoryForwardChatsTypeID = 0xfbeec0f0

TopPeerCategoryForwardChatsTypeID is TL type id of TopPeerCategoryForwardChats.

View Source
const TopPeerCategoryForwardUsersTypeID = 0xa8406ca9

TopPeerCategoryForwardUsersTypeID is TL type id of TopPeerCategoryForwardUsers.

View Source
const TopPeerCategoryGroupsTypeID = 0xbd17a14a

TopPeerCategoryGroupsTypeID is TL type id of TopPeerCategoryGroups.

View Source
const TopPeerCategoryPeersTypeID = 0xfb834291

TopPeerCategoryPeersTypeID is TL type id of TopPeerCategoryPeers.

View Source
const TopPeerCategoryPhoneCallsTypeID = 0x1e76a78c

TopPeerCategoryPhoneCallsTypeID is TL type id of TopPeerCategoryPhoneCalls.

View Source
const TopPeerTypeID = 0xedcdc05b

TopPeerTypeID is TL type id of TopPeer.

View Source
const TrueTypeID = 0x3fedd339

TrueTypeID is TL type id of True.

View Source
const UpdateBotCallbackQueryTypeID = 0xe73547e1

UpdateBotCallbackQueryTypeID is TL type id of UpdateBotCallbackQuery.

View Source
const UpdateBotInlineQueryTypeID = 0x3f2038db

UpdateBotInlineQueryTypeID is TL type id of UpdateBotInlineQuery.

View Source
const UpdateBotInlineSendTypeID = 0xe48f964

UpdateBotInlineSendTypeID is TL type id of UpdateBotInlineSend.

View Source
const UpdateBotPrecheckoutQueryTypeID = 0x5d2f3aa9

UpdateBotPrecheckoutQueryTypeID is TL type id of UpdateBotPrecheckoutQuery.

View Source
const UpdateBotShippingQueryTypeID = 0xe0cdc940

UpdateBotShippingQueryTypeID is TL type id of UpdateBotShippingQuery.

View Source
const UpdateBotWebhookJSONQueryTypeID = 0x9b9240a6

UpdateBotWebhookJSONQueryTypeID is TL type id of UpdateBotWebhookJSONQuery.

View Source
const UpdateBotWebhookJSONTypeID = 0x8317c0c3

UpdateBotWebhookJSONTypeID is TL type id of UpdateBotWebhookJSON.

View Source
const UpdateChannelAvailableMessagesTypeID = 0x70db6837

UpdateChannelAvailableMessagesTypeID is TL type id of UpdateChannelAvailableMessages.

View Source
const UpdateChannelMessageForwardsTypeID = 0x6e8a84df

UpdateChannelMessageForwardsTypeID is TL type id of UpdateChannelMessageForwards.

View Source
const UpdateChannelMessageViewsTypeID = 0x98a12b4b

UpdateChannelMessageViewsTypeID is TL type id of UpdateChannelMessageViews.

View Source
const UpdateChannelParticipantTypeID = 0x65d2b464

UpdateChannelParticipantTypeID is TL type id of UpdateChannelParticipant.

View Source
const UpdateChannelReadMessagesContentsTypeID = 0x89893b45

UpdateChannelReadMessagesContentsTypeID is TL type id of UpdateChannelReadMessagesContents.

View Source
const UpdateChannelTooLongTypeID = 0xeb0467fb

UpdateChannelTooLongTypeID is TL type id of UpdateChannelTooLong.

View Source
const UpdateChannelTypeID = 0xb6d45656

UpdateChannelTypeID is TL type id of UpdateChannel.

View Source
const UpdateChannelUserTypingTypeID = 0xff2abe9f

UpdateChannelUserTypingTypeID is TL type id of UpdateChannelUserTyping.

View Source
const UpdateChannelWebPageTypeID = 0x40771900

UpdateChannelWebPageTypeID is TL type id of UpdateChannelWebPage.

View Source
const UpdateChatDefaultBannedRightsTypeID = 0x54c01850

UpdateChatDefaultBannedRightsTypeID is TL type id of UpdateChatDefaultBannedRights.

View Source
const UpdateChatParticipantAddTypeID = 0xea4b0e5c

UpdateChatParticipantAddTypeID is TL type id of UpdateChatParticipantAdd.

View Source
const UpdateChatParticipantAdminTypeID = 0xb6901959

UpdateChatParticipantAdminTypeID is TL type id of UpdateChatParticipantAdmin.

View Source
const UpdateChatParticipantDeleteTypeID = 0x6e5f8c22

UpdateChatParticipantDeleteTypeID is TL type id of UpdateChatParticipantDelete.

View Source
const UpdateChatParticipantsTypeID = 0x7761198

UpdateChatParticipantsTypeID is TL type id of UpdateChatParticipants.

View Source
const UpdateChatTypeID = 0x1330a196

UpdateChatTypeID is TL type id of UpdateChat.

View Source
const UpdateChatUserTypingTypeID = 0x9a65ea1f

UpdateChatUserTypingTypeID is TL type id of UpdateChatUserTyping.

View Source
const UpdateConfigTypeID = 0xa229dd06

UpdateConfigTypeID is TL type id of UpdateConfig.

View Source
const UpdateContactsResetTypeID = 0x7084a7be

UpdateContactsResetTypeID is TL type id of UpdateContactsReset.

View Source
const UpdateDcOptionsTypeID = 0x8e5e9873

UpdateDcOptionsTypeID is TL type id of UpdateDcOptions.

View Source
const UpdateDeleteChannelMessagesTypeID = 0xc37521c9

UpdateDeleteChannelMessagesTypeID is TL type id of UpdateDeleteChannelMessages.

View Source
const UpdateDeleteMessagesTypeID = 0xa20db0e5

UpdateDeleteMessagesTypeID is TL type id of UpdateDeleteMessages.

View Source
const UpdateDeleteScheduledMessagesTypeID = 0x90866cee

UpdateDeleteScheduledMessagesTypeID is TL type id of UpdateDeleteScheduledMessages.

View Source
const UpdateDialogFilterOrderTypeID = 0xa5d72105

UpdateDialogFilterOrderTypeID is TL type id of UpdateDialogFilterOrder.

View Source
const UpdateDialogFilterTypeID = 0x26ffde7d

UpdateDialogFilterTypeID is TL type id of UpdateDialogFilter.

View Source
const UpdateDialogFiltersTypeID = 0x3504914f

UpdateDialogFiltersTypeID is TL type id of UpdateDialogFilters.

View Source
const UpdateDialogPinnedTypeID = 0x6e6fe51c

UpdateDialogPinnedTypeID is TL type id of UpdateDialogPinned.

View Source
const UpdateDialogUnreadMarkTypeID = 0xe16459c3

UpdateDialogUnreadMarkTypeID is TL type id of UpdateDialogUnreadMark.

View Source
const UpdateDraftMessageTypeID = 0xee2bb969

UpdateDraftMessageTypeID is TL type id of UpdateDraftMessage.

View Source
const UpdateEditChannelMessageTypeID = 0x1b3f4df7

UpdateEditChannelMessageTypeID is TL type id of UpdateEditChannelMessage.

View Source
const UpdateEditMessageTypeID = 0xe40370a3

UpdateEditMessageTypeID is TL type id of UpdateEditMessage.

View Source
const UpdateEncryptedChatTypingTypeID = 0x1710f156

UpdateEncryptedChatTypingTypeID is TL type id of UpdateEncryptedChatTyping.

View Source
const UpdateEncryptedMessagesReadTypeID = 0x38fe25b7

UpdateEncryptedMessagesReadTypeID is TL type id of UpdateEncryptedMessagesRead.

View Source
const UpdateEncryptionTypeID = 0xb4a2e88d

UpdateEncryptionTypeID is TL type id of UpdateEncryption.

View Source
const UpdateFavedStickersTypeID = 0xe511996d

UpdateFavedStickersTypeID is TL type id of UpdateFavedStickers.

View Source
const UpdateFolderPeersTypeID = 0x19360dc0

UpdateFolderPeersTypeID is TL type id of UpdateFolderPeers.

View Source
const UpdateGeoLiveViewedTypeID = 0x871fb939

UpdateGeoLiveViewedTypeID is TL type id of UpdateGeoLiveViewed.

View Source
const UpdateGroupCallParticipantsTypeID = 0xf2ebdb4e

UpdateGroupCallParticipantsTypeID is TL type id of UpdateGroupCallParticipants.

View Source
const UpdateGroupCallTypeID = 0xa45eb99b

UpdateGroupCallTypeID is TL type id of UpdateGroupCall.

View Source
const UpdateInlineBotCallbackQueryTypeID = 0xf9d27a5a

UpdateInlineBotCallbackQueryTypeID is TL type id of UpdateInlineBotCallbackQuery.

View Source
const UpdateLangPackTooLongTypeID = 0x46560264

UpdateLangPackTooLongTypeID is TL type id of UpdateLangPackTooLong.

View Source
const UpdateLangPackTypeID = 0x56022f4d

UpdateLangPackTypeID is TL type id of UpdateLangPack.

View Source
const UpdateLoginTokenTypeID = 0x564fe691

UpdateLoginTokenTypeID is TL type id of UpdateLoginToken.

View Source
const UpdateMessageIDTypeID = 0x4e90bfd6

UpdateMessageIDTypeID is TL type id of UpdateMessageID.

View Source
const UpdateMessagePollTypeID = 0xaca1657b

UpdateMessagePollTypeID is TL type id of UpdateMessagePoll.

View Source
const UpdateMessagePollVoteTypeID = 0x42f88f2c

UpdateMessagePollVoteTypeID is TL type id of UpdateMessagePollVote.

View Source
const UpdateNewChannelMessageTypeID = 0x62ba04d9

UpdateNewChannelMessageTypeID is TL type id of UpdateNewChannelMessage.

View Source
const UpdateNewEncryptedMessageTypeID = 0x12bcbd9a

UpdateNewEncryptedMessageTypeID is TL type id of UpdateNewEncryptedMessage.

View Source
const UpdateNewMessageTypeID = 0x1f2b0afd

UpdateNewMessageTypeID is TL type id of UpdateNewMessage.

View Source
const UpdateNewScheduledMessageTypeID = 0x39a51dfb

UpdateNewScheduledMessageTypeID is TL type id of UpdateNewScheduledMessage.

View Source
const UpdateNewStickerSetTypeID = 0x688a30aa

UpdateNewStickerSetTypeID is TL type id of UpdateNewStickerSet.

View Source
const UpdateNotifySettingsTypeID = 0xbec268ef

UpdateNotifySettingsTypeID is TL type id of UpdateNotifySettings.

View Source
const UpdatePeerBlockedTypeID = 0x246a4b22

UpdatePeerBlockedTypeID is TL type id of UpdatePeerBlocked.

View Source
const UpdatePeerLocatedTypeID = 0xb4afcfb0

UpdatePeerLocatedTypeID is TL type id of UpdatePeerLocated.

View Source
const UpdatePeerSettingsTypeID = 0x6a7e7366

UpdatePeerSettingsTypeID is TL type id of UpdatePeerSettings.

View Source
const UpdatePhoneCallSignalingDataTypeID = 0x2661bf09

UpdatePhoneCallSignalingDataTypeID is TL type id of UpdatePhoneCallSignalingData.

View Source
const UpdatePhoneCallTypeID = 0xab0f6b1e

UpdatePhoneCallTypeID is TL type id of UpdatePhoneCall.

View Source
const UpdatePinnedChannelMessagesTypeID = 0x8588878b

UpdatePinnedChannelMessagesTypeID is TL type id of UpdatePinnedChannelMessages.

View Source
const UpdatePinnedDialogsTypeID = 0xfa0f3ca2

UpdatePinnedDialogsTypeID is TL type id of UpdatePinnedDialogs.

View Source
const UpdatePinnedMessagesTypeID = 0xed85eab5

UpdatePinnedMessagesTypeID is TL type id of UpdatePinnedMessages.

View Source
const UpdatePrivacyTypeID = 0xee3b272a

UpdatePrivacyTypeID is TL type id of UpdatePrivacy.

View Source
const UpdatePtsChangedTypeID = 0x3354678f

UpdatePtsChangedTypeID is TL type id of UpdatePtsChanged.

View Source
const UpdateReadChannelDiscussionInboxTypeID = 0x1cc7de54

UpdateReadChannelDiscussionInboxTypeID is TL type id of UpdateReadChannelDiscussionInbox.

View Source
const UpdateReadChannelDiscussionOutboxTypeID = 0x4638a26c

UpdateReadChannelDiscussionOutboxTypeID is TL type id of UpdateReadChannelDiscussionOutbox.

View Source
const UpdateReadChannelInboxTypeID = 0x330b5424

UpdateReadChannelInboxTypeID is TL type id of UpdateReadChannelInbox.

View Source
const UpdateReadChannelOutboxTypeID = 0x25d6c9c7

UpdateReadChannelOutboxTypeID is TL type id of UpdateReadChannelOutbox.

View Source
const UpdateReadFeaturedStickersTypeID = 0x571d2742

UpdateReadFeaturedStickersTypeID is TL type id of UpdateReadFeaturedStickers.

View Source
const UpdateReadHistoryInboxTypeID = 0x9c974fdf

UpdateReadHistoryInboxTypeID is TL type id of UpdateReadHistoryInbox.

View Source
const UpdateReadHistoryOutboxTypeID = 0x2f2f21bf

UpdateReadHistoryOutboxTypeID is TL type id of UpdateReadHistoryOutbox.

View Source
const UpdateReadMessagesContentsTypeID = 0x68c13933

UpdateReadMessagesContentsTypeID is TL type id of UpdateReadMessagesContents.

View Source
const UpdateRecentStickersTypeID = 0x9a422c20

UpdateRecentStickersTypeID is TL type id of UpdateRecentStickers.

View Source
const UpdateSavedGifsTypeID = 0x9375341e

UpdateSavedGifsTypeID is TL type id of UpdateSavedGifs.

View Source
const UpdateServiceNotificationTypeID = 0xebe46819

UpdateServiceNotificationTypeID is TL type id of UpdateServiceNotification.

View Source
const UpdateShortChatMessageTypeID = 0x402d5dbb

UpdateShortChatMessageTypeID is TL type id of UpdateShortChatMessage.

View Source
const UpdateShortMessageTypeID = 0x2296d2c8

UpdateShortMessageTypeID is TL type id of UpdateShortMessage.

View Source
const UpdateShortSentMessageTypeID = 0x11f1331c

UpdateShortSentMessageTypeID is TL type id of UpdateShortSentMessage.

View Source
const UpdateShortTypeID = 0x78d4dec1

UpdateShortTypeID is TL type id of UpdateShort.

View Source
const UpdateStickerSetsOrderTypeID = 0xbb2d201

UpdateStickerSetsOrderTypeID is TL type id of UpdateStickerSetsOrder.

View Source
const UpdateStickerSetsTypeID = 0x43ae3dec

UpdateStickerSetsTypeID is TL type id of UpdateStickerSets.

View Source
const UpdateThemeTypeID = 0x8216fba3

UpdateThemeTypeID is TL type id of UpdateTheme.

View Source
const UpdateUserNameTypeID = 0xa7332b73

UpdateUserNameTypeID is TL type id of UpdateUserName.

View Source
const UpdateUserPhoneTypeID = 0x12b9417b

UpdateUserPhoneTypeID is TL type id of UpdateUserPhone.

View Source
const UpdateUserPhotoTypeID = 0x95313b0c

UpdateUserPhotoTypeID is TL type id of UpdateUserPhoto.

View Source
const UpdateUserStatusTypeID = 0x1bfbd823

UpdateUserStatusTypeID is TL type id of UpdateUserStatus.

View Source
const UpdateUserTypingTypeID = 0x5c486927

UpdateUserTypingTypeID is TL type id of UpdateUserTyping.

View Source
const UpdateWebPageTypeID = 0x7f891213

UpdateWebPageTypeID is TL type id of UpdateWebPage.

View Source
const UpdatesChannelDifferenceEmptyTypeID = 0x3e11affb

UpdatesChannelDifferenceEmptyTypeID is TL type id of UpdatesChannelDifferenceEmpty.

View Source
const UpdatesChannelDifferenceTooLongTypeID = 0xa4bcc6fe

UpdatesChannelDifferenceTooLongTypeID is TL type id of UpdatesChannelDifferenceTooLong.

View Source
const UpdatesChannelDifferenceTypeID = 0x2064674e

UpdatesChannelDifferenceTypeID is TL type id of UpdatesChannelDifference.

View Source
const UpdatesCombinedTypeID = 0x725b04c3

UpdatesCombinedTypeID is TL type id of UpdatesCombined.

View Source
const UpdatesDifferenceEmptyTypeID = 0x5d75a138

UpdatesDifferenceEmptyTypeID is TL type id of UpdatesDifferenceEmpty.

View Source
const UpdatesDifferenceSliceTypeID = 0xa8fb1981

UpdatesDifferenceSliceTypeID is TL type id of UpdatesDifferenceSlice.

View Source
const UpdatesDifferenceTooLongTypeID = 0x4afe8f6d

UpdatesDifferenceTooLongTypeID is TL type id of UpdatesDifferenceTooLong.

View Source
const UpdatesDifferenceTypeID = 0xf49ca0

UpdatesDifferenceTypeID is TL type id of UpdatesDifference.

View Source
const UpdatesGetChannelDifferenceRequestTypeID = 0x3173d78

UpdatesGetChannelDifferenceRequestTypeID is TL type id of UpdatesGetChannelDifferenceRequest.

View Source
const UpdatesGetDifferenceRequestTypeID = 0x25939651

UpdatesGetDifferenceRequestTypeID is TL type id of UpdatesGetDifferenceRequest.

View Source
const UpdatesGetStateRequestTypeID = 0xedd4882a

UpdatesGetStateRequestTypeID is TL type id of UpdatesGetStateRequest.

View Source
const UpdatesStateTypeID = 0xa56c2a3e

UpdatesStateTypeID is TL type id of UpdatesState.

View Source
const UpdatesTooLongTypeID = 0xe317af7e

UpdatesTooLongTypeID is TL type id of UpdatesTooLong.

View Source
const UpdatesTypeID = 0x74ae4240

UpdatesTypeID is TL type id of Updates.

View Source
const UploadCdnFileReuploadNeededTypeID = 0xeea8e46e

UploadCdnFileReuploadNeededTypeID is TL type id of UploadCdnFileReuploadNeeded.

View Source
const UploadCdnFileTypeID = 0xa99fca4f

UploadCdnFileTypeID is TL type id of UploadCdnFile.

View Source
const UploadFileCdnRedirectTypeID = 0xf18cda44

UploadFileCdnRedirectTypeID is TL type id of UploadFileCdnRedirect.

View Source
const UploadFileTypeID = 0x96a18d5

UploadFileTypeID is TL type id of UploadFile.

View Source
const UploadGetCdnFileHashesRequestTypeID = 0x4da54231

UploadGetCdnFileHashesRequestTypeID is TL type id of UploadGetCdnFileHashesRequest.

View Source
const UploadGetCdnFileRequestTypeID = 0x2000bcc3

UploadGetCdnFileRequestTypeID is TL type id of UploadGetCdnFileRequest.

View Source
const UploadGetFileHashesRequestTypeID = 0xc7025931

UploadGetFileHashesRequestTypeID is TL type id of UploadGetFileHashesRequest.

View Source
const UploadGetFileRequestTypeID = 0xb15a9afc

UploadGetFileRequestTypeID is TL type id of UploadGetFileRequest.

View Source
const UploadGetWebFileRequestTypeID = 0x24e6818d

UploadGetWebFileRequestTypeID is TL type id of UploadGetWebFileRequest.

View Source
const UploadReuploadCdnFileRequestTypeID = 0x9b2754a8

UploadReuploadCdnFileRequestTypeID is TL type id of UploadReuploadCdnFileRequest.

View Source
const UploadSaveBigFilePartRequestTypeID = 0xde7b673d

UploadSaveBigFilePartRequestTypeID is TL type id of UploadSaveBigFilePartRequest.

View Source
const UploadSaveFilePartRequestTypeID = 0xb304a621

UploadSaveFilePartRequestTypeID is TL type id of UploadSaveFilePartRequest.

View Source
const UploadWebFileTypeID = 0x21e753bc

UploadWebFileTypeID is TL type id of UploadWebFile.

View Source
const UrlAuthResultAcceptedTypeID = 0x8f8c0e4e

UrlAuthResultAcceptedTypeID is TL type id of UrlAuthResultAccepted.

View Source
const UrlAuthResultDefaultTypeID = 0xa9d6db1f

UrlAuthResultDefaultTypeID is TL type id of UrlAuthResultDefault.

View Source
const UrlAuthResultRequestTypeID = 0x92d33a0e

UrlAuthResultRequestTypeID is TL type id of UrlAuthResultRequest.

View Source
const UserEmptyTypeID = 0x200250ba

UserEmptyTypeID is TL type id of UserEmpty.

View Source
const UserFullTypeID = 0xedf17c12

UserFullTypeID is TL type id of UserFull.

View Source
const UserProfilePhotoEmptyTypeID = 0x4f11bae1

UserProfilePhotoEmptyTypeID is TL type id of UserProfilePhotoEmpty.

View Source
const UserProfilePhotoTypeID = 0x69d3ab26

UserProfilePhotoTypeID is TL type id of UserProfilePhoto.

View Source
const UserStatusEmptyTypeID = 0x9d05049

UserStatusEmptyTypeID is TL type id of UserStatusEmpty.

View Source
const UserStatusLastMonthTypeID = 0x77ebc742

UserStatusLastMonthTypeID is TL type id of UserStatusLastMonth.

View Source
const UserStatusLastWeekTypeID = 0x7bf09fc

UserStatusLastWeekTypeID is TL type id of UserStatusLastWeek.

View Source
const UserStatusOfflineTypeID = 0x8c703f

UserStatusOfflineTypeID is TL type id of UserStatusOffline.

View Source
const UserStatusOnlineTypeID = 0xedb93949

UserStatusOnlineTypeID is TL type id of UserStatusOnline.

View Source
const UserStatusRecentlyTypeID = 0xe26f42f1

UserStatusRecentlyTypeID is TL type id of UserStatusRecently.

View Source
const UserTypeID = 0x938458c1

UserTypeID is TL type id of User.

View Source
const UsersGetFullUserRequestTypeID = 0xca30a5b1

UsersGetFullUserRequestTypeID is TL type id of UsersGetFullUserRequest.

View Source
const UsersGetUsersRequestTypeID = 0xd91a548

UsersGetUsersRequestTypeID is TL type id of UsersGetUsersRequest.

View Source
const UsersSetSecureValueErrorsRequestTypeID = 0x90c894b5

UsersSetSecureValueErrorsRequestTypeID is TL type id of UsersSetSecureValueErrorsRequest.

View Source
const VideoSizeTypeID = 0xe831c556

VideoSizeTypeID is TL type id of VideoSize.

View Source
const WallPaperNoFileTypeID = 0x8af40b25

WallPaperNoFileTypeID is TL type id of WallPaperNoFile.

View Source
const WallPaperSettingsTypeID = 0x5086cf8

WallPaperSettingsTypeID is TL type id of WallPaperSettings.

View Source
const WallPaperTypeID = 0xa437c3ed

WallPaperTypeID is TL type id of WallPaper.

View Source
const WebAuthorizationTypeID = 0xcac943f2

WebAuthorizationTypeID is TL type id of WebAuthorization.

View Source
const WebDocumentNoProxyTypeID = 0xf9c8bcc6

WebDocumentNoProxyTypeID is TL type id of WebDocumentNoProxy.

View Source
const WebDocumentTypeID = 0x1c570ed1

WebDocumentTypeID is TL type id of WebDocument.

View Source
const WebPageAttributeThemeTypeID = 0x54b56617

WebPageAttributeThemeTypeID is TL type id of WebPageAttributeTheme.

View Source
const WebPageEmptyTypeID = 0xeb1477e8

WebPageEmptyTypeID is TL type id of WebPageEmpty.

View Source
const WebPageNotModifiedTypeID = 0x7311ca11

WebPageNotModifiedTypeID is TL type id of WebPageNotModified.

View Source
const WebPagePendingTypeID = 0xc586da1c

WebPagePendingTypeID is TL type id of WebPagePending.

View Source
const WebPageTypeID = 0xe89c45b2

WebPageTypeID is TL type id of WebPage.

Variables

This section is empty.

Functions

func TypesConstructorMap added in v0.15.0

func TypesConstructorMap() map[uint32]func() bin.Object

TypesConstructorMap maps type ids to constructors.

func TypesMap

func TypesMap() map[uint32]string

Types returns mapping from type ids to TL type names.

Types

type AccountAcceptAuthorizationRequest

type AccountAcceptAuthorizationRequest struct {
	// Bot ID
	BotID int
	// Telegram Passport element types requested by the service
	Scope string
	// Service's public key
	PublicKey string
	// Types of values sent and their hashes
	ValueHashes []SecureValueHash
	// Encrypted values
	Credentials SecureCredentialsEncrypted
}

AccountAcceptAuthorizationRequest represents TL type `account.acceptAuthorization#e7027c94`. Sends a Telegram Passport authorization form, effectively sharing data with the service

See https://core.telegram.org/method/account.acceptAuthorization for reference.

func (*AccountAcceptAuthorizationRequest) Decode

Decode implements bin.Decoder.

func (*AccountAcceptAuthorizationRequest) Encode

Encode implements bin.Encoder.

func (*AccountAcceptAuthorizationRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountAuthorizationForm

type AccountAuthorizationForm struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Required Telegram Passport¹ documents
	//
	// Links:
	//  1) https://core.telegram.org/passport
	RequiredTypes []SecureRequiredTypeClass
	// Already submitted Telegram Passport¹ documents
	//
	// Links:
	//  1) https://core.telegram.org/passport
	Values []SecureValue
	// Telegram Passport¹ errors
	//
	// Links:
	//  1) https://core.telegram.org/passport
	Errors []SecureValueErrorClass
	// Info about the bot to which the form will be submitted
	Users []UserClass
	// URL of the service's privacy policy
	//
	// Use SetPrivacyPolicyURL and GetPrivacyPolicyURL helpers.
	PrivacyPolicyURL string
}

AccountAuthorizationForm represents TL type `account.authorizationForm#ad2e1cd8`. Telegram Passport¹ authorization form

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/constructor/account.authorizationForm for reference.

func (*AccountAuthorizationForm) Decode

func (a *AccountAuthorizationForm) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountAuthorizationForm) Encode

func (a *AccountAuthorizationForm) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountAuthorizationForm) GetPrivacyPolicyURL

func (a *AccountAuthorizationForm) GetPrivacyPolicyURL() (value string, ok bool)

GetPrivacyPolicyURL returns value of PrivacyPolicyURL conditional field and boolean which is true if field was set.

func (*AccountAuthorizationForm) SetPrivacyPolicyURL

func (a *AccountAuthorizationForm) SetPrivacyPolicyURL(value string)

SetPrivacyPolicyURL sets value of PrivacyPolicyURL conditional field.

func (*AccountAuthorizationForm) String added in v0.12.0

func (a *AccountAuthorizationForm) String() string

String implements fmt.Stringer.

type AccountAuthorizations

type AccountAuthorizations struct {
	// Logged-in sessions
	Authorizations []Authorization
}

AccountAuthorizations represents TL type `account.authorizations#1250abde`. Logged-in sessions

See https://core.telegram.org/constructor/account.authorizations for reference.

func (*AccountAuthorizations) Decode

func (a *AccountAuthorizations) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountAuthorizations) Encode

func (a *AccountAuthorizations) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountAuthorizations) String added in v0.12.0

func (a *AccountAuthorizations) String() string

String implements fmt.Stringer.

type AccountAutoDownloadSettings

type AccountAutoDownloadSettings struct {
	// Low data usage preset
	Low AutoDownloadSettings
	// Medium data usage preset
	Medium AutoDownloadSettings
	// High data usage preset
	High AutoDownloadSettings
}

AccountAutoDownloadSettings represents TL type `account.autoDownloadSettings#63cacf26`. Media autodownload settings

See https://core.telegram.org/constructor/account.autoDownloadSettings for reference.

func (*AccountAutoDownloadSettings) Decode

Decode implements bin.Decoder.

func (*AccountAutoDownloadSettings) Encode

Encode implements bin.Encoder.

func (*AccountAutoDownloadSettings) String added in v0.12.0

func (a *AccountAutoDownloadSettings) String() string

String implements fmt.Stringer.

type AccountCancelPasswordEmailRequest

type AccountCancelPasswordEmailRequest struct {
}

AccountCancelPasswordEmailRequest represents TL type `account.cancelPasswordEmail#c1cbd5b6`. Cancel the code that was sent to verify an email to use as 2FA recovery method¹.

Links:

  1. https://core.telegram.org/api/srp

See https://core.telegram.org/method/account.cancelPasswordEmail for reference.

func (*AccountCancelPasswordEmailRequest) Decode

Decode implements bin.Decoder.

func (*AccountCancelPasswordEmailRequest) Encode

Encode implements bin.Encoder.

func (*AccountCancelPasswordEmailRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountChangePhoneRequest

type AccountChangePhoneRequest struct {
	// New phone number
	PhoneNumber string
	// Phone code hash received when calling account.sendChangePhoneCode¹
	//
	// Links:
	//  1) https://core.telegram.org/method/account.sendChangePhoneCode
	PhoneCodeHash string
	// Phone code received when calling account.sendChangePhoneCode¹
	//
	// Links:
	//  1) https://core.telegram.org/method/account.sendChangePhoneCode
	PhoneCode string
}

AccountChangePhoneRequest represents TL type `account.changePhone#70c32edb`. Change the phone number of the current account

See https://core.telegram.org/method/account.changePhone for reference.

func (*AccountChangePhoneRequest) Decode

func (c *AccountChangePhoneRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountChangePhoneRequest) Encode

func (c *AccountChangePhoneRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountChangePhoneRequest) String added in v0.12.0

func (c *AccountChangePhoneRequest) String() string

String implements fmt.Stringer.

type AccountCheckUsernameRequest

type AccountCheckUsernameRequest struct {
	// usernameAccepted characters: A-z (case-insensitive), 0-9 and underscores.Length: 5-32 characters.
	Username string
}

AccountCheckUsernameRequest represents TL type `account.checkUsername#2714d86c`. Validates a username and checks availability.

See https://core.telegram.org/method/account.checkUsername for reference.

func (*AccountCheckUsernameRequest) Decode

Decode implements bin.Decoder.

func (*AccountCheckUsernameRequest) Encode

Encode implements bin.Encoder.

func (*AccountCheckUsernameRequest) String added in v0.12.0

func (c *AccountCheckUsernameRequest) String() string

String implements fmt.Stringer.

type AccountConfirmPasswordEmailRequest

type AccountConfirmPasswordEmailRequest struct {
	// The phone code that was received after setting a recovery email¹
	//
	// Links:
	//  1) https://core.telegram.org/api/srp#email-verification
	Code string
}

AccountConfirmPasswordEmailRequest represents TL type `account.confirmPasswordEmail#8fdf1920`. Verify an email to use as 2FA recovery method¹.

Links:

  1. https://core.telegram.org/api/srp

See https://core.telegram.org/method/account.confirmPasswordEmail for reference.

func (*AccountConfirmPasswordEmailRequest) Decode

Decode implements bin.Decoder.

func (*AccountConfirmPasswordEmailRequest) Encode

Encode implements bin.Encoder.

func (*AccountConfirmPasswordEmailRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountConfirmPhoneRequest

type AccountConfirmPhoneRequest struct {
	// Phone code hash, for more info click here »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/account-deletion
	PhoneCodeHash string
	// SMS code, for more info click here »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/account-deletion
	PhoneCode string
}

AccountConfirmPhoneRequest represents TL type `account.confirmPhone#5f2178c3`. Confirm a phone number to cancel account deletion, for more info click here »¹

Links:

  1. https://core.telegram.org/api/account-deletion

See https://core.telegram.org/method/account.confirmPhone for reference.

func (*AccountConfirmPhoneRequest) Decode

Decode implements bin.Decoder.

func (*AccountConfirmPhoneRequest) Encode

Encode implements bin.Encoder.

func (*AccountConfirmPhoneRequest) String added in v0.12.0

func (c *AccountConfirmPhoneRequest) String() string

String implements fmt.Stringer.

type AccountContentSettings

type AccountContentSettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether viewing of sensitive (NSFW) content is enabled
	SensitiveEnabled bool
	// Whether the current client can change the sensitive content settings to view NSFW content
	SensitiveCanChange bool
}

AccountContentSettings represents TL type `account.contentSettings#57e28221`. Sensitive content settings

See https://core.telegram.org/constructor/account.contentSettings for reference.

func (*AccountContentSettings) Decode

func (c *AccountContentSettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountContentSettings) Encode

func (c *AccountContentSettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountContentSettings) SetSensitiveCanChange

func (c *AccountContentSettings) SetSensitiveCanChange(value bool)

SetSensitiveCanChange sets value of SensitiveCanChange conditional field.

func (*AccountContentSettings) SetSensitiveEnabled

func (c *AccountContentSettings) SetSensitiveEnabled(value bool)

SetSensitiveEnabled sets value of SensitiveEnabled conditional field.

func (*AccountContentSettings) String added in v0.12.0

func (c *AccountContentSettings) String() string

String implements fmt.Stringer.

type AccountCreateThemeRequest

type AccountCreateThemeRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Unique theme ID
	Slug string
	// Theme name
	Title string
	// Theme file
	//
	// Use SetDocument and GetDocument helpers.
	Document InputDocumentClass
	// Theme settings
	//
	// Use SetSettings and GetSettings helpers.
	Settings InputThemeSettings
}

AccountCreateThemeRequest represents TL type `account.createTheme#8432c21f`. Create a theme

See https://core.telegram.org/method/account.createTheme for reference.

func (*AccountCreateThemeRequest) Decode

func (c *AccountCreateThemeRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountCreateThemeRequest) Encode

func (c *AccountCreateThemeRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountCreateThemeRequest) GetDocument

func (c *AccountCreateThemeRequest) GetDocument() (value InputDocumentClass, ok bool)

GetDocument returns value of Document conditional field and boolean which is true if field was set.

func (*AccountCreateThemeRequest) GetSettings

func (c *AccountCreateThemeRequest) GetSettings() (value InputThemeSettings, ok bool)

GetSettings returns value of Settings conditional field and boolean which is true if field was set.

func (*AccountCreateThemeRequest) SetDocument

func (c *AccountCreateThemeRequest) SetDocument(value InputDocumentClass)

SetDocument sets value of Document conditional field.

func (*AccountCreateThemeRequest) SetSettings

func (c *AccountCreateThemeRequest) SetSettings(value InputThemeSettings)

SetSettings sets value of Settings conditional field.

func (*AccountCreateThemeRequest) String added in v0.12.0

func (c *AccountCreateThemeRequest) String() string

String implements fmt.Stringer.

type AccountDaysTTL

type AccountDaysTTL struct {
	// This account will self-destruct in the specified number of days
	Days int
}

AccountDaysTTL represents TL type `accountDaysTTL#b8d0afdf`. Time to live in days of the current account

See https://core.telegram.org/constructor/accountDaysTTL for reference.

func (*AccountDaysTTL) Decode

func (a *AccountDaysTTL) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountDaysTTL) Encode

func (a *AccountDaysTTL) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountDaysTTL) String added in v0.12.0

func (a *AccountDaysTTL) String() string

String implements fmt.Stringer.

type AccountDeleteAccountRequest

type AccountDeleteAccountRequest struct {
	// Why is the account being deleted, can be empty
	Reason string
}

AccountDeleteAccountRequest represents TL type `account.deleteAccount#418d4e0b`. Delete the user's account from the telegram servers. Can be used, for example, to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured¹.

Links:

  1. https://core.telegram.org/api/srp

See https://core.telegram.org/method/account.deleteAccount for reference.

func (*AccountDeleteAccountRequest) Decode

Decode implements bin.Decoder.

func (*AccountDeleteAccountRequest) Encode

Encode implements bin.Encoder.

func (*AccountDeleteAccountRequest) String added in v0.12.0

func (d *AccountDeleteAccountRequest) String() string

String implements fmt.Stringer.

type AccountDeleteSecureValueRequest

type AccountDeleteSecureValueRequest struct {
	// Document types to delete
	Types []SecureValueTypeClass
}

AccountDeleteSecureValueRequest represents TL type `account.deleteSecureValue#b880bc4b`. Delete stored Telegram Passport¹ documents, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#encryption

See https://core.telegram.org/method/account.deleteSecureValue for reference.

func (*AccountDeleteSecureValueRequest) Decode

Decode implements bin.Decoder.

func (*AccountDeleteSecureValueRequest) Encode

Encode implements bin.Encoder.

func (*AccountDeleteSecureValueRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountFinishTakeoutSessionRequest

type AccountFinishTakeoutSessionRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Data exported successfully
	Success bool
}

AccountFinishTakeoutSessionRequest represents TL type `account.finishTakeoutSession#1d2652ee`. Finish account takeout session

See https://core.telegram.org/method/account.finishTakeoutSession for reference.

func (*AccountFinishTakeoutSessionRequest) Decode

Decode implements bin.Decoder.

func (*AccountFinishTakeoutSessionRequest) Encode

Encode implements bin.Encoder.

func (*AccountFinishTakeoutSessionRequest) SetSuccess

func (f *AccountFinishTakeoutSessionRequest) SetSuccess(value bool)

SetSuccess sets value of Success conditional field.

func (*AccountFinishTakeoutSessionRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetAccountTTLRequest

type AccountGetAccountTTLRequest struct {
}

AccountGetAccountTTLRequest represents TL type `account.getAccountTTL#8fc711d`. Get days to live of account

See https://core.telegram.org/method/account.getAccountTTL for reference.

func (*AccountGetAccountTTLRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetAccountTTLRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetAccountTTLRequest) String added in v0.12.0

func (g *AccountGetAccountTTLRequest) String() string

String implements fmt.Stringer.

type AccountGetAllSecureValuesRequest

type AccountGetAllSecureValuesRequest struct {
}

AccountGetAllSecureValuesRequest represents TL type `account.getAllSecureValues#b288bc7d`. Get all saved Telegram Passport¹ documents, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#encryption

See https://core.telegram.org/method/account.getAllSecureValues for reference.

func (*AccountGetAllSecureValuesRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetAllSecureValuesRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetAllSecureValuesRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetAuthorizationFormRequest

type AccountGetAuthorizationFormRequest struct {
	// User identifier of the service's bot
	BotID int
	// Telegram Passport element types requested by the service
	Scope string
	// Service's public key
	PublicKey string
}

AccountGetAuthorizationFormRequest represents TL type `account.getAuthorizationForm#b86ba8e1`. Returns a Telegram Passport authorization form for sharing data with a service

See https://core.telegram.org/method/account.getAuthorizationForm for reference.

func (*AccountGetAuthorizationFormRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetAuthorizationFormRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetAuthorizationFormRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetAuthorizationsRequest

type AccountGetAuthorizationsRequest struct {
}

AccountGetAuthorizationsRequest represents TL type `account.getAuthorizations#e320c158`. Get logged-in sessions

See https://core.telegram.org/method/account.getAuthorizations for reference.

func (*AccountGetAuthorizationsRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetAuthorizationsRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetAuthorizationsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetAutoDownloadSettingsRequest

type AccountGetAutoDownloadSettingsRequest struct {
}

AccountGetAutoDownloadSettingsRequest represents TL type `account.getAutoDownloadSettings#56da0b3f`. Get media autodownload settings

See https://core.telegram.org/method/account.getAutoDownloadSettings for reference.

func (*AccountGetAutoDownloadSettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetAutoDownloadSettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetAutoDownloadSettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetContactSignUpNotificationRequest

type AccountGetContactSignUpNotificationRequest struct {
}

AccountGetContactSignUpNotificationRequest represents TL type `account.getContactSignUpNotification#9f07c728`. Whether the user will receive notifications when contacts sign up

See https://core.telegram.org/method/account.getContactSignUpNotification for reference.

func (*AccountGetContactSignUpNotificationRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetContactSignUpNotificationRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetContactSignUpNotificationRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetContentSettingsRequest

type AccountGetContentSettingsRequest struct {
}

AccountGetContentSettingsRequest represents TL type `account.getContentSettings#8b9b4dae`. Get sensitive content settings

See https://core.telegram.org/method/account.getContentSettings for reference.

func (*AccountGetContentSettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetContentSettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetContentSettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetGlobalPrivacySettingsRequest

type AccountGetGlobalPrivacySettingsRequest struct {
}

AccountGetGlobalPrivacySettingsRequest represents TL type `account.getGlobalPrivacySettings#eb2b4cf6`. Get global privacy settings

See https://core.telegram.org/method/account.getGlobalPrivacySettings for reference.

func (*AccountGetGlobalPrivacySettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetGlobalPrivacySettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetGlobalPrivacySettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetMultiWallPapersRequest

type AccountGetMultiWallPapersRequest struct {
	// Wallpapers to fetch info about
	Wallpapers []InputWallPaperClass
}

AccountGetMultiWallPapersRequest represents TL type `account.getMultiWallPapers#65ad71dc`. Get info about multiple wallpapers

See https://core.telegram.org/method/account.getMultiWallPapers for reference.

func (*AccountGetMultiWallPapersRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetMultiWallPapersRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetMultiWallPapersRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetNotifyExceptionsRequest

type AccountGetNotifyExceptionsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If true, chats with non-default sound will also be returned
	CompareSound bool
	// If specified, only chats of the specified category will be returned
	//
	// Use SetPeer and GetPeer helpers.
	Peer InputNotifyPeerClass
}

AccountGetNotifyExceptionsRequest represents TL type `account.getNotifyExceptions#53577479`. Returns list of chats with non-default notification settings

See https://core.telegram.org/method/account.getNotifyExceptions for reference.

func (*AccountGetNotifyExceptionsRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetNotifyExceptionsRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetNotifyExceptionsRequest) GetPeer

GetPeer returns value of Peer conditional field and boolean which is true if field was set.

func (*AccountGetNotifyExceptionsRequest) SetCompareSound

func (g *AccountGetNotifyExceptionsRequest) SetCompareSound(value bool)

SetCompareSound sets value of CompareSound conditional field.

func (*AccountGetNotifyExceptionsRequest) SetPeer

SetPeer sets value of Peer conditional field.

func (*AccountGetNotifyExceptionsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetNotifySettingsRequest

type AccountGetNotifySettingsRequest struct {
	// Notification source
	Peer InputNotifyPeerClass
}

AccountGetNotifySettingsRequest represents TL type `account.getNotifySettings#12b3ad31`. Gets current notification settings for a given user/group, from all users/all groups.

See https://core.telegram.org/method/account.getNotifySettings for reference.

func (*AccountGetNotifySettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetNotifySettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetNotifySettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetPasswordRequest

type AccountGetPasswordRequest struct {
}

AccountGetPasswordRequest represents TL type `account.getPassword#548a30f5`. Obtain configuration for two-factor authorization with password

See https://core.telegram.org/method/account.getPassword for reference.

func (*AccountGetPasswordRequest) Decode

func (g *AccountGetPasswordRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountGetPasswordRequest) Encode

func (g *AccountGetPasswordRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountGetPasswordRequest) String added in v0.12.0

func (g *AccountGetPasswordRequest) String() string

String implements fmt.Stringer.

type AccountGetPasswordSettingsRequest

type AccountGetPasswordSettingsRequest struct {
	// The password (see SRP¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	Password InputCheckPasswordSRPClass
}

AccountGetPasswordSettingsRequest represents TL type `account.getPasswordSettings#9cd4eaf9`. Get private info associated to the password info (recovery email, telegram passport¹ info & so on)

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/method/account.getPasswordSettings for reference.

func (*AccountGetPasswordSettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetPasswordSettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetPasswordSettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetPrivacyRequest

type AccountGetPrivacyRequest struct {
	// Peer category whose privacy settings should be fetched
	Key InputPrivacyKeyClass
}

AccountGetPrivacyRequest represents TL type `account.getPrivacy#dadbc950`. Get privacy settings of current account

See https://core.telegram.org/method/account.getPrivacy for reference.

func (*AccountGetPrivacyRequest) Decode

func (g *AccountGetPrivacyRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountGetPrivacyRequest) Encode

func (g *AccountGetPrivacyRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountGetPrivacyRequest) String added in v0.12.0

func (g *AccountGetPrivacyRequest) String() string

String implements fmt.Stringer.

type AccountGetSecureValueRequest

type AccountGetSecureValueRequest struct {
	// Requested value types
	Types []SecureValueTypeClass
}

AccountGetSecureValueRequest represents TL type `account.getSecureValue#73665bc2`. Get saved Telegram Passport¹ document, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#encryption

See https://core.telegram.org/method/account.getSecureValue for reference.

func (*AccountGetSecureValueRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetSecureValueRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetSecureValueRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetThemeRequest

type AccountGetThemeRequest struct {
	// Theme format, a string that identifies the theming engines supported by the client
	Format string
	// Theme
	Theme InputThemeClass
	// Document ID
	DocumentID int64
}

AccountGetThemeRequest represents TL type `account.getTheme#8d9d742b`. Get theme information

See https://core.telegram.org/method/account.getTheme for reference.

func (*AccountGetThemeRequest) Decode

func (g *AccountGetThemeRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountGetThemeRequest) Encode

func (g *AccountGetThemeRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountGetThemeRequest) String added in v0.12.0

func (g *AccountGetThemeRequest) String() string

String implements fmt.Stringer.

type AccountGetThemesRequest

type AccountGetThemesRequest struct {
	// Theme format, a string that identifies the theming engines supported by the client
	Format string
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

AccountGetThemesRequest represents TL type `account.getThemes#285946f8`. Get installed themes

See https://core.telegram.org/method/account.getThemes for reference.

func (*AccountGetThemesRequest) Decode

func (g *AccountGetThemesRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountGetThemesRequest) Encode

func (g *AccountGetThemesRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountGetThemesRequest) String added in v0.12.0

func (g *AccountGetThemesRequest) String() string

String implements fmt.Stringer.

type AccountGetTmpPasswordRequest

type AccountGetTmpPasswordRequest struct {
	// SRP password parameters
	Password InputCheckPasswordSRPClass
	// Time during which the temporary password will be valid, in seconds; should be between 60 and 86400
	Period int
}

AccountGetTmpPasswordRequest represents TL type `account.getTmpPassword#449e0b51`. Get temporary payment password

See https://core.telegram.org/method/account.getTmpPassword for reference.

func (*AccountGetTmpPasswordRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetTmpPasswordRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetTmpPasswordRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountGetWallPaperRequest

type AccountGetWallPaperRequest struct {
	// The wallpaper to get info about
	Wallpaper InputWallPaperClass
}

AccountGetWallPaperRequest represents TL type `account.getWallPaper#fc8ddbea`. Get info about a certain wallpaper

See https://core.telegram.org/method/account.getWallPaper for reference.

func (*AccountGetWallPaperRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetWallPaperRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetWallPaperRequest) String added in v0.12.0

func (g *AccountGetWallPaperRequest) String() string

String implements fmt.Stringer.

type AccountGetWallPapersRequest

type AccountGetWallPapersRequest struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

AccountGetWallPapersRequest represents TL type `account.getWallPapers#aabb1763`. Returns a list of available wallpapers.

See https://core.telegram.org/method/account.getWallPapers for reference.

func (*AccountGetWallPapersRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetWallPapersRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetWallPapersRequest) String added in v0.12.0

func (g *AccountGetWallPapersRequest) String() string

String implements fmt.Stringer.

type AccountGetWebAuthorizationsRequest

type AccountGetWebAuthorizationsRequest struct {
}

AccountGetWebAuthorizationsRequest represents TL type `account.getWebAuthorizations#182e6d6f`. Get web login widget¹ authorizations

Links:

  1. https://core.telegram.org/widgets/login

See https://core.telegram.org/method/account.getWebAuthorizations for reference.

func (*AccountGetWebAuthorizationsRequest) Decode

Decode implements bin.Decoder.

func (*AccountGetWebAuthorizationsRequest) Encode

Encode implements bin.Encoder.

func (*AccountGetWebAuthorizationsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountInitTakeoutSessionRequest

type AccountInitTakeoutSessionRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to export contacts
	Contacts bool
	// Whether to export messages in private chats
	MessageUsers bool
	// Whether to export messages in legacy groups¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	MessageChats bool
	// Whether to export messages in supergroups¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	MessageMegagroups bool
	// Whether to export messages in channels¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	MessageChannels bool
	// Whether to export files
	Files bool
	// Maximum size of files to export
	//
	// Use SetFileMaxSize and GetFileMaxSize helpers.
	FileMaxSize int
}

AccountInitTakeoutSessionRequest represents TL type `account.initTakeoutSession#f05b4804`. Intialize account takeout session

See https://core.telegram.org/method/account.initTakeoutSession for reference.

func (*AccountInitTakeoutSessionRequest) Decode

Decode implements bin.Decoder.

func (*AccountInitTakeoutSessionRequest) Encode

Encode implements bin.Encoder.

func (*AccountInitTakeoutSessionRequest) GetFileMaxSize

func (i *AccountInitTakeoutSessionRequest) GetFileMaxSize() (value int, ok bool)

GetFileMaxSize returns value of FileMaxSize conditional field and boolean which is true if field was set.

func (*AccountInitTakeoutSessionRequest) SetContacts

func (i *AccountInitTakeoutSessionRequest) SetContacts(value bool)

SetContacts sets value of Contacts conditional field.

func (*AccountInitTakeoutSessionRequest) SetFileMaxSize

func (i *AccountInitTakeoutSessionRequest) SetFileMaxSize(value int)

SetFileMaxSize sets value of FileMaxSize conditional field.

func (*AccountInitTakeoutSessionRequest) SetFiles

func (i *AccountInitTakeoutSessionRequest) SetFiles(value bool)

SetFiles sets value of Files conditional field.

func (*AccountInitTakeoutSessionRequest) SetMessageChannels

func (i *AccountInitTakeoutSessionRequest) SetMessageChannels(value bool)

SetMessageChannels sets value of MessageChannels conditional field.

func (*AccountInitTakeoutSessionRequest) SetMessageChats

func (i *AccountInitTakeoutSessionRequest) SetMessageChats(value bool)

SetMessageChats sets value of MessageChats conditional field.

func (*AccountInitTakeoutSessionRequest) SetMessageMegagroups

func (i *AccountInitTakeoutSessionRequest) SetMessageMegagroups(value bool)

SetMessageMegagroups sets value of MessageMegagroups conditional field.

func (*AccountInitTakeoutSessionRequest) SetMessageUsers

func (i *AccountInitTakeoutSessionRequest) SetMessageUsers(value bool)

SetMessageUsers sets value of MessageUsers conditional field.

func (*AccountInitTakeoutSessionRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountInstallThemeRequest

type AccountInstallThemeRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to install the dark version
	Dark bool
	// Theme format, a string that identifies the theming engines supported by the client
	//
	// Use SetFormat and GetFormat helpers.
	Format string
	// Theme to install
	//
	// Use SetTheme and GetTheme helpers.
	Theme InputThemeClass
}

AccountInstallThemeRequest represents TL type `account.installTheme#7ae43737`. Install a theme

See https://core.telegram.org/method/account.installTheme for reference.

func (*AccountInstallThemeRequest) Decode

Decode implements bin.Decoder.

func (*AccountInstallThemeRequest) Encode

Encode implements bin.Encoder.

func (*AccountInstallThemeRequest) GetFormat

func (i *AccountInstallThemeRequest) GetFormat() (value string, ok bool)

GetFormat returns value of Format conditional field and boolean which is true if field was set.

func (*AccountInstallThemeRequest) GetTheme

func (i *AccountInstallThemeRequest) GetTheme() (value InputThemeClass, ok bool)

GetTheme returns value of Theme conditional field and boolean which is true if field was set.

func (*AccountInstallThemeRequest) SetDark

func (i *AccountInstallThemeRequest) SetDark(value bool)

SetDark sets value of Dark conditional field.

func (*AccountInstallThemeRequest) SetFormat

func (i *AccountInstallThemeRequest) SetFormat(value string)

SetFormat sets value of Format conditional field.

func (*AccountInstallThemeRequest) SetTheme

func (i *AccountInstallThemeRequest) SetTheme(value InputThemeClass)

SetTheme sets value of Theme conditional field.

func (*AccountInstallThemeRequest) String added in v0.12.0

func (i *AccountInstallThemeRequest) String() string

String implements fmt.Stringer.

type AccountInstallWallPaperRequest

type AccountInstallWallPaperRequest struct {
	// Wallpaper to install
	Wallpaper InputWallPaperClass
	// Wallpaper settings
	Settings WallPaperSettings
}

AccountInstallWallPaperRequest represents TL type `account.installWallPaper#feed5769`. Install wallpaper

See https://core.telegram.org/method/account.installWallPaper for reference.

func (*AccountInstallWallPaperRequest) Decode

Decode implements bin.Decoder.

func (*AccountInstallWallPaperRequest) Encode

Encode implements bin.Encoder.

func (*AccountInstallWallPaperRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountPassword

type AccountPassword struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the user has a recovery method configured
	HasRecovery bool
	// Whether telegram passport¹ is enabled
	//
	// Links:
	//  1) https://core.telegram.org/passport
	HasSecureValues bool
	// Whether the user has a password
	HasPassword bool
	// The KDF algorithm for SRP two-factor authentication¹ of the current password
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	//
	// Use SetCurrentAlgo and GetCurrentAlgo helpers.
	CurrentAlgo PasswordKdfAlgoClass
	// Srp B param for SRP authorization¹
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	//
	// Use SetSrpB and GetSrpB helpers.
	SrpB []byte
	// Srp ID param for SRP authorization¹
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	//
	// Use SetSrpID and GetSrpID helpers.
	SrpID int64
	// Text hint for the password
	//
	// Use SetHint and GetHint helpers.
	Hint string
	// A password recovery email¹ with the specified pattern² is still awaiting verification
	//
	// Links:
	//  1) https://core.telegram.org/api/srp#email-verification
	//  2) https://core.telegram.org/api/pattern
	//
	// Use SetEmailUnconfirmedPattern and GetEmailUnconfirmedPattern helpers.
	EmailUnconfirmedPattern string
	// The KDF algorithm for SRP two-factor authentication¹ to use when creating new passwords
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	NewAlgo PasswordKdfAlgoClass
	// The KDF algorithm for telegram passport¹
	//
	// Links:
	//  1) https://core.telegram.org/passport
	NewSecureAlgo SecurePasswordKdfAlgoClass
	// Secure random string
	SecureRandom []byte
}

AccountPassword represents TL type `account.password#ad2641f8`. Configuration for two-factor authorization

See https://core.telegram.org/constructor/account.password for reference.

func (*AccountPassword) Decode

func (p *AccountPassword) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountPassword) Encode

func (p *AccountPassword) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountPassword) GetCurrentAlgo

func (p *AccountPassword) GetCurrentAlgo() (value PasswordKdfAlgoClass, ok bool)

GetCurrentAlgo returns value of CurrentAlgo conditional field and boolean which is true if field was set.

func (*AccountPassword) GetEmailUnconfirmedPattern

func (p *AccountPassword) GetEmailUnconfirmedPattern() (value string, ok bool)

GetEmailUnconfirmedPattern returns value of EmailUnconfirmedPattern conditional field and boolean which is true if field was set.

func (*AccountPassword) GetHint

func (p *AccountPassword) GetHint() (value string, ok bool)

GetHint returns value of Hint conditional field and boolean which is true if field was set.

func (*AccountPassword) GetSrpB

func (p *AccountPassword) GetSrpB() (value []byte, ok bool)

GetSrpB returns value of SrpB conditional field and boolean which is true if field was set.

func (*AccountPassword) GetSrpID

func (p *AccountPassword) GetSrpID() (value int64, ok bool)

GetSrpID returns value of SrpID conditional field and boolean which is true if field was set.

func (*AccountPassword) SetCurrentAlgo

func (p *AccountPassword) SetCurrentAlgo(value PasswordKdfAlgoClass)

SetCurrentAlgo sets value of CurrentAlgo conditional field.

func (*AccountPassword) SetEmailUnconfirmedPattern

func (p *AccountPassword) SetEmailUnconfirmedPattern(value string)

SetEmailUnconfirmedPattern sets value of EmailUnconfirmedPattern conditional field.

func (*AccountPassword) SetHasPassword

func (p *AccountPassword) SetHasPassword(value bool)

SetHasPassword sets value of HasPassword conditional field.

func (*AccountPassword) SetHasRecovery

func (p *AccountPassword) SetHasRecovery(value bool)

SetHasRecovery sets value of HasRecovery conditional field.

func (*AccountPassword) SetHasSecureValues

func (p *AccountPassword) SetHasSecureValues(value bool)

SetHasSecureValues sets value of HasSecureValues conditional field.

func (*AccountPassword) SetHint

func (p *AccountPassword) SetHint(value string)

SetHint sets value of Hint conditional field.

func (*AccountPassword) SetSrpB

func (p *AccountPassword) SetSrpB(value []byte)

SetSrpB sets value of SrpB conditional field.

func (*AccountPassword) SetSrpID

func (p *AccountPassword) SetSrpID(value int64)

SetSrpID sets value of SrpID conditional field.

func (*AccountPassword) String added in v0.12.0

func (p *AccountPassword) String() string

String implements fmt.Stringer.

type AccountPasswordInputSettings

type AccountPasswordInputSettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The SRP algorithm¹ to use
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	//
	// Use SetNewAlgo and GetNewAlgo helpers.
	NewAlgo PasswordKdfAlgoClass
	// The computed password hash¹
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	//
	// Use SetNewPasswordHash and GetNewPasswordHash helpers.
	NewPasswordHash []byte
	// Text hint for the password
	//
	// Use SetHint and GetHint helpers.
	Hint string
	// Password recovery email
	//
	// Use SetEmail and GetEmail helpers.
	Email string
	// Telegram passport¹ settings
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetNewSecureSettings and GetNewSecureSettings helpers.
	NewSecureSettings SecureSecretSettings
}

AccountPasswordInputSettings represents TL type `account.passwordInputSettings#c23727c9`. Settings for setting up a new password

See https://core.telegram.org/constructor/account.passwordInputSettings for reference.

func (*AccountPasswordInputSettings) Decode

Decode implements bin.Decoder.

func (*AccountPasswordInputSettings) Encode

Encode implements bin.Encoder.

func (*AccountPasswordInputSettings) GetEmail

func (p *AccountPasswordInputSettings) GetEmail() (value string, ok bool)

GetEmail returns value of Email conditional field and boolean which is true if field was set.

func (*AccountPasswordInputSettings) GetHint

func (p *AccountPasswordInputSettings) GetHint() (value string, ok bool)

GetHint returns value of Hint conditional field and boolean which is true if field was set.

func (*AccountPasswordInputSettings) GetNewAlgo

func (p *AccountPasswordInputSettings) GetNewAlgo() (value PasswordKdfAlgoClass, ok bool)

GetNewAlgo returns value of NewAlgo conditional field and boolean which is true if field was set.

func (*AccountPasswordInputSettings) GetNewPasswordHash

func (p *AccountPasswordInputSettings) GetNewPasswordHash() (value []byte, ok bool)

GetNewPasswordHash returns value of NewPasswordHash conditional field and boolean which is true if field was set.

func (*AccountPasswordInputSettings) GetNewSecureSettings

func (p *AccountPasswordInputSettings) GetNewSecureSettings() (value SecureSecretSettings, ok bool)

GetNewSecureSettings returns value of NewSecureSettings conditional field and boolean which is true if field was set.

func (*AccountPasswordInputSettings) SetEmail

func (p *AccountPasswordInputSettings) SetEmail(value string)

SetEmail sets value of Email conditional field.

func (*AccountPasswordInputSettings) SetHint

func (p *AccountPasswordInputSettings) SetHint(value string)

SetHint sets value of Hint conditional field.

func (*AccountPasswordInputSettings) SetNewAlgo

SetNewAlgo sets value of NewAlgo conditional field.

func (*AccountPasswordInputSettings) SetNewPasswordHash

func (p *AccountPasswordInputSettings) SetNewPasswordHash(value []byte)

SetNewPasswordHash sets value of NewPasswordHash conditional field.

func (*AccountPasswordInputSettings) SetNewSecureSettings

func (p *AccountPasswordInputSettings) SetNewSecureSettings(value SecureSecretSettings)

SetNewSecureSettings sets value of NewSecureSettings conditional field.

func (*AccountPasswordInputSettings) String added in v0.12.0

String implements fmt.Stringer.

type AccountPasswordSettings

type AccountPasswordSettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// 2FA Recovery email¹
	//
	// Links:
	//  1) https://core.telegram.org/api/srp#email-verification
	//
	// Use SetEmail and GetEmail helpers.
	Email string
	// Telegram passport¹ settings
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetSecureSettings and GetSecureSettings helpers.
	SecureSettings SecureSecretSettings
}

AccountPasswordSettings represents TL type `account.passwordSettings#9a5c33e5`. Private info associated to the password info (recovery email, telegram passport¹ info & so on)

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/constructor/account.passwordSettings for reference.

func (*AccountPasswordSettings) Decode

func (p *AccountPasswordSettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountPasswordSettings) Encode

func (p *AccountPasswordSettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountPasswordSettings) GetEmail

func (p *AccountPasswordSettings) GetEmail() (value string, ok bool)

GetEmail returns value of Email conditional field and boolean which is true if field was set.

func (*AccountPasswordSettings) GetSecureSettings

func (p *AccountPasswordSettings) GetSecureSettings() (value SecureSecretSettings, ok bool)

GetSecureSettings returns value of SecureSettings conditional field and boolean which is true if field was set.

func (*AccountPasswordSettings) SetEmail

func (p *AccountPasswordSettings) SetEmail(value string)

SetEmail sets value of Email conditional field.

func (*AccountPasswordSettings) SetSecureSettings

func (p *AccountPasswordSettings) SetSecureSettings(value SecureSecretSettings)

SetSecureSettings sets value of SecureSettings conditional field.

func (*AccountPasswordSettings) String added in v0.12.0

func (p *AccountPasswordSettings) String() string

String implements fmt.Stringer.

type AccountPrivacyRules

type AccountPrivacyRules struct {
	// Privacy rules
	Rules []PrivacyRuleClass
	// Chats to which the rules apply
	Chats []ChatClass
	// Users to which the rules apply
	Users []UserClass
}

AccountPrivacyRules represents TL type `account.privacyRules#50a04e45`. Privacy rules

See https://core.telegram.org/constructor/account.privacyRules for reference.

func (*AccountPrivacyRules) Decode

func (p *AccountPrivacyRules) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountPrivacyRules) Encode

func (p *AccountPrivacyRules) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountPrivacyRules) String added in v0.12.0

func (p *AccountPrivacyRules) String() string

String implements fmt.Stringer.

type AccountRegisterDeviceRequest

type AccountRegisterDeviceRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Avoid receiving (silent and invisible background) notifications. Useful to save battery.
	NoMuted bool
	// Device token type.Possible values:1 - APNS (device token for apple push)2 - FCM (firebase token for google firebase)3 - MPNS (channel URI for microsoft push)4 - Simple push (endpoint for firefox's simple push API)5 - Ubuntu phone (token for ubuntu push)6 - Blackberry (token for blackberry push)7 - Unused8 - WNS (windows push)9 - APNS VoIP (token for apple push VoIP)10 - Web push (web push, see below)11 - MPNS VoIP (token for microsoft push VoIP)12 - Tizen (token for tizen push)For 10 web push, the token must be a JSON-encoded object containing the keys described in PUSH updates¹
	//
	// Links:
	//  1) https://core.telegram.org/api/push-updates
	TokenType int
	// Device token
	Token string
	// If (boolTrue)¹ is transmitted, a sandbox-certificate will be used during transmission.
	//
	// Links:
	//  1) https://core.telegram.org/constructor/boolTrue
	AppSandbox bool
	// For FCM and APNS VoIP, optional encryption key used to encrypt push notifications
	Secret []byte
	// List of user identifiers of other users currently using the client
	OtherUids []int
}

AccountRegisterDeviceRequest represents TL type `account.registerDevice#68976c6f`. Register device to receive PUSH notifications¹

Links:

  1. https://core.telegram.org/api/push-updates

See https://core.telegram.org/method/account.registerDevice for reference.

func (*AccountRegisterDeviceRequest) Decode

Decode implements bin.Decoder.

func (*AccountRegisterDeviceRequest) Encode

Encode implements bin.Encoder.

func (*AccountRegisterDeviceRequest) SetNoMuted

func (r *AccountRegisterDeviceRequest) SetNoMuted(value bool)

SetNoMuted sets value of NoMuted conditional field.

func (*AccountRegisterDeviceRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountReportPeerRequest

type AccountReportPeerRequest struct {
	// The peer to report
	Peer InputPeerClass
	// The reason why this peer is being reported
	Reason ReportReasonClass
}

AccountReportPeerRequest represents TL type `account.reportPeer#ae189d5f`. Report a peer for violation of telegram's Terms of Service

See https://core.telegram.org/method/account.reportPeer for reference.

func (*AccountReportPeerRequest) Decode

func (r *AccountReportPeerRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountReportPeerRequest) Encode

func (r *AccountReportPeerRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountReportPeerRequest) String added in v0.12.0

func (r *AccountReportPeerRequest) String() string

String implements fmt.Stringer.

type AccountResendPasswordEmailRequest

type AccountResendPasswordEmailRequest struct {
}

AccountResendPasswordEmailRequest represents TL type `account.resendPasswordEmail#7a7f2a15`. Resend the code to verify an email to use as 2FA recovery method¹.

Links:

  1. https://core.telegram.org/api/srp

See https://core.telegram.org/method/account.resendPasswordEmail for reference.

func (*AccountResendPasswordEmailRequest) Decode

Decode implements bin.Decoder.

func (*AccountResendPasswordEmailRequest) Encode

Encode implements bin.Encoder.

func (*AccountResendPasswordEmailRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountResetAuthorizationRequest

type AccountResetAuthorizationRequest struct {
	// Session hash
	Hash int64
}

AccountResetAuthorizationRequest represents TL type `account.resetAuthorization#df77f3bc`. Log out an active authorized session¹ by its hash

Links:

  1. https://core.telegram.org/api/auth

See https://core.telegram.org/method/account.resetAuthorization for reference.

func (*AccountResetAuthorizationRequest) Decode

Decode implements bin.Decoder.

func (*AccountResetAuthorizationRequest) Encode

Encode implements bin.Encoder.

func (*AccountResetAuthorizationRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountResetNotifySettingsRequest

type AccountResetNotifySettingsRequest struct {
}

AccountResetNotifySettingsRequest represents TL type `account.resetNotifySettings#db7e1747`. Resets all notification settings from users and groups.

See https://core.telegram.org/method/account.resetNotifySettings for reference.

func (*AccountResetNotifySettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountResetNotifySettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountResetNotifySettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountResetWallPapersRequest

type AccountResetWallPapersRequest struct {
}

AccountResetWallPapersRequest represents TL type `account.resetWallPapers#bb3b9804`. Delete installed wallpapers

See https://core.telegram.org/method/account.resetWallPapers for reference.

func (*AccountResetWallPapersRequest) Decode

Decode implements bin.Decoder.

func (*AccountResetWallPapersRequest) Encode

Encode implements bin.Encoder.

func (*AccountResetWallPapersRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountResetWebAuthorizationRequest

type AccountResetWebAuthorizationRequest struct {
	// Session¹ hash
	//
	// Links:
	//  1) https://core.telegram.org/constructor/webAuthorization
	Hash int64
}

AccountResetWebAuthorizationRequest represents TL type `account.resetWebAuthorization#2d01b9ef`. Log out an active web telegram login¹ session

Links:

  1. https://core.telegram.org/widgets/login

See https://core.telegram.org/method/account.resetWebAuthorization for reference.

func (*AccountResetWebAuthorizationRequest) Decode

Decode implements bin.Decoder.

func (*AccountResetWebAuthorizationRequest) Encode

Encode implements bin.Encoder.

func (*AccountResetWebAuthorizationRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountResetWebAuthorizationsRequest

type AccountResetWebAuthorizationsRequest struct {
}

AccountResetWebAuthorizationsRequest represents TL type `account.resetWebAuthorizations#682d2594`. Reset all active web telegram login¹ sessions

Links:

  1. https://core.telegram.org/widgets/login

See https://core.telegram.org/method/account.resetWebAuthorizations for reference.

func (*AccountResetWebAuthorizationsRequest) Decode

Decode implements bin.Decoder.

func (*AccountResetWebAuthorizationsRequest) Encode

Encode implements bin.Encoder.

func (*AccountResetWebAuthorizationsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountSaveAutoDownloadSettingsRequest

type AccountSaveAutoDownloadSettingsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to save settings in the low data usage preset
	Low bool
	// Whether to save settings in the high data usage preset
	High bool
	// Media autodownload settings
	Settings AutoDownloadSettings
}

AccountSaveAutoDownloadSettingsRequest represents TL type `account.saveAutoDownloadSettings#76f36233`. Change media autodownload settings

See https://core.telegram.org/method/account.saveAutoDownloadSettings for reference.

func (*AccountSaveAutoDownloadSettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountSaveAutoDownloadSettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountSaveAutoDownloadSettingsRequest) SetHigh

func (s *AccountSaveAutoDownloadSettingsRequest) SetHigh(value bool)

SetHigh sets value of High conditional field.

func (*AccountSaveAutoDownloadSettingsRequest) SetLow

SetLow sets value of Low conditional field.

func (*AccountSaveAutoDownloadSettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountSaveSecureValueRequest

type AccountSaveSecureValueRequest struct {
	// Secure value, for more info see the passport docs »¹
	//
	// Links:
	//  1) https://core.telegram.org/passport/encryption#encryption
	Value InputSecureValue
	// Passport secret hash, for more info see the passport docs »¹
	//
	// Links:
	//  1) https://core.telegram.org/passport/encryption#encryption
	SecureSecretID int64
}

AccountSaveSecureValueRequest represents TL type `account.saveSecureValue#899fe31d`. Securely save Telegram Passport¹ document, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#encryption

See https://core.telegram.org/method/account.saveSecureValue for reference.

func (*AccountSaveSecureValueRequest) Decode

Decode implements bin.Decoder.

func (*AccountSaveSecureValueRequest) Encode

Encode implements bin.Encoder.

func (*AccountSaveSecureValueRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountSaveThemeRequest

type AccountSaveThemeRequest struct {
	// Theme to save
	Theme InputThemeClass
	// Unsave
	Unsave bool
}

AccountSaveThemeRequest represents TL type `account.saveTheme#f257106c`. Save a theme

See https://core.telegram.org/method/account.saveTheme for reference.

func (*AccountSaveThemeRequest) Decode

func (s *AccountSaveThemeRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountSaveThemeRequest) Encode

func (s *AccountSaveThemeRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountSaveThemeRequest) String added in v0.12.0

func (s *AccountSaveThemeRequest) String() string

String implements fmt.Stringer.

type AccountSaveWallPaperRequest

type AccountSaveWallPaperRequest struct {
	// Wallpaper to save
	Wallpaper InputWallPaperClass
	// Uninstall wallpaper?
	Unsave bool
	// Wallpaper settings
	Settings WallPaperSettings
}

AccountSaveWallPaperRequest represents TL type `account.saveWallPaper#6c5a5b37`. Install/uninstall wallpaper

See https://core.telegram.org/method/account.saveWallPaper for reference.

func (*AccountSaveWallPaperRequest) Decode

Decode implements bin.Decoder.

func (*AccountSaveWallPaperRequest) Encode

Encode implements bin.Encoder.

func (*AccountSaveWallPaperRequest) String added in v0.12.0

func (s *AccountSaveWallPaperRequest) String() string

String implements fmt.Stringer.

type AccountSendChangePhoneCodeRequest

type AccountSendChangePhoneCodeRequest struct {
	// New phone number
	PhoneNumber string
	// Phone code settings
	Settings CodeSettings
}

AccountSendChangePhoneCodeRequest represents TL type `account.sendChangePhoneCode#82574ae5`. Verify a new phone number to associate to the current account

See https://core.telegram.org/method/account.sendChangePhoneCode for reference.

func (*AccountSendChangePhoneCodeRequest) Decode

Decode implements bin.Decoder.

func (*AccountSendChangePhoneCodeRequest) Encode

Encode implements bin.Encoder.

func (*AccountSendChangePhoneCodeRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountSendConfirmPhoneCodeRequest

type AccountSendConfirmPhoneCodeRequest struct {
	// The hash from the service notification, for more info click here »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/account-deletion
	Hash string
	// Phone code settings
	Settings CodeSettings
}

AccountSendConfirmPhoneCodeRequest represents TL type `account.sendConfirmPhoneCode#1b3faa88`. Send confirmation code to cancel account deletion, for more info click here »¹

Links:

  1. https://core.telegram.org/api/account-deletion

See https://core.telegram.org/method/account.sendConfirmPhoneCode for reference.

func (*AccountSendConfirmPhoneCodeRequest) Decode

Decode implements bin.Decoder.

func (*AccountSendConfirmPhoneCodeRequest) Encode

Encode implements bin.Encoder.

func (*AccountSendConfirmPhoneCodeRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountSendVerifyEmailCodeRequest

type AccountSendVerifyEmailCodeRequest struct {
	// The email where to send the code
	Email string
}

AccountSendVerifyEmailCodeRequest represents TL type `account.sendVerifyEmailCode#7011509f`. Send the verification email code for telegram passport¹.

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/method/account.sendVerifyEmailCode for reference.

func (*AccountSendVerifyEmailCodeRequest) Decode

Decode implements bin.Decoder.

func (*AccountSendVerifyEmailCodeRequest) Encode

Encode implements bin.Encoder.

func (*AccountSendVerifyEmailCodeRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountSendVerifyPhoneCodeRequest

type AccountSendVerifyPhoneCodeRequest struct {
	// The phone number to verify
	PhoneNumber string
	// Phone code settings
	Settings CodeSettings
}

AccountSendVerifyPhoneCodeRequest represents TL type `account.sendVerifyPhoneCode#a5a356f9`. Send the verification phone code for telegram passport¹.

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/method/account.sendVerifyPhoneCode for reference.

func (*AccountSendVerifyPhoneCodeRequest) Decode

Decode implements bin.Decoder.

func (*AccountSendVerifyPhoneCodeRequest) Encode

Encode implements bin.Encoder.

func (*AccountSendVerifyPhoneCodeRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountSentEmailCode

type AccountSentEmailCode struct {
	// The email (to which the code was sent) must match this pattern¹
	//
	// Links:
	//  1) https://core.telegram.org/api/pattern
	EmailPattern string
	// The length of the verification code
	Length int
}

AccountSentEmailCode represents TL type `account.sentEmailCode#811f854f`. The sent email code

See https://core.telegram.org/constructor/account.sentEmailCode for reference.

func (*AccountSentEmailCode) Decode

func (s *AccountSentEmailCode) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountSentEmailCode) Encode

func (s *AccountSentEmailCode) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountSentEmailCode) String added in v0.12.0

func (s *AccountSentEmailCode) String() string

String implements fmt.Stringer.

type AccountSetAccountTTLRequest

type AccountSetAccountTTLRequest struct {
	// Time to live in days
	TTL AccountDaysTTL
}

AccountSetAccountTTLRequest represents TL type `account.setAccountTTL#2442485e`. Set account self-destruction period

See https://core.telegram.org/method/account.setAccountTTL for reference.

func (*AccountSetAccountTTLRequest) Decode

Decode implements bin.Decoder.

func (*AccountSetAccountTTLRequest) Encode

Encode implements bin.Encoder.

func (*AccountSetAccountTTLRequest) String added in v0.12.0

func (s *AccountSetAccountTTLRequest) String() string

String implements fmt.Stringer.

type AccountSetContactSignUpNotificationRequest

type AccountSetContactSignUpNotificationRequest struct {
	// Whether to disable contact sign up notifications
	Silent bool
}

AccountSetContactSignUpNotificationRequest represents TL type `account.setContactSignUpNotification#cff43f61`. Toggle contact sign up notifications

See https://core.telegram.org/method/account.setContactSignUpNotification for reference.

func (*AccountSetContactSignUpNotificationRequest) Decode

Decode implements bin.Decoder.

func (*AccountSetContactSignUpNotificationRequest) Encode

Encode implements bin.Encoder.

func (*AccountSetContactSignUpNotificationRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountSetContentSettingsRequest

type AccountSetContentSettingsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Enable NSFW content
	SensitiveEnabled bool
}

AccountSetContentSettingsRequest represents TL type `account.setContentSettings#b574b16b`. Set sensitive content settings (for viewing or hiding NSFW content)

See https://core.telegram.org/method/account.setContentSettings for reference.

func (*AccountSetContentSettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountSetContentSettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountSetContentSettingsRequest) SetSensitiveEnabled

func (s *AccountSetContentSettingsRequest) SetSensitiveEnabled(value bool)

SetSensitiveEnabled sets value of SensitiveEnabled conditional field.

func (*AccountSetContentSettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountSetGlobalPrivacySettingsRequest

type AccountSetGlobalPrivacySettingsRequest struct {
	// Global privacy settings
	Settings GlobalPrivacySettings
}

AccountSetGlobalPrivacySettingsRequest represents TL type `account.setGlobalPrivacySettings#1edaaac2`. Set global privacy settings

See https://core.telegram.org/method/account.setGlobalPrivacySettings for reference.

func (*AccountSetGlobalPrivacySettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountSetGlobalPrivacySettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountSetGlobalPrivacySettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountSetPrivacyRequest

type AccountSetPrivacyRequest struct {
	// Peers to which the privacy rules apply
	Key InputPrivacyKeyClass
	// New privacy rules
	Rules []InputPrivacyRuleClass
}

AccountSetPrivacyRequest represents TL type `account.setPrivacy#c9f81ce8`. Change privacy settings of current account

See https://core.telegram.org/method/account.setPrivacy for reference.

func (*AccountSetPrivacyRequest) Decode

func (s *AccountSetPrivacyRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountSetPrivacyRequest) Encode

func (s *AccountSetPrivacyRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountSetPrivacyRequest) String added in v0.12.0

func (s *AccountSetPrivacyRequest) String() string

String implements fmt.Stringer.

type AccountTakeout

type AccountTakeout struct {
	// Takeout ID
	ID int64
}

AccountTakeout represents TL type `account.takeout#4dba4501`. Takout info

See https://core.telegram.org/constructor/account.takeout for reference.

func (*AccountTakeout) Decode

func (t *AccountTakeout) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountTakeout) Encode

func (t *AccountTakeout) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountTakeout) String added in v0.12.0

func (t *AccountTakeout) String() string

String implements fmt.Stringer.

type AccountThemes

type AccountThemes struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// Themes
	Themes []Theme
}

AccountThemes represents TL type `account.themes#7f676421`. Installed themes

See https://core.telegram.org/constructor/account.themes for reference.

func (*AccountThemes) Decode

func (t *AccountThemes) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountThemes) Encode

func (t *AccountThemes) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountThemes) String added in v0.12.0

func (t *AccountThemes) String() string

String implements fmt.Stringer.

type AccountThemesBox

type AccountThemesBox struct {
	Themes AccountThemesClass
}

AccountThemes boxes the AccountThemesClass providing a helper.

func (*AccountThemesBox) Decode

func (b *AccountThemesBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for AccountThemesBox.

func (*AccountThemesBox) Encode

func (b *AccountThemesBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for AccountThemesBox.

type AccountThemesClass

type AccountThemesClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

AccountThemesClass represents account.Themes generic type.

See https://core.telegram.org/type/account.Themes for reference.

Example:

g, err := DecodeAccountThemes(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *AccountThemesNotModified: // account.themesNotModified#f41eb622
case *AccountThemes: // account.themes#7f676421
default: panic(v)
}

func DecodeAccountThemes

func DecodeAccountThemes(buf *bin.Buffer) (AccountThemesClass, error)

DecodeAccountThemes implements binary de-serialization for AccountThemesClass.

type AccountThemesNotModified

type AccountThemesNotModified struct {
}

AccountThemesNotModified represents TL type `account.themesNotModified#f41eb622`. No new themes were installed

See https://core.telegram.org/constructor/account.themesNotModified for reference.

func (*AccountThemesNotModified) Decode

func (t *AccountThemesNotModified) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountThemesNotModified) Encode

func (t *AccountThemesNotModified) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountThemesNotModified) String added in v0.12.0

func (t *AccountThemesNotModified) String() string

String implements fmt.Stringer.

type AccountTmpPassword

type AccountTmpPassword struct {
	// Temporary password
	TmpPassword []byte
	// Validity period
	ValidUntil int
}

AccountTmpPassword represents TL type `account.tmpPassword#db64fd34`. Temporary payment password

See https://core.telegram.org/constructor/account.tmpPassword for reference.

func (*AccountTmpPassword) Decode

func (t *AccountTmpPassword) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountTmpPassword) Encode

func (t *AccountTmpPassword) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountTmpPassword) String added in v0.12.0

func (t *AccountTmpPassword) String() string

String implements fmt.Stringer.

type AccountUnregisterDeviceRequest

type AccountUnregisterDeviceRequest struct {
	// Device token type.Possible values:1 - APNS (device token for apple push)2 - FCM (firebase token for google firebase)3 - MPNS (channel URI for microsoft push)4 - Simple push (endpoint for firefox's simple push API)5 - Ubuntu phone (token for ubuntu push)6 - Blackberry (token for blackberry push)7 - Unused8 - WNS (windows push)9 - APNS VoIP (token for apple push VoIP)10 - Web push (web push, see below)11 - MPNS VoIP (token for microsoft push VoIP)12 - Tizen (token for tizen push)For 10 web push, the token must be a JSON-encoded object containing the keys described in PUSH updates¹
	//
	// Links:
	//  1) https://core.telegram.org/api/push-updates
	TokenType int
	// Device token
	Token string
	// List of user identifiers of other users currently using the client
	OtherUids []int
}

AccountUnregisterDeviceRequest represents TL type `account.unregisterDevice#3076c4bf`. Deletes a device by its token, stops sending PUSH-notifications to it.

See https://core.telegram.org/method/account.unregisterDevice for reference.

func (*AccountUnregisterDeviceRequest) Decode

Decode implements bin.Decoder.

func (*AccountUnregisterDeviceRequest) Encode

Encode implements bin.Encoder.

func (*AccountUnregisterDeviceRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountUpdateDeviceLockedRequest

type AccountUpdateDeviceLockedRequest struct {
	// Inactivity period after which to start hiding message texts in PUSH notifications¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/push-updates
	Period int
}

AccountUpdateDeviceLockedRequest represents TL type `account.updateDeviceLocked#38df3532`. When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications¹.

Links:

  1. https://core.telegram.org/api/push-updates

See https://core.telegram.org/method/account.updateDeviceLocked for reference.

func (*AccountUpdateDeviceLockedRequest) Decode

Decode implements bin.Decoder.

func (*AccountUpdateDeviceLockedRequest) Encode

Encode implements bin.Encoder.

func (*AccountUpdateDeviceLockedRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountUpdateNotifySettingsRequest

type AccountUpdateNotifySettingsRequest struct {
	// Notification source
	Peer InputNotifyPeerClass
	// Notification settings
	Settings InputPeerNotifySettings
}

AccountUpdateNotifySettingsRequest represents TL type `account.updateNotifySettings#84be5b93`. Edits notification settings from a given user/group, from all users/all groups.

See https://core.telegram.org/method/account.updateNotifySettings for reference.

func (*AccountUpdateNotifySettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountUpdateNotifySettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountUpdateNotifySettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountUpdatePasswordSettingsRequest

type AccountUpdatePasswordSettingsRequest struct {
	// The old password (see SRP¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	Password InputCheckPasswordSRPClass
	// The new password (see SRP¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	NewSettings AccountPasswordInputSettings
}

AccountUpdatePasswordSettingsRequest represents TL type `account.updatePasswordSettings#a59b102f`. Set a new 2FA password

See https://core.telegram.org/method/account.updatePasswordSettings for reference.

func (*AccountUpdatePasswordSettingsRequest) Decode

Decode implements bin.Decoder.

func (*AccountUpdatePasswordSettingsRequest) Encode

Encode implements bin.Encoder.

func (*AccountUpdatePasswordSettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountUpdateProfileRequest

type AccountUpdateProfileRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// New user first name
	//
	// Use SetFirstName and GetFirstName helpers.
	FirstName string
	// New user last name
	//
	// Use SetLastName and GetLastName helpers.
	LastName string
	// New bio
	//
	// Use SetAbout and GetAbout helpers.
	About string
}

AccountUpdateProfileRequest represents TL type `account.updateProfile#78515775`. Updates user profile.

See https://core.telegram.org/method/account.updateProfile for reference.

func (*AccountUpdateProfileRequest) Decode

Decode implements bin.Decoder.

func (*AccountUpdateProfileRequest) Encode

Encode implements bin.Encoder.

func (*AccountUpdateProfileRequest) GetAbout

func (u *AccountUpdateProfileRequest) GetAbout() (value string, ok bool)

GetAbout returns value of About conditional field and boolean which is true if field was set.

func (*AccountUpdateProfileRequest) GetFirstName

func (u *AccountUpdateProfileRequest) GetFirstName() (value string, ok bool)

GetFirstName returns value of FirstName conditional field and boolean which is true if field was set.

func (*AccountUpdateProfileRequest) GetLastName

func (u *AccountUpdateProfileRequest) GetLastName() (value string, ok bool)

GetLastName returns value of LastName conditional field and boolean which is true if field was set.

func (*AccountUpdateProfileRequest) SetAbout

func (u *AccountUpdateProfileRequest) SetAbout(value string)

SetAbout sets value of About conditional field.

func (*AccountUpdateProfileRequest) SetFirstName

func (u *AccountUpdateProfileRequest) SetFirstName(value string)

SetFirstName sets value of FirstName conditional field.

func (*AccountUpdateProfileRequest) SetLastName

func (u *AccountUpdateProfileRequest) SetLastName(value string)

SetLastName sets value of LastName conditional field.

func (*AccountUpdateProfileRequest) String added in v0.12.0

func (u *AccountUpdateProfileRequest) String() string

String implements fmt.Stringer.

type AccountUpdateStatusRequest

type AccountUpdateStatusRequest struct {
	// If (boolTrue)¹ is transmitted, user status will change to (userStatusOffline)².
	//
	// Links:
	//  1) https://core.telegram.org/constructor/boolTrue
	//  2) https://core.telegram.org/constructor/userStatusOffline
	Offline bool
}

AccountUpdateStatusRequest represents TL type `account.updateStatus#6628562c`. Updates online user status.

See https://core.telegram.org/method/account.updateStatus for reference.

func (*AccountUpdateStatusRequest) Decode

Decode implements bin.Decoder.

func (*AccountUpdateStatusRequest) Encode

Encode implements bin.Encoder.

func (*AccountUpdateStatusRequest) String added in v0.12.0

func (u *AccountUpdateStatusRequest) String() string

String implements fmt.Stringer.

type AccountUpdateThemeRequest

type AccountUpdateThemeRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Theme format, a string that identifies the theming engines supported by the client
	Format string
	// Theme to update
	Theme InputThemeClass
	// Unique theme ID
	//
	// Use SetSlug and GetSlug helpers.
	Slug string
	// Theme name
	//
	// Use SetTitle and GetTitle helpers.
	Title string
	// Theme file
	//
	// Use SetDocument and GetDocument helpers.
	Document InputDocumentClass
	// Theme settings
	//
	// Use SetSettings and GetSettings helpers.
	Settings InputThemeSettings
}

AccountUpdateThemeRequest represents TL type `account.updateTheme#5cb367d5`. Update theme

See https://core.telegram.org/method/account.updateTheme for reference.

func (*AccountUpdateThemeRequest) Decode

func (u *AccountUpdateThemeRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountUpdateThemeRequest) Encode

func (u *AccountUpdateThemeRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountUpdateThemeRequest) GetDocument

func (u *AccountUpdateThemeRequest) GetDocument() (value InputDocumentClass, ok bool)

GetDocument returns value of Document conditional field and boolean which is true if field was set.

func (*AccountUpdateThemeRequest) GetSettings

func (u *AccountUpdateThemeRequest) GetSettings() (value InputThemeSettings, ok bool)

GetSettings returns value of Settings conditional field and boolean which is true if field was set.

func (*AccountUpdateThemeRequest) GetSlug

func (u *AccountUpdateThemeRequest) GetSlug() (value string, ok bool)

GetSlug returns value of Slug conditional field and boolean which is true if field was set.

func (*AccountUpdateThemeRequest) GetTitle

func (u *AccountUpdateThemeRequest) GetTitle() (value string, ok bool)

GetTitle returns value of Title conditional field and boolean which is true if field was set.

func (*AccountUpdateThemeRequest) SetDocument

func (u *AccountUpdateThemeRequest) SetDocument(value InputDocumentClass)

SetDocument sets value of Document conditional field.

func (*AccountUpdateThemeRequest) SetSettings

func (u *AccountUpdateThemeRequest) SetSettings(value InputThemeSettings)

SetSettings sets value of Settings conditional field.

func (*AccountUpdateThemeRequest) SetSlug

func (u *AccountUpdateThemeRequest) SetSlug(value string)

SetSlug sets value of Slug conditional field.

func (*AccountUpdateThemeRequest) SetTitle

func (u *AccountUpdateThemeRequest) SetTitle(value string)

SetTitle sets value of Title conditional field.

func (*AccountUpdateThemeRequest) String added in v0.12.0

func (u *AccountUpdateThemeRequest) String() string

String implements fmt.Stringer.

type AccountUpdateUsernameRequest

type AccountUpdateUsernameRequest struct {
	// username or empty string if username is to be removedAccepted characters: a-z (case-insensitive), 0-9 and underscores.Length: 5-32 characters.
	Username string
}

AccountUpdateUsernameRequest represents TL type `account.updateUsername#3e0bdd7c`. Changes username for the current user.

See https://core.telegram.org/method/account.updateUsername for reference.

func (*AccountUpdateUsernameRequest) Decode

Decode implements bin.Decoder.

func (*AccountUpdateUsernameRequest) Encode

Encode implements bin.Encoder.

func (*AccountUpdateUsernameRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountUploadThemeRequest

type AccountUploadThemeRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Theme file uploaded as described in files »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/files
	File InputFileClass
	// Thumbnail
	//
	// Use SetThumb and GetThumb helpers.
	Thumb InputFileClass
	// File name
	FileName string
	// MIME type, must be application/x-tgtheme-{format}, where format depends on the client
	MimeType string
}

AccountUploadThemeRequest represents TL type `account.uploadTheme#1c3db333`. Upload theme

See https://core.telegram.org/method/account.uploadTheme for reference.

func (*AccountUploadThemeRequest) Decode

func (u *AccountUploadThemeRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountUploadThemeRequest) Encode

func (u *AccountUploadThemeRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountUploadThemeRequest) GetThumb

func (u *AccountUploadThemeRequest) GetThumb() (value InputFileClass, ok bool)

GetThumb returns value of Thumb conditional field and boolean which is true if field was set.

func (*AccountUploadThemeRequest) SetThumb

func (u *AccountUploadThemeRequest) SetThumb(value InputFileClass)

SetThumb sets value of Thumb conditional field.

func (*AccountUploadThemeRequest) String added in v0.12.0

func (u *AccountUploadThemeRequest) String() string

String implements fmt.Stringer.

type AccountUploadWallPaperRequest

type AccountUploadWallPaperRequest struct {
	// The JPG/PNG wallpaper
	File InputFileClass
	// MIME type of uploaded wallpaper
	MimeType string
	// Wallpaper settings
	Settings WallPaperSettings
}

AccountUploadWallPaperRequest represents TL type `account.uploadWallPaper#dd853661`. Create and upload a new wallpaper

See https://core.telegram.org/method/account.uploadWallPaper for reference.

func (*AccountUploadWallPaperRequest) Decode

Decode implements bin.Decoder.

func (*AccountUploadWallPaperRequest) Encode

Encode implements bin.Encoder.

func (*AccountUploadWallPaperRequest) String added in v0.12.0

String implements fmt.Stringer.

type AccountVerifyEmailRequest

type AccountVerifyEmailRequest struct {
	// The email to verify
	Email string
	// The verification code that was received
	Code string
}

AccountVerifyEmailRequest represents TL type `account.verifyEmail#ecba39db`. Verify an email address for telegram passport¹.

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/method/account.verifyEmail for reference.

func (*AccountVerifyEmailRequest) Decode

func (v *AccountVerifyEmailRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountVerifyEmailRequest) Encode

func (v *AccountVerifyEmailRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountVerifyEmailRequest) String added in v0.12.0

func (v *AccountVerifyEmailRequest) String() string

String implements fmt.Stringer.

type AccountVerifyPhoneRequest

type AccountVerifyPhoneRequest struct {
	// Phone number
	PhoneNumber string
	// Phone code hash received from the call to account.sendVerifyPhoneCode¹
	//
	// Links:
	//  1) https://core.telegram.org/method/account.sendVerifyPhoneCode
	PhoneCodeHash string
	// Code received after the call to account.sendVerifyPhoneCode¹
	//
	// Links:
	//  1) https://core.telegram.org/method/account.sendVerifyPhoneCode
	PhoneCode string
}

AccountVerifyPhoneRequest represents TL type `account.verifyPhone#4dd3a7f6`. Verify a phone number for telegram passport¹.

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/method/account.verifyPhone for reference.

func (*AccountVerifyPhoneRequest) Decode

func (v *AccountVerifyPhoneRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountVerifyPhoneRequest) Encode

func (v *AccountVerifyPhoneRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountVerifyPhoneRequest) String added in v0.12.0

func (v *AccountVerifyPhoneRequest) String() string

String implements fmt.Stringer.

type AccountWallPapers

type AccountWallPapers struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// Wallpapers
	Wallpapers []WallPaperClass
}

AccountWallPapers represents TL type `account.wallPapers#702b65a9`. Installed wallpapers

See https://core.telegram.org/constructor/account.wallPapers for reference.

func (*AccountWallPapers) Decode

func (w *AccountWallPapers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountWallPapers) Encode

func (w *AccountWallPapers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountWallPapers) String added in v0.12.0

func (w *AccountWallPapers) String() string

String implements fmt.Stringer.

type AccountWallPapersBox

type AccountWallPapersBox struct {
	WallPapers AccountWallPapersClass
}

AccountWallPapers boxes the AccountWallPapersClass providing a helper.

func (*AccountWallPapersBox) Decode

func (b *AccountWallPapersBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for AccountWallPapersBox.

func (*AccountWallPapersBox) Encode

func (b *AccountWallPapersBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for AccountWallPapersBox.

type AccountWallPapersClass

type AccountWallPapersClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

AccountWallPapersClass represents account.WallPapers generic type.

See https://core.telegram.org/type/account.WallPapers for reference.

Example:

g, err := DecodeAccountWallPapers(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *AccountWallPapersNotModified: // account.wallPapersNotModified#1c199183
case *AccountWallPapers: // account.wallPapers#702b65a9
default: panic(v)
}

func DecodeAccountWallPapers

func DecodeAccountWallPapers(buf *bin.Buffer) (AccountWallPapersClass, error)

DecodeAccountWallPapers implements binary de-serialization for AccountWallPapersClass.

type AccountWallPapersNotModified

type AccountWallPapersNotModified struct {
}

AccountWallPapersNotModified represents TL type `account.wallPapersNotModified#1c199183`. No new wallpapers were found

See https://core.telegram.org/constructor/account.wallPapersNotModified for reference.

func (*AccountWallPapersNotModified) Decode

Decode implements bin.Decoder.

func (*AccountWallPapersNotModified) Encode

Encode implements bin.Encoder.

func (*AccountWallPapersNotModified) String added in v0.12.0

String implements fmt.Stringer.

type AccountWebAuthorizations

type AccountWebAuthorizations struct {
	// Web authorization list
	Authorizations []WebAuthorization
	// Users
	Users []UserClass
}

AccountWebAuthorizations represents TL type `account.webAuthorizations#ed56c9fc`. Web authorizations

See https://core.telegram.org/constructor/account.webAuthorizations for reference.

func (*AccountWebAuthorizations) Decode

func (w *AccountWebAuthorizations) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AccountWebAuthorizations) Encode

func (w *AccountWebAuthorizations) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AccountWebAuthorizations) String added in v0.12.0

func (w *AccountWebAuthorizations) String() string

String implements fmt.Stringer.

type AuthAcceptLoginTokenRequest

type AuthAcceptLoginTokenRequest struct {
	// Login token embedded in QR code, for more info, see login via QR code¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/qr-login
	Token []byte
}

AuthAcceptLoginTokenRequest represents TL type `auth.acceptLoginToken#e894ad4d`. Accept QR code login token, logging in the app that generated it. Returns info about the new session. For more info, see login via QR code¹.

Links:

  1. https://core.telegram.org/api/qr-login

See https://core.telegram.org/method/auth.acceptLoginToken for reference.

func (*AuthAcceptLoginTokenRequest) Decode

Decode implements bin.Decoder.

func (*AuthAcceptLoginTokenRequest) Encode

Encode implements bin.Encoder.

func (*AuthAcceptLoginTokenRequest) String added in v0.12.0

func (a *AuthAcceptLoginTokenRequest) String() string

String implements fmt.Stringer.

type AuthAuthorization

type AuthAuthorization struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Temporary passport¹ sessions
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetTmpSessions and GetTmpSessions helpers.
	TmpSessions int
	// Info on authorized user
	User UserClass
}

AuthAuthorization represents TL type `auth.authorization#cd050916`. Contains user authorization info.

See https://core.telegram.org/constructor/auth.authorization for reference.

func (*AuthAuthorization) Decode

func (a *AuthAuthorization) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthAuthorization) Encode

func (a *AuthAuthorization) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthAuthorization) GetTmpSessions

func (a *AuthAuthorization) GetTmpSessions() (value int, ok bool)

GetTmpSessions returns value of TmpSessions conditional field and boolean which is true if field was set.

func (*AuthAuthorization) SetTmpSessions

func (a *AuthAuthorization) SetTmpSessions(value int)

SetTmpSessions sets value of TmpSessions conditional field.

func (*AuthAuthorization) String added in v0.12.0

func (a *AuthAuthorization) String() string

String implements fmt.Stringer.

type AuthAuthorizationBox

type AuthAuthorizationBox struct {
	Authorization AuthAuthorizationClass
}

AuthAuthorization boxes the AuthAuthorizationClass providing a helper.

func (*AuthAuthorizationBox) Decode

func (b *AuthAuthorizationBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for AuthAuthorizationBox.

func (*AuthAuthorizationBox) Encode

func (b *AuthAuthorizationBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for AuthAuthorizationBox.

type AuthAuthorizationClass

type AuthAuthorizationClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

AuthAuthorizationClass represents auth.Authorization generic type.

See https://core.telegram.org/type/auth.Authorization for reference.

Example:

g, err := DecodeAuthAuthorization(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *AuthAuthorization: // auth.authorization#cd050916
case *AuthAuthorizationSignUpRequired: // auth.authorizationSignUpRequired#44747e9a
default: panic(v)
}

func DecodeAuthAuthorization

func DecodeAuthAuthorization(buf *bin.Buffer) (AuthAuthorizationClass, error)

DecodeAuthAuthorization implements binary de-serialization for AuthAuthorizationClass.

type AuthAuthorizationSignUpRequired

type AuthAuthorizationSignUpRequired struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Telegram's terms of service: the user must read and accept the terms of service before signing up to telegram
	//
	// Use SetTermsOfService and GetTermsOfService helpers.
	TermsOfService HelpTermsOfService
}

AuthAuthorizationSignUpRequired represents TL type `auth.authorizationSignUpRequired#44747e9a`. An account with this phone number doesn't exist on telegram: the user has to enter basic information and sign up¹

Links:

  1. https://core.telegram.org/api/auth

See https://core.telegram.org/constructor/auth.authorizationSignUpRequired for reference.

func (*AuthAuthorizationSignUpRequired) Decode

Decode implements bin.Decoder.

func (*AuthAuthorizationSignUpRequired) Encode

Encode implements bin.Encoder.

func (*AuthAuthorizationSignUpRequired) GetTermsOfService

func (a *AuthAuthorizationSignUpRequired) GetTermsOfService() (value HelpTermsOfService, ok bool)

GetTermsOfService returns value of TermsOfService conditional field and boolean which is true if field was set.

func (*AuthAuthorizationSignUpRequired) SetTermsOfService

func (a *AuthAuthorizationSignUpRequired) SetTermsOfService(value HelpTermsOfService)

SetTermsOfService sets value of TermsOfService conditional field.

func (*AuthAuthorizationSignUpRequired) String added in v0.12.0

String implements fmt.Stringer.

type AuthBindTempAuthKeyRequest

type AuthBindTempAuthKeyRequest struct {
	// Permanent auth_key_id to bind to
	PermAuthKeyID int64
	// Random long from Binding message contents¹
	//
	// Links:
	//  1) https://core.telegram.org#binding-message-contents
	Nonce int64
	// Unix timestamp to invalidate temporary key, see Binding message contents¹
	//
	// Links:
	//  1) https://core.telegram.org#binding-message-contents
	ExpiresAt int
	// See Generating encrypted_message¹
	//
	// Links:
	//  1) https://core.telegram.org#generating-encrypted-message
	EncryptedMessage []byte
}

AuthBindTempAuthKeyRequest represents TL type `auth.bindTempAuthKey#cdd42a05`. Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one. For more information, see Perfect Forward Secrecy¹.

Links:

  1. https://core.telegram.org/api/pfs

See https://core.telegram.org/method/auth.bindTempAuthKey for reference.

func (*AuthBindTempAuthKeyRequest) Decode

func (b *AuthBindTempAuthKeyRequest) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthBindTempAuthKeyRequest) Encode

func (b *AuthBindTempAuthKeyRequest) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthBindTempAuthKeyRequest) String added in v0.12.0

func (b *AuthBindTempAuthKeyRequest) String() string

String implements fmt.Stringer.

type AuthCancelCodeRequest

type AuthCancelCodeRequest struct {
	// Phone number
	PhoneNumber string
	// Phone code hash from auth.sendCode¹
	//
	// Links:
	//  1) https://core.telegram.org/method/auth.sendCode
	PhoneCodeHash string
}

AuthCancelCodeRequest represents TL type `auth.cancelCode#1f040578`. Cancel the login verification code

See https://core.telegram.org/method/auth.cancelCode for reference.

func (*AuthCancelCodeRequest) Decode

func (c *AuthCancelCodeRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthCancelCodeRequest) Encode

func (c *AuthCancelCodeRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthCancelCodeRequest) String added in v0.12.0

func (c *AuthCancelCodeRequest) String() string

String implements fmt.Stringer.

type AuthCheckPasswordRequest

type AuthCheckPasswordRequest struct {
	// The account's password (see SRP¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	Password InputCheckPasswordSRPClass
}

AuthCheckPasswordRequest represents TL type `auth.checkPassword#d18b4d16`. Try logging to an account protected by a 2FA password¹.

Links:

  1. https://core.telegram.org/api/srp

See https://core.telegram.org/method/auth.checkPassword for reference.

func (*AuthCheckPasswordRequest) Decode

func (c *AuthCheckPasswordRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthCheckPasswordRequest) Encode

func (c *AuthCheckPasswordRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthCheckPasswordRequest) String added in v0.12.0

func (c *AuthCheckPasswordRequest) String() string

String implements fmt.Stringer.

type AuthCodeTypeBox

type AuthCodeTypeBox struct {
	CodeType AuthCodeTypeClass
}

AuthCodeType boxes the AuthCodeTypeClass providing a helper.

func (*AuthCodeTypeBox) Decode

func (b *AuthCodeTypeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for AuthCodeTypeBox.

func (*AuthCodeTypeBox) Encode

func (b *AuthCodeTypeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for AuthCodeTypeBox.

type AuthCodeTypeCall

type AuthCodeTypeCall struct {
}

AuthCodeTypeCall represents TL type `auth.codeTypeCall#741cd3e3`. Type of verification code that will be sent next if you call the resendCode method: SMS code

See https://core.telegram.org/constructor/auth.codeTypeCall for reference.

func (*AuthCodeTypeCall) Decode

func (c *AuthCodeTypeCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthCodeTypeCall) Encode

func (c *AuthCodeTypeCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthCodeTypeCall) String added in v0.12.0

func (c *AuthCodeTypeCall) String() string

String implements fmt.Stringer.

type AuthCodeTypeClass

type AuthCodeTypeClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

AuthCodeTypeClass represents auth.CodeType generic type.

See https://core.telegram.org/type/auth.CodeType for reference.

Example:

g, err := DecodeAuthCodeType(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *AuthCodeTypeSms: // auth.codeTypeSms#72a3158c
case *AuthCodeTypeCall: // auth.codeTypeCall#741cd3e3
case *AuthCodeTypeFlashCall: // auth.codeTypeFlashCall#226ccefb
default: panic(v)
}

func DecodeAuthCodeType

func DecodeAuthCodeType(buf *bin.Buffer) (AuthCodeTypeClass, error)

DecodeAuthCodeType implements binary de-serialization for AuthCodeTypeClass.

type AuthCodeTypeFlashCall

type AuthCodeTypeFlashCall struct {
}

AuthCodeTypeFlashCall represents TL type `auth.codeTypeFlashCall#226ccefb`. Type of verification code that will be sent next if you call the resendCode method: SMS code

See https://core.telegram.org/constructor/auth.codeTypeFlashCall for reference.

func (*AuthCodeTypeFlashCall) Decode

func (c *AuthCodeTypeFlashCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthCodeTypeFlashCall) Encode

func (c *AuthCodeTypeFlashCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthCodeTypeFlashCall) String added in v0.12.0

func (c *AuthCodeTypeFlashCall) String() string

String implements fmt.Stringer.

type AuthCodeTypeSms

type AuthCodeTypeSms struct {
}

AuthCodeTypeSms represents TL type `auth.codeTypeSms#72a3158c`. Type of verification code that will be sent next if you call the resendCode method: SMS code

See https://core.telegram.org/constructor/auth.codeTypeSms for reference.

func (*AuthCodeTypeSms) Decode

func (c *AuthCodeTypeSms) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthCodeTypeSms) Encode

func (c *AuthCodeTypeSms) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthCodeTypeSms) String added in v0.12.0

func (c *AuthCodeTypeSms) String() string

String implements fmt.Stringer.

type AuthDropTempAuthKeysRequest

type AuthDropTempAuthKeysRequest struct {
	// The auth keys that shouldn't be dropped.
	ExceptAuthKeys []int64
}

AuthDropTempAuthKeysRequest represents TL type `auth.dropTempAuthKeys#8e48a188`. Delete all temporary authorization keys except for the ones specified

See https://core.telegram.org/method/auth.dropTempAuthKeys for reference.

func (*AuthDropTempAuthKeysRequest) Decode

Decode implements bin.Decoder.

func (*AuthDropTempAuthKeysRequest) Encode

Encode implements bin.Encoder.

func (*AuthDropTempAuthKeysRequest) String added in v0.12.0

func (d *AuthDropTempAuthKeysRequest) String() string

String implements fmt.Stringer.

type AuthExportAuthorizationRequest

type AuthExportAuthorizationRequest struct {
	// Number of a target data-centre
	DCID int
}

AuthExportAuthorizationRequest represents TL type `auth.exportAuthorization#e5bfffcd`. Returns data for copying authorization to another data-centre.

See https://core.telegram.org/method/auth.exportAuthorization for reference.

func (*AuthExportAuthorizationRequest) Decode

Decode implements bin.Decoder.

func (*AuthExportAuthorizationRequest) Encode

Encode implements bin.Encoder.

func (*AuthExportAuthorizationRequest) String added in v0.12.0

String implements fmt.Stringer.

type AuthExportLoginTokenRequest

type AuthExportLoginTokenRequest struct {
	// Application identifier (see. App configuration¹)
	//
	// Links:
	//  1) https://core.telegram.org/myapp
	APIID int
	// Application identifier hash (see. App configuration¹)
	//
	// Links:
	//  1) https://core.telegram.org/myapp
	APIHash string
	// List of already logged-in user IDs, to prevent logging in twice with the same user
	ExceptIds []int
}

AuthExportLoginTokenRequest represents TL type `auth.exportLoginToken#b1b41517`. Generate a login token, for login via QR code¹. The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken URL in the QR code. For more info, see login via QR code¹.

Links:

  1. https://core.telegram.org/api/qr-login
  2. https://core.telegram.org/api/qr-login

See https://core.telegram.org/method/auth.exportLoginToken for reference.

func (*AuthExportLoginTokenRequest) Decode

Decode implements bin.Decoder.

func (*AuthExportLoginTokenRequest) Encode

Encode implements bin.Encoder.

func (*AuthExportLoginTokenRequest) String added in v0.12.0

func (e *AuthExportLoginTokenRequest) String() string

String implements fmt.Stringer.

type AuthExportedAuthorization

type AuthExportedAuthorization struct {
	// current user identifier
	ID int
	// authorizes key
	Bytes []byte
}

AuthExportedAuthorization represents TL type `auth.exportedAuthorization#df969c2d`. Data for copying of authorization between data centres.

See https://core.telegram.org/constructor/auth.exportedAuthorization for reference.

func (*AuthExportedAuthorization) Decode

func (e *AuthExportedAuthorization) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthExportedAuthorization) Encode

func (e *AuthExportedAuthorization) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthExportedAuthorization) String added in v0.12.0

func (e *AuthExportedAuthorization) String() string

String implements fmt.Stringer.

type AuthImportAuthorizationRequest

type AuthImportAuthorizationRequest struct {
	// User ID
	ID int
	// Authorization key
	Bytes []byte
}

AuthImportAuthorizationRequest represents TL type `auth.importAuthorization#e3ef9613`. Logs in a user using a key transmitted from his native data-centre.

See https://core.telegram.org/method/auth.importAuthorization for reference.

func (*AuthImportAuthorizationRequest) Decode

Decode implements bin.Decoder.

func (*AuthImportAuthorizationRequest) Encode

Encode implements bin.Encoder.

func (*AuthImportAuthorizationRequest) String added in v0.12.0

String implements fmt.Stringer.

type AuthImportBotAuthorizationRequest

type AuthImportBotAuthorizationRequest struct {
	// Reserved for future use
	Flags int
	// Application identifier (see. App configuration¹)
	//
	// Links:
	//  1) https://core.telegram.org/myapp
	APIID int
	// Application identifier hash (see. App configuration¹)
	//
	// Links:
	//  1) https://core.telegram.org/myapp
	APIHash string
	// Bot token (see bots¹)
	//
	// Links:
	//  1) https://core.telegram.org/bots
	BotAuthToken string
}

AuthImportBotAuthorizationRequest represents TL type `auth.importBotAuthorization#67a3ff2c`. Login as a bot

See https://core.telegram.org/method/auth.importBotAuthorization for reference.

func (*AuthImportBotAuthorizationRequest) Decode

Decode implements bin.Decoder.

func (*AuthImportBotAuthorizationRequest) Encode

Encode implements bin.Encoder.

func (*AuthImportBotAuthorizationRequest) String added in v0.12.0

String implements fmt.Stringer.

type AuthImportLoginTokenRequest

type AuthImportLoginTokenRequest struct {
	// Login token
	Token []byte
}

AuthImportLoginTokenRequest represents TL type `auth.importLoginToken#95ac5ce4`. Login using a redirected login token, generated in case of DC mismatch during QR code login¹. For more info, see login via QR code¹.

Links:

  1. https://core.telegram.org/api/qr-login
  2. https://core.telegram.org/api/qr-login

See https://core.telegram.org/method/auth.importLoginToken for reference.

func (*AuthImportLoginTokenRequest) Decode

Decode implements bin.Decoder.

func (*AuthImportLoginTokenRequest) Encode

Encode implements bin.Encoder.

func (*AuthImportLoginTokenRequest) String added in v0.12.0

func (i *AuthImportLoginTokenRequest) String() string

String implements fmt.Stringer.

type AuthLogOutRequest

type AuthLogOutRequest struct {
}

AuthLogOutRequest represents TL type `auth.logOut#5717da40`. Logs out the user.

See https://core.telegram.org/method/auth.logOut for reference.

func (*AuthLogOutRequest) Decode

func (l *AuthLogOutRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthLogOutRequest) Encode

func (l *AuthLogOutRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthLogOutRequest) String added in v0.12.0

func (l *AuthLogOutRequest) String() string

String implements fmt.Stringer.

type AuthLoginToken

type AuthLoginToken struct {
	// Expiry date of QR code
	Expires int
	// Token to render in QR code
	Token []byte
}

AuthLoginToken represents TL type `auth.loginToken#629f1980`. Login token (for QR code login¹)

Links:

  1. https://core.telegram.org/api/qr-login

See https://core.telegram.org/constructor/auth.loginToken for reference.

func (*AuthLoginToken) Decode

func (l *AuthLoginToken) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthLoginToken) Encode

func (l *AuthLoginToken) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthLoginToken) String added in v0.12.0

func (l *AuthLoginToken) String() string

String implements fmt.Stringer.

type AuthLoginTokenBox

type AuthLoginTokenBox struct {
	LoginToken AuthLoginTokenClass
}

AuthLoginToken boxes the AuthLoginTokenClass providing a helper.

func (*AuthLoginTokenBox) Decode

func (b *AuthLoginTokenBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for AuthLoginTokenBox.

func (*AuthLoginTokenBox) Encode

func (b *AuthLoginTokenBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for AuthLoginTokenBox.

type AuthLoginTokenClass

type AuthLoginTokenClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

AuthLoginTokenClass represents auth.LoginToken generic type.

See https://core.telegram.org/type/auth.LoginToken for reference.

Example:

g, err := DecodeAuthLoginToken(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *AuthLoginToken: // auth.loginToken#629f1980
case *AuthLoginTokenMigrateTo: // auth.loginTokenMigrateTo#68e9916
case *AuthLoginTokenSuccess: // auth.loginTokenSuccess#390d5c5e
default: panic(v)
}

func DecodeAuthLoginToken

func DecodeAuthLoginToken(buf *bin.Buffer) (AuthLoginTokenClass, error)

DecodeAuthLoginToken implements binary de-serialization for AuthLoginTokenClass.

type AuthLoginTokenMigrateTo

type AuthLoginTokenMigrateTo struct {
	// DC ID
	DCID int
	// Token to use for login
	Token []byte
}

AuthLoginTokenMigrateTo represents TL type `auth.loginTokenMigrateTo#68e9916`. Repeat the query to the specified DC

See https://core.telegram.org/constructor/auth.loginTokenMigrateTo for reference.

func (*AuthLoginTokenMigrateTo) Decode

func (l *AuthLoginTokenMigrateTo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthLoginTokenMigrateTo) Encode

func (l *AuthLoginTokenMigrateTo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthLoginTokenMigrateTo) String added in v0.12.0

func (l *AuthLoginTokenMigrateTo) String() string

String implements fmt.Stringer.

type AuthLoginTokenSuccess

type AuthLoginTokenSuccess struct {
	// Authorization info
	Authorization AuthAuthorizationClass
}

AuthLoginTokenSuccess represents TL type `auth.loginTokenSuccess#390d5c5e`. Login via token (QR code) succeded!

See https://core.telegram.org/constructor/auth.loginTokenSuccess for reference.

func (*AuthLoginTokenSuccess) Decode

func (l *AuthLoginTokenSuccess) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthLoginTokenSuccess) Encode

func (l *AuthLoginTokenSuccess) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthLoginTokenSuccess) String added in v0.12.0

func (l *AuthLoginTokenSuccess) String() string

String implements fmt.Stringer.

type AuthPasswordRecovery

type AuthPasswordRecovery struct {
	// The email to which the recovery code was sent must match this pattern¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/pattern
	EmailPattern string
}

AuthPasswordRecovery represents TL type `auth.passwordRecovery#137948a5`. Recovery info of a 2FA password¹, only for accounts with a recovery email configured².

Links:

  1. https://core.telegram.org/api/srp
  2. https://core.telegram.org/api/srp#email-verification

See https://core.telegram.org/constructor/auth.passwordRecovery for reference.

func (*AuthPasswordRecovery) Decode

func (p *AuthPasswordRecovery) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthPasswordRecovery) Encode

func (p *AuthPasswordRecovery) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthPasswordRecovery) String added in v0.12.0

func (p *AuthPasswordRecovery) String() string

String implements fmt.Stringer.

type AuthRecoverPasswordRequest

type AuthRecoverPasswordRequest struct {
	// Code received via email
	Code string
}

AuthRecoverPasswordRequest represents TL type `auth.recoverPassword#4ea56e92`. Reset the 2FA password¹ using the recovery code sent using auth.requestPasswordRecovery².

Links:

  1. https://core.telegram.org/api/srp
  2. https://core.telegram.org/method/auth.requestPasswordRecovery

See https://core.telegram.org/method/auth.recoverPassword for reference.

func (*AuthRecoverPasswordRequest) Decode

Decode implements bin.Decoder.

func (*AuthRecoverPasswordRequest) Encode

Encode implements bin.Encoder.

func (*AuthRecoverPasswordRequest) String added in v0.12.0

func (r *AuthRecoverPasswordRequest) String() string

String implements fmt.Stringer.

type AuthRequestPasswordRecoveryRequest

type AuthRequestPasswordRecoveryRequest struct {
}

AuthRequestPasswordRecoveryRequest represents TL type `auth.requestPasswordRecovery#d897bc66`. Request recovery code of a 2FA password¹, only for accounts with a recovery email configured².

Links:

  1. https://core.telegram.org/api/srp
  2. https://core.telegram.org/api/srp#email-verification

See https://core.telegram.org/method/auth.requestPasswordRecovery for reference.

func (*AuthRequestPasswordRecoveryRequest) Decode

Decode implements bin.Decoder.

func (*AuthRequestPasswordRecoveryRequest) Encode

Encode implements bin.Encoder.

func (*AuthRequestPasswordRecoveryRequest) String added in v0.12.0

String implements fmt.Stringer.

type AuthResendCodeRequest

type AuthResendCodeRequest struct {
	// The phone number
	PhoneNumber string
	// The phone code hash obtained from auth.sendCode¹
	//
	// Links:
	//  1) https://core.telegram.org/method/auth.sendCode
	PhoneCodeHash string
}

AuthResendCodeRequest represents TL type `auth.resendCode#3ef1a9bf`. Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login¹ for more info.

Links:

  1. https://core.telegram.org/api/auth

See https://core.telegram.org/method/auth.resendCode for reference.

func (*AuthResendCodeRequest) Decode

func (r *AuthResendCodeRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthResendCodeRequest) Encode

func (r *AuthResendCodeRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthResendCodeRequest) String added in v0.12.0

func (r *AuthResendCodeRequest) String() string

String implements fmt.Stringer.

type AuthResetAuthorizationsRequest

type AuthResetAuthorizationsRequest struct {
}

AuthResetAuthorizationsRequest represents TL type `auth.resetAuthorizations#9fab0d1a`. Terminates all user's authorized sessions except for the current one. After calling this method it is necessary to reregister the current device using the method account.registerDevice¹

Links:

  1. https://core.telegram.org/method/account.registerDevice

See https://core.telegram.org/method/auth.resetAuthorizations for reference.

func (*AuthResetAuthorizationsRequest) Decode

Decode implements bin.Decoder.

func (*AuthResetAuthorizationsRequest) Encode

Encode implements bin.Encoder.

func (*AuthResetAuthorizationsRequest) String added in v0.12.0

String implements fmt.Stringer.

type AuthSendCodeRequest

type AuthSendCodeRequest struct {
	// Phone number in international format
	PhoneNumber string
	// Application identifier (see App configuration¹)
	//
	// Links:
	//  1) https://core.telegram.org/myapp
	APIID int
	// Application secret hash (see App configuration¹)
	//
	// Links:
	//  1) https://core.telegram.org/myapp
	APIHash string
	// Settings for the code type to send
	Settings CodeSettings
}

AuthSendCodeRequest represents TL type `auth.sendCode#a677244f`. Send the verification code for login

See https://core.telegram.org/method/auth.sendCode for reference.

func (*AuthSendCodeRequest) Decode

func (s *AuthSendCodeRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthSendCodeRequest) Encode

func (s *AuthSendCodeRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthSendCodeRequest) String added in v0.12.0

func (s *AuthSendCodeRequest) String() string

String implements fmt.Stringer.

type AuthSentCode

type AuthSentCode struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Phone code type
	Type AuthSentCodeTypeClass
	// Phone code hash, to be stored and later re-used with auth.signIn¹
	//
	// Links:
	//  1) https://core.telegram.org/method/auth.signIn
	PhoneCodeHash string
	// Phone code type that will be sent next, if the phone code is not received within timeout seconds: to send it use auth.resendCode¹
	//
	// Links:
	//  1) https://core.telegram.org/method/auth.resendCode
	//
	// Use SetNextType and GetNextType helpers.
	NextType AuthCodeTypeClass
	// Timeout for reception of the phone code
	//
	// Use SetTimeout and GetTimeout helpers.
	Timeout int
}

AuthSentCode represents TL type `auth.sentCode#5e002502`. Contains info about a sent verification code.

See https://core.telegram.org/constructor/auth.sentCode for reference.

func (*AuthSentCode) Decode

func (s *AuthSentCode) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthSentCode) Encode

func (s *AuthSentCode) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthSentCode) GetNextType

func (s *AuthSentCode) GetNextType() (value AuthCodeTypeClass, ok bool)

GetNextType returns value of NextType conditional field and boolean which is true if field was set.

func (*AuthSentCode) GetTimeout

func (s *AuthSentCode) GetTimeout() (value int, ok bool)

GetTimeout returns value of Timeout conditional field and boolean which is true if field was set.

func (*AuthSentCode) SetNextType

func (s *AuthSentCode) SetNextType(value AuthCodeTypeClass)

SetNextType sets value of NextType conditional field.

func (*AuthSentCode) SetTimeout

func (s *AuthSentCode) SetTimeout(value int)

SetTimeout sets value of Timeout conditional field.

func (*AuthSentCode) String added in v0.12.0

func (s *AuthSentCode) String() string

String implements fmt.Stringer.

type AuthSentCodeTypeApp

type AuthSentCodeTypeApp struct {
	// Length of the code in bytes
	Length int
}

AuthSentCodeTypeApp represents TL type `auth.sentCodeTypeApp#3dbb5986`. The code was sent through the telegram app

See https://core.telegram.org/constructor/auth.sentCodeTypeApp for reference.

func (*AuthSentCodeTypeApp) Decode

func (s *AuthSentCodeTypeApp) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthSentCodeTypeApp) Encode

func (s *AuthSentCodeTypeApp) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthSentCodeTypeApp) String added in v0.12.0

func (s *AuthSentCodeTypeApp) String() string

String implements fmt.Stringer.

type AuthSentCodeTypeBox

type AuthSentCodeTypeBox struct {
	SentCodeType AuthSentCodeTypeClass
}

AuthSentCodeType boxes the AuthSentCodeTypeClass providing a helper.

func (*AuthSentCodeTypeBox) Decode

func (b *AuthSentCodeTypeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for AuthSentCodeTypeBox.

func (*AuthSentCodeTypeBox) Encode

func (b *AuthSentCodeTypeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for AuthSentCodeTypeBox.

type AuthSentCodeTypeCall

type AuthSentCodeTypeCall struct {
	// Length of the verification code
	Length int
}

AuthSentCodeTypeCall represents TL type `auth.sentCodeTypeCall#5353e5a7`. The code will be sent via a phone call: a synthesized voice will tell the user which verification code to input.

See https://core.telegram.org/constructor/auth.sentCodeTypeCall for reference.

func (*AuthSentCodeTypeCall) Decode

func (s *AuthSentCodeTypeCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthSentCodeTypeCall) Encode

func (s *AuthSentCodeTypeCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthSentCodeTypeCall) String added in v0.12.0

func (s *AuthSentCodeTypeCall) String() string

String implements fmt.Stringer.

type AuthSentCodeTypeClass

type AuthSentCodeTypeClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

AuthSentCodeTypeClass represents auth.SentCodeType generic type.

See https://core.telegram.org/type/auth.SentCodeType for reference.

Example:

g, err := DecodeAuthSentCodeType(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *AuthSentCodeTypeApp: // auth.sentCodeTypeApp#3dbb5986
case *AuthSentCodeTypeSms: // auth.sentCodeTypeSms#c000bba2
case *AuthSentCodeTypeCall: // auth.sentCodeTypeCall#5353e5a7
case *AuthSentCodeTypeFlashCall: // auth.sentCodeTypeFlashCall#ab03c6d9
default: panic(v)
}

func DecodeAuthSentCodeType

func DecodeAuthSentCodeType(buf *bin.Buffer) (AuthSentCodeTypeClass, error)

DecodeAuthSentCodeType implements binary de-serialization for AuthSentCodeTypeClass.

type AuthSentCodeTypeFlashCall

type AuthSentCodeTypeFlashCall struct {
	// pattern¹ to match
	//
	// Links:
	//  1) https://core.telegram.org/api/pattern
	Pattern string
}

AuthSentCodeTypeFlashCall represents TL type `auth.sentCodeTypeFlashCall#ab03c6d9`. The code will be sent via a flash phone call, that will be closed immediately. The phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern.

See https://core.telegram.org/constructor/auth.sentCodeTypeFlashCall for reference.

func (*AuthSentCodeTypeFlashCall) Decode

func (s *AuthSentCodeTypeFlashCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthSentCodeTypeFlashCall) Encode

func (s *AuthSentCodeTypeFlashCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthSentCodeTypeFlashCall) String added in v0.12.0

func (s *AuthSentCodeTypeFlashCall) String() string

String implements fmt.Stringer.

type AuthSentCodeTypeSms

type AuthSentCodeTypeSms struct {
	// Length of the code in bytes
	Length int
}

AuthSentCodeTypeSms represents TL type `auth.sentCodeTypeSms#c000bba2`. The code was sent via SMS

See https://core.telegram.org/constructor/auth.sentCodeTypeSms for reference.

func (*AuthSentCodeTypeSms) Decode

func (s *AuthSentCodeTypeSms) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthSentCodeTypeSms) Encode

func (s *AuthSentCodeTypeSms) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthSentCodeTypeSms) String added in v0.12.0

func (s *AuthSentCodeTypeSms) String() string

String implements fmt.Stringer.

type AuthSignInRequest

type AuthSignInRequest struct {
	// Phone number in the international format
	PhoneNumber string
	// SMS-message ID, obtained from auth.sendCode¹
	//
	// Links:
	//  1) https://core.telegram.org/method/auth.sendCode
	PhoneCodeHash string
	// Valid numerical code from the SMS-message
	PhoneCode string
}

AuthSignInRequest represents TL type `auth.signIn#bcd51581`. Signs in a user with a validated phone number.

See https://core.telegram.org/method/auth.signIn for reference.

func (*AuthSignInRequest) Decode

func (s *AuthSignInRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthSignInRequest) Encode

func (s *AuthSignInRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthSignInRequest) String added in v0.12.0

func (s *AuthSignInRequest) String() string

String implements fmt.Stringer.

type AuthSignUpRequest

type AuthSignUpRequest struct {
	// Phone number in the international format
	PhoneNumber string
	// SMS-message ID
	PhoneCodeHash string
	// New user first name
	FirstName string
	// New user last name
	LastName string
}

AuthSignUpRequest represents TL type `auth.signUp#80eee427`. Registers a validated phone number in the system.

See https://core.telegram.org/method/auth.signUp for reference.

func (*AuthSignUpRequest) Decode

func (s *AuthSignUpRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AuthSignUpRequest) Encode

func (s *AuthSignUpRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AuthSignUpRequest) String added in v0.12.0

func (s *AuthSignUpRequest) String() string

String implements fmt.Stringer.

type Authorization

type Authorization struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is the current session
	Current bool
	// Whether the session is from an official app
	OfficialApp bool
	// Whether the session is still waiting for a 2FA password
	PasswordPending bool
	// Identifier
	Hash int64
	// Device model
	DeviceModel string
	// Platform
	Platform string
	// System version
	SystemVersion string
	// API ID¹
	//
	// Links:
	//  1) https://core.telegram.org/api/obtaining_api_id
	APIID int
	// App name
	AppName string
	// App version
	AppVersion string
	// When was the session created
	DateCreated int
	// When was the session last active
	DateActive int
	// Last known IP
	IP string
	// Country determined from IP
	Country string
	// Region determined from IP
	Region string
}

Authorization represents TL type `authorization#ad01d61d`. Logged-in session

See https://core.telegram.org/constructor/authorization for reference.

func (*Authorization) Decode

func (a *Authorization) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Authorization) Encode

func (a *Authorization) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Authorization) SetCurrent

func (a *Authorization) SetCurrent(value bool)

SetCurrent sets value of Current conditional field.

func (*Authorization) SetOfficialApp

func (a *Authorization) SetOfficialApp(value bool)

SetOfficialApp sets value of OfficialApp conditional field.

func (*Authorization) SetPasswordPending

func (a *Authorization) SetPasswordPending(value bool)

SetPasswordPending sets value of PasswordPending conditional field.

func (*Authorization) String added in v0.12.0

func (a *Authorization) String() string

String implements fmt.Stringer.

type AutoDownloadSettings

type AutoDownloadSettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Disable automatic media downloads?
	Disabled bool
	// Whether to preload the first seconds of videos larger than the specified limit
	VideoPreloadLarge bool
	// Whether to preload the next audio track when you're listening to music
	AudioPreloadNext bool
	// Whether to enable data saving mode in phone calls
	PhonecallsLessData bool
	// Maximum size of photos to preload
	PhotoSizeMax int
	// Maximum size of videos to preload
	VideoSizeMax int
	// Maximum size of other files to preload
	FileSizeMax int
	// Maximum suggested bitrate for uploading videos
	VideoUploadMaxbitrate int
}

AutoDownloadSettings represents TL type `autoDownloadSettings#e04232f3`. Autodownload settings

See https://core.telegram.org/constructor/autoDownloadSettings for reference.

func (*AutoDownloadSettings) Decode

func (a *AutoDownloadSettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*AutoDownloadSettings) Encode

func (a *AutoDownloadSettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*AutoDownloadSettings) SetAudioPreloadNext

func (a *AutoDownloadSettings) SetAudioPreloadNext(value bool)

SetAudioPreloadNext sets value of AudioPreloadNext conditional field.

func (*AutoDownloadSettings) SetDisabled

func (a *AutoDownloadSettings) SetDisabled(value bool)

SetDisabled sets value of Disabled conditional field.

func (*AutoDownloadSettings) SetPhonecallsLessData

func (a *AutoDownloadSettings) SetPhonecallsLessData(value bool)

SetPhonecallsLessData sets value of PhonecallsLessData conditional field.

func (*AutoDownloadSettings) SetVideoPreloadLarge

func (a *AutoDownloadSettings) SetVideoPreloadLarge(value bool)

SetVideoPreloadLarge sets value of VideoPreloadLarge conditional field.

func (*AutoDownloadSettings) String added in v0.12.0

func (a *AutoDownloadSettings) String() string

String implements fmt.Stringer.

type BankCardOpenUrl

type BankCardOpenUrl struct {
	// Info URL
	URL string
	// Bank name
	Name string
}

BankCardOpenUrl represents TL type `bankCardOpenUrl#f568028a`. Credit card info URL provided by the bank

See https://core.telegram.org/constructor/bankCardOpenUrl for reference.

func (*BankCardOpenUrl) Decode

func (b *BankCardOpenUrl) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BankCardOpenUrl) Encode

func (b *BankCardOpenUrl) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BankCardOpenUrl) String added in v0.12.0

func (b *BankCardOpenUrl) String() string

String implements fmt.Stringer.

type BaseThemeArctic

type BaseThemeArctic struct {
}

BaseThemeArctic represents TL type `baseThemeArctic#5b11125a`. Arctic theme

See https://core.telegram.org/constructor/baseThemeArctic for reference.

func (*BaseThemeArctic) Decode

func (b *BaseThemeArctic) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BaseThemeArctic) Encode

func (b *BaseThemeArctic) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BaseThemeArctic) String added in v0.12.0

func (b *BaseThemeArctic) String() string

String implements fmt.Stringer.

type BaseThemeBox

type BaseThemeBox struct {
	BaseTheme BaseThemeClass
}

BaseTheme boxes the BaseThemeClass providing a helper.

func (*BaseThemeBox) Decode

func (b *BaseThemeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for BaseThemeBox.

func (*BaseThemeBox) Encode

func (b *BaseThemeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for BaseThemeBox.

type BaseThemeClass

type BaseThemeClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

BaseThemeClass represents BaseTheme generic type.

See https://core.telegram.org/type/BaseTheme for reference.

Example:

g, err := DecodeBaseTheme(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *BaseThemeClassic: // baseThemeClassic#c3a12462
case *BaseThemeDay: // baseThemeDay#fbd81688
case *BaseThemeNight: // baseThemeNight#b7b31ea8
case *BaseThemeTinted: // baseThemeTinted#6d5f77ee
case *BaseThemeArctic: // baseThemeArctic#5b11125a
default: panic(v)
}

func DecodeBaseTheme

func DecodeBaseTheme(buf *bin.Buffer) (BaseThemeClass, error)

DecodeBaseTheme implements binary de-serialization for BaseThemeClass.

type BaseThemeClassic

type BaseThemeClassic struct {
}

BaseThemeClassic represents TL type `baseThemeClassic#c3a12462`. Classic theme

See https://core.telegram.org/constructor/baseThemeClassic for reference.

func (*BaseThemeClassic) Decode

func (b *BaseThemeClassic) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BaseThemeClassic) Encode

func (b *BaseThemeClassic) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BaseThemeClassic) String added in v0.12.0

func (b *BaseThemeClassic) String() string

String implements fmt.Stringer.

type BaseThemeDay

type BaseThemeDay struct {
}

BaseThemeDay represents TL type `baseThemeDay#fbd81688`. Day theme

See https://core.telegram.org/constructor/baseThemeDay for reference.

func (*BaseThemeDay) Decode

func (b *BaseThemeDay) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BaseThemeDay) Encode

func (b *BaseThemeDay) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BaseThemeDay) String added in v0.12.0

func (b *BaseThemeDay) String() string

String implements fmt.Stringer.

type BaseThemeNight

type BaseThemeNight struct {
}

BaseThemeNight represents TL type `baseThemeNight#b7b31ea8`. Night theme

See https://core.telegram.org/constructor/baseThemeNight for reference.

func (*BaseThemeNight) Decode

func (b *BaseThemeNight) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BaseThemeNight) Encode

func (b *BaseThemeNight) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BaseThemeNight) String added in v0.12.0

func (b *BaseThemeNight) String() string

String implements fmt.Stringer.

type BaseThemeTinted

type BaseThemeTinted struct {
}

BaseThemeTinted represents TL type `baseThemeTinted#6d5f77ee`. Tinted theme

See https://core.telegram.org/constructor/baseThemeTinted for reference.

func (*BaseThemeTinted) Decode

func (b *BaseThemeTinted) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BaseThemeTinted) Encode

func (b *BaseThemeTinted) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BaseThemeTinted) String added in v0.12.0

func (b *BaseThemeTinted) String() string

String implements fmt.Stringer.

type BoolBox

type BoolBox struct {
	Bool BoolClass
}

Bool boxes the BoolClass providing a helper.

func (*BoolBox) Decode

func (b *BoolBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for BoolBox.

func (*BoolBox) Encode

func (b *BoolBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for BoolBox.

type BoolClass

type BoolClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

BoolClass represents Bool generic type.

See https://core.telegram.org/type/Bool for reference.

Example:

g, err := DecodeBool(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *BoolFalse: // boolFalse#bc799737
case *BoolTrue: // boolTrue#997275b5
default: panic(v)
}

func DecodeBool

func DecodeBool(buf *bin.Buffer) (BoolClass, error)

DecodeBool implements binary de-serialization for BoolClass.

type BoolFalse

type BoolFalse struct {
}

BoolFalse represents TL type `boolFalse#bc799737`. Constructor may be interpreted as a booleanfalse value.

See https://core.telegram.org/constructor/boolFalse for reference.

func (*BoolFalse) Decode

func (b *BoolFalse) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BoolFalse) Encode

func (b *BoolFalse) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BoolFalse) String added in v0.12.0

func (b *BoolFalse) String() string

String implements fmt.Stringer.

type BoolTrue

type BoolTrue struct {
}

BoolTrue represents TL type `boolTrue#997275b5`. The constructor can be interpreted as a booleantrue value.

See https://core.telegram.org/constructor/boolTrue for reference.

func (*BoolTrue) Decode

func (b *BoolTrue) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BoolTrue) Encode

func (b *BoolTrue) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BoolTrue) String added in v0.12.0

func (b *BoolTrue) String() string

String implements fmt.Stringer.

type BotCallbackQueryHandler added in v0.9.0

type BotCallbackQueryHandler func(ctx UpdateContext, update *UpdateBotCallbackQuery) error

BotCallbackQueryHandler is a BotCallbackQuery event handler.

type BotCommand

type BotCommand struct {
	// /command name
	Command string
	// Description of the command
	Description string
}

BotCommand represents TL type `botCommand#c27ac8c7`. Describes a bot command that can be used in a chat

See https://core.telegram.org/constructor/botCommand for reference.

func (*BotCommand) Decode

func (b *BotCommand) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BotCommand) Encode

func (b *BotCommand) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BotCommand) String added in v0.12.0

func (b *BotCommand) String() string

String implements fmt.Stringer.

type BotInfo

type BotInfo struct {
	// ID of the bot
	UserID int
	// Description of the bot
	Description string
	// Bot commands that can be used in the chat
	Commands []BotCommand
}

BotInfo represents TL type `botInfo#98e81d3a`. Info about bots (available bot commands, etc)

See https://core.telegram.org/constructor/botInfo for reference.

func (*BotInfo) Decode

func (b *BotInfo) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BotInfo) Encode

func (b *BotInfo) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BotInfo) String added in v0.12.0

func (b *BotInfo) String() string

String implements fmt.Stringer.

type BotInlineMediaResult

type BotInlineMediaResult struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Result ID
	ID string
	// Result type (see bot API docs¹)
	//
	// Links:
	//  1) https://core.telegram.org/bots/api#inlinequeryresult
	Type string
	// If type is photo, the photo to send
	//
	// Use SetPhoto and GetPhoto helpers.
	Photo PhotoClass
	// If type is document, the document to send
	//
	// Use SetDocument and GetDocument helpers.
	Document DocumentClass
	// Result title
	//
	// Use SetTitle and GetTitle helpers.
	Title string
	// Description
	//
	// Use SetDescription and GetDescription helpers.
	Description string
	// Depending on the type and on the constructor¹, contains the caption of the media or the content of the message to be sent instead of the media
	//
	// Links:
	//  1) https://core.telegram.org/type/BotInlineMessage
	SendMessage BotInlineMessageClass
}

BotInlineMediaResult represents TL type `botInlineMediaResult#17db940b`. Media result

See https://core.telegram.org/constructor/botInlineMediaResult for reference.

func (*BotInlineMediaResult) Decode

func (b *BotInlineMediaResult) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BotInlineMediaResult) Encode

func (b *BotInlineMediaResult) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BotInlineMediaResult) GetDescription

func (b *BotInlineMediaResult) GetDescription() (value string, ok bool)

GetDescription returns value of Description conditional field and boolean which is true if field was set.

func (*BotInlineMediaResult) GetDocument

func (b *BotInlineMediaResult) GetDocument() (value DocumentClass, ok bool)

GetDocument returns value of Document conditional field and boolean which is true if field was set.

func (*BotInlineMediaResult) GetPhoto

func (b *BotInlineMediaResult) GetPhoto() (value PhotoClass, ok bool)

GetPhoto returns value of Photo conditional field and boolean which is true if field was set.

func (*BotInlineMediaResult) GetTitle

func (b *BotInlineMediaResult) GetTitle() (value string, ok bool)

GetTitle returns value of Title conditional field and boolean which is true if field was set.

func (*BotInlineMediaResult) SetDescription

func (b *BotInlineMediaResult) SetDescription(value string)

SetDescription sets value of Description conditional field.

func (*BotInlineMediaResult) SetDocument

func (b *BotInlineMediaResult) SetDocument(value DocumentClass)

SetDocument sets value of Document conditional field.

func (*BotInlineMediaResult) SetPhoto

func (b *BotInlineMediaResult) SetPhoto(value PhotoClass)

SetPhoto sets value of Photo conditional field.

func (*BotInlineMediaResult) SetTitle

func (b *BotInlineMediaResult) SetTitle(value string)

SetTitle sets value of Title conditional field.

func (*BotInlineMediaResult) String added in v0.12.0

func (b *BotInlineMediaResult) String() string

String implements fmt.Stringer.

type BotInlineMessageBox

type BotInlineMessageBox struct {
	BotInlineMessage BotInlineMessageClass
}

BotInlineMessage boxes the BotInlineMessageClass providing a helper.

func (*BotInlineMessageBox) Decode

func (b *BotInlineMessageBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for BotInlineMessageBox.

func (*BotInlineMessageBox) Encode

func (b *BotInlineMessageBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for BotInlineMessageBox.

type BotInlineMessageClass

type BotInlineMessageClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

BotInlineMessageClass represents BotInlineMessage generic type.

See https://core.telegram.org/type/BotInlineMessage for reference.

Example:

g, err := DecodeBotInlineMessage(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *BotInlineMessageMediaAuto: // botInlineMessageMediaAuto#764cf810
case *BotInlineMessageText: // botInlineMessageText#8c7f65e2
case *BotInlineMessageMediaGeo: // botInlineMessageMediaGeo#51846fd
case *BotInlineMessageMediaVenue: // botInlineMessageMediaVenue#8a86659c
case *BotInlineMessageMediaContact: // botInlineMessageMediaContact#18d1cdc2
default: panic(v)
}

func DecodeBotInlineMessage

func DecodeBotInlineMessage(buf *bin.Buffer) (BotInlineMessageClass, error)

DecodeBotInlineMessage implements binary de-serialization for BotInlineMessageClass.

type BotInlineMessageMediaAuto

type BotInlineMessageMediaAuto struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Caption
	Message string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
	// Inline keyboard
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

BotInlineMessageMediaAuto represents TL type `botInlineMessageMediaAuto#764cf810`. Send whatever media is attached to the botInlineMediaResult¹

Links:

  1. https://core.telegram.org/constructor/botInlineMediaResult

See https://core.telegram.org/constructor/botInlineMessageMediaAuto for reference.

func (*BotInlineMessageMediaAuto) Decode

func (b *BotInlineMessageMediaAuto) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BotInlineMessageMediaAuto) Encode

func (b *BotInlineMessageMediaAuto) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BotInlineMessageMediaAuto) GetEntities

func (b *BotInlineMessageMediaAuto) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*BotInlineMessageMediaAuto) GetReplyMarkup

func (b *BotInlineMessageMediaAuto) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*BotInlineMessageMediaAuto) SetEntities

func (b *BotInlineMessageMediaAuto) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*BotInlineMessageMediaAuto) SetReplyMarkup

func (b *BotInlineMessageMediaAuto) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*BotInlineMessageMediaAuto) String added in v0.12.0

func (b *BotInlineMessageMediaAuto) String() string

String implements fmt.Stringer.

type BotInlineMessageMediaContact

type BotInlineMessageMediaContact struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Phone number
	PhoneNumber string
	// First name
	FirstName string
	// Last name
	LastName string
	// VCard info
	Vcard string
	// Inline keyboard
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

BotInlineMessageMediaContact represents TL type `botInlineMessageMediaContact#18d1cdc2`. Send a contact

See https://core.telegram.org/constructor/botInlineMessageMediaContact for reference.

func (*BotInlineMessageMediaContact) Decode

func (b *BotInlineMessageMediaContact) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BotInlineMessageMediaContact) Encode

func (b *BotInlineMessageMediaContact) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BotInlineMessageMediaContact) GetReplyMarkup

func (b *BotInlineMessageMediaContact) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*BotInlineMessageMediaContact) SetReplyMarkup

func (b *BotInlineMessageMediaContact) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*BotInlineMessageMediaContact) String added in v0.12.0

String implements fmt.Stringer.

type BotInlineMessageMediaGeo

type BotInlineMessageMediaGeo struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Geolocation
	Geo GeoPointClass
	// For live locations¹, a direction in which the location moves, in degrees; 1-360.
	//
	// Links:
	//  1) https://core.telegram.org/api/live-location
	//
	// Use SetHeading and GetHeading helpers.
	Heading int
	// Validity period
	//
	// Use SetPeriod and GetPeriod helpers.
	Period int
	// For live locations¹, a maximum distance to another chat member for proximity alerts, in meters (0-100000).
	//
	// Links:
	//  1) https://core.telegram.org/api/live-location
	//
	// Use SetProximityNotificationRadius and GetProximityNotificationRadius helpers.
	ProximityNotificationRadius int
	// Inline keyboard
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

BotInlineMessageMediaGeo represents TL type `botInlineMessageMediaGeo#51846fd`. Send a geolocation

See https://core.telegram.org/constructor/botInlineMessageMediaGeo for reference.

func (*BotInlineMessageMediaGeo) Decode

func (b *BotInlineMessageMediaGeo) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BotInlineMessageMediaGeo) Encode

func (b *BotInlineMessageMediaGeo) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BotInlineMessageMediaGeo) GetHeading

func (b *BotInlineMessageMediaGeo) GetHeading() (value int, ok bool)

GetHeading returns value of Heading conditional field and boolean which is true if field was set.

func (*BotInlineMessageMediaGeo) GetPeriod

func (b *BotInlineMessageMediaGeo) GetPeriod() (value int, ok bool)

GetPeriod returns value of Period conditional field and boolean which is true if field was set.

func (*BotInlineMessageMediaGeo) GetProximityNotificationRadius

func (b *BotInlineMessageMediaGeo) GetProximityNotificationRadius() (value int, ok bool)

GetProximityNotificationRadius returns value of ProximityNotificationRadius conditional field and boolean which is true if field was set.

func (*BotInlineMessageMediaGeo) GetReplyMarkup

func (b *BotInlineMessageMediaGeo) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*BotInlineMessageMediaGeo) SetHeading

func (b *BotInlineMessageMediaGeo) SetHeading(value int)

SetHeading sets value of Heading conditional field.

func (*BotInlineMessageMediaGeo) SetPeriod

func (b *BotInlineMessageMediaGeo) SetPeriod(value int)

SetPeriod sets value of Period conditional field.

func (*BotInlineMessageMediaGeo) SetProximityNotificationRadius

func (b *BotInlineMessageMediaGeo) SetProximityNotificationRadius(value int)

SetProximityNotificationRadius sets value of ProximityNotificationRadius conditional field.

func (*BotInlineMessageMediaGeo) SetReplyMarkup

func (b *BotInlineMessageMediaGeo) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*BotInlineMessageMediaGeo) String added in v0.12.0

func (b *BotInlineMessageMediaGeo) String() string

String implements fmt.Stringer.

type BotInlineMessageMediaVenue

type BotInlineMessageMediaVenue struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Geolocation of venue
	Geo GeoPointClass
	// Venue name
	Title string
	// Address
	Address string
	// Venue provider: currently only "foursquare" needs to be supported
	Provider string
	// Venue ID in the provider's database
	VenueID string
	// Venue type in the provider's database
	VenueType string
	// Inline keyboard
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

BotInlineMessageMediaVenue represents TL type `botInlineMessageMediaVenue#8a86659c`. Send a venue

See https://core.telegram.org/constructor/botInlineMessageMediaVenue for reference.

func (*BotInlineMessageMediaVenue) Decode

func (b *BotInlineMessageMediaVenue) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BotInlineMessageMediaVenue) Encode

func (b *BotInlineMessageMediaVenue) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BotInlineMessageMediaVenue) GetReplyMarkup

func (b *BotInlineMessageMediaVenue) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*BotInlineMessageMediaVenue) SetReplyMarkup

func (b *BotInlineMessageMediaVenue) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*BotInlineMessageMediaVenue) String added in v0.12.0

func (b *BotInlineMessageMediaVenue) String() string

String implements fmt.Stringer.

type BotInlineMessageText

type BotInlineMessageText struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Disable webpage preview
	NoWebpage bool
	// The message
	Message string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
	// Inline keyboard
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

BotInlineMessageText represents TL type `botInlineMessageText#8c7f65e2`. Send a simple text message

See https://core.telegram.org/constructor/botInlineMessageText for reference.

func (*BotInlineMessageText) Decode

func (b *BotInlineMessageText) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BotInlineMessageText) Encode

func (b *BotInlineMessageText) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BotInlineMessageText) GetEntities

func (b *BotInlineMessageText) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*BotInlineMessageText) GetReplyMarkup

func (b *BotInlineMessageText) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*BotInlineMessageText) SetEntities

func (b *BotInlineMessageText) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*BotInlineMessageText) SetNoWebpage

func (b *BotInlineMessageText) SetNoWebpage(value bool)

SetNoWebpage sets value of NoWebpage conditional field.

func (*BotInlineMessageText) SetReplyMarkup

func (b *BotInlineMessageText) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*BotInlineMessageText) String added in v0.12.0

func (b *BotInlineMessageText) String() string

String implements fmt.Stringer.

type BotInlineQueryHandler added in v0.9.0

type BotInlineQueryHandler func(ctx UpdateContext, update *UpdateBotInlineQuery) error

BotInlineQueryHandler is a BotInlineQuery event handler.

type BotInlineResult

type BotInlineResult struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Result ID
	ID string
	// Result type (see bot API docs¹)
	//
	// Links:
	//  1) https://core.telegram.org/bots/api#inlinequeryresult
	Type string
	// Result title
	//
	// Use SetTitle and GetTitle helpers.
	Title string
	// Result description
	//
	// Use SetDescription and GetDescription helpers.
	Description string
	// URL of article or webpage
	//
	// Use SetURL and GetURL helpers.
	URL string
	// Thumbnail for the result
	//
	// Use SetThumb and GetThumb helpers.
	Thumb WebDocumentClass
	// Content of the result
	//
	// Use SetContent and GetContent helpers.
	Content WebDocumentClass
	// Message to send
	SendMessage BotInlineMessageClass
}

BotInlineResult represents TL type `botInlineResult#11965f3a`. Generic result

See https://core.telegram.org/constructor/botInlineResult for reference.

func (*BotInlineResult) Decode

func (b *BotInlineResult) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*BotInlineResult) Encode

func (b *BotInlineResult) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*BotInlineResult) GetContent

func (b *BotInlineResult) GetContent() (value WebDocumentClass, ok bool)

GetContent returns value of Content conditional field and boolean which is true if field was set.

func (*BotInlineResult) GetDescription

func (b *BotInlineResult) GetDescription() (value string, ok bool)

GetDescription returns value of Description conditional field and boolean which is true if field was set.

func (*BotInlineResult) GetThumb

func (b *BotInlineResult) GetThumb() (value WebDocumentClass, ok bool)

GetThumb returns value of Thumb conditional field and boolean which is true if field was set.

func (*BotInlineResult) GetTitle

func (b *BotInlineResult) GetTitle() (value string, ok bool)

GetTitle returns value of Title conditional field and boolean which is true if field was set.

func (*BotInlineResult) GetURL

func (b *BotInlineResult) GetURL() (value string, ok bool)

GetURL returns value of URL conditional field and boolean which is true if field was set.

func (*BotInlineResult) SetContent

func (b *BotInlineResult) SetContent(value WebDocumentClass)

SetContent sets value of Content conditional field.

func (*BotInlineResult) SetDescription

func (b *BotInlineResult) SetDescription(value string)

SetDescription sets value of Description conditional field.

func (*BotInlineResult) SetThumb

func (b *BotInlineResult) SetThumb(value WebDocumentClass)

SetThumb sets value of Thumb conditional field.

func (*BotInlineResult) SetTitle

func (b *BotInlineResult) SetTitle(value string)

SetTitle sets value of Title conditional field.

func (*BotInlineResult) SetURL

func (b *BotInlineResult) SetURL(value string)

SetURL sets value of URL conditional field.

func (*BotInlineResult) String added in v0.12.0

func (b *BotInlineResult) String() string

String implements fmt.Stringer.

type BotInlineResultBox

type BotInlineResultBox struct {
	BotInlineResult BotInlineResultClass
}

BotInlineResult boxes the BotInlineResultClass providing a helper.

func (*BotInlineResultBox) Decode

func (b *BotInlineResultBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for BotInlineResultBox.

func (*BotInlineResultBox) Encode

func (b *BotInlineResultBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for BotInlineResultBox.

type BotInlineResultClass

type BotInlineResultClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

BotInlineResultClass represents BotInlineResult generic type.

See https://core.telegram.org/type/BotInlineResult for reference.

Example:

g, err := DecodeBotInlineResult(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *BotInlineResult: // botInlineResult#11965f3a
case *BotInlineMediaResult: // botInlineMediaResult#17db940b
default: panic(v)
}

func DecodeBotInlineResult

func DecodeBotInlineResult(buf *bin.Buffer) (BotInlineResultClass, error)

DecodeBotInlineResult implements binary de-serialization for BotInlineResultClass.

type BotInlineSendHandler added in v0.9.0

type BotInlineSendHandler func(ctx UpdateContext, update *UpdateBotInlineSend) error

BotInlineSendHandler is a BotInlineSend event handler.

type BotPrecheckoutQueryHandler added in v0.9.0

type BotPrecheckoutQueryHandler func(ctx UpdateContext, update *UpdateBotPrecheckoutQuery) error

BotPrecheckoutQueryHandler is a BotPrecheckoutQuery event handler.

type BotShippingQueryHandler added in v0.9.0

type BotShippingQueryHandler func(ctx UpdateContext, update *UpdateBotShippingQuery) error

BotShippingQueryHandler is a BotShippingQuery event handler.

type BotWebhookJSONHandler added in v0.9.0

type BotWebhookJSONHandler func(ctx UpdateContext, update *UpdateBotWebhookJSON) error

BotWebhookJSONHandler is a BotWebhookJSON event handler.

type BotWebhookJSONQueryHandler added in v0.9.0

type BotWebhookJSONQueryHandler func(ctx UpdateContext, update *UpdateBotWebhookJSONQuery) error

BotWebhookJSONQueryHandler is a BotWebhookJSONQuery event handler.

type BotsAnswerWebhookJSONQueryRequest

type BotsAnswerWebhookJSONQueryRequest struct {
	// Identifier of a custom query
	QueryID int64
	// JSON-serialized answer to the query
	Data DataJSON
}

BotsAnswerWebhookJSONQueryRequest represents TL type `bots.answerWebhookJSONQuery#e6213f4d`. Answers a custom query; for bots only

See https://core.telegram.org/method/bots.answerWebhookJSONQuery for reference.

func (*BotsAnswerWebhookJSONQueryRequest) Decode

Decode implements bin.Decoder.

func (*BotsAnswerWebhookJSONQueryRequest) Encode

Encode implements bin.Encoder.

func (*BotsAnswerWebhookJSONQueryRequest) String added in v0.12.0

String implements fmt.Stringer.

type BotsSendCustomRequestRequest

type BotsSendCustomRequestRequest struct {
	// The method name
	CustomMethod string
	// JSON-serialized method parameters
	Params DataJSON
}

BotsSendCustomRequestRequest represents TL type `bots.sendCustomRequest#aa2769ed`. Sends a custom request; for bots only

See https://core.telegram.org/method/bots.sendCustomRequest for reference.

func (*BotsSendCustomRequestRequest) Decode

Decode implements bin.Decoder.

func (*BotsSendCustomRequestRequest) Encode

Encode implements bin.Encoder.

func (*BotsSendCustomRequestRequest) String added in v0.12.0

String implements fmt.Stringer.

type BotsSetBotCommandsRequest

type BotsSetBotCommandsRequest struct {
	// Bot commands
	Commands []BotCommand
}

BotsSetBotCommandsRequest represents TL type `bots.setBotCommands#805d46f6`. Set bot command list

See https://core.telegram.org/method/bots.setBotCommands for reference.

func (*BotsSetBotCommandsRequest) Decode

func (s *BotsSetBotCommandsRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*BotsSetBotCommandsRequest) Encode

func (s *BotsSetBotCommandsRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*BotsSetBotCommandsRequest) String added in v0.12.0

func (s *BotsSetBotCommandsRequest) String() string

String implements fmt.Stringer.

type CdnConfig

type CdnConfig struct {
	// Vector of public keys to use only during handshakes to CDN¹ DCs.
	//
	// Links:
	//  1) https://core.telegram.org/cdn
	PublicKeys []CdnPublicKey
}

CdnConfig represents TL type `cdnConfig#5725e40a`. Configuration for CDN¹ file downloads.

Links:

  1. https://core.telegram.org/cdn

See https://core.telegram.org/constructor/cdnConfig for reference.

func (*CdnConfig) Decode

func (c *CdnConfig) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*CdnConfig) Encode

func (c *CdnConfig) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*CdnConfig) String added in v0.12.0

func (c *CdnConfig) String() string

String implements fmt.Stringer.

type CdnPublicKey

type CdnPublicKey struct {
	// CDN DC¹ ID
	//
	// Links:
	//  1) https://core.telegram.org/cdn
	DCID int
	// RSA public key
	PublicKey string
}

CdnPublicKey represents TL type `cdnPublicKey#c982eaba`. Public key to use only during handshakes to CDN¹ DCs.

Links:

  1. https://core.telegram.org/cdn

See https://core.telegram.org/constructor/cdnPublicKey for reference.

func (*CdnPublicKey) Decode

func (c *CdnPublicKey) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*CdnPublicKey) Encode

func (c *CdnPublicKey) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*CdnPublicKey) String added in v0.12.0

func (c *CdnPublicKey) String() string

String implements fmt.Stringer.

type Channel

type Channel struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the current user is the creator of this channel
	Creator bool
	// Whether the current user has left this channel
	Left bool
	// Is this a channel?
	Broadcast bool
	// Is this channel verified by telegram?
	Verified bool
	// Is this a supergroup?
	Megagroup bool
	// Whether viewing/writing in this channel for a reason (see restriction_reason
	Restricted bool
	// Whether signatures are enabled (channels)
	Signatures bool
	// See min¹
	//
	// Links:
	//  1) https://core.telegram.org/api/min
	Min bool
	// This channel/supergroup is probably a scam
	Scam bool
	// Whether this channel has a private join link
	HasLink bool
	// Whether this chanel has a geoposition
	HasGeo bool
	// Whether slow mode is enabled for groups to prevent flood in chat
	SlowmodeEnabled bool
	// CallActive field of Channel.
	CallActive bool
	// CallNotEmpty field of Channel.
	CallNotEmpty bool
	// ID of the channel
	ID int
	// Access hash
	//
	// Use SetAccessHash and GetAccessHash helpers.
	AccessHash int64
	// Title
	Title string
	// Username
	//
	// Use SetUsername and GetUsername helpers.
	Username string
	// Profile photo
	Photo ChatPhotoClass
	// Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date
	Date int
	// Version of the channel (always 0)
	Version int
	// Contains the reason why access to this channel must be restricted.
	//
	// Use SetRestrictionReason and GetRestrictionReason helpers.
	RestrictionReason []RestrictionReason
	// Admin rights of the user in this channel (see rights¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	//
	// Use SetAdminRights and GetAdminRights helpers.
	AdminRights ChatAdminRights
	// Banned rights of the user in this channel (see rights¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	//
	// Use SetBannedRights and GetBannedRights helpers.
	BannedRights ChatBannedRights
	// Default chat rights (see rights¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	//
	// Use SetDefaultBannedRights and GetDefaultBannedRights helpers.
	DefaultBannedRights ChatBannedRights
	// Participant count
	//
	// Use SetParticipantsCount and GetParticipantsCount helpers.
	ParticipantsCount int
}

Channel represents TL type `channel#d31a961e`. Channel/supergroup info

See https://core.telegram.org/constructor/channel for reference.

func (*Channel) Decode

func (c *Channel) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Channel) Encode

func (c *Channel) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Channel) GetAccessHash

func (c *Channel) GetAccessHash() (value int64, ok bool)

GetAccessHash returns value of AccessHash conditional field and boolean which is true if field was set.

func (*Channel) GetAdminRights

func (c *Channel) GetAdminRights() (value ChatAdminRights, ok bool)

GetAdminRights returns value of AdminRights conditional field and boolean which is true if field was set.

func (*Channel) GetBannedRights

func (c *Channel) GetBannedRights() (value ChatBannedRights, ok bool)

GetBannedRights returns value of BannedRights conditional field and boolean which is true if field was set.

func (*Channel) GetDefaultBannedRights

func (c *Channel) GetDefaultBannedRights() (value ChatBannedRights, ok bool)

GetDefaultBannedRights returns value of DefaultBannedRights conditional field and boolean which is true if field was set.

func (*Channel) GetParticipantsCount

func (c *Channel) GetParticipantsCount() (value int, ok bool)

GetParticipantsCount returns value of ParticipantsCount conditional field and boolean which is true if field was set.

func (*Channel) GetRestrictionReason

func (c *Channel) GetRestrictionReason() (value []RestrictionReason, ok bool)

GetRestrictionReason returns value of RestrictionReason conditional field and boolean which is true if field was set.

func (*Channel) GetUsername

func (c *Channel) GetUsername() (value string, ok bool)

GetUsername returns value of Username conditional field and boolean which is true if field was set.

func (*Channel) SetAccessHash

func (c *Channel) SetAccessHash(value int64)

SetAccessHash sets value of AccessHash conditional field.

func (*Channel) SetAdminRights

func (c *Channel) SetAdminRights(value ChatAdminRights)

SetAdminRights sets value of AdminRights conditional field.

func (*Channel) SetBannedRights

func (c *Channel) SetBannedRights(value ChatBannedRights)

SetBannedRights sets value of BannedRights conditional field.

func (*Channel) SetBroadcast

func (c *Channel) SetBroadcast(value bool)

SetBroadcast sets value of Broadcast conditional field.

func (*Channel) SetCallActive

func (c *Channel) SetCallActive(value bool)

SetCallActive sets value of CallActive conditional field.

func (*Channel) SetCallNotEmpty added in v0.13.0

func (c *Channel) SetCallNotEmpty(value bool)

SetCallNotEmpty sets value of CallNotEmpty conditional field.

func (*Channel) SetCreator

func (c *Channel) SetCreator(value bool)

SetCreator sets value of Creator conditional field.

func (*Channel) SetDefaultBannedRights

func (c *Channel) SetDefaultBannedRights(value ChatBannedRights)

SetDefaultBannedRights sets value of DefaultBannedRights conditional field.

func (*Channel) SetHasGeo

func (c *Channel) SetHasGeo(value bool)

SetHasGeo sets value of HasGeo conditional field.

func (c *Channel) SetHasLink(value bool)

SetHasLink sets value of HasLink conditional field.

func (*Channel) SetLeft

func (c *Channel) SetLeft(value bool)

SetLeft sets value of Left conditional field.

func (*Channel) SetMegagroup

func (c *Channel) SetMegagroup(value bool)

SetMegagroup sets value of Megagroup conditional field.

func (*Channel) SetMin

func (c *Channel) SetMin(value bool)

SetMin sets value of Min conditional field.

func (*Channel) SetParticipantsCount

func (c *Channel) SetParticipantsCount(value int)

SetParticipantsCount sets value of ParticipantsCount conditional field.

func (*Channel) SetRestricted

func (c *Channel) SetRestricted(value bool)

SetRestricted sets value of Restricted conditional field.

func (*Channel) SetRestrictionReason

func (c *Channel) SetRestrictionReason(value []RestrictionReason)

SetRestrictionReason sets value of RestrictionReason conditional field.

func (*Channel) SetScam

func (c *Channel) SetScam(value bool)

SetScam sets value of Scam conditional field.

func (*Channel) SetSignatures

func (c *Channel) SetSignatures(value bool)

SetSignatures sets value of Signatures conditional field.

func (*Channel) SetSlowmodeEnabled

func (c *Channel) SetSlowmodeEnabled(value bool)

SetSlowmodeEnabled sets value of SlowmodeEnabled conditional field.

func (*Channel) SetUsername

func (c *Channel) SetUsername(value string)

SetUsername sets value of Username conditional field.

func (*Channel) SetVerified

func (c *Channel) SetVerified(value bool)

SetVerified sets value of Verified conditional field.

func (*Channel) String added in v0.12.0

func (c *Channel) String() string

String implements fmt.Stringer.

type ChannelAdminLogEvent

type ChannelAdminLogEvent struct {
	// Event ID
	ID int64
	// Date
	Date int
	// User ID
	UserID int
	// Action
	Action ChannelAdminLogEventActionClass
}

ChannelAdminLogEvent represents TL type `channelAdminLogEvent#3b5a3e40`. Admin log event

See https://core.telegram.org/constructor/channelAdminLogEvent for reference.

func (*ChannelAdminLogEvent) Decode

func (c *ChannelAdminLogEvent) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelAdminLogEvent) Encode

func (c *ChannelAdminLogEvent) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelAdminLogEvent) String added in v0.12.0

func (c *ChannelAdminLogEvent) String() string

String implements fmt.Stringer.

type ChannelAdminLogEventActionBox

type ChannelAdminLogEventActionBox struct {
	ChannelAdminLogEventAction ChannelAdminLogEventActionClass
}

ChannelAdminLogEventAction boxes the ChannelAdminLogEventActionClass providing a helper.

func (*ChannelAdminLogEventActionBox) Decode

Decode implements bin.Decoder for ChannelAdminLogEventActionBox.

func (*ChannelAdminLogEventActionBox) Encode

Encode implements bin.Encode for ChannelAdminLogEventActionBox.

type ChannelAdminLogEventActionChangeAbout

type ChannelAdminLogEventActionChangeAbout struct {
	// Previous description
	PrevValue string
	// New description
	NewValue string
}

ChannelAdminLogEventActionChangeAbout represents TL type `channelAdminLogEventActionChangeAbout#55188a2e`. The description was changed

See https://core.telegram.org/constructor/channelAdminLogEventActionChangeAbout for reference.

func (*ChannelAdminLogEventActionChangeAbout) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionChangeAbout) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionChangeAbout) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionChangeLinkedChat

type ChannelAdminLogEventActionChangeLinkedChat struct {
	// Previous linked chat
	PrevValue int
	// New linked chat
	NewValue int
}

ChannelAdminLogEventActionChangeLinkedChat represents TL type `channelAdminLogEventActionChangeLinkedChat#a26f881b`. The linked chat was changed

See https://core.telegram.org/constructor/channelAdminLogEventActionChangeLinkedChat for reference.

func (*ChannelAdminLogEventActionChangeLinkedChat) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionChangeLinkedChat) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionChangeLinkedChat) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionChangeLocation

type ChannelAdminLogEventActionChangeLocation struct {
	// Previous location
	PrevValue ChannelLocationClass
	// New location
	NewValue ChannelLocationClass
}

ChannelAdminLogEventActionChangeLocation represents TL type `channelAdminLogEventActionChangeLocation#e6b76ae`. The geogroup location was changed

See https://core.telegram.org/constructor/channelAdminLogEventActionChangeLocation for reference.

func (*ChannelAdminLogEventActionChangeLocation) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionChangeLocation) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionChangeLocation) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionChangePhoto

type ChannelAdminLogEventActionChangePhoto struct {
	// Previous picture
	PrevPhoto PhotoClass
	// New picture
	NewPhoto PhotoClass
}

ChannelAdminLogEventActionChangePhoto represents TL type `channelAdminLogEventActionChangePhoto#434bd2af`. The channel/supergroup's picture was changed

See https://core.telegram.org/constructor/channelAdminLogEventActionChangePhoto for reference.

func (*ChannelAdminLogEventActionChangePhoto) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionChangePhoto) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionChangePhoto) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionChangeStickerSet

type ChannelAdminLogEventActionChangeStickerSet struct {
	// Previous stickerset
	PrevStickerset InputStickerSetClass
	// New stickerset
	NewStickerset InputStickerSetClass
}

ChannelAdminLogEventActionChangeStickerSet represents TL type `channelAdminLogEventActionChangeStickerSet#b1c3caa7`. The supergroup's stickerset was changed

See https://core.telegram.org/constructor/channelAdminLogEventActionChangeStickerSet for reference.

func (*ChannelAdminLogEventActionChangeStickerSet) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionChangeStickerSet) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionChangeStickerSet) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionChangeTitle

type ChannelAdminLogEventActionChangeTitle struct {
	// Previous title
	PrevValue string
	// New title
	NewValue string
}

ChannelAdminLogEventActionChangeTitle represents TL type `channelAdminLogEventActionChangeTitle#e6dfb825`. Channel/supergroup title was changed

See https://core.telegram.org/constructor/channelAdminLogEventActionChangeTitle for reference.

func (*ChannelAdminLogEventActionChangeTitle) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionChangeTitle) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionChangeTitle) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionChangeUsername

type ChannelAdminLogEventActionChangeUsername struct {
	// Old username
	PrevValue string
	// New username
	NewValue string
}

ChannelAdminLogEventActionChangeUsername represents TL type `channelAdminLogEventActionChangeUsername#6a4afc38`. Channel/supergroup username was changed

See https://core.telegram.org/constructor/channelAdminLogEventActionChangeUsername for reference.

func (*ChannelAdminLogEventActionChangeUsername) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionChangeUsername) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionChangeUsername) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionClass

type ChannelAdminLogEventActionClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChannelAdminLogEventActionClass represents ChannelAdminLogEventAction generic type.

See https://core.telegram.org/type/ChannelAdminLogEventAction for reference.

Example:

g, err := DecodeChannelAdminLogEventAction(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChannelAdminLogEventActionChangeTitle: // channelAdminLogEventActionChangeTitle#e6dfb825
case *ChannelAdminLogEventActionChangeAbout: // channelAdminLogEventActionChangeAbout#55188a2e
case *ChannelAdminLogEventActionChangeUsername: // channelAdminLogEventActionChangeUsername#6a4afc38
case *ChannelAdminLogEventActionChangePhoto: // channelAdminLogEventActionChangePhoto#434bd2af
case *ChannelAdminLogEventActionToggleInvites: // channelAdminLogEventActionToggleInvites#1b7907ae
case *ChannelAdminLogEventActionToggleSignatures: // channelAdminLogEventActionToggleSignatures#26ae0971
case *ChannelAdminLogEventActionUpdatePinned: // channelAdminLogEventActionUpdatePinned#e9e82c18
case *ChannelAdminLogEventActionEditMessage: // channelAdminLogEventActionEditMessage#709b2405
case *ChannelAdminLogEventActionDeleteMessage: // channelAdminLogEventActionDeleteMessage#42e047bb
case *ChannelAdminLogEventActionParticipantJoin: // channelAdminLogEventActionParticipantJoin#183040d3
case *ChannelAdminLogEventActionParticipantLeave: // channelAdminLogEventActionParticipantLeave#f89777f2
case *ChannelAdminLogEventActionParticipantInvite: // channelAdminLogEventActionParticipantInvite#e31c34d8
case *ChannelAdminLogEventActionParticipantToggleBan: // channelAdminLogEventActionParticipantToggleBan#e6d83d7e
case *ChannelAdminLogEventActionParticipantToggleAdmin: // channelAdminLogEventActionParticipantToggleAdmin#d5676710
case *ChannelAdminLogEventActionChangeStickerSet: // channelAdminLogEventActionChangeStickerSet#b1c3caa7
case *ChannelAdminLogEventActionTogglePreHistoryHidden: // channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1
case *ChannelAdminLogEventActionDefaultBannedRights: // channelAdminLogEventActionDefaultBannedRights#2df5fc0a
case *ChannelAdminLogEventActionStopPoll: // channelAdminLogEventActionStopPoll#8f079643
case *ChannelAdminLogEventActionChangeLinkedChat: // channelAdminLogEventActionChangeLinkedChat#a26f881b
case *ChannelAdminLogEventActionChangeLocation: // channelAdminLogEventActionChangeLocation#e6b76ae
case *ChannelAdminLogEventActionToggleSlowMode: // channelAdminLogEventActionToggleSlowMode#53909779
case *ChannelAdminLogEventActionStartGroupCall: // channelAdminLogEventActionStartGroupCall#23209745
case *ChannelAdminLogEventActionDiscardGroupCall: // channelAdminLogEventActionDiscardGroupCall#db9f9140
case *ChannelAdminLogEventActionParticipantMute: // channelAdminLogEventActionParticipantMute#f92424d2
case *ChannelAdminLogEventActionParticipantUnmute: // channelAdminLogEventActionParticipantUnmute#e64429c0
case *ChannelAdminLogEventActionToggleGroupCallSetting: // channelAdminLogEventActionToggleGroupCallSetting#56d6a247
default: panic(v)
}

func DecodeChannelAdminLogEventAction

func DecodeChannelAdminLogEventAction(buf *bin.Buffer) (ChannelAdminLogEventActionClass, error)

DecodeChannelAdminLogEventAction implements binary de-serialization for ChannelAdminLogEventActionClass.

type ChannelAdminLogEventActionDefaultBannedRights

type ChannelAdminLogEventActionDefaultBannedRights struct {
	// Previous global banned rights¹
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	PrevBannedRights ChatBannedRights
	// New glboal banned rights¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	NewBannedRights ChatBannedRights
}

ChannelAdminLogEventActionDefaultBannedRights represents TL type `channelAdminLogEventActionDefaultBannedRights#2df5fc0a`. The default banned rights were modified

See https://core.telegram.org/constructor/channelAdminLogEventActionDefaultBannedRights for reference.

func (*ChannelAdminLogEventActionDefaultBannedRights) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionDefaultBannedRights) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionDefaultBannedRights) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionDeleteMessage

type ChannelAdminLogEventActionDeleteMessage struct {
	// The message that was deleted
	Message MessageClass
}

ChannelAdminLogEventActionDeleteMessage represents TL type `channelAdminLogEventActionDeleteMessage#42e047bb`. A message was deleted

See https://core.telegram.org/constructor/channelAdminLogEventActionDeleteMessage for reference.

func (*ChannelAdminLogEventActionDeleteMessage) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionDeleteMessage) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionDeleteMessage) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionDiscardGroupCall added in v0.13.0

type ChannelAdminLogEventActionDiscardGroupCall struct {
	// Call field of ChannelAdminLogEventActionDiscardGroupCall.
	Call InputGroupCall
}

ChannelAdminLogEventActionDiscardGroupCall represents TL type `channelAdminLogEventActionDiscardGroupCall#db9f9140`.

See https://core.telegram.org/constructor/channelAdminLogEventActionDiscardGroupCall for reference.

func (*ChannelAdminLogEventActionDiscardGroupCall) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionDiscardGroupCall) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionDiscardGroupCall) String added in v0.13.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionEditMessage

type ChannelAdminLogEventActionEditMessage struct {
	// Old message
	PrevMessage MessageClass
	// New message
	NewMessage MessageClass
}

ChannelAdminLogEventActionEditMessage represents TL type `channelAdminLogEventActionEditMessage#709b2405`. A message was edited

See https://core.telegram.org/constructor/channelAdminLogEventActionEditMessage for reference.

func (*ChannelAdminLogEventActionEditMessage) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionEditMessage) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionEditMessage) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionParticipantInvite

type ChannelAdminLogEventActionParticipantInvite struct {
	// The user that was invited
	Participant ChannelParticipantClass
}

ChannelAdminLogEventActionParticipantInvite represents TL type `channelAdminLogEventActionParticipantInvite#e31c34d8`. A user was invited to the group

See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantInvite for reference.

func (*ChannelAdminLogEventActionParticipantInvite) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionParticipantInvite) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionParticipantInvite) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionParticipantJoin

type ChannelAdminLogEventActionParticipantJoin struct {
}

ChannelAdminLogEventActionParticipantJoin represents TL type `channelAdminLogEventActionParticipantJoin#183040d3`. A user has joined the group (in the case of big groups, info of the user that has joined isn't shown)

See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantJoin for reference.

func (*ChannelAdminLogEventActionParticipantJoin) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionParticipantJoin) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionParticipantJoin) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionParticipantLeave

type ChannelAdminLogEventActionParticipantLeave struct {
}

ChannelAdminLogEventActionParticipantLeave represents TL type `channelAdminLogEventActionParticipantLeave#f89777f2`. A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown)

See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantLeave for reference.

func (*ChannelAdminLogEventActionParticipantLeave) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionParticipantLeave) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionParticipantLeave) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionParticipantMute added in v0.13.0

type ChannelAdminLogEventActionParticipantMute struct {
	// Participant field of ChannelAdminLogEventActionParticipantMute.
	Participant GroupCallParticipant
}

ChannelAdminLogEventActionParticipantMute represents TL type `channelAdminLogEventActionParticipantMute#f92424d2`.

See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantMute for reference.

func (*ChannelAdminLogEventActionParticipantMute) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionParticipantMute) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionParticipantMute) String added in v0.13.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionParticipantToggleAdmin

type ChannelAdminLogEventActionParticipantToggleAdmin struct {
	// Previous admin rights
	PrevParticipant ChannelParticipantClass
	// New admin rights
	NewParticipant ChannelParticipantClass
}

ChannelAdminLogEventActionParticipantToggleAdmin represents TL type `channelAdminLogEventActionParticipantToggleAdmin#d5676710`. The admin rights¹ of a user were changed

Links:

  1. https://core.telegram.org/api/rights

See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleAdmin for reference.

func (*ChannelAdminLogEventActionParticipantToggleAdmin) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionParticipantToggleAdmin) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionParticipantToggleAdmin) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionParticipantToggleBan

type ChannelAdminLogEventActionParticipantToggleBan struct {
	// Old banned rights of user
	PrevParticipant ChannelParticipantClass
	// New banned rights of user
	NewParticipant ChannelParticipantClass
}

ChannelAdminLogEventActionParticipantToggleBan represents TL type `channelAdminLogEventActionParticipantToggleBan#e6d83d7e`. The banned rights¹ of a user were changed

Links:

  1. https://core.telegram.org/api/rights

See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleBan for reference.

func (*ChannelAdminLogEventActionParticipantToggleBan) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionParticipantToggleBan) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionParticipantToggleBan) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionParticipantUnmute added in v0.13.0

type ChannelAdminLogEventActionParticipantUnmute struct {
	// Participant field of ChannelAdminLogEventActionParticipantUnmute.
	Participant GroupCallParticipant
}

ChannelAdminLogEventActionParticipantUnmute represents TL type `channelAdminLogEventActionParticipantUnmute#e64429c0`.

See https://core.telegram.org/constructor/channelAdminLogEventActionParticipantUnmute for reference.

func (*ChannelAdminLogEventActionParticipantUnmute) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionParticipantUnmute) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionParticipantUnmute) String added in v0.13.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionStartGroupCall added in v0.13.0

type ChannelAdminLogEventActionStartGroupCall struct {
	// Call field of ChannelAdminLogEventActionStartGroupCall.
	Call InputGroupCall
}

ChannelAdminLogEventActionStartGroupCall represents TL type `channelAdminLogEventActionStartGroupCall#23209745`.

See https://core.telegram.org/constructor/channelAdminLogEventActionStartGroupCall for reference.

func (*ChannelAdminLogEventActionStartGroupCall) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionStartGroupCall) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionStartGroupCall) String added in v0.13.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionStopPoll

type ChannelAdminLogEventActionStopPoll struct {
	// The poll that was stopped
	Message MessageClass
}

ChannelAdminLogEventActionStopPoll represents TL type `channelAdminLogEventActionStopPoll#8f079643`. A poll was stopped

See https://core.telegram.org/constructor/channelAdminLogEventActionStopPoll for reference.

func (*ChannelAdminLogEventActionStopPoll) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionStopPoll) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionStopPoll) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionToggleGroupCallSetting added in v0.13.0

type ChannelAdminLogEventActionToggleGroupCallSetting struct {
	// JoinMuted field of ChannelAdminLogEventActionToggleGroupCallSetting.
	JoinMuted bool
}

ChannelAdminLogEventActionToggleGroupCallSetting represents TL type `channelAdminLogEventActionToggleGroupCallSetting#56d6a247`.

See https://core.telegram.org/constructor/channelAdminLogEventActionToggleGroupCallSetting for reference.

func (*ChannelAdminLogEventActionToggleGroupCallSetting) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionToggleGroupCallSetting) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionToggleGroupCallSetting) String added in v0.13.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionToggleInvites

type ChannelAdminLogEventActionToggleInvites struct {
	// New value
	NewValue bool
}

ChannelAdminLogEventActionToggleInvites represents TL type `channelAdminLogEventActionToggleInvites#1b7907ae`. Invites were enabled/disabled

See https://core.telegram.org/constructor/channelAdminLogEventActionToggleInvites for reference.

func (*ChannelAdminLogEventActionToggleInvites) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionToggleInvites) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionToggleInvites) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionTogglePreHistoryHidden

type ChannelAdminLogEventActionTogglePreHistoryHidden struct {
	// New value
	NewValue bool
}

ChannelAdminLogEventActionTogglePreHistoryHidden represents TL type `channelAdminLogEventActionTogglePreHistoryHidden#5f5c95f1`. The hidden prehistory setting was changed¹

Links:

  1. https://core.telegram.org/method/channels.togglePreHistoryHidden

See https://core.telegram.org/constructor/channelAdminLogEventActionTogglePreHistoryHidden for reference.

func (*ChannelAdminLogEventActionTogglePreHistoryHidden) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionTogglePreHistoryHidden) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionTogglePreHistoryHidden) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionToggleSignatures

type ChannelAdminLogEventActionToggleSignatures struct {
	// New value
	NewValue bool
}

ChannelAdminLogEventActionToggleSignatures represents TL type `channelAdminLogEventActionToggleSignatures#26ae0971`. Channel signatures were enabled/disabled

See https://core.telegram.org/constructor/channelAdminLogEventActionToggleSignatures for reference.

func (*ChannelAdminLogEventActionToggleSignatures) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionToggleSignatures) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionToggleSignatures) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionToggleSlowMode

type ChannelAdminLogEventActionToggleSlowMode struct {
	// Previous slow mode value
	PrevValue int
	// New slow mode value
	NewValue int
}

ChannelAdminLogEventActionToggleSlowMode represents TL type `channelAdminLogEventActionToggleSlowMode#53909779`. Slow mode setting for supergroups was changed¹

Links:

  1. https://core.telegram.org/method/channels.toggleSlowMode

See https://core.telegram.org/constructor/channelAdminLogEventActionToggleSlowMode for reference.

func (*ChannelAdminLogEventActionToggleSlowMode) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionToggleSlowMode) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionToggleSlowMode) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventActionUpdatePinned

type ChannelAdminLogEventActionUpdatePinned struct {
	// The message that was pinned
	Message MessageClass
}

ChannelAdminLogEventActionUpdatePinned represents TL type `channelAdminLogEventActionUpdatePinned#e9e82c18`. A message was pinned

See https://core.telegram.org/constructor/channelAdminLogEventActionUpdatePinned for reference.

func (*ChannelAdminLogEventActionUpdatePinned) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventActionUpdatePinned) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventActionUpdatePinned) String added in v0.12.0

String implements fmt.Stringer.

type ChannelAdminLogEventsFilter

type ChannelAdminLogEventsFilter struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Join events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionParticipantJoin
	Join bool
	// Leave events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionParticipantLeave
	Leave bool
	// Invite events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionParticipantInvite
	Invite bool
	// Ban events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleBan
	Ban bool
	// Unban events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleBan
	Unban bool
	// Kick events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleBan
	Kick bool
	// Unkick events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleBan
	Unkick bool
	// Admin promotion events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleAdmin
	Promote bool
	// Admin demotion events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionParticipantToggleAdmin
	Demote bool
	// Info change events (when about¹, linked chat², location³, photo⁴, stickerset⁵, title⁶ or username⁷ data of a channel gets modified)
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionChangeAbout
	//  2) https://core.telegram.org/constructor/channelAdminLogEventActionChangeLinkedChat
	//  3) https://core.telegram.org/constructor/channelAdminLogEventActionChangeLocation
	//  4) https://core.telegram.org/constructor/channelAdminLogEventActionChangePhoto
	//  5) https://core.telegram.org/constructor/channelAdminLogEventActionChangeStickerSet
	//  6) https://core.telegram.org/constructor/channelAdminLogEventActionChangeTitle
	//  7) https://core.telegram.org/constructor/channelAdminLogEventActionChangeUsername
	Info bool
	// Settings change events (invites¹, hidden prehistory², signatures³, default banned rights⁴)
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionToggleInvites
	//  2) https://core.telegram.org/constructor/channelAdminLogEventActionTogglePreHistoryHidden
	//  3) https://core.telegram.org/constructor/channelAdminLogEventActionToggleSignatures
	//  4) https://core.telegram.org/constructor/channelAdminLogEventActionDefaultBannedRights
	Settings bool
	// Message pin events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionUpdatePinned
	Pinned bool
	// Message edit events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionEditMessage
	Edit bool
	// Message deletion events¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channelAdminLogEventActionDeleteMessage
	Delete bool
	// GroupCall field of ChannelAdminLogEventsFilter.
	GroupCall bool
}

ChannelAdminLogEventsFilter represents TL type `channelAdminLogEventsFilter#ea107ae4`. Filter only certain admin log events

See https://core.telegram.org/constructor/channelAdminLogEventsFilter for reference.

func (*ChannelAdminLogEventsFilter) Decode

Decode implements bin.Decoder.

func (*ChannelAdminLogEventsFilter) Encode

Encode implements bin.Encoder.

func (*ChannelAdminLogEventsFilter) SetBan

func (c *ChannelAdminLogEventsFilter) SetBan(value bool)

SetBan sets value of Ban conditional field.

func (*ChannelAdminLogEventsFilter) SetDelete

func (c *ChannelAdminLogEventsFilter) SetDelete(value bool)

SetDelete sets value of Delete conditional field.

func (*ChannelAdminLogEventsFilter) SetDemote

func (c *ChannelAdminLogEventsFilter) SetDemote(value bool)

SetDemote sets value of Demote conditional field.

func (*ChannelAdminLogEventsFilter) SetEdit

func (c *ChannelAdminLogEventsFilter) SetEdit(value bool)

SetEdit sets value of Edit conditional field.

func (*ChannelAdminLogEventsFilter) SetGroupCall added in v0.13.0

func (c *ChannelAdminLogEventsFilter) SetGroupCall(value bool)

SetGroupCall sets value of GroupCall conditional field.

func (*ChannelAdminLogEventsFilter) SetInfo

func (c *ChannelAdminLogEventsFilter) SetInfo(value bool)

SetInfo sets value of Info conditional field.

func (*ChannelAdminLogEventsFilter) SetInvite

func (c *ChannelAdminLogEventsFilter) SetInvite(value bool)

SetInvite sets value of Invite conditional field.

func (*ChannelAdminLogEventsFilter) SetJoin

func (c *ChannelAdminLogEventsFilter) SetJoin(value bool)

SetJoin sets value of Join conditional field.

func (*ChannelAdminLogEventsFilter) SetKick

func (c *ChannelAdminLogEventsFilter) SetKick(value bool)

SetKick sets value of Kick conditional field.

func (*ChannelAdminLogEventsFilter) SetLeave

func (c *ChannelAdminLogEventsFilter) SetLeave(value bool)

SetLeave sets value of Leave conditional field.

func (*ChannelAdminLogEventsFilter) SetPinned

func (c *ChannelAdminLogEventsFilter) SetPinned(value bool)

SetPinned sets value of Pinned conditional field.

func (*ChannelAdminLogEventsFilter) SetPromote

func (c *ChannelAdminLogEventsFilter) SetPromote(value bool)

SetPromote sets value of Promote conditional field.

func (*ChannelAdminLogEventsFilter) SetSettings

func (c *ChannelAdminLogEventsFilter) SetSettings(value bool)

SetSettings sets value of Settings conditional field.

func (*ChannelAdminLogEventsFilter) SetUnban

func (c *ChannelAdminLogEventsFilter) SetUnban(value bool)

SetUnban sets value of Unban conditional field.

func (*ChannelAdminLogEventsFilter) SetUnkick

func (c *ChannelAdminLogEventsFilter) SetUnkick(value bool)

SetUnkick sets value of Unkick conditional field.

func (*ChannelAdminLogEventsFilter) String added in v0.12.0

func (c *ChannelAdminLogEventsFilter) String() string

String implements fmt.Stringer.

type ChannelAvailableMessagesHandler added in v0.9.0

type ChannelAvailableMessagesHandler func(ctx UpdateContext, update *UpdateChannelAvailableMessages) error

ChannelAvailableMessagesHandler is a ChannelAvailableMessages event handler.

type ChannelForbidden

type ChannelForbidden struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Is this a channel
	Broadcast bool
	// Is this a supergroup
	Megagroup bool
	// Channel ID
	ID int
	// Access hash
	AccessHash int64
	// Title
	Title string
	// The ban is valid until the specified date
	//
	// Use SetUntilDate and GetUntilDate helpers.
	UntilDate int
}

ChannelForbidden represents TL type `channelForbidden#289da732`. Indicates a channel/supergroup we can't access because we were banned, or for some other reason.

See https://core.telegram.org/constructor/channelForbidden for reference.

func (*ChannelForbidden) Decode

func (c *ChannelForbidden) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelForbidden) Encode

func (c *ChannelForbidden) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelForbidden) GetUntilDate

func (c *ChannelForbidden) GetUntilDate() (value int, ok bool)

GetUntilDate returns value of UntilDate conditional field and boolean which is true if field was set.

func (*ChannelForbidden) SetBroadcast

func (c *ChannelForbidden) SetBroadcast(value bool)

SetBroadcast sets value of Broadcast conditional field.

func (*ChannelForbidden) SetMegagroup

func (c *ChannelForbidden) SetMegagroup(value bool)

SetMegagroup sets value of Megagroup conditional field.

func (*ChannelForbidden) SetUntilDate

func (c *ChannelForbidden) SetUntilDate(value int)

SetUntilDate sets value of UntilDate conditional field.

func (*ChannelForbidden) String added in v0.12.0

func (c *ChannelForbidden) String() string

String implements fmt.Stringer.

type ChannelFull

type ChannelFull struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Can we vew the participant list?
	CanViewParticipants bool
	// Can we set the channel's username?
	CanSetUsername bool
	// Can we associate¹ a stickerpack to the supergroup?
	//
	// Links:
	//  1) https://core.telegram.org/method/channels.setStickers
	CanSetStickers bool
	// Is the history before we joined hidden to us?
	HiddenPrehistory bool
	// Can we set the geolocation of this group (for geogroups)
	CanSetLocation bool
	// Whether scheduled messages are available
	HasScheduled bool
	// Can the user view channel/supergroup statistics¹
	//
	// Links:
	//  1) https://core.telegram.org/api/stats
	CanViewStats bool
	// Whether any anonymous admin of this supergroup was blocked: if set, you won't receive messages from anonymous group admins in discussion replies via @replies¹
	//
	// Links:
	//  1) https://core.telegram.org/api/discussion
	Blocked bool
	// ID of the channel
	ID int
	// Info about the channel
	About string
	// Number of participants of the channel
	//
	// Use SetParticipantsCount and GetParticipantsCount helpers.
	ParticipantsCount int
	// Number of channel admins
	//
	// Use SetAdminsCount and GetAdminsCount helpers.
	AdminsCount int
	// Number of users kicked¹ from the channel
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	//
	// Use SetKickedCount and GetKickedCount helpers.
	KickedCount int
	// Number of users banned¹ from the channel
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	//
	// Use SetBannedCount and GetBannedCount helpers.
	BannedCount int
	// Number of users currently online
	//
	// Use SetOnlineCount and GetOnlineCount helpers.
	OnlineCount int
	// Position up to which all incoming messages are read.
	ReadInboxMaxID int
	// Position up to which all outgoing messages are read.
	ReadOutboxMaxID int
	// Count of unread messages
	UnreadCount int
	// Channel picture
	ChatPhoto PhotoClass
	// Notification settings
	NotifySettings PeerNotifySettings
	// Invite link
	ExportedInvite ExportedChatInviteClass
	// Info about bots in the channel/supergrup
	BotInfo []BotInfo
	// The chat ID from which this group was migrated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	//
	// Use SetMigratedFromChatID and GetMigratedFromChatID helpers.
	MigratedFromChatID int
	// The message ID in the original chat at which this group was migrated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	//
	// Use SetMigratedFromMaxID and GetMigratedFromMaxID helpers.
	MigratedFromMaxID int
	// Message ID of the last pinned message¹
	//
	// Links:
	//  1) https://core.telegram.org/api/pin
	//
	// Use SetPinnedMsgID and GetPinnedMsgID helpers.
	PinnedMsgID int
	// Associated stickerset
	//
	// Use SetStickerset and GetStickerset helpers.
	Stickerset StickerSet
	// Identifier of a maximum unavailable message in a channel due to hidden history.
	//
	// Use SetAvailableMinID and GetAvailableMinID helpers.
	AvailableMinID int
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// ID of the linked discussion chat¹ for channels
	//
	// Links:
	//  1) https://core.telegram.org/api/discussion
	//
	// Use SetLinkedChatID and GetLinkedChatID helpers.
	LinkedChatID int
	// Location of the geogroup
	//
	// Use SetLocation and GetLocation helpers.
	Location ChannelLocationClass
	// If specified, users in supergroups will only be able to send one message every slowmode_seconds seconds
	//
	// Use SetSlowmodeSeconds and GetSlowmodeSeconds helpers.
	SlowmodeSeconds int
	// Indicates when the user will be allowed to send another message in the supergroup (unixdate)
	//
	// Use SetSlowmodeNextSendDate and GetSlowmodeNextSendDate helpers.
	SlowmodeNextSendDate int
	// If set, specifies the DC to use for fetching channel statistics
	//
	// Use SetStatsDC and GetStatsDC helpers.
	StatsDC int
	// Latest PTS¹ for this channel
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Call field of ChannelFull.
	//
	// Use SetCall and GetCall helpers.
	Call InputGroupCall
}

ChannelFull represents TL type `channelFull#ef3a6acd`. Full info about a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/channelFull for reference.

func (*ChannelFull) Decode

func (c *ChannelFull) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelFull) Encode

func (c *ChannelFull) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelFull) GetAdminsCount

func (c *ChannelFull) GetAdminsCount() (value int, ok bool)

GetAdminsCount returns value of AdminsCount conditional field and boolean which is true if field was set.

func (*ChannelFull) GetAvailableMinID

func (c *ChannelFull) GetAvailableMinID() (value int, ok bool)

GetAvailableMinID returns value of AvailableMinID conditional field and boolean which is true if field was set.

func (*ChannelFull) GetBannedCount

func (c *ChannelFull) GetBannedCount() (value int, ok bool)

GetBannedCount returns value of BannedCount conditional field and boolean which is true if field was set.

func (*ChannelFull) GetCall added in v0.13.0

func (c *ChannelFull) GetCall() (value InputGroupCall, ok bool)

GetCall returns value of Call conditional field and boolean which is true if field was set.

func (*ChannelFull) GetFolderID

func (c *ChannelFull) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*ChannelFull) GetKickedCount

func (c *ChannelFull) GetKickedCount() (value int, ok bool)

GetKickedCount returns value of KickedCount conditional field and boolean which is true if field was set.

func (*ChannelFull) GetLinkedChatID

func (c *ChannelFull) GetLinkedChatID() (value int, ok bool)

GetLinkedChatID returns value of LinkedChatID conditional field and boolean which is true if field was set.

func (*ChannelFull) GetLocation

func (c *ChannelFull) GetLocation() (value ChannelLocationClass, ok bool)

GetLocation returns value of Location conditional field and boolean which is true if field was set.

func (*ChannelFull) GetMigratedFromChatID

func (c *ChannelFull) GetMigratedFromChatID() (value int, ok bool)

GetMigratedFromChatID returns value of MigratedFromChatID conditional field and boolean which is true if field was set.

func (*ChannelFull) GetMigratedFromMaxID

func (c *ChannelFull) GetMigratedFromMaxID() (value int, ok bool)

GetMigratedFromMaxID returns value of MigratedFromMaxID conditional field and boolean which is true if field was set.

func (*ChannelFull) GetOnlineCount

func (c *ChannelFull) GetOnlineCount() (value int, ok bool)

GetOnlineCount returns value of OnlineCount conditional field and boolean which is true if field was set.

func (*ChannelFull) GetParticipantsCount

func (c *ChannelFull) GetParticipantsCount() (value int, ok bool)

GetParticipantsCount returns value of ParticipantsCount conditional field and boolean which is true if field was set.

func (*ChannelFull) GetPinnedMsgID

func (c *ChannelFull) GetPinnedMsgID() (value int, ok bool)

GetPinnedMsgID returns value of PinnedMsgID conditional field and boolean which is true if field was set.

func (*ChannelFull) GetSlowmodeNextSendDate

func (c *ChannelFull) GetSlowmodeNextSendDate() (value int, ok bool)

GetSlowmodeNextSendDate returns value of SlowmodeNextSendDate conditional field and boolean which is true if field was set.

func (*ChannelFull) GetSlowmodeSeconds

func (c *ChannelFull) GetSlowmodeSeconds() (value int, ok bool)

GetSlowmodeSeconds returns value of SlowmodeSeconds conditional field and boolean which is true if field was set.

func (*ChannelFull) GetStatsDC

func (c *ChannelFull) GetStatsDC() (value int, ok bool)

GetStatsDC returns value of StatsDC conditional field and boolean which is true if field was set.

func (*ChannelFull) GetStickerset

func (c *ChannelFull) GetStickerset() (value StickerSet, ok bool)

GetStickerset returns value of Stickerset conditional field and boolean which is true if field was set.

func (*ChannelFull) SetAdminsCount

func (c *ChannelFull) SetAdminsCount(value int)

SetAdminsCount sets value of AdminsCount conditional field.

func (*ChannelFull) SetAvailableMinID

func (c *ChannelFull) SetAvailableMinID(value int)

SetAvailableMinID sets value of AvailableMinID conditional field.

func (*ChannelFull) SetBannedCount

func (c *ChannelFull) SetBannedCount(value int)

SetBannedCount sets value of BannedCount conditional field.

func (*ChannelFull) SetBlocked

func (c *ChannelFull) SetBlocked(value bool)

SetBlocked sets value of Blocked conditional field.

func (*ChannelFull) SetCall added in v0.13.0

func (c *ChannelFull) SetCall(value InputGroupCall)

SetCall sets value of Call conditional field.

func (*ChannelFull) SetCanSetLocation

func (c *ChannelFull) SetCanSetLocation(value bool)

SetCanSetLocation sets value of CanSetLocation conditional field.

func (*ChannelFull) SetCanSetStickers

func (c *ChannelFull) SetCanSetStickers(value bool)

SetCanSetStickers sets value of CanSetStickers conditional field.

func (*ChannelFull) SetCanSetUsername

func (c *ChannelFull) SetCanSetUsername(value bool)

SetCanSetUsername sets value of CanSetUsername conditional field.

func (*ChannelFull) SetCanViewParticipants

func (c *ChannelFull) SetCanViewParticipants(value bool)

SetCanViewParticipants sets value of CanViewParticipants conditional field.

func (*ChannelFull) SetCanViewStats

func (c *ChannelFull) SetCanViewStats(value bool)

SetCanViewStats sets value of CanViewStats conditional field.

func (*ChannelFull) SetFolderID

func (c *ChannelFull) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*ChannelFull) SetHasScheduled

func (c *ChannelFull) SetHasScheduled(value bool)

SetHasScheduled sets value of HasScheduled conditional field.

func (*ChannelFull) SetHiddenPrehistory

func (c *ChannelFull) SetHiddenPrehistory(value bool)

SetHiddenPrehistory sets value of HiddenPrehistory conditional field.

func (*ChannelFull) SetKickedCount

func (c *ChannelFull) SetKickedCount(value int)

SetKickedCount sets value of KickedCount conditional field.

func (*ChannelFull) SetLinkedChatID

func (c *ChannelFull) SetLinkedChatID(value int)

SetLinkedChatID sets value of LinkedChatID conditional field.

func (*ChannelFull) SetLocation

func (c *ChannelFull) SetLocation(value ChannelLocationClass)

SetLocation sets value of Location conditional field.

func (*ChannelFull) SetMigratedFromChatID

func (c *ChannelFull) SetMigratedFromChatID(value int)

SetMigratedFromChatID sets value of MigratedFromChatID conditional field.

func (*ChannelFull) SetMigratedFromMaxID

func (c *ChannelFull) SetMigratedFromMaxID(value int)

SetMigratedFromMaxID sets value of MigratedFromMaxID conditional field.

func (*ChannelFull) SetOnlineCount

func (c *ChannelFull) SetOnlineCount(value int)

SetOnlineCount sets value of OnlineCount conditional field.

func (*ChannelFull) SetParticipantsCount

func (c *ChannelFull) SetParticipantsCount(value int)

SetParticipantsCount sets value of ParticipantsCount conditional field.

func (*ChannelFull) SetPinnedMsgID

func (c *ChannelFull) SetPinnedMsgID(value int)

SetPinnedMsgID sets value of PinnedMsgID conditional field.

func (*ChannelFull) SetSlowmodeNextSendDate

func (c *ChannelFull) SetSlowmodeNextSendDate(value int)

SetSlowmodeNextSendDate sets value of SlowmodeNextSendDate conditional field.

func (*ChannelFull) SetSlowmodeSeconds

func (c *ChannelFull) SetSlowmodeSeconds(value int)

SetSlowmodeSeconds sets value of SlowmodeSeconds conditional field.

func (*ChannelFull) SetStatsDC

func (c *ChannelFull) SetStatsDC(value int)

SetStatsDC sets value of StatsDC conditional field.

func (*ChannelFull) SetStickerset

func (c *ChannelFull) SetStickerset(value StickerSet)

SetStickerset sets value of Stickerset conditional field.

func (*ChannelFull) String added in v0.12.0

func (c *ChannelFull) String() string

String implements fmt.Stringer.

type ChannelHandler added in v0.9.0

type ChannelHandler func(ctx UpdateContext, update *UpdateChannel) error

ChannelHandler is a Channel event handler.

type ChannelLocation

type ChannelLocation struct {
	// Geographical location of supergrup
	GeoPoint GeoPointClass
	// Textual description of the address
	Address string
}

ChannelLocation represents TL type `channelLocation#209b82db`. Geographical location of supergroup (geogroups)

See https://core.telegram.org/constructor/channelLocation for reference.

func (*ChannelLocation) Decode

func (c *ChannelLocation) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelLocation) Encode

func (c *ChannelLocation) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelLocation) String added in v0.12.0

func (c *ChannelLocation) String() string

String implements fmt.Stringer.

type ChannelLocationBox

type ChannelLocationBox struct {
	ChannelLocation ChannelLocationClass
}

ChannelLocation boxes the ChannelLocationClass providing a helper.

func (*ChannelLocationBox) Decode

func (b *ChannelLocationBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ChannelLocationBox.

func (*ChannelLocationBox) Encode

func (b *ChannelLocationBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ChannelLocationBox.

type ChannelLocationClass

type ChannelLocationClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChannelLocationClass represents ChannelLocation generic type.

See https://core.telegram.org/type/ChannelLocation for reference.

Example:

g, err := DecodeChannelLocation(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChannelLocationEmpty: // channelLocationEmpty#bfb5ad8b
case *ChannelLocation: // channelLocation#209b82db
default: panic(v)
}

func DecodeChannelLocation

func DecodeChannelLocation(buf *bin.Buffer) (ChannelLocationClass, error)

DecodeChannelLocation implements binary de-serialization for ChannelLocationClass.

type ChannelLocationEmpty

type ChannelLocationEmpty struct {
}

ChannelLocationEmpty represents TL type `channelLocationEmpty#bfb5ad8b`. No location (normal supergroup)

See https://core.telegram.org/constructor/channelLocationEmpty for reference.

func (*ChannelLocationEmpty) Decode

func (c *ChannelLocationEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelLocationEmpty) Encode

func (c *ChannelLocationEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelLocationEmpty) String added in v0.12.0

func (c *ChannelLocationEmpty) String() string

String implements fmt.Stringer.

type ChannelMessageForwardsHandler added in v0.9.0

type ChannelMessageForwardsHandler func(ctx UpdateContext, update *UpdateChannelMessageForwards) error

ChannelMessageForwardsHandler is a ChannelMessageForwards event handler.

type ChannelMessageViewsHandler added in v0.9.0

type ChannelMessageViewsHandler func(ctx UpdateContext, update *UpdateChannelMessageViews) error

ChannelMessageViewsHandler is a ChannelMessageViews event handler.

type ChannelMessagesFilter

type ChannelMessagesFilter struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to exclude new messages from the search
	ExcludeNewMessages bool
	// A range of messages to fetch
	Ranges []MessageRange
}

ChannelMessagesFilter represents TL type `channelMessagesFilter#cd77d957`. Filter for getting only certain types of channel messages

See https://core.telegram.org/constructor/channelMessagesFilter for reference.

func (*ChannelMessagesFilter) Decode

func (c *ChannelMessagesFilter) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelMessagesFilter) Encode

func (c *ChannelMessagesFilter) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelMessagesFilter) SetExcludeNewMessages

func (c *ChannelMessagesFilter) SetExcludeNewMessages(value bool)

SetExcludeNewMessages sets value of ExcludeNewMessages conditional field.

func (*ChannelMessagesFilter) String added in v0.12.0

func (c *ChannelMessagesFilter) String() string

String implements fmt.Stringer.

type ChannelMessagesFilterBox

type ChannelMessagesFilterBox struct {
	ChannelMessagesFilter ChannelMessagesFilterClass
}

ChannelMessagesFilter boxes the ChannelMessagesFilterClass providing a helper.

func (*ChannelMessagesFilterBox) Decode

func (b *ChannelMessagesFilterBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ChannelMessagesFilterBox.

func (*ChannelMessagesFilterBox) Encode

func (b *ChannelMessagesFilterBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ChannelMessagesFilterBox.

type ChannelMessagesFilterClass

type ChannelMessagesFilterClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChannelMessagesFilterClass represents ChannelMessagesFilter generic type.

See https://core.telegram.org/type/ChannelMessagesFilter for reference.

Example:

g, err := DecodeChannelMessagesFilter(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChannelMessagesFilterEmpty: // channelMessagesFilterEmpty#94d42ee7
case *ChannelMessagesFilter: // channelMessagesFilter#cd77d957
default: panic(v)
}

func DecodeChannelMessagesFilter

func DecodeChannelMessagesFilter(buf *bin.Buffer) (ChannelMessagesFilterClass, error)

DecodeChannelMessagesFilter implements binary de-serialization for ChannelMessagesFilterClass.

type ChannelMessagesFilterEmpty

type ChannelMessagesFilterEmpty struct {
}

ChannelMessagesFilterEmpty represents TL type `channelMessagesFilterEmpty#94d42ee7`. No filter

See https://core.telegram.org/constructor/channelMessagesFilterEmpty for reference.

func (*ChannelMessagesFilterEmpty) Decode

Decode implements bin.Decoder.

func (*ChannelMessagesFilterEmpty) Encode

Encode implements bin.Encoder.

func (*ChannelMessagesFilterEmpty) String added in v0.12.0

func (c *ChannelMessagesFilterEmpty) String() string

String implements fmt.Stringer.

type ChannelParticipant

type ChannelParticipant struct {
	// Pariticipant user ID
	UserID int
	// Date joined
	Date int
}

ChannelParticipant represents TL type `channelParticipant#15ebac1d`. Channel/supergroup participant

See https://core.telegram.org/constructor/channelParticipant for reference.

func (*ChannelParticipant) Decode

func (c *ChannelParticipant) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipant) Encode

func (c *ChannelParticipant) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipant) String added in v0.12.0

func (c *ChannelParticipant) String() string

String implements fmt.Stringer.

type ChannelParticipantAdmin

type ChannelParticipantAdmin struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Can this admin promote other admins with the same permissions?
	CanEdit bool
	// Is this the current user
	Self bool
	// Admin user ID
	UserID int
	// User that invited the admin to the channel/group
	//
	// Use SetInviterID and GetInviterID helpers.
	InviterID int
	// User that promoted the user to admin
	PromotedBy int
	// When did the user join
	Date int
	// Admin rights¹
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	AdminRights ChatAdminRights
	// The role (rank) of the admin in the group: just an arbitrary string, admin by default
	//
	// Use SetRank and GetRank helpers.
	Rank string
}

ChannelParticipantAdmin represents TL type `channelParticipantAdmin#ccbebbaf`. Admin

See https://core.telegram.org/constructor/channelParticipantAdmin for reference.

func (*ChannelParticipantAdmin) Decode

func (c *ChannelParticipantAdmin) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantAdmin) Encode

func (c *ChannelParticipantAdmin) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantAdmin) GetInviterID

func (c *ChannelParticipantAdmin) GetInviterID() (value int, ok bool)

GetInviterID returns value of InviterID conditional field and boolean which is true if field was set.

func (*ChannelParticipantAdmin) GetRank

func (c *ChannelParticipantAdmin) GetRank() (value string, ok bool)

GetRank returns value of Rank conditional field and boolean which is true if field was set.

func (*ChannelParticipantAdmin) SetCanEdit

func (c *ChannelParticipantAdmin) SetCanEdit(value bool)

SetCanEdit sets value of CanEdit conditional field.

func (*ChannelParticipantAdmin) SetInviterID

func (c *ChannelParticipantAdmin) SetInviterID(value int)

SetInviterID sets value of InviterID conditional field.

func (*ChannelParticipantAdmin) SetRank

func (c *ChannelParticipantAdmin) SetRank(value string)

SetRank sets value of Rank conditional field.

func (*ChannelParticipantAdmin) SetSelf

func (c *ChannelParticipantAdmin) SetSelf(value bool)

SetSelf sets value of Self conditional field.

func (*ChannelParticipantAdmin) String added in v0.12.0

func (c *ChannelParticipantAdmin) String() string

String implements fmt.Stringer.

type ChannelParticipantBanned

type ChannelParticipantBanned struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the user has left the group
	Left bool
	// User ID
	UserID int
	// User was kicked by the specified admin
	KickedBy int
	// When did the user join the group
	Date int
	// Banned rights¹
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	BannedRights ChatBannedRights
}

ChannelParticipantBanned represents TL type `channelParticipantBanned#1c0facaf`. Banned/kicked user

See https://core.telegram.org/constructor/channelParticipantBanned for reference.

func (*ChannelParticipantBanned) Decode

func (c *ChannelParticipantBanned) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantBanned) Encode

func (c *ChannelParticipantBanned) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantBanned) SetLeft

func (c *ChannelParticipantBanned) SetLeft(value bool)

SetLeft sets value of Left conditional field.

func (*ChannelParticipantBanned) String added in v0.12.0

func (c *ChannelParticipantBanned) String() string

String implements fmt.Stringer.

type ChannelParticipantBox

type ChannelParticipantBox struct {
	ChannelParticipant ChannelParticipantClass
}

ChannelParticipant boxes the ChannelParticipantClass providing a helper.

func (*ChannelParticipantBox) Decode

func (b *ChannelParticipantBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ChannelParticipantBox.

func (*ChannelParticipantBox) Encode

func (b *ChannelParticipantBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ChannelParticipantBox.

type ChannelParticipantClass

type ChannelParticipantClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChannelParticipantClass represents ChannelParticipant generic type.

See https://core.telegram.org/type/ChannelParticipant for reference.

Example:

g, err := DecodeChannelParticipant(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChannelParticipant: // channelParticipant#15ebac1d
case *ChannelParticipantSelf: // channelParticipantSelf#a3289a6d
case *ChannelParticipantCreator: // channelParticipantCreator#447dca4b
case *ChannelParticipantAdmin: // channelParticipantAdmin#ccbebbaf
case *ChannelParticipantBanned: // channelParticipantBanned#1c0facaf
case *ChannelParticipantLeft: // channelParticipantLeft#c3c6796b
default: panic(v)
}

func DecodeChannelParticipant

func DecodeChannelParticipant(buf *bin.Buffer) (ChannelParticipantClass, error)

DecodeChannelParticipant implements binary de-serialization for ChannelParticipantClass.

type ChannelParticipantCreator

type ChannelParticipantCreator struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// User ID
	UserID int
	// Creator admin rights
	AdminRights ChatAdminRights
	// The role (rank) of the group creator in the group: just an arbitrary string, admin by default
	//
	// Use SetRank and GetRank helpers.
	Rank string
}

ChannelParticipantCreator represents TL type `channelParticipantCreator#447dca4b`. Channel/supergroup creator

See https://core.telegram.org/constructor/channelParticipantCreator for reference.

func (*ChannelParticipantCreator) Decode

func (c *ChannelParticipantCreator) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantCreator) Encode

func (c *ChannelParticipantCreator) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantCreator) GetRank

func (c *ChannelParticipantCreator) GetRank() (value string, ok bool)

GetRank returns value of Rank conditional field and boolean which is true if field was set.

func (*ChannelParticipantCreator) SetRank

func (c *ChannelParticipantCreator) SetRank(value string)

SetRank sets value of Rank conditional field.

func (*ChannelParticipantCreator) String added in v0.12.0

func (c *ChannelParticipantCreator) String() string

String implements fmt.Stringer.

type ChannelParticipantHandler added in v0.9.0

type ChannelParticipantHandler func(ctx UpdateContext, update *UpdateChannelParticipant) error

ChannelParticipantHandler is a ChannelParticipant event handler.

type ChannelParticipantLeft

type ChannelParticipantLeft struct {
	// User ID
	UserID int
}

ChannelParticipantLeft represents TL type `channelParticipantLeft#c3c6796b`. A participant that left the channel/supergroup

See https://core.telegram.org/constructor/channelParticipantLeft for reference.

func (*ChannelParticipantLeft) Decode

func (c *ChannelParticipantLeft) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantLeft) Encode

func (c *ChannelParticipantLeft) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantLeft) String added in v0.12.0

func (c *ChannelParticipantLeft) String() string

String implements fmt.Stringer.

type ChannelParticipantSelf

type ChannelParticipantSelf struct {
	// User ID
	UserID int
	// User that invited me to the channel/supergroup
	InviterID int
	// When did I join the channel/supergroup
	Date int
}

ChannelParticipantSelf represents TL type `channelParticipantSelf#a3289a6d`. Myself

See https://core.telegram.org/constructor/channelParticipantSelf for reference.

func (*ChannelParticipantSelf) Decode

func (c *ChannelParticipantSelf) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantSelf) Encode

func (c *ChannelParticipantSelf) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantSelf) String added in v0.12.0

func (c *ChannelParticipantSelf) String() string

String implements fmt.Stringer.

type ChannelParticipantsAdmins

type ChannelParticipantsAdmins struct {
}

ChannelParticipantsAdmins represents TL type `channelParticipantsAdmins#b4608969`. Fetch only admin participants

See https://core.telegram.org/constructor/channelParticipantsAdmins for reference.

func (*ChannelParticipantsAdmins) Decode

func (c *ChannelParticipantsAdmins) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantsAdmins) Encode

func (c *ChannelParticipantsAdmins) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantsAdmins) String added in v0.12.0

func (c *ChannelParticipantsAdmins) String() string

String implements fmt.Stringer.

type ChannelParticipantsBanned

type ChannelParticipantsBanned struct {
	// Optional filter for searching banned participants by name (otherwise empty)
	Q string
}

ChannelParticipantsBanned represents TL type `channelParticipantsBanned#1427a5e1`. Fetch only banned participants

See https://core.telegram.org/constructor/channelParticipantsBanned for reference.

func (*ChannelParticipantsBanned) Decode

func (c *ChannelParticipantsBanned) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantsBanned) Encode

func (c *ChannelParticipantsBanned) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantsBanned) String added in v0.12.0

func (c *ChannelParticipantsBanned) String() string

String implements fmt.Stringer.

type ChannelParticipantsBots

type ChannelParticipantsBots struct {
}

ChannelParticipantsBots represents TL type `channelParticipantsBots#b0d1865b`. Fetch only bot participants

See https://core.telegram.org/constructor/channelParticipantsBots for reference.

func (*ChannelParticipantsBots) Decode

func (c *ChannelParticipantsBots) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantsBots) Encode

func (c *ChannelParticipantsBots) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantsBots) String added in v0.12.0

func (c *ChannelParticipantsBots) String() string

String implements fmt.Stringer.

type ChannelParticipantsContacts

type ChannelParticipantsContacts struct {
	// Optional search query for searching contact participants by name
	Q string
}

ChannelParticipantsContacts represents TL type `channelParticipantsContacts#bb6ae88d`. Fetch only participants that are also contacts

See https://core.telegram.org/constructor/channelParticipantsContacts for reference.

func (*ChannelParticipantsContacts) Decode

Decode implements bin.Decoder.

func (*ChannelParticipantsContacts) Encode

Encode implements bin.Encoder.

func (*ChannelParticipantsContacts) String added in v0.12.0

func (c *ChannelParticipantsContacts) String() string

String implements fmt.Stringer.

type ChannelParticipantsFilterBox

type ChannelParticipantsFilterBox struct {
	ChannelParticipantsFilter ChannelParticipantsFilterClass
}

ChannelParticipantsFilter boxes the ChannelParticipantsFilterClass providing a helper.

func (*ChannelParticipantsFilterBox) Decode

func (b *ChannelParticipantsFilterBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ChannelParticipantsFilterBox.

func (*ChannelParticipantsFilterBox) Encode

func (b *ChannelParticipantsFilterBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ChannelParticipantsFilterBox.

type ChannelParticipantsFilterClass

type ChannelParticipantsFilterClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChannelParticipantsFilterClass represents ChannelParticipantsFilter generic type.

See https://core.telegram.org/type/ChannelParticipantsFilter for reference.

Example:

g, err := DecodeChannelParticipantsFilter(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChannelParticipantsRecent: // channelParticipantsRecent#de3f3c79
case *ChannelParticipantsAdmins: // channelParticipantsAdmins#b4608969
case *ChannelParticipantsKicked: // channelParticipantsKicked#a3b54985
case *ChannelParticipantsBots: // channelParticipantsBots#b0d1865b
case *ChannelParticipantsBanned: // channelParticipantsBanned#1427a5e1
case *ChannelParticipantsSearch: // channelParticipantsSearch#656ac4b
case *ChannelParticipantsContacts: // channelParticipantsContacts#bb6ae88d
case *ChannelParticipantsMentions: // channelParticipantsMentions#e04b5ceb
default: panic(v)
}

func DecodeChannelParticipantsFilter

func DecodeChannelParticipantsFilter(buf *bin.Buffer) (ChannelParticipantsFilterClass, error)

DecodeChannelParticipantsFilter implements binary de-serialization for ChannelParticipantsFilterClass.

type ChannelParticipantsKicked

type ChannelParticipantsKicked struct {
	// Optional filter for searching kicked participants by name (otherwise empty)
	Q string
}

ChannelParticipantsKicked represents TL type `channelParticipantsKicked#a3b54985`. Fetch only kicked participants

See https://core.telegram.org/constructor/channelParticipantsKicked for reference.

func (*ChannelParticipantsKicked) Decode

func (c *ChannelParticipantsKicked) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantsKicked) Encode

func (c *ChannelParticipantsKicked) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantsKicked) String added in v0.12.0

func (c *ChannelParticipantsKicked) String() string

String implements fmt.Stringer.

type ChannelParticipantsMentions

type ChannelParticipantsMentions struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Filter by user name or username
	//
	// Use SetQ and GetQ helpers.
	Q string
	// Look only for users that posted in this thread¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetTopMsgID and GetTopMsgID helpers.
	TopMsgID int
}

ChannelParticipantsMentions represents TL type `channelParticipantsMentions#e04b5ceb`. This filter is used when looking for supergroup members to mention. This filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific thread¹ through the comment section² of a channel.

Links:

  1. https://core.telegram.org/api/threads
  2. https://core.telegram.org/api/threads#channel-comments

See https://core.telegram.org/constructor/channelParticipantsMentions for reference.

func (*ChannelParticipantsMentions) Decode

Decode implements bin.Decoder.

func (*ChannelParticipantsMentions) Encode

Encode implements bin.Encoder.

func (*ChannelParticipantsMentions) GetQ

func (c *ChannelParticipantsMentions) GetQ() (value string, ok bool)

GetQ returns value of Q conditional field and boolean which is true if field was set.

func (*ChannelParticipantsMentions) GetTopMsgID

func (c *ChannelParticipantsMentions) GetTopMsgID() (value int, ok bool)

GetTopMsgID returns value of TopMsgID conditional field and boolean which is true if field was set.

func (*ChannelParticipantsMentions) SetQ

func (c *ChannelParticipantsMentions) SetQ(value string)

SetQ sets value of Q conditional field.

func (*ChannelParticipantsMentions) SetTopMsgID

func (c *ChannelParticipantsMentions) SetTopMsgID(value int)

SetTopMsgID sets value of TopMsgID conditional field.

func (*ChannelParticipantsMentions) String added in v0.12.0

func (c *ChannelParticipantsMentions) String() string

String implements fmt.Stringer.

type ChannelParticipantsRecent

type ChannelParticipantsRecent struct {
}

ChannelParticipantsRecent represents TL type `channelParticipantsRecent#de3f3c79`. Fetch only recent participants

See https://core.telegram.org/constructor/channelParticipantsRecent for reference.

func (*ChannelParticipantsRecent) Decode

func (c *ChannelParticipantsRecent) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantsRecent) Encode

func (c *ChannelParticipantsRecent) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantsRecent) String added in v0.12.0

func (c *ChannelParticipantsRecent) String() string

String implements fmt.Stringer.

type ChannelParticipantsSearch

type ChannelParticipantsSearch struct {
	// Search query
	Q string
}

ChannelParticipantsSearch represents TL type `channelParticipantsSearch#656ac4b`. Query participants by name

See https://core.telegram.org/constructor/channelParticipantsSearch for reference.

func (*ChannelParticipantsSearch) Decode

func (c *ChannelParticipantsSearch) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelParticipantsSearch) Encode

func (c *ChannelParticipantsSearch) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelParticipantsSearch) String added in v0.12.0

func (c *ChannelParticipantsSearch) String() string

String implements fmt.Stringer.

type ChannelReadMessagesContentsHandler added in v0.9.0

type ChannelReadMessagesContentsHandler func(ctx UpdateContext, update *UpdateChannelReadMessagesContents) error

ChannelReadMessagesContentsHandler is a ChannelReadMessagesContents event handler.

type ChannelTooLongHandler added in v0.9.0

type ChannelTooLongHandler func(ctx UpdateContext, update *UpdateChannelTooLong) error

ChannelTooLongHandler is a ChannelTooLong event handler.

type ChannelUserTypingHandler added in v0.9.0

type ChannelUserTypingHandler func(ctx UpdateContext, update *UpdateChannelUserTyping) error

ChannelUserTypingHandler is a ChannelUserTyping event handler.

type ChannelWebPageHandler added in v0.9.0

type ChannelWebPageHandler func(ctx UpdateContext, update *UpdateChannelWebPage) error

ChannelWebPageHandler is a ChannelWebPage event handler.

type ChannelsAdminLogResults

type ChannelsAdminLogResults struct {
	// Admin log events
	Events []ChannelAdminLogEvent
	// Chats mentioned in events
	Chats []ChatClass
	// Users mentioned in events
	Users []UserClass
}

ChannelsAdminLogResults represents TL type `channels.adminLogResults#ed8af74d`. Admin log events

See https://core.telegram.org/constructor/channels.adminLogResults for reference.

func (*ChannelsAdminLogResults) Decode

func (a *ChannelsAdminLogResults) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelsAdminLogResults) Encode

func (a *ChannelsAdminLogResults) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelsAdminLogResults) String added in v0.12.0

func (a *ChannelsAdminLogResults) String() string

String implements fmt.Stringer.

type ChannelsChannelParticipant

type ChannelsChannelParticipant struct {
	// The channel participant
	Participant ChannelParticipantClass
	// Users
	Users []UserClass
}

ChannelsChannelParticipant represents TL type `channels.channelParticipant#d0d9b163`. Represents a channel participant

See https://core.telegram.org/constructor/channels.channelParticipant for reference.

func (*ChannelsChannelParticipant) Decode

Decode implements bin.Decoder.

func (*ChannelsChannelParticipant) Encode

Encode implements bin.Encoder.

func (*ChannelsChannelParticipant) String added in v0.12.0

func (c *ChannelsChannelParticipant) String() string

String implements fmt.Stringer.

type ChannelsChannelParticipants

type ChannelsChannelParticipants struct {
	// Total number of participants that correspond to the given query
	Count int
	// Participants
	Participants []ChannelParticipantClass
	// Users mentioned in participant info
	Users []UserClass
}

ChannelsChannelParticipants represents TL type `channels.channelParticipants#f56ee2a8`. Represents multiple channel participants

See https://core.telegram.org/constructor/channels.channelParticipants for reference.

func (*ChannelsChannelParticipants) Decode

Decode implements bin.Decoder.

func (*ChannelsChannelParticipants) Encode

Encode implements bin.Encoder.

func (*ChannelsChannelParticipants) String added in v0.12.0

func (c *ChannelsChannelParticipants) String() string

String implements fmt.Stringer.

type ChannelsChannelParticipantsBox

type ChannelsChannelParticipantsBox struct {
	ChannelParticipants ChannelsChannelParticipantsClass
}

ChannelsChannelParticipants boxes the ChannelsChannelParticipantsClass providing a helper.

func (*ChannelsChannelParticipantsBox) Decode

Decode implements bin.Decoder for ChannelsChannelParticipantsBox.

func (*ChannelsChannelParticipantsBox) Encode

Encode implements bin.Encode for ChannelsChannelParticipantsBox.

type ChannelsChannelParticipantsClass

type ChannelsChannelParticipantsClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChannelsChannelParticipantsClass represents channels.ChannelParticipants generic type.

See https://core.telegram.org/type/channels.ChannelParticipants for reference.

Example:

g, err := DecodeChannelsChannelParticipants(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChannelsChannelParticipants: // channels.channelParticipants#f56ee2a8
case *ChannelsChannelParticipantsNotModified: // channels.channelParticipantsNotModified#f0173fe9
default: panic(v)
}

func DecodeChannelsChannelParticipants

func DecodeChannelsChannelParticipants(buf *bin.Buffer) (ChannelsChannelParticipantsClass, error)

DecodeChannelsChannelParticipants implements binary de-serialization for ChannelsChannelParticipantsClass.

type ChannelsChannelParticipantsNotModified

type ChannelsChannelParticipantsNotModified struct {
}

ChannelsChannelParticipantsNotModified represents TL type `channels.channelParticipantsNotModified#f0173fe9`. No new participant info could be found

See https://core.telegram.org/constructor/channels.channelParticipantsNotModified for reference.

func (*ChannelsChannelParticipantsNotModified) Decode

Decode implements bin.Decoder.

func (*ChannelsChannelParticipantsNotModified) Encode

Encode implements bin.Encoder.

func (*ChannelsChannelParticipantsNotModified) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsCheckUsernameRequest

type ChannelsCheckUsernameRequest struct {
	// The channel/supergroup¹ that will assigned the specified username
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
	// The username to check
	Username string
}

ChannelsCheckUsernameRequest represents TL type `channels.checkUsername#10e6bd2c`. Check if a username is free and can be assigned to a channel/supergroup

See https://core.telegram.org/method/channels.checkUsername for reference.

func (*ChannelsCheckUsernameRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsCheckUsernameRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsCheckUsernameRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsCreateChannelRequest

type ChannelsCreateChannelRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to create a channel¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Broadcast bool
	// Whether to create a supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Megagroup bool
	// Channel title
	Title string
	// Channel description
	About string
	// Geogroup location
	//
	// Use SetGeoPoint and GetGeoPoint helpers.
	GeoPoint InputGeoPointClass
	// Geogroup address
	//
	// Use SetAddress and GetAddress helpers.
	Address string
}

ChannelsCreateChannelRequest represents TL type `channels.createChannel#3d5fb10f`. Create a supergroup/channel¹.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.createChannel for reference.

func (*ChannelsCreateChannelRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsCreateChannelRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsCreateChannelRequest) GetAddress

func (c *ChannelsCreateChannelRequest) GetAddress() (value string, ok bool)

GetAddress returns value of Address conditional field and boolean which is true if field was set.

func (*ChannelsCreateChannelRequest) GetGeoPoint

func (c *ChannelsCreateChannelRequest) GetGeoPoint() (value InputGeoPointClass, ok bool)

GetGeoPoint returns value of GeoPoint conditional field and boolean which is true if field was set.

func (*ChannelsCreateChannelRequest) SetAddress

func (c *ChannelsCreateChannelRequest) SetAddress(value string)

SetAddress sets value of Address conditional field.

func (*ChannelsCreateChannelRequest) SetBroadcast

func (c *ChannelsCreateChannelRequest) SetBroadcast(value bool)

SetBroadcast sets value of Broadcast conditional field.

func (*ChannelsCreateChannelRequest) SetGeoPoint

func (c *ChannelsCreateChannelRequest) SetGeoPoint(value InputGeoPointClass)

SetGeoPoint sets value of GeoPoint conditional field.

func (*ChannelsCreateChannelRequest) SetMegagroup

func (c *ChannelsCreateChannelRequest) SetMegagroup(value bool)

SetMegagroup sets value of Megagroup conditional field.

func (*ChannelsCreateChannelRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsDeleteChannelRequest

type ChannelsDeleteChannelRequest struct {
	// Channel/supergroup¹ to delete
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
}

ChannelsDeleteChannelRequest represents TL type `channels.deleteChannel#c0111fe3`. Delete a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.deleteChannel for reference.

func (*ChannelsDeleteChannelRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsDeleteChannelRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsDeleteChannelRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsDeleteHistoryRequest

type ChannelsDeleteHistoryRequest struct {
	// Supergroup¹ whose history must be deleted
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
	// ID of message up to which the history must be deleted
	MaxID int
}

ChannelsDeleteHistoryRequest represents TL type `channels.deleteHistory#af369d42`. Delete the history of a supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.deleteHistory for reference.

func (*ChannelsDeleteHistoryRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsDeleteHistoryRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsDeleteHistoryRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsDeleteMessagesRequest

type ChannelsDeleteMessagesRequest struct {
	// Channel/supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
	// IDs of messages to delete
	ID []int
}

ChannelsDeleteMessagesRequest represents TL type `channels.deleteMessages#84c1fd4e`. Delete messages in a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.deleteMessages for reference.

func (*ChannelsDeleteMessagesRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsDeleteMessagesRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsDeleteMessagesRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsDeleteUserHistoryRequest

type ChannelsDeleteUserHistoryRequest struct {
	// Supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
	// User whose messages should be deleted
	UserID InputUserClass
}

ChannelsDeleteUserHistoryRequest represents TL type `channels.deleteUserHistory#d10dd71b`. Delete all messages sent by a certain user in a supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.deleteUserHistory for reference.

func (*ChannelsDeleteUserHistoryRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsDeleteUserHistoryRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsDeleteUserHistoryRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsEditAdminRequest

type ChannelsEditAdminRequest struct {
	// The supergroup/channel¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
	// The ID of the user whose admin rights should be modified
	UserID InputUserClass
	// The admin rights
	AdminRights ChatAdminRights
	// Indicates the role (rank) of the admin in the group: just an arbitrary string
	Rank string
}

ChannelsEditAdminRequest represents TL type `channels.editAdmin#d33c8902`. Modify the admin rights of a user in a supergroup/channel¹.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.editAdmin for reference.

func (*ChannelsEditAdminRequest) Decode

func (e *ChannelsEditAdminRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelsEditAdminRequest) Encode

func (e *ChannelsEditAdminRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelsEditAdminRequest) String added in v0.12.0

func (e *ChannelsEditAdminRequest) String() string

String implements fmt.Stringer.

type ChannelsEditBannedRequest

type ChannelsEditBannedRequest struct {
	// The supergroup/channel¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
	// The ID of the user whose banned rights should be modified
	UserID InputUserClass
	// The banned rights
	BannedRights ChatBannedRights
}

ChannelsEditBannedRequest represents TL type `channels.editBanned#72796912`. Ban/unban/kick a user in a supergroup/channel¹.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.editBanned for reference.

func (*ChannelsEditBannedRequest) Decode

func (e *ChannelsEditBannedRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelsEditBannedRequest) Encode

func (e *ChannelsEditBannedRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelsEditBannedRequest) String added in v0.12.0

func (e *ChannelsEditBannedRequest) String() string

String implements fmt.Stringer.

type ChannelsEditCreatorRequest

type ChannelsEditCreatorRequest struct {
	// Channel
	Channel InputChannelClass
	// New channel owner
	UserID InputUserClass
	// 2FA password¹ of account
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	Password InputCheckPasswordSRPClass
}

ChannelsEditCreatorRequest represents TL type `channels.editCreator#8f38cd1f`. Transfer channel ownership

See https://core.telegram.org/method/channels.editCreator for reference.

func (*ChannelsEditCreatorRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsEditCreatorRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsEditCreatorRequest) String added in v0.12.0

func (e *ChannelsEditCreatorRequest) String() string

String implements fmt.Stringer.

type ChannelsEditLocationRequest

type ChannelsEditLocationRequest struct {
	// Geogroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
	// New geolocation
	GeoPoint InputGeoPointClass
	// Address string
	Address string
}

ChannelsEditLocationRequest represents TL type `channels.editLocation#58e63f6d`. Edit location of geogroup

See https://core.telegram.org/method/channels.editLocation for reference.

func (*ChannelsEditLocationRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsEditLocationRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsEditLocationRequest) String added in v0.12.0

func (e *ChannelsEditLocationRequest) String() string

String implements fmt.Stringer.

type ChannelsEditPhotoRequest

type ChannelsEditPhotoRequest struct {
	// Channel/supergroup whose photo should be edited
	Channel InputChannelClass
	// New photo
	Photo InputChatPhotoClass
}

ChannelsEditPhotoRequest represents TL type `channels.editPhoto#f12e57c9`. Change the photo of a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.editPhoto for reference.

func (*ChannelsEditPhotoRequest) Decode

func (e *ChannelsEditPhotoRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelsEditPhotoRequest) Encode

func (e *ChannelsEditPhotoRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelsEditPhotoRequest) String added in v0.12.0

func (e *ChannelsEditPhotoRequest) String() string

String implements fmt.Stringer.

type ChannelsEditTitleRequest

type ChannelsEditTitleRequest struct {
	// Channel/supergroup
	Channel InputChannelClass
	// New name
	Title string
}

ChannelsEditTitleRequest represents TL type `channels.editTitle#566decd0`. Edit the name of a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.editTitle for reference.

func (*ChannelsEditTitleRequest) Decode

func (e *ChannelsEditTitleRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelsEditTitleRequest) Encode

func (e *ChannelsEditTitleRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelsEditTitleRequest) String added in v0.12.0

func (e *ChannelsEditTitleRequest) String() string

String implements fmt.Stringer.

type ChannelsExportMessageLinkRequest

type ChannelsExportMessageLinkRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to include other grouped media (for albums)
	Grouped bool
	// Whether to also include a thread ID, if available, inside of the link
	Thread bool
	// Channel
	Channel InputChannelClass
	// Message ID
	ID int
}

ChannelsExportMessageLinkRequest represents TL type `channels.exportMessageLink#e63fadeb`. Get link and embed info of a message in a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.exportMessageLink for reference.

func (*ChannelsExportMessageLinkRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsExportMessageLinkRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsExportMessageLinkRequest) SetGrouped

func (e *ChannelsExportMessageLinkRequest) SetGrouped(value bool)

SetGrouped sets value of Grouped conditional field.

func (*ChannelsExportMessageLinkRequest) SetThread

func (e *ChannelsExportMessageLinkRequest) SetThread(value bool)

SetThread sets value of Thread conditional field.

func (*ChannelsExportMessageLinkRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsGetAdminLogRequest

type ChannelsGetAdminLogRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Channel
	Channel InputChannelClass
	// Search query, can be empty
	Q string
	// Event filter
	//
	// Use SetEventsFilter and GetEventsFilter helpers.
	EventsFilter ChannelAdminLogEventsFilter
	// Only show events from these admins
	//
	// Use SetAdmins and GetAdmins helpers.
	Admins []InputUserClass
	// Maximum ID of message to return (see pagination¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	MaxID int64
	// Minimum ID of message to return (see pagination¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	MinID int64
	// Maximum number of results to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
}

ChannelsGetAdminLogRequest represents TL type `channels.getAdminLog#33ddf480`. Get the admin log of a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.getAdminLog for reference.

func (*ChannelsGetAdminLogRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsGetAdminLogRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsGetAdminLogRequest) GetAdmins

func (g *ChannelsGetAdminLogRequest) GetAdmins() (value []InputUserClass, ok bool)

GetAdmins returns value of Admins conditional field and boolean which is true if field was set.

func (*ChannelsGetAdminLogRequest) GetEventsFilter

func (g *ChannelsGetAdminLogRequest) GetEventsFilter() (value ChannelAdminLogEventsFilter, ok bool)

GetEventsFilter returns value of EventsFilter conditional field and boolean which is true if field was set.

func (*ChannelsGetAdminLogRequest) SetAdmins

func (g *ChannelsGetAdminLogRequest) SetAdmins(value []InputUserClass)

SetAdmins sets value of Admins conditional field.

func (*ChannelsGetAdminLogRequest) SetEventsFilter

func (g *ChannelsGetAdminLogRequest) SetEventsFilter(value ChannelAdminLogEventsFilter)

SetEventsFilter sets value of EventsFilter conditional field.

func (*ChannelsGetAdminLogRequest) String added in v0.12.0

func (g *ChannelsGetAdminLogRequest) String() string

String implements fmt.Stringer.

type ChannelsGetAdminedPublicChannelsRequest

type ChannelsGetAdminedPublicChannelsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Get geogroups
	ByLocation bool
	// If set and the user has reached the limit of owned public channels/supergroups/geogroups¹, instead of returning the channel list one of the specified errors² will be returned.Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in channels.checkUsername³/channels.updateUsername⁴.
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	//  2) https://core.telegram.org#possible-errors
	//  3) https://core.telegram.org/method/channels.checkUsername
	//  4) https://core.telegram.org/method/channels.updateUsername
	CheckLimit bool
}

ChannelsGetAdminedPublicChannelsRequest represents TL type `channels.getAdminedPublicChannels#f8b036af`. Get channels/supergroups/geogroups¹ we're admin in. Usually called when the user exceeds the limit² for owned public channels/supergroups/geogroups³, and the user is given the choice to remove one of his channels/supergroups/geogroups.

Links:

  1. https://core.telegram.org/api/channel
  2. https://core.telegram.org/constructor/config
  3. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.getAdminedPublicChannels for reference.

func (*ChannelsGetAdminedPublicChannelsRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsGetAdminedPublicChannelsRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsGetAdminedPublicChannelsRequest) SetByLocation

func (g *ChannelsGetAdminedPublicChannelsRequest) SetByLocation(value bool)

SetByLocation sets value of ByLocation conditional field.

func (*ChannelsGetAdminedPublicChannelsRequest) SetCheckLimit

func (g *ChannelsGetAdminedPublicChannelsRequest) SetCheckLimit(value bool)

SetCheckLimit sets value of CheckLimit conditional field.

func (*ChannelsGetAdminedPublicChannelsRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsGetChannelsRequest

type ChannelsGetChannelsRequest struct {
	// IDs of channels/supergroups to get info about
	ID []InputChannelClass
}

ChannelsGetChannelsRequest represents TL type `channels.getChannels#a7f6bbb`. Get info about channels/supergroups¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.getChannels for reference.

func (*ChannelsGetChannelsRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsGetChannelsRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsGetChannelsRequest) String added in v0.12.0

func (g *ChannelsGetChannelsRequest) String() string

String implements fmt.Stringer.

type ChannelsGetFullChannelRequest

type ChannelsGetFullChannelRequest struct {
	// The channel to get info about
	Channel InputChannelClass
}

ChannelsGetFullChannelRequest represents TL type `channels.getFullChannel#8736a09`. Get full info about a channel

See https://core.telegram.org/method/channels.getFullChannel for reference.

func (*ChannelsGetFullChannelRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsGetFullChannelRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsGetFullChannelRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsGetGroupsForDiscussionRequest

type ChannelsGetGroupsForDiscussionRequest struct {
}

ChannelsGetGroupsForDiscussionRequest represents TL type `channels.getGroupsForDiscussion#f5dad378`. Get all groups that can be used as discussion groups¹. Returned legacy 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 channels.togglePreHistoryHidden³, first.

Links:

  1. https://core.telegram.org/api/discussion
  2. https://core.telegram.org/api/channel
  3. https://core.telegram.org/api/channel
  4. https://core.telegram.org/method/channels.togglePreHistoryHidden

See https://core.telegram.org/method/channels.getGroupsForDiscussion for reference.

func (*ChannelsGetGroupsForDiscussionRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsGetGroupsForDiscussionRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsGetGroupsForDiscussionRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsGetInactiveChannelsRequest

type ChannelsGetInactiveChannelsRequest struct {
}

ChannelsGetInactiveChannelsRequest represents TL type `channels.getInactiveChannels#11e831ee`. Get inactive channels and supergroups

See https://core.telegram.org/method/channels.getInactiveChannels for reference.

func (*ChannelsGetInactiveChannelsRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsGetInactiveChannelsRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsGetInactiveChannelsRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsGetLeftChannelsRequest

type ChannelsGetLeftChannelsRequest struct {
	// Offset for pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Offset int
}

ChannelsGetLeftChannelsRequest represents TL type `channels.getLeftChannels#8341ecc0`. Get a list of channels/supergroups¹ we left

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.getLeftChannels for reference.

func (*ChannelsGetLeftChannelsRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsGetLeftChannelsRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsGetLeftChannelsRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsGetMessagesRequest

type ChannelsGetMessagesRequest struct {
	// Channel/supergroup
	Channel InputChannelClass
	// IDs of messages to get
	ID []InputMessageClass
}

ChannelsGetMessagesRequest represents TL type `channels.getMessages#ad8c9a23`. Get channel/supergroup¹ messages

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.getMessages for reference.

func (*ChannelsGetMessagesRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsGetMessagesRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsGetMessagesRequest) String added in v0.12.0

func (g *ChannelsGetMessagesRequest) String() string

String implements fmt.Stringer.

type ChannelsGetParticipantRequest

type ChannelsGetParticipantRequest struct {
	// Channel/supergroup
	Channel InputChannelClass
	// ID of participant to get info about
	UserID InputUserClass
}

ChannelsGetParticipantRequest represents TL type `channels.getParticipant#546dd7a6`. Get info about a channel/supergroup¹ participant

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.getParticipant for reference.

func (*ChannelsGetParticipantRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsGetParticipantRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsGetParticipantRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsGetParticipantsRequest

type ChannelsGetParticipantsRequest struct {
	// Channel
	Channel InputChannelClass
	// Which participant types to fetch
	Filter ChannelParticipantsFilterClass
	// Offset¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Offset int
	// Limit¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
	// Hash¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Hash int
}

ChannelsGetParticipantsRequest represents TL type `channels.getParticipants#123e05e9`. Get the participants of a supergroup/channel¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.getParticipants for reference.

func (*ChannelsGetParticipantsRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsGetParticipantsRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsGetParticipantsRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsInviteToChannelRequest

type ChannelsInviteToChannelRequest struct {
	// Channel/supergroup
	Channel InputChannelClass
	// Users to invite
	Users []InputUserClass
}

ChannelsInviteToChannelRequest represents TL type `channels.inviteToChannel#199f3a6c`. Invite users to a channel/supergroup

See https://core.telegram.org/method/channels.inviteToChannel for reference.

func (*ChannelsInviteToChannelRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsInviteToChannelRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsInviteToChannelRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsJoinChannelRequest

type ChannelsJoinChannelRequest struct {
	// Channel/supergroup to join
	Channel InputChannelClass
}

ChannelsJoinChannelRequest represents TL type `channels.joinChannel#24b524c5`. Join a channel/supergroup

See https://core.telegram.org/method/channels.joinChannel for reference.

func (*ChannelsJoinChannelRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsJoinChannelRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsJoinChannelRequest) String added in v0.12.0

func (j *ChannelsJoinChannelRequest) String() string

String implements fmt.Stringer.

type ChannelsLeaveChannelRequest

type ChannelsLeaveChannelRequest struct {
	// Channel/supergroup¹ to leave
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
}

ChannelsLeaveChannelRequest represents TL type `channels.leaveChannel#f836aa95`. Leave a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.leaveChannel for reference.

func (*ChannelsLeaveChannelRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsLeaveChannelRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsLeaveChannelRequest) String added in v0.12.0

func (l *ChannelsLeaveChannelRequest) String() string

String implements fmt.Stringer.

type ChannelsReadHistoryRequest

type ChannelsReadHistoryRequest struct {
	// Channel/supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
	// ID of message up to which messages should be marked as read
	MaxID int
}

ChannelsReadHistoryRequest represents TL type `channels.readHistory#cc104937`. Mark channel/supergroup¹ history as read

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.readHistory for reference.

func (*ChannelsReadHistoryRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsReadHistoryRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsReadHistoryRequest) String added in v0.12.0

func (r *ChannelsReadHistoryRequest) String() string

String implements fmt.Stringer.

type ChannelsReadMessageContentsRequest

type ChannelsReadMessageContentsRequest struct {
	// Channel/supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
	// IDs of messages whose contents should be marked as read
	ID []int
}

ChannelsReadMessageContentsRequest represents TL type `channels.readMessageContents#eab5dc38`. Mark channel/supergroup¹ message contents as read

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/channels.readMessageContents for reference.

func (*ChannelsReadMessageContentsRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsReadMessageContentsRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsReadMessageContentsRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsReportSpamRequest

type ChannelsReportSpamRequest struct {
	// Supergroup
	Channel InputChannelClass
	// ID of the user that sent the spam messages
	UserID InputUserClass
	// IDs of spam messages
	ID []int
}

ChannelsReportSpamRequest represents TL type `channels.reportSpam#fe087810`. Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup

See https://core.telegram.org/method/channels.reportSpam for reference.

func (*ChannelsReportSpamRequest) Decode

func (r *ChannelsReportSpamRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChannelsReportSpamRequest) Encode

func (r *ChannelsReportSpamRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChannelsReportSpamRequest) String added in v0.12.0

func (r *ChannelsReportSpamRequest) String() string

String implements fmt.Stringer.

type ChannelsSetDiscussionGroupRequest

type ChannelsSetDiscussionGroupRequest struct {
	// Channel
	Broadcast InputChannelClass
	// Discussion group¹ to associate to the channel
	//
	// Links:
	//  1) https://core.telegram.org/api/discussion
	Group InputChannelClass
}

ChannelsSetDiscussionGroupRequest represents TL type `channels.setDiscussionGroup#40582bb2`. Associate a group to a channel as discussion group¹ for that channel

Links:

  1. https://core.telegram.org/api/discussion

See https://core.telegram.org/method/channels.setDiscussionGroup for reference.

func (*ChannelsSetDiscussionGroupRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsSetDiscussionGroupRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsSetDiscussionGroupRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsSetStickersRequest

type ChannelsSetStickersRequest struct {
	// Supergroup
	Channel InputChannelClass
	// The stickerset to associate
	Stickerset InputStickerSetClass
}

ChannelsSetStickersRequest represents TL type `channels.setStickers#ea8ca4f9`. Associate a stickerset to the supergroup

See https://core.telegram.org/method/channels.setStickers for reference.

func (*ChannelsSetStickersRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsSetStickersRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsSetStickersRequest) String added in v0.12.0

func (s *ChannelsSetStickersRequest) String() string

String implements fmt.Stringer.

type ChannelsTogglePreHistoryHiddenRequest

type ChannelsTogglePreHistoryHiddenRequest struct {
	// Channel/supergroup
	Channel InputChannelClass
	// Hide/unhide
	Enabled bool
}

ChannelsTogglePreHistoryHiddenRequest represents TL type `channels.togglePreHistoryHidden#eabbb94c`. Hide/unhide message history for new channel/supergroup users

See https://core.telegram.org/method/channels.togglePreHistoryHidden for reference.

func (*ChannelsTogglePreHistoryHiddenRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsTogglePreHistoryHiddenRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsTogglePreHistoryHiddenRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsToggleSignaturesRequest

type ChannelsToggleSignaturesRequest struct {
	// Channel
	Channel InputChannelClass
	// Value
	Enabled bool
}

ChannelsToggleSignaturesRequest represents TL type `channels.toggleSignatures#1f69b606`. Enable/disable message signatures in channels

See https://core.telegram.org/method/channels.toggleSignatures for reference.

func (*ChannelsToggleSignaturesRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsToggleSignaturesRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsToggleSignaturesRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsToggleSlowModeRequest

type ChannelsToggleSlowModeRequest struct {
	// The supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
	// Users will only be able to send one message every seconds seconds, 0 to disable the limitation
	Seconds int
}

ChannelsToggleSlowModeRequest represents TL type `channels.toggleSlowMode#edd49ef0`. Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds

See https://core.telegram.org/method/channels.toggleSlowMode for reference.

func (*ChannelsToggleSlowModeRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsToggleSlowModeRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsToggleSlowModeRequest) String added in v0.12.0

String implements fmt.Stringer.

type ChannelsUpdateUsernameRequest

type ChannelsUpdateUsernameRequest struct {
	// Channel
	Channel InputChannelClass
	// New username
	Username string
}

ChannelsUpdateUsernameRequest represents TL type `channels.updateUsername#3514b3de`. Change the username of a supergroup/channel

See https://core.telegram.org/method/channels.updateUsername for reference.

func (*ChannelsUpdateUsernameRequest) Decode

Decode implements bin.Decoder.

func (*ChannelsUpdateUsernameRequest) Encode

Encode implements bin.Encoder.

func (*ChannelsUpdateUsernameRequest) String added in v0.12.0

String implements fmt.Stringer.

type Chat

type Chat struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the current user is the creator of the group
	Creator bool
	// Whether the current user was kicked from the group
	Kicked bool
	// Whether the current user has left the group
	Left bool
	// Whether the group was migrated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Deactivated bool
	// CallActive field of Chat.
	CallActive bool
	// CallNotEmpty field of Chat.
	CallNotEmpty bool
	// ID of the group
	ID int
	// Title
	Title string
	// Chat photo
	Photo ChatPhotoClass
	// Participant count
	ParticipantsCount int
	// Date of creation of the group
	Date int
	// Used in basic groups to reorder updates and make sure that all of them were received.
	Version int
	// Means this chat was upgraded¹ to a supergroup
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	//
	// Use SetMigratedTo and GetMigratedTo helpers.
	MigratedTo InputChannelClass
	// Admin rights¹ of the user in the group
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	//
	// Use SetAdminRights and GetAdminRights helpers.
	AdminRights ChatAdminRights
	// Default banned rights¹ of all users in the group
	//
	// Links:
	//  1) https://core.telegram.org/api/rights
	//
	// Use SetDefaultBannedRights and GetDefaultBannedRights helpers.
	DefaultBannedRights ChatBannedRights
}

Chat represents TL type `chat#3bda1bde`. Info about a group

See https://core.telegram.org/constructor/chat for reference.

func (*Chat) Decode

func (c *Chat) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Chat) Encode

func (c *Chat) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Chat) GetAdminRights

func (c *Chat) GetAdminRights() (value ChatAdminRights, ok bool)

GetAdminRights returns value of AdminRights conditional field and boolean which is true if field was set.

func (*Chat) GetDefaultBannedRights

func (c *Chat) GetDefaultBannedRights() (value ChatBannedRights, ok bool)

GetDefaultBannedRights returns value of DefaultBannedRights conditional field and boolean which is true if field was set.

func (*Chat) GetMigratedTo

func (c *Chat) GetMigratedTo() (value InputChannelClass, ok bool)

GetMigratedTo returns value of MigratedTo conditional field and boolean which is true if field was set.

func (*Chat) SetAdminRights

func (c *Chat) SetAdminRights(value ChatAdminRights)

SetAdminRights sets value of AdminRights conditional field.

func (*Chat) SetCallActive added in v0.13.0

func (c *Chat) SetCallActive(value bool)

SetCallActive sets value of CallActive conditional field.

func (*Chat) SetCallNotEmpty added in v0.13.0

func (c *Chat) SetCallNotEmpty(value bool)

SetCallNotEmpty sets value of CallNotEmpty conditional field.

func (*Chat) SetCreator

func (c *Chat) SetCreator(value bool)

SetCreator sets value of Creator conditional field.

func (*Chat) SetDeactivated

func (c *Chat) SetDeactivated(value bool)

SetDeactivated sets value of Deactivated conditional field.

func (*Chat) SetDefaultBannedRights

func (c *Chat) SetDefaultBannedRights(value ChatBannedRights)

SetDefaultBannedRights sets value of DefaultBannedRights conditional field.

func (*Chat) SetKicked

func (c *Chat) SetKicked(value bool)

SetKicked sets value of Kicked conditional field.

func (*Chat) SetLeft

func (c *Chat) SetLeft(value bool)

SetLeft sets value of Left conditional field.

func (*Chat) SetMigratedTo

func (c *Chat) SetMigratedTo(value InputChannelClass)

SetMigratedTo sets value of MigratedTo conditional field.

func (*Chat) String added in v0.12.0

func (c *Chat) String() string

String implements fmt.Stringer.

type ChatAdminRights

type ChatAdminRights struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If set, allows the admin to modify the description of the channel/supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	ChangeInfo bool
	// If set, allows the admin to post messages in the channel¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	PostMessages bool
	// If set, allows the admin to also edit messages from other admins in the channel¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	EditMessages bool
	// If set, allows the admin to also delete messages from other admins in the channel¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	DeleteMessages bool
	// If set, allows the admin to ban users from the channel/supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	BanUsers bool
	// If set, allows the admin to invite users in the channel/supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	InviteUsers bool
	// If set, allows the admin to pin messages in the channel/supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	PinMessages bool
	// If set, allows the admin to add other admins with the same (or more limited) permissions in the channel/supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	AddAdmins bool
	// Whether this admin is anonymous
	Anonymous bool
	// ManageCall field of ChatAdminRights.
	ManageCall bool
}

ChatAdminRights represents TL type `chatAdminRights#5fb224d5`. Represents the rights of an admin in a channel/supergroup¹.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/chatAdminRights for reference.

func (*ChatAdminRights) Decode

func (c *ChatAdminRights) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatAdminRights) Encode

func (c *ChatAdminRights) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatAdminRights) SetAddAdmins

func (c *ChatAdminRights) SetAddAdmins(value bool)

SetAddAdmins sets value of AddAdmins conditional field.

func (*ChatAdminRights) SetAnonymous

func (c *ChatAdminRights) SetAnonymous(value bool)

SetAnonymous sets value of Anonymous conditional field.

func (*ChatAdminRights) SetBanUsers

func (c *ChatAdminRights) SetBanUsers(value bool)

SetBanUsers sets value of BanUsers conditional field.

func (*ChatAdminRights) SetChangeInfo

func (c *ChatAdminRights) SetChangeInfo(value bool)

SetChangeInfo sets value of ChangeInfo conditional field.

func (*ChatAdminRights) SetDeleteMessages

func (c *ChatAdminRights) SetDeleteMessages(value bool)

SetDeleteMessages sets value of DeleteMessages conditional field.

func (*ChatAdminRights) SetEditMessages

func (c *ChatAdminRights) SetEditMessages(value bool)

SetEditMessages sets value of EditMessages conditional field.

func (*ChatAdminRights) SetInviteUsers

func (c *ChatAdminRights) SetInviteUsers(value bool)

SetInviteUsers sets value of InviteUsers conditional field.

func (*ChatAdminRights) SetManageCall

func (c *ChatAdminRights) SetManageCall(value bool)

SetManageCall sets value of ManageCall conditional field.

func (*ChatAdminRights) SetPinMessages

func (c *ChatAdminRights) SetPinMessages(value bool)

SetPinMessages sets value of PinMessages conditional field.

func (*ChatAdminRights) SetPostMessages

func (c *ChatAdminRights) SetPostMessages(value bool)

SetPostMessages sets value of PostMessages conditional field.

func (*ChatAdminRights) String added in v0.12.0

func (c *ChatAdminRights) String() string

String implements fmt.Stringer.

type ChatBannedRights

type ChatBannedRights struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If set, does not allow a user to view messages in a supergroup/channel/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	ViewMessages bool
	// If set, does not allow a user to send messages in a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	SendMessages bool
	// If set, does not allow a user to send any media in a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	SendMedia bool
	// If set, does not allow a user to send stickers in a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	SendStickers bool
	// If set, does not allow a user to send gifs in a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	SendGifs bool
	// If set, does not allow a user to send games in a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	SendGames bool
	// If set, does not allow a user to use inline bots in a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	SendInline bool
	// If set, does not allow a user to embed links in the messages of a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	EmbedLinks bool
	// If set, does not allow a user to send stickers in a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	SendPolls bool
	// If set, does not allow any user to change the description of a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	ChangeInfo bool
	// If set, does not allow any user to invite users in a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	InviteUsers bool
	// If set, does not allow any user to pin messages in a supergroup/chat¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	PinMessages bool
	// Validity of said permissions (it is considered forever any value less then 30 seconds or more then 366 days).
	UntilDate int
}

ChatBannedRights represents TL type `chatBannedRights#9f120418`. Represents the rights of a normal user in a supergroup/channel/chat¹. In this case, the flags are inverted: if set, a flag does not allow a user to do X.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/chatBannedRights for reference.

func (*ChatBannedRights) Decode

func (c *ChatBannedRights) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatBannedRights) Encode

func (c *ChatBannedRights) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatBannedRights) SetChangeInfo

func (c *ChatBannedRights) SetChangeInfo(value bool)

SetChangeInfo sets value of ChangeInfo conditional field.

func (c *ChatBannedRights) SetEmbedLinks(value bool)

SetEmbedLinks sets value of EmbedLinks conditional field.

func (*ChatBannedRights) SetInviteUsers

func (c *ChatBannedRights) SetInviteUsers(value bool)

SetInviteUsers sets value of InviteUsers conditional field.

func (*ChatBannedRights) SetPinMessages

func (c *ChatBannedRights) SetPinMessages(value bool)

SetPinMessages sets value of PinMessages conditional field.

func (*ChatBannedRights) SetSendGames

func (c *ChatBannedRights) SetSendGames(value bool)

SetSendGames sets value of SendGames conditional field.

func (*ChatBannedRights) SetSendGifs

func (c *ChatBannedRights) SetSendGifs(value bool)

SetSendGifs sets value of SendGifs conditional field.

func (*ChatBannedRights) SetSendInline

func (c *ChatBannedRights) SetSendInline(value bool)

SetSendInline sets value of SendInline conditional field.

func (*ChatBannedRights) SetSendMedia

func (c *ChatBannedRights) SetSendMedia(value bool)

SetSendMedia sets value of SendMedia conditional field.

func (*ChatBannedRights) SetSendMessages

func (c *ChatBannedRights) SetSendMessages(value bool)

SetSendMessages sets value of SendMessages conditional field.

func (*ChatBannedRights) SetSendPolls

func (c *ChatBannedRights) SetSendPolls(value bool)

SetSendPolls sets value of SendPolls conditional field.

func (*ChatBannedRights) SetSendStickers

func (c *ChatBannedRights) SetSendStickers(value bool)

SetSendStickers sets value of SendStickers conditional field.

func (*ChatBannedRights) SetViewMessages

func (c *ChatBannedRights) SetViewMessages(value bool)

SetViewMessages sets value of ViewMessages conditional field.

func (*ChatBannedRights) String added in v0.12.0

func (c *ChatBannedRights) String() string

String implements fmt.Stringer.

type ChatBox

type ChatBox struct {
	Chat ChatClass
}

Chat boxes the ChatClass providing a helper.

func (*ChatBox) Decode

func (b *ChatBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ChatBox.

func (*ChatBox) Encode

func (b *ChatBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ChatBox.

type ChatClass

type ChatClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChatClass represents Chat generic type.

See https://core.telegram.org/type/Chat for reference.

Example:

g, err := DecodeChat(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChatEmpty: // chatEmpty#9ba2d800
case *Chat: // chat#3bda1bde
case *ChatForbidden: // chatForbidden#7328bdb
case *Channel: // channel#d31a961e
case *ChannelForbidden: // channelForbidden#289da732
default: panic(v)
}

func DecodeChat

func DecodeChat(buf *bin.Buffer) (ChatClass, error)

DecodeChat implements binary de-serialization for ChatClass.

type ChatDefaultBannedRightsHandler added in v0.9.0

type ChatDefaultBannedRightsHandler func(ctx UpdateContext, update *UpdateChatDefaultBannedRights) error

ChatDefaultBannedRightsHandler is a ChatDefaultBannedRights event handler.

type ChatEmpty

type ChatEmpty struct {
	// Group identifier
	ID int
}

ChatEmpty represents TL type `chatEmpty#9ba2d800`. Empty constructor, group doesn't exist

See https://core.telegram.org/constructor/chatEmpty for reference.

func (*ChatEmpty) Decode

func (c *ChatEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatEmpty) Encode

func (c *ChatEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatEmpty) String added in v0.12.0

func (c *ChatEmpty) String() string

String implements fmt.Stringer.

type ChatForbidden

type ChatForbidden struct {
	// User identifier
	ID int
	// Group name
	Title string
}

ChatForbidden represents TL type `chatForbidden#7328bdb`. A group to which the user has no access. E.g., because the user was kicked from the group.

See https://core.telegram.org/constructor/chatForbidden for reference.

func (*ChatForbidden) Decode

func (c *ChatForbidden) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatForbidden) Encode

func (c *ChatForbidden) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatForbidden) String added in v0.12.0

func (c *ChatForbidden) String() string

String implements fmt.Stringer.

type ChatFull

type ChatFull struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Can we change the username of this chat
	CanSetUsername bool
	// Whether scheduled messages¹ are available
	//
	// Links:
	//  1) https://core.telegram.org/api/scheduled-messages
	HasScheduled bool
	// ID of the chat
	ID int
	// About string for this chat
	About string
	// Participant list
	Participants ChatParticipantsClass
	// Chat photo
	//
	// Use SetChatPhoto and GetChatPhoto helpers.
	ChatPhoto PhotoClass
	// Notification settings
	NotifySettings PeerNotifySettings
	// Chat invite
	ExportedInvite ExportedChatInviteClass
	// Info about bots that are in this chat
	//
	// Use SetBotInfo and GetBotInfo helpers.
	BotInfo []BotInfo
	// Message ID of the last pinned message¹
	//
	// Links:
	//  1) https://core.telegram.org/api/pin
	//
	// Use SetPinnedMsgID and GetPinnedMsgID helpers.
	PinnedMsgID int
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// Call field of ChatFull.
	//
	// Use SetCall and GetCall helpers.
	Call InputGroupCall
}

ChatFull represents TL type `chatFull#dc8c181`. Detailed chat info

See https://core.telegram.org/constructor/chatFull for reference.

func (*ChatFull) Decode

func (c *ChatFull) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatFull) Encode

func (c *ChatFull) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatFull) GetBotInfo

func (c *ChatFull) GetBotInfo() (value []BotInfo, ok bool)

GetBotInfo returns value of BotInfo conditional field and boolean which is true if field was set.

func (*ChatFull) GetCall added in v0.13.0

func (c *ChatFull) GetCall() (value InputGroupCall, ok bool)

GetCall returns value of Call conditional field and boolean which is true if field was set.

func (*ChatFull) GetChatPhoto

func (c *ChatFull) GetChatPhoto() (value PhotoClass, ok bool)

GetChatPhoto returns value of ChatPhoto conditional field and boolean which is true if field was set.

func (*ChatFull) GetFolderID

func (c *ChatFull) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*ChatFull) GetPinnedMsgID

func (c *ChatFull) GetPinnedMsgID() (value int, ok bool)

GetPinnedMsgID returns value of PinnedMsgID conditional field and boolean which is true if field was set.

func (*ChatFull) SetBotInfo

func (c *ChatFull) SetBotInfo(value []BotInfo)

SetBotInfo sets value of BotInfo conditional field.

func (*ChatFull) SetCall added in v0.13.0

func (c *ChatFull) SetCall(value InputGroupCall)

SetCall sets value of Call conditional field.

func (*ChatFull) SetCanSetUsername

func (c *ChatFull) SetCanSetUsername(value bool)

SetCanSetUsername sets value of CanSetUsername conditional field.

func (*ChatFull) SetChatPhoto

func (c *ChatFull) SetChatPhoto(value PhotoClass)

SetChatPhoto sets value of ChatPhoto conditional field.

func (*ChatFull) SetFolderID

func (c *ChatFull) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*ChatFull) SetHasScheduled

func (c *ChatFull) SetHasScheduled(value bool)

SetHasScheduled sets value of HasScheduled conditional field.

func (*ChatFull) SetPinnedMsgID

func (c *ChatFull) SetPinnedMsgID(value int)

SetPinnedMsgID sets value of PinnedMsgID conditional field.

func (*ChatFull) String added in v0.12.0

func (c *ChatFull) String() string

String implements fmt.Stringer.

type ChatFullBox

type ChatFullBox struct {
	ChatFull ChatFullClass
}

ChatFull boxes the ChatFullClass providing a helper.

func (*ChatFullBox) Decode

func (b *ChatFullBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ChatFullBox.

func (*ChatFullBox) Encode

func (b *ChatFullBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ChatFullBox.

type ChatFullClass

type ChatFullClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChatFullClass represents ChatFull generic type.

See https://core.telegram.org/type/ChatFull for reference.

Example:

g, err := DecodeChatFull(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChatFull: // chatFull#dc8c181
case *ChannelFull: // channelFull#ef3a6acd
default: panic(v)
}

func DecodeChatFull

func DecodeChatFull(buf *bin.Buffer) (ChatFullClass, error)

DecodeChatFull implements binary de-serialization for ChatFullClass.

type ChatHandler added in v0.13.0

type ChatHandler func(ctx UpdateContext, update *UpdateChat) error

ChatHandler is a Chat event handler.

type ChatInvite

type ChatInvite struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is a channel/supergroup¹ or a normal group²
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	//  2) https://core.telegram.org/api/channel
	Channel bool
	// Whether this is a channel¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Broadcast bool
	// Whether this is a public channel/supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Public bool
	// Whether this is a supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Megagroup bool
	// Chat/supergroup/channel title
	Title string
	// Chat/supergroup/channel photo
	Photo PhotoClass
	// Participant count
	ParticipantsCount int
	// A few of the participants that are in the group
	//
	// Use SetParticipants and GetParticipants helpers.
	Participants []UserClass
}

ChatInvite represents TL type `chatInvite#dfc2f58e`. Chat invite info

See https://core.telegram.org/constructor/chatInvite for reference.

func (*ChatInvite) Decode

func (c *ChatInvite) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatInvite) Encode

func (c *ChatInvite) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatInvite) GetParticipants

func (c *ChatInvite) GetParticipants() (value []UserClass, ok bool)

GetParticipants returns value of Participants conditional field and boolean which is true if field was set.

func (*ChatInvite) SetBroadcast

func (c *ChatInvite) SetBroadcast(value bool)

SetBroadcast sets value of Broadcast conditional field.

func (*ChatInvite) SetChannel

func (c *ChatInvite) SetChannel(value bool)

SetChannel sets value of Channel conditional field.

func (*ChatInvite) SetMegagroup

func (c *ChatInvite) SetMegagroup(value bool)

SetMegagroup sets value of Megagroup conditional field.

func (*ChatInvite) SetParticipants

func (c *ChatInvite) SetParticipants(value []UserClass)

SetParticipants sets value of Participants conditional field.

func (*ChatInvite) SetPublic

func (c *ChatInvite) SetPublic(value bool)

SetPublic sets value of Public conditional field.

func (*ChatInvite) String added in v0.12.0

func (c *ChatInvite) String() string

String implements fmt.Stringer.

type ChatInviteAlready

type ChatInviteAlready struct {
	// The chat connected to the invite
	Chat ChatClass
}

ChatInviteAlready represents TL type `chatInviteAlready#5a686d7c`. The user has already joined this chat

See https://core.telegram.org/constructor/chatInviteAlready for reference.

func (*ChatInviteAlready) Decode

func (c *ChatInviteAlready) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatInviteAlready) Encode

func (c *ChatInviteAlready) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatInviteAlready) String added in v0.12.0

func (c *ChatInviteAlready) String() string

String implements fmt.Stringer.

type ChatInviteBox

type ChatInviteBox struct {
	ChatInvite ChatInviteClass
}

ChatInvite boxes the ChatInviteClass providing a helper.

func (*ChatInviteBox) Decode

func (b *ChatInviteBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ChatInviteBox.

func (*ChatInviteBox) Encode

func (b *ChatInviteBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ChatInviteBox.

type ChatInviteClass

type ChatInviteClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChatInviteClass represents ChatInvite generic type.

See https://core.telegram.org/type/ChatInvite for reference.

Example:

g, err := DecodeChatInvite(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChatInviteAlready: // chatInviteAlready#5a686d7c
case *ChatInvite: // chatInvite#dfc2f58e
case *ChatInvitePeek: // chatInvitePeek#61695cb0
default: panic(v)
}

func DecodeChatInvite

func DecodeChatInvite(buf *bin.Buffer) (ChatInviteClass, error)

DecodeChatInvite implements binary de-serialization for ChatInviteClass.

type ChatInviteEmpty

type ChatInviteEmpty struct {
}

ChatInviteEmpty represents TL type `chatInviteEmpty#69df3769`. No info is associated to the chat invite

See https://core.telegram.org/constructor/chatInviteEmpty for reference.

func (*ChatInviteEmpty) Decode

func (c *ChatInviteEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatInviteEmpty) Encode

func (c *ChatInviteEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatInviteEmpty) String added in v0.12.0

func (c *ChatInviteEmpty) String() string

String implements fmt.Stringer.

type ChatInviteExported

type ChatInviteExported struct {
	// Chat invitation link
	Link string
}

ChatInviteExported represents TL type `chatInviteExported#fc2e05bc`. Exported chat invite

See https://core.telegram.org/constructor/chatInviteExported for reference.

func (*ChatInviteExported) Decode

func (c *ChatInviteExported) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatInviteExported) Encode

func (c *ChatInviteExported) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatInviteExported) String added in v0.12.0

func (c *ChatInviteExported) String() string

String implements fmt.Stringer.

type ChatInvitePeek

type ChatInvitePeek struct {
	// Chat information
	Chat ChatClass
	// Read-only anonymous access to this group will be revoked at this date
	Expires int
}

ChatInvitePeek represents TL type `chatInvitePeek#61695cb0`. A chat invitation that also allows peeking into the group to read messages without joining it.

See https://core.telegram.org/constructor/chatInvitePeek for reference.

func (*ChatInvitePeek) Decode

func (c *ChatInvitePeek) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatInvitePeek) Encode

func (c *ChatInvitePeek) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatInvitePeek) String added in v0.12.0

func (c *ChatInvitePeek) String() string

String implements fmt.Stringer.

type ChatOnlines

type ChatOnlines struct {
	// Number of online users
	Onlines int
}

ChatOnlines represents TL type `chatOnlines#f041e250`. Number of online users in a chat

See https://core.telegram.org/constructor/chatOnlines for reference.

func (*ChatOnlines) Decode

func (c *ChatOnlines) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatOnlines) Encode

func (c *ChatOnlines) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatOnlines) String added in v0.12.0

func (c *ChatOnlines) String() string

String implements fmt.Stringer.

type ChatParticipant

type ChatParticipant struct {
	// Member user ID
	UserID int
	// ID of the user that added the member to the group
	InviterID int
	// Date added to the group
	Date int
}

ChatParticipant represents TL type `chatParticipant#c8d7493e`. Group member.

See https://core.telegram.org/constructor/chatParticipant for reference.

func (*ChatParticipant) Decode

func (c *ChatParticipant) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatParticipant) Encode

func (c *ChatParticipant) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatParticipant) String added in v0.12.0

func (c *ChatParticipant) String() string

String implements fmt.Stringer.

type ChatParticipantAddHandler added in v0.9.0

type ChatParticipantAddHandler func(ctx UpdateContext, update *UpdateChatParticipantAdd) error

ChatParticipantAddHandler is a ChatParticipantAdd event handler.

type ChatParticipantAdmin

type ChatParticipantAdmin struct {
	// ID of a group member that is admin
	UserID int
	// ID of the user that added the member to the group
	InviterID int
	// Date when the user was added
	Date int
}

ChatParticipantAdmin represents TL type `chatParticipantAdmin#e2d6e436`. Chat admin

See https://core.telegram.org/constructor/chatParticipantAdmin for reference.

func (*ChatParticipantAdmin) Decode

func (c *ChatParticipantAdmin) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatParticipantAdmin) Encode

func (c *ChatParticipantAdmin) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatParticipantAdmin) String added in v0.12.0

func (c *ChatParticipantAdmin) String() string

String implements fmt.Stringer.

type ChatParticipantAdminHandler added in v0.9.0

type ChatParticipantAdminHandler func(ctx UpdateContext, update *UpdateChatParticipantAdmin) error

ChatParticipantAdminHandler is a ChatParticipantAdmin event handler.

type ChatParticipantBox

type ChatParticipantBox struct {
	ChatParticipant ChatParticipantClass
}

ChatParticipant boxes the ChatParticipantClass providing a helper.

func (*ChatParticipantBox) Decode

func (b *ChatParticipantBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ChatParticipantBox.

func (*ChatParticipantBox) Encode

func (b *ChatParticipantBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ChatParticipantBox.

type ChatParticipantClass

type ChatParticipantClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChatParticipantClass represents ChatParticipant generic type.

See https://core.telegram.org/type/ChatParticipant for reference.

Example:

g, err := DecodeChatParticipant(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChatParticipant: // chatParticipant#c8d7493e
case *ChatParticipantCreator: // chatParticipantCreator#da13538a
case *ChatParticipantAdmin: // chatParticipantAdmin#e2d6e436
default: panic(v)
}

func DecodeChatParticipant

func DecodeChatParticipant(buf *bin.Buffer) (ChatParticipantClass, error)

DecodeChatParticipant implements binary de-serialization for ChatParticipantClass.

type ChatParticipantCreator

type ChatParticipantCreator struct {
	// ID of the user that created the group
	UserID int
}

ChatParticipantCreator represents TL type `chatParticipantCreator#da13538a`. Represents the creator of the group

See https://core.telegram.org/constructor/chatParticipantCreator for reference.

func (*ChatParticipantCreator) Decode

func (c *ChatParticipantCreator) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatParticipantCreator) Encode

func (c *ChatParticipantCreator) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatParticipantCreator) String added in v0.12.0

func (c *ChatParticipantCreator) String() string

String implements fmt.Stringer.

type ChatParticipantDeleteHandler added in v0.9.0

type ChatParticipantDeleteHandler func(ctx UpdateContext, update *UpdateChatParticipantDelete) error

ChatParticipantDeleteHandler is a ChatParticipantDelete event handler.

type ChatParticipants

type ChatParticipants struct {
	// Group identifier
	ChatID int
	// List of group members
	Participants []ChatParticipantClass
	// Group version number
	Version int
}

ChatParticipants represents TL type `chatParticipants#3f460fed`. Group members.

See https://core.telegram.org/constructor/chatParticipants for reference.

func (*ChatParticipants) Decode

func (c *ChatParticipants) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatParticipants) Encode

func (c *ChatParticipants) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatParticipants) String added in v0.12.0

func (c *ChatParticipants) String() string

String implements fmt.Stringer.

type ChatParticipantsBox

type ChatParticipantsBox struct {
	ChatParticipants ChatParticipantsClass
}

ChatParticipants boxes the ChatParticipantsClass providing a helper.

func (*ChatParticipantsBox) Decode

func (b *ChatParticipantsBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ChatParticipantsBox.

func (*ChatParticipantsBox) Encode

func (b *ChatParticipantsBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ChatParticipantsBox.

type ChatParticipantsClass

type ChatParticipantsClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChatParticipantsClass represents ChatParticipants generic type.

See https://core.telegram.org/type/ChatParticipants for reference.

Example:

g, err := DecodeChatParticipants(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChatParticipantsForbidden: // chatParticipantsForbidden#fc900c2b
case *ChatParticipants: // chatParticipants#3f460fed
default: panic(v)
}

func DecodeChatParticipants

func DecodeChatParticipants(buf *bin.Buffer) (ChatParticipantsClass, error)

DecodeChatParticipants implements binary de-serialization for ChatParticipantsClass.

type ChatParticipantsForbidden

type ChatParticipantsForbidden struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Group ID
	ChatID int
	// Info about the group membership of the current user
	//
	// Use SetSelfParticipant and GetSelfParticipant helpers.
	SelfParticipant ChatParticipantClass
}

ChatParticipantsForbidden represents TL type `chatParticipantsForbidden#fc900c2b`. Info on members is unavailable

See https://core.telegram.org/constructor/chatParticipantsForbidden for reference.

func (*ChatParticipantsForbidden) Decode

func (c *ChatParticipantsForbidden) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatParticipantsForbidden) Encode

func (c *ChatParticipantsForbidden) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatParticipantsForbidden) GetSelfParticipant

func (c *ChatParticipantsForbidden) GetSelfParticipant() (value ChatParticipantClass, ok bool)

GetSelfParticipant returns value of SelfParticipant conditional field and boolean which is true if field was set.

func (*ChatParticipantsForbidden) SetSelfParticipant

func (c *ChatParticipantsForbidden) SetSelfParticipant(value ChatParticipantClass)

SetSelfParticipant sets value of SelfParticipant conditional field.

func (*ChatParticipantsForbidden) String added in v0.12.0

func (c *ChatParticipantsForbidden) String() string

String implements fmt.Stringer.

type ChatParticipantsHandler added in v0.9.0

type ChatParticipantsHandler func(ctx UpdateContext, update *UpdateChatParticipants) error

ChatParticipantsHandler is a ChatParticipants event handler.

type ChatPhoto

type ChatPhoto struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the user has an animated profile picture
	HasVideo bool
	// Location of the file corresponding to the small thumbnail for group profile photo
	PhotoSmall FileLocationToBeDeprecated
	// Location of the file corresponding to the small thumbnail for group profile photo
	PhotoBig FileLocationToBeDeprecated
	// DC where this photo is stored
	DCID int
}

ChatPhoto represents TL type `chatPhoto#d20b9f3c`. Group profile photo.

See https://core.telegram.org/constructor/chatPhoto for reference.

func (*ChatPhoto) Decode

func (c *ChatPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatPhoto) Encode

func (c *ChatPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatPhoto) SetHasVideo

func (c *ChatPhoto) SetHasVideo(value bool)

SetHasVideo sets value of HasVideo conditional field.

func (*ChatPhoto) String added in v0.12.0

func (c *ChatPhoto) String() string

String implements fmt.Stringer.

type ChatPhotoBox

type ChatPhotoBox struct {
	ChatPhoto ChatPhotoClass
}

ChatPhoto boxes the ChatPhotoClass providing a helper.

func (*ChatPhotoBox) Decode

func (b *ChatPhotoBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ChatPhotoBox.

func (*ChatPhotoBox) Encode

func (b *ChatPhotoBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ChatPhotoBox.

type ChatPhotoClass

type ChatPhotoClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ChatPhotoClass represents ChatPhoto generic type.

See https://core.telegram.org/type/ChatPhoto for reference.

Example:

g, err := DecodeChatPhoto(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChatPhotoEmpty: // chatPhotoEmpty#37c1011c
case *ChatPhoto: // chatPhoto#d20b9f3c
default: panic(v)
}

func DecodeChatPhoto

func DecodeChatPhoto(buf *bin.Buffer) (ChatPhotoClass, error)

DecodeChatPhoto implements binary de-serialization for ChatPhotoClass.

type ChatPhotoEmpty

type ChatPhotoEmpty struct {
}

ChatPhotoEmpty represents TL type `chatPhotoEmpty#37c1011c`. Group photo is not set.

See https://core.telegram.org/constructor/chatPhotoEmpty for reference.

func (*ChatPhotoEmpty) Decode

func (c *ChatPhotoEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ChatPhotoEmpty) Encode

func (c *ChatPhotoEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ChatPhotoEmpty) String added in v0.12.0

func (c *ChatPhotoEmpty) String() string

String implements fmt.Stringer.

type ChatUserTypingHandler added in v0.9.0

type ChatUserTypingHandler func(ctx UpdateContext, update *UpdateChatUserTyping) error

ChatUserTypingHandler is a ChatUserTyping event handler.

type Client

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

Client implement methods for calling functions from TL schema via Invoker.

func NewClient

func NewClient(invoker Invoker) *Client

func (*Client) AccountAcceptAuthorization

func (c *Client) AccountAcceptAuthorization(ctx context.Context, request *AccountAcceptAuthorizationRequest) (bool, error)

AccountAcceptAuthorization invokes method account.acceptAuthorization#e7027c94 returning error if any. Sends a Telegram Passport authorization form, effectively sharing data with the service

See https://core.telegram.org/method/account.acceptAuthorization for reference.

func (*Client) AccountCancelPasswordEmail

func (c *Client) AccountCancelPasswordEmail(ctx context.Context) (bool, error)

AccountCancelPasswordEmail invokes method account.cancelPasswordEmail#c1cbd5b6 returning error if any. Cancel the code that was sent to verify an email to use as 2FA recovery method¹.

Links:

  1. https://core.telegram.org/api/srp

See https://core.telegram.org/method/account.cancelPasswordEmail for reference.

func (*Client) AccountChangePhone

func (c *Client) AccountChangePhone(ctx context.Context, request *AccountChangePhoneRequest) (UserClass, error)

AccountChangePhone invokes method account.changePhone#70c32edb returning error if any. Change the phone number of the current account

Possible errors:

400 PHONE_CODE_EMPTY: phone_code is missing
400 PHONE_NUMBER_INVALID: The phone number is invalid

See https://core.telegram.org/method/account.changePhone for reference.

func (*Client) AccountCheckUsername

func (c *Client) AccountCheckUsername(ctx context.Context, username string) (bool, error)

AccountCheckUsername invokes method account.checkUsername#2714d86c returning error if any. Validates a username and checks availability.

Possible errors:

400 USERNAME_INVALID: Unacceptable username

See https://core.telegram.org/method/account.checkUsername for reference.

func (*Client) AccountConfirmPasswordEmail

func (c *Client) AccountConfirmPasswordEmail(ctx context.Context, code string) (bool, error)

AccountConfirmPasswordEmail invokes method account.confirmPasswordEmail#8fdf1920 returning error if any. Verify an email to use as 2FA recovery method¹.

Links:

  1. https://core.telegram.org/api/srp

Possible errors:

400 CODE_INVALID: Code invalid
400 EMAIL_HASH_EXPIRED: Email hash expired

See https://core.telegram.org/method/account.confirmPasswordEmail for reference.

func (*Client) AccountConfirmPhone

func (c *Client) AccountConfirmPhone(ctx context.Context, request *AccountConfirmPhoneRequest) (bool, error)

AccountConfirmPhone invokes method account.confirmPhone#5f2178c3 returning error if any. Confirm a phone number to cancel account deletion, for more info click here »¹

Links:

  1. https://core.telegram.org/api/account-deletion

Possible errors:

400 CODE_HASH_INVALID: Code hash invalid
400 PHONE_CODE_EMPTY: phone_code is missing

See https://core.telegram.org/method/account.confirmPhone for reference.

func (*Client) AccountCreateTheme

func (c *Client) AccountCreateTheme(ctx context.Context, request *AccountCreateThemeRequest) (*Theme, error)

AccountCreateTheme invokes method account.createTheme#8432c21f returning error if any. Create a theme

See https://core.telegram.org/method/account.createTheme for reference.

func (*Client) AccountDeleteAccount

func (c *Client) AccountDeleteAccount(ctx context.Context, reason string) (bool, error)

AccountDeleteAccount invokes method account.deleteAccount#418d4e0b returning error if any. Delete the user's account from the telegram servers. Can be used, for example, to delete the account of a user that provided the login code, but forgot the 2FA password and no recovery method is configured¹.

Links:

  1. https://core.telegram.org/api/srp

Possible errors:

420 2FA_CONFIRM_WAIT_X: Since this account is active and protected by a 2FA password, we will delete it in 1 week for security purposes. You can cancel this process at any time, you'll be able to reset your account in X seconds.

See https://core.telegram.org/method/account.deleteAccount for reference.

func (*Client) AccountDeleteSecureValue

func (c *Client) AccountDeleteSecureValue(ctx context.Context, types []SecureValueTypeClass) (bool, error)

AccountDeleteSecureValue invokes method account.deleteSecureValue#b880bc4b returning error if any. Delete stored Telegram Passport¹ documents, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#encryption

See https://core.telegram.org/method/account.deleteSecureValue for reference.

func (*Client) AccountFinishTakeoutSession

func (c *Client) AccountFinishTakeoutSession(ctx context.Context, request *AccountFinishTakeoutSessionRequest) (bool, error)

AccountFinishTakeoutSession invokes method account.finishTakeoutSession#1d2652ee returning error if any. Finish account takeout session

Possible errors:

403 TAKEOUT_REQUIRED: A takeout session has to be initialized, first

See https://core.telegram.org/method/account.finishTakeoutSession for reference.

func (*Client) AccountGetAccountTTL

func (c *Client) AccountGetAccountTTL(ctx context.Context) (*AccountDaysTTL, error)

AccountGetAccountTTL invokes method account.getAccountTTL#8fc711d returning error if any. Get days to live of account

See https://core.telegram.org/method/account.getAccountTTL for reference.

func (*Client) AccountGetAllSecureValues added in v0.8.0

func (c *Client) AccountGetAllSecureValues(ctx context.Context) ([]SecureValue, error)

AccountGetAllSecureValues invokes method account.getAllSecureValues#b288bc7d returning error if any. Get all saved Telegram Passport¹ documents, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#encryption

See https://core.telegram.org/method/account.getAllSecureValues for reference.

func (*Client) AccountGetAuthorizationForm

func (c *Client) AccountGetAuthorizationForm(ctx context.Context, request *AccountGetAuthorizationFormRequest) (*AccountAuthorizationForm, error)

AccountGetAuthorizationForm invokes method account.getAuthorizationForm#b86ba8e1 returning error if any. Returns a Telegram Passport authorization form for sharing data with a service

See https://core.telegram.org/method/account.getAuthorizationForm for reference.

func (*Client) AccountGetAuthorizations

func (c *Client) AccountGetAuthorizations(ctx context.Context) (*AccountAuthorizations, error)

AccountGetAuthorizations invokes method account.getAuthorizations#e320c158 returning error if any. Get logged-in sessions

See https://core.telegram.org/method/account.getAuthorizations for reference.

func (*Client) AccountGetAutoDownloadSettings

func (c *Client) AccountGetAutoDownloadSettings(ctx context.Context) (*AccountAutoDownloadSettings, error)

AccountGetAutoDownloadSettings invokes method account.getAutoDownloadSettings#56da0b3f returning error if any. Get media autodownload settings

See https://core.telegram.org/method/account.getAutoDownloadSettings for reference.

func (*Client) AccountGetContactSignUpNotification

func (c *Client) AccountGetContactSignUpNotification(ctx context.Context) (bool, error)

AccountGetContactSignUpNotification invokes method account.getContactSignUpNotification#9f07c728 returning error if any. Whether the user will receive notifications when contacts sign up

See https://core.telegram.org/method/account.getContactSignUpNotification for reference.

func (*Client) AccountGetContentSettings

func (c *Client) AccountGetContentSettings(ctx context.Context) (*AccountContentSettings, error)

AccountGetContentSettings invokes method account.getContentSettings#8b9b4dae returning error if any. Get sensitive content settings

See https://core.telegram.org/method/account.getContentSettings for reference.

func (*Client) AccountGetGlobalPrivacySettings

func (c *Client) AccountGetGlobalPrivacySettings(ctx context.Context) (*GlobalPrivacySettings, error)

AccountGetGlobalPrivacySettings invokes method account.getGlobalPrivacySettings#eb2b4cf6 returning error if any. Get global privacy settings

See https://core.telegram.org/method/account.getGlobalPrivacySettings for reference. Can be used by bots.

func (*Client) AccountGetMultiWallPapers added in v0.8.0

func (c *Client) AccountGetMultiWallPapers(ctx context.Context, wallpapers []InputWallPaperClass) ([]WallPaperClass, error)

AccountGetMultiWallPapers invokes method account.getMultiWallPapers#65ad71dc returning error if any. Get info about multiple wallpapers

See https://core.telegram.org/method/account.getMultiWallPapers for reference.

func (*Client) AccountGetNotifyExceptions

func (c *Client) AccountGetNotifyExceptions(ctx context.Context, request *AccountGetNotifyExceptionsRequest) (UpdatesClass, error)

AccountGetNotifyExceptions invokes method account.getNotifyExceptions#53577479 returning error if any. Returns list of chats with non-default notification settings

See https://core.telegram.org/method/account.getNotifyExceptions for reference.

func (*Client) AccountGetNotifySettings

func (c *Client) AccountGetNotifySettings(ctx context.Context, peer InputNotifyPeerClass) (*PeerNotifySettings, error)

AccountGetNotifySettings invokes method account.getNotifySettings#12b3ad31 returning error if any. Gets current notification settings for a given user/group, from all users/all groups.

Possible errors:

400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/account.getNotifySettings for reference.

func (*Client) AccountGetPassword

func (c *Client) AccountGetPassword(ctx context.Context) (*AccountPassword, error)

AccountGetPassword invokes method account.getPassword#548a30f5 returning error if any. Obtain configuration for two-factor authorization with password

See https://core.telegram.org/method/account.getPassword for reference.

func (*Client) AccountGetPasswordSettings

func (c *Client) AccountGetPasswordSettings(ctx context.Context, password InputCheckPasswordSRPClass) (*AccountPasswordSettings, error)

AccountGetPasswordSettings invokes method account.getPasswordSettings#9cd4eaf9 returning error if any. Get private info associated to the password info (recovery email, telegram passport¹ info & so on)

Links:

  1. https://core.telegram.org/passport

Possible errors:

400 PASSWORD_HASH_INVALID: The provided password hash is invalid

See https://core.telegram.org/method/account.getPasswordSettings for reference.

func (*Client) AccountGetPrivacy

func (c *Client) AccountGetPrivacy(ctx context.Context, key InputPrivacyKeyClass) (*AccountPrivacyRules, error)

AccountGetPrivacy invokes method account.getPrivacy#dadbc950 returning error if any. Get privacy settings of current account

Possible errors:

400 PRIVACY_KEY_INVALID: The privacy key is invalid

See https://core.telegram.org/method/account.getPrivacy for reference.

func (*Client) AccountGetSecureValue added in v0.8.0

func (c *Client) AccountGetSecureValue(ctx context.Context, types []SecureValueTypeClass) ([]SecureValue, error)

AccountGetSecureValue invokes method account.getSecureValue#73665bc2 returning error if any. Get saved Telegram Passport¹ document, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#encryption

See https://core.telegram.org/method/account.getSecureValue for reference.

func (*Client) AccountGetTheme

func (c *Client) AccountGetTheme(ctx context.Context, request *AccountGetThemeRequest) (*Theme, error)

AccountGetTheme invokes method account.getTheme#8d9d742b returning error if any. Get theme information

Possible errors:

400 THEME_FORMAT_INVALID: Invalid theme format provided
400 THEME_INVALID: Invalid theme provided

See https://core.telegram.org/method/account.getTheme for reference.

func (*Client) AccountGetThemes

func (c *Client) AccountGetThemes(ctx context.Context, request *AccountGetThemesRequest) (AccountThemesClass, error)

AccountGetThemes invokes method account.getThemes#285946f8 returning error if any. Get installed themes

See https://core.telegram.org/method/account.getThemes for reference.

func (*Client) AccountGetTmpPassword

func (c *Client) AccountGetTmpPassword(ctx context.Context, request *AccountGetTmpPasswordRequest) (*AccountTmpPassword, error)

AccountGetTmpPassword invokes method account.getTmpPassword#449e0b51 returning error if any. Get temporary payment password

Possible errors:

400 PASSWORD_HASH_INVALID: The provided password hash is invalid
400 TMP_PASSWORD_DISABLED: The temporary password is disabled

See https://core.telegram.org/method/account.getTmpPassword for reference.

func (*Client) AccountGetWallPaper

func (c *Client) AccountGetWallPaper(ctx context.Context, wallpaper InputWallPaperClass) (WallPaperClass, error)

AccountGetWallPaper invokes method account.getWallPaper#fc8ddbea returning error if any. Get info about a certain wallpaper

See https://core.telegram.org/method/account.getWallPaper for reference.

func (*Client) AccountGetWallPapers

func (c *Client) AccountGetWallPapers(ctx context.Context, hash int) (AccountWallPapersClass, error)

AccountGetWallPapers invokes method account.getWallPapers#aabb1763 returning error if any. Returns a list of available wallpapers.

See https://core.telegram.org/method/account.getWallPapers for reference.

func (*Client) AccountGetWebAuthorizations

func (c *Client) AccountGetWebAuthorizations(ctx context.Context) (*AccountWebAuthorizations, error)

AccountGetWebAuthorizations invokes method account.getWebAuthorizations#182e6d6f returning error if any. Get web login widget¹ authorizations

Links:

  1. https://core.telegram.org/widgets/login

See https://core.telegram.org/method/account.getWebAuthorizations for reference.

func (*Client) AccountInitTakeoutSession

func (c *Client) AccountInitTakeoutSession(ctx context.Context, request *AccountInitTakeoutSessionRequest) (*AccountTakeout, error)

AccountInitTakeoutSession invokes method account.initTakeoutSession#f05b4804 returning error if any. Intialize account takeout session

Possible errors:

420 TAKEOUT_INIT_DELAY_X: Wait X seconds before initing takeout

See https://core.telegram.org/method/account.initTakeoutSession for reference.

func (*Client) AccountInstallTheme

func (c *Client) AccountInstallTheme(ctx context.Context, request *AccountInstallThemeRequest) (bool, error)

AccountInstallTheme invokes method account.installTheme#7ae43737 returning error if any. Install a theme

See https://core.telegram.org/method/account.installTheme for reference.

func (*Client) AccountInstallWallPaper

func (c *Client) AccountInstallWallPaper(ctx context.Context, request *AccountInstallWallPaperRequest) (bool, error)

AccountInstallWallPaper invokes method account.installWallPaper#feed5769 returning error if any. Install wallpaper

See https://core.telegram.org/method/account.installWallPaper for reference.

func (*Client) AccountRegisterDevice

func (c *Client) AccountRegisterDevice(ctx context.Context, request *AccountRegisterDeviceRequest) (bool, error)

AccountRegisterDevice invokes method account.registerDevice#68976c6f returning error if any. Register device to receive PUSH notifications¹

Links:

  1. https://core.telegram.org/api/push-updates

Possible errors:

400 TOKEN_INVALID: The provided token is invalid

See https://core.telegram.org/method/account.registerDevice for reference.

func (*Client) AccountReportPeer

func (c *Client) AccountReportPeer(ctx context.Context, request *AccountReportPeerRequest) (bool, error)

AccountReportPeer invokes method account.reportPeer#ae189d5f returning error if any. Report a peer for violation of telegram's Terms of Service

Possible errors:

400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/account.reportPeer for reference.

func (*Client) AccountResendPasswordEmail

func (c *Client) AccountResendPasswordEmail(ctx context.Context) (bool, error)

AccountResendPasswordEmail invokes method account.resendPasswordEmail#7a7f2a15 returning error if any. Resend the code to verify an email to use as 2FA recovery method¹.

Links:

  1. https://core.telegram.org/api/srp

See https://core.telegram.org/method/account.resendPasswordEmail for reference.

func (*Client) AccountResetAuthorization

func (c *Client) AccountResetAuthorization(ctx context.Context, hash int64) (bool, error)

AccountResetAuthorization invokes method account.resetAuthorization#df77f3bc returning error if any. Log out an active authorized session¹ by its hash

Links:

  1. https://core.telegram.org/api/auth

Possible errors:

406 FRESH_RESET_AUTHORISATION_FORBIDDEN: You can't logout other sessions if less than 24 hours have passed since you logged on the current session
400 HASH_INVALID: The provided hash is invalid

See https://core.telegram.org/method/account.resetAuthorization for reference.

func (*Client) AccountResetNotifySettings

func (c *Client) AccountResetNotifySettings(ctx context.Context) (bool, error)

AccountResetNotifySettings invokes method account.resetNotifySettings#db7e1747 returning error if any. Resets all notification settings from users and groups.

See https://core.telegram.org/method/account.resetNotifySettings for reference.

func (*Client) AccountResetWallPapers

func (c *Client) AccountResetWallPapers(ctx context.Context) (bool, error)

AccountResetWallPapers invokes method account.resetWallPapers#bb3b9804 returning error if any. Delete installed wallpapers

See https://core.telegram.org/method/account.resetWallPapers for reference.

func (*Client) AccountResetWebAuthorization

func (c *Client) AccountResetWebAuthorization(ctx context.Context, hash int64) (bool, error)

AccountResetWebAuthorization invokes method account.resetWebAuthorization#2d01b9ef returning error if any. Log out an active web telegram login¹ session

Links:

  1. https://core.telegram.org/widgets/login

See https://core.telegram.org/method/account.resetWebAuthorization for reference.

func (*Client) AccountResetWebAuthorizations

func (c *Client) AccountResetWebAuthorizations(ctx context.Context) (bool, error)

AccountResetWebAuthorizations invokes method account.resetWebAuthorizations#682d2594 returning error if any. Reset all active web telegram login¹ sessions

Links:

  1. https://core.telegram.org/widgets/login

See https://core.telegram.org/method/account.resetWebAuthorizations for reference.

func (*Client) AccountSaveAutoDownloadSettings

func (c *Client) AccountSaveAutoDownloadSettings(ctx context.Context, request *AccountSaveAutoDownloadSettingsRequest) (bool, error)

AccountSaveAutoDownloadSettings invokes method account.saveAutoDownloadSettings#76f36233 returning error if any. Change media autodownload settings

See https://core.telegram.org/method/account.saveAutoDownloadSettings for reference.

func (*Client) AccountSaveSecureValue

func (c *Client) AccountSaveSecureValue(ctx context.Context, request *AccountSaveSecureValueRequest) (*SecureValue, error)

AccountSaveSecureValue invokes method account.saveSecureValue#899fe31d returning error if any. Securely save Telegram Passport¹ document, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#encryption

See https://core.telegram.org/method/account.saveSecureValue for reference.

func (*Client) AccountSaveTheme

func (c *Client) AccountSaveTheme(ctx context.Context, request *AccountSaveThemeRequest) (bool, error)

AccountSaveTheme invokes method account.saveTheme#f257106c returning error if any. Save a theme

See https://core.telegram.org/method/account.saveTheme for reference.

func (*Client) AccountSaveWallPaper

func (c *Client) AccountSaveWallPaper(ctx context.Context, request *AccountSaveWallPaperRequest) (bool, error)

AccountSaveWallPaper invokes method account.saveWallPaper#6c5a5b37 returning error if any. Install/uninstall wallpaper

See https://core.telegram.org/method/account.saveWallPaper for reference.

func (*Client) AccountSendChangePhoneCode

func (c *Client) AccountSendChangePhoneCode(ctx context.Context, request *AccountSendChangePhoneCodeRequest) (*AuthSentCode, error)

AccountSendChangePhoneCode invokes method account.sendChangePhoneCode#82574ae5 returning error if any. Verify a new phone number to associate to the current account

Possible errors:

400 PHONE_NUMBER_INVALID: The phone number is invalid

See https://core.telegram.org/method/account.sendChangePhoneCode for reference.

func (*Client) AccountSendConfirmPhoneCode

func (c *Client) AccountSendConfirmPhoneCode(ctx context.Context, request *AccountSendConfirmPhoneCodeRequest) (*AuthSentCode, error)

AccountSendConfirmPhoneCode invokes method account.sendConfirmPhoneCode#1b3faa88 returning error if any. Send confirmation code to cancel account deletion, for more info click here »¹

Links:

  1. https://core.telegram.org/api/account-deletion

Possible errors:

400 HASH_INVALID: The provided hash is invalid

See https://core.telegram.org/method/account.sendConfirmPhoneCode for reference.

func (*Client) AccountSendVerifyEmailCode

func (c *Client) AccountSendVerifyEmailCode(ctx context.Context, email string) (*AccountSentEmailCode, error)

AccountSendVerifyEmailCode invokes method account.sendVerifyEmailCode#7011509f returning error if any. Send the verification email code for telegram passport¹.

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/method/account.sendVerifyEmailCode for reference.

func (*Client) AccountSendVerifyPhoneCode

func (c *Client) AccountSendVerifyPhoneCode(ctx context.Context, request *AccountSendVerifyPhoneCodeRequest) (*AuthSentCode, error)

AccountSendVerifyPhoneCode invokes method account.sendVerifyPhoneCode#a5a356f9 returning error if any. Send the verification phone code for telegram passport¹.

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/method/account.sendVerifyPhoneCode for reference.

func (*Client) AccountSetAccountTTL

func (c *Client) AccountSetAccountTTL(ctx context.Context, ttl AccountDaysTTL) (bool, error)

AccountSetAccountTTL invokes method account.setAccountTTL#2442485e returning error if any. Set account self-destruction period

Possible errors:

400 TTL_DAYS_INVALID: The provided TTL is invalid

See https://core.telegram.org/method/account.setAccountTTL for reference.

func (*Client) AccountSetContactSignUpNotification

func (c *Client) AccountSetContactSignUpNotification(ctx context.Context, silent bool) (bool, error)

AccountSetContactSignUpNotification invokes method account.setContactSignUpNotification#cff43f61 returning error if any. Toggle contact sign up notifications

See https://core.telegram.org/method/account.setContactSignUpNotification for reference.

func (*Client) AccountSetContentSettings

func (c *Client) AccountSetContentSettings(ctx context.Context, request *AccountSetContentSettingsRequest) (bool, error)

AccountSetContentSettings invokes method account.setContentSettings#b574b16b returning error if any. Set sensitive content settings (for viewing or hiding NSFW content)

See https://core.telegram.org/method/account.setContentSettings for reference.

func (*Client) AccountSetGlobalPrivacySettings

func (c *Client) AccountSetGlobalPrivacySettings(ctx context.Context, settings GlobalPrivacySettings) (*GlobalPrivacySettings, error)

AccountSetGlobalPrivacySettings invokes method account.setGlobalPrivacySettings#1edaaac2 returning error if any. Set global privacy settings

See https://core.telegram.org/method/account.setGlobalPrivacySettings for reference. Can be used by bots.

func (*Client) AccountSetPrivacy

func (c *Client) AccountSetPrivacy(ctx context.Context, request *AccountSetPrivacyRequest) (*AccountPrivacyRules, error)

AccountSetPrivacy invokes method account.setPrivacy#c9f81ce8 returning error if any. Change privacy settings of current account

Possible errors:

400 PRIVACY_KEY_INVALID: The privacy key is invalid
400 PRIVACY_VALUE_INVALID: The specified privacy rule combination is invalid

See https://core.telegram.org/method/account.setPrivacy for reference.

func (*Client) AccountUnregisterDevice

func (c *Client) AccountUnregisterDevice(ctx context.Context, request *AccountUnregisterDeviceRequest) (bool, error)

AccountUnregisterDevice invokes method account.unregisterDevice#3076c4bf returning error if any. Deletes a device by its token, stops sending PUSH-notifications to it.

Possible errors:

400 TOKEN_INVALID: The provided token is invalid

See https://core.telegram.org/method/account.unregisterDevice for reference.

func (*Client) AccountUpdateDeviceLocked

func (c *Client) AccountUpdateDeviceLocked(ctx context.Context, period int) (bool, error)

AccountUpdateDeviceLocked invokes method account.updateDeviceLocked#38df3532 returning error if any. When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications¹.

Links:

  1. https://core.telegram.org/api/push-updates

See https://core.telegram.org/method/account.updateDeviceLocked for reference.

func (*Client) AccountUpdateNotifySettings

func (c *Client) AccountUpdateNotifySettings(ctx context.Context, request *AccountUpdateNotifySettingsRequest) (bool, error)

AccountUpdateNotifySettings invokes method account.updateNotifySettings#84be5b93 returning error if any. Edits notification settings from a given user/group, from all users/all groups.

Possible errors:

400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid
400 SETTINGS_INVALID: Invalid settings were provided

See https://core.telegram.org/method/account.updateNotifySettings for reference.

func (*Client) AccountUpdatePasswordSettings

func (c *Client) AccountUpdatePasswordSettings(ctx context.Context, request *AccountUpdatePasswordSettingsRequest) (bool, error)

AccountUpdatePasswordSettings invokes method account.updatePasswordSettings#a59b102f returning error if any. Set a new 2FA password

Possible errors:

400 EMAIL_UNCONFIRMED: Email unconfirmed
400 EMAIL_UNCONFIRMED_X: The provided email isn't confirmed, X is the length of the verification code that was just sent to the email: use account.verifyEmail to enter the received verification code and enable the recovery email.
400 NEW_SALT_INVALID: The new salt is invalid
400 NEW_SETTINGS_INVALID: The new password settings are invalid
400 PASSWORD_HASH_INVALID: The old password hash is invalid
400 SRP_ID_INVALID: Invalid SRP ID provided

See https://core.telegram.org/method/account.updatePasswordSettings for reference.

func (*Client) AccountUpdateProfile

func (c *Client) AccountUpdateProfile(ctx context.Context, request *AccountUpdateProfileRequest) (UserClass, error)

AccountUpdateProfile invokes method account.updateProfile#78515775 returning error if any. Updates user profile.

Possible errors:

400 ABOUT_TOO_LONG: About string too long
400 FIRSTNAME_INVALID: The first name is invalid

See https://core.telegram.org/method/account.updateProfile for reference.

func (*Client) AccountUpdateStatus

func (c *Client) AccountUpdateStatus(ctx context.Context, offline bool) (bool, error)

AccountUpdateStatus invokes method account.updateStatus#6628562c returning error if any. Updates online user status.

See https://core.telegram.org/method/account.updateStatus for reference.

func (*Client) AccountUpdateTheme

func (c *Client) AccountUpdateTheme(ctx context.Context, request *AccountUpdateThemeRequest) (*Theme, error)

AccountUpdateTheme invokes method account.updateTheme#5cb367d5 returning error if any. Update theme

See https://core.telegram.org/method/account.updateTheme for reference.

func (*Client) AccountUpdateUsername

func (c *Client) AccountUpdateUsername(ctx context.Context, username string) (UserClass, error)

AccountUpdateUsername invokes method account.updateUsername#3e0bdd7c returning error if any. Changes username for the current user.

Possible errors:

401 AUTH_KEY_PERM_EMPTY: The temporary auth key must be binded to the permanent auth key to use these methods.
400 USERNAME_INVALID: Unacceptable username
400 USERNAME_NOT_MODIFIED: Username is not different from the current username
400 USERNAME_OCCUPIED: Username is taken

See https://core.telegram.org/method/account.updateUsername for reference.

func (*Client) AccountUploadTheme

func (c *Client) AccountUploadTheme(ctx context.Context, request *AccountUploadThemeRequest) (DocumentClass, error)

AccountUploadTheme invokes method account.uploadTheme#1c3db333 returning error if any. Upload theme

Possible errors:

400 THEME_FILE_INVALID: Invalid theme file provided

See https://core.telegram.org/method/account.uploadTheme for reference.

func (*Client) AccountUploadWallPaper

func (c *Client) AccountUploadWallPaper(ctx context.Context, request *AccountUploadWallPaperRequest) (WallPaperClass, error)

AccountUploadWallPaper invokes method account.uploadWallPaper#dd853661 returning error if any. Create and upload a new wallpaper

See https://core.telegram.org/method/account.uploadWallPaper for reference.

func (*Client) AccountVerifyEmail

func (c *Client) AccountVerifyEmail(ctx context.Context, request *AccountVerifyEmailRequest) (bool, error)

AccountVerifyEmail invokes method account.verifyEmail#ecba39db returning error if any. Verify an email address for telegram passport¹.

Links:

  1. https://core.telegram.org/passport

Possible errors:

400 EMAIL_VERIFY_EXPIRED: The verification email has expired

See https://core.telegram.org/method/account.verifyEmail for reference.

func (*Client) AccountVerifyPhone

func (c *Client) AccountVerifyPhone(ctx context.Context, request *AccountVerifyPhoneRequest) (bool, error)

AccountVerifyPhone invokes method account.verifyPhone#4dd3a7f6 returning error if any. Verify a phone number for telegram passport¹.

Links:

  1. https://core.telegram.org/passport

Possible errors:

400 PHONE_CODE_EXPIRED: The phone code you provided has expired, this may happen if it was sent to any chat on telegram (if the code is sent through a telegram chat (not the official account) to avoid it append or prepend to the code some chars)

See https://core.telegram.org/method/account.verifyPhone for reference.

func (*Client) AuthAcceptLoginToken

func (c *Client) AuthAcceptLoginToken(ctx context.Context, token []byte) (*Authorization, error)

AuthAcceptLoginToken invokes method auth.acceptLoginToken#e894ad4d returning error if any. Accept QR code login token, logging in the app that generated it. Returns info about the new session. For more info, see login via QR code¹.

Links:

  1. https://core.telegram.org/api/qr-login

Possible errors:

400 AUTH_TOKEN_INVALIDX: The specified auth token is invalid

See https://core.telegram.org/method/auth.acceptLoginToken for reference.

func (*Client) AuthBindTempAuthKey

func (c *Client) AuthBindTempAuthKey(ctx context.Context, request *AuthBindTempAuthKeyRequest) (bool, error)

AuthBindTempAuthKey invokes method auth.bindTempAuthKey#cdd42a05 returning error if any. Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one. For more information, see Perfect Forward Secrecy¹.

Links:

  1. https://core.telegram.org/api/pfs

Possible errors:

400 ENCRYPTED_MESSAGE_INVALID: Encrypted message is incorrect
400 INPUT_REQUEST_TOO_LONG: The request is too big
400 TEMP_AUTH_KEY_ALREADY_BOUND: The passed temporary key is already bound to another perm_auth_key_id
400 TEMP_AUTH_KEY_EMPTY: The request was not performed with a temporary authorization key

See https://core.telegram.org/method/auth.bindTempAuthKey for reference. Can be used by bots.

func (*Client) AuthCancelCode

func (c *Client) AuthCancelCode(ctx context.Context, request *AuthCancelCodeRequest) (bool, error)

AuthCancelCode invokes method auth.cancelCode#1f040578 returning error if any. Cancel the login verification code

Possible errors:

400 PHONE_CODE_EXPIRED: The phone code you provided has expired, this may happen if it was sent to any chat on telegram (if the code is sent through a telegram chat (not the official account) to avoid it append or prepend to the code some chars)
400 PHONE_NUMBER_INVALID: The phone number is invalid

See https://core.telegram.org/method/auth.cancelCode for reference.

func (*Client) AuthCheckPassword

func (c *Client) AuthCheckPassword(ctx context.Context, password InputCheckPasswordSRPClass) (AuthAuthorizationClass, error)

AuthCheckPassword invokes method auth.checkPassword#d18b4d16 returning error if any. Try logging to an account protected by a 2FA password¹.

Links:

  1. https://core.telegram.org/api/srp

Possible errors:

400 PASSWORD_HASH_INVALID: The provided password isn't valid
400 SRP_ID_INVALID: Invalid SRP ID provided
400 SRP_PASSWORD_CHANGED: Password has changed

See https://core.telegram.org/method/auth.checkPassword for reference.

func (*Client) AuthDropTempAuthKeys

func (c *Client) AuthDropTempAuthKeys(ctx context.Context, exceptauthkeys []int64) (bool, error)

AuthDropTempAuthKeys invokes method auth.dropTempAuthKeys#8e48a188 returning error if any. Delete all temporary authorization keys except for the ones specified

See https://core.telegram.org/method/auth.dropTempAuthKeys for reference. Can be used by bots.

func (*Client) AuthExportAuthorization

func (c *Client) AuthExportAuthorization(ctx context.Context, dcid int) (*AuthExportedAuthorization, error)

AuthExportAuthorization invokes method auth.exportAuthorization#e5bfffcd returning error if any. Returns data for copying authorization to another data-centre.

Possible errors:

400 DC_ID_INVALID: The provided DC ID is invalid

See https://core.telegram.org/method/auth.exportAuthorization for reference. Can be used by bots.

func (*Client) AuthExportLoginToken

func (c *Client) AuthExportLoginToken(ctx context.Context, request *AuthExportLoginTokenRequest) (AuthLoginTokenClass, error)

AuthExportLoginToken invokes method auth.exportLoginToken#b1b41517 returning error if any. Generate a login token, for login via QR code¹. The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken URL in the QR code. For more info, see login via QR code¹.

Links:

  1. https://core.telegram.org/api/qr-login
  2. https://core.telegram.org/api/qr-login

See https://core.telegram.org/method/auth.exportLoginToken for reference.

func (*Client) AuthImportAuthorization

func (c *Client) AuthImportAuthorization(ctx context.Context, request *AuthImportAuthorizationRequest) (AuthAuthorizationClass, error)

AuthImportAuthorization invokes method auth.importAuthorization#e3ef9613 returning error if any. Logs in a user using a key transmitted from his native data-centre.

Possible errors:

400 AUTH_BYTES_INVALID: The provided authorization is invalid
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/auth.importAuthorization for reference. Can be used by bots.

func (*Client) AuthImportBotAuthorization

func (c *Client) AuthImportBotAuthorization(ctx context.Context, request *AuthImportBotAuthorizationRequest) (AuthAuthorizationClass, error)

AuthImportBotAuthorization invokes method auth.importBotAuthorization#67a3ff2c returning error if any. Login as a bot

Possible errors:

400 ACCESS_TOKEN_EXPIRED: Bot token expired
400 ACCESS_TOKEN_INVALID: The provided token is not valid
400 API_ID_INVALID: The api_id/api_hash combination is invalid
401 AUTH_KEY_INVALID: Auth key invalid

See https://core.telegram.org/method/auth.importBotAuthorization for reference. Can be used by bots.

func (*Client) AuthImportLoginToken

func (c *Client) AuthImportLoginToken(ctx context.Context, token []byte) (AuthLoginTokenClass, error)

AuthImportLoginToken invokes method auth.importLoginToken#95ac5ce4 returning error if any. Login using a redirected login token, generated in case of DC mismatch during QR code login¹. For more info, see login via QR code¹.

Links:

  1. https://core.telegram.org/api/qr-login
  2. https://core.telegram.org/api/qr-login

Possible errors:

400 AUTH_TOKEN_EXPIRED: The authorization token has expired

See https://core.telegram.org/method/auth.importLoginToken for reference.

func (*Client) AuthLogOut

func (c *Client) AuthLogOut(ctx context.Context) (bool, error)

AuthLogOut invokes method auth.logOut#5717da40 returning error if any. Logs out the user.

See https://core.telegram.org/method/auth.logOut for reference. Can be used by bots.

func (*Client) AuthRecoverPassword

func (c *Client) AuthRecoverPassword(ctx context.Context, code string) (AuthAuthorizationClass, error)

AuthRecoverPassword invokes method auth.recoverPassword#4ea56e92 returning error if any. Reset the 2FA password¹ using the recovery code sent using auth.requestPasswordRecovery².

Links:

  1. https://core.telegram.org/api/srp
  2. https://core.telegram.org/method/auth.requestPasswordRecovery

Possible errors:

400 CODE_EMPTY: The provided code is empty

See https://core.telegram.org/method/auth.recoverPassword for reference.

func (*Client) AuthRequestPasswordRecovery

func (c *Client) AuthRequestPasswordRecovery(ctx context.Context) (*AuthPasswordRecovery, error)

AuthRequestPasswordRecovery invokes method auth.requestPasswordRecovery#d897bc66 returning error if any. Request recovery code of a 2FA password¹, only for accounts with a recovery email configured².

Links:

  1. https://core.telegram.org/api/srp
  2. https://core.telegram.org/api/srp#email-verification

Possible errors:

400 PASSWORD_EMPTY: The provided password is empty

See https://core.telegram.org/method/auth.requestPasswordRecovery for reference.

func (*Client) AuthResendCode

func (c *Client) AuthResendCode(ctx context.Context, request *AuthResendCodeRequest) (*AuthSentCode, error)

AuthResendCode invokes method auth.resendCode#3ef1a9bf returning error if any. Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login¹ for more info.

Links:

  1. https://core.telegram.org/api/auth

Possible errors:

400 PHONE_CODE_EXPIRED: The phone code you provided has expired, this may happen if it was sent to any chat on telegram (if the code is sent through a telegram chat (not the official account) to avoid it append or prepend to the code some chars)
400 PHONE_CODE_HASH_EMPTY: phone_code_hash is missing
400 PHONE_NUMBER_INVALID: The phone number is invalid

See https://core.telegram.org/method/auth.resendCode for reference.

func (*Client) AuthResetAuthorizations

func (c *Client) AuthResetAuthorizations(ctx context.Context) (bool, error)

AuthResetAuthorizations invokes method auth.resetAuthorizations#9fab0d1a returning error if any. Terminates all user's authorized sessions except for the current one. After calling this method it is necessary to reregister the current device using the method account.registerDevice¹

Links:

  1. https://core.telegram.org/method/account.registerDevice

Possible errors:

406 FRESH_RESET_AUTHORISATION_FORBIDDEN: You can't logout other sessions if less than 24 hours have passed since you logged on the current session

See https://core.telegram.org/method/auth.resetAuthorizations for reference.

func (*Client) AuthSendCode

func (c *Client) AuthSendCode(ctx context.Context, request *AuthSendCodeRequest) (*AuthSentCode, error)

AuthSendCode invokes method auth.sendCode#a677244f returning error if any. Send the verification code for login

Possible errors:

400 API_ID_INVALID: API ID invalid
400 API_ID_PUBLISHED_FLOOD: This API id was published somewhere, you can't use it now
401 AUTH_KEY_PERM_EMPTY: The temporary auth key must be binded to the permanent auth key to use these methods.
400 INPUT_REQUEST_TOO_LONG: The request is too big
303 NETWORK_MIGRATE_X: Repeat the query to data-center X
303 PHONE_MIGRATE_X: Repeat the query to data-center X
400 PHONE_NUMBER_APP_SIGNUP_FORBIDDEN: You can't sign up using this app
400 PHONE_NUMBER_BANNED: The provided phone number is banned from telegram
400 PHONE_NUMBER_FLOOD: You asked for the code too many times.
400 PHONE_NUMBER_INVALID: Invalid phone number
406 PHONE_PASSWORD_FLOOD: You have tried logging in too many times
400 PHONE_PASSWORD_PROTECTED: This phone is password protected
400 SMS_CODE_CREATE_FAILED: An error occurred while creating the SMS code

See https://core.telegram.org/method/auth.sendCode for reference.

func (*Client) AuthSignIn

func (c *Client) AuthSignIn(ctx context.Context, request *AuthSignInRequest) (AuthAuthorizationClass, error)

AuthSignIn invokes method auth.signIn#bcd51581 returning error if any. Signs in a user with a validated phone number.

Possible errors:

400 PHONE_CODE_EMPTY: phone_code from the SMS is empty
400 PHONE_CODE_EXPIRED: SMS expired
400 PHONE_CODE_INVALID: Invalid SMS code was sent
400 PHONE_NUMBER_INVALID: Invalid phone number
400 PHONE_NUMBER_UNOCCUPIED: The code is valid but no user with the given number is registered

See https://core.telegram.org/method/auth.signIn for reference.

func (*Client) AuthSignUp

func (c *Client) AuthSignUp(ctx context.Context, request *AuthSignUpRequest) (AuthAuthorizationClass, error)

AuthSignUp invokes method auth.signUp#80eee427 returning error if any. Registers a validated phone number in the system.

Possible errors:

400 FIRSTNAME_INVALID: Invalid first name
400 INPUT_REQUEST_TOO_LONG: The request is too big
400 LASTNAME_INVALID: Invalid last name
400 PHONE_CODE_EMPTY: phone_code from a SMS is empty
400 PHONE_CODE_EXPIRED: SMS expired
400 PHONE_CODE_INVALID: Invalid SMS code was sent
400 PHONE_NUMBER_FLOOD: You asked for the code too many times.
400 PHONE_NUMBER_INVALID: Invalid phone number
400 PHONE_NUMBER_OCCUPIED: The phone number is already in use

See https://core.telegram.org/method/auth.signUp for reference.

func (*Client) BotsAnswerWebhookJSONQuery

func (c *Client) BotsAnswerWebhookJSONQuery(ctx context.Context, request *BotsAnswerWebhookJSONQueryRequest) (bool, error)

BotsAnswerWebhookJSONQuery invokes method bots.answerWebhookJSONQuery#e6213f4d returning error if any. Answers a custom query; for bots only

Possible errors:

400 QUERY_ID_INVALID: The query ID is invalid
400 USER_BOT_INVALID: This method can only be called by a bot

See https://core.telegram.org/method/bots.answerWebhookJSONQuery for reference. Can be used by bots.

func (*Client) BotsSendCustomRequest

func (c *Client) BotsSendCustomRequest(ctx context.Context, request *BotsSendCustomRequestRequest) (*DataJSON, error)

BotsSendCustomRequest invokes method bots.sendCustomRequest#aa2769ed returning error if any. Sends a custom request; for bots only

Possible errors:

400 METHOD_INVALID: The specified method is invalid
400 USER_BOT_INVALID: This method can only be called by a bot

See https://core.telegram.org/method/bots.sendCustomRequest for reference. Can be used by bots.

func (*Client) BotsSetBotCommands

func (c *Client) BotsSetBotCommands(ctx context.Context, commands []BotCommand) (bool, error)

BotsSetBotCommands invokes method bots.setBotCommands#805d46f6 returning error if any. Set bot command list

See https://core.telegram.org/method/bots.setBotCommands for reference. Can be used by bots.

func (*Client) ChannelsCheckUsername

func (c *Client) ChannelsCheckUsername(ctx context.Context, request *ChannelsCheckUsernameRequest) (bool, error)

ChannelsCheckUsername invokes method channels.checkUsername#10e6bd2c returning error if any. Check if a username is free and can be assigned to a channel/supergroup

Possible errors:

400 CHANNELS_ADMIN_PUBLIC_TOO_MUCH: You're admin of too many public channels, make some channels private to change the username of this channel
400 CHANNEL_INVALID: The provided channel is invalid
400 CHAT_ID_INVALID: The provided chat id is invalid
400 USERNAME_INVALID: The provided username is not valid

See https://core.telegram.org/method/channels.checkUsername for reference.

func (*Client) ChannelsCreateChannel

func (c *Client) ChannelsCreateChannel(ctx context.Context, request *ChannelsCreateChannelRequest) (UpdatesClass, error)

ChannelsCreateChannel invokes method channels.createChannel#3d5fb10f returning error if any. Create a supergroup/channel¹.

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNELS_TOO_MUCH: You have joined too many channels/supergroups
400 CHAT_ABOUT_TOO_LONG: Chat about too long
400 CHAT_TITLE_EMPTY: No chat title provided
403 USER_RESTRICTED: You're spamreported, you can't create channels or chats.

See https://core.telegram.org/method/channels.createChannel for reference.

func (*Client) ChannelsDeleteChannel

func (c *Client) ChannelsDeleteChannel(ctx context.Context, channel InputChannelClass) (UpdatesClass, error)

ChannelsDeleteChannel invokes method channels.deleteChannel#c0111fe3 returning error if any. Delete a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHANNEL_TOO_LARGE: Channel is too large to be deleted; this error is issued when trying to delete channels with more than 1000 members (subject to change)
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat

See https://core.telegram.org/method/channels.deleteChannel for reference.

func (*Client) ChannelsDeleteHistory

func (c *Client) ChannelsDeleteHistory(ctx context.Context, request *ChannelsDeleteHistoryRequest) (bool, error)

ChannelsDeleteHistory invokes method channels.deleteHistory#af369d42 returning error if any. Delete the history of a supergroup¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup

See https://core.telegram.org/method/channels.deleteHistory for reference.

func (*Client) ChannelsDeleteMessages

func (c *Client) ChannelsDeleteMessages(ctx context.Context, request *ChannelsDeleteMessagesRequest) (*MessagesAffectedMessages, error)

ChannelsDeleteMessages invokes method channels.deleteMessages#84c1fd4e returning error if any. Delete messages in a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
403 MESSAGE_DELETE_FORBIDDEN: You can't delete one of the messages you tried to delete, most likely because it is a service message.
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/channels.deleteMessages for reference. Can be used by bots.

func (*Client) ChannelsDeleteUserHistory

func (c *Client) ChannelsDeleteUserHistory(ctx context.Context, request *ChannelsDeleteUserHistoryRequest) (*MessagesAffectedHistory, error)

ChannelsDeleteUserHistory invokes method channels.deleteUserHistory#d10dd71b returning error if any. Delete all messages sent by a certain user in a supergroup¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 MSG_ID_INVALID: Invalid message ID provided
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/channels.deleteUserHistory for reference.

func (*Client) ChannelsEditAdmin

func (c *Client) ChannelsEditAdmin(ctx context.Context, request *ChannelsEditAdminRequest) (UpdatesClass, error)

ChannelsEditAdmin invokes method channels.editAdmin#d33c8902 returning error if any. Modify the admin rights of a user in a supergroup/channel¹.

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 ADMINS_TOO_MUCH: There are too many admins
400 BOTS_TOO_MUCH: There are too many bots in this chat/channel
400 BOT_CHANNELS_NA: Bots can't edit admin privileges
400 BOT_GROUPS_BLOCKED: This bot can't be added to groups
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
403 CHAT_ADMIN_INVITE_REQUIRED: You do not have the rights to do this
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
406 FRESH_CHANGE_ADMINS_FORBIDDEN: You were just elected admin, you can't add or modify other admins yet
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 PEER_ID_INVALID: The provided peer id is invalid
403 RIGHT_FORBIDDEN: Your admin rights do not allow you to do this
400 USERS_TOO_MUCH: The maximum number of users has been exceeded (to create a chat, for example)
400 USER_BLOCKED: User blocked
403 USER_CHANNELS_TOO_MUCH: One of the users you tried to add is already in too many channels/supergroups
400 USER_CREATOR: You can't leave this channel, because you're its creator
400 USER_ID_INVALID: The provided user ID is invalid
400 USER_NOT_MUTUAL_CONTACT: The provided user is not a mutual contact
403 USER_PRIVACY_RESTRICTED: The user's privacy settings do not allow you to do this
403 USER_RESTRICTED: You're spamreported, you can't create channels or chats.

See https://core.telegram.org/method/channels.editAdmin for reference. Can be used by bots.

func (*Client) ChannelsEditBanned

func (c *Client) ChannelsEditBanned(ctx context.Context, request *ChannelsEditBannedRequest) (UpdatesClass, error)

ChannelsEditBanned invokes method channels.editBanned#72796912 returning error if any. Ban/unban/kick a user in a supergroup/channel¹.

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 MSG_ID_INVALID: Invalid message ID provided
400 PINNED_DIALOGS_TOO_MUCH: Too many pinned dialogs
400 USER_ADMIN_INVALID: You're not an admin
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/channels.editBanned for reference. Can be used by bots.

func (*Client) ChannelsEditCreator

func (c *Client) ChannelsEditCreator(ctx context.Context, request *ChannelsEditCreatorRequest) (UpdatesClass, error)

ChannelsEditCreator invokes method channels.editCreator#8f38cd1f returning error if any. Transfer channel ownership

Possible errors:

400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 PASSWORD_HASH_INVALID: The provided password hash is invalid
400 PASSWORD_MISSING: You must enable 2FA in order to transfer ownership of a channel
400 PASSWORD_TOO_FRESH_X: The password was modified less than 24 hours ago, try again in X seconds
400 SESSION_TOO_FRESH_X: This session was created less than 24 hours ago, try again in X seconds
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/channels.editCreator for reference.

func (*Client) ChannelsEditLocation

func (c *Client) ChannelsEditLocation(ctx context.Context, request *ChannelsEditLocationRequest) (bool, error)

ChannelsEditLocation invokes method channels.editLocation#58e63f6d returning error if any. Edit location of geogroup

Possible errors:

400 MEGAGROUP_REQUIRED: You can only use this method on a supergroup

See https://core.telegram.org/method/channels.editLocation for reference.

func (*Client) ChannelsEditPhoto

func (c *Client) ChannelsEditPhoto(ctx context.Context, request *ChannelsEditPhotoRequest) (UpdatesClass, error)

ChannelsEditPhoto invokes method channels.editPhoto#f12e57c9 returning error if any. Change the photo of a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_NOT_MODIFIED: The pinned message wasn't modified
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 PHOTO_CROP_SIZE_SMALL: Photo is too small
400 PHOTO_EXT_INVALID: The extension of the photo is invalid
400 PHOTO_INVALID: Photo invalid

See https://core.telegram.org/method/channels.editPhoto for reference. Can be used by bots.

func (*Client) ChannelsEditTitle

func (c *Client) ChannelsEditTitle(ctx context.Context, request *ChannelsEditTitleRequest) (UpdatesClass, error)

ChannelsEditTitle invokes method channels.editTitle#566decd0 returning error if any. Edit the name of a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_NOT_MODIFIED: The pinned message wasn't modified
400 CHAT_TITLE_EMPTY: No chat title provided
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat

See https://core.telegram.org/method/channels.editTitle for reference. Can be used by bots.

func (c *Client) ChannelsExportMessageLink(ctx context.Context, request *ChannelsExportMessageLinkRequest) (*ExportedMessageLink, error)

ChannelsExportMessageLink invokes method channels.exportMessageLink#e63fadeb returning error if any. Get link and embed info of a message in a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 MESSAGE_ID_INVALID: The provided message id is invalid
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/channels.exportMessageLink for reference.

func (*Client) ChannelsGetAdminLog

func (c *Client) ChannelsGetAdminLog(ctx context.Context, request *ChannelsGetAdminLogRequest) (*ChannelsAdminLogResults, error)

ChannelsGetAdminLog invokes method channels.getAdminLog#33ddf480 returning error if any. Get the admin log of a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/channels.getAdminLog for reference.

func (*Client) ChannelsGetAdminedPublicChannels

func (c *Client) ChannelsGetAdminedPublicChannels(ctx context.Context, request *ChannelsGetAdminedPublicChannelsRequest) (MessagesChatsClass, error)

ChannelsGetAdminedPublicChannels invokes method channels.getAdminedPublicChannels#f8b036af returning error if any. Get channels/supergroups/geogroups¹ we're admin in. Usually called when the user exceeds the limit² for owned public channels/supergroups/geogroups³, and the user is given the choice to remove one of his channels/supergroups/geogroups.

Links:

  1. https://core.telegram.org/api/channel
  2. https://core.telegram.org/constructor/config
  3. https://core.telegram.org/api/channel

Possible errors:

400 CHANNELS_ADMIN_LOCATED_TOO_MUCH: Returned if both the check_limit and the by_location flags are set and the user has reached the limit of public geogroups
400 CHANNELS_ADMIN_PUBLIC_TOO_MUCH: Returned if the check_limit flag is set and the user has reached the limit of public channels/supergroups

See https://core.telegram.org/method/channels.getAdminedPublicChannels for reference.

func (*Client) ChannelsGetChannels

func (c *Client) ChannelsGetChannels(ctx context.Context, id []InputChannelClass) (MessagesChatsClass, error)

ChannelsGetChannels invokes method channels.getChannels#a7f6bbb returning error if any. Get info about channels/supergroups¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/channels.getChannels for reference. Can be used by bots.

func (*Client) ChannelsGetFullChannel

func (c *Client) ChannelsGetFullChannel(ctx context.Context, channel InputChannelClass) (*MessagesChatFull, error)

ChannelsGetFullChannel invokes method channels.getFullChannel#8736a09 returning error if any. Get full info about a channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
403 CHANNEL_PUBLIC_GROUP_NA: channel/supergroup not available
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/channels.getFullChannel for reference. Can be used by bots.

func (*Client) ChannelsGetGroupsForDiscussion

func (c *Client) ChannelsGetGroupsForDiscussion(ctx context.Context) (MessagesChatsClass, error)

ChannelsGetGroupsForDiscussion invokes method channels.getGroupsForDiscussion#f5dad378 returning error if any. Get all groups that can be used as discussion groups¹. Returned legacy 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 channels.togglePreHistoryHidden³, first.

Links:

  1. https://core.telegram.org/api/discussion
  2. https://core.telegram.org/api/channel
  3. https://core.telegram.org/api/channel
  4. https://core.telegram.org/method/channels.togglePreHistoryHidden

See https://core.telegram.org/method/channels.getGroupsForDiscussion for reference.

func (*Client) ChannelsGetInactiveChannels

func (c *Client) ChannelsGetInactiveChannels(ctx context.Context) (*MessagesInactiveChats, error)

ChannelsGetInactiveChannels invokes method channels.getInactiveChannels#11e831ee returning error if any. Get inactive channels and supergroups

See https://core.telegram.org/method/channels.getInactiveChannels for reference.

func (*Client) ChannelsGetLeftChannels

func (c *Client) ChannelsGetLeftChannels(ctx context.Context, offset int) (MessagesChatsClass, error)

ChannelsGetLeftChannels invokes method channels.getLeftChannels#8341ecc0 returning error if any. Get a list of channels/supergroups¹ we left

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

403 TAKEOUT_REQUIRED: A takeout session has to be initialized, first

See https://core.telegram.org/method/channels.getLeftChannels for reference.

func (*Client) ChannelsGetMessages

func (c *Client) ChannelsGetMessages(ctx context.Context, request *ChannelsGetMessagesRequest) (MessagesMessagesClass, error)

ChannelsGetMessages invokes method channels.getMessages#ad8c9a23 returning error if any. Get channel/supergroup¹ messages

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 MESSAGE_IDS_EMPTY: No message ids were provided
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/channels.getMessages for reference. Can be used by bots.

func (*Client) ChannelsGetParticipant

func (c *Client) ChannelsGetParticipant(ctx context.Context, request *ChannelsGetParticipantRequest) (*ChannelsChannelParticipant, error)

ChannelsGetParticipant invokes method channels.getParticipant#546dd7a6 returning error if any. Get info about a channel/supergroup¹ participant

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 MSG_ID_INVALID: Invalid message ID provided
400 USER_ID_INVALID: The provided user ID is invalid
400 USER_NOT_PARTICIPANT: You're not a member of this supergroup/channel

See https://core.telegram.org/method/channels.getParticipant for reference. Can be used by bots.

func (*Client) ChannelsGetParticipants

func (c *Client) ChannelsGetParticipants(ctx context.Context, request *ChannelsGetParticipantsRequest) (ChannelsChannelParticipantsClass, error)

ChannelsGetParticipants invokes method channels.getParticipants#123e05e9 returning error if any. Get the participants of a supergroup/channel¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 INPUT_CONSTRUCTOR_INVALID: The provided constructor is invalid

See https://core.telegram.org/method/channels.getParticipants for reference. Can be used by bots.

func (*Client) ChannelsInviteToChannel

func (c *Client) ChannelsInviteToChannel(ctx context.Context, request *ChannelsInviteToChannelRequest) (UpdatesClass, error)

ChannelsInviteToChannel invokes method channels.inviteToChannel#199f3a6c returning error if any. Invite users to a channel/supergroup

Possible errors:

400 BOTS_TOO_MUCH: There are too many bots in this chat/channel
400 BOT_GROUPS_BLOCKED: This bot can't be added to groups
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_INVALID: Invalid chat
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MSG_ID_INVALID: Invalid message ID provided
400 USERS_TOO_MUCH: The maximum number of users has been exceeded (to create a chat, for example)
400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels
400 USER_BLOCKED: User blocked
400 USER_BOT: Bots can only be admins in channels.
403 USER_CHANNELS_TOO_MUCH: One of the users you tried to add is already in too many channels/supergroups
400 USER_ID_INVALID: The provided user ID is invalid
400 USER_KICKED: This user was kicked from this supergroup/channel
400 USER_NOT_MUTUAL_CONTACT: The provided user is not a mutual contact
403 USER_PRIVACY_RESTRICTED: The user's privacy settings do not allow you to do this

See https://core.telegram.org/method/channels.inviteToChannel for reference.

func (*Client) ChannelsJoinChannel

func (c *Client) ChannelsJoinChannel(ctx context.Context, channel InputChannelClass) (UpdatesClass, error)

ChannelsJoinChannel invokes method channels.joinChannel#24b524c5 returning error if any. Join a channel/supergroup

Possible errors:

400 CHANNELS_TOO_MUCH: You have joined too many channels/supergroups
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 INVITE_HASH_EMPTY: The invite hash is empty
400 INVITE_HASH_EXPIRED: The invite link has expired
400 INVITE_HASH_INVALID: The invite hash is invalid
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid
400 USERS_TOO_MUCH: The maximum number of users has been exceeded (to create a chat, for example)
400 USER_ALREADY_PARTICIPANT: The user is already in the group
400 USER_CHANNELS_TOO_MUCH: One of the users you tried to add is already in too many channels/supergroups

See https://core.telegram.org/method/channels.joinChannel for reference.

func (*Client) ChannelsLeaveChannel

func (c *Client) ChannelsLeaveChannel(ctx context.Context, channel InputChannelClass) (UpdatesClass, error)

ChannelsLeaveChannel invokes method channels.leaveChannel#f836aa95 returning error if any. Leave a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
403 CHANNEL_PUBLIC_GROUP_NA: channel/supergroup not available
400 MSG_ID_INVALID: Invalid message ID provided
400 USER_CREATOR: You can't leave this channel, because you're its creator
400 USER_NOT_PARTICIPANT: You're not a member of this supergroup/channel

See https://core.telegram.org/method/channels.leaveChannel for reference. Can be used by bots.

func (*Client) ChannelsReadHistory

func (c *Client) ChannelsReadHistory(ctx context.Context, request *ChannelsReadHistoryRequest) (bool, error)

ChannelsReadHistory invokes method channels.readHistory#cc104937 returning error if any. Mark channel/supergroup¹ history as read

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/channels.readHistory for reference.

func (*Client) ChannelsReadMessageContents

func (c *Client) ChannelsReadMessageContents(ctx context.Context, request *ChannelsReadMessageContentsRequest) (bool, error)

ChannelsReadMessageContents invokes method channels.readMessageContents#eab5dc38 returning error if any. Mark channel/supergroup¹ message contents as read

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/channels.readMessageContents for reference.

func (*Client) ChannelsReportSpam

func (c *Client) ChannelsReportSpam(ctx context.Context, request *ChannelsReportSpamRequest) (bool, error)

ChannelsReportSpam invokes method channels.reportSpam#fe087810 returning error if any. Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/channels.reportSpam for reference.

func (*Client) ChannelsSetDiscussionGroup

func (c *Client) ChannelsSetDiscussionGroup(ctx context.Context, request *ChannelsSetDiscussionGroupRequest) (bool, error)

ChannelsSetDiscussionGroup invokes method channels.setDiscussionGroup#40582bb2 returning error if any. Associate a group to a channel as discussion group¹ for that channel

Links:

  1. https://core.telegram.org/api/discussion

Possible errors:

400 BROADCAST_ID_INVALID: Broadcast ID invalid
400 LINK_NOT_MODIFIED: Discussion link not modified
400 MEGAGROUP_ID_INVALID: Invalid supergroup ID

See https://core.telegram.org/method/channels.setDiscussionGroup for reference.

func (*Client) ChannelsSetStickers

func (c *Client) ChannelsSetStickers(ctx context.Context, request *ChannelsSetStickersRequest) (bool, error)

ChannelsSetStickers invokes method channels.setStickers#ea8ca4f9 returning error if any. Associate a stickerset to the supergroup

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 PARTICIPANTS_TOO_FEW: Not enough participants

See https://core.telegram.org/method/channels.setStickers for reference. Can be used by bots.

func (*Client) ChannelsTogglePreHistoryHidden

func (c *Client) ChannelsTogglePreHistoryHidden(ctx context.Context, request *ChannelsTogglePreHistoryHiddenRequest) (UpdatesClass, error)

ChannelsTogglePreHistoryHidden invokes method channels.togglePreHistoryHidden#eabbb94c returning error if any. Hide/unhide message history for new channel/supergroup users

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_ID_INVALID: The provided chat id is invalid
400 CHAT_LINK_EXISTS: The chat is public, you can't hide the history to new users
400 CHAT_NOT_MODIFIED: The pinned message wasn't modified

See https://core.telegram.org/method/channels.togglePreHistoryHidden for reference.

func (*Client) ChannelsToggleSignatures

func (c *Client) ChannelsToggleSignatures(ctx context.Context, request *ChannelsToggleSignaturesRequest) (UpdatesClass, error)

ChannelsToggleSignatures invokes method channels.toggleSignatures#1f69b606 returning error if any. Enable/disable message signatures in channels

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHAT_ID_INVALID: The provided chat id is invalid

See https://core.telegram.org/method/channels.toggleSignatures for reference.

func (*Client) ChannelsToggleSlowMode

func (c *Client) ChannelsToggleSlowMode(ctx context.Context, request *ChannelsToggleSlowModeRequest) (UpdatesClass, error)

ChannelsToggleSlowMode invokes method channels.toggleSlowMode#edd49ef0 returning error if any. Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds

Possible errors:

400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_NOT_MODIFIED: The pinned message wasn't modified
400 INPUT_METHOD_INVALID_1192227_X: Invalid method
400 INPUT_METHOD_INVALID_1604042050_X: Invalid method
400 SECONDS_INVALID: Invalid duration provided

See https://core.telegram.org/method/channels.toggleSlowMode for reference.

func (*Client) ChannelsUpdateUsername

func (c *Client) ChannelsUpdateUsername(ctx context.Context, request *ChannelsUpdateUsernameRequest) (bool, error)

ChannelsUpdateUsername invokes method channels.updateUsername#3514b3de returning error if any. Change the username of a supergroup/channel

Possible errors:

400 CHANNELS_ADMIN_PUBLIC_TOO_MUCH: You're admin of too many public channels, make some channels private to change the username of this channel
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_NOT_MODIFIED: The pinned message wasn't modified
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 USERNAME_INVALID: The provided username is not valid
400 USERNAME_NOT_MODIFIED: The username was not modified
400 USERNAME_OCCUPIED: The provided username is already occupied

See https://core.telegram.org/method/channels.updateUsername for reference.

func (*Client) ContactsAcceptContact

func (c *Client) ContactsAcceptContact(ctx context.Context, id InputUserClass) (UpdatesClass, error)

ContactsAcceptContact invokes method contacts.acceptContact#f831a20f returning error if any. If the peer settings¹ of a new user allow us to add him as contact, add that user as contact

Links:

  1. https://core.telegram.org/constructor/peerSettings

Possible errors:

400 CONTACT_ADD_MISSING: Contact to add is missing
400 CONTACT_ID_INVALID: The provided contact ID is invalid
400 CONTACT_REQ_MISSING: Missing contact request

See https://core.telegram.org/method/contacts.acceptContact for reference.

func (*Client) ContactsAddContact

func (c *Client) ContactsAddContact(ctx context.Context, request *ContactsAddContactRequest) (UpdatesClass, error)

ContactsAddContact invokes method contacts.addContact#e8f463d0 returning error if any. Add an existing telegram user as contact. Use contacts.importContacts¹ to add contacts by phone number, without knowing their Telegram ID.

Links:

  1. https://core.telegram.org/method/contacts.importContacts

Possible errors:

400 CONTACT_ID_INVALID: The provided contact ID is invalid
400 CONTACT_NAME_EMPTY: Contact name empty
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/contacts.addContact for reference.

func (*Client) ContactsBlock

func (c *Client) ContactsBlock(ctx context.Context, id InputPeerClass) (bool, error)

ContactsBlock invokes method contacts.block#68cc1411 returning error if any. Adds the user to the blacklist.

Possible errors:

400 CONTACT_ID_INVALID: The provided contact ID is invalid
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/contacts.block for reference.

func (*Client) ContactsBlockFromReplies

func (c *Client) ContactsBlockFromReplies(ctx context.Context, request *ContactsBlockFromRepliesRequest) (UpdatesClass, error)

ContactsBlockFromReplies invokes method contacts.blockFromReplies#29a8962c returning error if any. Stop getting notifications about thread replies¹ of a certain user in @replies

Links:

  1. https://core.telegram.org/api/threads

See https://core.telegram.org/method/contacts.blockFromReplies for reference. Can be used by bots.

func (*Client) ContactsDeleteByPhones

func (c *Client) ContactsDeleteByPhones(ctx context.Context, phones []string) (bool, error)

ContactsDeleteByPhones invokes method contacts.deleteByPhones#1013fd9e returning error if any. Delete contacts by phone number

See https://core.telegram.org/method/contacts.deleteByPhones for reference.

func (*Client) ContactsDeleteContacts

func (c *Client) ContactsDeleteContacts(ctx context.Context, id []InputUserClass) (UpdatesClass, error)

ContactsDeleteContacts invokes method contacts.deleteContacts#96a0e00 returning error if any. Deletes several contacts from the list.

See https://core.telegram.org/method/contacts.deleteContacts for reference.

func (*Client) ContactsGetBlocked

func (c *Client) ContactsGetBlocked(ctx context.Context, request *ContactsGetBlockedRequest) (ContactsBlockedClass, error)

ContactsGetBlocked invokes method contacts.getBlocked#f57c350f returning error if any. Returns the list of blocked users.

See https://core.telegram.org/method/contacts.getBlocked for reference.

func (*Client) ContactsGetContactIDs added in v0.8.0

func (c *Client) ContactsGetContactIDs(ctx context.Context, hash int) ([]int, error)

ContactsGetContactIDs invokes method contacts.getContactIDs#2caa4a42 returning error if any. Get contact by telegram IDs

See https://core.telegram.org/method/contacts.getContactIDs for reference.

func (*Client) ContactsGetContacts

func (c *Client) ContactsGetContacts(ctx context.Context, hash int) (ContactsContactsClass, error)

ContactsGetContacts invokes method contacts.getContacts#c023849f returning error if any. Returns the current user's contact list.

See https://core.telegram.org/method/contacts.getContacts for reference.

func (*Client) ContactsGetLocated

func (c *Client) ContactsGetLocated(ctx context.Context, request *ContactsGetLocatedRequest) (UpdatesClass, error)

ContactsGetLocated invokes method contacts.getLocated#d348bc44 returning error if any. Get contacts near you

Possible errors:

400 GEO_POINT_INVALID: Invalid geoposition provided
406 USERPIC_UPLOAD_REQUIRED: You must have a profile picture to publish your geolocation

See https://core.telegram.org/method/contacts.getLocated for reference.

func (*Client) ContactsGetSaved added in v0.8.0

func (c *Client) ContactsGetSaved(ctx context.Context) ([]SavedPhoneContact, error)

ContactsGetSaved invokes method contacts.getSaved#82f1e39f returning error if any. Get all contacts

Possible errors:

403 TAKEOUT_REQUIRED: A takeout session has to be initialized, first

See https://core.telegram.org/method/contacts.getSaved for reference.

func (*Client) ContactsGetStatuses added in v0.8.0

func (c *Client) ContactsGetStatuses(ctx context.Context) ([]ContactStatus, error)

ContactsGetStatuses invokes method contacts.getStatuses#c4a353ee returning error if any. Returns the list of contact statuses.

See https://core.telegram.org/method/contacts.getStatuses for reference.

func (*Client) ContactsGetTopPeers

func (c *Client) ContactsGetTopPeers(ctx context.Context, request *ContactsGetTopPeersRequest) (ContactsTopPeersClass, error)

ContactsGetTopPeers invokes method contacts.getTopPeers#d4982db5 returning error if any. Get most used peers

Possible errors:

400 TYPES_EMPTY: No top peer type was provided

See https://core.telegram.org/method/contacts.getTopPeers for reference.

func (*Client) ContactsImportContacts

func (c *Client) ContactsImportContacts(ctx context.Context, contacts []InputPhoneContact) (*ContactsImportedContacts, error)

ContactsImportContacts invokes method contacts.importContacts#2c800be5 returning error if any. Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info. Use contacts.addContact¹ to add Telegram contacts without actually using their phone number.

Links:

  1. https://core.telegram.org/method/contacts.addContact

See https://core.telegram.org/method/contacts.importContacts for reference.

func (*Client) ContactsResetSaved

func (c *Client) ContactsResetSaved(ctx context.Context) (bool, error)

ContactsResetSaved invokes method contacts.resetSaved#879537f1 returning error if any. Delete saved contacts

See https://core.telegram.org/method/contacts.resetSaved for reference.

func (*Client) ContactsResetTopPeerRating

func (c *Client) ContactsResetTopPeerRating(ctx context.Context, request *ContactsResetTopPeerRatingRequest) (bool, error)

ContactsResetTopPeerRating invokes method contacts.resetTopPeerRating#1ae373ac returning error if any. Reset rating¹ of top peer

Links:

  1. https://core.telegram.org/api/top-rating

Possible errors:

400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/contacts.resetTopPeerRating for reference.

func (*Client) ContactsResolveUsername

func (c *Client) ContactsResolveUsername(ctx context.Context, username string) (*ContactsResolvedPeer, error)

ContactsResolveUsername invokes method contacts.resolveUsername#f93ccba3 returning error if any. Resolve a @username to get peer info

Possible errors:

401 AUTH_KEY_PERM_EMPTY: The temporary auth key must be binded to the permanent auth key to use these methods.
400 CONNECTION_DEVICE_MODEL_EMPTY: Device model empty
400 CONNECTION_LAYER_INVALID: Layer invalid
400 USERNAME_INVALID: The provided username is not valid
400 USERNAME_NOT_OCCUPIED: The provided username is not occupied

See https://core.telegram.org/method/contacts.resolveUsername for reference. Can be used by bots.

func (*Client) ContactsSearch

func (c *Client) ContactsSearch(ctx context.Context, request *ContactsSearchRequest) (*ContactsFound, error)

ContactsSearch invokes method contacts.search#11f812d8 returning error if any. Returns users found by username substring.

Possible errors:

400 QUERY_TOO_SHORT: The query string is too short
400 SEARCH_QUERY_EMPTY: The search query is empty

See https://core.telegram.org/method/contacts.search for reference.

func (*Client) ContactsToggleTopPeers

func (c *Client) ContactsToggleTopPeers(ctx context.Context, enabled bool) (bool, error)

ContactsToggleTopPeers invokes method contacts.toggleTopPeers#8514bdda returning error if any. Enable/disable top peers¹

Links:

  1. https://core.telegram.org/api/top-rating

See https://core.telegram.org/method/contacts.toggleTopPeers for reference.

func (*Client) ContactsUnblock

func (c *Client) ContactsUnblock(ctx context.Context, id InputPeerClass) (bool, error)

ContactsUnblock invokes method contacts.unblock#bea65d50 returning error if any. Deletes the user from the blacklist.

Possible errors:

400 CONTACT_ID_INVALID: The provided contact ID is invalid

See https://core.telegram.org/method/contacts.unblock for reference.

func (*Client) FoldersDeleteFolder

func (c *Client) FoldersDeleteFolder(ctx context.Context, folderid int) (UpdatesClass, error)

FoldersDeleteFolder invokes method folders.deleteFolder#1c295881 returning error if any. Delete a peer folder¹

Links:

  1. https://core.telegram.org/api/folders#peer-folders

See https://core.telegram.org/method/folders.deleteFolder for reference.

func (*Client) FoldersEditPeerFolders

func (c *Client) FoldersEditPeerFolders(ctx context.Context, folderpeers []InputFolderPeer) (UpdatesClass, error)

FoldersEditPeerFolders invokes method folders.editPeerFolders#6847d0ab returning error if any. Edit peers in peer folder¹

Links:

  1. https://core.telegram.org/api/folders#peer-folders

Possible errors:

400 FOLDER_ID_INVALID: Invalid folder ID

See https://core.telegram.org/method/folders.editPeerFolders for reference.

func (*Client) HelpAcceptTermsOfService

func (c *Client) HelpAcceptTermsOfService(ctx context.Context, id DataJSON) (bool, error)

HelpAcceptTermsOfService invokes method help.acceptTermsOfService#ee72f79a returning error if any. Accept the new terms of service

See https://core.telegram.org/method/help.acceptTermsOfService for reference.

func (*Client) HelpDismissSuggestion

func (c *Client) HelpDismissSuggestion(ctx context.Context, suggestion string) (bool, error)

HelpDismissSuggestion invokes method help.dismissSuggestion#77fa99f returning error if any. Dismiss a suggestion

See https://core.telegram.org/method/help.dismissSuggestion for reference. Can be used by bots.

func (*Client) HelpEditUserInfo

func (c *Client) HelpEditUserInfo(ctx context.Context, request *HelpEditUserInfoRequest) (HelpUserInfoClass, error)

HelpEditUserInfo invokes method help.editUserInfo#66b91b70 returning error if any. Internal use

See https://core.telegram.org/method/help.editUserInfo for reference.

func (*Client) HelpGetAppChangelog

func (c *Client) HelpGetAppChangelog(ctx context.Context, prevappversion string) (UpdatesClass, error)

HelpGetAppChangelog invokes method help.getAppChangelog#9010ef6f returning error if any. Get changelog of current app. Typically, an updates¹ constructor will be returned, containing one or more updateServiceNotification² updates with app-specific changelogs.

Links:

  1. https://core.telegram.org/constructor/updates
  2. https://core.telegram.org/constructor/updateServiceNotification

See https://core.telegram.org/method/help.getAppChangelog for reference.

func (*Client) HelpGetAppConfig

func (c *Client) HelpGetAppConfig(ctx context.Context) (JSONValueClass, error)

HelpGetAppConfig invokes method help.getAppConfig#98914110 returning error if any. Get app-specific configuration, see client configuration¹ for more info on the result.

Links:

  1. https://core.telegram.org/api/config#client-configuration

See https://core.telegram.org/method/help.getAppConfig for reference.

func (*Client) HelpGetAppUpdate

func (c *Client) HelpGetAppUpdate(ctx context.Context, source string) (HelpAppUpdateClass, error)

HelpGetAppUpdate invokes method help.getAppUpdate#522d5a7d returning error if any. Returns information on update availability for the current application.

See https://core.telegram.org/method/help.getAppUpdate for reference.

func (*Client) HelpGetCdnConfig

func (c *Client) HelpGetCdnConfig(ctx context.Context) (*CdnConfig, error)

HelpGetCdnConfig invokes method help.getCdnConfig#52029342 returning error if any. Get configuration for CDN¹ file downloads.

Links:

  1. https://core.telegram.org/cdn

Possible errors:

401 AUTH_KEY_PERM_EMPTY: The temporary auth key must be binded to the permanent auth key to use these methods.

See https://core.telegram.org/method/help.getCdnConfig for reference. Can be used by bots.

func (*Client) HelpGetConfig

func (c *Client) HelpGetConfig(ctx context.Context) (*Config, error)

HelpGetConfig invokes method help.getConfig#c4f9186b returning error if any. Returns current configuration, including data center configuration.

Possible errors:

400 CONNECTION_API_ID_INVALID: The provided API id is invalid
400 CONNECTION_APP_VERSION_EMPTY: App version is empty
400 CONNECTION_DEVICE_MODEL_EMPTY: Device model empty
400 CONNECTION_LANG_PACK_INVALID: Language pack invalid
400 CONNECTION_LAYER_INVALID: Layer invalid
400 CONNECTION_NOT_INITED: Connection not initialized
400 CONNECTION_SYSTEM_EMPTY: Connection system empty
400 CONNECTION_SYSTEM_LANG_CODE_EMPTY: The system_lang_code field is empty
400 DATA_INVALID: Encrypted data invalid
400 INPUT_LAYER_INVALID: The provided layer is invalid
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/help.getConfig for reference. Can be used by bots.

func (*Client) HelpGetCountriesList

func (c *Client) HelpGetCountriesList(ctx context.Context, request *HelpGetCountriesListRequest) (HelpCountriesListClass, error)

HelpGetCountriesList invokes method help.getCountriesList#735787a8 returning error if any. Get name, ISO code, localized name and phone codes/patterns of all available countries

See https://core.telegram.org/method/help.getCountriesList for reference. Can be used by bots.

func (*Client) HelpGetDeepLinkInfo

func (c *Client) HelpGetDeepLinkInfo(ctx context.Context, path string) (HelpDeepLinkInfoClass, error)

HelpGetDeepLinkInfo invokes method help.getDeepLinkInfo#3fedc75f returning error if any. Get info about a t.me link

See https://core.telegram.org/method/help.getDeepLinkInfo for reference.

func (*Client) HelpGetInviteText

func (c *Client) HelpGetInviteText(ctx context.Context) (*HelpInviteText, error)

HelpGetInviteText invokes method help.getInviteText#4d392343 returning error if any. Returns localized text of a text message with an invitation.

See https://core.telegram.org/method/help.getInviteText for reference.

func (*Client) HelpGetNearestDc

func (c *Client) HelpGetNearestDc(ctx context.Context) (*NearestDc, error)

HelpGetNearestDc invokes method help.getNearestDc#1fb33026 returning error if any. Returns info on data centre nearest to the user.

See https://core.telegram.org/method/help.getNearestDc for reference.

func (*Client) HelpGetPassportConfig

func (c *Client) HelpGetPassportConfig(ctx context.Context, hash int) (HelpPassportConfigClass, error)

HelpGetPassportConfig invokes method help.getPassportConfig#c661ad08 returning error if any. Get passport¹ configuration

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/method/help.getPassportConfig for reference.

func (*Client) HelpGetPromoData

func (c *Client) HelpGetPromoData(ctx context.Context) (HelpPromoDataClass, error)

HelpGetPromoData invokes method help.getPromoData#c0977421 returning error if any. Get MTProxy/Public Service Announcement information

See https://core.telegram.org/method/help.getPromoData for reference. Can be used by bots.

func (*Client) HelpGetRecentMeUrls

func (c *Client) HelpGetRecentMeUrls(ctx context.Context, referer string) (*HelpRecentMeUrls, error)

HelpGetRecentMeUrls invokes method help.getRecentMeUrls#3dc0f114 returning error if any. Get recently used t.me links

See https://core.telegram.org/method/help.getRecentMeUrls for reference.

func (*Client) HelpGetSupport

func (c *Client) HelpGetSupport(ctx context.Context) (*HelpSupport, error)

HelpGetSupport invokes method help.getSupport#9cdf08cd returning error if any. Returns the support user for the 'ask a question' feature.

See https://core.telegram.org/method/help.getSupport for reference.

func (*Client) HelpGetSupportName

func (c *Client) HelpGetSupportName(ctx context.Context) (*HelpSupportName, error)

HelpGetSupportName invokes method help.getSupportName#d360e72c returning error if any. Get localized name of the telegram support user

Possible errors:

403 USER_INVALID: Invalid user provided

See https://core.telegram.org/method/help.getSupportName for reference.

func (*Client) HelpGetTermsOfServiceUpdate

func (c *Client) HelpGetTermsOfServiceUpdate(ctx context.Context) (HelpTermsOfServiceUpdateClass, error)

HelpGetTermsOfServiceUpdate invokes method help.getTermsOfServiceUpdate#2ca51fd1 returning error if any. Look for updates of telegram's terms of service

See https://core.telegram.org/method/help.getTermsOfServiceUpdate for reference.

func (*Client) HelpGetUserInfo

func (c *Client) HelpGetUserInfo(ctx context.Context, userid InputUserClass) (HelpUserInfoClass, error)

HelpGetUserInfo invokes method help.getUserInfo#38a08d3 returning error if any. Internal use

Possible errors:

403 USER_INVALID: Invalid user provided

See https://core.telegram.org/method/help.getUserInfo for reference.

func (*Client) HelpHidePromoData

func (c *Client) HelpHidePromoData(ctx context.Context, peer InputPeerClass) (bool, error)

HelpHidePromoData invokes method help.hidePromoData#1e251c95 returning error if any. Hide MTProxy/Public Service Announcement information

See https://core.telegram.org/method/help.hidePromoData for reference. Can be used by bots.

func (*Client) HelpSaveAppLog

func (c *Client) HelpSaveAppLog(ctx context.Context, events []InputAppEvent) (bool, error)

HelpSaveAppLog invokes method help.saveAppLog#6f02f748 returning error if any. Saves logs of application on the server.

See https://core.telegram.org/method/help.saveAppLog for reference.

func (*Client) HelpSetBotUpdatesStatus

func (c *Client) HelpSetBotUpdatesStatus(ctx context.Context, request *HelpSetBotUpdatesStatusRequest) (bool, error)

HelpSetBotUpdatesStatus invokes method help.setBotUpdatesStatus#ec22cfcd returning error if any. Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only

See https://core.telegram.org/method/help.setBotUpdatesStatus for reference. Can be used by bots.

func (*Client) LangpackGetDifference

func (c *Client) LangpackGetDifference(ctx context.Context, request *LangpackGetDifferenceRequest) (*LangPackDifference, error)

LangpackGetDifference invokes method langpack.getDifference#cd984aa5 returning error if any. Get new strings in languagepack

Possible errors:

400 LANG_PACK_INVALID: The provided language pack is invalid

See https://core.telegram.org/method/langpack.getDifference for reference.

func (*Client) LangpackGetLangPack

func (c *Client) LangpackGetLangPack(ctx context.Context, request *LangpackGetLangPackRequest) (*LangPackDifference, error)

LangpackGetLangPack invokes method langpack.getLangPack#f2f2330a returning error if any. Get localization pack strings

Possible errors:

400 LANG_PACK_INVALID: The provided language pack is invalid

See https://core.telegram.org/method/langpack.getLangPack for reference.

func (*Client) LangpackGetLanguage

func (c *Client) LangpackGetLanguage(ctx context.Context, request *LangpackGetLanguageRequest) (*LangPackLanguage, error)

LangpackGetLanguage invokes method langpack.getLanguage#6a596502 returning error if any. Get information about a language in a localization pack

See https://core.telegram.org/method/langpack.getLanguage for reference.

func (*Client) LangpackGetLanguages added in v0.8.0

func (c *Client) LangpackGetLanguages(ctx context.Context, langpack string) ([]LangPackLanguage, error)

LangpackGetLanguages invokes method langpack.getLanguages#42c6978f returning error if any. Get information about all languages in a localization pack

Possible errors:

400 LANG_PACK_INVALID: The provided language pack is invalid

See https://core.telegram.org/method/langpack.getLanguages for reference.

func (*Client) LangpackGetStrings added in v0.8.0

func (c *Client) LangpackGetStrings(ctx context.Context, request *LangpackGetStringsRequest) ([]LangPackStringClass, error)

LangpackGetStrings invokes method langpack.getStrings#efea3803 returning error if any. Get strings from a language pack

Possible errors:

400 LANG_PACK_INVALID: The provided language pack is invalid

See https://core.telegram.org/method/langpack.getStrings for reference.

func (*Client) MessagesAcceptEncryption

func (c *Client) MessagesAcceptEncryption(ctx context.Context, request *MessagesAcceptEncryptionRequest) (EncryptedChatClass, error)

MessagesAcceptEncryption invokes method messages.acceptEncryption#3dbc0415 returning error if any. Confirms creation of a secret chat

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid
400 ENCRYPTION_ALREADY_ACCEPTED: Secret chat already accepted
400 ENCRYPTION_ALREADY_DECLINED: The secret chat was already declined

See https://core.telegram.org/method/messages.acceptEncryption for reference.

func (*Client) MessagesAcceptUrlAuth

func (c *Client) MessagesAcceptUrlAuth(ctx context.Context, request *MessagesAcceptUrlAuthRequest) (UrlAuthResultClass, error)

MessagesAcceptUrlAuth invokes method messages.acceptUrlAuth#f729ea98 returning error if any. Use this to accept a Seamless Telegram Login authorization request, for more info click here »¹

Links:

  1. https://core.telegram.org/api/url-authorization

See https://core.telegram.org/method/messages.acceptUrlAuth for reference.

func (*Client) MessagesAddChatUser

func (c *Client) MessagesAddChatUser(ctx context.Context, request *MessagesAddChatUserRequest) (UpdatesClass, error)

MessagesAddChatUser invokes method messages.addChatUser#f9a0aa09 returning error if any. Adds a user to a chat and sends a service message on it.

Possible errors:

400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_ID_INVALID: The provided chat id is invalid
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 PEER_ID_INVALID: The provided peer id is invalid
400 USERS_TOO_MUCH: The maximum number of users has been exceeded (to create a chat, for example)
400 USER_ALREADY_PARTICIPANT: The user is already in the group
400 USER_ID_INVALID: The provided user ID is invalid
403 USER_NOT_MUTUAL_CONTACT: The provided user is not a mutual contact
403 USER_PRIVACY_RESTRICTED: The user's privacy settings do not allow you to do this

See https://core.telegram.org/method/messages.addChatUser for reference.

func (*Client) MessagesCheckChatInvite

func (c *Client) MessagesCheckChatInvite(ctx context.Context, hash string) (ChatInviteClass, error)

MessagesCheckChatInvite invokes method messages.checkChatInvite#3eadb1bb returning error if any. Check the validity of a chat invite link and get basic info about it

Possible errors:

400 INVITE_HASH_EMPTY: The invite hash is empty
400 INVITE_HASH_EXPIRED: The invite link has expired
400 INVITE_HASH_INVALID: The invite hash is invalid

See https://core.telegram.org/method/messages.checkChatInvite for reference.

func (*Client) MessagesClearAllDrafts

func (c *Client) MessagesClearAllDrafts(ctx context.Context) (bool, error)

MessagesClearAllDrafts invokes method messages.clearAllDrafts#7e58ee9c returning error if any. Clear all drafts¹.

Links:

  1. https://core.telegram.org/api/drafts

See https://core.telegram.org/method/messages.clearAllDrafts for reference.

func (*Client) MessagesClearRecentStickers

func (c *Client) MessagesClearRecentStickers(ctx context.Context, request *MessagesClearRecentStickersRequest) (bool, error)

MessagesClearRecentStickers invokes method messages.clearRecentStickers#8999602d returning error if any. Clear recent stickers

See https://core.telegram.org/method/messages.clearRecentStickers for reference.

func (*Client) MessagesCreateChat

func (c *Client) MessagesCreateChat(ctx context.Context, request *MessagesCreateChatRequest) (UpdatesClass, error)

MessagesCreateChat invokes method messages.createChat#9cb126e returning error if any. Creates a new chat.

Possible errors:

400 CHAT_INVALID: Invalid chat
400 CHAT_TITLE_EMPTY: No chat title provided
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 USERS_TOO_FEW: Not enough users (to create a chat, for example)
403 USER_RESTRICTED: You're spamreported, you can't create channels or chats.

See https://core.telegram.org/method/messages.createChat for reference.

func (*Client) MessagesDeleteChatUser

func (c *Client) MessagesDeleteChatUser(ctx context.Context, request *MessagesDeleteChatUserRequest) (UpdatesClass, error)

MessagesDeleteChatUser invokes method messages.deleteChatUser#e0611f16 returning error if any. Deletes a user from a chat and sends a service message on it.

Possible errors:

400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_ID_INVALID: The provided chat id is invalid
400 PEER_ID_INVALID: The provided peer id is invalid
400 USER_ID_INVALID: The provided user ID is invalid
400 USER_NOT_PARTICIPANT: You're not a member of this supergroup/channel

See https://core.telegram.org/method/messages.deleteChatUser for reference. Can be used by bots.

func (*Client) MessagesDeleteHistory

func (c *Client) MessagesDeleteHistory(ctx context.Context, request *MessagesDeleteHistoryRequest) (*MessagesAffectedHistory, error)

MessagesDeleteHistory invokes method messages.deleteHistory#1c015b09 returning error if any. Deletes communication history.

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid
400 MESSAGE_ID_INVALID: The provided message id is invalid
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.deleteHistory for reference.

func (*Client) MessagesDeleteMessages

func (c *Client) MessagesDeleteMessages(ctx context.Context, request *MessagesDeleteMessagesRequest) (*MessagesAffectedMessages, error)

MessagesDeleteMessages invokes method messages.deleteMessages#e58e95d2 returning error if any. Deletes messages by their identifiers.

Possible errors:

403 MESSAGE_DELETE_FORBIDDEN: You can't delete one of the messages you tried to delete, most likely because it is a service message.

See https://core.telegram.org/method/messages.deleteMessages for reference. Can be used by bots.

func (*Client) MessagesDeleteScheduledMessages

func (c *Client) MessagesDeleteScheduledMessages(ctx context.Context, request *MessagesDeleteScheduledMessagesRequest) (UpdatesClass, error)

MessagesDeleteScheduledMessages invokes method messages.deleteScheduledMessages#59ae2b16 returning error if any. Delete scheduled messages

See https://core.telegram.org/method/messages.deleteScheduledMessages for reference.

func (*Client) MessagesDiscardEncryption

func (c *Client) MessagesDiscardEncryption(ctx context.Context, chatid int) (bool, error)

MessagesDiscardEncryption invokes method messages.discardEncryption#edd923c5 returning error if any. Cancels a request for creation and/or delete info on secret chat.

Possible errors:

400 CHAT_ID_EMPTY: The provided chat ID is empty
400 ENCRYPTION_ALREADY_DECLINED: The secret chat was already declined
400 ENCRYPTION_ID_INVALID: The provided secret chat ID is invalid

See https://core.telegram.org/method/messages.discardEncryption for reference.

func (*Client) MessagesEditChatAbout

func (c *Client) MessagesEditChatAbout(ctx context.Context, request *MessagesEditChatAboutRequest) (bool, error)

MessagesEditChatAbout invokes method messages.editChatAbout#def60797 returning error if any. Edit the description of a group/supergroup/channel¹.

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ABOUT_NOT_MODIFIED: About text has not changed
400 CHAT_ABOUT_TOO_LONG: Chat about too long
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_NOT_MODIFIED: The pinned message wasn't modified
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.editChatAbout for reference. Can be used by bots.

func (*Client) MessagesEditChatAdmin

func (c *Client) MessagesEditChatAdmin(ctx context.Context, request *MessagesEditChatAdminRequest) (bool, error)

MessagesEditChatAdmin invokes method messages.editChatAdmin#a9e69f2e returning error if any. Make a user admin in a legacy group¹.

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid
400 PEER_ID_INVALID: The provided peer id is invalid
400 USER_ID_INVALID: The provided user ID is invalid
400 USER_NOT_PARTICIPANT: You're not a member of this supergroup/channel

See https://core.telegram.org/method/messages.editChatAdmin for reference.

func (*Client) MessagesEditChatDefaultBannedRights

func (c *Client) MessagesEditChatDefaultBannedRights(ctx context.Context, request *MessagesEditChatDefaultBannedRightsRequest) (UpdatesClass, error)

MessagesEditChatDefaultBannedRights invokes method messages.editChatDefaultBannedRights#a5866b41 returning error if any. Edit the default banned rights of a channel/supergroup/group¹.

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 BANNED_RIGHTS_INVALID: You provided some invalid flags in the banned rights
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_NOT_MODIFIED: The pinned message wasn't modified
400 PEER_ID_INVALID: The provided peer id is invalid
400 UNTIL_DATE_INVALID: Invalid until date provided

See https://core.telegram.org/method/messages.editChatDefaultBannedRights for reference. Can be used by bots.

func (*Client) MessagesEditChatPhoto

func (c *Client) MessagesEditChatPhoto(ctx context.Context, request *MessagesEditChatPhotoRequest) (UpdatesClass, error)

MessagesEditChatPhoto invokes method messages.editChatPhoto#ca4c79d8 returning error if any. Changes chat photo and sends a service message on it

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid
400 CHAT_NOT_MODIFIED: The pinned message wasn't modified
400 INPUT_CONSTRUCTOR_INVALID: The provided constructor is invalid
400 PEER_ID_INVALID: The provided peer id is invalid
400 PHOTO_CROP_SIZE_SMALL: Photo is too small
400 PHOTO_EXT_INVALID: The extension of the photo is invalid
400 PHOTO_INVALID: Photo invalid

See https://core.telegram.org/method/messages.editChatPhoto for reference. Can be used by bots.

func (*Client) MessagesEditChatTitle

func (c *Client) MessagesEditChatTitle(ctx context.Context, request *MessagesEditChatTitleRequest) (UpdatesClass, error)

MessagesEditChatTitle invokes method messages.editChatTitle#dc452855 returning error if any. Chanages chat name and sends a service message on it.

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid
400 CHAT_NOT_MODIFIED: The pinned message wasn't modified
400 CHAT_TITLE_EMPTY: No chat title provided
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.editChatTitle for reference. Can be used by bots.

func (*Client) MessagesEditInlineBotMessage

func (c *Client) MessagesEditInlineBotMessage(ctx context.Context, request *MessagesEditInlineBotMessageRequest) (bool, error)

MessagesEditInlineBotMessage invokes method messages.editInlineBotMessage#83557dba returning error if any. Edit an inline bot message

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid
400 MESSAGE_NOT_MODIFIED: The message text has not changed

See https://core.telegram.org/method/messages.editInlineBotMessage for reference. Can be used by bots.

func (*Client) MessagesEditMessage

func (c *Client) MessagesEditMessage(ctx context.Context, request *MessagesEditMessageRequest) (UpdatesClass, error)

MessagesEditMessage invokes method messages.editMessage#48f71778 returning error if any. Edit message

Possible errors:

400 BUTTON_DATA_INVALID: The data of one or more of the buttons you provided is invalid
400 BUTTON_TYPE_INVALID: The type of one or more of the buttons you provided is invalid
400 BUTTON_URL_INVALID: Button URL invalid
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
403 INLINE_BOT_REQUIRED: Only the inline bot can edit message
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MEDIA_CAPTION_TOO_LONG: The caption is too long
400 MEDIA_PREV_INVALID: Previous media invalid
403 MESSAGE_AUTHOR_REQUIRED: Message author required
400 MESSAGE_EDIT_TIME_EXPIRED: You can't edit this message anymore, too much time has passed since its creation.
400 MESSAGE_EMPTY: The provided message is empty
400 MESSAGE_ID_INVALID: The provided message id is invalid
400 MESSAGE_NOT_MODIFIED: The message text has not changed
400 MESSAGE_TOO_LONG: The provided message is too long
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid
400 REPLY_MARKUP_INVALID: The provided reply markup is invalid
400 SCHEDULE_DATE_INVALID: Invalid schedule date provided
400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels

See https://core.telegram.org/method/messages.editMessage for reference. Can be used by bots.

func (*Client) MessagesExportChatInvite

func (c *Client) MessagesExportChatInvite(ctx context.Context, peer InputPeerClass) (ExportedChatInviteClass, error)

MessagesExportChatInvite invokes method messages.exportChatInvite#df7534c returning error if any. Export an invite link for a chat

Possible errors:

400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_ID_INVALID: The provided chat id is invalid
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.exportChatInvite for reference. Can be used by bots.

func (*Client) MessagesFaveSticker

func (c *Client) MessagesFaveSticker(ctx context.Context, request *MessagesFaveStickerRequest) (bool, error)

MessagesFaveSticker invokes method messages.faveSticker#b9ffc55b returning error if any. Mark a sticker as favorite

Possible errors:

400 STICKER_ID_INVALID: The provided sticker ID is invalid

See https://core.telegram.org/method/messages.faveSticker for reference.

func (*Client) MessagesForwardMessages

func (c *Client) MessagesForwardMessages(ctx context.Context, request *MessagesForwardMessagesRequest) (UpdatesClass, error)

MessagesForwardMessages invokes method messages.forwardMessages#d9fee60e returning error if any. Forwards messages by their IDs.

Possible errors:

400 BROADCAST_PUBLIC_VOTERS_FORBIDDEN: You can't forward polls with public voters
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_ID_INVALID: The provided chat id is invalid
400 CHAT_RESTRICTED: You can't send messages in this chat, you were restricted
403 CHAT_SEND_GIFS_FORBIDDEN: You can't send gifs in this chat
403 CHAT_SEND_MEDIA_FORBIDDEN: You can't send media in this chat
403 CHAT_SEND_POLL_FORBIDDEN: You can't send polls in this chat
403 CHAT_SEND_STICKERS_FORBIDDEN: You can't send stickers in this chat.
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 GROUPED_MEDIA_INVALID: Invalid grouped media
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MEDIA_EMPTY: The provided media object is invalid
400 MESSAGE_IDS_EMPTY: No message ids were provided
400 MESSAGE_ID_INVALID: The provided message id is invalid
400 MSG_ID_INVALID: Invalid message ID provided
420 P0NY_FLOODWAIT:
400 PEER_ID_INVALID: The provided peer id is invalid
400 RANDOM_ID_INVALID: A provided random ID is invalid
400 SCHEDULE_TOO_MUCH: There are too many scheduled messages
400 SLOWMODE_MULTI_MSGS_DISABLED: Slowmode is enabled, you cannot forward multiple messages to this group.
420 SLOWMODE_WAIT_X: Slowmode is enabled in this chat: you must wait for the specified number of seconds before sending another message to the chat.
400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels
400 USER_IS_BLOCKED: You were blocked by this user
400 USER_IS_BOT: Bots can't send messages to other bots
400 YOU_BLOCKED_USER: You blocked this user

See https://core.telegram.org/method/messages.forwardMessages for reference. Can be used by bots.

func (*Client) MessagesGetAllChats

func (c *Client) MessagesGetAllChats(ctx context.Context, exceptids []int) (MessagesChatsClass, error)

MessagesGetAllChats invokes method messages.getAllChats#eba80ff0 returning error if any. Get all chats, channels and supergroups

See https://core.telegram.org/method/messages.getAllChats for reference.

func (*Client) MessagesGetAllDrafts

func (c *Client) MessagesGetAllDrafts(ctx context.Context) (UpdatesClass, error)

MessagesGetAllDrafts invokes method messages.getAllDrafts#6a3f8d65 returning error if any. Save get all message drafts¹.

Links:

  1. https://core.telegram.org/api/drafts

See https://core.telegram.org/method/messages.getAllDrafts for reference.

func (*Client) MessagesGetAllStickers

func (c *Client) MessagesGetAllStickers(ctx context.Context, hash int) (MessagesAllStickersClass, error)

MessagesGetAllStickers invokes method messages.getAllStickers#1c9618b1 returning error if any. Get all installed stickers

See https://core.telegram.org/method/messages.getAllStickers for reference.

func (*Client) MessagesGetArchivedStickers

func (c *Client) MessagesGetArchivedStickers(ctx context.Context, request *MessagesGetArchivedStickersRequest) (*MessagesArchivedStickers, error)

MessagesGetArchivedStickers invokes method messages.getArchivedStickers#57f17692 returning error if any. Get all archived stickers

See https://core.telegram.org/method/messages.getArchivedStickers for reference.

func (*Client) MessagesGetAttachedStickers added in v0.8.0

func (c *Client) MessagesGetAttachedStickers(ctx context.Context, media InputStickeredMediaClass) ([]StickerSetCoveredClass, error)

MessagesGetAttachedStickers invokes method messages.getAttachedStickers#cc5b67cc returning error if any. Get stickers attached to a photo or video

See https://core.telegram.org/method/messages.getAttachedStickers for reference.

func (*Client) MessagesGetBotCallbackAnswer

func (c *Client) MessagesGetBotCallbackAnswer(ctx context.Context, request *MessagesGetBotCallbackAnswerRequest) (*MessagesBotCallbackAnswer, error)

MessagesGetBotCallbackAnswer invokes method messages.getBotCallbackAnswer#9342ca07 returning error if any. Press an inline callback button and get a callback answer from the bot

Possible errors:

400 BOT_RESPONSE_TIMEOUT: A timeout occurred while fetching data from the bot
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 DATA_INVALID: Encrypted data invalid
400 MESSAGE_ID_INVALID: The provided message id is invalid
400 PEER_ID_INVALID: The provided peer id is invalid
-503 Timeout: Timeout while fetching data

See https://core.telegram.org/method/messages.getBotCallbackAnswer for reference.

func (*Client) MessagesGetChats

func (c *Client) MessagesGetChats(ctx context.Context, id []int) (MessagesChatsClass, error)

MessagesGetChats invokes method messages.getChats#3c6aa187 returning error if any. Returns chat basic info on their IDs.

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getChats for reference. Can be used by bots.

func (*Client) MessagesGetCommonChats

func (c *Client) MessagesGetCommonChats(ctx context.Context, request *MessagesGetCommonChatsRequest) (MessagesChatsClass, error)

MessagesGetCommonChats invokes method messages.getCommonChats#d0a48c4 returning error if any. Get chats in common with a user

Possible errors:

400 MSG_ID_INVALID: Invalid message ID provided
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/messages.getCommonChats for reference.

func (*Client) MessagesGetDhConfig

func (c *Client) MessagesGetDhConfig(ctx context.Context, request *MessagesGetDhConfigRequest) (MessagesDhConfigClass, error)

MessagesGetDhConfig invokes method messages.getDhConfig#26cf8950 returning error if any. Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length.

Possible errors:

400 RANDOM_LENGTH_INVALID: Random length invalid

See https://core.telegram.org/method/messages.getDhConfig for reference.

func (*Client) MessagesGetDialogFilters added in v0.8.0

func (c *Client) MessagesGetDialogFilters(ctx context.Context) ([]DialogFilter, error)

MessagesGetDialogFilters invokes method messages.getDialogFilters#f19ed96d returning error if any. Get folders¹

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/method/messages.getDialogFilters for reference.

func (*Client) MessagesGetDialogUnreadMarks added in v0.8.0

func (c *Client) MessagesGetDialogUnreadMarks(ctx context.Context) ([]DialogPeerClass, error)

MessagesGetDialogUnreadMarks invokes method messages.getDialogUnreadMarks#22e24e22 returning error if any. Get dialogs manually marked as unread

See https://core.telegram.org/method/messages.getDialogUnreadMarks for reference.

func (*Client) MessagesGetDialogs

func (c *Client) MessagesGetDialogs(ctx context.Context, request *MessagesGetDialogsRequest) (MessagesDialogsClass, error)

MessagesGetDialogs invokes method messages.getDialogs#a0ee3b73 returning error if any. Returns the current user dialog list.

Possible errors:

400 FOLDER_ID_INVALID: Invalid folder ID
400 INPUT_CONSTRUCTOR_INVALID: The provided constructor is invalid
400 OFFSET_PEER_ID_INVALID: The provided offset peer is invalid

See https://core.telegram.org/method/messages.getDialogs for reference.

func (*Client) MessagesGetDiscussionMessage

func (c *Client) MessagesGetDiscussionMessage(ctx context.Context, request *MessagesGetDiscussionMessageRequest) (*MessagesDiscussionMessage, error)

MessagesGetDiscussionMessage invokes method messages.getDiscussionMessage#446972fd returning error if any. Get discussion message¹ from the associated discussion group² of a channel to show it on top of the comment section, without actually joining the group

Links:

  1. https://core.telegram.org/api/threads
  2. https://core.telegram.org/api/discussion

See https://core.telegram.org/method/messages.getDiscussionMessage for reference. Can be used by bots.

func (*Client) MessagesGetDocumentByHash

func (c *Client) MessagesGetDocumentByHash(ctx context.Context, request *MessagesGetDocumentByHashRequest) (DocumentClass, error)

MessagesGetDocumentByHash invokes method messages.getDocumentByHash#338e2464 returning error if any. Get a document by its SHA256 hash, mainly used for gifs

Possible errors:

400 SHA256_HASH_INVALID: The provided SHA256 hash is invalid

See https://core.telegram.org/method/messages.getDocumentByHash for reference. Can be used by bots.

func (*Client) MessagesGetEmojiKeywords

func (c *Client) MessagesGetEmojiKeywords(ctx context.Context, langcode string) (*EmojiKeywordsDifference, error)

MessagesGetEmojiKeywords invokes method messages.getEmojiKeywords#35a0e062 returning error if any. Get localized emoji keywords

See https://core.telegram.org/method/messages.getEmojiKeywords for reference.

func (*Client) MessagesGetEmojiKeywordsDifference

func (c *Client) MessagesGetEmojiKeywordsDifference(ctx context.Context, request *MessagesGetEmojiKeywordsDifferenceRequest) (*EmojiKeywordsDifference, error)

MessagesGetEmojiKeywordsDifference invokes method messages.getEmojiKeywordsDifference#1508b6af returning error if any. Get changed emoji keywords

See https://core.telegram.org/method/messages.getEmojiKeywordsDifference for reference.

func (*Client) MessagesGetEmojiKeywordsLanguages added in v0.8.0

func (c *Client) MessagesGetEmojiKeywordsLanguages(ctx context.Context, langcodes []string) ([]EmojiLanguage, error)

MessagesGetEmojiKeywordsLanguages invokes method messages.getEmojiKeywordsLanguages#4e9963b2 returning error if any. Get info about an emoji keyword localization

See https://core.telegram.org/method/messages.getEmojiKeywordsLanguages for reference.

func (*Client) MessagesGetEmojiURL

func (c *Client) MessagesGetEmojiURL(ctx context.Context, langcode string) (*EmojiURL, error)

MessagesGetEmojiURL invokes method messages.getEmojiURL#d5b10c26 returning error if any. Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation

See https://core.telegram.org/method/messages.getEmojiURL for reference.

func (*Client) MessagesGetFavedStickers

func (c *Client) MessagesGetFavedStickers(ctx context.Context, hash int) (MessagesFavedStickersClass, error)

MessagesGetFavedStickers invokes method messages.getFavedStickers#21ce0b0e returning error if any. Get faved stickers

See https://core.telegram.org/method/messages.getFavedStickers for reference.

func (*Client) MessagesGetFeaturedStickers

func (c *Client) MessagesGetFeaturedStickers(ctx context.Context, hash int) (MessagesFeaturedStickersClass, error)

MessagesGetFeaturedStickers invokes method messages.getFeaturedStickers#2dacca4f returning error if any. Get featured stickers

See https://core.telegram.org/method/messages.getFeaturedStickers for reference.

func (*Client) MessagesGetFullChat

func (c *Client) MessagesGetFullChat(ctx context.Context, chatid int) (*MessagesChatFull, error)

MessagesGetFullChat invokes method messages.getFullChat#3b831c66 returning error if any. Returns full chat info according to its ID.

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getFullChat for reference. Can be used by bots.

func (*Client) MessagesGetGameHighScores

func (c *Client) MessagesGetGameHighScores(ctx context.Context, request *MessagesGetGameHighScoresRequest) (*MessagesHighScores, error)

MessagesGetGameHighScores invokes method messages.getGameHighScores#e822649d returning error if any. Get highscores of a game

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid
400 PEER_ID_INVALID: The provided peer id is invalid
400 USER_BOT_REQUIRED: This method can only be called by a bot

See https://core.telegram.org/method/messages.getGameHighScores for reference. Can be used by bots.

func (*Client) MessagesGetHistory

func (c *Client) MessagesGetHistory(ctx context.Context, request *MessagesGetHistoryRequest) (MessagesMessagesClass, error)

MessagesGetHistory invokes method messages.getHistory#dcbb8260 returning error if any. Gets back the conversation history with one interlocutor / within a chat

Possible errors:

401 AUTH_KEY_PERM_EMPTY: The temporary auth key must be binded to the permanent auth key to use these methods.
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ID_INVALID: The provided chat id is invalid
400 CONNECTION_DEVICE_MODEL_EMPTY: Device model empty
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getHistory for reference.

func (*Client) MessagesGetInlineBotResults

func (c *Client) MessagesGetInlineBotResults(ctx context.Context, request *MessagesGetInlineBotResultsRequest) (*MessagesBotResults, error)

MessagesGetInlineBotResults invokes method messages.getInlineBotResults#514e999d returning error if any. Query an inline bot

Possible errors:

400 BOT_INLINE_DISABLED: This bot can't be used in inline mode
400 BOT_INVALID: This is not a valid bot
400 BOT_RESPONSE_TIMEOUT: A timeout occurred while fetching data from the bot
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MSG_ID_INVALID: Invalid message ID provided
-503 Timeout: Timeout while fetching data

See https://core.telegram.org/method/messages.getInlineBotResults for reference.

func (*Client) MessagesGetInlineGameHighScores

func (c *Client) MessagesGetInlineGameHighScores(ctx context.Context, request *MessagesGetInlineGameHighScoresRequest) (*MessagesHighScores, error)

MessagesGetInlineGameHighScores invokes method messages.getInlineGameHighScores#f635e1b returning error if any. Get highscores of a game sent using an inline bot

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid
400 USER_BOT_REQUIRED: This method can only be called by a bot

See https://core.telegram.org/method/messages.getInlineGameHighScores for reference. Can be used by bots.

func (*Client) MessagesGetMaskStickers

func (c *Client) MessagesGetMaskStickers(ctx context.Context, hash int) (MessagesAllStickersClass, error)

MessagesGetMaskStickers invokes method messages.getMaskStickers#65b8c79f returning error if any. Get installed mask stickers

See https://core.telegram.org/method/messages.getMaskStickers for reference.

func (*Client) MessagesGetMessageEditData

func (c *Client) MessagesGetMessageEditData(ctx context.Context, request *MessagesGetMessageEditDataRequest) (*MessagesMessageEditData, error)

MessagesGetMessageEditData invokes method messages.getMessageEditData#fda68d36 returning error if any. Find out if a media message's caption can be edited

Possible errors:

400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
403 MESSAGE_AUTHOR_REQUIRED: Message author required
400 MESSAGE_ID_INVALID: The provided message id is invalid
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getMessageEditData for reference.

func (*Client) MessagesGetMessages

func (c *Client) MessagesGetMessages(ctx context.Context, id []InputMessageClass) (MessagesMessagesClass, error)

MessagesGetMessages invokes method messages.getMessages#63c66506 returning error if any. Returns the list of messages by their IDs.

See https://core.telegram.org/method/messages.getMessages for reference. Can be used by bots.

func (*Client) MessagesGetMessagesViews

func (c *Client) MessagesGetMessagesViews(ctx context.Context, request *MessagesGetMessagesViewsRequest) (*MessagesMessageViews, error)

MessagesGetMessagesViews invokes method messages.getMessagesViews#5784d3e1 returning error if any. Get and increase the view counter of a message sent or forwarded from a channel¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ID_INVALID: The provided chat id is invalid
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getMessagesViews for reference.

func (*Client) MessagesGetOldFeaturedStickers

func (c *Client) MessagesGetOldFeaturedStickers(ctx context.Context, request *MessagesGetOldFeaturedStickersRequest) (MessagesFeaturedStickersClass, error)

MessagesGetOldFeaturedStickers invokes method messages.getOldFeaturedStickers#5fe7025b returning error if any. Method for fetching previously featured stickers

See https://core.telegram.org/method/messages.getOldFeaturedStickers for reference.

func (*Client) MessagesGetOnlines

func (c *Client) MessagesGetOnlines(ctx context.Context, peer InputPeerClass) (*ChatOnlines, error)

MessagesGetOnlines invokes method messages.getOnlines#6e2be050 returning error if any. Get count of online users in a chat

Possible errors:

400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getOnlines for reference.

func (*Client) MessagesGetPeerDialogs

func (c *Client) MessagesGetPeerDialogs(ctx context.Context, peers []InputDialogPeerClass) (*MessagesPeerDialogs, error)

MessagesGetPeerDialogs invokes method messages.getPeerDialogs#e470bcfd returning error if any. Get dialog info of specified peers

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CONNECTION_DEVICE_MODEL_EMPTY: Device model empty
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getPeerDialogs for reference.

func (*Client) MessagesGetPeerSettings

func (c *Client) MessagesGetPeerSettings(ctx context.Context, peer InputPeerClass) (*PeerSettings, error)

MessagesGetPeerSettings invokes method messages.getPeerSettings#3672e09c returning error if any. Get peer settings

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getPeerSettings for reference.

func (*Client) MessagesGetPinnedDialogs

func (c *Client) MessagesGetPinnedDialogs(ctx context.Context, folderid int) (*MessagesPeerDialogs, error)

MessagesGetPinnedDialogs invokes method messages.getPinnedDialogs#d6b94df2 returning error if any. Get pinned dialogs

Possible errors:

400 FOLDER_ID_INVALID: Invalid folder ID

See https://core.telegram.org/method/messages.getPinnedDialogs for reference.

func (*Client) MessagesGetPollResults

func (c *Client) MessagesGetPollResults(ctx context.Context, request *MessagesGetPollResultsRequest) (UpdatesClass, error)

MessagesGetPollResults invokes method messages.getPollResults#73bb643b returning error if any. Get poll results

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid

See https://core.telegram.org/method/messages.getPollResults for reference.

func (*Client) MessagesGetPollVotes

func (c *Client) MessagesGetPollVotes(ctx context.Context, request *MessagesGetPollVotesRequest) (*MessagesVotesList, error)

MessagesGetPollVotes invokes method messages.getPollVotes#b86e380e returning error if any. Get poll results for non-anonymous polls

Possible errors:

403 BROADCAST_FORBIDDEN:
400 MSG_ID_INVALID: Invalid message ID provided
403 POLL_VOTE_REQUIRED: Cast a vote in the poll before calling this method

See https://core.telegram.org/method/messages.getPollVotes for reference.

func (*Client) MessagesGetRecentLocations

func (c *Client) MessagesGetRecentLocations(ctx context.Context, request *MessagesGetRecentLocationsRequest) (MessagesMessagesClass, error)

MessagesGetRecentLocations invokes method messages.getRecentLocations#bbc45b09 returning error if any. Get live location history of a certain user

See https://core.telegram.org/method/messages.getRecentLocations for reference.

func (*Client) MessagesGetRecentStickers

func (c *Client) MessagesGetRecentStickers(ctx context.Context, request *MessagesGetRecentStickersRequest) (MessagesRecentStickersClass, error)

MessagesGetRecentStickers invokes method messages.getRecentStickers#5ea192c9 returning error if any. Get recent stickers

See https://core.telegram.org/method/messages.getRecentStickers for reference.

func (*Client) MessagesGetReplies

func (c *Client) MessagesGetReplies(ctx context.Context, request *MessagesGetRepliesRequest) (MessagesMessagesClass, error)

MessagesGetReplies invokes method messages.getReplies#24b581ba returning error if any. Get messages in a reply thread

See https://core.telegram.org/method/messages.getReplies for reference. Can be used by bots.

func (*Client) MessagesGetSavedGifs

func (c *Client) MessagesGetSavedGifs(ctx context.Context, hash int) (MessagesSavedGifsClass, error)

MessagesGetSavedGifs invokes method messages.getSavedGifs#83bf3d52 returning error if any. Get saved GIFs

See https://core.telegram.org/method/messages.getSavedGifs for reference.

func (*Client) MessagesGetScheduledHistory

func (c *Client) MessagesGetScheduledHistory(ctx context.Context, request *MessagesGetScheduledHistoryRequest) (MessagesMessagesClass, error)

MessagesGetScheduledHistory invokes method messages.getScheduledHistory#e2c2685b returning error if any. Get scheduled messages

Possible errors:

400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getScheduledHistory for reference.

func (*Client) MessagesGetScheduledMessages

func (c *Client) MessagesGetScheduledMessages(ctx context.Context, request *MessagesGetScheduledMessagesRequest) (MessagesMessagesClass, error)

MessagesGetScheduledMessages invokes method messages.getScheduledMessages#bdbb0464 returning error if any. Get scheduled messages

Possible errors:

400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getScheduledMessages for reference.

func (*Client) MessagesGetSearchCounters added in v0.8.0

func (c *Client) MessagesGetSearchCounters(ctx context.Context, request *MessagesGetSearchCountersRequest) ([]MessagesSearchCounter, error)

MessagesGetSearchCounters invokes method messages.getSearchCounters#732eef00 returning error if any. Get the number of results that would be found by a messages.search¹ call with the same parameters

Links:

  1. https://core.telegram.org/method/messages.search

See https://core.telegram.org/method/messages.getSearchCounters for reference.

func (*Client) MessagesGetSplitRanges added in v0.8.0

func (c *Client) MessagesGetSplitRanges(ctx context.Context) ([]MessageRange, error)

MessagesGetSplitRanges invokes method messages.getSplitRanges#1cff7e08 returning error if any. Get message ranges for saving the user's chat history

See https://core.telegram.org/method/messages.getSplitRanges for reference.

func (*Client) MessagesGetStatsURL

func (c *Client) MessagesGetStatsURL(ctx context.Context, request *MessagesGetStatsURLRequest) (*StatsURL, error)

MessagesGetStatsURL invokes method messages.getStatsURL#812c2ae6 returning error if any. Returns URL with the chat statistics. Currently this method can be used only for channels

Possible errors:

400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getStatsURL for reference.

func (*Client) MessagesGetStickerSet

func (c *Client) MessagesGetStickerSet(ctx context.Context, stickerset InputStickerSetClass) (*MessagesStickerSet, error)

MessagesGetStickerSet invokes method messages.getStickerSet#2619a90e returning error if any. Get info about a stickerset

Possible errors:

400 STICKERSET_INVALID: The provided sticker set is invalid

See https://core.telegram.org/method/messages.getStickerSet for reference. Can be used by bots.

func (*Client) MessagesGetStickers

func (c *Client) MessagesGetStickers(ctx context.Context, request *MessagesGetStickersRequest) (MessagesStickersClass, error)

MessagesGetStickers invokes method messages.getStickers#43d4f2c returning error if any. Get stickers by emoji

See https://core.telegram.org/method/messages.getStickers for reference.

func (*Client) MessagesGetSuggestedDialogFilters added in v0.8.0

func (c *Client) MessagesGetSuggestedDialogFilters(ctx context.Context) ([]DialogFilterSuggested, error)

MessagesGetSuggestedDialogFilters invokes method messages.getSuggestedDialogFilters#a29cd42c returning error if any. Get suggested folders¹

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/method/messages.getSuggestedDialogFilters for reference.

func (*Client) MessagesGetUnreadMentions

func (c *Client) MessagesGetUnreadMentions(ctx context.Context, request *MessagesGetUnreadMentionsRequest) (MessagesMessagesClass, error)

MessagesGetUnreadMentions invokes method messages.getUnreadMentions#46578472 returning error if any. Get unread messages where we were mentioned

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.getUnreadMentions for reference.

func (*Client) MessagesGetWebPage

func (c *Client) MessagesGetWebPage(ctx context.Context, request *MessagesGetWebPageRequest) (WebPageClass, error)

MessagesGetWebPage invokes method messages.getWebPage#32ca8f91 returning error if any. Get instant view¹ page

Links:

  1. https://instantview.telegram.org

Possible errors:

400 WC_CONVERT_URL_INVALID: WC convert URL invalid

See https://core.telegram.org/method/messages.getWebPage for reference.

func (*Client) MessagesGetWebPagePreview

func (c *Client) MessagesGetWebPagePreview(ctx context.Context, request *MessagesGetWebPagePreviewRequest) (MessageMediaClass, error)

MessagesGetWebPagePreview invokes method messages.getWebPagePreview#8b68b0cc returning error if any. Get preview of webpage

Possible errors:

400 MESSAGE_EMPTY: The provided message is empty

See https://core.telegram.org/method/messages.getWebPagePreview for reference.

func (*Client) MessagesHidePeerSettingsBar

func (c *Client) MessagesHidePeerSettingsBar(ctx context.Context, peer InputPeerClass) (bool, error)

MessagesHidePeerSettingsBar invokes method messages.hidePeerSettingsBar#4facb138 returning error if any. Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the peer's settings¹.

Links:

  1. https://core.telegram.org/constructor/peerSettings

See https://core.telegram.org/method/messages.hidePeerSettingsBar for reference.

func (*Client) MessagesImportChatInvite

func (c *Client) MessagesImportChatInvite(ctx context.Context, hash string) (UpdatesClass, error)

MessagesImportChatInvite invokes method messages.importChatInvite#6c50051c returning error if any. Import a chat invite and join a private chat/supergroup/channel

Possible errors:

400 CHANNELS_TOO_MUCH: You have joined too many channels/supergroups
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 INVITE_HASH_EMPTY: The invite hash is empty
400 INVITE_HASH_EXPIRED: The invite link has expired
400 INVITE_HASH_INVALID: The invite hash is invalid
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid
400 USERS_TOO_MUCH: The maximum number of users has been exceeded (to create a chat, for example)
400 USER_ALREADY_PARTICIPANT: The user is already in the group
400 USER_CHANNELS_TOO_MUCH: One of the users you tried to add is already in too many channels/supergroups

See https://core.telegram.org/method/messages.importChatInvite for reference.

func (*Client) MessagesInstallStickerSet

MessagesInstallStickerSet invokes method messages.installStickerSet#c78fe460 returning error if any. Install a stickerset

Possible errors:

400 STICKERSET_INVALID: The provided sticker set is invalid

See https://core.telegram.org/method/messages.installStickerSet for reference.

func (*Client) MessagesMarkDialogUnread

func (c *Client) MessagesMarkDialogUnread(ctx context.Context, request *MessagesMarkDialogUnreadRequest) (bool, error)

MessagesMarkDialogUnread invokes method messages.markDialogUnread#c286d98f returning error if any. Manually mark dialog as unread

See https://core.telegram.org/method/messages.markDialogUnread for reference.

func (*Client) MessagesMigrateChat

func (c *Client) MessagesMigrateChat(ctx context.Context, chatid int) (UpdatesClass, error)

MessagesMigrateChat invokes method messages.migrateChat#15a3b8e3 returning error if any. Turn a legacy group into a supergroup¹

Links:

  1. https://core.telegram.org/api/channel

Possible errors:

403 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_ID_INVALID: The provided chat id is invalid
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.migrateChat for reference.

func (*Client) MessagesReadDiscussion

func (c *Client) MessagesReadDiscussion(ctx context.Context, request *MessagesReadDiscussionRequest) (bool, error)

MessagesReadDiscussion invokes method messages.readDiscussion#f731a9f4 returning error if any. Mark a thread¹ as read

Links:

  1. https://core.telegram.org/api/threads

See https://core.telegram.org/method/messages.readDiscussion for reference. Can be used by bots.

func (*Client) MessagesReadEncryptedHistory

func (c *Client) MessagesReadEncryptedHistory(ctx context.Context, request *MessagesReadEncryptedHistoryRequest) (bool, error)

MessagesReadEncryptedHistory invokes method messages.readEncryptedHistory#7f4b690a returning error if any. Marks message history within a secret chat as read.

Possible errors:

400 MSG_WAIT_FAILED: A waiting call returned an error

See https://core.telegram.org/method/messages.readEncryptedHistory for reference.

func (*Client) MessagesReadFeaturedStickers

func (c *Client) MessagesReadFeaturedStickers(ctx context.Context, id []int64) (bool, error)

MessagesReadFeaturedStickers invokes method messages.readFeaturedStickers#5b118126 returning error if any. Mark new featured stickers as read

See https://core.telegram.org/method/messages.readFeaturedStickers for reference.

func (*Client) MessagesReadHistory

func (c *Client) MessagesReadHistory(ctx context.Context, request *MessagesReadHistoryRequest) (*MessagesAffectedMessages, error)

MessagesReadHistory invokes method messages.readHistory#e306d3a returning error if any. Marks message history as read.

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.readHistory for reference.

func (*Client) MessagesReadMentions

func (c *Client) MessagesReadMentions(ctx context.Context, peer InputPeerClass) (*MessagesAffectedHistory, error)

MessagesReadMentions invokes method messages.readMentions#f0189d3 returning error if any. Mark mentions as read

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.readMentions for reference.

func (*Client) MessagesReadMessageContents

func (c *Client) MessagesReadMessageContents(ctx context.Context, id []int) (*MessagesAffectedMessages, error)

MessagesReadMessageContents invokes method messages.readMessageContents#36a73f77 returning error if any. Notifies the sender about the recipient having listened a voice message or watched a video.

See https://core.telegram.org/method/messages.readMessageContents for reference.

func (*Client) MessagesReceivedMessages added in v0.8.0

func (c *Client) MessagesReceivedMessages(ctx context.Context, maxid int) ([]ReceivedNotifyMessage, error)

MessagesReceivedMessages invokes method messages.receivedMessages#5a954c0 returning error if any. Confirms receipt of messages by a client, cancels PUSH-notification sending.

See https://core.telegram.org/method/messages.receivedMessages for reference.

func (*Client) MessagesReceivedQueue added in v0.8.0

func (c *Client) MessagesReceivedQueue(ctx context.Context, maxqts int) ([]int64, error)

MessagesReceivedQueue invokes method messages.receivedQueue#55a5bb66 returning error if any. Confirms receipt of messages in a secret chat by client, cancels push notifications.

Possible errors:

400 MSG_WAIT_FAILED: A waiting call returned an error

See https://core.telegram.org/method/messages.receivedQueue for reference.

func (*Client) MessagesReorderPinnedDialogs

func (c *Client) MessagesReorderPinnedDialogs(ctx context.Context, request *MessagesReorderPinnedDialogsRequest) (bool, error)

MessagesReorderPinnedDialogs invokes method messages.reorderPinnedDialogs#3b1adf37 returning error if any. Reorder pinned dialogs

Possible errors:

400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.reorderPinnedDialogs for reference.

func (*Client) MessagesReorderStickerSets

func (c *Client) MessagesReorderStickerSets(ctx context.Context, request *MessagesReorderStickerSetsRequest) (bool, error)

MessagesReorderStickerSets invokes method messages.reorderStickerSets#78337739 returning error if any. Reorder installed stickersets

See https://core.telegram.org/method/messages.reorderStickerSets for reference.

func (*Client) MessagesReport

func (c *Client) MessagesReport(ctx context.Context, request *MessagesReportRequest) (bool, error)

MessagesReport invokes method messages.report#bd82b658 returning error if any. Report a message in a chat for violation of telegram's Terms of Service

Possible errors:

400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.report for reference.

func (*Client) MessagesReportEncryptedSpam

func (c *Client) MessagesReportEncryptedSpam(ctx context.Context, peer InputEncryptedChat) (bool, error)

MessagesReportEncryptedSpam invokes method messages.reportEncryptedSpam#4b0c8c0f returning error if any. Report a secret chat for spam

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid

See https://core.telegram.org/method/messages.reportEncryptedSpam for reference.

func (*Client) MessagesReportSpam

func (c *Client) MessagesReportSpam(ctx context.Context, peer InputPeerClass) (bool, error)

MessagesReportSpam invokes method messages.reportSpam#cf1592db returning error if any. Report a new incoming chat for spam, if the peer settings¹ of the chat allow us to do that

Links:

  1. https://core.telegram.org/constructor/peerSettings

Possible errors:

400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.reportSpam for reference.

func (*Client) MessagesRequestEncryption

func (c *Client) MessagesRequestEncryption(ctx context.Context, request *MessagesRequestEncryptionRequest) (EncryptedChatClass, error)

MessagesRequestEncryption invokes method messages.requestEncryption#f64daf43 returning error if any. Sends a request to start a secret chat to the user.

Possible errors:

400 DH_G_A_INVALID: g_a invalid
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/messages.requestEncryption for reference.

func (*Client) MessagesRequestUrlAuth

func (c *Client) MessagesRequestUrlAuth(ctx context.Context, request *MessagesRequestUrlAuthRequest) (UrlAuthResultClass, error)

MessagesRequestUrlAuth invokes method messages.requestUrlAuth#e33f5613 returning error if any. Get more info about a Seamless Telegram Login authorization request, for more info click here »¹

Links:

  1. https://core.telegram.org/api/url-authorization

See https://core.telegram.org/method/messages.requestUrlAuth for reference.

func (*Client) MessagesSaveDraft

func (c *Client) MessagesSaveDraft(ctx context.Context, request *MessagesSaveDraftRequest) (bool, error)

MessagesSaveDraft invokes method messages.saveDraft#bc39e14b returning error if any. Save a message draft¹ associated to a chat.

Links:

  1. https://core.telegram.org/api/drafts

Possible errors:

400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.saveDraft for reference.

func (*Client) MessagesSaveGif

func (c *Client) MessagesSaveGif(ctx context.Context, request *MessagesSaveGifRequest) (bool, error)

MessagesSaveGif invokes method messages.saveGif#327a30cb returning error if any. Add GIF to saved gifs list

Possible errors:

400 GIF_ID_INVALID: The provided GIF ID is invalid

See https://core.telegram.org/method/messages.saveGif for reference.

func (*Client) MessagesSaveRecentSticker

func (c *Client) MessagesSaveRecentSticker(ctx context.Context, request *MessagesSaveRecentStickerRequest) (bool, error)

MessagesSaveRecentSticker invokes method messages.saveRecentSticker#392718f8 returning error if any. Add/remove sticker from recent stickers list

Possible errors:

400 STICKER_ID_INVALID: The provided sticker ID is invalid

See https://core.telegram.org/method/messages.saveRecentSticker for reference.

func (*Client) MessagesSearch

func (c *Client) MessagesSearch(ctx context.Context, request *MessagesSearchRequest) (MessagesMessagesClass, error)

MessagesSearch invokes method messages.search#c352eec returning error if any. Gets back found messages

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 INPUT_CONSTRUCTOR_INVALID: The provided constructor is invalid
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid
400 PEER_ID_NOT_SUPPORTED: The provided peer ID is not supported
400 SEARCH_QUERY_EMPTY: The search query is empty
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/messages.search for reference.

func (*Client) MessagesSearchGlobal

func (c *Client) MessagesSearchGlobal(ctx context.Context, request *MessagesSearchGlobalRequest) (MessagesMessagesClass, error)

MessagesSearchGlobal invokes method messages.searchGlobal#4bc6589a returning error if any. Search for messages and peers globally

Possible errors:

400 FOLDER_ID_INVALID: Invalid folder ID
400 SEARCH_QUERY_EMPTY: The search query is empty

See https://core.telegram.org/method/messages.searchGlobal for reference.

func (*Client) MessagesSearchStickerSets

func (c *Client) MessagesSearchStickerSets(ctx context.Context, request *MessagesSearchStickerSetsRequest) (MessagesFoundStickerSetsClass, error)

MessagesSearchStickerSets invokes method messages.searchStickerSets#c2b7d08b returning error if any. Search for stickersets

See https://core.telegram.org/method/messages.searchStickerSets for reference.

func (*Client) MessagesSendEncrypted

MessagesSendEncrypted invokes method messages.sendEncrypted#44fa7a15 returning error if any. Sends a text message to a secret chat.

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid
400 DATA_INVALID: Encrypted data invalid
400 ENCRYPTION_DECLINED: The secret chat was declined
400 MSG_WAIT_FAILED: A waiting call returned an error

See https://core.telegram.org/method/messages.sendEncrypted for reference.

func (*Client) MessagesSendEncryptedFile

func (c *Client) MessagesSendEncryptedFile(ctx context.Context, request *MessagesSendEncryptedFileRequest) (MessagesSentEncryptedMessageClass, error)

MessagesSendEncryptedFile invokes method messages.sendEncryptedFile#5559481d returning error if any. Sends a message with a file attachment to a secret chat

Possible errors:

400 DATA_TOO_LONG: Data too long
400 ENCRYPTION_DECLINED: The secret chat was declined
400 MD5_CHECKSUM_INVALID: The MD5 checksums do not match
400 MSG_WAIT_FAILED: A waiting call returned an error

See https://core.telegram.org/method/messages.sendEncryptedFile for reference.

func (*Client) MessagesSendEncryptedService

func (c *Client) MessagesSendEncryptedService(ctx context.Context, request *MessagesSendEncryptedServiceRequest) (MessagesSentEncryptedMessageClass, error)

MessagesSendEncryptedService invokes method messages.sendEncryptedService#32d439a4 returning error if any. Sends a service message to a secret chat.

Possible errors:

400 DATA_INVALID: Encrypted data invalid
400 ENCRYPTION_DECLINED: The secret chat was declined
400 ENCRYPTION_ID_INVALID: The provided secret chat ID is invalid
400 MSG_WAIT_FAILED: A waiting call returned an error
403 USER_IS_BLOCKED: You were blocked by this user

See https://core.telegram.org/method/messages.sendEncryptedService for reference.

func (*Client) MessagesSendInlineBotResult

func (c *Client) MessagesSendInlineBotResult(ctx context.Context, request *MessagesSendInlineBotResultRequest) (UpdatesClass, error)

MessagesSendInlineBotResult invokes method messages.sendInlineBotResult#220815b0 returning error if any. Send a result obtained using messages.getInlineBotResults¹.

Links:

  1. https://core.telegram.org/method/messages.getInlineBotResults

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_RESTRICTED: You can't send messages in this chat, you were restricted
403 CHAT_SEND_GIFS_FORBIDDEN: You can't send gifs in this chat
403 CHAT_SEND_INLINE_FORBIDDEN: You can't send inline messages in this group
403 CHAT_SEND_MEDIA_FORBIDDEN: You can't send media in this chat
403 CHAT_SEND_STICKERS_FORBIDDEN: You can't send stickers in this chat.
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 INLINE_RESULT_EXPIRED: The inline query expired
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MEDIA_EMPTY: The provided media object is invalid
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid
400 QUERY_ID_EMPTY: The query ID is empty
400 RESULT_ID_EMPTY: Result ID empty
420 SLOWMODE_WAIT_X: Slowmode is enabled in this chat: you must wait for the specified number of seconds before sending another message to the chat.
400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels
400 WEBPAGE_CURL_FAILED: Failure while fetching the webpage with cURL
400 WEBPAGE_MEDIA_EMPTY: Webpage media empty
400 YOU_BLOCKED_USER: You blocked this user

See https://core.telegram.org/method/messages.sendInlineBotResult for reference.

func (*Client) MessagesSendMedia

func (c *Client) MessagesSendMedia(ctx context.Context, request *MessagesSendMediaRequest) (UpdatesClass, error)

MessagesSendMedia invokes method messages.sendMedia#3491eba9 returning error if any. Send a media

Possible errors:

400 BROADCAST_PUBLIC_VOTERS_FORBIDDEN: You can't forward polls with public voters
400 BUTTON_DATA_INVALID: The data of one or more of the buttons you provided is invalid
400 BUTTON_TYPE_INVALID: The type of one or more of the buttons you provided is invalid
400 BUTTON_URL_INVALID: Button URL invalid
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_RESTRICTED: You can't send messages in this chat, you were restricted
403 CHAT_SEND_GIFS_FORBIDDEN: You can't send gifs in this chat
403 CHAT_SEND_MEDIA_FORBIDDEN: You can't send media in this chat
403 CHAT_SEND_STICKERS_FORBIDDEN: You can't send stickers in this chat.
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 EXTERNAL_URL_INVALID: External URL invalid
400 FILE_PARTS_INVALID: The number of file parts is invalid
400 FILE_PART_LENGTH_INVALID: The length of a file part is invalid
400 IMAGE_PROCESS_FAILED: Failure while processing image
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MD5_CHECKSUM_INVALID: The MD5 checksums do not match
400 MEDIA_CAPTION_TOO_LONG: The caption is too long
400 MEDIA_EMPTY: The provided media object is invalid
400 MEDIA_INVALID: Media invalid
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid
400 PHOTO_EXT_INVALID: The extension of the photo is invalid
400 PHOTO_INVALID_DIMENSIONS: The photo dimensions are invalid
400 PHOTO_SAVE_FILE_INVALID: Internal issues, try again later
400 POLL_ANSWERS_INVALID: Invalid poll answers were provided
400 POLL_OPTION_DUPLICATE: Duplicate poll options provided
400 POLL_OPTION_INVALID: Invalid poll option provided
400 QUIZ_CORRECT_ANSWERS_EMPTY: No correct quiz answer was specified
400 QUIZ_CORRECT_ANSWER_INVALID: An invalid value was provided to the correct_answers field
400 REPLY_MARKUP_BUY_EMPTY: Reply markup for buy button empty
400 REPLY_MARKUP_INVALID: The provided reply markup is invalid
400 SCHEDULE_TOO_MUCH: There are too many scheduled messages
420 SLOWMODE_WAIT_X: Slowmode is enabled in this chat: you must wait for the specified number of seconds before sending another message to the chat.
400 TTL_MEDIA_INVALID: Invalid media Time To Live was provided
400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels
400 USER_IS_BLOCKED: You were blocked by this user
400 USER_IS_BOT: Bots can't send messages to other bots
400 WEBPAGE_CURL_FAILED: Failure while fetching the webpage with cURL
400 WEBPAGE_MEDIA_EMPTY: Webpage media empty
400 YOU_BLOCKED_USER: You blocked this user

See https://core.telegram.org/method/messages.sendMedia for reference. Can be used by bots.

func (*Client) MessagesSendMessage

func (c *Client) MessagesSendMessage(ctx context.Context, request *MessagesSendMessageRequest) (UpdatesClass, error)

MessagesSendMessage invokes method messages.sendMessage#520c3870 returning error if any. Sends a message to a chat

Possible errors:

401 AUTH_KEY_PERM_EMPTY: The temporary auth key must be binded to the permanent auth key to use these methods.
400 BOT_DOMAIN_INVALID: Bot domain invalid
400 BOT_INVALID: This is not a valid bot
400 BUTTON_DATA_INVALID: The data of one or more of the buttons you provided is invalid
400 BUTTON_TYPE_INVALID: The type of one or more of the buttons you provided is invalid
400 BUTTON_URL_INVALID: Button URL invalid
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_ID_INVALID: The provided chat id is invalid
400 CHAT_RESTRICTED: You can't send messages in this chat, you were restricted
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 ENCRYPTION_DECLINED: The secret chat was declined
400 ENTITY_MENTION_USER_INVALID: You mentioned an invalid user
400 FROM_MESSAGE_BOT_DISABLED: Bots can't use fromMessage min constructors
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MESSAGE_EMPTY: The provided message is empty
400 MESSAGE_TOO_LONG: The provided message is too long
400 MSG_ID_INVALID: Provided reply_to_msg_id is invalid
400 PEER_ID_INVALID: The provided peer id is invalid
400 PINNED_DIALOGS_TOO_MUCH: Too many pinned dialogs
400 REPLY_MARKUP_INVALID: The provided reply markup is invalid
400 SCHEDULE_BOT_NOT_ALLOWED: Bots cannot schedule messages
400 SCHEDULE_DATE_TOO_LATE: You can't schedule a message this far in the future
400 SCHEDULE_TOO_MUCH: There are too many scheduled messages
420 SLOWMODE_WAIT_X: Slowmode is enabled in this chat: you must wait for the specified number of seconds before sending another message to the chat.
400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels
400 USER_IS_BLOCKED: You were blocked by this user
400 USER_IS_BOT: Bots can't send messages to other bots
400 YOU_BLOCKED_USER: You blocked this user

See https://core.telegram.org/method/messages.sendMessage for reference. Can be used by bots.

func (*Client) MessagesSendMultiMedia

func (c *Client) MessagesSendMultiMedia(ctx context.Context, request *MessagesSendMultiMediaRequest) (UpdatesClass, error)

MessagesSendMultiMedia invokes method messages.sendMultiMedia#cc0110cb returning error if any. Send an album or grouped media¹

Links:

  1. https://core.telegram.org/api/files#albums-grouped-media

Possible errors:

400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 MEDIA_EMPTY: The provided media object is invalid
400 MEDIA_INVALID: Media invalid
400 MULTI_MEDIA_TOO_LONG: Too many media files for album
400 PEER_ID_INVALID: The provided peer id is invalid
400 RANDOM_ID_EMPTY: Random ID empty

See https://core.telegram.org/method/messages.sendMultiMedia for reference. Can be used by bots.

func (*Client) MessagesSendScheduledMessages

func (c *Client) MessagesSendScheduledMessages(ctx context.Context, request *MessagesSendScheduledMessagesRequest) (UpdatesClass, error)

MessagesSendScheduledMessages invokes method messages.sendScheduledMessages#bd38850a returning error if any. Send scheduled messages right away

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid

See https://core.telegram.org/method/messages.sendScheduledMessages for reference.

func (*Client) MessagesSendScreenshotNotification

func (c *Client) MessagesSendScreenshotNotification(ctx context.Context, request *MessagesSendScreenshotNotificationRequest) (UpdatesClass, error)

MessagesSendScreenshotNotification invokes method messages.sendScreenshotNotification#c97df020 returning error if any. Notify the other user in a private chat that a screenshot of the chat was taken

Possible errors:

400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.sendScreenshotNotification for reference.

func (*Client) MessagesSendVote

func (c *Client) MessagesSendVote(ctx context.Context, request *MessagesSendVoteRequest) (UpdatesClass, error)

MessagesSendVote invokes method messages.sendVote#10ea6184 returning error if any. Vote in a poll¹

Links:

  1. https://core.telegram.org/constructor/poll

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid
400 MESSAGE_POLL_CLOSED: Poll closed
400 OPTIONS_TOO_MUCH: Too many options provided
400 OPTION_INVALID: Invalid option selected
400 REVOTE_NOT_ALLOWED: You cannot change your vote

See https://core.telegram.org/method/messages.sendVote for reference.

func (*Client) MessagesSetBotCallbackAnswer

func (c *Client) MessagesSetBotCallbackAnswer(ctx context.Context, request *MessagesSetBotCallbackAnswerRequest) (bool, error)

MessagesSetBotCallbackAnswer invokes method messages.setBotCallbackAnswer#d58f130a returning error if any. Set the callback answer to a user button press (bots only)

Possible errors:

400 QUERY_ID_INVALID: The query ID is invalid
400 URL_INVALID: Invalid URL provided

See https://core.telegram.org/method/messages.setBotCallbackAnswer for reference. Can be used by bots.

func (*Client) MessagesSetBotPrecheckoutResults

func (c *Client) MessagesSetBotPrecheckoutResults(ctx context.Context, request *MessagesSetBotPrecheckoutResultsRequest) (bool, error)

MessagesSetBotPrecheckoutResults invokes method messages.setBotPrecheckoutResults#9c2dd95 returning error if any. Once the user has confirmed their payment and shipping details, the bot receives an updateBotPrecheckoutQuery¹ update. Use this method to respond to such pre-checkout queries. Note: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent.

Links:

  1. https://core.telegram.org/constructor/updateBotPrecheckoutQuery

Possible errors:

400 ERROR_TEXT_EMPTY: The provided error message is empty

See https://core.telegram.org/method/messages.setBotPrecheckoutResults for reference. Can be used by bots.

func (*Client) MessagesSetBotShippingResults

func (c *Client) MessagesSetBotShippingResults(ctx context.Context, request *MessagesSetBotShippingResultsRequest) (bool, error)

MessagesSetBotShippingResults invokes method messages.setBotShippingResults#e5f672fa returning error if any. If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an updateBotShippingQuery¹ update. Use this method to reply to shipping queries.

Links:

  1. https://core.telegram.org/constructor/updateBotShippingQuery

Possible errors:

400 QUERY_ID_INVALID: The query ID is invalid

See https://core.telegram.org/method/messages.setBotShippingResults for reference. Can be used by bots.

func (*Client) MessagesSetEncryptedTyping

func (c *Client) MessagesSetEncryptedTyping(ctx context.Context, request *MessagesSetEncryptedTypingRequest) (bool, error)

MessagesSetEncryptedTyping invokes method messages.setEncryptedTyping#791451ed returning error if any. Send typing event by the current user to a secret chat.

Possible errors:

400 CHAT_ID_INVALID: The provided chat id is invalid

See https://core.telegram.org/method/messages.setEncryptedTyping for reference.

func (*Client) MessagesSetGameScore

func (c *Client) MessagesSetGameScore(ctx context.Context, request *MessagesSetGameScoreRequest) (UpdatesClass, error)

MessagesSetGameScore invokes method messages.setGameScore#8ef8ecc0 returning error if any. Use this method to set the score of the specified user in a game sent as a normal message (bots only).

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid
400 PEER_ID_INVALID: The provided peer id is invalid
400 USER_BOT_REQUIRED: This method can only be called by a bot

See https://core.telegram.org/method/messages.setGameScore for reference. Can be used by bots.

func (*Client) MessagesSetInlineBotResults

func (c *Client) MessagesSetInlineBotResults(ctx context.Context, request *MessagesSetInlineBotResultsRequest) (bool, error)

MessagesSetInlineBotResults invokes method messages.setInlineBotResults#eb5ea206 returning error if any. Answer an inline query, for bots only

Possible errors:

400 ARTICLE_TITLE_EMPTY: The title of the article is empty
400 BUTTON_DATA_INVALID: The data of one or more of the buttons you provided is invalid
400 BUTTON_TYPE_INVALID: The type of one or more of the buttons you provided is invalid
400 BUTTON_URL_INVALID: Button URL invalid
400 GIF_CONTENT_TYPE_INVALID: GIF content-type invalid
400 MESSAGE_EMPTY: The provided message is empty
400 MESSAGE_TOO_LONG: The provided message is too long
400 PHOTO_CONTENT_TYPE_INVALID: Photo mime-type invalid
400 PHOTO_CONTENT_URL_EMPTY: Photo URL invalid
400 PHOTO_INVALID: Photo invalid
400 PHOTO_THUMB_URL_EMPTY: Photo thumbnail URL is empty
400 QUERY_ID_INVALID: The query ID is invalid
400 REPLY_MARKUP_INVALID: The provided reply markup is invalid
400 RESULTS_TOO_MUCH: Too many results were provided
400 RESULT_ID_DUPLICATE: You provided a duplicate result ID
400 RESULT_TYPE_INVALID: Result type invalid
400 SEND_MESSAGE_MEDIA_INVALID: Invalid media provided
400 SEND_MESSAGE_TYPE_INVALID: The message type is invalid
400 START_PARAM_INVALID: Start parameter invalid
403 USER_BOT_INVALID: This method can only be called by a bot
400 WEBDOCUMENT_INVALID: Invalid webdocument URL provided
400 WEBDOCUMENT_MIME_INVALID: Invalid webdocument mime type provided
400 WEBDOCUMENT_SIZE_TOO_BIG: Webdocument is too big!

See https://core.telegram.org/method/messages.setInlineBotResults for reference. Can be used by bots.

func (*Client) MessagesSetInlineGameScore

func (c *Client) MessagesSetInlineGameScore(ctx context.Context, request *MessagesSetInlineGameScoreRequest) (bool, error)

MessagesSetInlineGameScore invokes method messages.setInlineGameScore#15ad9f64 returning error if any. Use this method to set the score of the specified user in a game sent as an inline message (bots only).

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid
400 USER_BOT_REQUIRED: This method can only be called by a bot

See https://core.telegram.org/method/messages.setInlineGameScore for reference. Can be used by bots.

func (*Client) MessagesSetTyping

func (c *Client) MessagesSetTyping(ctx context.Context, request *MessagesSetTypingRequest) (bool, error)

MessagesSetTyping invokes method messages.setTyping#58943ee2 returning error if any. Sends a current user typing event (see SendMessageAction¹ for all event types) to a conversation partner or group.

Links:

  1. https://core.telegram.org/type/SendMessageAction

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_ID_INVALID: The provided chat id is invalid
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid
400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels
400 USER_IS_BLOCKED: You were blocked by this user
400 USER_IS_BOT: Bots can't send messages to other bots

See https://core.telegram.org/method/messages.setTyping for reference. Can be used by bots.

func (*Client) MessagesStartBot

func (c *Client) MessagesStartBot(ctx context.Context, request *MessagesStartBotRequest) (UpdatesClass, error)

MessagesStartBot invokes method messages.startBot#e6df7378 returning error if any. Start a conversation with a bot using a deep linking parameter¹

Links:

  1. https://core.telegram.org/bots#deep-linking

Possible errors:

400 BOT_INVALID: This is not a valid bot
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid
400 START_PARAM_EMPTY: The start parameter is empty
400 START_PARAM_INVALID: Start parameter invalid
400 START_PARAM_TOO_LONG: Start parameter is too long

See https://core.telegram.org/method/messages.startBot for reference.

func (*Client) MessagesToggleDialogPin

func (c *Client) MessagesToggleDialogPin(ctx context.Context, request *MessagesToggleDialogPinRequest) (bool, error)

MessagesToggleDialogPin invokes method messages.toggleDialogPin#a731e257 returning error if any. Pin/unpin a dialog

Possible errors:

400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/messages.toggleDialogPin for reference.

func (*Client) MessagesToggleStickerSets

func (c *Client) MessagesToggleStickerSets(ctx context.Context, request *MessagesToggleStickerSetsRequest) (bool, error)

MessagesToggleStickerSets invokes method messages.toggleStickerSets#b5052fea returning error if any. Apply changes to multiple stickersets

See https://core.telegram.org/method/messages.toggleStickerSets for reference.

func (*Client) MessagesUninstallStickerSet

func (c *Client) MessagesUninstallStickerSet(ctx context.Context, stickerset InputStickerSetClass) (bool, error)

MessagesUninstallStickerSet invokes method messages.uninstallStickerSet#f96e55de returning error if any. Uninstall a stickerset

Possible errors:

400 STICKERSET_INVALID: The provided sticker set is invalid

See https://core.telegram.org/method/messages.uninstallStickerSet for reference.

func (*Client) MessagesUnpinAllMessages

func (c *Client) MessagesUnpinAllMessages(ctx context.Context, peer InputPeerClass) (*MessagesAffectedHistory, error)

MessagesUnpinAllMessages invokes method messages.unpinAllMessages#f025bc8b returning error if any. Unpin¹ all pinned messages

Links:

  1. https://core.telegram.org/api/pin

See https://core.telegram.org/method/messages.unpinAllMessages for reference. Can be used by bots.

func (*Client) MessagesUpdateDialogFilter

func (c *Client) MessagesUpdateDialogFilter(ctx context.Context, request *MessagesUpdateDialogFilterRequest) (bool, error)

MessagesUpdateDialogFilter invokes method messages.updateDialogFilter#1ad4a04a returning error if any. Update folder¹

Links:

  1. https://core.telegram.org/api/folders

Possible errors:

400 FILTER_ID_INVALID: The specified filter ID is invalid

See https://core.telegram.org/method/messages.updateDialogFilter for reference.

func (*Client) MessagesUpdateDialogFiltersOrder

func (c *Client) MessagesUpdateDialogFiltersOrder(ctx context.Context, order []int) (bool, error)

MessagesUpdateDialogFiltersOrder invokes method messages.updateDialogFiltersOrder#c563c1e4 returning error if any. Reorder folders¹

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/method/messages.updateDialogFiltersOrder for reference.

func (*Client) MessagesUpdatePinnedMessage

func (c *Client) MessagesUpdatePinnedMessage(ctx context.Context, request *MessagesUpdatePinnedMessageRequest) (UpdatesClass, error)

MessagesUpdatePinnedMessage invokes method messages.updatePinnedMessage#d2aaf7ec returning error if any. Pin a message

Possible errors:

400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
400 CHAT_NOT_MODIFIED: The pinned message wasn't modified
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 MESSAGE_ID_INVALID: The provided message id is invalid
400 PIN_RESTRICTED: You can't pin messages

See https://core.telegram.org/method/messages.updatePinnedMessage for reference. Can be used by bots.

func (*Client) MessagesUploadEncryptedFile

func (c *Client) MessagesUploadEncryptedFile(ctx context.Context, request *MessagesUploadEncryptedFileRequest) (EncryptedFileClass, error)

MessagesUploadEncryptedFile invokes method messages.uploadEncryptedFile#5057c497 returning error if any. Upload encrypted file and associate it to a secret chat

See https://core.telegram.org/method/messages.uploadEncryptedFile for reference.

func (*Client) MessagesUploadMedia

func (c *Client) MessagesUploadMedia(ctx context.Context, request *MessagesUploadMediaRequest) (MessageMediaClass, error)

MessagesUploadMedia invokes method messages.uploadMedia#519bc2b1 returning error if any. Upload a file and associate it to a chat (without actually sending it to the chat)

Possible errors:

400 BOT_MISSING: This method can only be run by a bot
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this
403 CHAT_WRITE_FORBIDDEN: You can't write in this chat
400 FILE_PARTS_INVALID: The number of file parts is invalid
400 IMAGE_PROCESS_FAILED: Failure while processing image
400 INPUT_USER_DEACTIVATED: The specified user was deleted
400 MEDIA_INVALID: Media invalid
400 MSG_ID_INVALID: Invalid message ID provided
400 PEER_ID_INVALID: The provided peer id is invalid
400 PHOTO_EXT_INVALID: The extension of the photo is invalid
400 PHOTO_SAVE_FILE_INVALID: Internal issues, try again later
400 USER_BANNED_IN_CHANNEL: You're banned from sending messages in supergroups/channels
400 WEBPAGE_CURL_FAILED: Failure while fetching the webpage with cURL

See https://core.telegram.org/method/messages.uploadMedia for reference. Can be used by bots.

func (*Client) PaymentsClearSavedInfo

func (c *Client) PaymentsClearSavedInfo(ctx context.Context, request *PaymentsClearSavedInfoRequest) (bool, error)

PaymentsClearSavedInfo invokes method payments.clearSavedInfo#d83d70c1 returning error if any. Clear saved payment information

See https://core.telegram.org/method/payments.clearSavedInfo for reference.

func (*Client) PaymentsGetBankCardData

func (c *Client) PaymentsGetBankCardData(ctx context.Context, number string) (*PaymentsBankCardData, error)

PaymentsGetBankCardData invokes method payments.getBankCardData#2e79d779 returning error if any. Get info about a credit card

See https://core.telegram.org/method/payments.getBankCardData for reference.

func (*Client) PaymentsGetPaymentForm

func (c *Client) PaymentsGetPaymentForm(ctx context.Context, msgid int) (*PaymentsPaymentForm, error)

PaymentsGetPaymentForm invokes method payments.getPaymentForm#99f09745 returning error if any. Get a payment form

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid

See https://core.telegram.org/method/payments.getPaymentForm for reference.

func (*Client) PaymentsGetPaymentReceipt

func (c *Client) PaymentsGetPaymentReceipt(ctx context.Context, msgid int) (*PaymentsPaymentReceipt, error)

PaymentsGetPaymentReceipt invokes method payments.getPaymentReceipt#a092a980 returning error if any. Get payment receipt

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid

See https://core.telegram.org/method/payments.getPaymentReceipt for reference.

func (*Client) PaymentsGetSavedInfo

func (c *Client) PaymentsGetSavedInfo(ctx context.Context) (*PaymentsSavedInfo, error)

PaymentsGetSavedInfo invokes method payments.getSavedInfo#227d824b returning error if any. Get saved payment information

See https://core.telegram.org/method/payments.getSavedInfo for reference.

func (*Client) PaymentsSendPaymentForm

func (c *Client) PaymentsSendPaymentForm(ctx context.Context, request *PaymentsSendPaymentFormRequest) (PaymentsPaymentResultClass, error)

PaymentsSendPaymentForm invokes method payments.sendPaymentForm#2b8879b3 returning error if any. Send compiled payment form

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid

See https://core.telegram.org/method/payments.sendPaymentForm for reference.

func (*Client) PaymentsValidateRequestedInfo

func (c *Client) PaymentsValidateRequestedInfo(ctx context.Context, request *PaymentsValidateRequestedInfoRequest) (*PaymentsValidatedRequestedInfo, error)

PaymentsValidateRequestedInfo invokes method payments.validateRequestedInfo#770a8e74 returning error if any. Submit requested order information for validation

Possible errors:

400 MESSAGE_ID_INVALID: The provided message id is invalid

See https://core.telegram.org/method/payments.validateRequestedInfo for reference.

func (*Client) PhoneAcceptCall

func (c *Client) PhoneAcceptCall(ctx context.Context, request *PhoneAcceptCallRequest) (*PhonePhoneCall, error)

PhoneAcceptCall invokes method phone.acceptCall#3bd2b4a0 returning error if any. Accept incoming call

Possible errors:

400 CALL_ALREADY_ACCEPTED: The call was already accepted
400 CALL_ALREADY_DECLINED: The call was already declined
400 CALL_PEER_INVALID: The provided call peer object is invalid
400 CALL_PROTOCOL_FLAGS_INVALID: Call protocol flags invalid

See https://core.telegram.org/method/phone.acceptCall for reference.

func (*Client) PhoneCheckGroupCall added in v0.13.0

func (c *Client) PhoneCheckGroupCall(ctx context.Context, request *PhoneCheckGroupCallRequest) (bool, error)

PhoneCheckGroupCall invokes method phone.checkGroupCall#b74a7bea returning error if any.

See https://core.telegram.org/method/phone.checkGroupCall for reference.

func (*Client) PhoneConfirmCall

func (c *Client) PhoneConfirmCall(ctx context.Context, request *PhoneConfirmCallRequest) (*PhonePhoneCall, error)

PhoneConfirmCall invokes method phone.confirmCall#2efe1722 returning error if any. Complete phone call E2E encryption key exchange »¹

Links:

  1. https://core.telegram.org/api/end-to-end/voice-calls

Possible errors:

400 CALL_ALREADY_DECLINED: The call was already declined
400 CALL_PEER_INVALID: The provided call peer object is invalid

See https://core.telegram.org/method/phone.confirmCall for reference.

func (*Client) PhoneCreateGroupCall added in v0.13.0

func (c *Client) PhoneCreateGroupCall(ctx context.Context, request *PhoneCreateGroupCallRequest) (UpdatesClass, error)

PhoneCreateGroupCall invokes method phone.createGroupCall#bd3dabe0 returning error if any.

See https://core.telegram.org/method/phone.createGroupCall for reference.

func (*Client) PhoneDiscardCall

func (c *Client) PhoneDiscardCall(ctx context.Context, request *PhoneDiscardCallRequest) (UpdatesClass, error)

PhoneDiscardCall invokes method phone.discardCall#b2cbc1c0 returning error if any. Refuse or end running call

Possible errors:

400 CALL_ALREADY_ACCEPTED: The call was already accepted
400 CALL_PEER_INVALID: The provided call peer object is invalid

See https://core.telegram.org/method/phone.discardCall for reference.

func (*Client) PhoneDiscardGroupCall added in v0.13.0

func (c *Client) PhoneDiscardGroupCall(ctx context.Context, call InputGroupCall) (UpdatesClass, error)

PhoneDiscardGroupCall invokes method phone.discardGroupCall#7a777135 returning error if any.

See https://core.telegram.org/method/phone.discardGroupCall for reference.

func (*Client) PhoneEditGroupCallMember added in v0.13.0

func (c *Client) PhoneEditGroupCallMember(ctx context.Context, request *PhoneEditGroupCallMemberRequest) (UpdatesClass, error)

PhoneEditGroupCallMember invokes method phone.editGroupCallMember#63146ae4 returning error if any.

See https://core.telegram.org/method/phone.editGroupCallMember for reference.

func (*Client) PhoneGetCallConfig

func (c *Client) PhoneGetCallConfig(ctx context.Context) (*DataJSON, error)

PhoneGetCallConfig invokes method phone.getCallConfig#55451fa9 returning error if any. Get phone call configuration to be passed to libtgvoip's shared config

See https://core.telegram.org/method/phone.getCallConfig for reference.

func (*Client) PhoneGetGroupCall added in v0.13.0

func (c *Client) PhoneGetGroupCall(ctx context.Context, call InputGroupCall) (*PhoneGroupCall, error)

PhoneGetGroupCall invokes method phone.getGroupCall#c7cb017 returning error if any.

See https://core.telegram.org/method/phone.getGroupCall for reference.

func (*Client) PhoneGetGroupParticipants added in v0.13.0

func (c *Client) PhoneGetGroupParticipants(ctx context.Context, request *PhoneGetGroupParticipantsRequest) (*PhoneGroupParticipants, error)

PhoneGetGroupParticipants invokes method phone.getGroupParticipants#c9f1d285 returning error if any.

See https://core.telegram.org/method/phone.getGroupParticipants for reference.

func (*Client) PhoneInviteToGroupCall added in v0.13.0

func (c *Client) PhoneInviteToGroupCall(ctx context.Context, request *PhoneInviteToGroupCallRequest) (UpdatesClass, error)

PhoneInviteToGroupCall invokes method phone.inviteToGroupCall#7b393160 returning error if any.

See https://core.telegram.org/method/phone.inviteToGroupCall for reference.

func (*Client) PhoneJoinGroupCall added in v0.13.0

func (c *Client) PhoneJoinGroupCall(ctx context.Context, request *PhoneJoinGroupCallRequest) (UpdatesClass, error)

PhoneJoinGroupCall invokes method phone.joinGroupCall#5f9c8e62 returning error if any.

See https://core.telegram.org/method/phone.joinGroupCall for reference.

func (*Client) PhoneLeaveGroupCall added in v0.13.0

func (c *Client) PhoneLeaveGroupCall(ctx context.Context, request *PhoneLeaveGroupCallRequest) (UpdatesClass, error)

PhoneLeaveGroupCall invokes method phone.leaveGroupCall#500377f9 returning error if any.

See https://core.telegram.org/method/phone.leaveGroupCall for reference.

func (*Client) PhoneReceivedCall

func (c *Client) PhoneReceivedCall(ctx context.Context, peer InputPhoneCall) (bool, error)

PhoneReceivedCall invokes method phone.receivedCall#17d54f61 returning error if any. Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended.

Possible errors:

400 CALL_ALREADY_DECLINED: The call was already declined
400 CALL_PEER_INVALID: The provided call peer object is invalid

See https://core.telegram.org/method/phone.receivedCall for reference.

func (*Client) PhoneRequestCall

func (c *Client) PhoneRequestCall(ctx context.Context, request *PhoneRequestCallRequest) (*PhonePhoneCall, error)

PhoneRequestCall invokes method phone.requestCall#42ff96ed returning error if any. Start a telegram phone call

Possible errors:

400 CALL_PROTOCOL_FLAGS_INVALID: Call protocol flags invalid
400 PARTICIPANT_VERSION_OUTDATED: The other participant does not use an up to date telegram client with support for calls
400 USER_ID_INVALID: The provided user ID is invalid
403 USER_IS_BLOCKED: You were blocked by this user
403 USER_PRIVACY_RESTRICTED: The user's privacy settings do not allow you to do this

See https://core.telegram.org/method/phone.requestCall for reference.

func (*Client) PhoneSaveCallDebug

func (c *Client) PhoneSaveCallDebug(ctx context.Context, request *PhoneSaveCallDebugRequest) (bool, error)

PhoneSaveCallDebug invokes method phone.saveCallDebug#277add7e returning error if any. Send phone call debug data to server

Possible errors:

400 CALL_PEER_INVALID: The provided call peer object is invalid
400 DATA_JSON_INVALID: The provided JSON data is invalid

See https://core.telegram.org/method/phone.saveCallDebug for reference.

func (*Client) PhoneSendSignalingData

func (c *Client) PhoneSendSignalingData(ctx context.Context, request *PhoneSendSignalingDataRequest) (bool, error)

PhoneSendSignalingData invokes method phone.sendSignalingData#ff7a9383 returning error if any. Send VoIP signaling data

See https://core.telegram.org/method/phone.sendSignalingData for reference. Can be used by bots.

func (*Client) PhoneSetCallRating

func (c *Client) PhoneSetCallRating(ctx context.Context, request *PhoneSetCallRatingRequest) (UpdatesClass, error)

PhoneSetCallRating invokes method phone.setCallRating#59ead627 returning error if any. Rate a call

Possible errors:

400 CALL_PEER_INVALID: The provided call peer object is invalid

See https://core.telegram.org/method/phone.setCallRating for reference.

func (*Client) PhoneToggleGroupCallSettings added in v0.13.0

func (c *Client) PhoneToggleGroupCallSettings(ctx context.Context, request *PhoneToggleGroupCallSettingsRequest) (UpdatesClass, error)

PhoneToggleGroupCallSettings invokes method phone.toggleGroupCallSettings#74bbb43d returning error if any.

See https://core.telegram.org/method/phone.toggleGroupCallSettings for reference.

func (*Client) PhotosDeletePhotos added in v0.8.0

func (c *Client) PhotosDeletePhotos(ctx context.Context, id []InputPhotoClass) ([]int64, error)

PhotosDeletePhotos invokes method photos.deletePhotos#87cf7f2f returning error if any. Deletes profile photos.

See https://core.telegram.org/method/photos.deletePhotos for reference.

func (*Client) PhotosGetUserPhotos

func (c *Client) PhotosGetUserPhotos(ctx context.Context, request *PhotosGetUserPhotosRequest) (PhotosPhotosClass, error)

PhotosGetUserPhotos invokes method photos.getUserPhotos#91cd32a8 returning error if any. Returns the list of user photos.

Possible errors:

400 MAX_ID_INVALID: The provided max ID is invalid
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/photos.getUserPhotos for reference. Can be used by bots.

func (*Client) PhotosUpdateProfilePhoto

func (c *Client) PhotosUpdateProfilePhoto(ctx context.Context, id InputPhotoClass) (*PhotosPhoto, error)

PhotosUpdateProfilePhoto invokes method photos.updateProfilePhoto#72d4742c returning error if any. Installs a previously uploaded photo as a profile photo.

Possible errors:

400 FILE_PARTS_INVALID: The number of file parts is invalid
400 IMAGE_PROCESS_FAILED: Failure while processing image
400 LOCATION_INVALID: The provided location is invalid
400 PHOTO_CROP_SIZE_SMALL: Photo is too small
400 PHOTO_EXT_INVALID: The extension of the photo is invalid
400 PHOTO_ID_INVALID: Photo ID invalid

See https://core.telegram.org/method/photos.updateProfilePhoto for reference.

func (*Client) PhotosUploadProfilePhoto

func (c *Client) PhotosUploadProfilePhoto(ctx context.Context, request *PhotosUploadProfilePhotoRequest) (*PhotosPhoto, error)

PhotosUploadProfilePhoto invokes method photos.uploadProfilePhoto#89f30f69 returning error if any. Updates current user profile photo.

Possible errors:

400 FILE_PARTS_INVALID: The number of file parts is invalid
400 IMAGE_PROCESS_FAILED: Failure while processing image
400 PHOTO_CROP_FILE_MISSING: Photo crop file missing
400 PHOTO_CROP_SIZE_SMALL: Photo is too small
400 PHOTO_EXT_INVALID: The extension of the photo is invalid
400 PHOTO_FILE_MISSING: Profile photo file missing
400 VIDEO_FILE_INVALID: The specified video file is invalid

See https://core.telegram.org/method/photos.uploadProfilePhoto for reference.

func (*Client) StatsGetBroadcastStats

func (c *Client) StatsGetBroadcastStats(ctx context.Context, request *StatsGetBroadcastStatsRequest) (*StatsBroadcastStats, error)

StatsGetBroadcastStats invokes method stats.getBroadcastStats#ab42441a returning error if any. Get channel statistics¹

Links:

  1. https://core.telegram.org/api/stats

Possible errors:

400 BROADCAST_REQUIRED: This method can only be called on a channel, please use stats.getMegagroupStats for supergroups
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this

See https://core.telegram.org/method/stats.getBroadcastStats for reference.

func (*Client) StatsGetMegagroupStats

func (c *Client) StatsGetMegagroupStats(ctx context.Context, request *StatsGetMegagroupStatsRequest) (*StatsMegagroupStats, error)

StatsGetMegagroupStats invokes method stats.getMegagroupStats#dcdf8607 returning error if any. Get supergroup statistics¹

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/method/stats.getMegagroupStats for reference. Can be used by bots.

func (*Client) StatsGetMessagePublicForwards

func (c *Client) StatsGetMessagePublicForwards(ctx context.Context, request *StatsGetMessagePublicForwardsRequest) (MessagesMessagesClass, error)

StatsGetMessagePublicForwards invokes method stats.getMessagePublicForwards#5630281b returning error if any. Obtains a list of messages, indicating to which other public channels was a channel message forwarded. Will return a list of messages¹ with peer_id equal to the public channel to which this message was forwarded.

Links:

  1. https://core.telegram.org/constructor/message

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 MESSAGE_ID_INVALID: The provided message id is invalid

See https://core.telegram.org/method/stats.getMessagePublicForwards for reference. Can be used by bots.

func (*Client) StatsGetMessageStats

func (c *Client) StatsGetMessageStats(ctx context.Context, request *StatsGetMessageStatsRequest) (*StatsMessageStats, error)

StatsGetMessageStats invokes method stats.getMessageStats#b6e0a3f5 returning error if any. Get message statistics¹

Links:

  1. https://core.telegram.org/api/stats

Possible errors:

400 CHAT_ADMIN_REQUIRED: You must be an admin in this chat to do this

See https://core.telegram.org/method/stats.getMessageStats for reference. Can be used by bots.

func (*Client) StatsLoadAsyncGraph

func (c *Client) StatsLoadAsyncGraph(ctx context.Context, request *StatsLoadAsyncGraphRequest) (StatsGraphClass, error)

StatsLoadAsyncGraph invokes method stats.loadAsyncGraph#621d5fa0 returning error if any. Load channel statistics graph¹ asynchronously

Links:

  1. https://core.telegram.org/api/stats

Possible errors:

400 GRAPH_INVALID_RELOAD: Invalid graph token provided, please reload the stats and provide the updated token
400 GRAPH_OUTDATED_RELOAD: The graph is outdated, please get a new async token using stats.getBroadcastStats

See https://core.telegram.org/method/stats.loadAsyncGraph for reference.

func (*Client) StickersAddStickerToSet

func (c *Client) StickersAddStickerToSet(ctx context.Context, request *StickersAddStickerToSetRequest) (*MessagesStickerSet, error)

StickersAddStickerToSet invokes method stickers.addStickerToSet#8653febe returning error if any. Add a sticker to a stickerset, bots only. The sticker set must have been created by the bot.

Possible errors:

400 BOT_MISSING: This method can only be run by a bot
400 STICKERSET_INVALID: The provided sticker set is invalid

See https://core.telegram.org/method/stickers.addStickerToSet for reference. Can be used by bots.

func (*Client) StickersChangeStickerPosition

func (c *Client) StickersChangeStickerPosition(ctx context.Context, request *StickersChangeStickerPositionRequest) (*MessagesStickerSet, error)

StickersChangeStickerPosition invokes method stickers.changeStickerPosition#ffb6d4ca returning error if any. Changes the absolute position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot

Possible errors:

400 BOT_MISSING: This method can only be run by a bot
400 STICKER_INVALID: The provided sticker is invalid

See https://core.telegram.org/method/stickers.changeStickerPosition for reference. Can be used by bots.

func (*Client) StickersCreateStickerSet

func (c *Client) StickersCreateStickerSet(ctx context.Context, request *StickersCreateStickerSetRequest) (*MessagesStickerSet, error)

StickersCreateStickerSet invokes method stickers.createStickerSet#f1036780 returning error if any. Create a stickerset, bots only.

Possible errors:

400 BOT_MISSING: This method can only be run by a bot
400 PACK_SHORT_NAME_INVALID: Short pack name invalid
400 PACK_SHORT_NAME_OCCUPIED: A stickerpack with this name already exists
400 PACK_TITLE_INVALID: The stickerpack title is invalid
400 PEER_ID_INVALID: The provided peer id is invalid
400 SHORTNAME_OCCUPY_FAILED: An internal error occurred
400 STICKERS_EMPTY: No sticker provided
400 STICKER_EMOJI_INVALID: Sticker emoji invalid
400 STICKER_FILE_INVALID: Sticker file invalid
400 STICKER_PNG_DIMENSIONS: Sticker png dimensions invalid
400 STICKER_PNG_NOPNG: One of the specified stickers is not a valid PNG file
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/stickers.createStickerSet for reference. Can be used by bots.

func (*Client) StickersRemoveStickerFromSet

func (c *Client) StickersRemoveStickerFromSet(ctx context.Context, sticker InputDocumentClass) (*MessagesStickerSet, error)

StickersRemoveStickerFromSet invokes method stickers.removeStickerFromSet#f7760f51 returning error if any. Remove a sticker from the set where it belongs, bots only. The sticker set must have been created by the bot.

Possible errors:

400 BOT_MISSING: This method can only be run by a bot
400 STICKER_INVALID: The provided sticker is invalid

See https://core.telegram.org/method/stickers.removeStickerFromSet for reference. Can be used by bots.

func (*Client) StickersSetStickerSetThumb

func (c *Client) StickersSetStickerSetThumb(ctx context.Context, request *StickersSetStickerSetThumbRequest) (*MessagesStickerSet, error)

StickersSetStickerSetThumb invokes method stickers.setStickerSetThumb#9a364e30 returning error if any. Set stickerset thumbnail

Possible errors:

400 STICKERSET_INVALID: The provided sticker set is invalid

See https://core.telegram.org/method/stickers.setStickerSetThumb for reference. Can be used by bots.

func (*Client) UpdatesGetChannelDifference

func (c *Client) UpdatesGetChannelDifference(ctx context.Context, request *UpdatesGetChannelDifferenceRequest) (UpdatesChannelDifferenceClass, error)

UpdatesGetChannelDifference invokes method updates.getChannelDifference#3173d78 returning error if any. Returns the difference between the current state of updates of a certain channel and transmitted.

Possible errors:

400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
403 CHANNEL_PUBLIC_GROUP_NA: channel/supergroup not available
400 FROM_MESSAGE_BOT_DISABLED: Bots can't use fromMessage min constructors
400 MSG_ID_INVALID: Invalid message ID provided
400 PERSISTENT_TIMESTAMP_EMPTY: Persistent timestamp empty
400 PERSISTENT_TIMESTAMP_INVALID: Persistent timestamp invalid
400 PINNED_DIALOGS_TOO_MUCH: Too many pinned dialogs
400 RANGES_INVALID: Invalid range provided

See https://core.telegram.org/method/updates.getChannelDifference for reference. Can be used by bots.

func (*Client) UpdatesGetDifference

func (c *Client) UpdatesGetDifference(ctx context.Context, request *UpdatesGetDifferenceRequest) (UpdatesDifferenceClass, error)

UpdatesGetDifference invokes method updates.getDifference#25939651 returning error if any. Get new updates¹.

Links:

  1. https://core.telegram.org/api/updates

Possible errors:

401 AUTH_KEY_PERM_EMPTY: The temporary auth key must be binded to the permanent auth key to use these methods.
400 CDN_METHOD_INVALID: You can't call this method in a CDN DC
400 DATE_EMPTY: Date empty
400 PERSISTENT_TIMESTAMP_EMPTY: Persistent timestamp empty
400 PERSISTENT_TIMESTAMP_INVALID: Persistent timestamp invalid

See https://core.telegram.org/method/updates.getDifference for reference. Can be used by bots.

func (*Client) UpdatesGetState

func (c *Client) UpdatesGetState(ctx context.Context) (*UpdatesState, error)

UpdatesGetState invokes method updates.getState#edd4882a returning error if any. Returns a current state of updates.

See https://core.telegram.org/method/updates.getState for reference. Can be used by bots.

func (*Client) UploadGetCdnFile

func (c *Client) UploadGetCdnFile(ctx context.Context, request *UploadGetCdnFileRequest) (UploadCdnFileClass, error)

UploadGetCdnFile invokes method upload.getCdnFile#2000bcc3 returning error if any. Download a CDN¹ file.

Links:

  1. https://core.telegram.org/cdn

See https://core.telegram.org/method/upload.getCdnFile for reference.

func (*Client) UploadGetCdnFileHashes added in v0.8.0

func (c *Client) UploadGetCdnFileHashes(ctx context.Context, request *UploadGetCdnFileHashesRequest) ([]FileHash, error)

UploadGetCdnFileHashes invokes method upload.getCdnFileHashes#4da54231 returning error if any. Get SHA256 hashes for verifying downloaded CDN¹ files

Links:

  1. https://core.telegram.org/cdn

Possible errors:

400 CDN_METHOD_INVALID: You can't call this method in a CDN DC
400 RSA_DECRYPT_FAILED: Internal RSA decryption failed

See https://core.telegram.org/method/upload.getCdnFileHashes for reference. Can be used by bots.

func (*Client) UploadGetFile

func (c *Client) UploadGetFile(ctx context.Context, request *UploadGetFileRequest) (UploadFileClass, error)

UploadGetFile invokes method upload.getFile#b15a9afc returning error if any. Returns content of a whole file or its part.

Possible errors:

401 AUTH_KEY_PERM_EMPTY: The temporary auth key must be binded to the permanent auth key to use these methods.
400 CHANNEL_INVALID: The provided channel is invalid
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
406 FILEREF_UPGRADE_NEEDED: The client has to be updated in order to support file references
400 FILE_ID_INVALID: The provided file id is invalid
400 FILE_REFERENCE_*: The file reference expired, it must be refreshed
400 FILE_REFERENCE_EXPIRED: File reference expired, it must be refetched as described in https://core.telegram.org/api/file_reference
400 LIMIT_INVALID: The provided limit is invalid
400 LOCATION_INVALID: The provided location is invalid
400 MSG_ID_INVALID: Invalid message ID provided
400 OFFSET_INVALID: The provided offset is invalid
400 PEER_ID_INVALID: The provided peer id is invalid

See https://core.telegram.org/method/upload.getFile for reference. Can be used by bots.

func (*Client) UploadGetFileHashes added in v0.8.0

func (c *Client) UploadGetFileHashes(ctx context.Context, request *UploadGetFileHashesRequest) ([]FileHash, error)

UploadGetFileHashes invokes method upload.getFileHashes#c7025931 returning error if any. Get SHA256 hashes for verifying downloaded files

Possible errors:

400 LOCATION_INVALID: The provided location is invalid

See https://core.telegram.org/method/upload.getFileHashes for reference. Can be used by bots.

func (*Client) UploadGetWebFile

func (c *Client) UploadGetWebFile(ctx context.Context, request *UploadGetWebFileRequest) (*UploadWebFile, error)

UploadGetWebFile invokes method upload.getWebFile#24e6818d returning error if any.

See https://core.telegram.org/method/upload.getWebFile for reference.

func (*Client) UploadReuploadCdnFile added in v0.8.0

func (c *Client) UploadReuploadCdnFile(ctx context.Context, request *UploadReuploadCdnFileRequest) ([]FileHash, error)

UploadReuploadCdnFile invokes method upload.reuploadCdnFile#9b2754a8 returning error if any. Request a reupload of a certain file to a CDN DC¹.

Links:

  1. https://core.telegram.org/cdn

Possible errors:

400 RSA_DECRYPT_FAILED: Internal RSA decryption failed

See https://core.telegram.org/method/upload.reuploadCdnFile for reference. Can be used by bots.

func (*Client) UploadSaveBigFilePart

func (c *Client) UploadSaveBigFilePart(ctx context.Context, request *UploadSaveBigFilePartRequest) (bool, error)

UploadSaveBigFilePart invokes method upload.saveBigFilePart#de7b673d returning error if any. Saves a part of a large file (over 10Mb in size) to be later passed to one of the methods.

Possible errors:

400 FILE_PARTS_INVALID: The number of file parts is invalid
400 FILE_PART_EMPTY: The provided file part is empty
400 FILE_PART_INVALID: The file part number is invalid
400 FILE_PART_SIZE_CHANGED: Provided file part size has changed
400 FILE_PART_SIZE_INVALID: The provided file part size is invalid
400 FILE_PART_TOO_BIG: The uploaded file part is too big

See https://core.telegram.org/method/upload.saveBigFilePart for reference. Can be used by bots.

func (*Client) UploadSaveFilePart

func (c *Client) UploadSaveFilePart(ctx context.Context, request *UploadSaveFilePartRequest) (bool, error)

UploadSaveFilePart invokes method upload.saveFilePart#b304a621 returning error if any. Saves a part of file for futher sending to one of the methods.

Possible errors:

400 FILE_PART_EMPTY: The provided file part is empty
400 FILE_PART_INVALID: The file part number is invalid

See https://core.telegram.org/method/upload.saveFilePart for reference. Can be used by bots.

func (*Client) UsersGetFullUser

func (c *Client) UsersGetFullUser(ctx context.Context, id InputUserClass) (*UserFull, error)

UsersGetFullUser invokes method users.getFullUser#ca30a5b1 returning error if any. Returns extended user info by ID.

Possible errors:

400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 MSG_ID_INVALID: Invalid message ID provided
400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/users.getFullUser for reference. Can be used by bots.

func (*Client) UsersGetUsers added in v0.8.0

func (c *Client) UsersGetUsers(ctx context.Context, id []InputUserClass) ([]UserClass, error)

UsersGetUsers invokes method users.getUsers#d91a548 returning error if any. Returns basic user info according to their identifiers.

Possible errors:

401 AUTH_KEY_PERM_EMPTY: The temporary auth key must be binded to the permanent auth key to use these methods.
400 CHANNEL_PRIVATE: You haven't joined this channel/supergroup
400 CONNECTION_NOT_INITED: Connection not initialized
400 INPUT_LAYER_INVALID: The provided layer is invalid
400 MSG_ID_INVALID: Invalid message ID provided

See https://core.telegram.org/method/users.getUsers for reference. Can be used by bots.

func (*Client) UsersSetSecureValueErrors

func (c *Client) UsersSetSecureValueErrors(ctx context.Context, request *UsersSetSecureValueErrorsRequest) (bool, error)

UsersSetSecureValueErrors invokes method users.setSecureValueErrors#90c894b5 returning error if any. Notify the user that the sent passport¹ data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

Links:

  1. https://core.telegram.org/passport

Possible errors:

400 USER_ID_INVALID: The provided user ID is invalid

See https://core.telegram.org/method/users.setSecureValueErrors for reference. Can be used by bots.

type CodeSettings

type CodeSettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to allow phone verification via phone calls¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/auth
	AllowFlashcall bool
	// Pass true if the phone number is used on the current device. Ignored if allow_flashcall is not set.
	CurrentNumber bool
	// If a token that will be included in eventually sent SMSs is required: required in newer versions of android, to use the android SMS receiver APIs¹
	//
	// Links:
	//  1) https://developers.google.com/identity/sms-retriever/overview
	AllowAppHash bool
}

CodeSettings represents TL type `codeSettings#debebe83`. Settings used by telegram servers for sending the confirm code. Example implementations: telegram for android¹, tdlib².

Links:

  1. https://github.com/DrKLO/Telegram/blob/master/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java
  2. https://github.com/tdlib/td/tree/master/td/telegram/SendCodeHelper.cpp

See https://core.telegram.org/constructor/codeSettings for reference.

func (*CodeSettings) Decode

func (c *CodeSettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*CodeSettings) Encode

func (c *CodeSettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*CodeSettings) SetAllowAppHash

func (c *CodeSettings) SetAllowAppHash(value bool)

SetAllowAppHash sets value of AllowAppHash conditional field.

func (*CodeSettings) SetAllowFlashcall

func (c *CodeSettings) SetAllowFlashcall(value bool)

SetAllowFlashcall sets value of AllowFlashcall conditional field.

func (*CodeSettings) SetCurrentNumber

func (c *CodeSettings) SetCurrentNumber(value bool)

SetCurrentNumber sets value of CurrentNumber conditional field.

func (*CodeSettings) String added in v0.12.0

func (c *CodeSettings) String() string

String implements fmt.Stringer.

type Config

type Config struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether phone calls can be used
	PhonecallsEnabled bool
	// Whether the client should use P2P by default for phone calls with contacts
	DefaultP2PContacts bool
	// Whether the client should preload featured stickers
	PreloadFeaturedStickers bool
	// Whether the client should ignore phone entities¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	IgnorePhoneEntities bool
	// Whether incoming private messages can be deleted for both participants
	RevokePmInbox bool
	// Indicates that telegram is probably censored by governments/ISPs in the current region
	BlockedMode bool
	// Whether pfs¹ was used
	//
	// Links:
	//  1) https://core.telegram.org/api/pfs
	PFSEnabled bool
	// Current date at the server
	Date int
	// Expiration date of this config: when it expires it'll have to be refetched using help.getConfig¹
	//
	// Links:
	//  1) https://core.telegram.org/method/help.getConfig
	Expires int
	// Whether we're connected to the test DCs
	TestMode bool
	// ID of the DC that returned the reply
	ThisDC int
	// DC IP list
	DCOptions []DcOption
	// Domain name for fetching encrypted DC list from DNS TXT record
	DCTxtDomainName string
	// Maximum member count for normal groups¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	ChatSizeMax int
	// Maximum member count for supergroups¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	MegagroupSizeMax int
	// Maximum number of messages that can be forwarded at once using messages.forwardMessages¹.
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.forwardMessages
	ForwardedCountMax int
	// The client should update its online status¹ every N milliseconds
	//
	// Links:
	//  1) https://core.telegram.org/method/account.updateStatus
	OnlineUpdatePeriodMs int
	// Delay before offline status needs to be sent to the server
	OfflineBlurTimeoutMs int
	// Time without any user activity after which it should be treated offline
	OfflineIdleTimeoutMs int
	// If we are offline, but were online from some other client in last online_cloud_timeout_ms milliseconds after we had gone offline, then delay offline notification for notify_cloud_delay_ms milliseconds.
	OnlineCloudTimeoutMs int
	// If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds.
	NotifyCloudDelayMs int
	// If some other client is online, then delay notification for notification_default_delay_ms milliseconds
	NotifyDefaultDelayMs int
	// Not for client use
	PushChatPeriodMs int
	// Not for client use
	PushChatLimit int
	// Maximum count of saved gifs
	SavedGifsLimit int
	// Only messages with age smaller than the one specified can be edited
	EditTimeLimit int
	// Only channel/supergroup messages with age smaller than the specified can be deleted
	RevokeTimeLimit int
	// Only private messages with age smaller than the specified can be deleted
	RevokePmTimeLimit int
	// Exponential decay rate for computing top peer rating¹
	//
	// Links:
	//  1) https://core.telegram.org/api/top-rating
	RatingEDecay int
	// Maximum number of recent stickers
	StickersRecentLimit int
	// Maximum number of faved stickers
	StickersFavedLimit int
	// Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read
	ChannelsReadMediaPeriod int
	// Temporary passport¹ sessions
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetTmpSessions and GetTmpSessions helpers.
	TmpSessions int
	// Maximum count of pinned dialogs
	PinnedDialogsCountMax int
	// Maximum count of dialogs per folder
	PinnedInfolderCountMax int
	// Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call
	CallReceiveTimeoutMs int
	// Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused
	CallRingTimeoutMs int
	// VoIP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted
	CallConnectTimeoutMs int
	// If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted
	CallPacketTimeoutMs int
	// The domain to use to parse in-app links.For example t.me indicates that t.me/username links should parsed to @username, t.me/addsticker/name should be parsed to the appropriate stickerset and so on...
	MeURLPrefix string
	// URL to use to auto-update the current app
	//
	// Use SetAutoupdateURLPrefix and GetAutoupdateURLPrefix helpers.
	AutoupdateURLPrefix string
	// Username of the bot to use to search for GIFs
	//
	// Use SetGifSearchUsername and GetGifSearchUsername helpers.
	GifSearchUsername string
	// Username of the bot to use to search for venues
	//
	// Use SetVenueSearchUsername and GetVenueSearchUsername helpers.
	VenueSearchUsername string
	// Username of the bot to use for image search
	//
	// Use SetImgSearchUsername and GetImgSearchUsername helpers.
	ImgSearchUsername string
	// ID of the map provider to use for venues
	//
	// Use SetStaticMapsProvider and GetStaticMapsProvider helpers.
	StaticMapsProvider string
	// Maximum length of caption (length in utf8 codepoints)
	CaptionLengthMax int
	// Maximum length of messages (length in utf8 codepoints)
	MessageLengthMax int
	// DC ID to use to download webfiles¹
	//
	// Links:
	//  1) https://core.telegram.org/api/files
	WebfileDCID int
	// Suggested language code
	//
	// Use SetSuggestedLangCode and GetSuggestedLangCode helpers.
	SuggestedLangCode string
	// Language pack version
	//
	// Use SetLangPackVersion and GetLangPackVersion helpers.
	LangPackVersion int
	// Basic language pack version
	//
	// Use SetBaseLangPackVersion and GetBaseLangPackVersion helpers.
	BaseLangPackVersion int
}

Config represents TL type `config#330b4067`. Current configuration

See https://core.telegram.org/constructor/config for reference.

func (*Config) Decode

func (c *Config) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Config) Encode

func (c *Config) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Config) GetAutoupdateURLPrefix

func (c *Config) GetAutoupdateURLPrefix() (value string, ok bool)

GetAutoupdateURLPrefix returns value of AutoupdateURLPrefix conditional field and boolean which is true if field was set.

func (*Config) GetBaseLangPackVersion

func (c *Config) GetBaseLangPackVersion() (value int, ok bool)

GetBaseLangPackVersion returns value of BaseLangPackVersion conditional field and boolean which is true if field was set.

func (*Config) GetGifSearchUsername

func (c *Config) GetGifSearchUsername() (value string, ok bool)

GetGifSearchUsername returns value of GifSearchUsername conditional field and boolean which is true if field was set.

func (*Config) GetImgSearchUsername

func (c *Config) GetImgSearchUsername() (value string, ok bool)

GetImgSearchUsername returns value of ImgSearchUsername conditional field and boolean which is true if field was set.

func (*Config) GetLangPackVersion

func (c *Config) GetLangPackVersion() (value int, ok bool)

GetLangPackVersion returns value of LangPackVersion conditional field and boolean which is true if field was set.

func (*Config) GetStaticMapsProvider

func (c *Config) GetStaticMapsProvider() (value string, ok bool)

GetStaticMapsProvider returns value of StaticMapsProvider conditional field and boolean which is true if field was set.

func (*Config) GetSuggestedLangCode

func (c *Config) GetSuggestedLangCode() (value string, ok bool)

GetSuggestedLangCode returns value of SuggestedLangCode conditional field and boolean which is true if field was set.

func (*Config) GetTmpSessions

func (c *Config) GetTmpSessions() (value int, ok bool)

GetTmpSessions returns value of TmpSessions conditional field and boolean which is true if field was set.

func (*Config) GetVenueSearchUsername

func (c *Config) GetVenueSearchUsername() (value string, ok bool)

GetVenueSearchUsername returns value of VenueSearchUsername conditional field and boolean which is true if field was set.

func (*Config) SetAutoupdateURLPrefix

func (c *Config) SetAutoupdateURLPrefix(value string)

SetAutoupdateURLPrefix sets value of AutoupdateURLPrefix conditional field.

func (*Config) SetBaseLangPackVersion

func (c *Config) SetBaseLangPackVersion(value int)

SetBaseLangPackVersion sets value of BaseLangPackVersion conditional field.

func (*Config) SetBlockedMode

func (c *Config) SetBlockedMode(value bool)

SetBlockedMode sets value of BlockedMode conditional field.

func (*Config) SetDefaultP2PContacts

func (c *Config) SetDefaultP2PContacts(value bool)

SetDefaultP2PContacts sets value of DefaultP2PContacts conditional field.

func (*Config) SetGifSearchUsername

func (c *Config) SetGifSearchUsername(value string)

SetGifSearchUsername sets value of GifSearchUsername conditional field.

func (*Config) SetIgnorePhoneEntities

func (c *Config) SetIgnorePhoneEntities(value bool)

SetIgnorePhoneEntities sets value of IgnorePhoneEntities conditional field.

func (*Config) SetImgSearchUsername

func (c *Config) SetImgSearchUsername(value string)

SetImgSearchUsername sets value of ImgSearchUsername conditional field.

func (*Config) SetLangPackVersion

func (c *Config) SetLangPackVersion(value int)

SetLangPackVersion sets value of LangPackVersion conditional field.

func (*Config) SetPFSEnabled

func (c *Config) SetPFSEnabled(value bool)

SetPFSEnabled sets value of PFSEnabled conditional field.

func (*Config) SetPhonecallsEnabled

func (c *Config) SetPhonecallsEnabled(value bool)

SetPhonecallsEnabled sets value of PhonecallsEnabled conditional field.

func (*Config) SetPreloadFeaturedStickers

func (c *Config) SetPreloadFeaturedStickers(value bool)

SetPreloadFeaturedStickers sets value of PreloadFeaturedStickers conditional field.

func (*Config) SetRevokePmInbox

func (c *Config) SetRevokePmInbox(value bool)

SetRevokePmInbox sets value of RevokePmInbox conditional field.

func (*Config) SetStaticMapsProvider

func (c *Config) SetStaticMapsProvider(value string)

SetStaticMapsProvider sets value of StaticMapsProvider conditional field.

func (*Config) SetSuggestedLangCode

func (c *Config) SetSuggestedLangCode(value string)

SetSuggestedLangCode sets value of SuggestedLangCode conditional field.

func (*Config) SetTmpSessions

func (c *Config) SetTmpSessions(value int)

SetTmpSessions sets value of TmpSessions conditional field.

func (*Config) SetVenueSearchUsername

func (c *Config) SetVenueSearchUsername(value string)

SetVenueSearchUsername sets value of VenueSearchUsername conditional field.

func (*Config) String added in v0.12.0

func (c *Config) String() string

String implements fmt.Stringer.

type ConfigHandler added in v0.9.0

type ConfigHandler func(ctx UpdateContext, update *UpdateConfig) error

ConfigHandler is a Config event handler.

type Contact

type Contact struct {
	// User identifier
	UserID int
	// Current user is in the user's contact list
	Mutual bool
}

Contact represents TL type `contact#f911c994`. A contact of the current user that is registered in the system.

See https://core.telegram.org/constructor/contact for reference.

func (*Contact) Decode

func (c *Contact) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Contact) Encode

func (c *Contact) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Contact) String added in v0.12.0

func (c *Contact) String() string

String implements fmt.Stringer.

type ContactStatus

type ContactStatus struct {
	// User identifier
	UserID int
	// Online status
	Status UserStatusClass
}

ContactStatus represents TL type `contactStatus#d3680c61`. Contact status: online / offline.

See https://core.telegram.org/constructor/contactStatus for reference.

func (*ContactStatus) Decode

func (c *ContactStatus) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactStatus) Encode

func (c *ContactStatus) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactStatus) String added in v0.12.0

func (c *ContactStatus) String() string

String implements fmt.Stringer.

type ContactStatusVector added in v0.8.0

type ContactStatusVector struct {
	// Elements of Vector<ContactStatus>
	Elems []ContactStatus
}

ContactStatusVector is a box for Vector<ContactStatus>

func (*ContactStatusVector) Decode added in v0.8.0

func (vec *ContactStatusVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactStatusVector) Encode added in v0.8.0

func (vec *ContactStatusVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactStatusVector) String added in v0.12.0

func (vec *ContactStatusVector) String() string

String implements fmt.Stringer.

type ContactsAcceptContactRequest

type ContactsAcceptContactRequest struct {
	// The user to add as contact
	ID InputUserClass
}

ContactsAcceptContactRequest represents TL type `contacts.acceptContact#f831a20f`. If the peer settings¹ of a new user allow us to add him as contact, add that user as contact

Links:

  1. https://core.telegram.org/constructor/peerSettings

See https://core.telegram.org/method/contacts.acceptContact for reference.

func (*ContactsAcceptContactRequest) Decode

Decode implements bin.Decoder.

func (*ContactsAcceptContactRequest) Encode

Encode implements bin.Encoder.

func (*ContactsAcceptContactRequest) String added in v0.12.0

String implements fmt.Stringer.

type ContactsAddContactRequest

type ContactsAddContactRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Allow the other user to see our phone number?
	AddPhonePrivacyException bool
	// Telegram ID of the other user
	ID InputUserClass
	// First name
	FirstName string
	// Last name
	LastName string
	// User's phone number
	Phone string
}

ContactsAddContactRequest represents TL type `contacts.addContact#e8f463d0`. Add an existing telegram user as contact. Use contacts.importContacts¹ to add contacts by phone number, without knowing their Telegram ID.

Links:

  1. https://core.telegram.org/method/contacts.importContacts

See https://core.telegram.org/method/contacts.addContact for reference.

func (*ContactsAddContactRequest) Decode

func (a *ContactsAddContactRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsAddContactRequest) Encode

func (a *ContactsAddContactRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsAddContactRequest) SetAddPhonePrivacyException

func (a *ContactsAddContactRequest) SetAddPhonePrivacyException(value bool)

SetAddPhonePrivacyException sets value of AddPhonePrivacyException conditional field.

func (*ContactsAddContactRequest) String added in v0.12.0

func (a *ContactsAddContactRequest) String() string

String implements fmt.Stringer.

type ContactsBlockFromRepliesRequest

type ContactsBlockFromRepliesRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to delete the specified message as well
	DeleteMessage bool
	// Whether to delete all @replies messages from this user as well
	DeleteHistory bool
	// Whether to also report this user for spam
	ReportSpam bool
	// ID of the message in the @replies¹ chat
	//
	// Links:
	//  1) https://core.telegram.org/api/threads#replies
	MsgID int
}

ContactsBlockFromRepliesRequest represents TL type `contacts.blockFromReplies#29a8962c`. Stop getting notifications about thread replies¹ of a certain user in @replies

Links:

  1. https://core.telegram.org/api/threads

See https://core.telegram.org/method/contacts.blockFromReplies for reference.

func (*ContactsBlockFromRepliesRequest) Decode

Decode implements bin.Decoder.

func (*ContactsBlockFromRepliesRequest) Encode

Encode implements bin.Encoder.

func (*ContactsBlockFromRepliesRequest) SetDeleteHistory

func (b *ContactsBlockFromRepliesRequest) SetDeleteHistory(value bool)

SetDeleteHistory sets value of DeleteHistory conditional field.

func (*ContactsBlockFromRepliesRequest) SetDeleteMessage

func (b *ContactsBlockFromRepliesRequest) SetDeleteMessage(value bool)

SetDeleteMessage sets value of DeleteMessage conditional field.

func (*ContactsBlockFromRepliesRequest) SetReportSpam

func (b *ContactsBlockFromRepliesRequest) SetReportSpam(value bool)

SetReportSpam sets value of ReportSpam conditional field.

func (*ContactsBlockFromRepliesRequest) String added in v0.12.0

String implements fmt.Stringer.

type ContactsBlockRequest

type ContactsBlockRequest struct {
	// User ID
	ID InputPeerClass
}

ContactsBlockRequest represents TL type `contacts.block#68cc1411`. Adds the user to the blacklist.

See https://core.telegram.org/method/contacts.block for reference.

func (*ContactsBlockRequest) Decode

func (b *ContactsBlockRequest) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsBlockRequest) Encode

func (b *ContactsBlockRequest) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsBlockRequest) String added in v0.12.0

func (b *ContactsBlockRequest) String() string

String implements fmt.Stringer.

type ContactsBlocked

type ContactsBlocked struct {
	// List of blocked users
	Blocked []PeerBlocked
	// Blocked chats
	Chats []ChatClass
	// List of users
	Users []UserClass
}

ContactsBlocked represents TL type `contacts.blocked#ade1591`. Full list of blocked users.

See https://core.telegram.org/constructor/contacts.blocked for reference.

func (*ContactsBlocked) Decode

func (b *ContactsBlocked) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsBlocked) Encode

func (b *ContactsBlocked) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsBlocked) String added in v0.12.0

func (b *ContactsBlocked) String() string

String implements fmt.Stringer.

type ContactsBlockedBox

type ContactsBlockedBox struct {
	Blocked ContactsBlockedClass
}

ContactsBlocked boxes the ContactsBlockedClass providing a helper.

func (*ContactsBlockedBox) Decode

func (b *ContactsBlockedBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ContactsBlockedBox.

func (*ContactsBlockedBox) Encode

func (b *ContactsBlockedBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ContactsBlockedBox.

type ContactsBlockedClass

type ContactsBlockedClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ContactsBlockedClass represents contacts.Blocked generic type.

See https://core.telegram.org/type/contacts.Blocked for reference.

Example:

g, err := DecodeContactsBlocked(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ContactsBlocked: // contacts.blocked#ade1591
case *ContactsBlockedSlice: // contacts.blockedSlice#e1664194
default: panic(v)
}

func DecodeContactsBlocked

func DecodeContactsBlocked(buf *bin.Buffer) (ContactsBlockedClass, error)

DecodeContactsBlocked implements binary de-serialization for ContactsBlockedClass.

type ContactsBlockedSlice

type ContactsBlockedSlice struct {
	// Total number of elements in the list
	Count int
	// List of blocked users
	Blocked []PeerBlocked
	// Blocked chats
	Chats []ChatClass
	// List of users
	Users []UserClass
}

ContactsBlockedSlice represents TL type `contacts.blockedSlice#e1664194`. Incomplete list of blocked users.

See https://core.telegram.org/constructor/contacts.blockedSlice for reference.

func (*ContactsBlockedSlice) Decode

func (b *ContactsBlockedSlice) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsBlockedSlice) Encode

func (b *ContactsBlockedSlice) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsBlockedSlice) String added in v0.12.0

func (b *ContactsBlockedSlice) String() string

String implements fmt.Stringer.

type ContactsContacts

type ContactsContacts struct {
	// Contact list
	Contacts []Contact
	// Number of contacts that were saved successfully
	SavedCount int
	// User list
	Users []UserClass
}

ContactsContacts represents TL type `contacts.contacts#eae87e42`. The current user's contact list and info on users.

See https://core.telegram.org/constructor/contacts.contacts for reference.

func (*ContactsContacts) Decode

func (c *ContactsContacts) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsContacts) Encode

func (c *ContactsContacts) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsContacts) String added in v0.12.0

func (c *ContactsContacts) String() string

String implements fmt.Stringer.

type ContactsContactsBox

type ContactsContactsBox struct {
	Contacts ContactsContactsClass
}

ContactsContacts boxes the ContactsContactsClass providing a helper.

func (*ContactsContactsBox) Decode

func (b *ContactsContactsBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ContactsContactsBox.

func (*ContactsContactsBox) Encode

func (b *ContactsContactsBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ContactsContactsBox.

type ContactsContactsClass

type ContactsContactsClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ContactsContactsClass represents contacts.Contacts generic type.

See https://core.telegram.org/type/contacts.Contacts for reference.

Example:

g, err := DecodeContactsContacts(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ContactsContactsNotModified: // contacts.contactsNotModified#b74ba9d2
case *ContactsContacts: // contacts.contacts#eae87e42
default: panic(v)
}

func DecodeContactsContacts

func DecodeContactsContacts(buf *bin.Buffer) (ContactsContactsClass, error)

DecodeContactsContacts implements binary de-serialization for ContactsContactsClass.

type ContactsContactsNotModified

type ContactsContactsNotModified struct {
}

ContactsContactsNotModified represents TL type `contacts.contactsNotModified#b74ba9d2`. Contact list on the server is the same as the list on the client.

See https://core.telegram.org/constructor/contacts.contactsNotModified for reference.

func (*ContactsContactsNotModified) Decode

Decode implements bin.Decoder.

func (*ContactsContactsNotModified) Encode

Encode implements bin.Encoder.

func (*ContactsContactsNotModified) String added in v0.12.0

func (c *ContactsContactsNotModified) String() string

String implements fmt.Stringer.

type ContactsDeleteByPhonesRequest

type ContactsDeleteByPhonesRequest struct {
	// Phone numbers
	Phones []string
}

ContactsDeleteByPhonesRequest represents TL type `contacts.deleteByPhones#1013fd9e`. Delete contacts by phone number

See https://core.telegram.org/method/contacts.deleteByPhones for reference.

func (*ContactsDeleteByPhonesRequest) Decode

Decode implements bin.Decoder.

func (*ContactsDeleteByPhonesRequest) Encode

Encode implements bin.Encoder.

func (*ContactsDeleteByPhonesRequest) String added in v0.12.0

String implements fmt.Stringer.

type ContactsDeleteContactsRequest

type ContactsDeleteContactsRequest struct {
	// User ID list
	ID []InputUserClass
}

ContactsDeleteContactsRequest represents TL type `contacts.deleteContacts#96a0e00`. Deletes several contacts from the list.

See https://core.telegram.org/method/contacts.deleteContacts for reference.

func (*ContactsDeleteContactsRequest) Decode

Decode implements bin.Decoder.

func (*ContactsDeleteContactsRequest) Encode

Encode implements bin.Encoder.

func (*ContactsDeleteContactsRequest) String added in v0.12.0

String implements fmt.Stringer.

type ContactsFound

type ContactsFound struct {
	// Personalized results
	MyResults []PeerClass
	// List of found user identifiers
	Results []PeerClass
	// Found chats
	Chats []ChatClass
	// List of users
	Users []UserClass
}

ContactsFound represents TL type `contacts.found#b3134d9d`. Users found by name substring and auxiliary data.

See https://core.telegram.org/constructor/contacts.found for reference.

func (*ContactsFound) Decode

func (f *ContactsFound) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsFound) Encode

func (f *ContactsFound) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsFound) String added in v0.12.0

func (f *ContactsFound) String() string

String implements fmt.Stringer.

type ContactsGetBlockedRequest

type ContactsGetBlockedRequest struct {
	// The number of list elements to be skipped
	Offset int
	// The number of list elements to be returned
	Limit int
}

ContactsGetBlockedRequest represents TL type `contacts.getBlocked#f57c350f`. Returns the list of blocked users.

See https://core.telegram.org/method/contacts.getBlocked for reference.

func (*ContactsGetBlockedRequest) Decode

func (g *ContactsGetBlockedRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsGetBlockedRequest) Encode

func (g *ContactsGetBlockedRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsGetBlockedRequest) String added in v0.12.0

func (g *ContactsGetBlockedRequest) String() string

String implements fmt.Stringer.

type ContactsGetContactIDsRequest

type ContactsGetContactIDsRequest struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

ContactsGetContactIDsRequest represents TL type `contacts.getContactIDs#2caa4a42`. Get contact by telegram IDs

See https://core.telegram.org/method/contacts.getContactIDs for reference.

func (*ContactsGetContactIDsRequest) Decode

Decode implements bin.Decoder.

func (*ContactsGetContactIDsRequest) Encode

Encode implements bin.Encoder.

func (*ContactsGetContactIDsRequest) String added in v0.12.0

String implements fmt.Stringer.

type ContactsGetContactsRequest

type ContactsGetContactsRequest struct {
	// If there already is a full contact list on the client, a hash¹ of a the list of contact IDs in ascending order may be passed in this parameter. If the contact set was not changed, (contacts.contactsNotModified)² will be returned.
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	//  2) https://core.telegram.org/constructor/contacts.contactsNotModified
	Hash int
}

ContactsGetContactsRequest represents TL type `contacts.getContacts#c023849f`. Returns the current user's contact list.

See https://core.telegram.org/method/contacts.getContacts for reference.

func (*ContactsGetContactsRequest) Decode

Decode implements bin.Decoder.

func (*ContactsGetContactsRequest) Encode

Encode implements bin.Encoder.

func (*ContactsGetContactsRequest) String added in v0.12.0

func (g *ContactsGetContactsRequest) String() string

String implements fmt.Stringer.

type ContactsGetLocatedRequest

type ContactsGetLocatedRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so, while setting this flag. Do this only if the new location is more than 1 KM away from the previous one, or if the previous location is unknown.
	Background bool
	// Geolocation
	GeoPoint InputGeoPointClass
	// If set, the geolocation of the current user will be public for the specified number of seconds; pass 0x7fffffff to disable expiry, 0 to make the current geolocation private; if the flag isn't set, no changes will be applied.
	//
	// Use SetSelfExpires and GetSelfExpires helpers.
	SelfExpires int
}

ContactsGetLocatedRequest represents TL type `contacts.getLocated#d348bc44`. Get contacts near you

See https://core.telegram.org/method/contacts.getLocated for reference.

func (*ContactsGetLocatedRequest) Decode

func (g *ContactsGetLocatedRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsGetLocatedRequest) Encode

func (g *ContactsGetLocatedRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsGetLocatedRequest) GetSelfExpires

func (g *ContactsGetLocatedRequest) GetSelfExpires() (value int, ok bool)

GetSelfExpires returns value of SelfExpires conditional field and boolean which is true if field was set.

func (*ContactsGetLocatedRequest) SetBackground

func (g *ContactsGetLocatedRequest) SetBackground(value bool)

SetBackground sets value of Background conditional field.

func (*ContactsGetLocatedRequest) SetSelfExpires

func (g *ContactsGetLocatedRequest) SetSelfExpires(value int)

SetSelfExpires sets value of SelfExpires conditional field.

func (*ContactsGetLocatedRequest) String added in v0.12.0

func (g *ContactsGetLocatedRequest) String() string

String implements fmt.Stringer.

type ContactsGetSavedRequest

type ContactsGetSavedRequest struct {
}

ContactsGetSavedRequest represents TL type `contacts.getSaved#82f1e39f`. Get all contacts

See https://core.telegram.org/method/contacts.getSaved for reference.

func (*ContactsGetSavedRequest) Decode

func (g *ContactsGetSavedRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsGetSavedRequest) Encode

func (g *ContactsGetSavedRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsGetSavedRequest) String added in v0.12.0

func (g *ContactsGetSavedRequest) String() string

String implements fmt.Stringer.

type ContactsGetStatusesRequest

type ContactsGetStatusesRequest struct {
}

ContactsGetStatusesRequest represents TL type `contacts.getStatuses#c4a353ee`. Returns the list of contact statuses.

See https://core.telegram.org/method/contacts.getStatuses for reference.

func (*ContactsGetStatusesRequest) Decode

Decode implements bin.Decoder.

func (*ContactsGetStatusesRequest) Encode

Encode implements bin.Encoder.

func (*ContactsGetStatusesRequest) String added in v0.12.0

func (g *ContactsGetStatusesRequest) String() string

String implements fmt.Stringer.

type ContactsGetTopPeersRequest

type ContactsGetTopPeersRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Users we've chatted most frequently with
	Correspondents bool
	// Most used bots
	BotsPm bool
	// Most used inline bots
	BotsInline bool
	// Most frequently called users
	PhoneCalls bool
	// Users to which the users often forwards messages to
	ForwardUsers bool
	// Chats to which the users often forwards messages to
	ForwardChats bool
	// Often-opened groups and supergroups
	Groups bool
	// Most frequently visited channels
	Channels bool
	// Offset for pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Offset int
	// Maximum number of results to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

ContactsGetTopPeersRequest represents TL type `contacts.getTopPeers#d4982db5`. Get most used peers

See https://core.telegram.org/method/contacts.getTopPeers for reference.

func (*ContactsGetTopPeersRequest) Decode

Decode implements bin.Decoder.

func (*ContactsGetTopPeersRequest) Encode

Encode implements bin.Encoder.

func (*ContactsGetTopPeersRequest) SetBotsInline

func (g *ContactsGetTopPeersRequest) SetBotsInline(value bool)

SetBotsInline sets value of BotsInline conditional field.

func (*ContactsGetTopPeersRequest) SetBotsPm

func (g *ContactsGetTopPeersRequest) SetBotsPm(value bool)

SetBotsPm sets value of BotsPm conditional field.

func (*ContactsGetTopPeersRequest) SetChannels

func (g *ContactsGetTopPeersRequest) SetChannels(value bool)

SetChannels sets value of Channels conditional field.

func (*ContactsGetTopPeersRequest) SetCorrespondents

func (g *ContactsGetTopPeersRequest) SetCorrespondents(value bool)

SetCorrespondents sets value of Correspondents conditional field.

func (*ContactsGetTopPeersRequest) SetForwardChats

func (g *ContactsGetTopPeersRequest) SetForwardChats(value bool)

SetForwardChats sets value of ForwardChats conditional field.

func (*ContactsGetTopPeersRequest) SetForwardUsers

func (g *ContactsGetTopPeersRequest) SetForwardUsers(value bool)

SetForwardUsers sets value of ForwardUsers conditional field.

func (*ContactsGetTopPeersRequest) SetGroups

func (g *ContactsGetTopPeersRequest) SetGroups(value bool)

SetGroups sets value of Groups conditional field.

func (*ContactsGetTopPeersRequest) SetPhoneCalls

func (g *ContactsGetTopPeersRequest) SetPhoneCalls(value bool)

SetPhoneCalls sets value of PhoneCalls conditional field.

func (*ContactsGetTopPeersRequest) String added in v0.12.0

func (g *ContactsGetTopPeersRequest) String() string

String implements fmt.Stringer.

type ContactsImportContactsRequest

type ContactsImportContactsRequest struct {
	// List of contacts to import
	Contacts []InputPhoneContact
}

ContactsImportContactsRequest represents TL type `contacts.importContacts#2c800be5`. Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info. Use contacts.addContact¹ to add Telegram contacts without actually using their phone number.

Links:

  1. https://core.telegram.org/method/contacts.addContact

See https://core.telegram.org/method/contacts.importContacts for reference.

func (*ContactsImportContactsRequest) Decode

Decode implements bin.Decoder.

func (*ContactsImportContactsRequest) Encode

Encode implements bin.Encoder.

func (*ContactsImportContactsRequest) String added in v0.12.0

String implements fmt.Stringer.

type ContactsImportedContacts

type ContactsImportedContacts struct {
	// List of succesfully imported contacts
	Imported []ImportedContact
	// Popular contacts
	PopularInvites []PopularContact
	// List of contact ids that could not be imported due to system limitation and will need to be imported at a later date.Parameter added in Layer 13¹
	//
	// Links:
	//  1) https://core.telegram.org/api/layers#layer-13
	RetryContacts []int64
	// List of users
	Users []UserClass
}

ContactsImportedContacts represents TL type `contacts.importedContacts#77d01c3b`. Info on succesfully imported contacts.

See https://core.telegram.org/constructor/contacts.importedContacts for reference.

func (*ContactsImportedContacts) Decode

func (i *ContactsImportedContacts) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsImportedContacts) Encode

func (i *ContactsImportedContacts) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsImportedContacts) String added in v0.12.0

func (i *ContactsImportedContacts) String() string

String implements fmt.Stringer.

type ContactsResetHandler added in v0.9.0

type ContactsResetHandler func(ctx UpdateContext, update *UpdateContactsReset) error

ContactsResetHandler is a ContactsReset event handler.

type ContactsResetSavedRequest

type ContactsResetSavedRequest struct {
}

ContactsResetSavedRequest represents TL type `contacts.resetSaved#879537f1`. Delete saved contacts

See https://core.telegram.org/method/contacts.resetSaved for reference.

func (*ContactsResetSavedRequest) Decode

func (r *ContactsResetSavedRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsResetSavedRequest) Encode

func (r *ContactsResetSavedRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsResetSavedRequest) String added in v0.12.0

func (r *ContactsResetSavedRequest) String() string

String implements fmt.Stringer.

type ContactsResetTopPeerRatingRequest

type ContactsResetTopPeerRatingRequest struct {
	// Top peer category
	Category TopPeerCategoryClass
	// Peer whose rating should be reset
	Peer InputPeerClass
}

ContactsResetTopPeerRatingRequest represents TL type `contacts.resetTopPeerRating#1ae373ac`. Reset rating¹ of top peer

Links:

  1. https://core.telegram.org/api/top-rating

See https://core.telegram.org/method/contacts.resetTopPeerRating for reference.

func (*ContactsResetTopPeerRatingRequest) Decode

Decode implements bin.Decoder.

func (*ContactsResetTopPeerRatingRequest) Encode

Encode implements bin.Encoder.

func (*ContactsResetTopPeerRatingRequest) String added in v0.12.0

String implements fmt.Stringer.

type ContactsResolveUsernameRequest

type ContactsResolveUsernameRequest struct {
	// @username to resolve
	Username string
}

ContactsResolveUsernameRequest represents TL type `contacts.resolveUsername#f93ccba3`. Resolve a @username to get peer info

See https://core.telegram.org/method/contacts.resolveUsername for reference.

func (*ContactsResolveUsernameRequest) Decode

Decode implements bin.Decoder.

func (*ContactsResolveUsernameRequest) Encode

Encode implements bin.Encoder.

func (*ContactsResolveUsernameRequest) String added in v0.12.0

String implements fmt.Stringer.

type ContactsResolvedPeer

type ContactsResolvedPeer struct {
	// The peer
	Peer PeerClass
	// Chats
	Chats []ChatClass
	// Users
	Users []UserClass
}

ContactsResolvedPeer represents TL type `contacts.resolvedPeer#7f077ad9`. Resolved peer

See https://core.telegram.org/constructor/contacts.resolvedPeer for reference.

func (*ContactsResolvedPeer) Decode

func (r *ContactsResolvedPeer) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsResolvedPeer) Encode

func (r *ContactsResolvedPeer) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsResolvedPeer) String added in v0.12.0

func (r *ContactsResolvedPeer) String() string

String implements fmt.Stringer.

type ContactsSearchRequest

type ContactsSearchRequest struct {
	// Target substring
	Q string
	// Maximum number of users to be returned
	Limit int
}

ContactsSearchRequest represents TL type `contacts.search#11f812d8`. Returns users found by username substring.

See https://core.telegram.org/method/contacts.search for reference.

func (*ContactsSearchRequest) Decode

func (s *ContactsSearchRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsSearchRequest) Encode

func (s *ContactsSearchRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsSearchRequest) String added in v0.12.0

func (s *ContactsSearchRequest) String() string

String implements fmt.Stringer.

type ContactsToggleTopPeersRequest

type ContactsToggleTopPeersRequest struct {
	// Enable/disable
	Enabled bool
}

ContactsToggleTopPeersRequest represents TL type `contacts.toggleTopPeers#8514bdda`. Enable/disable top peers¹

Links:

  1. https://core.telegram.org/api/top-rating

See https://core.telegram.org/method/contacts.toggleTopPeers for reference.

func (*ContactsToggleTopPeersRequest) Decode

Decode implements bin.Decoder.

func (*ContactsToggleTopPeersRequest) Encode

Encode implements bin.Encoder.

func (*ContactsToggleTopPeersRequest) String added in v0.12.0

String implements fmt.Stringer.

type ContactsTopPeers

type ContactsTopPeers struct {
	// Top peers by top peer category
	Categories []TopPeerCategoryPeers
	// Chats
	Chats []ChatClass
	// Users
	Users []UserClass
}

ContactsTopPeers represents TL type `contacts.topPeers#70b772a8`. Top peers

See https://core.telegram.org/constructor/contacts.topPeers for reference.

func (*ContactsTopPeers) Decode

func (t *ContactsTopPeers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsTopPeers) Encode

func (t *ContactsTopPeers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsTopPeers) String added in v0.12.0

func (t *ContactsTopPeers) String() string

String implements fmt.Stringer.

type ContactsTopPeersBox

type ContactsTopPeersBox struct {
	TopPeers ContactsTopPeersClass
}

ContactsTopPeers boxes the ContactsTopPeersClass providing a helper.

func (*ContactsTopPeersBox) Decode

func (b *ContactsTopPeersBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ContactsTopPeersBox.

func (*ContactsTopPeersBox) Encode

func (b *ContactsTopPeersBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ContactsTopPeersBox.

type ContactsTopPeersClass

type ContactsTopPeersClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ContactsTopPeersClass represents contacts.TopPeers generic type.

See https://core.telegram.org/type/contacts.TopPeers for reference.

Example:

g, err := DecodeContactsTopPeers(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ContactsTopPeersNotModified: // contacts.topPeersNotModified#de266ef5
case *ContactsTopPeers: // contacts.topPeers#70b772a8
case *ContactsTopPeersDisabled: // contacts.topPeersDisabled#b52c939d
default: panic(v)
}

func DecodeContactsTopPeers

func DecodeContactsTopPeers(buf *bin.Buffer) (ContactsTopPeersClass, error)

DecodeContactsTopPeers implements binary de-serialization for ContactsTopPeersClass.

type ContactsTopPeersDisabled

type ContactsTopPeersDisabled struct {
}

ContactsTopPeersDisabled represents TL type `contacts.topPeersDisabled#b52c939d`. Top peers disabled

See https://core.telegram.org/constructor/contacts.topPeersDisabled for reference.

func (*ContactsTopPeersDisabled) Decode

func (t *ContactsTopPeersDisabled) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsTopPeersDisabled) Encode

func (t *ContactsTopPeersDisabled) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsTopPeersDisabled) String added in v0.12.0

func (t *ContactsTopPeersDisabled) String() string

String implements fmt.Stringer.

type ContactsTopPeersNotModified

type ContactsTopPeersNotModified struct {
}

ContactsTopPeersNotModified represents TL type `contacts.topPeersNotModified#de266ef5`. Top peer info hasn't changed

See https://core.telegram.org/constructor/contacts.topPeersNotModified for reference.

func (*ContactsTopPeersNotModified) Decode

Decode implements bin.Decoder.

func (*ContactsTopPeersNotModified) Encode

Encode implements bin.Encoder.

func (*ContactsTopPeersNotModified) String added in v0.12.0

func (t *ContactsTopPeersNotModified) String() string

String implements fmt.Stringer.

type ContactsUnblockRequest

type ContactsUnblockRequest struct {
	// User ID
	ID InputPeerClass
}

ContactsUnblockRequest represents TL type `contacts.unblock#bea65d50`. Deletes the user from the blacklist.

See https://core.telegram.org/method/contacts.unblock for reference.

func (*ContactsUnblockRequest) Decode

func (u *ContactsUnblockRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ContactsUnblockRequest) Encode

func (u *ContactsUnblockRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ContactsUnblockRequest) String added in v0.12.0

func (u *ContactsUnblockRequest) String() string

String implements fmt.Stringer.

type DataJSON

type DataJSON struct {
	// JSON-encoded object
	Data string
}

DataJSON represents TL type `dataJSON#7d748d04`. Represents a json-encoded object

See https://core.telegram.org/constructor/dataJSON for reference.

func (*DataJSON) Decode

func (d *DataJSON) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DataJSON) Encode

func (d *DataJSON) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DataJSON) String added in v0.12.0

func (d *DataJSON) String() string

String implements fmt.Stringer.

type DcOption

type DcOption struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the specified IP is an IPv6 address
	Ipv6 bool
	// Whether this DC should only be used to download or upload files¹
	//
	// Links:
	//  1) https://core.telegram.org/api/files
	MediaOnly bool
	// Whether this DC only supports connection with transport obfuscation¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/mtproto-transports#transport-obfuscation
	TcpoOnly bool
	// Whether this is a CDN DC¹.
	//
	// Links:
	//  1) https://core.telegram.org/cdn
	CDN bool
	// If set, this IP should be used when connecting through a proxy
	Static bool
	// DC ID
	ID int
	// IP address of DC
	IPAddress string
	// Port
	Port int
	// If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/mtproto-transports#transport-obfuscation
	//
	// Use SetSecret and GetSecret helpers.
	Secret []byte
}

DcOption represents TL type `dcOption#18b7a10d`. Data centre

See https://core.telegram.org/constructor/dcOption for reference.

func (*DcOption) Decode

func (d *DcOption) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DcOption) Encode

func (d *DcOption) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DcOption) GetSecret

func (d *DcOption) GetSecret() (value []byte, ok bool)

GetSecret returns value of Secret conditional field and boolean which is true if field was set.

func (*DcOption) SetCDN

func (d *DcOption) SetCDN(value bool)

SetCDN sets value of CDN conditional field.

func (*DcOption) SetIpv6

func (d *DcOption) SetIpv6(value bool)

SetIpv6 sets value of Ipv6 conditional field.

func (*DcOption) SetMediaOnly

func (d *DcOption) SetMediaOnly(value bool)

SetMediaOnly sets value of MediaOnly conditional field.

func (*DcOption) SetSecret

func (d *DcOption) SetSecret(value []byte)

SetSecret sets value of Secret conditional field.

func (*DcOption) SetStatic

func (d *DcOption) SetStatic(value bool)

SetStatic sets value of Static conditional field.

func (*DcOption) SetTcpoOnly

func (d *DcOption) SetTcpoOnly(value bool)

SetTcpoOnly sets value of TcpoOnly conditional field.

func (*DcOption) String added in v0.12.0

func (d *DcOption) String() string

String implements fmt.Stringer.

type DcOptionsHandler added in v0.9.0

type DcOptionsHandler func(ctx UpdateContext, update *UpdateDcOptions) error

DcOptionsHandler is a DcOptions event handler.

type DeleteChannelMessagesHandler added in v0.9.0

type DeleteChannelMessagesHandler func(ctx UpdateContext, update *UpdateDeleteChannelMessages) error

DeleteChannelMessagesHandler is a DeleteChannelMessages event handler.

type DeleteMessagesHandler added in v0.9.0

type DeleteMessagesHandler func(ctx UpdateContext, update *UpdateDeleteMessages) error

DeleteMessagesHandler is a DeleteMessages event handler.

type DeleteScheduledMessagesHandler added in v0.9.0

type DeleteScheduledMessagesHandler func(ctx UpdateContext, update *UpdateDeleteScheduledMessages) error

DeleteScheduledMessagesHandler is a DeleteScheduledMessages event handler.

type Dialog

type Dialog struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Is the dialog pinned
	Pinned bool
	// Whether the chat was manually marked as unread
	UnreadMark bool
	// The chat
	Peer PeerClass
	// The latest message ID
	TopMessage int
	// Position up to which all incoming messages are read.
	ReadInboxMaxID int
	// Position up to which all outgoing messages are read.
	ReadOutboxMaxID int
	// Number of unread messages
	UnreadCount int
	// Number of unread mentions¹
	//
	// Links:
	//  1) https://core.telegram.org/api/mentions
	UnreadMentionsCount int
	// Notification settings
	NotifySettings PeerNotifySettings
	// PTS¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	//
	// Use SetPts and GetPts helpers.
	Pts int
	// Message draft
	//
	// Use SetDraft and GetDraft helpers.
	Draft DraftMessageClass
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
}

Dialog represents TL type `dialog#2c171f72`. Chat

See https://core.telegram.org/constructor/dialog for reference.

func (*Dialog) Decode

func (d *Dialog) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Dialog) Encode

func (d *Dialog) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Dialog) GetDraft

func (d *Dialog) GetDraft() (value DraftMessageClass, ok bool)

GetDraft returns value of Draft conditional field and boolean which is true if field was set.

func (*Dialog) GetFolderID

func (d *Dialog) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*Dialog) GetPts

func (d *Dialog) GetPts() (value int, ok bool)

GetPts returns value of Pts conditional field and boolean which is true if field was set.

func (*Dialog) SetDraft

func (d *Dialog) SetDraft(value DraftMessageClass)

SetDraft sets value of Draft conditional field.

func (*Dialog) SetFolderID

func (d *Dialog) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*Dialog) SetPinned

func (d *Dialog) SetPinned(value bool)

SetPinned sets value of Pinned conditional field.

func (*Dialog) SetPts

func (d *Dialog) SetPts(value int)

SetPts sets value of Pts conditional field.

func (*Dialog) SetUnreadMark

func (d *Dialog) SetUnreadMark(value bool)

SetUnreadMark sets value of UnreadMark conditional field.

func (*Dialog) String added in v0.12.0

func (d *Dialog) String() string

String implements fmt.Stringer.

type DialogBox

type DialogBox struct {
	Dialog DialogClass
}

Dialog boxes the DialogClass providing a helper.

func (*DialogBox) Decode

func (b *DialogBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for DialogBox.

func (*DialogBox) Encode

func (b *DialogBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for DialogBox.

type DialogClass

type DialogClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

DialogClass represents Dialog generic type.

See https://core.telegram.org/type/Dialog for reference.

Example:

g, err := DecodeDialog(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *Dialog: // dialog#2c171f72
case *DialogFolder: // dialogFolder#71bd134c
default: panic(v)
}

func DecodeDialog

func DecodeDialog(buf *bin.Buffer) (DialogClass, error)

DecodeDialog implements binary de-serialization for DialogClass.

type DialogFilter

type DialogFilter struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to include all contacts in this folder¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	Contacts bool
	// Whether to include all non-contacts in this folder¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	NonContacts bool
	// Whether to include all groups in this folder¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	Groups bool
	// Whether to include all channels in this folder¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	Broadcasts bool
	// Whether to include all bots in this folder¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	Bots bool
	// Whether to exclude muted chats from this folder¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	ExcludeMuted bool
	// Whether to exclude read chats from this folder¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	ExcludeRead bool
	// Whether to exclude archived chats from this folder¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	ExcludeArchived bool
	// Folder¹ ID
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	ID int
	// Folder¹ name
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	Title string
	// Folder¹ emoticon
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	//
	// Use SetEmoticon and GetEmoticon helpers.
	Emoticon string
	// Pinned chats, folders¹ can have unlimited pinned chats
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	PinnedPeers []InputPeerClass
	// Include the following chats in this folder¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	IncludePeers []InputPeerClass
	// Exclude the following chats from this folder¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	ExcludePeers []InputPeerClass
}

DialogFilter represents TL type `dialogFilter#7438f7e8`. Dialog filter AKA folder¹

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/constructor/dialogFilter for reference.

func (*DialogFilter) Decode

func (d *DialogFilter) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DialogFilter) Encode

func (d *DialogFilter) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DialogFilter) GetEmoticon

func (d *DialogFilter) GetEmoticon() (value string, ok bool)

GetEmoticon returns value of Emoticon conditional field and boolean which is true if field was set.

func (*DialogFilter) SetBots

func (d *DialogFilter) SetBots(value bool)

SetBots sets value of Bots conditional field.

func (*DialogFilter) SetBroadcasts

func (d *DialogFilter) SetBroadcasts(value bool)

SetBroadcasts sets value of Broadcasts conditional field.

func (*DialogFilter) SetContacts

func (d *DialogFilter) SetContacts(value bool)

SetContacts sets value of Contacts conditional field.

func (*DialogFilter) SetEmoticon

func (d *DialogFilter) SetEmoticon(value string)

SetEmoticon sets value of Emoticon conditional field.

func (*DialogFilter) SetExcludeArchived

func (d *DialogFilter) SetExcludeArchived(value bool)

SetExcludeArchived sets value of ExcludeArchived conditional field.

func (*DialogFilter) SetExcludeMuted

func (d *DialogFilter) SetExcludeMuted(value bool)

SetExcludeMuted sets value of ExcludeMuted conditional field.

func (*DialogFilter) SetExcludeRead

func (d *DialogFilter) SetExcludeRead(value bool)

SetExcludeRead sets value of ExcludeRead conditional field.

func (*DialogFilter) SetGroups

func (d *DialogFilter) SetGroups(value bool)

SetGroups sets value of Groups conditional field.

func (*DialogFilter) SetNonContacts

func (d *DialogFilter) SetNonContacts(value bool)

SetNonContacts sets value of NonContacts conditional field.

func (*DialogFilter) String added in v0.12.0

func (d *DialogFilter) String() string

String implements fmt.Stringer.

type DialogFilterHandler added in v0.9.0

type DialogFilterHandler func(ctx UpdateContext, update *UpdateDialogFilter) error

DialogFilterHandler is a DialogFilter event handler.

type DialogFilterOrderHandler added in v0.9.0

type DialogFilterOrderHandler func(ctx UpdateContext, update *UpdateDialogFilterOrder) error

DialogFilterOrderHandler is a DialogFilterOrder event handler.

type DialogFilterSuggested

type DialogFilterSuggested struct {
	// Folder info¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	Filter DialogFilter
	// Folder¹ description
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	Description string
}

DialogFilterSuggested represents TL type `dialogFilterSuggested#77744d4a`. Suggested folders¹

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/constructor/dialogFilterSuggested for reference.

func (*DialogFilterSuggested) Decode

func (d *DialogFilterSuggested) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DialogFilterSuggested) Encode

func (d *DialogFilterSuggested) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DialogFilterSuggested) String added in v0.12.0

func (d *DialogFilterSuggested) String() string

String implements fmt.Stringer.

type DialogFilterSuggestedVector added in v0.8.0

type DialogFilterSuggestedVector struct {
	// Elements of Vector<DialogFilterSuggested>
	Elems []DialogFilterSuggested
}

DialogFilterSuggestedVector is a box for Vector<DialogFilterSuggested>

func (*DialogFilterSuggestedVector) Decode added in v0.8.0

func (vec *DialogFilterSuggestedVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DialogFilterSuggestedVector) Encode added in v0.8.0

func (vec *DialogFilterSuggestedVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DialogFilterSuggestedVector) String added in v0.12.0

func (vec *DialogFilterSuggestedVector) String() string

String implements fmt.Stringer.

type DialogFilterVector added in v0.8.0

type DialogFilterVector struct {
	// Elements of Vector<DialogFilter>
	Elems []DialogFilter
}

DialogFilterVector is a box for Vector<DialogFilter>

func (*DialogFilterVector) Decode added in v0.8.0

func (vec *DialogFilterVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DialogFilterVector) Encode added in v0.8.0

func (vec *DialogFilterVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DialogFilterVector) String added in v0.12.0

func (vec *DialogFilterVector) String() string

String implements fmt.Stringer.

type DialogFiltersHandler added in v0.9.0

type DialogFiltersHandler func(ctx UpdateContext, update *UpdateDialogFilters) error

DialogFiltersHandler is a DialogFilters event handler.

type DialogFolder

type DialogFolder struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Is this folder pinned
	Pinned bool
	// The folder
	Folder Folder
	// Peer in folder
	Peer PeerClass
	// Latest message ID of dialog
	TopMessage int
	// Number of unread muted peers in folder
	UnreadMutedPeersCount int
	// Number of unread unmuted peers in folder
	UnreadUnmutedPeersCount int
	// Number of unread messages from muted peers in folder
	UnreadMutedMessagesCount int
	// Number of unread messages from unmuted peers in folder
	UnreadUnmutedMessagesCount int
}

DialogFolder represents TL type `dialogFolder#71bd134c`. Dialog in folder

See https://core.telegram.org/constructor/dialogFolder for reference.

func (*DialogFolder) Decode

func (d *DialogFolder) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DialogFolder) Encode

func (d *DialogFolder) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DialogFolder) SetPinned

func (d *DialogFolder) SetPinned(value bool)

SetPinned sets value of Pinned conditional field.

func (*DialogFolder) String added in v0.12.0

func (d *DialogFolder) String() string

String implements fmt.Stringer.

type DialogPeer

type DialogPeer struct {
	// Peer
	Peer PeerClass
}

DialogPeer represents TL type `dialogPeer#e56dbf05`. Peer

See https://core.telegram.org/constructor/dialogPeer for reference.

func (*DialogPeer) Decode

func (d *DialogPeer) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DialogPeer) Encode

func (d *DialogPeer) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DialogPeer) String added in v0.12.0

func (d *DialogPeer) String() string

String implements fmt.Stringer.

type DialogPeerBox

type DialogPeerBox struct {
	DialogPeer DialogPeerClass
}

DialogPeer boxes the DialogPeerClass providing a helper.

func (*DialogPeerBox) Decode

func (b *DialogPeerBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for DialogPeerBox.

func (*DialogPeerBox) Encode

func (b *DialogPeerBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for DialogPeerBox.

type DialogPeerClass

type DialogPeerClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

DialogPeerClass represents DialogPeer generic type.

See https://core.telegram.org/type/DialogPeer for reference.

Example:

g, err := DecodeDialogPeer(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *DialogPeer: // dialogPeer#e56dbf05
case *DialogPeerFolder: // dialogPeerFolder#514519e2
default: panic(v)
}

func DecodeDialogPeer

func DecodeDialogPeer(buf *bin.Buffer) (DialogPeerClass, error)

DecodeDialogPeer implements binary de-serialization for DialogPeerClass.

type DialogPeerClassVector added in v0.8.0

type DialogPeerClassVector struct {
	// Elements of Vector<DialogPeer>
	Elems []DialogPeerClass
}

DialogPeerClassVector is a box for Vector<DialogPeer>

func (*DialogPeerClassVector) Decode added in v0.8.0

func (vec *DialogPeerClassVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DialogPeerClassVector) Encode added in v0.8.0

func (vec *DialogPeerClassVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DialogPeerClassVector) String added in v0.12.0

func (vec *DialogPeerClassVector) String() string

String implements fmt.Stringer.

type DialogPeerFolder

type DialogPeerFolder struct {
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	FolderID int
}

DialogPeerFolder represents TL type `dialogPeerFolder#514519e2`. Peer folder¹

Links:

  1. https://core.telegram.org/api/folders#peer-folders

See https://core.telegram.org/constructor/dialogPeerFolder for reference.

func (*DialogPeerFolder) Decode

func (d *DialogPeerFolder) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DialogPeerFolder) Encode

func (d *DialogPeerFolder) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DialogPeerFolder) String added in v0.12.0

func (d *DialogPeerFolder) String() string

String implements fmt.Stringer.

type DialogPinnedHandler added in v0.9.0

type DialogPinnedHandler func(ctx UpdateContext, update *UpdateDialogPinned) error

DialogPinnedHandler is a DialogPinned event handler.

type DialogUnreadMarkHandler added in v0.9.0

type DialogUnreadMarkHandler func(ctx UpdateContext, update *UpdateDialogUnreadMark) error

DialogUnreadMarkHandler is a DialogUnreadMark event handler.

type Document

type Document struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Document ID
	ID int64
	// Check sum, dependant on document ID
	AccessHash int64
	// File reference¹
	//
	// Links:
	//  1) https://core.telegram.org/api/file_reference
	FileReference []byte
	// Creation date
	Date int
	// MIME type
	MimeType string
	// Size
	Size int
	// Thumbnails
	//
	// Use SetThumbs and GetThumbs helpers.
	Thumbs []PhotoSizeClass
	// Video thumbnails
	//
	// Use SetVideoThumbs and GetVideoThumbs helpers.
	VideoThumbs []VideoSize
	// DC ID
	DCID int
	// Attributes
	Attributes []DocumentAttributeClass
}

Document represents TL type `document#1e87342b`. Document

See https://core.telegram.org/constructor/document for reference.

func (*Document) Decode

func (d *Document) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Document) Encode

func (d *Document) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Document) GetThumbs

func (d *Document) GetThumbs() (value []PhotoSizeClass, ok bool)

GetThumbs returns value of Thumbs conditional field and boolean which is true if field was set.

func (*Document) GetVideoThumbs

func (d *Document) GetVideoThumbs() (value []VideoSize, ok bool)

GetVideoThumbs returns value of VideoThumbs conditional field and boolean which is true if field was set.

func (*Document) SetThumbs

func (d *Document) SetThumbs(value []PhotoSizeClass)

SetThumbs sets value of Thumbs conditional field.

func (*Document) SetVideoThumbs

func (d *Document) SetVideoThumbs(value []VideoSize)

SetVideoThumbs sets value of VideoThumbs conditional field.

func (*Document) String added in v0.12.0

func (d *Document) String() string

String implements fmt.Stringer.

type DocumentAttributeAnimated

type DocumentAttributeAnimated struct {
}

DocumentAttributeAnimated represents TL type `documentAttributeAnimated#11b58939`. Defines an animated GIF

See https://core.telegram.org/constructor/documentAttributeAnimated for reference.

func (*DocumentAttributeAnimated) Decode

func (d *DocumentAttributeAnimated) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DocumentAttributeAnimated) Encode

func (d *DocumentAttributeAnimated) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DocumentAttributeAnimated) String added in v0.12.0

func (d *DocumentAttributeAnimated) String() string

String implements fmt.Stringer.

type DocumentAttributeAudio

type DocumentAttributeAudio struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is a voice message
	Voice bool
	// Duration in seconds
	Duration int
	// Name of song
	//
	// Use SetTitle and GetTitle helpers.
	Title string
	// Performer
	//
	// Use SetPerformer and GetPerformer helpers.
	Performer string
	// Waveform
	//
	// Use SetWaveform and GetWaveform helpers.
	Waveform []byte
}

DocumentAttributeAudio represents TL type `documentAttributeAudio#9852f9c6`. Represents an audio file

See https://core.telegram.org/constructor/documentAttributeAudio for reference.

func (*DocumentAttributeAudio) Decode

func (d *DocumentAttributeAudio) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DocumentAttributeAudio) Encode

func (d *DocumentAttributeAudio) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DocumentAttributeAudio) GetPerformer

func (d *DocumentAttributeAudio) GetPerformer() (value string, ok bool)

GetPerformer returns value of Performer conditional field and boolean which is true if field was set.

func (*DocumentAttributeAudio) GetTitle

func (d *DocumentAttributeAudio) GetTitle() (value string, ok bool)

GetTitle returns value of Title conditional field and boolean which is true if field was set.

func (*DocumentAttributeAudio) GetWaveform

func (d *DocumentAttributeAudio) GetWaveform() (value []byte, ok bool)

GetWaveform returns value of Waveform conditional field and boolean which is true if field was set.

func (*DocumentAttributeAudio) SetPerformer

func (d *DocumentAttributeAudio) SetPerformer(value string)

SetPerformer sets value of Performer conditional field.

func (*DocumentAttributeAudio) SetTitle

func (d *DocumentAttributeAudio) SetTitle(value string)

SetTitle sets value of Title conditional field.

func (*DocumentAttributeAudio) SetVoice

func (d *DocumentAttributeAudio) SetVoice(value bool)

SetVoice sets value of Voice conditional field.

func (*DocumentAttributeAudio) SetWaveform

func (d *DocumentAttributeAudio) SetWaveform(value []byte)

SetWaveform sets value of Waveform conditional field.

func (*DocumentAttributeAudio) String added in v0.12.0

func (d *DocumentAttributeAudio) String() string

String implements fmt.Stringer.

type DocumentAttributeBox

type DocumentAttributeBox struct {
	DocumentAttribute DocumentAttributeClass
}

DocumentAttribute boxes the DocumentAttributeClass providing a helper.

func (*DocumentAttributeBox) Decode

func (b *DocumentAttributeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for DocumentAttributeBox.

func (*DocumentAttributeBox) Encode

func (b *DocumentAttributeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for DocumentAttributeBox.

type DocumentAttributeClass

type DocumentAttributeClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

DocumentAttributeClass represents DocumentAttribute generic type.

See https://core.telegram.org/type/DocumentAttribute for reference.

Example:

g, err := DecodeDocumentAttribute(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *DocumentAttributeImageSize: // documentAttributeImageSize#6c37c15c
case *DocumentAttributeAnimated: // documentAttributeAnimated#11b58939
case *DocumentAttributeSticker: // documentAttributeSticker#6319d612
case *DocumentAttributeVideo: // documentAttributeVideo#ef02ce6
case *DocumentAttributeAudio: // documentAttributeAudio#9852f9c6
case *DocumentAttributeFilename: // documentAttributeFilename#15590068
case *DocumentAttributeHasStickers: // documentAttributeHasStickers#9801d2f7
default: panic(v)
}

func DecodeDocumentAttribute

func DecodeDocumentAttribute(buf *bin.Buffer) (DocumentAttributeClass, error)

DecodeDocumentAttribute implements binary de-serialization for DocumentAttributeClass.

type DocumentAttributeFilename

type DocumentAttributeFilename struct {
	// The file name
	FileName string
}

DocumentAttributeFilename represents TL type `documentAttributeFilename#15590068`. A simple document with a file name

See https://core.telegram.org/constructor/documentAttributeFilename for reference.

func (*DocumentAttributeFilename) Decode

func (d *DocumentAttributeFilename) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DocumentAttributeFilename) Encode

func (d *DocumentAttributeFilename) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DocumentAttributeFilename) String added in v0.12.0

func (d *DocumentAttributeFilename) String() string

String implements fmt.Stringer.

type DocumentAttributeHasStickers

type DocumentAttributeHasStickers struct {
}

DocumentAttributeHasStickers represents TL type `documentAttributeHasStickers#9801d2f7`. Whether the current document has stickers attached

See https://core.telegram.org/constructor/documentAttributeHasStickers for reference.

func (*DocumentAttributeHasStickers) Decode

Decode implements bin.Decoder.

func (*DocumentAttributeHasStickers) Encode

Encode implements bin.Encoder.

func (*DocumentAttributeHasStickers) String added in v0.12.0

String implements fmt.Stringer.

type DocumentAttributeImageSize

type DocumentAttributeImageSize struct {
	// Width of image
	W int
	// Height of image
	H int
}

DocumentAttributeImageSize represents TL type `documentAttributeImageSize#6c37c15c`. Defines the width and height of an image uploaded as document

See https://core.telegram.org/constructor/documentAttributeImageSize for reference.

func (*DocumentAttributeImageSize) Decode

Decode implements bin.Decoder.

func (*DocumentAttributeImageSize) Encode

Encode implements bin.Encoder.

func (*DocumentAttributeImageSize) String added in v0.12.0

func (d *DocumentAttributeImageSize) String() string

String implements fmt.Stringer.

type DocumentAttributeSticker

type DocumentAttributeSticker struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is a mask sticker
	Mask bool
	// Alternative emoji representation of sticker
	Alt string
	// Associated stickerset
	Stickerset InputStickerSetClass
	// Mask coordinates (if this is a mask sticker, attached to a photo)
	//
	// Use SetMaskCoords and GetMaskCoords helpers.
	MaskCoords MaskCoords
}

DocumentAttributeSticker represents TL type `documentAttributeSticker#6319d612`. Defines a sticker

See https://core.telegram.org/constructor/documentAttributeSticker for reference.

func (*DocumentAttributeSticker) Decode

func (d *DocumentAttributeSticker) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DocumentAttributeSticker) Encode

func (d *DocumentAttributeSticker) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DocumentAttributeSticker) GetMaskCoords

func (d *DocumentAttributeSticker) GetMaskCoords() (value MaskCoords, ok bool)

GetMaskCoords returns value of MaskCoords conditional field and boolean which is true if field was set.

func (*DocumentAttributeSticker) SetMask

func (d *DocumentAttributeSticker) SetMask(value bool)

SetMask sets value of Mask conditional field.

func (*DocumentAttributeSticker) SetMaskCoords

func (d *DocumentAttributeSticker) SetMaskCoords(value MaskCoords)

SetMaskCoords sets value of MaskCoords conditional field.

func (*DocumentAttributeSticker) String added in v0.12.0

func (d *DocumentAttributeSticker) String() string

String implements fmt.Stringer.

type DocumentAttributeVideo

type DocumentAttributeVideo struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is a round video
	RoundMessage bool
	// Whether the video supports streaming
	SupportsStreaming bool
	// Duration in seconds
	Duration int
	// Video width
	W int
	// Video height
	H int
}

DocumentAttributeVideo represents TL type `documentAttributeVideo#ef02ce6`. Defines a video

See https://core.telegram.org/constructor/documentAttributeVideo for reference.

func (*DocumentAttributeVideo) Decode

func (d *DocumentAttributeVideo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DocumentAttributeVideo) Encode

func (d *DocumentAttributeVideo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DocumentAttributeVideo) SetRoundMessage

func (d *DocumentAttributeVideo) SetRoundMessage(value bool)

SetRoundMessage sets value of RoundMessage conditional field.

func (*DocumentAttributeVideo) SetSupportsStreaming

func (d *DocumentAttributeVideo) SetSupportsStreaming(value bool)

SetSupportsStreaming sets value of SupportsStreaming conditional field.

func (*DocumentAttributeVideo) String added in v0.12.0

func (d *DocumentAttributeVideo) String() string

String implements fmt.Stringer.

type DocumentBox

type DocumentBox struct {
	Document DocumentClass
}

Document boxes the DocumentClass providing a helper.

func (*DocumentBox) Decode

func (b *DocumentBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for DocumentBox.

func (*DocumentBox) Encode

func (b *DocumentBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for DocumentBox.

type DocumentClass

type DocumentClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

DocumentClass represents Document generic type.

See https://core.telegram.org/type/Document for reference.

Example:

g, err := DecodeDocument(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *DocumentEmpty: // documentEmpty#36f8c871
case *Document: // document#1e87342b
default: panic(v)
}

func DecodeDocument

func DecodeDocument(buf *bin.Buffer) (DocumentClass, error)

DecodeDocument implements binary de-serialization for DocumentClass.

type DocumentEmpty

type DocumentEmpty struct {
	// Document ID or 0
	ID int64
}

DocumentEmpty represents TL type `documentEmpty#36f8c871`. Empty constructor, document doesn't exist.

See https://core.telegram.org/constructor/documentEmpty for reference.

func (*DocumentEmpty) Decode

func (d *DocumentEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DocumentEmpty) Encode

func (d *DocumentEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DocumentEmpty) String added in v0.12.0

func (d *DocumentEmpty) String() string

String implements fmt.Stringer.

type DraftMessage

type DraftMessage struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether no webpage preview will be generated
	NoWebpage bool
	// The message this message will reply to
	//
	// Use SetReplyToMsgID and GetReplyToMsgID helpers.
	ReplyToMsgID int
	// The draft
	Message string
	// Message entities¹ for styled text.
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
	// Date of last update of the draft.
	Date int
}

DraftMessage represents TL type `draftMessage#fd8e711f`. Represents a message draft¹.

Links:

  1. https://core.telegram.org/api/drafts

See https://core.telegram.org/constructor/draftMessage for reference.

func (*DraftMessage) Decode

func (d *DraftMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DraftMessage) Encode

func (d *DraftMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DraftMessage) GetEntities

func (d *DraftMessage) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*DraftMessage) GetReplyToMsgID

func (d *DraftMessage) GetReplyToMsgID() (value int, ok bool)

GetReplyToMsgID returns value of ReplyToMsgID conditional field and boolean which is true if field was set.

func (*DraftMessage) SetEntities

func (d *DraftMessage) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*DraftMessage) SetNoWebpage

func (d *DraftMessage) SetNoWebpage(value bool)

SetNoWebpage sets value of NoWebpage conditional field.

func (*DraftMessage) SetReplyToMsgID

func (d *DraftMessage) SetReplyToMsgID(value int)

SetReplyToMsgID sets value of ReplyToMsgID conditional field.

func (*DraftMessage) String added in v0.12.0

func (d *DraftMessage) String() string

String implements fmt.Stringer.

type DraftMessageBox

type DraftMessageBox struct {
	DraftMessage DraftMessageClass
}

DraftMessage boxes the DraftMessageClass providing a helper.

func (*DraftMessageBox) Decode

func (b *DraftMessageBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for DraftMessageBox.

func (*DraftMessageBox) Encode

func (b *DraftMessageBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for DraftMessageBox.

type DraftMessageClass

type DraftMessageClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

DraftMessageClass represents DraftMessage generic type.

See https://core.telegram.org/type/DraftMessage for reference.

Example:

g, err := DecodeDraftMessage(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *DraftMessageEmpty: // draftMessageEmpty#1b0c841a
case *DraftMessage: // draftMessage#fd8e711f
default: panic(v)
}

func DecodeDraftMessage

func DecodeDraftMessage(buf *bin.Buffer) (DraftMessageClass, error)

DecodeDraftMessage implements binary de-serialization for DraftMessageClass.

type DraftMessageEmpty

type DraftMessageEmpty struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// When was the draft last updated
	//
	// Use SetDate and GetDate helpers.
	Date int
}

DraftMessageEmpty represents TL type `draftMessageEmpty#1b0c841a`. Empty draft

See https://core.telegram.org/constructor/draftMessageEmpty for reference.

func (*DraftMessageEmpty) Decode

func (d *DraftMessageEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*DraftMessageEmpty) Encode

func (d *DraftMessageEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*DraftMessageEmpty) GetDate

func (d *DraftMessageEmpty) GetDate() (value int, ok bool)

GetDate returns value of Date conditional field and boolean which is true if field was set.

func (*DraftMessageEmpty) SetDate

func (d *DraftMessageEmpty) SetDate(value int)

SetDate sets value of Date conditional field.

func (*DraftMessageEmpty) String added in v0.12.0

func (d *DraftMessageEmpty) String() string

String implements fmt.Stringer.

type DraftMessageHandler added in v0.9.0

type DraftMessageHandler func(ctx UpdateContext, update *UpdateDraftMessage) error

DraftMessageHandler is a DraftMessage event handler.

type EditChannelMessageHandler added in v0.9.0

type EditChannelMessageHandler func(ctx UpdateContext, update *UpdateEditChannelMessage) error

EditChannelMessageHandler is a EditChannelMessage event handler.

type EditMessageHandler added in v0.9.0

type EditMessageHandler func(ctx UpdateContext, update *UpdateEditMessage) error

EditMessageHandler is a EditMessage event handler.

type EmojiKeyword

type EmojiKeyword struct {
	// Keyword
	Keyword string
	// Emojis associated to keyword
	Emoticons []string
}

EmojiKeyword represents TL type `emojiKeyword#d5b3b9f9`. Emoji keyword

See https://core.telegram.org/constructor/emojiKeyword for reference.

func (*EmojiKeyword) Decode

func (e *EmojiKeyword) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EmojiKeyword) Encode

func (e *EmojiKeyword) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EmojiKeyword) String added in v0.12.0

func (e *EmojiKeyword) String() string

String implements fmt.Stringer.

type EmojiKeywordBox

type EmojiKeywordBox struct {
	EmojiKeyword EmojiKeywordClass
}

EmojiKeyword boxes the EmojiKeywordClass providing a helper.

func (*EmojiKeywordBox) Decode

func (b *EmojiKeywordBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for EmojiKeywordBox.

func (*EmojiKeywordBox) Encode

func (b *EmojiKeywordBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for EmojiKeywordBox.

type EmojiKeywordClass

type EmojiKeywordClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

EmojiKeywordClass represents EmojiKeyword generic type.

See https://core.telegram.org/type/EmojiKeyword for reference.

Example:

g, err := DecodeEmojiKeyword(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *EmojiKeyword: // emojiKeyword#d5b3b9f9
case *EmojiKeywordDeleted: // emojiKeywordDeleted#236df622
default: panic(v)
}

func DecodeEmojiKeyword

func DecodeEmojiKeyword(buf *bin.Buffer) (EmojiKeywordClass, error)

DecodeEmojiKeyword implements binary de-serialization for EmojiKeywordClass.

type EmojiKeywordDeleted

type EmojiKeywordDeleted struct {
	// Keyword
	Keyword string
	// Emojis that were associated to keyword
	Emoticons []string
}

EmojiKeywordDeleted represents TL type `emojiKeywordDeleted#236df622`. Deleted emoji keyword

See https://core.telegram.org/constructor/emojiKeywordDeleted for reference.

func (*EmojiKeywordDeleted) Decode

func (e *EmojiKeywordDeleted) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EmojiKeywordDeleted) Encode

func (e *EmojiKeywordDeleted) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EmojiKeywordDeleted) String added in v0.12.0

func (e *EmojiKeywordDeleted) String() string

String implements fmt.Stringer.

type EmojiKeywordsDifference

type EmojiKeywordsDifference struct {
	// Language code for keywords
	LangCode string
	// Previous emoji keyword list version
	FromVersion int
	// Current version of emoji keyword list
	Version int
	// Emojis associated to keywords
	Keywords []EmojiKeywordClass
}

EmojiKeywordsDifference represents TL type `emojiKeywordsDifference#5cc761bd`. Changes to emoji keywords

See https://core.telegram.org/constructor/emojiKeywordsDifference for reference.

func (*EmojiKeywordsDifference) Decode

func (e *EmojiKeywordsDifference) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EmojiKeywordsDifference) Encode

func (e *EmojiKeywordsDifference) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EmojiKeywordsDifference) String added in v0.12.0

func (e *EmojiKeywordsDifference) String() string

String implements fmt.Stringer.

type EmojiLanguage

type EmojiLanguage struct {
	// Language code
	LangCode string
}

EmojiLanguage represents TL type `emojiLanguage#b3fb5361`. Emoji language

See https://core.telegram.org/constructor/emojiLanguage for reference.

func (*EmojiLanguage) Decode

func (e *EmojiLanguage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EmojiLanguage) Encode

func (e *EmojiLanguage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EmojiLanguage) String added in v0.12.0

func (e *EmojiLanguage) String() string

String implements fmt.Stringer.

type EmojiLanguageVector added in v0.8.0

type EmojiLanguageVector struct {
	// Elements of Vector<EmojiLanguage>
	Elems []EmojiLanguage
}

EmojiLanguageVector is a box for Vector<EmojiLanguage>

func (*EmojiLanguageVector) Decode added in v0.8.0

func (vec *EmojiLanguageVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EmojiLanguageVector) Encode added in v0.8.0

func (vec *EmojiLanguageVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EmojiLanguageVector) String added in v0.12.0

func (vec *EmojiLanguageVector) String() string

String implements fmt.Stringer.

type EmojiURL

type EmojiURL struct {
	// An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation
	URL string
}

EmojiURL represents TL type `emojiURL#a575739d`. An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation

See https://core.telegram.org/constructor/emojiURL for reference.

func (*EmojiURL) Decode

func (e *EmojiURL) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EmojiURL) Encode

func (e *EmojiURL) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EmojiURL) String added in v0.12.0

func (e *EmojiURL) String() string

String implements fmt.Stringer.

type EncryptedChat

type EncryptedChat struct {
	// Chat ID
	ID int
	// Check sum dependant on the user ID
	AccessHash int64
	// Date chat was created
	Date int
	// Chat creator ID
	AdminID int
	// ID of the second chat participant
	ParticipantID int
	// B = g ^ b mod p, if the currently authorized user is the chat's creator,or A = g ^ a mod p otherwiseSee Wikipedia¹ for more info
	//
	// Links:
	//  1) https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
	GAOrB []byte
	// 64-bit fingerprint of received key
	KeyFingerprint int64
}

EncryptedChat represents TL type `encryptedChat#fa56ce36`. Encrypted chat

See https://core.telegram.org/constructor/encryptedChat for reference.

func (*EncryptedChat) Decode

func (e *EncryptedChat) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EncryptedChat) Encode

func (e *EncryptedChat) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EncryptedChat) String added in v0.12.0

func (e *EncryptedChat) String() string

String implements fmt.Stringer.

type EncryptedChatBox

type EncryptedChatBox struct {
	EncryptedChat EncryptedChatClass
}

EncryptedChat boxes the EncryptedChatClass providing a helper.

func (*EncryptedChatBox) Decode

func (b *EncryptedChatBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for EncryptedChatBox.

func (*EncryptedChatBox) Encode

func (b *EncryptedChatBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for EncryptedChatBox.

type EncryptedChatClass

type EncryptedChatClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

EncryptedChatClass represents EncryptedChat generic type.

See https://core.telegram.org/type/EncryptedChat for reference.

Example:

g, err := DecodeEncryptedChat(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *EncryptedChatEmpty: // encryptedChatEmpty#ab7ec0a0
case *EncryptedChatWaiting: // encryptedChatWaiting#3bf703dc
case *EncryptedChatRequested: // encryptedChatRequested#62718a82
case *EncryptedChat: // encryptedChat#fa56ce36
case *EncryptedChatDiscarded: // encryptedChatDiscarded#13d6dd27
default: panic(v)
}

func DecodeEncryptedChat

func DecodeEncryptedChat(buf *bin.Buffer) (EncryptedChatClass, error)

DecodeEncryptedChat implements binary de-serialization for EncryptedChatClass.

type EncryptedChatDiscarded

type EncryptedChatDiscarded struct {
	// Chat ID
	ID int
}

EncryptedChatDiscarded represents TL type `encryptedChatDiscarded#13d6dd27`. Discarded or deleted chat.

See https://core.telegram.org/constructor/encryptedChatDiscarded for reference.

func (*EncryptedChatDiscarded) Decode

func (e *EncryptedChatDiscarded) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EncryptedChatDiscarded) Encode

func (e *EncryptedChatDiscarded) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EncryptedChatDiscarded) String added in v0.12.0

func (e *EncryptedChatDiscarded) String() string

String implements fmt.Stringer.

type EncryptedChatEmpty

type EncryptedChatEmpty struct {
	// Chat ID
	ID int
}

EncryptedChatEmpty represents TL type `encryptedChatEmpty#ab7ec0a0`. Empty constructor.

See https://core.telegram.org/constructor/encryptedChatEmpty for reference.

func (*EncryptedChatEmpty) Decode

func (e *EncryptedChatEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EncryptedChatEmpty) Encode

func (e *EncryptedChatEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EncryptedChatEmpty) String added in v0.12.0

func (e *EncryptedChatEmpty) String() string

String implements fmt.Stringer.

type EncryptedChatRequested

type EncryptedChatRequested struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// Chat ID
	ID int
	// Check sum depending on user ID
	AccessHash int64
	// Chat creation date
	Date int
	// Chat creator ID
	AdminID int
	// ID of second chat participant
	ParticipantID int
	// A = g ^ a mod p, see Wikipedia¹
	//
	// Links:
	//  1) https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
	GA []byte
}

EncryptedChatRequested represents TL type `encryptedChatRequested#62718a82`. Request to create an encrypted chat.

See https://core.telegram.org/constructor/encryptedChatRequested for reference.

func (*EncryptedChatRequested) Decode

func (e *EncryptedChatRequested) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EncryptedChatRequested) Encode

func (e *EncryptedChatRequested) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EncryptedChatRequested) GetFolderID

func (e *EncryptedChatRequested) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*EncryptedChatRequested) SetFolderID

func (e *EncryptedChatRequested) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*EncryptedChatRequested) String added in v0.12.0

func (e *EncryptedChatRequested) String() string

String implements fmt.Stringer.

type EncryptedChatTypingHandler added in v0.9.0

type EncryptedChatTypingHandler func(ctx UpdateContext, update *UpdateEncryptedChatTyping) error

EncryptedChatTypingHandler is a EncryptedChatTyping event handler.

type EncryptedChatWaiting

type EncryptedChatWaiting struct {
	// Chat ID
	ID int
	// Checking sum depending on user ID
	AccessHash int64
	// Date of chat creation
	Date int
	// Chat creator ID
	AdminID int
	// ID of second chat participant
	ParticipantID int
}

EncryptedChatWaiting represents TL type `encryptedChatWaiting#3bf703dc`. Chat waiting for approval of second participant.

See https://core.telegram.org/constructor/encryptedChatWaiting for reference.

func (*EncryptedChatWaiting) Decode

func (e *EncryptedChatWaiting) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EncryptedChatWaiting) Encode

func (e *EncryptedChatWaiting) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EncryptedChatWaiting) String added in v0.12.0

func (e *EncryptedChatWaiting) String() string

String implements fmt.Stringer.

type EncryptedFile

type EncryptedFile struct {
	// File ID
	ID int64
	// Checking sum depending on user ID
	AccessHash int64
	// File size in bytes
	Size int
	// Number of data centre
	DCID int
	// 32-bit fingerprint of key used for file encryption
	KeyFingerprint int
}

EncryptedFile represents TL type `encryptedFile#4a70994c`. Encrypted file.

See https://core.telegram.org/constructor/encryptedFile for reference.

func (*EncryptedFile) Decode

func (e *EncryptedFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EncryptedFile) Encode

func (e *EncryptedFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EncryptedFile) String added in v0.12.0

func (e *EncryptedFile) String() string

String implements fmt.Stringer.

type EncryptedFileBox

type EncryptedFileBox struct {
	EncryptedFile EncryptedFileClass
}

EncryptedFile boxes the EncryptedFileClass providing a helper.

func (*EncryptedFileBox) Decode

func (b *EncryptedFileBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for EncryptedFileBox.

func (*EncryptedFileBox) Encode

func (b *EncryptedFileBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for EncryptedFileBox.

type EncryptedFileClass

type EncryptedFileClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

EncryptedFileClass represents EncryptedFile generic type.

See https://core.telegram.org/type/EncryptedFile for reference.

Example:

g, err := DecodeEncryptedFile(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *EncryptedFileEmpty: // encryptedFileEmpty#c21f497e
case *EncryptedFile: // encryptedFile#4a70994c
default: panic(v)
}

func DecodeEncryptedFile

func DecodeEncryptedFile(buf *bin.Buffer) (EncryptedFileClass, error)

DecodeEncryptedFile implements binary de-serialization for EncryptedFileClass.

type EncryptedFileEmpty

type EncryptedFileEmpty struct {
}

EncryptedFileEmpty represents TL type `encryptedFileEmpty#c21f497e`. Empty constructor, unexisitng file.

See https://core.telegram.org/constructor/encryptedFileEmpty for reference.

func (*EncryptedFileEmpty) Decode

func (e *EncryptedFileEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EncryptedFileEmpty) Encode

func (e *EncryptedFileEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EncryptedFileEmpty) String added in v0.12.0

func (e *EncryptedFileEmpty) String() string

String implements fmt.Stringer.

type EncryptedMessage

type EncryptedMessage struct {
	// Random message ID, assigned by the author of message
	RandomID int64
	// ID of encrypted chat
	ChatID int
	// Date of sending
	Date int
	// TL-serialising of DecryptedMessage¹ type, encrypted with the key creatied at stage of chat initialization
	//
	// Links:
	//  1) https://core.telegram.org/type/DecryptedMessage
	Bytes []byte
	// Attached encrypted file
	File EncryptedFileClass
}

EncryptedMessage represents TL type `encryptedMessage#ed18c118`. Encrypted message.

See https://core.telegram.org/constructor/encryptedMessage for reference.

func (*EncryptedMessage) Decode

func (e *EncryptedMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EncryptedMessage) Encode

func (e *EncryptedMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EncryptedMessage) String added in v0.12.0

func (e *EncryptedMessage) String() string

String implements fmt.Stringer.

type EncryptedMessageBox

type EncryptedMessageBox struct {
	EncryptedMessage EncryptedMessageClass
}

EncryptedMessage boxes the EncryptedMessageClass providing a helper.

func (*EncryptedMessageBox) Decode

func (b *EncryptedMessageBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for EncryptedMessageBox.

func (*EncryptedMessageBox) Encode

func (b *EncryptedMessageBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for EncryptedMessageBox.

type EncryptedMessageClass

type EncryptedMessageClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

EncryptedMessageClass represents EncryptedMessage generic type.

See https://core.telegram.org/type/EncryptedMessage for reference.

Example:

g, err := DecodeEncryptedMessage(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *EncryptedMessage: // encryptedMessage#ed18c118
case *EncryptedMessageService: // encryptedMessageService#23734b06
default: panic(v)
}

func DecodeEncryptedMessage

func DecodeEncryptedMessage(buf *bin.Buffer) (EncryptedMessageClass, error)

DecodeEncryptedMessage implements binary de-serialization for EncryptedMessageClass.

type EncryptedMessageService

type EncryptedMessageService struct {
	// Random message ID, assigned by the author of message
	RandomID int64
	// ID of encrypted chat
	ChatID int
	// Date of sending
	Date int
	// TL-serialising of DecryptedMessage¹ type, encrypted with the key creatied at stage of chat initialization
	//
	// Links:
	//  1) https://core.telegram.org/type/DecryptedMessage
	Bytes []byte
}

EncryptedMessageService represents TL type `encryptedMessageService#23734b06`. Encrypted service message

See https://core.telegram.org/constructor/encryptedMessageService for reference.

func (*EncryptedMessageService) Decode

func (e *EncryptedMessageService) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*EncryptedMessageService) Encode

func (e *EncryptedMessageService) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*EncryptedMessageService) String added in v0.12.0

func (e *EncryptedMessageService) String() string

String implements fmt.Stringer.

type EncryptedMessagesReadHandler added in v0.9.0

type EncryptedMessagesReadHandler func(ctx UpdateContext, update *UpdateEncryptedMessagesRead) error

EncryptedMessagesReadHandler is a EncryptedMessagesRead event handler.

type EncryptionHandler added in v0.9.0

type EncryptionHandler func(ctx UpdateContext, update *UpdateEncryption) error

EncryptionHandler is a Encryption event handler.

type Error

type Error struct {
	// Error code
	Code int
	// Message
	Text string
}

Error represents TL type `error#c4b9f9bb`. Error.

See https://core.telegram.org/constructor/error for reference.

func (*Error) Decode

func (e *Error) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Error) Encode

func (e *Error) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Error) String added in v0.12.0

func (e *Error) String() string

String implements fmt.Stringer.

type ExportedChatInviteBox

type ExportedChatInviteBox struct {
	ExportedChatInvite ExportedChatInviteClass
}

ExportedChatInvite boxes the ExportedChatInviteClass providing a helper.

func (*ExportedChatInviteBox) Decode

func (b *ExportedChatInviteBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ExportedChatInviteBox.

func (*ExportedChatInviteBox) Encode

func (b *ExportedChatInviteBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ExportedChatInviteBox.

type ExportedChatInviteClass

type ExportedChatInviteClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ExportedChatInviteClass represents ExportedChatInvite generic type.

See https://core.telegram.org/type/ExportedChatInvite for reference.

Example:

g, err := DecodeExportedChatInvite(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ChatInviteEmpty: // chatInviteEmpty#69df3769
case *ChatInviteExported: // chatInviteExported#fc2e05bc
default: panic(v)
}

func DecodeExportedChatInvite

func DecodeExportedChatInvite(buf *bin.Buffer) (ExportedChatInviteClass, error)

DecodeExportedChatInvite implements binary de-serialization for ExportedChatInviteClass.

type ExportedMessageLink struct {
	// URL
	Link string
	// Embed code
	HTML string
}

ExportedMessageLink represents TL type `exportedMessageLink#5dab1af4`. Link to a message in a supergroup/channel

See https://core.telegram.org/constructor/exportedMessageLink for reference.

func (*ExportedMessageLink) Decode

func (e *ExportedMessageLink) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ExportedMessageLink) Encode

func (e *ExportedMessageLink) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ExportedMessageLink) String added in v0.12.0

func (e *ExportedMessageLink) String() string

String implements fmt.Stringer.

type FavedStickersHandler added in v0.9.0

type FavedStickersHandler func(ctx UpdateContext, update *UpdateFavedStickers) error

FavedStickersHandler is a FavedStickers event handler.

type FileHash

type FileHash struct {
	// Offset field of FileHash.
	Offset int
	// Limit field of FileHash.
	Limit int
	// Hash field of FileHash.
	Hash []byte
}

FileHash represents TL type `fileHash#6242c773`.

See https://core.telegram.org/constructor/fileHash for reference.

func (*FileHash) Decode

func (f *FileHash) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*FileHash) Encode

func (f *FileHash) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*FileHash) String added in v0.12.0

func (f *FileHash) String() string

String implements fmt.Stringer.

type FileHashVector added in v0.8.0

type FileHashVector struct {
	// Elements of Vector<FileHash>
	Elems []FileHash
}

FileHashVector is a box for Vector<FileHash>

func (*FileHashVector) Decode added in v0.8.0

func (vec *FileHashVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*FileHashVector) Encode added in v0.8.0

func (vec *FileHashVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*FileHashVector) String added in v0.12.0

func (vec *FileHashVector) String() string

String implements fmt.Stringer.

type FileLocationToBeDeprecated

type FileLocationToBeDeprecated struct {
	// Volume ID
	VolumeID int64
	// Local ID
	LocalID int
}

FileLocationToBeDeprecated represents TL type `fileLocationToBeDeprecated#bc7fc6cd`. Indicates the location of a photo, will be deprecated soon

See https://core.telegram.org/constructor/fileLocationToBeDeprecated for reference.

func (*FileLocationToBeDeprecated) Decode

Decode implements bin.Decoder.

func (*FileLocationToBeDeprecated) Encode

Encode implements bin.Encoder.

func (*FileLocationToBeDeprecated) String added in v0.12.0

func (f *FileLocationToBeDeprecated) String() string

String implements fmt.Stringer.

type Folder

type Folder struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Automatically add new channels to this folder
	AutofillNewBroadcasts bool
	// Automatically add joined new public supergroups to this folder
	AutofillPublicGroups bool
	// Automatically add new private chats to this folder
	AutofillNewCorrespondents bool
	// Folder ID
	ID int
	// Folder title
	Title string
	// Folder picture
	//
	// Use SetPhoto and GetPhoto helpers.
	Photo ChatPhotoClass
}

Folder represents TL type `folder#ff544e65`. Folder

See https://core.telegram.org/constructor/folder for reference.

func (*Folder) Decode

func (f *Folder) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Folder) Encode

func (f *Folder) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Folder) GetPhoto

func (f *Folder) GetPhoto() (value ChatPhotoClass, ok bool)

GetPhoto returns value of Photo conditional field and boolean which is true if field was set.

func (*Folder) SetAutofillNewBroadcasts

func (f *Folder) SetAutofillNewBroadcasts(value bool)

SetAutofillNewBroadcasts sets value of AutofillNewBroadcasts conditional field.

func (*Folder) SetAutofillNewCorrespondents

func (f *Folder) SetAutofillNewCorrespondents(value bool)

SetAutofillNewCorrespondents sets value of AutofillNewCorrespondents conditional field.

func (*Folder) SetAutofillPublicGroups

func (f *Folder) SetAutofillPublicGroups(value bool)

SetAutofillPublicGroups sets value of AutofillPublicGroups conditional field.

func (*Folder) SetPhoto

func (f *Folder) SetPhoto(value ChatPhotoClass)

SetPhoto sets value of Photo conditional field.

func (*Folder) String added in v0.12.0

func (f *Folder) String() string

String implements fmt.Stringer.

type FolderPeer

type FolderPeer struct {
	// Folder peer info
	Peer PeerClass
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	FolderID int
}

FolderPeer represents TL type `folderPeer#e9baa668`. Peer in a folder

See https://core.telegram.org/constructor/folderPeer for reference.

func (*FolderPeer) Decode

func (f *FolderPeer) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*FolderPeer) Encode

func (f *FolderPeer) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*FolderPeer) String added in v0.12.0

func (f *FolderPeer) String() string

String implements fmt.Stringer.

type FolderPeersHandler added in v0.9.0

type FolderPeersHandler func(ctx UpdateContext, update *UpdateFolderPeers) error

FolderPeersHandler is a FolderPeers event handler.

type FoldersDeleteFolderRequest

type FoldersDeleteFolderRequest struct {
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	FolderID int
}

FoldersDeleteFolderRequest represents TL type `folders.deleteFolder#1c295881`. Delete a peer folder¹

Links:

  1. https://core.telegram.org/api/folders#peer-folders

See https://core.telegram.org/method/folders.deleteFolder for reference.

func (*FoldersDeleteFolderRequest) Decode

Decode implements bin.Decoder.

func (*FoldersDeleteFolderRequest) Encode

Encode implements bin.Encoder.

func (*FoldersDeleteFolderRequest) String added in v0.12.0

func (d *FoldersDeleteFolderRequest) String() string

String implements fmt.Stringer.

type FoldersEditPeerFoldersRequest

type FoldersEditPeerFoldersRequest struct {
	// New peer list
	FolderPeers []InputFolderPeer
}

FoldersEditPeerFoldersRequest represents TL type `folders.editPeerFolders#6847d0ab`. Edit peers in peer folder¹

Links:

  1. https://core.telegram.org/api/folders#peer-folders

See https://core.telegram.org/method/folders.editPeerFolders for reference.

func (*FoldersEditPeerFoldersRequest) Decode

Decode implements bin.Decoder.

func (*FoldersEditPeerFoldersRequest) Encode

Encode implements bin.Encoder.

func (*FoldersEditPeerFoldersRequest) String added in v0.12.0

String implements fmt.Stringer.

type Game

type Game struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// ID of the game
	ID int64
	// Access hash of the game
	AccessHash int64
	// Short name for the game
	ShortName string
	// Title of the game
	Title string
	// Game description
	Description string
	// Game preview
	Photo PhotoClass
	// Optional attached document
	//
	// Use SetDocument and GetDocument helpers.
	Document DocumentClass
}

Game represents TL type `game#bdf9653b`. Indicates an already sent game

See https://core.telegram.org/constructor/game for reference.

func (*Game) Decode

func (g *Game) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Game) Encode

func (g *Game) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Game) GetDocument

func (g *Game) GetDocument() (value DocumentClass, ok bool)

GetDocument returns value of Document conditional field and boolean which is true if field was set.

func (*Game) SetDocument

func (g *Game) SetDocument(value DocumentClass)

SetDocument sets value of Document conditional field.

func (*Game) String added in v0.12.0

func (g *Game) String() string

String implements fmt.Stringer.

type GeoLiveViewedHandler added in v0.9.0

type GeoLiveViewedHandler func(ctx UpdateContext, update *UpdateGeoLiveViewed) error

GeoLiveViewedHandler is a GeoLiveViewed event handler.

type GeoPoint

type GeoPoint struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Longtitude
	Long float64
	// Latitude
	Lat float64
	// Access hash
	AccessHash int64
	// The estimated horizontal accuracy of the location, in meters; as defined by the sender.
	//
	// Use SetAccuracyRadius and GetAccuracyRadius helpers.
	AccuracyRadius int
}

GeoPoint represents TL type `geoPoint#b2a2f663`. GeoPoint.

See https://core.telegram.org/constructor/geoPoint for reference.

func (*GeoPoint) Decode

func (g *GeoPoint) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*GeoPoint) Encode

func (g *GeoPoint) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*GeoPoint) GetAccuracyRadius

func (g *GeoPoint) GetAccuracyRadius() (value int, ok bool)

GetAccuracyRadius returns value of AccuracyRadius conditional field and boolean which is true if field was set.

func (*GeoPoint) SetAccuracyRadius

func (g *GeoPoint) SetAccuracyRadius(value int)

SetAccuracyRadius sets value of AccuracyRadius conditional field.

func (*GeoPoint) String added in v0.12.0

func (g *GeoPoint) String() string

String implements fmt.Stringer.

type GeoPointBox

type GeoPointBox struct {
	GeoPoint GeoPointClass
}

GeoPoint boxes the GeoPointClass providing a helper.

func (*GeoPointBox) Decode

func (b *GeoPointBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for GeoPointBox.

func (*GeoPointBox) Encode

func (b *GeoPointBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for GeoPointBox.

type GeoPointClass

type GeoPointClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

GeoPointClass represents GeoPoint generic type.

See https://core.telegram.org/type/GeoPoint for reference.

Example:

g, err := DecodeGeoPoint(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *GeoPointEmpty: // geoPointEmpty#1117dd5f
case *GeoPoint: // geoPoint#b2a2f663
default: panic(v)
}

func DecodeGeoPoint

func DecodeGeoPoint(buf *bin.Buffer) (GeoPointClass, error)

DecodeGeoPoint implements binary de-serialization for GeoPointClass.

type GeoPointEmpty

type GeoPointEmpty struct {
}

GeoPointEmpty represents TL type `geoPointEmpty#1117dd5f`. Empty constructor.

See https://core.telegram.org/constructor/geoPointEmpty for reference.

func (*GeoPointEmpty) Decode

func (g *GeoPointEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*GeoPointEmpty) Encode

func (g *GeoPointEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*GeoPointEmpty) String added in v0.12.0

func (g *GeoPointEmpty) String() string

String implements fmt.Stringer.

type GlobalPrivacySettings

type GlobalPrivacySettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to archive and mute new chats from non-contacts
	//
	// Use SetArchiveAndMuteNewNoncontactPeers and GetArchiveAndMuteNewNoncontactPeers helpers.
	ArchiveAndMuteNewNoncontactPeers bool
}

GlobalPrivacySettings represents TL type `globalPrivacySettings#bea2f424`. Global privacy settings

See https://core.telegram.org/constructor/globalPrivacySettings for reference.

func (*GlobalPrivacySettings) Decode

func (g *GlobalPrivacySettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*GlobalPrivacySettings) Encode

func (g *GlobalPrivacySettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*GlobalPrivacySettings) GetArchiveAndMuteNewNoncontactPeers added in v0.17.0

func (g *GlobalPrivacySettings) GetArchiveAndMuteNewNoncontactPeers() (value bool, ok bool)

GetArchiveAndMuteNewNoncontactPeers returns value of ArchiveAndMuteNewNoncontactPeers conditional field and boolean which is true if field was set.

func (*GlobalPrivacySettings) SetArchiveAndMuteNewNoncontactPeers

func (g *GlobalPrivacySettings) SetArchiveAndMuteNewNoncontactPeers(value bool)

SetArchiveAndMuteNewNoncontactPeers sets value of ArchiveAndMuteNewNoncontactPeers conditional field.

func (*GlobalPrivacySettings) String added in v0.12.0

func (g *GlobalPrivacySettings) String() string

String implements fmt.Stringer.

type GroupCall added in v0.13.0

type GroupCall struct {
	// Flags field of GroupCall.
	Flags bin.Fields
	// JoinMuted field of GroupCall.
	JoinMuted bool
	// CanChangeJoinMuted field of GroupCall.
	CanChangeJoinMuted bool
	// ID field of GroupCall.
	ID int64
	// AccessHash field of GroupCall.
	AccessHash int64
	// ParticipantsCount field of GroupCall.
	ParticipantsCount int
	// Params field of GroupCall.
	//
	// Use SetParams and GetParams helpers.
	Params DataJSON
	// Version field of GroupCall.
	Version int
}

GroupCall represents TL type `groupCall#55903081`.

See https://core.telegram.org/constructor/groupCall for reference.

func (*GroupCall) Decode added in v0.13.0

func (g *GroupCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*GroupCall) Encode added in v0.13.0

func (g *GroupCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*GroupCall) GetParams added in v0.13.0

func (g *GroupCall) GetParams() (value DataJSON, ok bool)

GetParams returns value of Params conditional field and boolean which is true if field was set.

func (*GroupCall) SetCanChangeJoinMuted added in v0.13.0

func (g *GroupCall) SetCanChangeJoinMuted(value bool)

SetCanChangeJoinMuted sets value of CanChangeJoinMuted conditional field.

func (*GroupCall) SetJoinMuted added in v0.13.0

func (g *GroupCall) SetJoinMuted(value bool)

SetJoinMuted sets value of JoinMuted conditional field.

func (*GroupCall) SetParams added in v0.13.0

func (g *GroupCall) SetParams(value DataJSON)

SetParams sets value of Params conditional field.

func (*GroupCall) String added in v0.13.0

func (g *GroupCall) String() string

String implements fmt.Stringer.

type GroupCallBox added in v0.13.0

type GroupCallBox struct {
	GroupCall GroupCallClass
}

GroupCall boxes the GroupCallClass providing a helper.

func (*GroupCallBox) Decode added in v0.13.0

func (b *GroupCallBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for GroupCallBox.

func (*GroupCallBox) Encode added in v0.13.0

func (b *GroupCallBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for GroupCallBox.

type GroupCallClass added in v0.13.0

type GroupCallClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

GroupCallClass represents GroupCall generic type.

See https://core.telegram.org/type/GroupCall for reference.

Example:

g, err := DecodeGroupCall(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *GroupCallDiscarded: // groupCallDiscarded#7780bcb4
case *GroupCall: // groupCall#55903081
default: panic(v)
}

func DecodeGroupCall added in v0.13.0

func DecodeGroupCall(buf *bin.Buffer) (GroupCallClass, error)

DecodeGroupCall implements binary de-serialization for GroupCallClass.

type GroupCallDiscarded added in v0.13.0

type GroupCallDiscarded struct {
	// ID field of GroupCallDiscarded.
	ID int64
	// AccessHash field of GroupCallDiscarded.
	AccessHash int64
	// Duration field of GroupCallDiscarded.
	Duration int
}

GroupCallDiscarded represents TL type `groupCallDiscarded#7780bcb4`.

See https://core.telegram.org/constructor/groupCallDiscarded for reference.

func (*GroupCallDiscarded) Decode added in v0.13.0

func (g *GroupCallDiscarded) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*GroupCallDiscarded) Encode added in v0.13.0

func (g *GroupCallDiscarded) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*GroupCallDiscarded) String added in v0.13.0

func (g *GroupCallDiscarded) String() string

String implements fmt.Stringer.

type GroupCallHandler added in v0.13.0

type GroupCallHandler func(ctx UpdateContext, update *UpdateGroupCall) error

GroupCallHandler is a GroupCall event handler.

type GroupCallParticipant added in v0.13.0

type GroupCallParticipant struct {
	// Flags field of GroupCallParticipant.
	Flags bin.Fields
	// Muted field of GroupCallParticipant.
	Muted bool
	// Left field of GroupCallParticipant.
	Left bool
	// CanSelfUnmute field of GroupCallParticipant.
	CanSelfUnmute bool
	// JustJoined field of GroupCallParticipant.
	JustJoined bool
	// Versioned field of GroupCallParticipant.
	Versioned bool
	// UserID field of GroupCallParticipant.
	UserID int
	// Date field of GroupCallParticipant.
	Date int
	// ActiveDate field of GroupCallParticipant.
	//
	// Use SetActiveDate and GetActiveDate helpers.
	ActiveDate int
	// Source field of GroupCallParticipant.
	Source int
}

GroupCallParticipant represents TL type `groupCallParticipant#56b087c9`.

See https://core.telegram.org/constructor/groupCallParticipant for reference.

func (*GroupCallParticipant) Decode added in v0.13.0

func (g *GroupCallParticipant) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*GroupCallParticipant) Encode added in v0.13.0

func (g *GroupCallParticipant) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*GroupCallParticipant) GetActiveDate added in v0.13.0

func (g *GroupCallParticipant) GetActiveDate() (value int, ok bool)

GetActiveDate returns value of ActiveDate conditional field and boolean which is true if field was set.

func (*GroupCallParticipant) SetActiveDate added in v0.13.0

func (g *GroupCallParticipant) SetActiveDate(value int)

SetActiveDate sets value of ActiveDate conditional field.

func (*GroupCallParticipant) SetCanSelfUnmute added in v0.13.0

func (g *GroupCallParticipant) SetCanSelfUnmute(value bool)

SetCanSelfUnmute sets value of CanSelfUnmute conditional field.

func (*GroupCallParticipant) SetJustJoined added in v0.13.0

func (g *GroupCallParticipant) SetJustJoined(value bool)

SetJustJoined sets value of JustJoined conditional field.

func (*GroupCallParticipant) SetLeft added in v0.13.0

func (g *GroupCallParticipant) SetLeft(value bool)

SetLeft sets value of Left conditional field.

func (*GroupCallParticipant) SetMuted added in v0.13.0

func (g *GroupCallParticipant) SetMuted(value bool)

SetMuted sets value of Muted conditional field.

func (*GroupCallParticipant) SetVersioned added in v0.13.0

func (g *GroupCallParticipant) SetVersioned(value bool)

SetVersioned sets value of Versioned conditional field.

func (*GroupCallParticipant) String added in v0.13.0

func (g *GroupCallParticipant) String() string

String implements fmt.Stringer.

type GroupCallParticipantsHandler added in v0.13.0

type GroupCallParticipantsHandler func(ctx UpdateContext, update *UpdateGroupCallParticipants) error

GroupCallParticipantsHandler is a GroupCallParticipants event handler.

type HelpAcceptTermsOfServiceRequest

type HelpAcceptTermsOfServiceRequest struct {
	// ID of terms of service
	ID DataJSON
}

HelpAcceptTermsOfServiceRequest represents TL type `help.acceptTermsOfService#ee72f79a`. Accept the new terms of service

See https://core.telegram.org/method/help.acceptTermsOfService for reference.

func (*HelpAcceptTermsOfServiceRequest) Decode

Decode implements bin.Decoder.

func (*HelpAcceptTermsOfServiceRequest) Encode

Encode implements bin.Encoder.

func (*HelpAcceptTermsOfServiceRequest) String added in v0.12.0

String implements fmt.Stringer.

type HelpAppUpdate

type HelpAppUpdate struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Unskippable, the new info must be shown to the user (with a popup or something else)
	CanNotSkip bool
	// Update ID
	ID int
	// New version name
	Version string
	// Text description of the update
	Text string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	Entities []MessageEntityClass
	// Application binary
	//
	// Use SetDocument and GetDocument helpers.
	Document DocumentClass
	// Application download URL
	//
	// Use SetURL and GetURL helpers.
	URL string
}

HelpAppUpdate represents TL type `help.appUpdate#1da7158f`. An update is available for the application.

See https://core.telegram.org/constructor/help.appUpdate for reference.

func (*HelpAppUpdate) Decode

func (a *HelpAppUpdate) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpAppUpdate) Encode

func (a *HelpAppUpdate) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpAppUpdate) GetDocument

func (a *HelpAppUpdate) GetDocument() (value DocumentClass, ok bool)

GetDocument returns value of Document conditional field and boolean which is true if field was set.

func (*HelpAppUpdate) GetURL

func (a *HelpAppUpdate) GetURL() (value string, ok bool)

GetURL returns value of URL conditional field and boolean which is true if field was set.

func (*HelpAppUpdate) SetCanNotSkip

func (a *HelpAppUpdate) SetCanNotSkip(value bool)

SetCanNotSkip sets value of CanNotSkip conditional field.

func (*HelpAppUpdate) SetDocument

func (a *HelpAppUpdate) SetDocument(value DocumentClass)

SetDocument sets value of Document conditional field.

func (*HelpAppUpdate) SetURL

func (a *HelpAppUpdate) SetURL(value string)

SetURL sets value of URL conditional field.

func (*HelpAppUpdate) String added in v0.12.0

func (a *HelpAppUpdate) String() string

String implements fmt.Stringer.

type HelpAppUpdateBox

type HelpAppUpdateBox struct {
	AppUpdate HelpAppUpdateClass
}

HelpAppUpdate boxes the HelpAppUpdateClass providing a helper.

func (*HelpAppUpdateBox) Decode

func (b *HelpAppUpdateBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for HelpAppUpdateBox.

func (*HelpAppUpdateBox) Encode

func (b *HelpAppUpdateBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for HelpAppUpdateBox.

type HelpAppUpdateClass

type HelpAppUpdateClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

HelpAppUpdateClass represents help.AppUpdate generic type.

See https://core.telegram.org/type/help.AppUpdate for reference.

Example:

g, err := DecodeHelpAppUpdate(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *HelpAppUpdate: // help.appUpdate#1da7158f
case *HelpNoAppUpdate: // help.noAppUpdate#c45a6536
default: panic(v)
}

func DecodeHelpAppUpdate

func DecodeHelpAppUpdate(buf *bin.Buffer) (HelpAppUpdateClass, error)

DecodeHelpAppUpdate implements binary de-serialization for HelpAppUpdateClass.

type HelpCountriesList

type HelpCountriesList struct {
	// Name, ISO code, localized name and phone codes/patterns of all available countries
	Countries []HelpCountry
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

HelpCountriesList represents TL type `help.countriesList#87d0759e`. Name, ISO code, localized name and phone codes/patterns of all available countries

See https://core.telegram.org/constructor/help.countriesList for reference.

func (*HelpCountriesList) Decode

func (c *HelpCountriesList) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpCountriesList) Encode

func (c *HelpCountriesList) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpCountriesList) String added in v0.12.0

func (c *HelpCountriesList) String() string

String implements fmt.Stringer.

type HelpCountriesListBox

type HelpCountriesListBox struct {
	CountriesList HelpCountriesListClass
}

HelpCountriesList boxes the HelpCountriesListClass providing a helper.

func (*HelpCountriesListBox) Decode

func (b *HelpCountriesListBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for HelpCountriesListBox.

func (*HelpCountriesListBox) Encode

func (b *HelpCountriesListBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for HelpCountriesListBox.

type HelpCountriesListClass

type HelpCountriesListClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

HelpCountriesListClass represents help.CountriesList generic type.

See https://core.telegram.org/type/help.CountriesList for reference.

Example:

g, err := DecodeHelpCountriesList(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *HelpCountriesListNotModified: // help.countriesListNotModified#93cc1f32
case *HelpCountriesList: // help.countriesList#87d0759e
default: panic(v)
}

func DecodeHelpCountriesList

func DecodeHelpCountriesList(buf *bin.Buffer) (HelpCountriesListClass, error)

DecodeHelpCountriesList implements binary de-serialization for HelpCountriesListClass.

type HelpCountriesListNotModified

type HelpCountriesListNotModified struct {
}

HelpCountriesListNotModified represents TL type `help.countriesListNotModified#93cc1f32`. The country list has not changed

See https://core.telegram.org/constructor/help.countriesListNotModified for reference.

func (*HelpCountriesListNotModified) Decode

Decode implements bin.Decoder.

func (*HelpCountriesListNotModified) Encode

Encode implements bin.Encoder.

func (*HelpCountriesListNotModified) String added in v0.12.0

String implements fmt.Stringer.

type HelpCountry

type HelpCountry struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this country should not be shown in the list
	Hidden bool
	// ISO code of country
	Iso2 string
	// Name of the country in the country's language
	DefaultName string
	// Name of the country in the user's language, if different from the original name
	//
	// Use SetName and GetName helpers.
	Name string
	// Phone codes/patterns
	CountryCodes []HelpCountryCode
}

HelpCountry represents TL type `help.country#c3878e23`. Name, ISO code, localized name and phone codes/patterns of a specific country

See https://core.telegram.org/constructor/help.country for reference.

func (*HelpCountry) Decode

func (c *HelpCountry) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpCountry) Encode

func (c *HelpCountry) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpCountry) GetName

func (c *HelpCountry) GetName() (value string, ok bool)

GetName returns value of Name conditional field and boolean which is true if field was set.

func (*HelpCountry) SetHidden

func (c *HelpCountry) SetHidden(value bool)

SetHidden sets value of Hidden conditional field.

func (*HelpCountry) SetName

func (c *HelpCountry) SetName(value string)

SetName sets value of Name conditional field.

func (*HelpCountry) String added in v0.12.0

func (c *HelpCountry) String() string

String implements fmt.Stringer.

type HelpCountryCode

type HelpCountryCode struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// ISO country code
	CountryCode string
	// Possible phone prefixes
	//
	// Use SetPrefixes and GetPrefixes helpers.
	Prefixes []string
	// Phone patterns: for example, XXX XXX XXX
	//
	// Use SetPatterns and GetPatterns helpers.
	Patterns []string
}

HelpCountryCode represents TL type `help.countryCode#4203c5ef`. Country code and phone number pattern of a specific country

See https://core.telegram.org/constructor/help.countryCode for reference.

func (*HelpCountryCode) Decode

func (c *HelpCountryCode) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpCountryCode) Encode

func (c *HelpCountryCode) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpCountryCode) GetPatterns

func (c *HelpCountryCode) GetPatterns() (value []string, ok bool)

GetPatterns returns value of Patterns conditional field and boolean which is true if field was set.

func (*HelpCountryCode) GetPrefixes

func (c *HelpCountryCode) GetPrefixes() (value []string, ok bool)

GetPrefixes returns value of Prefixes conditional field and boolean which is true if field was set.

func (*HelpCountryCode) SetPatterns

func (c *HelpCountryCode) SetPatterns(value []string)

SetPatterns sets value of Patterns conditional field.

func (*HelpCountryCode) SetPrefixes

func (c *HelpCountryCode) SetPrefixes(value []string)

SetPrefixes sets value of Prefixes conditional field.

func (*HelpCountryCode) String added in v0.12.0

func (c *HelpCountryCode) String() string

String implements fmt.Stringer.

type HelpDeepLinkInfo

type HelpDeepLinkInfo struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// An update of the app is required to parse this link
	UpdateApp bool
	// Message to show to the user
	Message string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
}

HelpDeepLinkInfo represents TL type `help.deepLinkInfo#6a4ee832`. Deep linking info

See https://core.telegram.org/constructor/help.deepLinkInfo for reference.

func (*HelpDeepLinkInfo) Decode

func (d *HelpDeepLinkInfo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpDeepLinkInfo) Encode

func (d *HelpDeepLinkInfo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpDeepLinkInfo) GetEntities

func (d *HelpDeepLinkInfo) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*HelpDeepLinkInfo) SetEntities

func (d *HelpDeepLinkInfo) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*HelpDeepLinkInfo) SetUpdateApp

func (d *HelpDeepLinkInfo) SetUpdateApp(value bool)

SetUpdateApp sets value of UpdateApp conditional field.

func (*HelpDeepLinkInfo) String added in v0.12.0

func (d *HelpDeepLinkInfo) String() string

String implements fmt.Stringer.

type HelpDeepLinkInfoBox

type HelpDeepLinkInfoBox struct {
	DeepLinkInfo HelpDeepLinkInfoClass
}

HelpDeepLinkInfo boxes the HelpDeepLinkInfoClass providing a helper.

func (*HelpDeepLinkInfoBox) Decode

func (b *HelpDeepLinkInfoBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for HelpDeepLinkInfoBox.

func (*HelpDeepLinkInfoBox) Encode

func (b *HelpDeepLinkInfoBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for HelpDeepLinkInfoBox.

type HelpDeepLinkInfoClass

type HelpDeepLinkInfoClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

HelpDeepLinkInfoClass represents help.DeepLinkInfo generic type.

See https://core.telegram.org/type/help.DeepLinkInfo for reference.

Example:

g, err := DecodeHelpDeepLinkInfo(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *HelpDeepLinkInfoEmpty: // help.deepLinkInfoEmpty#66afa166
case *HelpDeepLinkInfo: // help.deepLinkInfo#6a4ee832
default: panic(v)
}

func DecodeHelpDeepLinkInfo

func DecodeHelpDeepLinkInfo(buf *bin.Buffer) (HelpDeepLinkInfoClass, error)

DecodeHelpDeepLinkInfo implements binary de-serialization for HelpDeepLinkInfoClass.

type HelpDeepLinkInfoEmpty

type HelpDeepLinkInfoEmpty struct {
}

HelpDeepLinkInfoEmpty represents TL type `help.deepLinkInfoEmpty#66afa166`. Deep link info empty

See https://core.telegram.org/constructor/help.deepLinkInfoEmpty for reference.

func (*HelpDeepLinkInfoEmpty) Decode

func (d *HelpDeepLinkInfoEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpDeepLinkInfoEmpty) Encode

func (d *HelpDeepLinkInfoEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpDeepLinkInfoEmpty) String added in v0.12.0

func (d *HelpDeepLinkInfoEmpty) String() string

String implements fmt.Stringer.

type HelpDismissSuggestionRequest

type HelpDismissSuggestionRequest struct {
	// Suggestion
	Suggestion string
}

HelpDismissSuggestionRequest represents TL type `help.dismissSuggestion#77fa99f`. Dismiss a suggestion

See https://core.telegram.org/method/help.dismissSuggestion for reference.

func (*HelpDismissSuggestionRequest) Decode

Decode implements bin.Decoder.

func (*HelpDismissSuggestionRequest) Encode

Encode implements bin.Encoder.

func (*HelpDismissSuggestionRequest) String added in v0.12.0

String implements fmt.Stringer.

type HelpEditUserInfoRequest

type HelpEditUserInfoRequest struct {
	// User
	UserID InputUserClass
	// Message
	Message string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	Entities []MessageEntityClass
}

HelpEditUserInfoRequest represents TL type `help.editUserInfo#66b91b70`. Internal use

See https://core.telegram.org/method/help.editUserInfo for reference.

func (*HelpEditUserInfoRequest) Decode

func (e *HelpEditUserInfoRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpEditUserInfoRequest) Encode

func (e *HelpEditUserInfoRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpEditUserInfoRequest) String added in v0.12.0

func (e *HelpEditUserInfoRequest) String() string

String implements fmt.Stringer.

type HelpGetAppChangelogRequest

type HelpGetAppChangelogRequest struct {
	// Previous app version
	PrevAppVersion string
}

HelpGetAppChangelogRequest represents TL type `help.getAppChangelog#9010ef6f`. Get changelog of current app. Typically, an updates¹ constructor will be returned, containing one or more updateServiceNotification² updates with app-specific changelogs.

Links:

  1. https://core.telegram.org/constructor/updates
  2. https://core.telegram.org/constructor/updateServiceNotification

See https://core.telegram.org/method/help.getAppChangelog for reference.

func (*HelpGetAppChangelogRequest) Decode

Decode implements bin.Decoder.

func (*HelpGetAppChangelogRequest) Encode

Encode implements bin.Encoder.

func (*HelpGetAppChangelogRequest) String added in v0.12.0

func (g *HelpGetAppChangelogRequest) String() string

String implements fmt.Stringer.

type HelpGetAppConfigRequest

type HelpGetAppConfigRequest struct {
}

HelpGetAppConfigRequest represents TL type `help.getAppConfig#98914110`. Get app-specific configuration, see client configuration¹ for more info on the result.

Links:

  1. https://core.telegram.org/api/config#client-configuration

See https://core.telegram.org/method/help.getAppConfig for reference.

func (*HelpGetAppConfigRequest) Decode

func (g *HelpGetAppConfigRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpGetAppConfigRequest) Encode

func (g *HelpGetAppConfigRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpGetAppConfigRequest) String added in v0.12.0

func (g *HelpGetAppConfigRequest) String() string

String implements fmt.Stringer.

type HelpGetAppUpdateRequest

type HelpGetAppUpdateRequest struct {
	// Source
	Source string
}

HelpGetAppUpdateRequest represents TL type `help.getAppUpdate#522d5a7d`. Returns information on update availability for the current application.

See https://core.telegram.org/method/help.getAppUpdate for reference.

func (*HelpGetAppUpdateRequest) Decode

func (g *HelpGetAppUpdateRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpGetAppUpdateRequest) Encode

func (g *HelpGetAppUpdateRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpGetAppUpdateRequest) String added in v0.12.0

func (g *HelpGetAppUpdateRequest) String() string

String implements fmt.Stringer.

type HelpGetCdnConfigRequest

type HelpGetCdnConfigRequest struct {
}

HelpGetCdnConfigRequest represents TL type `help.getCdnConfig#52029342`. Get configuration for CDN¹ file downloads.

Links:

  1. https://core.telegram.org/cdn

See https://core.telegram.org/method/help.getCdnConfig for reference.

func (*HelpGetCdnConfigRequest) Decode

func (g *HelpGetCdnConfigRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpGetCdnConfigRequest) Encode

func (g *HelpGetCdnConfigRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpGetCdnConfigRequest) String added in v0.12.0

func (g *HelpGetCdnConfigRequest) String() string

String implements fmt.Stringer.

type HelpGetConfigRequest

type HelpGetConfigRequest struct {
}

HelpGetConfigRequest represents TL type `help.getConfig#c4f9186b`. Returns current configuration, including data center configuration.

See https://core.telegram.org/method/help.getConfig for reference.

func (*HelpGetConfigRequest) Decode

func (g *HelpGetConfigRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpGetConfigRequest) Encode

func (g *HelpGetConfigRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpGetConfigRequest) String added in v0.12.0

func (g *HelpGetConfigRequest) String() string

String implements fmt.Stringer.

type HelpGetCountriesListRequest

type HelpGetCountriesListRequest struct {
	// Language code of the current user
	LangCode string
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

HelpGetCountriesListRequest represents TL type `help.getCountriesList#735787a8`. Get name, ISO code, localized name and phone codes/patterns of all available countries

See https://core.telegram.org/method/help.getCountriesList for reference.

func (*HelpGetCountriesListRequest) Decode

Decode implements bin.Decoder.

func (*HelpGetCountriesListRequest) Encode

Encode implements bin.Encoder.

func (*HelpGetCountriesListRequest) String added in v0.12.0

func (g *HelpGetCountriesListRequest) String() string

String implements fmt.Stringer.

type HelpGetDeepLinkInfoRequest

type HelpGetDeepLinkInfoRequest struct {
	// Path in t.me/path
	Path string
}

HelpGetDeepLinkInfoRequest represents TL type `help.getDeepLinkInfo#3fedc75f`. Get info about a t.me link

See https://core.telegram.org/method/help.getDeepLinkInfo for reference.

func (*HelpGetDeepLinkInfoRequest) Decode

Decode implements bin.Decoder.

func (*HelpGetDeepLinkInfoRequest) Encode

Encode implements bin.Encoder.

func (*HelpGetDeepLinkInfoRequest) String added in v0.12.0

func (g *HelpGetDeepLinkInfoRequest) String() string

String implements fmt.Stringer.

type HelpGetInviteTextRequest

type HelpGetInviteTextRequest struct {
}

HelpGetInviteTextRequest represents TL type `help.getInviteText#4d392343`. Returns localized text of a text message with an invitation.

See https://core.telegram.org/method/help.getInviteText for reference.

func (*HelpGetInviteTextRequest) Decode

func (g *HelpGetInviteTextRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpGetInviteTextRequest) Encode

func (g *HelpGetInviteTextRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpGetInviteTextRequest) String added in v0.12.0

func (g *HelpGetInviteTextRequest) String() string

String implements fmt.Stringer.

type HelpGetNearestDcRequest

type HelpGetNearestDcRequest struct {
}

HelpGetNearestDcRequest represents TL type `help.getNearestDc#1fb33026`. Returns info on data centre nearest to the user.

See https://core.telegram.org/method/help.getNearestDc for reference.

func (*HelpGetNearestDcRequest) Decode

func (g *HelpGetNearestDcRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpGetNearestDcRequest) Encode

func (g *HelpGetNearestDcRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpGetNearestDcRequest) String added in v0.12.0

func (g *HelpGetNearestDcRequest) String() string

String implements fmt.Stringer.

type HelpGetPassportConfigRequest

type HelpGetPassportConfigRequest struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

HelpGetPassportConfigRequest represents TL type `help.getPassportConfig#c661ad08`. Get passport¹ configuration

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/method/help.getPassportConfig for reference.

func (*HelpGetPassportConfigRequest) Decode

Decode implements bin.Decoder.

func (*HelpGetPassportConfigRequest) Encode

Encode implements bin.Encoder.

func (*HelpGetPassportConfigRequest) String added in v0.12.0

String implements fmt.Stringer.

type HelpGetPromoDataRequest

type HelpGetPromoDataRequest struct {
}

HelpGetPromoDataRequest represents TL type `help.getPromoData#c0977421`. Get MTProxy/Public Service Announcement information

See https://core.telegram.org/method/help.getPromoData for reference.

func (*HelpGetPromoDataRequest) Decode

func (g *HelpGetPromoDataRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpGetPromoDataRequest) Encode

func (g *HelpGetPromoDataRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpGetPromoDataRequest) String added in v0.12.0

func (g *HelpGetPromoDataRequest) String() string

String implements fmt.Stringer.

type HelpGetRecentMeUrlsRequest

type HelpGetRecentMeUrlsRequest struct {
	// Referer
	Referer string
}

HelpGetRecentMeUrlsRequest represents TL type `help.getRecentMeUrls#3dc0f114`. Get recently used t.me links

See https://core.telegram.org/method/help.getRecentMeUrls for reference.

func (*HelpGetRecentMeUrlsRequest) Decode

Decode implements bin.Decoder.

func (*HelpGetRecentMeUrlsRequest) Encode

Encode implements bin.Encoder.

func (*HelpGetRecentMeUrlsRequest) String added in v0.12.0

func (g *HelpGetRecentMeUrlsRequest) String() string

String implements fmt.Stringer.

type HelpGetSupportNameRequest

type HelpGetSupportNameRequest struct {
}

HelpGetSupportNameRequest represents TL type `help.getSupportName#d360e72c`. Get localized name of the telegram support user

See https://core.telegram.org/method/help.getSupportName for reference.

func (*HelpGetSupportNameRequest) Decode

func (g *HelpGetSupportNameRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpGetSupportNameRequest) Encode

func (g *HelpGetSupportNameRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpGetSupportNameRequest) String added in v0.12.0

func (g *HelpGetSupportNameRequest) String() string

String implements fmt.Stringer.

type HelpGetSupportRequest

type HelpGetSupportRequest struct {
}

HelpGetSupportRequest represents TL type `help.getSupport#9cdf08cd`. Returns the support user for the 'ask a question' feature.

See https://core.telegram.org/method/help.getSupport for reference.

func (*HelpGetSupportRequest) Decode

func (g *HelpGetSupportRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpGetSupportRequest) Encode

func (g *HelpGetSupportRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpGetSupportRequest) String added in v0.12.0

func (g *HelpGetSupportRequest) String() string

String implements fmt.Stringer.

type HelpGetTermsOfServiceUpdateRequest

type HelpGetTermsOfServiceUpdateRequest struct {
}

HelpGetTermsOfServiceUpdateRequest represents TL type `help.getTermsOfServiceUpdate#2ca51fd1`. Look for updates of telegram's terms of service

See https://core.telegram.org/method/help.getTermsOfServiceUpdate for reference.

func (*HelpGetTermsOfServiceUpdateRequest) Decode

Decode implements bin.Decoder.

func (*HelpGetTermsOfServiceUpdateRequest) Encode

Encode implements bin.Encoder.

func (*HelpGetTermsOfServiceUpdateRequest) String added in v0.12.0

String implements fmt.Stringer.

type HelpGetUserInfoRequest

type HelpGetUserInfoRequest struct {
	// User ID
	UserID InputUserClass
}

HelpGetUserInfoRequest represents TL type `help.getUserInfo#38a08d3`. Internal use

See https://core.telegram.org/method/help.getUserInfo for reference.

func (*HelpGetUserInfoRequest) Decode

func (g *HelpGetUserInfoRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpGetUserInfoRequest) Encode

func (g *HelpGetUserInfoRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpGetUserInfoRequest) String added in v0.12.0

func (g *HelpGetUserInfoRequest) String() string

String implements fmt.Stringer.

type HelpHidePromoDataRequest

type HelpHidePromoDataRequest struct {
	// Peer to hide
	Peer InputPeerClass
}

HelpHidePromoDataRequest represents TL type `help.hidePromoData#1e251c95`. Hide MTProxy/Public Service Announcement information

See https://core.telegram.org/method/help.hidePromoData for reference.

func (*HelpHidePromoDataRequest) Decode

func (h *HelpHidePromoDataRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpHidePromoDataRequest) Encode

func (h *HelpHidePromoDataRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpHidePromoDataRequest) String added in v0.12.0

func (h *HelpHidePromoDataRequest) String() string

String implements fmt.Stringer.

type HelpInviteText

type HelpInviteText struct {
	// Text of the message
	Message string
}

HelpInviteText represents TL type `help.inviteText#18cb9f78`. Text of a text message with an invitation to install Telegram.

See https://core.telegram.org/constructor/help.inviteText for reference.

func (*HelpInviteText) Decode

func (i *HelpInviteText) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpInviteText) Encode

func (i *HelpInviteText) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpInviteText) String added in v0.12.0

func (i *HelpInviteText) String() string

String implements fmt.Stringer.

type HelpNoAppUpdate

type HelpNoAppUpdate struct {
}

HelpNoAppUpdate represents TL type `help.noAppUpdate#c45a6536`. No updates are available for the application.

See https://core.telegram.org/constructor/help.noAppUpdate for reference.

func (*HelpNoAppUpdate) Decode

func (n *HelpNoAppUpdate) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpNoAppUpdate) Encode

func (n *HelpNoAppUpdate) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpNoAppUpdate) String added in v0.12.0

func (n *HelpNoAppUpdate) String() string

String implements fmt.Stringer.

type HelpPassportConfig

type HelpPassportConfig struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// Localization
	CountriesLangs DataJSON
}

HelpPassportConfig represents TL type `help.passportConfig#a098d6af`. Telegram passport¹ configuration

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/constructor/help.passportConfig for reference.

func (*HelpPassportConfig) Decode

func (p *HelpPassportConfig) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpPassportConfig) Encode

func (p *HelpPassportConfig) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpPassportConfig) String added in v0.12.0

func (p *HelpPassportConfig) String() string

String implements fmt.Stringer.

type HelpPassportConfigBox

type HelpPassportConfigBox struct {
	PassportConfig HelpPassportConfigClass
}

HelpPassportConfig boxes the HelpPassportConfigClass providing a helper.

func (*HelpPassportConfigBox) Decode

func (b *HelpPassportConfigBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for HelpPassportConfigBox.

func (*HelpPassportConfigBox) Encode

func (b *HelpPassportConfigBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for HelpPassportConfigBox.

type HelpPassportConfigClass

type HelpPassportConfigClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

HelpPassportConfigClass represents help.PassportConfig generic type.

See https://core.telegram.org/type/help.PassportConfig for reference.

Example:

g, err := DecodeHelpPassportConfig(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *HelpPassportConfigNotModified: // help.passportConfigNotModified#bfb9f457
case *HelpPassportConfig: // help.passportConfig#a098d6af
default: panic(v)
}

func DecodeHelpPassportConfig

func DecodeHelpPassportConfig(buf *bin.Buffer) (HelpPassportConfigClass, error)

DecodeHelpPassportConfig implements binary de-serialization for HelpPassportConfigClass.

type HelpPassportConfigNotModified

type HelpPassportConfigNotModified struct {
}

HelpPassportConfigNotModified represents TL type `help.passportConfigNotModified#bfb9f457`. Password configuration not modified

See https://core.telegram.org/constructor/help.passportConfigNotModified for reference.

func (*HelpPassportConfigNotModified) Decode

Decode implements bin.Decoder.

func (*HelpPassportConfigNotModified) Encode

Encode implements bin.Encoder.

func (*HelpPassportConfigNotModified) String added in v0.12.0

String implements fmt.Stringer.

type HelpPromoData

type HelpPromoData struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// MTProxy-related channel
	Proxy bool
	// Expiry of PSA/MTProxy info
	Expires int
	// MTProxy/PSA peer
	Peer PeerClass
	// Chat info
	Chats []ChatClass
	// User info
	Users []UserClass
	// PSA type
	//
	// Use SetPsaType and GetPsaType helpers.
	PsaType string
	// PSA message
	//
	// Use SetPsaMessage and GetPsaMessage helpers.
	PsaMessage string
}

HelpPromoData represents TL type `help.promoData#8c39793f`. MTProxy/Public Service Announcement information

See https://core.telegram.org/constructor/help.promoData for reference.

func (*HelpPromoData) Decode

func (p *HelpPromoData) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpPromoData) Encode

func (p *HelpPromoData) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpPromoData) GetPsaMessage

func (p *HelpPromoData) GetPsaMessage() (value string, ok bool)

GetPsaMessage returns value of PsaMessage conditional field and boolean which is true if field was set.

func (*HelpPromoData) GetPsaType

func (p *HelpPromoData) GetPsaType() (value string, ok bool)

GetPsaType returns value of PsaType conditional field and boolean which is true if field was set.

func (*HelpPromoData) SetProxy

func (p *HelpPromoData) SetProxy(value bool)

SetProxy sets value of Proxy conditional field.

func (*HelpPromoData) SetPsaMessage

func (p *HelpPromoData) SetPsaMessage(value string)

SetPsaMessage sets value of PsaMessage conditional field.

func (*HelpPromoData) SetPsaType

func (p *HelpPromoData) SetPsaType(value string)

SetPsaType sets value of PsaType conditional field.

func (*HelpPromoData) String added in v0.12.0

func (p *HelpPromoData) String() string

String implements fmt.Stringer.

type HelpPromoDataBox

type HelpPromoDataBox struct {
	PromoData HelpPromoDataClass
}

HelpPromoData boxes the HelpPromoDataClass providing a helper.

func (*HelpPromoDataBox) Decode

func (b *HelpPromoDataBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for HelpPromoDataBox.

func (*HelpPromoDataBox) Encode

func (b *HelpPromoDataBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for HelpPromoDataBox.

type HelpPromoDataClass

type HelpPromoDataClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

HelpPromoDataClass represents help.PromoData generic type.

See https://core.telegram.org/type/help.PromoData for reference.

Example:

g, err := DecodeHelpPromoData(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *HelpPromoDataEmpty: // help.promoDataEmpty#98f6ac75
case *HelpPromoData: // help.promoData#8c39793f
default: panic(v)
}

func DecodeHelpPromoData

func DecodeHelpPromoData(buf *bin.Buffer) (HelpPromoDataClass, error)

DecodeHelpPromoData implements binary de-serialization for HelpPromoDataClass.

type HelpPromoDataEmpty

type HelpPromoDataEmpty struct {
	// Re-fetch PSA/MTProxy info after the specified number of seconds
	Expires int
}

HelpPromoDataEmpty represents TL type `help.promoDataEmpty#98f6ac75`. No PSA/MTProxy info is available

See https://core.telegram.org/constructor/help.promoDataEmpty for reference.

func (*HelpPromoDataEmpty) Decode

func (p *HelpPromoDataEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpPromoDataEmpty) Encode

func (p *HelpPromoDataEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpPromoDataEmpty) String added in v0.12.0

func (p *HelpPromoDataEmpty) String() string

String implements fmt.Stringer.

type HelpRecentMeUrls

type HelpRecentMeUrls struct {
	// URLs
	Urls []RecentMeUrlClass
	// Chats
	Chats []ChatClass
	// Users
	Users []UserClass
}

HelpRecentMeUrls represents TL type `help.recentMeUrls#e0310d7`. Recent t.me URLs

See https://core.telegram.org/constructor/help.recentMeUrls for reference.

func (*HelpRecentMeUrls) Decode

func (r *HelpRecentMeUrls) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpRecentMeUrls) Encode

func (r *HelpRecentMeUrls) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpRecentMeUrls) String added in v0.12.0

func (r *HelpRecentMeUrls) String() string

String implements fmt.Stringer.

type HelpSaveAppLogRequest

type HelpSaveAppLogRequest struct {
	// List of input events
	Events []InputAppEvent
}

HelpSaveAppLogRequest represents TL type `help.saveAppLog#6f02f748`. Saves logs of application on the server.

See https://core.telegram.org/method/help.saveAppLog for reference.

func (*HelpSaveAppLogRequest) Decode

func (s *HelpSaveAppLogRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpSaveAppLogRequest) Encode

func (s *HelpSaveAppLogRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpSaveAppLogRequest) String added in v0.12.0

func (s *HelpSaveAppLogRequest) String() string

String implements fmt.Stringer.

type HelpSetBotUpdatesStatusRequest

type HelpSetBotUpdatesStatusRequest struct {
	// Number of pending updates
	PendingUpdatesCount int
	// Error message, if present
	Message string
}

HelpSetBotUpdatesStatusRequest represents TL type `help.setBotUpdatesStatus#ec22cfcd`. Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only

See https://core.telegram.org/method/help.setBotUpdatesStatus for reference.

func (*HelpSetBotUpdatesStatusRequest) Decode

Decode implements bin.Decoder.

func (*HelpSetBotUpdatesStatusRequest) Encode

Encode implements bin.Encoder.

func (*HelpSetBotUpdatesStatusRequest) String added in v0.12.0

String implements fmt.Stringer.

type HelpSupport

type HelpSupport struct {
	// Phone number
	PhoneNumber string
	// User
	User UserClass
}

HelpSupport represents TL type `help.support#17c6b5f6`. Info on support user.

See https://core.telegram.org/constructor/help.support for reference.

func (*HelpSupport) Decode

func (s *HelpSupport) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpSupport) Encode

func (s *HelpSupport) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpSupport) String added in v0.12.0

func (s *HelpSupport) String() string

String implements fmt.Stringer.

type HelpSupportName

type HelpSupportName struct {
	// Localized name
	Name string
}

HelpSupportName represents TL type `help.supportName#8c05f1c9`. Localized name for telegram support

See https://core.telegram.org/constructor/help.supportName for reference.

func (*HelpSupportName) Decode

func (s *HelpSupportName) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpSupportName) Encode

func (s *HelpSupportName) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpSupportName) String added in v0.12.0

func (s *HelpSupportName) String() string

String implements fmt.Stringer.

type HelpTermsOfService

type HelpTermsOfService struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether a prompt must be showed to the user, in order to accept the new terms.
	Popup bool
	// ID of the new terms
	ID DataJSON
	// Text of the new terms
	Text string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	Entities []MessageEntityClass
	// Minimum age required to sign up to telegram, the user must confirm that they is older than the minimum age.
	//
	// Use SetMinAgeConfirm and GetMinAgeConfirm helpers.
	MinAgeConfirm int
}

HelpTermsOfService represents TL type `help.termsOfService#780a0310`. Info about the latest telegram Terms Of Service

See https://core.telegram.org/constructor/help.termsOfService for reference.

func (*HelpTermsOfService) Decode

func (t *HelpTermsOfService) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpTermsOfService) Encode

func (t *HelpTermsOfService) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpTermsOfService) GetMinAgeConfirm

func (t *HelpTermsOfService) GetMinAgeConfirm() (value int, ok bool)

GetMinAgeConfirm returns value of MinAgeConfirm conditional field and boolean which is true if field was set.

func (*HelpTermsOfService) SetMinAgeConfirm

func (t *HelpTermsOfService) SetMinAgeConfirm(value int)

SetMinAgeConfirm sets value of MinAgeConfirm conditional field.

func (*HelpTermsOfService) SetPopup

func (t *HelpTermsOfService) SetPopup(value bool)

SetPopup sets value of Popup conditional field.

func (*HelpTermsOfService) String added in v0.12.0

func (t *HelpTermsOfService) String() string

String implements fmt.Stringer.

type HelpTermsOfServiceUpdate

type HelpTermsOfServiceUpdate struct {
	// New TOS updates will have to be queried using help.getTermsOfServiceUpdate¹ in expires seconds
	//
	// Links:
	//  1) https://core.telegram.org/method/help.getTermsOfServiceUpdate
	Expires int
	// New terms of service
	TermsOfService HelpTermsOfService
}

HelpTermsOfServiceUpdate represents TL type `help.termsOfServiceUpdate#28ecf961`. Info about an update of telegram's terms of service. If the terms of service are declined, then the account.deleteAccount¹ method should be called with the reason "Decline ToS update"

Links:

  1. https://core.telegram.org/method/account.deleteAccount

See https://core.telegram.org/constructor/help.termsOfServiceUpdate for reference.

func (*HelpTermsOfServiceUpdate) Decode

func (t *HelpTermsOfServiceUpdate) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpTermsOfServiceUpdate) Encode

func (t *HelpTermsOfServiceUpdate) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpTermsOfServiceUpdate) String added in v0.12.0

func (t *HelpTermsOfServiceUpdate) String() string

String implements fmt.Stringer.

type HelpTermsOfServiceUpdateBox

type HelpTermsOfServiceUpdateBox struct {
	TermsOfServiceUpdate HelpTermsOfServiceUpdateClass
}

HelpTermsOfServiceUpdate boxes the HelpTermsOfServiceUpdateClass providing a helper.

func (*HelpTermsOfServiceUpdateBox) Decode

func (b *HelpTermsOfServiceUpdateBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for HelpTermsOfServiceUpdateBox.

func (*HelpTermsOfServiceUpdateBox) Encode

func (b *HelpTermsOfServiceUpdateBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for HelpTermsOfServiceUpdateBox.

type HelpTermsOfServiceUpdateClass

type HelpTermsOfServiceUpdateClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

HelpTermsOfServiceUpdateClass represents help.TermsOfServiceUpdate generic type.

See https://core.telegram.org/type/help.TermsOfServiceUpdate for reference.

Example:

g, err := DecodeHelpTermsOfServiceUpdate(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *HelpTermsOfServiceUpdateEmpty: // help.termsOfServiceUpdateEmpty#e3309f7f
case *HelpTermsOfServiceUpdate: // help.termsOfServiceUpdate#28ecf961
default: panic(v)
}

func DecodeHelpTermsOfServiceUpdate

func DecodeHelpTermsOfServiceUpdate(buf *bin.Buffer) (HelpTermsOfServiceUpdateClass, error)

DecodeHelpTermsOfServiceUpdate implements binary de-serialization for HelpTermsOfServiceUpdateClass.

type HelpTermsOfServiceUpdateEmpty

type HelpTermsOfServiceUpdateEmpty struct {
	// New TOS updates will have to be queried using help.getTermsOfServiceUpdate¹ in expires seconds
	//
	// Links:
	//  1) https://core.telegram.org/method/help.getTermsOfServiceUpdate
	Expires int
}

HelpTermsOfServiceUpdateEmpty represents TL type `help.termsOfServiceUpdateEmpty#e3309f7f`. No changes were made to telegram's terms of service

See https://core.telegram.org/constructor/help.termsOfServiceUpdateEmpty for reference.

func (*HelpTermsOfServiceUpdateEmpty) Decode

Decode implements bin.Decoder.

func (*HelpTermsOfServiceUpdateEmpty) Encode

Encode implements bin.Encoder.

func (*HelpTermsOfServiceUpdateEmpty) String added in v0.12.0

String implements fmt.Stringer.

type HelpUserInfo

type HelpUserInfo struct {
	// Info
	Message string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	Entities []MessageEntityClass
	// Author
	Author string
	// Date
	Date int
}

HelpUserInfo represents TL type `help.userInfo#1eb3758`. Internal use

See https://core.telegram.org/constructor/help.userInfo for reference.

func (*HelpUserInfo) Decode

func (u *HelpUserInfo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpUserInfo) Encode

func (u *HelpUserInfo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpUserInfo) String added in v0.12.0

func (u *HelpUserInfo) String() string

String implements fmt.Stringer.

type HelpUserInfoBox

type HelpUserInfoBox struct {
	UserInfo HelpUserInfoClass
}

HelpUserInfo boxes the HelpUserInfoClass providing a helper.

func (*HelpUserInfoBox) Decode

func (b *HelpUserInfoBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for HelpUserInfoBox.

func (*HelpUserInfoBox) Encode

func (b *HelpUserInfoBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for HelpUserInfoBox.

type HelpUserInfoClass

type HelpUserInfoClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

HelpUserInfoClass represents help.UserInfo generic type.

See https://core.telegram.org/type/help.UserInfo for reference.

Example:

g, err := DecodeHelpUserInfo(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *HelpUserInfoEmpty: // help.userInfoEmpty#f3ae2eed
case *HelpUserInfo: // help.userInfo#1eb3758
default: panic(v)
}

func DecodeHelpUserInfo

func DecodeHelpUserInfo(buf *bin.Buffer) (HelpUserInfoClass, error)

DecodeHelpUserInfo implements binary de-serialization for HelpUserInfoClass.

type HelpUserInfoEmpty

type HelpUserInfoEmpty struct {
}

HelpUserInfoEmpty represents TL type `help.userInfoEmpty#f3ae2eed`. Internal use

See https://core.telegram.org/constructor/help.userInfoEmpty for reference.

func (*HelpUserInfoEmpty) Decode

func (u *HelpUserInfoEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HelpUserInfoEmpty) Encode

func (u *HelpUserInfoEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HelpUserInfoEmpty) String added in v0.12.0

func (u *HelpUserInfoEmpty) String() string

String implements fmt.Stringer.

type HighScore

type HighScore struct {
	// Position in highscore list
	Pos int
	// User ID
	UserID int
	// Score
	Score int
}

HighScore represents TL type `highScore#58fffcd0`. Game highscore

See https://core.telegram.org/constructor/highScore for reference.

func (*HighScore) Decode

func (h *HighScore) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*HighScore) Encode

func (h *HighScore) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*HighScore) String added in v0.12.0

func (h *HighScore) String() string

String implements fmt.Stringer.

type ImportedContact

type ImportedContact struct {
	// User identifier
	UserID int
	// The contact's client identifier (passed to one of the InputContact¹ constructors)
	//
	// Links:
	//  1) https://core.telegram.org/type/InputContact
	ClientID int64
}

ImportedContact represents TL type `importedContact#d0028438`. Successfully imported contact.

See https://core.telegram.org/constructor/importedContact for reference.

func (*ImportedContact) Decode

func (i *ImportedContact) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ImportedContact) Encode

func (i *ImportedContact) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ImportedContact) String added in v0.12.0

func (i *ImportedContact) String() string

String implements fmt.Stringer.

type InlineBotCallbackQueryHandler added in v0.9.0

type InlineBotCallbackQueryHandler func(ctx UpdateContext, update *UpdateInlineBotCallbackQuery) error

InlineBotCallbackQueryHandler is a InlineBotCallbackQuery event handler.

type InlineBotSwitchPM

type InlineBotSwitchPM struct {
	// Text for the button that switches the user to a private chat with the bot and sends the bot a start message with the parameter start_parameter (can be empty)
	Text string
	// The parameter for the /start parameter
	StartParam string
}

InlineBotSwitchPM represents TL type `inlineBotSwitchPM#3c20629f`. The bot requested the user to message him in private

See https://core.telegram.org/constructor/inlineBotSwitchPM for reference.

func (*InlineBotSwitchPM) Decode

func (i *InlineBotSwitchPM) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InlineBotSwitchPM) Encode

func (i *InlineBotSwitchPM) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InlineBotSwitchPM) String added in v0.12.0

func (i *InlineBotSwitchPM) String() string

String implements fmt.Stringer.

type InlineQueryPeerTypeBox added in v0.13.0

type InlineQueryPeerTypeBox struct {
	InlineQueryPeerType InlineQueryPeerTypeClass
}

InlineQueryPeerType boxes the InlineQueryPeerTypeClass providing a helper.

func (*InlineQueryPeerTypeBox) Decode added in v0.13.0

func (b *InlineQueryPeerTypeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InlineQueryPeerTypeBox.

func (*InlineQueryPeerTypeBox) Encode added in v0.13.0

func (b *InlineQueryPeerTypeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InlineQueryPeerTypeBox.

type InlineQueryPeerTypeBroadcast added in v0.13.0

type InlineQueryPeerTypeBroadcast struct {
}

InlineQueryPeerTypeBroadcast represents TL type `inlineQueryPeerTypeBroadcast#6334ee9a`.

See https://core.telegram.org/constructor/inlineQueryPeerTypeBroadcast for reference.

func (*InlineQueryPeerTypeBroadcast) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*InlineQueryPeerTypeBroadcast) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*InlineQueryPeerTypeBroadcast) String added in v0.13.0

String implements fmt.Stringer.

type InlineQueryPeerTypeChat added in v0.13.0

type InlineQueryPeerTypeChat struct {
}

InlineQueryPeerTypeChat represents TL type `inlineQueryPeerTypeChat#d766c50a`.

See https://core.telegram.org/constructor/inlineQueryPeerTypeChat for reference.

func (*InlineQueryPeerTypeChat) Decode added in v0.13.0

func (i *InlineQueryPeerTypeChat) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InlineQueryPeerTypeChat) Encode added in v0.13.0

func (i *InlineQueryPeerTypeChat) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InlineQueryPeerTypeChat) String added in v0.13.0

func (i *InlineQueryPeerTypeChat) String() string

String implements fmt.Stringer.

type InlineQueryPeerTypeClass added in v0.13.0

type InlineQueryPeerTypeClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InlineQueryPeerTypeClass represents InlineQueryPeerType generic type.

See https://core.telegram.org/type/InlineQueryPeerType for reference.

Example:

g, err := DecodeInlineQueryPeerType(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InlineQueryPeerTypeSameBotPM: // inlineQueryPeerTypeSameBotPM#3081ed9d
case *InlineQueryPeerTypePM: // inlineQueryPeerTypePM#833c0fac
case *InlineQueryPeerTypeChat: // inlineQueryPeerTypeChat#d766c50a
case *InlineQueryPeerTypeMegagroup: // inlineQueryPeerTypeMegagroup#5ec4be43
case *InlineQueryPeerTypeBroadcast: // inlineQueryPeerTypeBroadcast#6334ee9a
default: panic(v)
}

func DecodeInlineQueryPeerType added in v0.13.0

func DecodeInlineQueryPeerType(buf *bin.Buffer) (InlineQueryPeerTypeClass, error)

DecodeInlineQueryPeerType implements binary de-serialization for InlineQueryPeerTypeClass.

type InlineQueryPeerTypeMegagroup added in v0.13.0

type InlineQueryPeerTypeMegagroup struct {
}

InlineQueryPeerTypeMegagroup represents TL type `inlineQueryPeerTypeMegagroup#5ec4be43`.

See https://core.telegram.org/constructor/inlineQueryPeerTypeMegagroup for reference.

func (*InlineQueryPeerTypeMegagroup) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*InlineQueryPeerTypeMegagroup) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*InlineQueryPeerTypeMegagroup) String added in v0.13.0

String implements fmt.Stringer.

type InlineQueryPeerTypePM added in v0.13.0

type InlineQueryPeerTypePM struct {
}

InlineQueryPeerTypePM represents TL type `inlineQueryPeerTypePM#833c0fac`.

See https://core.telegram.org/constructor/inlineQueryPeerTypePM for reference.

func (*InlineQueryPeerTypePM) Decode added in v0.13.0

func (i *InlineQueryPeerTypePM) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InlineQueryPeerTypePM) Encode added in v0.13.0

func (i *InlineQueryPeerTypePM) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InlineQueryPeerTypePM) String added in v0.13.0

func (i *InlineQueryPeerTypePM) String() string

String implements fmt.Stringer.

type InlineQueryPeerTypeSameBotPM added in v0.13.0

type InlineQueryPeerTypeSameBotPM struct {
}

InlineQueryPeerTypeSameBotPM represents TL type `inlineQueryPeerTypeSameBotPM#3081ed9d`.

See https://core.telegram.org/constructor/inlineQueryPeerTypeSameBotPM for reference.

func (*InlineQueryPeerTypeSameBotPM) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*InlineQueryPeerTypeSameBotPM) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*InlineQueryPeerTypeSameBotPM) String added in v0.13.0

String implements fmt.Stringer.

type InputAppEvent

type InputAppEvent struct {
	// Client's exact timestamp for the event
	Time float64
	// Type of event
	Type string
	// Arbitrary numeric value for more convenient selection of certain event types, or events referring to a certain object
	Peer int64
	// Details of the event
	Data JSONValueClass
}

InputAppEvent represents TL type `inputAppEvent#1d1b1245`. Event that occured in the application.

See https://core.telegram.org/constructor/inputAppEvent for reference.

func (*InputAppEvent) Decode

func (i *InputAppEvent) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputAppEvent) Encode

func (i *InputAppEvent) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputAppEvent) String added in v0.12.0

func (i *InputAppEvent) String() string

String implements fmt.Stringer.

type InputBotInlineMessageBox

type InputBotInlineMessageBox struct {
	InputBotInlineMessage InputBotInlineMessageClass
}

InputBotInlineMessage boxes the InputBotInlineMessageClass providing a helper.

func (*InputBotInlineMessageBox) Decode

func (b *InputBotInlineMessageBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputBotInlineMessageBox.

func (*InputBotInlineMessageBox) Encode

func (b *InputBotInlineMessageBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputBotInlineMessageBox.

type InputBotInlineMessageClass

type InputBotInlineMessageClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputBotInlineMessageClass represents InputBotInlineMessage generic type.

See https://core.telegram.org/type/InputBotInlineMessage for reference.

Example:

g, err := DecodeInputBotInlineMessage(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputBotInlineMessageMediaAuto: // inputBotInlineMessageMediaAuto#3380c786
case *InputBotInlineMessageText: // inputBotInlineMessageText#3dcd7a87
case *InputBotInlineMessageMediaGeo: // inputBotInlineMessageMediaGeo#96929a85
case *InputBotInlineMessageMediaVenue: // inputBotInlineMessageMediaVenue#417bbf11
case *InputBotInlineMessageMediaContact: // inputBotInlineMessageMediaContact#a6edbffd
case *InputBotInlineMessageGame: // inputBotInlineMessageGame#4b425864
default: panic(v)
}

func DecodeInputBotInlineMessage

func DecodeInputBotInlineMessage(buf *bin.Buffer) (InputBotInlineMessageClass, error)

DecodeInputBotInlineMessage implements binary de-serialization for InputBotInlineMessageClass.

type InputBotInlineMessageGame

type InputBotInlineMessageGame struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Inline keyboard
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

InputBotInlineMessageGame represents TL type `inputBotInlineMessageGame#4b425864`. A game

See https://core.telegram.org/constructor/inputBotInlineMessageGame for reference.

func (*InputBotInlineMessageGame) Decode

func (i *InputBotInlineMessageGame) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputBotInlineMessageGame) Encode

func (i *InputBotInlineMessageGame) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputBotInlineMessageGame) GetReplyMarkup

func (i *InputBotInlineMessageGame) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageGame) SetReplyMarkup

func (i *InputBotInlineMessageGame) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*InputBotInlineMessageGame) String added in v0.12.0

func (i *InputBotInlineMessageGame) String() string

String implements fmt.Stringer.

type InputBotInlineMessageID

type InputBotInlineMessageID struct {
	// DC ID to use when working with this inline message
	DCID int
	// ID of message
	ID int64
	// Access hash of message
	AccessHash int64
}

InputBotInlineMessageID represents TL type `inputBotInlineMessageID#890c3d89`. Represents a sent inline message from the perspective of a bot

See https://core.telegram.org/constructor/inputBotInlineMessageID for reference.

func (*InputBotInlineMessageID) Decode

func (i *InputBotInlineMessageID) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputBotInlineMessageID) Encode

func (i *InputBotInlineMessageID) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputBotInlineMessageID) String added in v0.12.0

func (i *InputBotInlineMessageID) String() string

String implements fmt.Stringer.

type InputBotInlineMessageMediaAuto

type InputBotInlineMessageMediaAuto struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Caption
	Message string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
	// Inline keyboard
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

InputBotInlineMessageMediaAuto represents TL type `inputBotInlineMessageMediaAuto#3380c786`. A media

See https://core.telegram.org/constructor/inputBotInlineMessageMediaAuto for reference.

func (*InputBotInlineMessageMediaAuto) Decode

Decode implements bin.Decoder.

func (*InputBotInlineMessageMediaAuto) Encode

Encode implements bin.Encoder.

func (*InputBotInlineMessageMediaAuto) GetEntities

func (i *InputBotInlineMessageMediaAuto) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageMediaAuto) GetReplyMarkup

func (i *InputBotInlineMessageMediaAuto) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageMediaAuto) SetEntities

func (i *InputBotInlineMessageMediaAuto) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*InputBotInlineMessageMediaAuto) SetReplyMarkup

func (i *InputBotInlineMessageMediaAuto) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*InputBotInlineMessageMediaAuto) String added in v0.12.0

String implements fmt.Stringer.

type InputBotInlineMessageMediaContact

type InputBotInlineMessageMediaContact struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Phone number
	PhoneNumber string
	// First name
	FirstName string
	// Last name
	LastName string
	// VCard info
	Vcard string
	// Inline keyboard
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

InputBotInlineMessageMediaContact represents TL type `inputBotInlineMessageMediaContact#a6edbffd`. A contact

See https://core.telegram.org/constructor/inputBotInlineMessageMediaContact for reference.

func (*InputBotInlineMessageMediaContact) Decode

Decode implements bin.Decoder.

func (*InputBotInlineMessageMediaContact) Encode

Encode implements bin.Encoder.

func (*InputBotInlineMessageMediaContact) GetReplyMarkup

func (i *InputBotInlineMessageMediaContact) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageMediaContact) SetReplyMarkup

func (i *InputBotInlineMessageMediaContact) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*InputBotInlineMessageMediaContact) String added in v0.12.0

String implements fmt.Stringer.

type InputBotInlineMessageMediaGeo

type InputBotInlineMessageMediaGeo struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Geolocation
	GeoPoint InputGeoPointClass
	// For live locations¹, a direction in which the location moves, in degrees; 1-360
	//
	// Links:
	//  1) https://core.telegram.org/api/live-location
	//
	// Use SetHeading and GetHeading helpers.
	Heading int
	// Validity period
	//
	// Use SetPeriod and GetPeriod helpers.
	Period int
	// For live locations¹, a maximum distance to another chat member for proximity alerts, in meters (0-100000)
	//
	// Links:
	//  1) https://core.telegram.org/api/live-location
	//
	// Use SetProximityNotificationRadius and GetProximityNotificationRadius helpers.
	ProximityNotificationRadius int
	// Reply markup for bot/inline keyboards
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

InputBotInlineMessageMediaGeo represents TL type `inputBotInlineMessageMediaGeo#96929a85`. Geolocation

See https://core.telegram.org/constructor/inputBotInlineMessageMediaGeo for reference.

func (*InputBotInlineMessageMediaGeo) Decode

Decode implements bin.Decoder.

func (*InputBotInlineMessageMediaGeo) Encode

Encode implements bin.Encoder.

func (*InputBotInlineMessageMediaGeo) GetHeading

func (i *InputBotInlineMessageMediaGeo) GetHeading() (value int, ok bool)

GetHeading returns value of Heading conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageMediaGeo) GetPeriod

func (i *InputBotInlineMessageMediaGeo) GetPeriod() (value int, ok bool)

GetPeriod returns value of Period conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageMediaGeo) GetProximityNotificationRadius

func (i *InputBotInlineMessageMediaGeo) GetProximityNotificationRadius() (value int, ok bool)

GetProximityNotificationRadius returns value of ProximityNotificationRadius conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageMediaGeo) GetReplyMarkup

func (i *InputBotInlineMessageMediaGeo) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageMediaGeo) SetHeading

func (i *InputBotInlineMessageMediaGeo) SetHeading(value int)

SetHeading sets value of Heading conditional field.

func (*InputBotInlineMessageMediaGeo) SetPeriod

func (i *InputBotInlineMessageMediaGeo) SetPeriod(value int)

SetPeriod sets value of Period conditional field.

func (*InputBotInlineMessageMediaGeo) SetProximityNotificationRadius

func (i *InputBotInlineMessageMediaGeo) SetProximityNotificationRadius(value int)

SetProximityNotificationRadius sets value of ProximityNotificationRadius conditional field.

func (*InputBotInlineMessageMediaGeo) SetReplyMarkup

func (i *InputBotInlineMessageMediaGeo) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*InputBotInlineMessageMediaGeo) String added in v0.12.0

String implements fmt.Stringer.

type InputBotInlineMessageMediaVenue

type InputBotInlineMessageMediaVenue struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Geolocation
	GeoPoint InputGeoPointClass
	// Venue name
	Title string
	// Address
	Address string
	// Venue provider: currently only "foursquare" needs to be supported
	Provider string
	// Venue ID in the provider's database
	VenueID string
	// Venue type in the provider's database
	VenueType string
	// Inline keyboard
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

InputBotInlineMessageMediaVenue represents TL type `inputBotInlineMessageMediaVenue#417bbf11`. Venue

See https://core.telegram.org/constructor/inputBotInlineMessageMediaVenue for reference.

func (*InputBotInlineMessageMediaVenue) Decode

Decode implements bin.Decoder.

func (*InputBotInlineMessageMediaVenue) Encode

Encode implements bin.Encoder.

func (*InputBotInlineMessageMediaVenue) GetReplyMarkup

func (i *InputBotInlineMessageMediaVenue) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageMediaVenue) SetReplyMarkup

func (i *InputBotInlineMessageMediaVenue) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*InputBotInlineMessageMediaVenue) String added in v0.12.0

String implements fmt.Stringer.

type InputBotInlineMessageText

type InputBotInlineMessageText struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Disable webpage preview
	NoWebpage bool
	// Message
	Message string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
	// Inline keyboard
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
}

InputBotInlineMessageText represents TL type `inputBotInlineMessageText#3dcd7a87`. Simple text message

See https://core.telegram.org/constructor/inputBotInlineMessageText for reference.

func (*InputBotInlineMessageText) Decode

func (i *InputBotInlineMessageText) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputBotInlineMessageText) Encode

func (i *InputBotInlineMessageText) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputBotInlineMessageText) GetEntities

func (i *InputBotInlineMessageText) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageText) GetReplyMarkup

func (i *InputBotInlineMessageText) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*InputBotInlineMessageText) SetEntities

func (i *InputBotInlineMessageText) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*InputBotInlineMessageText) SetNoWebpage

func (i *InputBotInlineMessageText) SetNoWebpage(value bool)

SetNoWebpage sets value of NoWebpage conditional field.

func (*InputBotInlineMessageText) SetReplyMarkup

func (i *InputBotInlineMessageText) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*InputBotInlineMessageText) String added in v0.12.0

func (i *InputBotInlineMessageText) String() string

String implements fmt.Stringer.

type InputBotInlineResult

type InputBotInlineResult struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// ID of result
	ID string
	// Result type (see bot API docs¹)
	//
	// Links:
	//  1) https://core.telegram.org/bots/api#inlinequeryresult
	Type string
	// Result title
	//
	// Use SetTitle and GetTitle helpers.
	Title string
	// Result description
	//
	// Use SetDescription and GetDescription helpers.
	Description string
	// URL of result
	//
	// Use SetURL and GetURL helpers.
	URL string
	// Thumbnail for result
	//
	// Use SetThumb and GetThumb helpers.
	Thumb InputWebDocument
	// Result contents
	//
	// Use SetContent and GetContent helpers.
	Content InputWebDocument
	// Message to send when the result is selected
	SendMessage InputBotInlineMessageClass
}

InputBotInlineResult represents TL type `inputBotInlineResult#88bf9319`. An inline bot result

See https://core.telegram.org/constructor/inputBotInlineResult for reference.

func (*InputBotInlineResult) Decode

func (i *InputBotInlineResult) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputBotInlineResult) Encode

func (i *InputBotInlineResult) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputBotInlineResult) GetContent

func (i *InputBotInlineResult) GetContent() (value InputWebDocument, ok bool)

GetContent returns value of Content conditional field and boolean which is true if field was set.

func (*InputBotInlineResult) GetDescription

func (i *InputBotInlineResult) GetDescription() (value string, ok bool)

GetDescription returns value of Description conditional field and boolean which is true if field was set.

func (*InputBotInlineResult) GetThumb

func (i *InputBotInlineResult) GetThumb() (value InputWebDocument, ok bool)

GetThumb returns value of Thumb conditional field and boolean which is true if field was set.

func (*InputBotInlineResult) GetTitle

func (i *InputBotInlineResult) GetTitle() (value string, ok bool)

GetTitle returns value of Title conditional field and boolean which is true if field was set.

func (*InputBotInlineResult) GetURL

func (i *InputBotInlineResult) GetURL() (value string, ok bool)

GetURL returns value of URL conditional field and boolean which is true if field was set.

func (*InputBotInlineResult) SetContent

func (i *InputBotInlineResult) SetContent(value InputWebDocument)

SetContent sets value of Content conditional field.

func (*InputBotInlineResult) SetDescription

func (i *InputBotInlineResult) SetDescription(value string)

SetDescription sets value of Description conditional field.

func (*InputBotInlineResult) SetThumb

func (i *InputBotInlineResult) SetThumb(value InputWebDocument)

SetThumb sets value of Thumb conditional field.

func (*InputBotInlineResult) SetTitle

func (i *InputBotInlineResult) SetTitle(value string)

SetTitle sets value of Title conditional field.

func (*InputBotInlineResult) SetURL

func (i *InputBotInlineResult) SetURL(value string)

SetURL sets value of URL conditional field.

func (*InputBotInlineResult) String added in v0.12.0

func (i *InputBotInlineResult) String() string

String implements fmt.Stringer.

type InputBotInlineResultBox

type InputBotInlineResultBox struct {
	InputBotInlineResult InputBotInlineResultClass
}

InputBotInlineResult boxes the InputBotInlineResultClass providing a helper.

func (*InputBotInlineResultBox) Decode

func (b *InputBotInlineResultBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputBotInlineResultBox.

func (*InputBotInlineResultBox) Encode

func (b *InputBotInlineResultBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputBotInlineResultBox.

type InputBotInlineResultClass

type InputBotInlineResultClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputBotInlineResultClass represents InputBotInlineResult generic type.

See https://core.telegram.org/type/InputBotInlineResult for reference.

Example:

g, err := DecodeInputBotInlineResult(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputBotInlineResult: // inputBotInlineResult#88bf9319
case *InputBotInlineResultPhoto: // inputBotInlineResultPhoto#a8d864a7
case *InputBotInlineResultDocument: // inputBotInlineResultDocument#fff8fdc4
case *InputBotInlineResultGame: // inputBotInlineResultGame#4fa417f2
default: panic(v)
}

func DecodeInputBotInlineResult

func DecodeInputBotInlineResult(buf *bin.Buffer) (InputBotInlineResultClass, error)

DecodeInputBotInlineResult implements binary de-serialization for InputBotInlineResultClass.

type InputBotInlineResultDocument

type InputBotInlineResultDocument struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Result ID
	ID string
	// Result type (see bot API docs¹)
	//
	// Links:
	//  1) https://core.telegram.org/bots/api#inlinequeryresult
	Type string
	// Result title
	//
	// Use SetTitle and GetTitle helpers.
	Title string
	// Result description
	//
	// Use SetDescription and GetDescription helpers.
	Description string
	// Document to send
	Document InputDocumentClass
	// Message to send when the result is selected
	SendMessage InputBotInlineMessageClass
}

InputBotInlineResultDocument represents TL type `inputBotInlineResultDocument#fff8fdc4`. Document (media of any type except for photos)

See https://core.telegram.org/constructor/inputBotInlineResultDocument for reference.

func (*InputBotInlineResultDocument) Decode

Decode implements bin.Decoder.

func (*InputBotInlineResultDocument) Encode

Encode implements bin.Encoder.

func (*InputBotInlineResultDocument) GetDescription

func (i *InputBotInlineResultDocument) GetDescription() (value string, ok bool)

GetDescription returns value of Description conditional field and boolean which is true if field was set.

func (*InputBotInlineResultDocument) GetTitle

func (i *InputBotInlineResultDocument) GetTitle() (value string, ok bool)

GetTitle returns value of Title conditional field and boolean which is true if field was set.

func (*InputBotInlineResultDocument) SetDescription

func (i *InputBotInlineResultDocument) SetDescription(value string)

SetDescription sets value of Description conditional field.

func (*InputBotInlineResultDocument) SetTitle

func (i *InputBotInlineResultDocument) SetTitle(value string)

SetTitle sets value of Title conditional field.

func (*InputBotInlineResultDocument) String added in v0.12.0

String implements fmt.Stringer.

type InputBotInlineResultGame

type InputBotInlineResultGame struct {
	// Result ID
	ID string
	// Game short name
	ShortName string
	// Message to send when the result is selected
	SendMessage InputBotInlineMessageClass
}

InputBotInlineResultGame represents TL type `inputBotInlineResultGame#4fa417f2`. Game

See https://core.telegram.org/constructor/inputBotInlineResultGame for reference.

func (*InputBotInlineResultGame) Decode

func (i *InputBotInlineResultGame) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputBotInlineResultGame) Encode

func (i *InputBotInlineResultGame) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputBotInlineResultGame) String added in v0.12.0

func (i *InputBotInlineResultGame) String() string

String implements fmt.Stringer.

type InputBotInlineResultPhoto

type InputBotInlineResultPhoto struct {
	// Result ID
	ID string
	// Result type (see bot API docs¹)
	//
	// Links:
	//  1) https://core.telegram.org/bots/api#inlinequeryresult
	Type string
	// Photo to send
	Photo InputPhotoClass
	// Message to send when the result is selected
	SendMessage InputBotInlineMessageClass
}

InputBotInlineResultPhoto represents TL type `inputBotInlineResultPhoto#a8d864a7`. Photo

See https://core.telegram.org/constructor/inputBotInlineResultPhoto for reference.

func (*InputBotInlineResultPhoto) Decode

func (i *InputBotInlineResultPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputBotInlineResultPhoto) Encode

func (i *InputBotInlineResultPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputBotInlineResultPhoto) String added in v0.12.0

func (i *InputBotInlineResultPhoto) String() string

String implements fmt.Stringer.

type InputChannel

type InputChannel struct {
	// Channel ID
	ChannelID int
	// Access hash taken from the channel¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channel
	AccessHash int64
}

InputChannel represents TL type `inputChannel#afeb712e`. Represents a channel

See https://core.telegram.org/constructor/inputChannel for reference.

func (*InputChannel) Decode

func (i *InputChannel) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputChannel) Encode

func (i *InputChannel) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputChannel) String added in v0.12.0

func (i *InputChannel) String() string

String implements fmt.Stringer.

type InputChannelBox

type InputChannelBox struct {
	InputChannel InputChannelClass
}

InputChannel boxes the InputChannelClass providing a helper.

func (*InputChannelBox) Decode

func (b *InputChannelBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputChannelBox.

func (*InputChannelBox) Encode

func (b *InputChannelBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputChannelBox.

type InputChannelClass

type InputChannelClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputChannelClass represents InputChannel generic type.

See https://core.telegram.org/type/InputChannel for reference.

Example:

g, err := DecodeInputChannel(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputChannelEmpty: // inputChannelEmpty#ee8c1e86
case *InputChannel: // inputChannel#afeb712e
case *InputChannelFromMessage: // inputChannelFromMessage#2a286531
default: panic(v)
}

func DecodeInputChannel

func DecodeInputChannel(buf *bin.Buffer) (InputChannelClass, error)

DecodeInputChannel implements binary de-serialization for InputChannelClass.

type InputChannelEmpty

type InputChannelEmpty struct {
}

InputChannelEmpty represents TL type `inputChannelEmpty#ee8c1e86`. Represents the absence of a channel

See https://core.telegram.org/constructor/inputChannelEmpty for reference.

func (*InputChannelEmpty) Decode

func (i *InputChannelEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputChannelEmpty) Encode

func (i *InputChannelEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputChannelEmpty) String added in v0.12.0

func (i *InputChannelEmpty) String() string

String implements fmt.Stringer.

type InputChannelFromMessage

type InputChannelFromMessage struct {
	// The chat where the channel was seen
	Peer InputPeerClass
	// The message ID in the chat where the channel was seen
	MsgID int
	// The channel ID
	ChannelID int
}

InputChannelFromMessage represents TL type `inputChannelFromMessage#2a286531`. Defines a min¹ channel that was seen in a certain message of a certain chat.

Links:

  1. https://core.telegram.org/api/min

See https://core.telegram.org/constructor/inputChannelFromMessage for reference.

func (*InputChannelFromMessage) Decode

func (i *InputChannelFromMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputChannelFromMessage) Encode

func (i *InputChannelFromMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputChannelFromMessage) String added in v0.12.0

func (i *InputChannelFromMessage) String() string

String implements fmt.Stringer.

type InputChatPhoto

type InputChatPhoto struct {
	// Existing photo
	ID InputPhotoClass
}

InputChatPhoto represents TL type `inputChatPhoto#8953ad37`. Existing photo to be set as a chat profile photo.

See https://core.telegram.org/constructor/inputChatPhoto for reference.

func (*InputChatPhoto) Decode

func (i *InputChatPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputChatPhoto) Encode

func (i *InputChatPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputChatPhoto) String added in v0.12.0

func (i *InputChatPhoto) String() string

String implements fmt.Stringer.

type InputChatPhotoBox

type InputChatPhotoBox struct {
	InputChatPhoto InputChatPhotoClass
}

InputChatPhoto boxes the InputChatPhotoClass providing a helper.

func (*InputChatPhotoBox) Decode

func (b *InputChatPhotoBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputChatPhotoBox.

func (*InputChatPhotoBox) Encode

func (b *InputChatPhotoBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputChatPhotoBox.

type InputChatPhotoClass

type InputChatPhotoClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputChatPhotoClass represents InputChatPhoto generic type.

See https://core.telegram.org/type/InputChatPhoto for reference.

Example:

g, err := DecodeInputChatPhoto(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputChatPhotoEmpty: // inputChatPhotoEmpty#1ca48f57
case *InputChatUploadedPhoto: // inputChatUploadedPhoto#c642724e
case *InputChatPhoto: // inputChatPhoto#8953ad37
default: panic(v)
}

func DecodeInputChatPhoto

func DecodeInputChatPhoto(buf *bin.Buffer) (InputChatPhotoClass, error)

DecodeInputChatPhoto implements binary de-serialization for InputChatPhotoClass.

type InputChatPhotoEmpty

type InputChatPhotoEmpty struct {
}

InputChatPhotoEmpty represents TL type `inputChatPhotoEmpty#1ca48f57`. Empty constructor, remove group photo.

See https://core.telegram.org/constructor/inputChatPhotoEmpty for reference.

func (*InputChatPhotoEmpty) Decode

func (i *InputChatPhotoEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputChatPhotoEmpty) Encode

func (i *InputChatPhotoEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputChatPhotoEmpty) String added in v0.12.0

func (i *InputChatPhotoEmpty) String() string

String implements fmt.Stringer.

type InputChatUploadedPhoto

type InputChatUploadedPhoto struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// File saved in parts using the method upload.saveFilePart¹
	//
	// Links:
	//  1) https://core.telegram.org/method/upload.saveFilePart
	//
	// Use SetFile and GetFile helpers.
	File InputFileClass
	// Square video for animated profile picture
	//
	// Use SetVideo and GetVideo helpers.
	Video InputFileClass
	// Timestamp that should be shown as static preview to the user (seconds)
	//
	// Use SetVideoStartTs and GetVideoStartTs helpers.
	VideoStartTs float64
}

InputChatUploadedPhoto represents TL type `inputChatUploadedPhoto#c642724e`. New photo to be set as group profile photo.

See https://core.telegram.org/constructor/inputChatUploadedPhoto for reference.

func (*InputChatUploadedPhoto) Decode

func (i *InputChatUploadedPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputChatUploadedPhoto) Encode

func (i *InputChatUploadedPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputChatUploadedPhoto) GetFile

func (i *InputChatUploadedPhoto) GetFile() (value InputFileClass, ok bool)

GetFile returns value of File conditional field and boolean which is true if field was set.

func (*InputChatUploadedPhoto) GetVideo

func (i *InputChatUploadedPhoto) GetVideo() (value InputFileClass, ok bool)

GetVideo returns value of Video conditional field and boolean which is true if field was set.

func (*InputChatUploadedPhoto) GetVideoStartTs

func (i *InputChatUploadedPhoto) GetVideoStartTs() (value float64, ok bool)

GetVideoStartTs returns value of VideoStartTs conditional field and boolean which is true if field was set.

func (*InputChatUploadedPhoto) SetFile

func (i *InputChatUploadedPhoto) SetFile(value InputFileClass)

SetFile sets value of File conditional field.

func (*InputChatUploadedPhoto) SetVideo

func (i *InputChatUploadedPhoto) SetVideo(value InputFileClass)

SetVideo sets value of Video conditional field.

func (*InputChatUploadedPhoto) SetVideoStartTs

func (i *InputChatUploadedPhoto) SetVideoStartTs(value float64)

SetVideoStartTs sets value of VideoStartTs conditional field.

func (*InputChatUploadedPhoto) String added in v0.12.0

func (i *InputChatUploadedPhoto) String() string

String implements fmt.Stringer.

type InputCheckPasswordEmpty

type InputCheckPasswordEmpty struct {
}

InputCheckPasswordEmpty represents TL type `inputCheckPasswordEmpty#9880f658`. There is no password

See https://core.telegram.org/constructor/inputCheckPasswordEmpty for reference.

func (*InputCheckPasswordEmpty) Decode

func (i *InputCheckPasswordEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputCheckPasswordEmpty) Encode

func (i *InputCheckPasswordEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputCheckPasswordEmpty) String added in v0.12.0

func (i *InputCheckPasswordEmpty) String() string

String implements fmt.Stringer.

type InputCheckPasswordSRP

type InputCheckPasswordSRP struct {
	// SRP ID¹
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	SrpID int64
	// A parameter (see SRP¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	A []byte
	// M1 parameter (see SRP¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	M1 []byte
}

InputCheckPasswordSRP represents TL type `inputCheckPasswordSRP#d27ff082`. Constructor for checking the validity of a 2FA SRP password (see SRP¹)

Links:

  1. https://core.telegram.org/api/srp

See https://core.telegram.org/constructor/inputCheckPasswordSRP for reference.

func (*InputCheckPasswordSRP) Decode

func (i *InputCheckPasswordSRP) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputCheckPasswordSRP) Encode

func (i *InputCheckPasswordSRP) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputCheckPasswordSRP) String added in v0.12.0

func (i *InputCheckPasswordSRP) String() string

String implements fmt.Stringer.

type InputCheckPasswordSRPBox

type InputCheckPasswordSRPBox struct {
	InputCheckPasswordSRP InputCheckPasswordSRPClass
}

InputCheckPasswordSRP boxes the InputCheckPasswordSRPClass providing a helper.

func (*InputCheckPasswordSRPBox) Decode

func (b *InputCheckPasswordSRPBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputCheckPasswordSRPBox.

func (*InputCheckPasswordSRPBox) Encode

func (b *InputCheckPasswordSRPBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputCheckPasswordSRPBox.

type InputCheckPasswordSRPClass

type InputCheckPasswordSRPClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputCheckPasswordSRPClass represents InputCheckPasswordSRP generic type.

See https://core.telegram.org/type/InputCheckPasswordSRP for reference.

Example:

g, err := DecodeInputCheckPasswordSRP(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputCheckPasswordEmpty: // inputCheckPasswordEmpty#9880f658
case *InputCheckPasswordSRP: // inputCheckPasswordSRP#d27ff082
default: panic(v)
}

func DecodeInputCheckPasswordSRP

func DecodeInputCheckPasswordSRP(buf *bin.Buffer) (InputCheckPasswordSRPClass, error)

DecodeInputCheckPasswordSRP implements binary de-serialization for InputCheckPasswordSRPClass.

type InputClientProxy

type InputClientProxy struct {
	// Proxy address
	Address string
	// Proxy port
	Port int
}

InputClientProxy represents TL type `inputClientProxy#75588b3f`. Info about an MTProxy¹ used to connect.

Links:

  1. https://core.telegram.org/mtproto/mtproto-transports#transport-obfuscation

See https://core.telegram.org/constructor/inputClientProxy for reference.

func (*InputClientProxy) Decode

func (i *InputClientProxy) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputClientProxy) Encode

func (i *InputClientProxy) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputClientProxy) String added in v0.12.0

func (i *InputClientProxy) String() string

String implements fmt.Stringer.

type InputDialogPeer

type InputDialogPeer struct {
	// Peer
	Peer InputPeerClass
}

InputDialogPeer represents TL type `inputDialogPeer#fcaafeb7`. A peer

See https://core.telegram.org/constructor/inputDialogPeer for reference.

func (*InputDialogPeer) Decode

func (i *InputDialogPeer) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputDialogPeer) Encode

func (i *InputDialogPeer) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputDialogPeer) String added in v0.12.0

func (i *InputDialogPeer) String() string

String implements fmt.Stringer.

type InputDialogPeerBox

type InputDialogPeerBox struct {
	InputDialogPeer InputDialogPeerClass
}

InputDialogPeer boxes the InputDialogPeerClass providing a helper.

func (*InputDialogPeerBox) Decode

func (b *InputDialogPeerBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputDialogPeerBox.

func (*InputDialogPeerBox) Encode

func (b *InputDialogPeerBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputDialogPeerBox.

type InputDialogPeerClass

type InputDialogPeerClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputDialogPeerClass represents InputDialogPeer generic type.

See https://core.telegram.org/type/InputDialogPeer for reference.

Example:

g, err := DecodeInputDialogPeer(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputDialogPeer: // inputDialogPeer#fcaafeb7
case *InputDialogPeerFolder: // inputDialogPeerFolder#64600527
default: panic(v)
}

func DecodeInputDialogPeer

func DecodeInputDialogPeer(buf *bin.Buffer) (InputDialogPeerClass, error)

DecodeInputDialogPeer implements binary de-serialization for InputDialogPeerClass.

type InputDialogPeerFolder

type InputDialogPeerFolder struct {
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	FolderID int
}

InputDialogPeerFolder represents TL type `inputDialogPeerFolder#64600527`. All peers in a peer folder¹

Links:

  1. https://core.telegram.org/api/folders#peer-folders

See https://core.telegram.org/constructor/inputDialogPeerFolder for reference.

func (*InputDialogPeerFolder) Decode

func (i *InputDialogPeerFolder) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputDialogPeerFolder) Encode

func (i *InputDialogPeerFolder) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputDialogPeerFolder) String added in v0.12.0

func (i *InputDialogPeerFolder) String() string

String implements fmt.Stringer.

type InputDocument

type InputDocument struct {
	// Document ID
	ID int64
	// access_hash parameter from the document¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/constructor/document
	AccessHash int64
	// File reference¹
	//
	// Links:
	//  1) https://core.telegram.org/api/file_reference
	FileReference []byte
}

InputDocument represents TL type `inputDocument#1abfb575`. Defines a video for subsequent interaction.

See https://core.telegram.org/constructor/inputDocument for reference.

func (*InputDocument) Decode

func (i *InputDocument) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputDocument) Encode

func (i *InputDocument) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputDocument) String added in v0.12.0

func (i *InputDocument) String() string

String implements fmt.Stringer.

type InputDocumentBox

type InputDocumentBox struct {
	InputDocument InputDocumentClass
}

InputDocument boxes the InputDocumentClass providing a helper.

func (*InputDocumentBox) Decode

func (b *InputDocumentBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputDocumentBox.

func (*InputDocumentBox) Encode

func (b *InputDocumentBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputDocumentBox.

type InputDocumentClass

type InputDocumentClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputDocumentClass represents InputDocument generic type.

See https://core.telegram.org/type/InputDocument for reference.

Example:

g, err := DecodeInputDocument(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputDocumentEmpty: // inputDocumentEmpty#72f0eaae
case *InputDocument: // inputDocument#1abfb575
default: panic(v)
}

func DecodeInputDocument

func DecodeInputDocument(buf *bin.Buffer) (InputDocumentClass, error)

DecodeInputDocument implements binary de-serialization for InputDocumentClass.

type InputDocumentEmpty

type InputDocumentEmpty struct {
}

InputDocumentEmpty represents TL type `inputDocumentEmpty#72f0eaae`. Empty constructor.

See https://core.telegram.org/constructor/inputDocumentEmpty for reference.

func (*InputDocumentEmpty) Decode

func (i *InputDocumentEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputDocumentEmpty) Encode

func (i *InputDocumentEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputDocumentEmpty) String added in v0.12.0

func (i *InputDocumentEmpty) String() string

String implements fmt.Stringer.

type InputDocumentFileLocation

type InputDocumentFileLocation struct {
	// Document ID
	ID int64
	// access_hash parameter from the document¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/constructor/document
	AccessHash int64
	// File reference¹
	//
	// Links:
	//  1) https://core.telegram.org/api/file_reference
	FileReference []byte
	// Thumbnail size to download the thumbnail
	ThumbSize string
}

InputDocumentFileLocation represents TL type `inputDocumentFileLocation#bad07584`. Document location (video, voice, audio, basically every type except photo)

See https://core.telegram.org/constructor/inputDocumentFileLocation for reference.

func (*InputDocumentFileLocation) Decode

func (i *InputDocumentFileLocation) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputDocumentFileLocation) Encode

func (i *InputDocumentFileLocation) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputDocumentFileLocation) String added in v0.12.0

func (i *InputDocumentFileLocation) String() string

String implements fmt.Stringer.

type InputEncryptedChat

type InputEncryptedChat struct {
	// Chat ID
	ChatID int
	// Checking sum from constructor encryptedChat¹, encryptedChatWaiting² or encryptedChatRequested³
	//
	// Links:
	//  1) https://core.telegram.org/constructor/encryptedChat
	//  2) https://core.telegram.org/constructor/encryptedChatWaiting
	//  3) https://core.telegram.org/constructor/encryptedChatRequested
	AccessHash int64
}

InputEncryptedChat represents TL type `inputEncryptedChat#f141b5e1`. Creates an encrypted chat.

See https://core.telegram.org/constructor/inputEncryptedChat for reference.

func (*InputEncryptedChat) Decode

func (i *InputEncryptedChat) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputEncryptedChat) Encode

func (i *InputEncryptedChat) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputEncryptedChat) String added in v0.12.0

func (i *InputEncryptedChat) String() string

String implements fmt.Stringer.

type InputEncryptedFile

type InputEncryptedFile struct {
	// File ID, value of id parameter from encryptedFile¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/encryptedFile
	ID int64
	// Checking sum, value of access_hash parameter from encryptedFile¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/encryptedFile
	AccessHash int64
}

InputEncryptedFile represents TL type `inputEncryptedFile#5a17b5e5`. Sets forwarded encrypted file for attachment.

See https://core.telegram.org/constructor/inputEncryptedFile for reference.

func (*InputEncryptedFile) Decode

func (i *InputEncryptedFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputEncryptedFile) Encode

func (i *InputEncryptedFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputEncryptedFile) String added in v0.12.0

func (i *InputEncryptedFile) String() string

String implements fmt.Stringer.

type InputEncryptedFileBigUploaded

type InputEncryptedFileBigUploaded struct {
	// Random file id, created by the client
	ID int64
	// Number of saved parts
	Parts int
	// 32-bit imprint of the key used to encrypt the file
	KeyFingerprint int
}

InputEncryptedFileBigUploaded represents TL type `inputEncryptedFileBigUploaded#2dc173c8`. Assigns a new big encrypted file (over 10Mb in size), saved in parts using the method upload.saveBigFilePart¹.

Links:

  1. https://core.telegram.org/method/upload.saveBigFilePart

See https://core.telegram.org/constructor/inputEncryptedFileBigUploaded for reference.

func (*InputEncryptedFileBigUploaded) Decode

Decode implements bin.Decoder.

func (*InputEncryptedFileBigUploaded) Encode

Encode implements bin.Encoder.

func (*InputEncryptedFileBigUploaded) String added in v0.12.0

String implements fmt.Stringer.

type InputEncryptedFileBox

type InputEncryptedFileBox struct {
	InputEncryptedFile InputEncryptedFileClass
}

InputEncryptedFile boxes the InputEncryptedFileClass providing a helper.

func (*InputEncryptedFileBox) Decode

func (b *InputEncryptedFileBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputEncryptedFileBox.

func (*InputEncryptedFileBox) Encode

func (b *InputEncryptedFileBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputEncryptedFileBox.

type InputEncryptedFileClass

type InputEncryptedFileClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputEncryptedFileClass represents InputEncryptedFile generic type.

See https://core.telegram.org/type/InputEncryptedFile for reference.

Example:

g, err := DecodeInputEncryptedFile(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputEncryptedFileEmpty: // inputEncryptedFileEmpty#1837c364
case *InputEncryptedFileUploaded: // inputEncryptedFileUploaded#64bd0306
case *InputEncryptedFile: // inputEncryptedFile#5a17b5e5
case *InputEncryptedFileBigUploaded: // inputEncryptedFileBigUploaded#2dc173c8
default: panic(v)
}

func DecodeInputEncryptedFile

func DecodeInputEncryptedFile(buf *bin.Buffer) (InputEncryptedFileClass, error)

DecodeInputEncryptedFile implements binary de-serialization for InputEncryptedFileClass.

type InputEncryptedFileEmpty

type InputEncryptedFileEmpty struct {
}

InputEncryptedFileEmpty represents TL type `inputEncryptedFileEmpty#1837c364`. Empty constructor.

See https://core.telegram.org/constructor/inputEncryptedFileEmpty for reference.

func (*InputEncryptedFileEmpty) Decode

func (i *InputEncryptedFileEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputEncryptedFileEmpty) Encode

func (i *InputEncryptedFileEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputEncryptedFileEmpty) String added in v0.12.0

func (i *InputEncryptedFileEmpty) String() string

String implements fmt.Stringer.

type InputEncryptedFileLocation

type InputEncryptedFileLocation struct {
	// File ID, id parameter value from encryptedFile¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/encryptedFile
	ID int64
	// Checksum, access_hash parameter value from encryptedFile¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/encryptedFile
	AccessHash int64
}

InputEncryptedFileLocation represents TL type `inputEncryptedFileLocation#f5235d55`. Location of encrypted secret chat file.

See https://core.telegram.org/constructor/inputEncryptedFileLocation for reference.

func (*InputEncryptedFileLocation) Decode

Decode implements bin.Decoder.

func (*InputEncryptedFileLocation) Encode

Encode implements bin.Encoder.

func (*InputEncryptedFileLocation) String added in v0.12.0

func (i *InputEncryptedFileLocation) String() string

String implements fmt.Stringer.

type InputEncryptedFileUploaded

type InputEncryptedFileUploaded struct {
	// Random file ID created by clien
	ID int64
	// Number of saved parts
	Parts int
	// In case md5-HASH¹ of the (already encrypted) file was transmitted, file content will be checked prior to use
	//
	// Links:
	//  1) https://en.wikipedia.org/wiki/MD5
	Md5Checksum string
	// 32-bit fingerprint of the key used to encrypt a file
	KeyFingerprint int
}

InputEncryptedFileUploaded represents TL type `inputEncryptedFileUploaded#64bd0306`. Sets new encrypted file saved by parts using upload.saveFilePart method.

See https://core.telegram.org/constructor/inputEncryptedFileUploaded for reference.

func (*InputEncryptedFileUploaded) Decode

Decode implements bin.Decoder.

func (*InputEncryptedFileUploaded) Encode

Encode implements bin.Encoder.

func (*InputEncryptedFileUploaded) String added in v0.12.0

func (i *InputEncryptedFileUploaded) String() string

String implements fmt.Stringer.

type InputFile

type InputFile struct {
	// Random file identifier created by the client
	ID int64
	// Number of parts saved
	Parts int
	// Full name of the file
	Name string
	// In case the file's md5-hash¹ was passed, contents of the file will be checked prior to use
	//
	// Links:
	//  1) https://en.wikipedia.org/wiki/MD5#MD5_hashes
	Md5Checksum string
}

InputFile represents TL type `inputFile#f52ff27f`. Defines a file saved in parts using the method upload.saveFilePart¹.

Links:

  1. https://core.telegram.org/method/upload.saveFilePart

See https://core.telegram.org/constructor/inputFile for reference.

func (*InputFile) Decode

func (i *InputFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputFile) Encode

func (i *InputFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputFile) String added in v0.12.0

func (i *InputFile) String() string

String implements fmt.Stringer.

type InputFileBig

type InputFileBig struct {
	// Random file id, created by the client
	ID int64
	// Number of parts saved
	Parts int
	// Full file name
	Name string
}

InputFileBig represents TL type `inputFileBig#fa4f0bb5`. Assigns a big file (over 10Mb in size), saved in part using the method upload.saveBigFilePart¹.

Links:

  1. https://core.telegram.org/method/upload.saveBigFilePart

See https://core.telegram.org/constructor/inputFileBig for reference.

func (*InputFileBig) Decode

func (i *InputFileBig) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputFileBig) Encode

func (i *InputFileBig) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputFileBig) String added in v0.12.0

func (i *InputFileBig) String() string

String implements fmt.Stringer.

type InputFileBox

type InputFileBox struct {
	InputFile InputFileClass
}

InputFile boxes the InputFileClass providing a helper.

func (*InputFileBox) Decode

func (b *InputFileBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputFileBox.

func (*InputFileBox) Encode

func (b *InputFileBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputFileBox.

type InputFileClass

type InputFileClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputFileClass represents InputFile generic type.

See https://core.telegram.org/type/InputFile for reference.

Example:

g, err := DecodeInputFile(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputFile: // inputFile#f52ff27f
case *InputFileBig: // inputFileBig#fa4f0bb5
default: panic(v)
}

func DecodeInputFile

func DecodeInputFile(buf *bin.Buffer) (InputFileClass, error)

DecodeInputFile implements binary de-serialization for InputFileClass.

type InputFileLocation

type InputFileLocation struct {
	// Server volume
	VolumeID int64
	// File identifier
	LocalID int
	// Check sum to access the file
	Secret int64
	// File reference¹
	//
	// Links:
	//  1) https://core.telegram.org/api/file_reference
	FileReference []byte
}

InputFileLocation represents TL type `inputFileLocation#dfdaabe1`. DEPRECATED location of a photo

See https://core.telegram.org/constructor/inputFileLocation for reference.

func (*InputFileLocation) Decode

func (i *InputFileLocation) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputFileLocation) Encode

func (i *InputFileLocation) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputFileLocation) String added in v0.12.0

func (i *InputFileLocation) String() string

String implements fmt.Stringer.

type InputFileLocationBox

type InputFileLocationBox struct {
	InputFileLocation InputFileLocationClass
}

InputFileLocation boxes the InputFileLocationClass providing a helper.

func (*InputFileLocationBox) Decode

func (b *InputFileLocationBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputFileLocationBox.

func (*InputFileLocationBox) Encode

func (b *InputFileLocationBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputFileLocationBox.

type InputFileLocationClass

type InputFileLocationClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputFileLocationClass represents InputFileLocation generic type.

See https://core.telegram.org/type/InputFileLocation for reference.

Example:

g, err := DecodeInputFileLocation(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputFileLocation: // inputFileLocation#dfdaabe1
case *InputEncryptedFileLocation: // inputEncryptedFileLocation#f5235d55
case *InputDocumentFileLocation: // inputDocumentFileLocation#bad07584
case *InputSecureFileLocation: // inputSecureFileLocation#cbc7ee28
case *InputTakeoutFileLocation: // inputTakeoutFileLocation#29be5899
case *InputPhotoFileLocation: // inputPhotoFileLocation#40181ffe
case *InputPhotoLegacyFileLocation: // inputPhotoLegacyFileLocation#d83466f3
case *InputPeerPhotoFileLocation: // inputPeerPhotoFileLocation#27d69997
case *InputStickerSetThumb: // inputStickerSetThumb#dbaeae9
default: panic(v)
}

func DecodeInputFileLocation

func DecodeInputFileLocation(buf *bin.Buffer) (InputFileLocationClass, error)

DecodeInputFileLocation implements binary de-serialization for InputFileLocationClass.

type InputFolderPeer

type InputFolderPeer struct {
	// Peer
	Peer InputPeerClass
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	FolderID int
}

InputFolderPeer represents TL type `inputFolderPeer#fbd2c296`. Peer in a folder

See https://core.telegram.org/constructor/inputFolderPeer for reference.

func (*InputFolderPeer) Decode

func (i *InputFolderPeer) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputFolderPeer) Encode

func (i *InputFolderPeer) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputFolderPeer) String added in v0.12.0

func (i *InputFolderPeer) String() string

String implements fmt.Stringer.

type InputGameBox

type InputGameBox struct {
	InputGame InputGameClass
}

InputGame boxes the InputGameClass providing a helper.

func (*InputGameBox) Decode

func (b *InputGameBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputGameBox.

func (*InputGameBox) Encode

func (b *InputGameBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputGameBox.

type InputGameClass

type InputGameClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputGameClass represents InputGame generic type.

See https://core.telegram.org/type/InputGame for reference.

Example:

g, err := DecodeInputGame(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputGameID: // inputGameID#32c3e77
case *InputGameShortName: // inputGameShortName#c331e80a
default: panic(v)
}

func DecodeInputGame

func DecodeInputGame(buf *bin.Buffer) (InputGameClass, error)

DecodeInputGame implements binary de-serialization for InputGameClass.

type InputGameID

type InputGameID struct {
	// game ID from Game¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/type/Game
	ID int64
	// access hash from Game¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/type/Game
	AccessHash int64
}

InputGameID represents TL type `inputGameID#32c3e77`. Indicates an already sent game

See https://core.telegram.org/constructor/inputGameID for reference.

func (*InputGameID) Decode

func (i *InputGameID) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputGameID) Encode

func (i *InputGameID) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputGameID) String added in v0.12.0

func (i *InputGameID) String() string

String implements fmt.Stringer.

type InputGameShortName

type InputGameShortName struct {
	// The bot that provides the game
	BotID InputUserClass
	// The game's short name
	ShortName string
}

InputGameShortName represents TL type `inputGameShortName#c331e80a`. Game by short name

See https://core.telegram.org/constructor/inputGameShortName for reference.

func (*InputGameShortName) Decode

func (i *InputGameShortName) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputGameShortName) Encode

func (i *InputGameShortName) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputGameShortName) String added in v0.12.0

func (i *InputGameShortName) String() string

String implements fmt.Stringer.

type InputGeoPoint

type InputGeoPoint struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Latitide
	Lat float64
	// Longtitude
	Long float64
	// The estimated horizontal accuracy of the location, in meters; as defined by the sender.
	//
	// Use SetAccuracyRadius and GetAccuracyRadius helpers.
	AccuracyRadius int
}

InputGeoPoint represents TL type `inputGeoPoint#48222faf`. Defines a GeoPoint by its coordinates.

See https://core.telegram.org/constructor/inputGeoPoint for reference.

func (*InputGeoPoint) Decode

func (i *InputGeoPoint) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputGeoPoint) Encode

func (i *InputGeoPoint) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputGeoPoint) GetAccuracyRadius

func (i *InputGeoPoint) GetAccuracyRadius() (value int, ok bool)

GetAccuracyRadius returns value of AccuracyRadius conditional field and boolean which is true if field was set.

func (*InputGeoPoint) SetAccuracyRadius

func (i *InputGeoPoint) SetAccuracyRadius(value int)

SetAccuracyRadius sets value of AccuracyRadius conditional field.

func (*InputGeoPoint) String added in v0.12.0

func (i *InputGeoPoint) String() string

String implements fmt.Stringer.

type InputGeoPointBox

type InputGeoPointBox struct {
	InputGeoPoint InputGeoPointClass
}

InputGeoPoint boxes the InputGeoPointClass providing a helper.

func (*InputGeoPointBox) Decode

func (b *InputGeoPointBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputGeoPointBox.

func (*InputGeoPointBox) Encode

func (b *InputGeoPointBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputGeoPointBox.

type InputGeoPointClass

type InputGeoPointClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputGeoPointClass represents InputGeoPoint generic type.

See https://core.telegram.org/type/InputGeoPoint for reference.

Example:

g, err := DecodeInputGeoPoint(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputGeoPointEmpty: // inputGeoPointEmpty#e4c123d6
case *InputGeoPoint: // inputGeoPoint#48222faf
default: panic(v)
}

func DecodeInputGeoPoint

func DecodeInputGeoPoint(buf *bin.Buffer) (InputGeoPointClass, error)

DecodeInputGeoPoint implements binary de-serialization for InputGeoPointClass.

type InputGeoPointEmpty

type InputGeoPointEmpty struct {
}

InputGeoPointEmpty represents TL type `inputGeoPointEmpty#e4c123d6`. Empty GeoPoint constructor.

See https://core.telegram.org/constructor/inputGeoPointEmpty for reference.

func (*InputGeoPointEmpty) Decode

func (i *InputGeoPointEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputGeoPointEmpty) Encode

func (i *InputGeoPointEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputGeoPointEmpty) String added in v0.12.0

func (i *InputGeoPointEmpty) String() string

String implements fmt.Stringer.

type InputGroupCall added in v0.13.0

type InputGroupCall struct {
	// ID field of InputGroupCall.
	ID int64
	// AccessHash field of InputGroupCall.
	AccessHash int64
}

InputGroupCall represents TL type `inputGroupCall#d8aa840f`.

See https://core.telegram.org/constructor/inputGroupCall for reference.

func (*InputGroupCall) Decode added in v0.13.0

func (i *InputGroupCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputGroupCall) Encode added in v0.13.0

func (i *InputGroupCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputGroupCall) String added in v0.13.0

func (i *InputGroupCall) String() string

String implements fmt.Stringer.

type InputKeyboardButtonUrlAuth

type InputKeyboardButtonUrlAuth struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Set this flag to request the permission for your bot to send messages to the user.
	RequestWriteAccess bool
	// Button text
	Text string
	// New text of the button in forwarded messages.
	//
	// Use SetFwdText and GetFwdText helpers.
	FwdText string
	// An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data¹.NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization².
	//
	// Links:
	//  1) https://core.telegram.org/widgets/login#receiving-authorization-data
	//  2) https://core.telegram.org/widgets/login#checking-authorization
	URL string
	// Username of a bot, which will be used for user authorization. See Setting up a bot¹ for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot² for more details.
	//
	// Links:
	//  1) https://core.telegram.org/widgets/login#setting-up-a-bot
	//  2) https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot
	Bot InputUserClass
}

InputKeyboardButtonUrlAuth represents TL type `inputKeyboardButtonUrlAuth#d02e7fd4`. Button to request a user to authorize¹ via URL using Seamless Telegram Login².

Links:

  1. https://core.telegram.org/method/messages.acceptUrlAuth
  2. https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots

See https://core.telegram.org/constructor/inputKeyboardButtonUrlAuth for reference.

func (*InputKeyboardButtonUrlAuth) Decode

Decode implements bin.Decoder.

func (*InputKeyboardButtonUrlAuth) Encode

Encode implements bin.Encoder.

func (*InputKeyboardButtonUrlAuth) GetFwdText

func (i *InputKeyboardButtonUrlAuth) GetFwdText() (value string, ok bool)

GetFwdText returns value of FwdText conditional field and boolean which is true if field was set.

func (*InputKeyboardButtonUrlAuth) SetFwdText

func (i *InputKeyboardButtonUrlAuth) SetFwdText(value string)

SetFwdText sets value of FwdText conditional field.

func (*InputKeyboardButtonUrlAuth) SetRequestWriteAccess

func (i *InputKeyboardButtonUrlAuth) SetRequestWriteAccess(value bool)

SetRequestWriteAccess sets value of RequestWriteAccess conditional field.

func (*InputKeyboardButtonUrlAuth) String added in v0.12.0

func (i *InputKeyboardButtonUrlAuth) String() string

String implements fmt.Stringer.

type InputMediaBox

type InputMediaBox struct {
	InputMedia InputMediaClass
}

InputMedia boxes the InputMediaClass providing a helper.

func (*InputMediaBox) Decode

func (b *InputMediaBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputMediaBox.

func (*InputMediaBox) Encode

func (b *InputMediaBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputMediaBox.

type InputMediaClass

type InputMediaClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputMediaClass represents InputMedia generic type.

See https://core.telegram.org/type/InputMedia for reference.

Example:

g, err := DecodeInputMedia(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputMediaEmpty: // inputMediaEmpty#9664f57f
case *InputMediaUploadedPhoto: // inputMediaUploadedPhoto#1e287d04
case *InputMediaPhoto: // inputMediaPhoto#b3ba0635
case *InputMediaGeoPoint: // inputMediaGeoPoint#f9c44144
case *InputMediaContact: // inputMediaContact#f8ab7dfb
case *InputMediaUploadedDocument: // inputMediaUploadedDocument#5b38c6c1
case *InputMediaDocument: // inputMediaDocument#33473058
case *InputMediaVenue: // inputMediaVenue#c13d1c11
case *InputMediaPhotoExternal: // inputMediaPhotoExternal#e5bbfe1a
case *InputMediaDocumentExternal: // inputMediaDocumentExternal#fb52dc99
case *InputMediaGame: // inputMediaGame#d33f43f3
case *InputMediaInvoice: // inputMediaInvoice#f4e096c3
case *InputMediaGeoLive: // inputMediaGeoLive#971fa843
case *InputMediaPoll: // inputMediaPoll#f94e5f1
case *InputMediaDice: // inputMediaDice#e66fbf7b
default: panic(v)
}

func DecodeInputMedia

func DecodeInputMedia(buf *bin.Buffer) (InputMediaClass, error)

DecodeInputMedia implements binary de-serialization for InputMediaClass.

type InputMediaContact

type InputMediaContact struct {
	// Phone number
	PhoneNumber string
	// Contact's first name
	FirstName string
	// Contact's last name
	LastName string
	// Contact vcard
	Vcard string
}

InputMediaContact represents TL type `inputMediaContact#f8ab7dfb`. Phonebook contact

See https://core.telegram.org/constructor/inputMediaContact for reference.

func (*InputMediaContact) Decode

func (i *InputMediaContact) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaContact) Encode

func (i *InputMediaContact) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaContact) String added in v0.12.0

func (i *InputMediaContact) String() string

String implements fmt.Stringer.

type InputMediaDice

type InputMediaDice struct {
	// The emoji, for now ,  and  are supported
	Emoticon string
}

InputMediaDice represents TL type `inputMediaDice#e66fbf7b`. Send a dice-based animated sticker¹

Links:

  1. https://core.telegram.org/api/dice

See https://core.telegram.org/constructor/inputMediaDice for reference.

func (*InputMediaDice) Decode

func (i *InputMediaDice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaDice) Encode

func (i *InputMediaDice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaDice) String added in v0.12.0

func (i *InputMediaDice) String() string

String implements fmt.Stringer.

type InputMediaDocument

type InputMediaDocument struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The document to be forwarded.
	ID InputDocumentClass
	// Time to live of self-destructing document
	//
	// Use SetTTLSeconds and GetTTLSeconds helpers.
	TTLSeconds int
	// Query field of InputMediaDocument.
	//
	// Use SetQuery and GetQuery helpers.
	Query string
}

InputMediaDocument represents TL type `inputMediaDocument#33473058`. Forwarded document

See https://core.telegram.org/constructor/inputMediaDocument for reference.

func (*InputMediaDocument) Decode

func (i *InputMediaDocument) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaDocument) Encode

func (i *InputMediaDocument) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaDocument) GetQuery added in v0.13.0

func (i *InputMediaDocument) GetQuery() (value string, ok bool)

GetQuery returns value of Query conditional field and boolean which is true if field was set.

func (*InputMediaDocument) GetTTLSeconds

func (i *InputMediaDocument) GetTTLSeconds() (value int, ok bool)

GetTTLSeconds returns value of TTLSeconds conditional field and boolean which is true if field was set.

func (*InputMediaDocument) SetQuery added in v0.13.0

func (i *InputMediaDocument) SetQuery(value string)

SetQuery sets value of Query conditional field.

func (*InputMediaDocument) SetTTLSeconds

func (i *InputMediaDocument) SetTTLSeconds(value int)

SetTTLSeconds sets value of TTLSeconds conditional field.

func (*InputMediaDocument) String added in v0.12.0

func (i *InputMediaDocument) String() string

String implements fmt.Stringer.

type InputMediaDocumentExternal

type InputMediaDocumentExternal struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// URL of the document
	URL string
	// Self-destruct time to live of document
	//
	// Use SetTTLSeconds and GetTTLSeconds helpers.
	TTLSeconds int
}

InputMediaDocumentExternal represents TL type `inputMediaDocumentExternal#fb52dc99`. Document that will be downloaded by the telegram servers

See https://core.telegram.org/constructor/inputMediaDocumentExternal for reference.

func (*InputMediaDocumentExternal) Decode

Decode implements bin.Decoder.

func (*InputMediaDocumentExternal) Encode

Encode implements bin.Encoder.

func (*InputMediaDocumentExternal) GetTTLSeconds

func (i *InputMediaDocumentExternal) GetTTLSeconds() (value int, ok bool)

GetTTLSeconds returns value of TTLSeconds conditional field and boolean which is true if field was set.

func (*InputMediaDocumentExternal) SetTTLSeconds

func (i *InputMediaDocumentExternal) SetTTLSeconds(value int)

SetTTLSeconds sets value of TTLSeconds conditional field.

func (*InputMediaDocumentExternal) String added in v0.12.0

func (i *InputMediaDocumentExternal) String() string

String implements fmt.Stringer.

type InputMediaEmpty

type InputMediaEmpty struct {
}

InputMediaEmpty represents TL type `inputMediaEmpty#9664f57f`. Empty media content of a message.

See https://core.telegram.org/constructor/inputMediaEmpty for reference.

func (*InputMediaEmpty) Decode

func (i *InputMediaEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaEmpty) Encode

func (i *InputMediaEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaEmpty) String added in v0.12.0

func (i *InputMediaEmpty) String() string

String implements fmt.Stringer.

type InputMediaGame

type InputMediaGame struct {
	// The game to forward
	ID InputGameClass
}

InputMediaGame represents TL type `inputMediaGame#d33f43f3`. A game

See https://core.telegram.org/constructor/inputMediaGame for reference.

func (*InputMediaGame) Decode

func (i *InputMediaGame) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaGame) Encode

func (i *InputMediaGame) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaGame) String added in v0.12.0

func (i *InputMediaGame) String() string

String implements fmt.Stringer.

type InputMediaGeoLive

type InputMediaGeoLive struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether sending of the geolocation was stopped
	Stopped bool
	// Current geolocation
	GeoPoint InputGeoPointClass
	// For live locations¹, a direction in which the location moves, in degrees; 1-360.
	//
	// Links:
	//  1) https://core.telegram.org/api/live-location
	//
	// Use SetHeading and GetHeading helpers.
	Heading int
	// Validity period of the current location
	//
	// Use SetPeriod and GetPeriod helpers.
	Period int
	// For live locations¹, a maximum distance to another chat member for proximity alerts, in meters (0-100000)
	//
	// Links:
	//  1) https://core.telegram.org/api/live-location
	//
	// Use SetProximityNotificationRadius and GetProximityNotificationRadius helpers.
	ProximityNotificationRadius int
}

InputMediaGeoLive represents TL type `inputMediaGeoLive#971fa843`. Live geolocation¹

Links:

  1. https://core.telegram.org/api/live-location

See https://core.telegram.org/constructor/inputMediaGeoLive for reference.

func (*InputMediaGeoLive) Decode

func (i *InputMediaGeoLive) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaGeoLive) Encode

func (i *InputMediaGeoLive) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaGeoLive) GetHeading

func (i *InputMediaGeoLive) GetHeading() (value int, ok bool)

GetHeading returns value of Heading conditional field and boolean which is true if field was set.

func (*InputMediaGeoLive) GetPeriod

func (i *InputMediaGeoLive) GetPeriod() (value int, ok bool)

GetPeriod returns value of Period conditional field and boolean which is true if field was set.

func (*InputMediaGeoLive) GetProximityNotificationRadius

func (i *InputMediaGeoLive) GetProximityNotificationRadius() (value int, ok bool)

GetProximityNotificationRadius returns value of ProximityNotificationRadius conditional field and boolean which is true if field was set.

func (*InputMediaGeoLive) SetHeading

func (i *InputMediaGeoLive) SetHeading(value int)

SetHeading sets value of Heading conditional field.

func (*InputMediaGeoLive) SetPeriod

func (i *InputMediaGeoLive) SetPeriod(value int)

SetPeriod sets value of Period conditional field.

func (*InputMediaGeoLive) SetProximityNotificationRadius

func (i *InputMediaGeoLive) SetProximityNotificationRadius(value int)

SetProximityNotificationRadius sets value of ProximityNotificationRadius conditional field.

func (*InputMediaGeoLive) SetStopped

func (i *InputMediaGeoLive) SetStopped(value bool)

SetStopped sets value of Stopped conditional field.

func (*InputMediaGeoLive) String added in v0.12.0

func (i *InputMediaGeoLive) String() string

String implements fmt.Stringer.

type InputMediaGeoPoint

type InputMediaGeoPoint struct {
	// GeoPoint
	GeoPoint InputGeoPointClass
}

InputMediaGeoPoint represents TL type `inputMediaGeoPoint#f9c44144`. Map.

See https://core.telegram.org/constructor/inputMediaGeoPoint for reference.

func (*InputMediaGeoPoint) Decode

func (i *InputMediaGeoPoint) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaGeoPoint) Encode

func (i *InputMediaGeoPoint) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaGeoPoint) String added in v0.12.0

func (i *InputMediaGeoPoint) String() string

String implements fmt.Stringer.

type InputMediaInvoice

type InputMediaInvoice struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Product name, 1-32 characters
	Title string
	// Product description, 1-255 characters
	Description string
	// URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.
	//
	// Use SetPhoto and GetPhoto helpers.
	Photo InputWebDocument
	// The actual invoice
	Invoice Invoice
	// Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
	Payload []byte
	// Payments provider token, obtained via Botfather¹
	//
	// Links:
	//  1) https://t.me/botfather
	Provider string
	// JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
	ProviderData DataJSON
	// Start parameter
	StartParam string
}

InputMediaInvoice represents TL type `inputMediaInvoice#f4e096c3`. Generated invoice of a bot payment¹

Links:

  1. https://core.telegram.org/bots/payments

See https://core.telegram.org/constructor/inputMediaInvoice for reference.

func (*InputMediaInvoice) Decode

func (i *InputMediaInvoice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaInvoice) Encode

func (i *InputMediaInvoice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaInvoice) GetPhoto

func (i *InputMediaInvoice) GetPhoto() (value InputWebDocument, ok bool)

GetPhoto returns value of Photo conditional field and boolean which is true if field was set.

func (*InputMediaInvoice) SetPhoto

func (i *InputMediaInvoice) SetPhoto(value InputWebDocument)

SetPhoto sets value of Photo conditional field.

func (*InputMediaInvoice) String added in v0.12.0

func (i *InputMediaInvoice) String() string

String implements fmt.Stringer.

type InputMediaPhoto

type InputMediaPhoto struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Photo to be forwarded
	ID InputPhotoClass
	// Time to live in seconds of self-destructing photo
	//
	// Use SetTTLSeconds and GetTTLSeconds helpers.
	TTLSeconds int
}

InputMediaPhoto represents TL type `inputMediaPhoto#b3ba0635`. Forwarded photo

See https://core.telegram.org/constructor/inputMediaPhoto for reference.

func (*InputMediaPhoto) Decode

func (i *InputMediaPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaPhoto) Encode

func (i *InputMediaPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaPhoto) GetTTLSeconds

func (i *InputMediaPhoto) GetTTLSeconds() (value int, ok bool)

GetTTLSeconds returns value of TTLSeconds conditional field and boolean which is true if field was set.

func (*InputMediaPhoto) SetTTLSeconds

func (i *InputMediaPhoto) SetTTLSeconds(value int)

SetTTLSeconds sets value of TTLSeconds conditional field.

func (*InputMediaPhoto) String added in v0.12.0

func (i *InputMediaPhoto) String() string

String implements fmt.Stringer.

type InputMediaPhotoExternal

type InputMediaPhotoExternal struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// URL of the photo
	URL string
	// Self-destruct time to live of photo
	//
	// Use SetTTLSeconds and GetTTLSeconds helpers.
	TTLSeconds int
}

InputMediaPhotoExternal represents TL type `inputMediaPhotoExternal#e5bbfe1a`. New photo that will be uploaded by the server using the specified URL

See https://core.telegram.org/constructor/inputMediaPhotoExternal for reference.

func (*InputMediaPhotoExternal) Decode

func (i *InputMediaPhotoExternal) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaPhotoExternal) Encode

func (i *InputMediaPhotoExternal) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaPhotoExternal) GetTTLSeconds

func (i *InputMediaPhotoExternal) GetTTLSeconds() (value int, ok bool)

GetTTLSeconds returns value of TTLSeconds conditional field and boolean which is true if field was set.

func (*InputMediaPhotoExternal) SetTTLSeconds

func (i *InputMediaPhotoExternal) SetTTLSeconds(value int)

SetTTLSeconds sets value of TTLSeconds conditional field.

func (*InputMediaPhotoExternal) String added in v0.12.0

func (i *InputMediaPhotoExternal) String() string

String implements fmt.Stringer.

type InputMediaPoll

type InputMediaPoll struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The poll to send
	Poll Poll
	// Correct answer IDs (for quiz polls)
	//
	// Use SetCorrectAnswers and GetCorrectAnswers helpers.
	CorrectAnswers [][]byte
	// Explanation of quiz solution
	//
	// Use SetSolution and GetSolution helpers.
	Solution string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetSolutionEntities and GetSolutionEntities helpers.
	SolutionEntities []MessageEntityClass
}

InputMediaPoll represents TL type `inputMediaPoll#f94e5f1`. A poll

See https://core.telegram.org/constructor/inputMediaPoll for reference.

func (*InputMediaPoll) Decode

func (i *InputMediaPoll) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaPoll) Encode

func (i *InputMediaPoll) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaPoll) GetCorrectAnswers

func (i *InputMediaPoll) GetCorrectAnswers() (value [][]byte, ok bool)

GetCorrectAnswers returns value of CorrectAnswers conditional field and boolean which is true if field was set.

func (*InputMediaPoll) GetSolution

func (i *InputMediaPoll) GetSolution() (value string, ok bool)

GetSolution returns value of Solution conditional field and boolean which is true if field was set.

func (*InputMediaPoll) GetSolutionEntities

func (i *InputMediaPoll) GetSolutionEntities() (value []MessageEntityClass, ok bool)

GetSolutionEntities returns value of SolutionEntities conditional field and boolean which is true if field was set.

func (*InputMediaPoll) SetCorrectAnswers

func (i *InputMediaPoll) SetCorrectAnswers(value [][]byte)

SetCorrectAnswers sets value of CorrectAnswers conditional field.

func (*InputMediaPoll) SetSolution

func (i *InputMediaPoll) SetSolution(value string)

SetSolution sets value of Solution conditional field.

func (*InputMediaPoll) SetSolutionEntities

func (i *InputMediaPoll) SetSolutionEntities(value []MessageEntityClass)

SetSolutionEntities sets value of SolutionEntities conditional field.

func (*InputMediaPoll) String added in v0.12.0

func (i *InputMediaPoll) String() string

String implements fmt.Stringer.

type InputMediaUploadedDocument

type InputMediaUploadedDocument struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example)
	NosoundVideo bool
	// Force the media file to be uploaded as document
	ForceFile bool
	// The uploaded file¹
	//
	// Links:
	//  1) https://core.telegram.org/api/files
	File InputFileClass
	// Thumbnail of the document, uploaded as for the file
	//
	// Use SetThumb and GetThumb helpers.
	Thumb InputFileClass
	// MIME type of document
	MimeType string
	// Attributes that specify the type of the document (video, audio, voice, sticker, etc.)
	Attributes []DocumentAttributeClass
	// Attached stickers
	//
	// Use SetStickers and GetStickers helpers.
	Stickers []InputDocumentClass
	// Time to live in seconds of self-destructing document
	//
	// Use SetTTLSeconds and GetTTLSeconds helpers.
	TTLSeconds int
}

InputMediaUploadedDocument represents TL type `inputMediaUploadedDocument#5b38c6c1`. New document

See https://core.telegram.org/constructor/inputMediaUploadedDocument for reference.

func (*InputMediaUploadedDocument) Decode

Decode implements bin.Decoder.

func (*InputMediaUploadedDocument) Encode

Encode implements bin.Encoder.

func (*InputMediaUploadedDocument) GetStickers

func (i *InputMediaUploadedDocument) GetStickers() (value []InputDocumentClass, ok bool)

GetStickers returns value of Stickers conditional field and boolean which is true if field was set.

func (*InputMediaUploadedDocument) GetTTLSeconds

func (i *InputMediaUploadedDocument) GetTTLSeconds() (value int, ok bool)

GetTTLSeconds returns value of TTLSeconds conditional field and boolean which is true if field was set.

func (*InputMediaUploadedDocument) GetThumb

func (i *InputMediaUploadedDocument) GetThumb() (value InputFileClass, ok bool)

GetThumb returns value of Thumb conditional field and boolean which is true if field was set.

func (*InputMediaUploadedDocument) SetForceFile

func (i *InputMediaUploadedDocument) SetForceFile(value bool)

SetForceFile sets value of ForceFile conditional field.

func (*InputMediaUploadedDocument) SetNosoundVideo

func (i *InputMediaUploadedDocument) SetNosoundVideo(value bool)

SetNosoundVideo sets value of NosoundVideo conditional field.

func (*InputMediaUploadedDocument) SetStickers

func (i *InputMediaUploadedDocument) SetStickers(value []InputDocumentClass)

SetStickers sets value of Stickers conditional field.

func (*InputMediaUploadedDocument) SetTTLSeconds

func (i *InputMediaUploadedDocument) SetTTLSeconds(value int)

SetTTLSeconds sets value of TTLSeconds conditional field.

func (*InputMediaUploadedDocument) SetThumb

func (i *InputMediaUploadedDocument) SetThumb(value InputFileClass)

SetThumb sets value of Thumb conditional field.

func (*InputMediaUploadedDocument) String added in v0.12.0

func (i *InputMediaUploadedDocument) String() string

String implements fmt.Stringer.

type InputMediaUploadedPhoto

type InputMediaUploadedPhoto struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The uploaded file¹
	//
	// Links:
	//  1) https://core.telegram.org/api/files
	File InputFileClass
	// Attached mask stickers
	//
	// Use SetStickers and GetStickers helpers.
	Stickers []InputDocumentClass
	// Time to live in seconds of self-destructing photo
	//
	// Use SetTTLSeconds and GetTTLSeconds helpers.
	TTLSeconds int
}

InputMediaUploadedPhoto represents TL type `inputMediaUploadedPhoto#1e287d04`. Photo

See https://core.telegram.org/constructor/inputMediaUploadedPhoto for reference.

func (*InputMediaUploadedPhoto) Decode

func (i *InputMediaUploadedPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaUploadedPhoto) Encode

func (i *InputMediaUploadedPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaUploadedPhoto) GetStickers

func (i *InputMediaUploadedPhoto) GetStickers() (value []InputDocumentClass, ok bool)

GetStickers returns value of Stickers conditional field and boolean which is true if field was set.

func (*InputMediaUploadedPhoto) GetTTLSeconds

func (i *InputMediaUploadedPhoto) GetTTLSeconds() (value int, ok bool)

GetTTLSeconds returns value of TTLSeconds conditional field and boolean which is true if field was set.

func (*InputMediaUploadedPhoto) SetStickers

func (i *InputMediaUploadedPhoto) SetStickers(value []InputDocumentClass)

SetStickers sets value of Stickers conditional field.

func (*InputMediaUploadedPhoto) SetTTLSeconds

func (i *InputMediaUploadedPhoto) SetTTLSeconds(value int)

SetTTLSeconds sets value of TTLSeconds conditional field.

func (*InputMediaUploadedPhoto) String added in v0.12.0

func (i *InputMediaUploadedPhoto) String() string

String implements fmt.Stringer.

type InputMediaVenue

type InputMediaVenue struct {
	// Geolocation
	GeoPoint InputGeoPointClass
	// Venue name
	Title string
	// Physical address of the venue
	Address string
	// Venue provider: currently only "foursquare" needs to be supported
	Provider string
	// Venue ID in the provider's database
	VenueID string
	// Venue type in the provider's database
	VenueType string
}

InputMediaVenue represents TL type `inputMediaVenue#c13d1c11`. Can be used to send a venue geolocation.

See https://core.telegram.org/constructor/inputMediaVenue for reference.

func (*InputMediaVenue) Decode

func (i *InputMediaVenue) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMediaVenue) Encode

func (i *InputMediaVenue) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMediaVenue) String added in v0.12.0

func (i *InputMediaVenue) String() string

String implements fmt.Stringer.

type InputMessageBox

type InputMessageBox struct {
	InputMessage InputMessageClass
}

InputMessage boxes the InputMessageClass providing a helper.

func (*InputMessageBox) Decode

func (b *InputMessageBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputMessageBox.

func (*InputMessageBox) Encode

func (b *InputMessageBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputMessageBox.

type InputMessageCallbackQuery

type InputMessageCallbackQuery struct {
	// Message ID
	ID int
	// Callback query ID
	QueryID int64
}

InputMessageCallbackQuery represents TL type `inputMessageCallbackQuery#acfa1a7e`. Used by bots for fetching information about the message that originated a callback query

See https://core.telegram.org/constructor/inputMessageCallbackQuery for reference.

func (*InputMessageCallbackQuery) Decode

func (i *InputMessageCallbackQuery) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessageCallbackQuery) Encode

func (i *InputMessageCallbackQuery) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessageCallbackQuery) String added in v0.12.0

func (i *InputMessageCallbackQuery) String() string

String implements fmt.Stringer.

type InputMessageClass

type InputMessageClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputMessageClass represents InputMessage generic type.

See https://core.telegram.org/type/InputMessage for reference.

Example:

g, err := DecodeInputMessage(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputMessageID: // inputMessageID#a676a322
case *InputMessageReplyTo: // inputMessageReplyTo#bad88395
case *InputMessagePinned: // inputMessagePinned#86872538
case *InputMessageCallbackQuery: // inputMessageCallbackQuery#acfa1a7e
default: panic(v)
}

func DecodeInputMessage

func DecodeInputMessage(buf *bin.Buffer) (InputMessageClass, error)

DecodeInputMessage implements binary de-serialization for InputMessageClass.

type InputMessageEntityMentionName

type InputMessageEntityMentionName struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
	// Identifier of the user that was mentioned
	UserID InputUserClass
}

InputMessageEntityMentionName represents TL type `inputMessageEntityMentionName#208e68c9`. Message entity that can be used to create a user user mention¹: received mentions use the messageEntityMentionName² constructor, instead.

Links:

  1. https://core.telegram.org/api/mentions
  2. https://core.telegram.org/constructor/messageEntityMentionName

See https://core.telegram.org/constructor/inputMessageEntityMentionName for reference.

func (*InputMessageEntityMentionName) Decode

Decode implements bin.Decoder.

func (*InputMessageEntityMentionName) Encode

Encode implements bin.Encoder.

func (*InputMessageEntityMentionName) String added in v0.12.0

String implements fmt.Stringer.

type InputMessageID

type InputMessageID struct {
	// Message ID
	ID int
}

InputMessageID represents TL type `inputMessageID#a676a322`. Message by ID

See https://core.telegram.org/constructor/inputMessageID for reference.

func (*InputMessageID) Decode

func (i *InputMessageID) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessageID) Encode

func (i *InputMessageID) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessageID) String added in v0.12.0

func (i *InputMessageID) String() string

String implements fmt.Stringer.

type InputMessagePinned

type InputMessagePinned struct {
}

InputMessagePinned represents TL type `inputMessagePinned#86872538`. Pinned message

See https://core.telegram.org/constructor/inputMessagePinned for reference.

func (*InputMessagePinned) Decode

func (i *InputMessagePinned) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessagePinned) Encode

func (i *InputMessagePinned) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessagePinned) String added in v0.12.0

func (i *InputMessagePinned) String() string

String implements fmt.Stringer.

type InputMessageReplyTo

type InputMessageReplyTo struct {
	// ID of the message that replies to the message we need
	ID int
}

InputMessageReplyTo represents TL type `inputMessageReplyTo#bad88395`. Message to which the specified message replies to

See https://core.telegram.org/constructor/inputMessageReplyTo for reference.

func (*InputMessageReplyTo) Decode

func (i *InputMessageReplyTo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessageReplyTo) Encode

func (i *InputMessageReplyTo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessageReplyTo) String added in v0.12.0

func (i *InputMessageReplyTo) String() string

String implements fmt.Stringer.

type InputMessagesFilterChatPhotos

type InputMessagesFilterChatPhotos struct {
}

InputMessagesFilterChatPhotos represents TL type `inputMessagesFilterChatPhotos#3a20ecb8`. Return only chat photo changes

See https://core.telegram.org/constructor/inputMessagesFilterChatPhotos for reference.

func (*InputMessagesFilterChatPhotos) Decode

Decode implements bin.Decoder.

func (*InputMessagesFilterChatPhotos) Encode

Encode implements bin.Encoder.

func (*InputMessagesFilterChatPhotos) String added in v0.12.0

String implements fmt.Stringer.

type InputMessagesFilterContacts

type InputMessagesFilterContacts struct {
}

InputMessagesFilterContacts represents TL type `inputMessagesFilterContacts#e062db83`. Return only messages containing contacts

See https://core.telegram.org/constructor/inputMessagesFilterContacts for reference.

func (*InputMessagesFilterContacts) Decode

Decode implements bin.Decoder.

func (*InputMessagesFilterContacts) Encode

Encode implements bin.Encoder.

func (*InputMessagesFilterContacts) String added in v0.12.0

func (i *InputMessagesFilterContacts) String() string

String implements fmt.Stringer.

type InputMessagesFilterDocument

type InputMessagesFilterDocument struct {
}

InputMessagesFilterDocument represents TL type `inputMessagesFilterDocument#9eddf188`. Filter for messages containing documents.

See https://core.telegram.org/constructor/inputMessagesFilterDocument for reference.

func (*InputMessagesFilterDocument) Decode

Decode implements bin.Decoder.

func (*InputMessagesFilterDocument) Encode

Encode implements bin.Encoder.

func (*InputMessagesFilterDocument) String added in v0.12.0

func (i *InputMessagesFilterDocument) String() string

String implements fmt.Stringer.

type InputMessagesFilterEmpty

type InputMessagesFilterEmpty struct {
}

InputMessagesFilterEmpty represents TL type `inputMessagesFilterEmpty#57e2f66c`. Filter is absent.

See https://core.telegram.org/constructor/inputMessagesFilterEmpty for reference.

func (*InputMessagesFilterEmpty) Decode

func (i *InputMessagesFilterEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessagesFilterEmpty) Encode

func (i *InputMessagesFilterEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessagesFilterEmpty) String added in v0.12.0

func (i *InputMessagesFilterEmpty) String() string

String implements fmt.Stringer.

type InputMessagesFilterGeo

type InputMessagesFilterGeo struct {
}

InputMessagesFilterGeo represents TL type `inputMessagesFilterGeo#e7026d0d`. Return only messages containing geolocations

See https://core.telegram.org/constructor/inputMessagesFilterGeo for reference.

func (*InputMessagesFilterGeo) Decode

func (i *InputMessagesFilterGeo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessagesFilterGeo) Encode

func (i *InputMessagesFilterGeo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessagesFilterGeo) String added in v0.12.0

func (i *InputMessagesFilterGeo) String() string

String implements fmt.Stringer.

type InputMessagesFilterGif

type InputMessagesFilterGif struct {
}

InputMessagesFilterGif represents TL type `inputMessagesFilterGif#ffc86587`. Return only messages containing gifs

See https://core.telegram.org/constructor/inputMessagesFilterGif for reference.

func (*InputMessagesFilterGif) Decode

func (i *InputMessagesFilterGif) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessagesFilterGif) Encode

func (i *InputMessagesFilterGif) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessagesFilterGif) String added in v0.12.0

func (i *InputMessagesFilterGif) String() string

String implements fmt.Stringer.

type InputMessagesFilterMusic

type InputMessagesFilterMusic struct {
}

InputMessagesFilterMusic represents TL type `inputMessagesFilterMusic#3751b49e`. Return only messages containing audio files

See https://core.telegram.org/constructor/inputMessagesFilterMusic for reference.

func (*InputMessagesFilterMusic) Decode

func (i *InputMessagesFilterMusic) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessagesFilterMusic) Encode

func (i *InputMessagesFilterMusic) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessagesFilterMusic) String added in v0.12.0

func (i *InputMessagesFilterMusic) String() string

String implements fmt.Stringer.

type InputMessagesFilterMyMentions

type InputMessagesFilterMyMentions struct {
}

InputMessagesFilterMyMentions represents TL type `inputMessagesFilterMyMentions#c1f8e69a`. Return only messages where the current user was mentioned¹.

Links:

  1. https://core.telegram.org/api/mentions

See https://core.telegram.org/constructor/inputMessagesFilterMyMentions for reference.

func (*InputMessagesFilterMyMentions) Decode

Decode implements bin.Decoder.

func (*InputMessagesFilterMyMentions) Encode

Encode implements bin.Encoder.

func (*InputMessagesFilterMyMentions) String added in v0.12.0

String implements fmt.Stringer.

type InputMessagesFilterPhoneCalls

type InputMessagesFilterPhoneCalls struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Return only missed phone calls
	Missed bool
}

InputMessagesFilterPhoneCalls represents TL type `inputMessagesFilterPhoneCalls#80c99768`. Return only phone calls

See https://core.telegram.org/constructor/inputMessagesFilterPhoneCalls for reference.

func (*InputMessagesFilterPhoneCalls) Decode

Decode implements bin.Decoder.

func (*InputMessagesFilterPhoneCalls) Encode

Encode implements bin.Encoder.

func (*InputMessagesFilterPhoneCalls) SetMissed

func (i *InputMessagesFilterPhoneCalls) SetMissed(value bool)

SetMissed sets value of Missed conditional field.

func (*InputMessagesFilterPhoneCalls) String added in v0.12.0

String implements fmt.Stringer.

type InputMessagesFilterPhotoVideo

type InputMessagesFilterPhotoVideo struct {
}

InputMessagesFilterPhotoVideo represents TL type `inputMessagesFilterPhotoVideo#56e9f0e4`. Filter for messages containing photos or videos.

See https://core.telegram.org/constructor/inputMessagesFilterPhotoVideo for reference.

func (*InputMessagesFilterPhotoVideo) Decode

Decode implements bin.Decoder.

func (*InputMessagesFilterPhotoVideo) Encode

Encode implements bin.Encoder.

func (*InputMessagesFilterPhotoVideo) String added in v0.12.0

String implements fmt.Stringer.

type InputMessagesFilterPhotos

type InputMessagesFilterPhotos struct {
}

InputMessagesFilterPhotos represents TL type `inputMessagesFilterPhotos#9609a51c`. Filter for messages containing photos.

See https://core.telegram.org/constructor/inputMessagesFilterPhotos for reference.

func (*InputMessagesFilterPhotos) Decode

func (i *InputMessagesFilterPhotos) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessagesFilterPhotos) Encode

func (i *InputMessagesFilterPhotos) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessagesFilterPhotos) String added in v0.12.0

func (i *InputMessagesFilterPhotos) String() string

String implements fmt.Stringer.

type InputMessagesFilterPinned

type InputMessagesFilterPinned struct {
}

InputMessagesFilterPinned represents TL type `inputMessagesFilterPinned#1bb00451`. Fetch only pinned messages

See https://core.telegram.org/constructor/inputMessagesFilterPinned for reference.

func (*InputMessagesFilterPinned) Decode

func (i *InputMessagesFilterPinned) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessagesFilterPinned) Encode

func (i *InputMessagesFilterPinned) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessagesFilterPinned) String added in v0.12.0

func (i *InputMessagesFilterPinned) String() string

String implements fmt.Stringer.

type InputMessagesFilterRoundVideo

type InputMessagesFilterRoundVideo struct {
}

InputMessagesFilterRoundVideo represents TL type `inputMessagesFilterRoundVideo#b549da53`. Return only round videos

See https://core.telegram.org/constructor/inputMessagesFilterRoundVideo for reference.

func (*InputMessagesFilterRoundVideo) Decode

Decode implements bin.Decoder.

func (*InputMessagesFilterRoundVideo) Encode

Encode implements bin.Encoder.

func (*InputMessagesFilterRoundVideo) String added in v0.12.0

String implements fmt.Stringer.

type InputMessagesFilterRoundVoice

type InputMessagesFilterRoundVoice struct {
}

InputMessagesFilterRoundVoice represents TL type `inputMessagesFilterRoundVoice#7a7c17a4`. Return only round videos and voice notes

See https://core.telegram.org/constructor/inputMessagesFilterRoundVoice for reference.

func (*InputMessagesFilterRoundVoice) Decode

Decode implements bin.Decoder.

func (*InputMessagesFilterRoundVoice) Encode

Encode implements bin.Encoder.

func (*InputMessagesFilterRoundVoice) String added in v0.12.0

String implements fmt.Stringer.

type InputMessagesFilterUrl

type InputMessagesFilterUrl struct {
}

InputMessagesFilterUrl represents TL type `inputMessagesFilterUrl#7ef0dd87`. Return only messages containing URLs

See https://core.telegram.org/constructor/inputMessagesFilterUrl for reference.

func (*InputMessagesFilterUrl) Decode

func (i *InputMessagesFilterUrl) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessagesFilterUrl) Encode

func (i *InputMessagesFilterUrl) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessagesFilterUrl) String added in v0.12.0

func (i *InputMessagesFilterUrl) String() string

String implements fmt.Stringer.

type InputMessagesFilterVideo

type InputMessagesFilterVideo struct {
}

InputMessagesFilterVideo represents TL type `inputMessagesFilterVideo#9fc00e65`. Filter for messages containing videos.

See https://core.telegram.org/constructor/inputMessagesFilterVideo for reference.

func (*InputMessagesFilterVideo) Decode

func (i *InputMessagesFilterVideo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessagesFilterVideo) Encode

func (i *InputMessagesFilterVideo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessagesFilterVideo) String added in v0.12.0

func (i *InputMessagesFilterVideo) String() string

String implements fmt.Stringer.

type InputMessagesFilterVoice

type InputMessagesFilterVoice struct {
}

InputMessagesFilterVoice represents TL type `inputMessagesFilterVoice#50f5c392`. Return only messages containing voice notes

See https://core.telegram.org/constructor/inputMessagesFilterVoice for reference.

func (*InputMessagesFilterVoice) Decode

func (i *InputMessagesFilterVoice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputMessagesFilterVoice) Encode

func (i *InputMessagesFilterVoice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputMessagesFilterVoice) String added in v0.12.0

func (i *InputMessagesFilterVoice) String() string

String implements fmt.Stringer.

type InputNotifyBroadcasts

type InputNotifyBroadcasts struct {
}

InputNotifyBroadcasts represents TL type `inputNotifyBroadcasts#b1db7c7e`. All channels¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/inputNotifyBroadcasts for reference.

func (*InputNotifyBroadcasts) Decode

func (i *InputNotifyBroadcasts) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputNotifyBroadcasts) Encode

func (i *InputNotifyBroadcasts) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputNotifyBroadcasts) String added in v0.12.0

func (i *InputNotifyBroadcasts) String() string

String implements fmt.Stringer.

type InputNotifyChats

type InputNotifyChats struct {
}

InputNotifyChats represents TL type `inputNotifyChats#4a95e84e`. Notifications generated by all groups.

See https://core.telegram.org/constructor/inputNotifyChats for reference.

func (*InputNotifyChats) Decode

func (i *InputNotifyChats) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputNotifyChats) Encode

func (i *InputNotifyChats) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputNotifyChats) String added in v0.12.0

func (i *InputNotifyChats) String() string

String implements fmt.Stringer.

type InputNotifyPeer

type InputNotifyPeer struct {
	// User or group
	Peer InputPeerClass
}

InputNotifyPeer represents TL type `inputNotifyPeer#b8bc5b0c`. Notifications generated by a certain user or group.

See https://core.telegram.org/constructor/inputNotifyPeer for reference.

func (*InputNotifyPeer) Decode

func (i *InputNotifyPeer) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputNotifyPeer) Encode

func (i *InputNotifyPeer) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputNotifyPeer) String added in v0.12.0

func (i *InputNotifyPeer) String() string

String implements fmt.Stringer.

type InputNotifyPeerBox

type InputNotifyPeerBox struct {
	InputNotifyPeer InputNotifyPeerClass
}

InputNotifyPeer boxes the InputNotifyPeerClass providing a helper.

func (*InputNotifyPeerBox) Decode

func (b *InputNotifyPeerBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputNotifyPeerBox.

func (*InputNotifyPeerBox) Encode

func (b *InputNotifyPeerBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputNotifyPeerBox.

type InputNotifyPeerClass

type InputNotifyPeerClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputNotifyPeerClass represents InputNotifyPeer generic type.

See https://core.telegram.org/type/InputNotifyPeer for reference.

Example:

g, err := DecodeInputNotifyPeer(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputNotifyPeer: // inputNotifyPeer#b8bc5b0c
case *InputNotifyUsers: // inputNotifyUsers#193b4417
case *InputNotifyChats: // inputNotifyChats#4a95e84e
case *InputNotifyBroadcasts: // inputNotifyBroadcasts#b1db7c7e
default: panic(v)
}

func DecodeInputNotifyPeer

func DecodeInputNotifyPeer(buf *bin.Buffer) (InputNotifyPeerClass, error)

DecodeInputNotifyPeer implements binary de-serialization for InputNotifyPeerClass.

type InputNotifyUsers

type InputNotifyUsers struct {
}

InputNotifyUsers represents TL type `inputNotifyUsers#193b4417`. Notifications generated by all users.

See https://core.telegram.org/constructor/inputNotifyUsers for reference.

func (*InputNotifyUsers) Decode

func (i *InputNotifyUsers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputNotifyUsers) Encode

func (i *InputNotifyUsers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputNotifyUsers) String added in v0.12.0

func (i *InputNotifyUsers) String() string

String implements fmt.Stringer.

type InputPaymentCredentials

type InputPaymentCredentials struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Save payment credential for future use
	Save bool
	// Payment credentials
	Data DataJSON
}

InputPaymentCredentials represents TL type `inputPaymentCredentials#3417d728`. Payment credentials

See https://core.telegram.org/constructor/inputPaymentCredentials for reference.

func (*InputPaymentCredentials) Decode

func (i *InputPaymentCredentials) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPaymentCredentials) Encode

func (i *InputPaymentCredentials) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPaymentCredentials) SetSave

func (i *InputPaymentCredentials) SetSave(value bool)

SetSave sets value of Save conditional field.

func (*InputPaymentCredentials) String added in v0.12.0

func (i *InputPaymentCredentials) String() string

String implements fmt.Stringer.

type InputPaymentCredentialsAndroidPay

type InputPaymentCredentialsAndroidPay struct {
	// Android pay payment token
	PaymentToken DataJSON
	// Google transaction ID
	GoogleTransactionID string
}

InputPaymentCredentialsAndroidPay represents TL type `inputPaymentCredentialsAndroidPay#ca05d50e`. Android pay payment credentials

See https://core.telegram.org/constructor/inputPaymentCredentialsAndroidPay for reference.

func (*InputPaymentCredentialsAndroidPay) Decode

Decode implements bin.Decoder.

func (*InputPaymentCredentialsAndroidPay) Encode

Encode implements bin.Encoder.

func (*InputPaymentCredentialsAndroidPay) String added in v0.12.0

String implements fmt.Stringer.

type InputPaymentCredentialsApplePay

type InputPaymentCredentialsApplePay struct {
	// Payment data
	PaymentData DataJSON
}

InputPaymentCredentialsApplePay represents TL type `inputPaymentCredentialsApplePay#aa1c39f`. Apple pay payment credentials

See https://core.telegram.org/constructor/inputPaymentCredentialsApplePay for reference.

func (*InputPaymentCredentialsApplePay) Decode

Decode implements bin.Decoder.

func (*InputPaymentCredentialsApplePay) Encode

Encode implements bin.Encoder.

func (*InputPaymentCredentialsApplePay) String added in v0.12.0

String implements fmt.Stringer.

type InputPaymentCredentialsBox

type InputPaymentCredentialsBox struct {
	InputPaymentCredentials InputPaymentCredentialsClass
}

InputPaymentCredentials boxes the InputPaymentCredentialsClass providing a helper.

func (*InputPaymentCredentialsBox) Decode

func (b *InputPaymentCredentialsBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputPaymentCredentialsBox.

func (*InputPaymentCredentialsBox) Encode

func (b *InputPaymentCredentialsBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputPaymentCredentialsBox.

type InputPaymentCredentialsClass

type InputPaymentCredentialsClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputPaymentCredentialsClass represents InputPaymentCredentials generic type.

See https://core.telegram.org/type/InputPaymentCredentials for reference.

Example:

g, err := DecodeInputPaymentCredentials(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputPaymentCredentialsSaved: // inputPaymentCredentialsSaved#c10eb2cf
case *InputPaymentCredentials: // inputPaymentCredentials#3417d728
case *InputPaymentCredentialsApplePay: // inputPaymentCredentialsApplePay#aa1c39f
case *InputPaymentCredentialsAndroidPay: // inputPaymentCredentialsAndroidPay#ca05d50e
default: panic(v)
}

func DecodeInputPaymentCredentials

func DecodeInputPaymentCredentials(buf *bin.Buffer) (InputPaymentCredentialsClass, error)

DecodeInputPaymentCredentials implements binary de-serialization for InputPaymentCredentialsClass.

type InputPaymentCredentialsSaved

type InputPaymentCredentialsSaved struct {
	// Credential ID
	ID string
	// Temporary password
	TmpPassword []byte
}

InputPaymentCredentialsSaved represents TL type `inputPaymentCredentialsSaved#c10eb2cf`. Saved payment credentials

See https://core.telegram.org/constructor/inputPaymentCredentialsSaved for reference.

func (*InputPaymentCredentialsSaved) Decode

Decode implements bin.Decoder.

func (*InputPaymentCredentialsSaved) Encode

Encode implements bin.Encoder.

func (*InputPaymentCredentialsSaved) String added in v0.12.0

String implements fmt.Stringer.

type InputPeerBox

type InputPeerBox struct {
	InputPeer InputPeerClass
}

InputPeer boxes the InputPeerClass providing a helper.

func (*InputPeerBox) Decode

func (b *InputPeerBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputPeerBox.

func (*InputPeerBox) Encode

func (b *InputPeerBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputPeerBox.

type InputPeerChannel

type InputPeerChannel struct {
	// Channel identifier
	ChannelID int
	// access_hash value from the channel¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/constructor/channel
	AccessHash int64
}

InputPeerChannel represents TL type `inputPeerChannel#20adaef8`. Defines a channel for further interaction.

See https://core.telegram.org/constructor/inputPeerChannel for reference.

func (*InputPeerChannel) Decode

func (i *InputPeerChannel) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPeerChannel) Encode

func (i *InputPeerChannel) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPeerChannel) String added in v0.12.0

func (i *InputPeerChannel) String() string

String implements fmt.Stringer.

type InputPeerChannelFromMessage

type InputPeerChannelFromMessage struct {
	// The chat where the channel's message was seen
	Peer InputPeerClass
	// The message ID
	MsgID int
	// The identifier of the channel that was seen
	ChannelID int
}

InputPeerChannelFromMessage represents TL type `inputPeerChannelFromMessage#9c95f7bb`. Defines a min¹ channel that was seen in a certain message of a certain chat.

Links:

  1. https://core.telegram.org/api/min

See https://core.telegram.org/constructor/inputPeerChannelFromMessage for reference.

func (*InputPeerChannelFromMessage) Decode

Decode implements bin.Decoder.

func (*InputPeerChannelFromMessage) Encode

Encode implements bin.Encoder.

func (*InputPeerChannelFromMessage) String added in v0.12.0

func (i *InputPeerChannelFromMessage) String() string

String implements fmt.Stringer.

type InputPeerChat

type InputPeerChat struct {
	// Chat idientifier
	ChatID int
}

InputPeerChat represents TL type `inputPeerChat#179be863`. Defines a chat for further interaction.

See https://core.telegram.org/constructor/inputPeerChat for reference.

func (*InputPeerChat) Decode

func (i *InputPeerChat) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPeerChat) Encode

func (i *InputPeerChat) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPeerChat) String added in v0.12.0

func (i *InputPeerChat) String() string

String implements fmt.Stringer.

type InputPeerClass

type InputPeerClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputPeerClass represents InputPeer generic type.

See https://core.telegram.org/type/InputPeer for reference.

Example:

g, err := DecodeInputPeer(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputPeerEmpty: // inputPeerEmpty#7f3b18ea
case *InputPeerSelf: // inputPeerSelf#7da07ec9
case *InputPeerChat: // inputPeerChat#179be863
case *InputPeerUser: // inputPeerUser#7b8e7de6
case *InputPeerChannel: // inputPeerChannel#20adaef8
case *InputPeerUserFromMessage: // inputPeerUserFromMessage#17bae2e6
case *InputPeerChannelFromMessage: // inputPeerChannelFromMessage#9c95f7bb
default: panic(v)
}

func DecodeInputPeer

func DecodeInputPeer(buf *bin.Buffer) (InputPeerClass, error)

DecodeInputPeer implements binary de-serialization for InputPeerClass.

type InputPeerEmpty

type InputPeerEmpty struct {
}

InputPeerEmpty represents TL type `inputPeerEmpty#7f3b18ea`. An empty constructor, no user or chat is defined.

See https://core.telegram.org/constructor/inputPeerEmpty for reference.

func (*InputPeerEmpty) Decode

func (i *InputPeerEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPeerEmpty) Encode

func (i *InputPeerEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPeerEmpty) String added in v0.12.0

func (i *InputPeerEmpty) String() string

String implements fmt.Stringer.

type InputPeerNotifySettings

type InputPeerNotifySettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If the text of the message shall be displayed in notification
	//
	// Use SetShowPreviews and GetShowPreviews helpers.
	ShowPreviews bool
	// Peer was muted?
	//
	// Use SetSilent and GetSilent helpers.
	Silent bool
	// Date until which all notifications shall be switched off
	//
	// Use SetMuteUntil and GetMuteUntil helpers.
	MuteUntil int
	// Name of an audio file for notification
	//
	// Use SetSound and GetSound helpers.
	Sound string
}

InputPeerNotifySettings represents TL type `inputPeerNotifySettings#9c3d198e`. Notification settings.

See https://core.telegram.org/constructor/inputPeerNotifySettings for reference.

func (*InputPeerNotifySettings) Decode

func (i *InputPeerNotifySettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPeerNotifySettings) Encode

func (i *InputPeerNotifySettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPeerNotifySettings) GetMuteUntil

func (i *InputPeerNotifySettings) GetMuteUntil() (value int, ok bool)

GetMuteUntil returns value of MuteUntil conditional field and boolean which is true if field was set.

func (*InputPeerNotifySettings) GetShowPreviews added in v0.17.0

func (i *InputPeerNotifySettings) GetShowPreviews() (value bool, ok bool)

GetShowPreviews returns value of ShowPreviews conditional field and boolean which is true if field was set.

func (*InputPeerNotifySettings) GetSilent added in v0.17.0

func (i *InputPeerNotifySettings) GetSilent() (value bool, ok bool)

GetSilent returns value of Silent conditional field and boolean which is true if field was set.

func (*InputPeerNotifySettings) GetSound

func (i *InputPeerNotifySettings) GetSound() (value string, ok bool)

GetSound returns value of Sound conditional field and boolean which is true if field was set.

func (*InputPeerNotifySettings) SetMuteUntil

func (i *InputPeerNotifySettings) SetMuteUntil(value int)

SetMuteUntil sets value of MuteUntil conditional field.

func (*InputPeerNotifySettings) SetShowPreviews

func (i *InputPeerNotifySettings) SetShowPreviews(value bool)

SetShowPreviews sets value of ShowPreviews conditional field.

func (*InputPeerNotifySettings) SetSilent

func (i *InputPeerNotifySettings) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*InputPeerNotifySettings) SetSound

func (i *InputPeerNotifySettings) SetSound(value string)

SetSound sets value of Sound conditional field.

func (*InputPeerNotifySettings) String added in v0.12.0

func (i *InputPeerNotifySettings) String() string

String implements fmt.Stringer.

type InputPeerPhotoFileLocation

type InputPeerPhotoFileLocation struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to download the high-quality version of the picture
	Big bool
	// The peer whose profile picture should be downloaded
	Peer InputPeerClass
	// Volume ID from FileLocation¹ met in the profile photo container.
	//
	// Links:
	//  1) https://core.telegram.org/type/FileLocation
	VolumeID int64
	// Local ID from FileLocation¹ met in the profile photo container.
	//
	// Links:
	//  1) https://core.telegram.org/type/FileLocation
	LocalID int
}

InputPeerPhotoFileLocation represents TL type `inputPeerPhotoFileLocation#27d69997`. Location of profile photo of channel/group/supergroup/user

See https://core.telegram.org/constructor/inputPeerPhotoFileLocation for reference.

func (*InputPeerPhotoFileLocation) Decode

Decode implements bin.Decoder.

func (*InputPeerPhotoFileLocation) Encode

Encode implements bin.Encoder.

func (*InputPeerPhotoFileLocation) SetBig

func (i *InputPeerPhotoFileLocation) SetBig(value bool)

SetBig sets value of Big conditional field.

func (*InputPeerPhotoFileLocation) String added in v0.12.0

func (i *InputPeerPhotoFileLocation) String() string

String implements fmt.Stringer.

type InputPeerSelf

type InputPeerSelf struct {
}

InputPeerSelf represents TL type `inputPeerSelf#7da07ec9`. Defines the current user.

See https://core.telegram.org/constructor/inputPeerSelf for reference.

func (*InputPeerSelf) Decode

func (i *InputPeerSelf) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPeerSelf) Encode

func (i *InputPeerSelf) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPeerSelf) String added in v0.12.0

func (i *InputPeerSelf) String() string

String implements fmt.Stringer.

type InputPeerUser

type InputPeerUser struct {
	// User identifier
	UserID int
	// access_hash value from the user¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/constructor/user
	AccessHash int64
}

InputPeerUser represents TL type `inputPeerUser#7b8e7de6`. Defines a user for further interaction.

See https://core.telegram.org/constructor/inputPeerUser for reference.

func (*InputPeerUser) Decode

func (i *InputPeerUser) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPeerUser) Encode

func (i *InputPeerUser) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPeerUser) String added in v0.12.0

func (i *InputPeerUser) String() string

String implements fmt.Stringer.

type InputPeerUserFromMessage

type InputPeerUserFromMessage struct {
	// The chat where the user was seen
	Peer InputPeerClass
	// The message ID
	MsgID int
	// The identifier of the user that was seen
	UserID int
}

InputPeerUserFromMessage represents TL type `inputPeerUserFromMessage#17bae2e6`. Defines a min¹ user that was seen in a certain message of a certain chat.

Links:

  1. https://core.telegram.org/api/min

See https://core.telegram.org/constructor/inputPeerUserFromMessage for reference.

func (*InputPeerUserFromMessage) Decode

func (i *InputPeerUserFromMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPeerUserFromMessage) Encode

func (i *InputPeerUserFromMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPeerUserFromMessage) String added in v0.12.0

func (i *InputPeerUserFromMessage) String() string

String implements fmt.Stringer.

type InputPhoneCall

type InputPhoneCall struct {
	// Call ID
	ID int64
	// Access hash
	AccessHash int64
}

InputPhoneCall represents TL type `inputPhoneCall#1e36fded`. Phone call

See https://core.telegram.org/constructor/inputPhoneCall for reference.

func (*InputPhoneCall) Decode

func (i *InputPhoneCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPhoneCall) Encode

func (i *InputPhoneCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPhoneCall) String added in v0.12.0

func (i *InputPhoneCall) String() string

String implements fmt.Stringer.

type InputPhoneContact

type InputPhoneContact struct {
	// User identifier on the client
	ClientID int64
	// Phone number
	Phone string
	// Contact's first name
	FirstName string
	// Contact's last name
	LastName string
}

InputPhoneContact represents TL type `inputPhoneContact#f392b7f4`. Phone contact. The client_id is just an arbitrary contact ID: it should be set, for example, to an incremental number when using contacts.importContacts¹, in order to retry importing only the contacts that weren't imported successfully.

Links:

  1. https://core.telegram.org/method/contacts.importContacts

See https://core.telegram.org/constructor/inputPhoneContact for reference.

func (*InputPhoneContact) Decode

func (i *InputPhoneContact) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPhoneContact) Encode

func (i *InputPhoneContact) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPhoneContact) String added in v0.12.0

func (i *InputPhoneContact) String() string

String implements fmt.Stringer.

type InputPhoto

type InputPhoto struct {
	// Photo identifier
	ID int64
	// access_hash value from the photo¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/constructor/photo
	AccessHash int64
	// File reference¹
	//
	// Links:
	//  1) https://core.telegram.org/api/file_reference
	FileReference []byte
}

InputPhoto represents TL type `inputPhoto#3bb3b94a`. Defines a photo for further interaction.

See https://core.telegram.org/constructor/inputPhoto for reference.

func (*InputPhoto) Decode

func (i *InputPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPhoto) Encode

func (i *InputPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPhoto) String added in v0.12.0

func (i *InputPhoto) String() string

String implements fmt.Stringer.

type InputPhotoBox

type InputPhotoBox struct {
	InputPhoto InputPhotoClass
}

InputPhoto boxes the InputPhotoClass providing a helper.

func (*InputPhotoBox) Decode

func (b *InputPhotoBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputPhotoBox.

func (*InputPhotoBox) Encode

func (b *InputPhotoBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputPhotoBox.

type InputPhotoClass

type InputPhotoClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputPhotoClass represents InputPhoto generic type.

See https://core.telegram.org/type/InputPhoto for reference.

Example:

g, err := DecodeInputPhoto(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputPhotoEmpty: // inputPhotoEmpty#1cd7bf0d
case *InputPhoto: // inputPhoto#3bb3b94a
default: panic(v)
}

func DecodeInputPhoto

func DecodeInputPhoto(buf *bin.Buffer) (InputPhotoClass, error)

DecodeInputPhoto implements binary de-serialization for InputPhotoClass.

type InputPhotoEmpty

type InputPhotoEmpty struct {
}

InputPhotoEmpty represents TL type `inputPhotoEmpty#1cd7bf0d`. Empty constructor.

See https://core.telegram.org/constructor/inputPhotoEmpty for reference.

func (*InputPhotoEmpty) Decode

func (i *InputPhotoEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPhotoEmpty) Encode

func (i *InputPhotoEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPhotoEmpty) String added in v0.12.0

func (i *InputPhotoEmpty) String() string

String implements fmt.Stringer.

type InputPhotoFileLocation

type InputPhotoFileLocation struct {
	// Photo ID, obtained from the photo¹ object
	//
	// Links:
	//  1) https://core.telegram.org/constructor/photo
	ID int64
	// Photo's access hash, obtained from the photo¹ object
	//
	// Links:
	//  1) https://core.telegram.org/constructor/photo
	AccessHash int64
	// File reference¹
	//
	// Links:
	//  1) https://core.telegram.org/api/file_reference
	FileReference []byte
	// The PhotoSize¹ to download: must be set to the type field of the desired PhotoSize object of the photo²
	//
	// Links:
	//  1) https://core.telegram.org/type/PhotoSize
	//  2) https://core.telegram.org/constructor/photo
	ThumbSize string
}

InputPhotoFileLocation represents TL type `inputPhotoFileLocation#40181ffe`. Use this object to download a photo with upload.getFile¹ method

Links:

  1. https://core.telegram.org/method/upload.getFile

See https://core.telegram.org/constructor/inputPhotoFileLocation for reference.

func (*InputPhotoFileLocation) Decode

func (i *InputPhotoFileLocation) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPhotoFileLocation) Encode

func (i *InputPhotoFileLocation) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPhotoFileLocation) String added in v0.12.0

func (i *InputPhotoFileLocation) String() string

String implements fmt.Stringer.

type InputPhotoLegacyFileLocation

type InputPhotoLegacyFileLocation struct {
	// Photo ID
	ID int64
	// Access hash
	AccessHash int64
	// File reference
	FileReference []byte
	// Volume ID
	VolumeID int64
	// Local ID
	LocalID int
	// Secret
	Secret int64
}

InputPhotoLegacyFileLocation represents TL type `inputPhotoLegacyFileLocation#d83466f3`. Legacy photo file location

See https://core.telegram.org/constructor/inputPhotoLegacyFileLocation for reference.

func (*InputPhotoLegacyFileLocation) Decode

Decode implements bin.Decoder.

func (*InputPhotoLegacyFileLocation) Encode

Encode implements bin.Encoder.

func (*InputPhotoLegacyFileLocation) String added in v0.12.0

String implements fmt.Stringer.

type InputPrivacyKeyAddedByPhone

type InputPrivacyKeyAddedByPhone struct {
}

InputPrivacyKeyAddedByPhone represents TL type `inputPrivacyKeyAddedByPhone#d1219bdd`. Whether people can add you to their contact list by your phone number

See https://core.telegram.org/constructor/inputPrivacyKeyAddedByPhone for reference.

func (*InputPrivacyKeyAddedByPhone) Decode

Decode implements bin.Decoder.

func (*InputPrivacyKeyAddedByPhone) Encode

Encode implements bin.Encoder.

func (*InputPrivacyKeyAddedByPhone) String added in v0.12.0

func (i *InputPrivacyKeyAddedByPhone) String() string

String implements fmt.Stringer.

type InputPrivacyKeyBox

type InputPrivacyKeyBox struct {
	InputPrivacyKey InputPrivacyKeyClass
}

InputPrivacyKey boxes the InputPrivacyKeyClass providing a helper.

func (*InputPrivacyKeyBox) Decode

func (b *InputPrivacyKeyBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputPrivacyKeyBox.

func (*InputPrivacyKeyBox) Encode

func (b *InputPrivacyKeyBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputPrivacyKeyBox.

type InputPrivacyKeyChatInvite

type InputPrivacyKeyChatInvite struct {
}

InputPrivacyKeyChatInvite represents TL type `inputPrivacyKeyChatInvite#bdfb0426`. Whether the user can be invited to chats

See https://core.telegram.org/constructor/inputPrivacyKeyChatInvite for reference.

func (*InputPrivacyKeyChatInvite) Decode

func (i *InputPrivacyKeyChatInvite) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPrivacyKeyChatInvite) Encode

func (i *InputPrivacyKeyChatInvite) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPrivacyKeyChatInvite) String added in v0.12.0

func (i *InputPrivacyKeyChatInvite) String() string

String implements fmt.Stringer.

type InputPrivacyKeyClass

type InputPrivacyKeyClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputPrivacyKeyClass represents InputPrivacyKey generic type.

See https://core.telegram.org/type/InputPrivacyKey for reference.

Example:

g, err := DecodeInputPrivacyKey(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputPrivacyKeyStatusTimestamp: // inputPrivacyKeyStatusTimestamp#4f96cb18
case *InputPrivacyKeyChatInvite: // inputPrivacyKeyChatInvite#bdfb0426
case *InputPrivacyKeyPhoneCall: // inputPrivacyKeyPhoneCall#fabadc5f
case *InputPrivacyKeyPhoneP2P: // inputPrivacyKeyPhoneP2P#db9e70d2
case *InputPrivacyKeyForwards: // inputPrivacyKeyForwards#a4dd4c08
case *InputPrivacyKeyProfilePhoto: // inputPrivacyKeyProfilePhoto#5719bacc
case *InputPrivacyKeyPhoneNumber: // inputPrivacyKeyPhoneNumber#352dafa
case *InputPrivacyKeyAddedByPhone: // inputPrivacyKeyAddedByPhone#d1219bdd
default: panic(v)
}

func DecodeInputPrivacyKey

func DecodeInputPrivacyKey(buf *bin.Buffer) (InputPrivacyKeyClass, error)

DecodeInputPrivacyKey implements binary de-serialization for InputPrivacyKeyClass.

type InputPrivacyKeyForwards

type InputPrivacyKeyForwards struct {
}

InputPrivacyKeyForwards represents TL type `inputPrivacyKeyForwards#a4dd4c08`. Whether messages forwarded from this user will be anonymous¹

Links:

  1. https://telegram.org/blog/unsend-privacy-emoji#anonymous-forwarding

See https://core.telegram.org/constructor/inputPrivacyKeyForwards for reference.

func (*InputPrivacyKeyForwards) Decode

func (i *InputPrivacyKeyForwards) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPrivacyKeyForwards) Encode

func (i *InputPrivacyKeyForwards) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPrivacyKeyForwards) String added in v0.12.0

func (i *InputPrivacyKeyForwards) String() string

String implements fmt.Stringer.

type InputPrivacyKeyPhoneCall

type InputPrivacyKeyPhoneCall struct {
}

InputPrivacyKeyPhoneCall represents TL type `inputPrivacyKeyPhoneCall#fabadc5f`. Whether the user will accept phone calls

See https://core.telegram.org/constructor/inputPrivacyKeyPhoneCall for reference.

func (*InputPrivacyKeyPhoneCall) Decode

func (i *InputPrivacyKeyPhoneCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPrivacyKeyPhoneCall) Encode

func (i *InputPrivacyKeyPhoneCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPrivacyKeyPhoneCall) String added in v0.12.0

func (i *InputPrivacyKeyPhoneCall) String() string

String implements fmt.Stringer.

type InputPrivacyKeyPhoneNumber

type InputPrivacyKeyPhoneNumber struct {
}

InputPrivacyKeyPhoneNumber represents TL type `inputPrivacyKeyPhoneNumber#352dafa`. Whether people will be able to see the user's phone number

See https://core.telegram.org/constructor/inputPrivacyKeyPhoneNumber for reference.

func (*InputPrivacyKeyPhoneNumber) Decode

Decode implements bin.Decoder.

func (*InputPrivacyKeyPhoneNumber) Encode

Encode implements bin.Encoder.

func (*InputPrivacyKeyPhoneNumber) String added in v0.12.0

func (i *InputPrivacyKeyPhoneNumber) String() string

String implements fmt.Stringer.

type InputPrivacyKeyPhoneP2P

type InputPrivacyKeyPhoneP2P struct {
}

InputPrivacyKeyPhoneP2P represents TL type `inputPrivacyKeyPhoneP2P#db9e70d2`. Whether the user allows P2P communication during VoIP calls

See https://core.telegram.org/constructor/inputPrivacyKeyPhoneP2P for reference.

func (*InputPrivacyKeyPhoneP2P) Decode

func (i *InputPrivacyKeyPhoneP2P) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPrivacyKeyPhoneP2P) Encode

func (i *InputPrivacyKeyPhoneP2P) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPrivacyKeyPhoneP2P) String added in v0.12.0

func (i *InputPrivacyKeyPhoneP2P) String() string

String implements fmt.Stringer.

type InputPrivacyKeyProfilePhoto

type InputPrivacyKeyProfilePhoto struct {
}

InputPrivacyKeyProfilePhoto represents TL type `inputPrivacyKeyProfilePhoto#5719bacc`. Whether people will be able to see the user's profile picture

See https://core.telegram.org/constructor/inputPrivacyKeyProfilePhoto for reference.

func (*InputPrivacyKeyProfilePhoto) Decode

Decode implements bin.Decoder.

func (*InputPrivacyKeyProfilePhoto) Encode

Encode implements bin.Encoder.

func (*InputPrivacyKeyProfilePhoto) String added in v0.12.0

func (i *InputPrivacyKeyProfilePhoto) String() string

String implements fmt.Stringer.

type InputPrivacyKeyStatusTimestamp

type InputPrivacyKeyStatusTimestamp struct {
}

InputPrivacyKeyStatusTimestamp represents TL type `inputPrivacyKeyStatusTimestamp#4f96cb18`. Whether we can see the exact last online timestamp of the user

See https://core.telegram.org/constructor/inputPrivacyKeyStatusTimestamp for reference.

func (*InputPrivacyKeyStatusTimestamp) Decode

Decode implements bin.Decoder.

func (*InputPrivacyKeyStatusTimestamp) Encode

Encode implements bin.Encoder.

func (*InputPrivacyKeyStatusTimestamp) String added in v0.12.0

String implements fmt.Stringer.

type InputPrivacyRuleBox

type InputPrivacyRuleBox struct {
	InputPrivacyRule InputPrivacyRuleClass
}

InputPrivacyRule boxes the InputPrivacyRuleClass providing a helper.

func (*InputPrivacyRuleBox) Decode

func (b *InputPrivacyRuleBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputPrivacyRuleBox.

func (*InputPrivacyRuleBox) Encode

func (b *InputPrivacyRuleBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputPrivacyRuleBox.

type InputPrivacyRuleClass

type InputPrivacyRuleClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputPrivacyRuleClass represents InputPrivacyRule generic type.

See https://core.telegram.org/type/InputPrivacyRule for reference.

Example:

g, err := DecodeInputPrivacyRule(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputPrivacyValueAllowContacts: // inputPrivacyValueAllowContacts#d09e07b
case *InputPrivacyValueAllowAll: // inputPrivacyValueAllowAll#184b35ce
case *InputPrivacyValueAllowUsers: // inputPrivacyValueAllowUsers#131cc67f
case *InputPrivacyValueDisallowContacts: // inputPrivacyValueDisallowContacts#ba52007
case *InputPrivacyValueDisallowAll: // inputPrivacyValueDisallowAll#d66b66c9
case *InputPrivacyValueDisallowUsers: // inputPrivacyValueDisallowUsers#90110467
case *InputPrivacyValueAllowChatParticipants: // inputPrivacyValueAllowChatParticipants#4c81c1ba
case *InputPrivacyValueDisallowChatParticipants: // inputPrivacyValueDisallowChatParticipants#d82363af
default: panic(v)
}

func DecodeInputPrivacyRule

func DecodeInputPrivacyRule(buf *bin.Buffer) (InputPrivacyRuleClass, error)

DecodeInputPrivacyRule implements binary de-serialization for InputPrivacyRuleClass.

type InputPrivacyValueAllowAll

type InputPrivacyValueAllowAll struct {
}

InputPrivacyValueAllowAll represents TL type `inputPrivacyValueAllowAll#184b35ce`. Allow all users

See https://core.telegram.org/constructor/inputPrivacyValueAllowAll for reference.

func (*InputPrivacyValueAllowAll) Decode

func (i *InputPrivacyValueAllowAll) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputPrivacyValueAllowAll) Encode

func (i *InputPrivacyValueAllowAll) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputPrivacyValueAllowAll) String added in v0.12.0

func (i *InputPrivacyValueAllowAll) String() string

String implements fmt.Stringer.

type InputPrivacyValueAllowChatParticipants

type InputPrivacyValueAllowChatParticipants struct {
	// Allowed chat IDs
	Chats []int
}

InputPrivacyValueAllowChatParticipants represents TL type `inputPrivacyValueAllowChatParticipants#4c81c1ba`. Allow only participants of certain chats

See https://core.telegram.org/constructor/inputPrivacyValueAllowChatParticipants for reference.

func (*InputPrivacyValueAllowChatParticipants) Decode

Decode implements bin.Decoder.

func (*InputPrivacyValueAllowChatParticipants) Encode

Encode implements bin.Encoder.

func (*InputPrivacyValueAllowChatParticipants) String added in v0.12.0

String implements fmt.Stringer.

type InputPrivacyValueAllowContacts

type InputPrivacyValueAllowContacts struct {
}

InputPrivacyValueAllowContacts represents TL type `inputPrivacyValueAllowContacts#d09e07b`. Allow only contacts

See https://core.telegram.org/constructor/inputPrivacyValueAllowContacts for reference.

func (*InputPrivacyValueAllowContacts) Decode

Decode implements bin.Decoder.

func (*InputPrivacyValueAllowContacts) Encode

Encode implements bin.Encoder.

func (*InputPrivacyValueAllowContacts) String added in v0.12.0

String implements fmt.Stringer.

type InputPrivacyValueAllowUsers

type InputPrivacyValueAllowUsers struct {
	// Allowed users
	Users []InputUserClass
}

InputPrivacyValueAllowUsers represents TL type `inputPrivacyValueAllowUsers#131cc67f`. Allow only certain users

See https://core.telegram.org/constructor/inputPrivacyValueAllowUsers for reference.

func (*InputPrivacyValueAllowUsers) Decode

Decode implements bin.Decoder.

func (*InputPrivacyValueAllowUsers) Encode

Encode implements bin.Encoder.

func (*InputPrivacyValueAllowUsers) String added in v0.12.0

func (i *InputPrivacyValueAllowUsers) String() string

String implements fmt.Stringer.

type InputPrivacyValueDisallowAll

type InputPrivacyValueDisallowAll struct {
}

InputPrivacyValueDisallowAll represents TL type `inputPrivacyValueDisallowAll#d66b66c9`. Disallow all

See https://core.telegram.org/constructor/inputPrivacyValueDisallowAll for reference.

func (*InputPrivacyValueDisallowAll) Decode

Decode implements bin.Decoder.

func (*InputPrivacyValueDisallowAll) Encode

Encode implements bin.Encoder.

func (*InputPrivacyValueDisallowAll) String added in v0.12.0

String implements fmt.Stringer.

type InputPrivacyValueDisallowChatParticipants

type InputPrivacyValueDisallowChatParticipants struct {
	// Disallowed chat IDs
	Chats []int
}

InputPrivacyValueDisallowChatParticipants represents TL type `inputPrivacyValueDisallowChatParticipants#d82363af`. Disallow only participants of certain chats

See https://core.telegram.org/constructor/inputPrivacyValueDisallowChatParticipants for reference.

func (*InputPrivacyValueDisallowChatParticipants) Decode

Decode implements bin.Decoder.

func (*InputPrivacyValueDisallowChatParticipants) Encode

Encode implements bin.Encoder.

func (*InputPrivacyValueDisallowChatParticipants) String added in v0.12.0

String implements fmt.Stringer.

type InputPrivacyValueDisallowContacts

type InputPrivacyValueDisallowContacts struct {
}

InputPrivacyValueDisallowContacts represents TL type `inputPrivacyValueDisallowContacts#ba52007`. Disallow only contacts

See https://core.telegram.org/constructor/inputPrivacyValueDisallowContacts for reference.

func (*InputPrivacyValueDisallowContacts) Decode

Decode implements bin.Decoder.

func (*InputPrivacyValueDisallowContacts) Encode

Encode implements bin.Encoder.

func (*InputPrivacyValueDisallowContacts) String added in v0.12.0

String implements fmt.Stringer.

type InputPrivacyValueDisallowUsers

type InputPrivacyValueDisallowUsers struct {
	// Users to disallow
	Users []InputUserClass
}

InputPrivacyValueDisallowUsers represents TL type `inputPrivacyValueDisallowUsers#90110467`. Disallow only certain users

See https://core.telegram.org/constructor/inputPrivacyValueDisallowUsers for reference.

func (*InputPrivacyValueDisallowUsers) Decode

Decode implements bin.Decoder.

func (*InputPrivacyValueDisallowUsers) Encode

Encode implements bin.Encoder.

func (*InputPrivacyValueDisallowUsers) String added in v0.12.0

String implements fmt.Stringer.

type InputReportReasonChildAbuse

type InputReportReasonChildAbuse struct {
}

InputReportReasonChildAbuse represents TL type `inputReportReasonChildAbuse#adf44ee3`. Report for child abuse

See https://core.telegram.org/constructor/inputReportReasonChildAbuse for reference.

func (*InputReportReasonChildAbuse) Decode

Decode implements bin.Decoder.

func (*InputReportReasonChildAbuse) Encode

Encode implements bin.Encoder.

func (*InputReportReasonChildAbuse) String added in v0.12.0

func (i *InputReportReasonChildAbuse) String() string

String implements fmt.Stringer.

type InputReportReasonCopyright

type InputReportReasonCopyright struct {
}

InputReportReasonCopyright represents TL type `inputReportReasonCopyright#9b89f93a`. Report for copyrighted content

See https://core.telegram.org/constructor/inputReportReasonCopyright for reference.

func (*InputReportReasonCopyright) Decode

Decode implements bin.Decoder.

func (*InputReportReasonCopyright) Encode

Encode implements bin.Encoder.

func (*InputReportReasonCopyright) String added in v0.12.0

func (i *InputReportReasonCopyright) String() string

String implements fmt.Stringer.

type InputReportReasonGeoIrrelevant

type InputReportReasonGeoIrrelevant struct {
}

InputReportReasonGeoIrrelevant represents TL type `inputReportReasonGeoIrrelevant#dbd4feed`. Report an irrelevant geogroup

See https://core.telegram.org/constructor/inputReportReasonGeoIrrelevant for reference.

func (*InputReportReasonGeoIrrelevant) Decode

Decode implements bin.Decoder.

func (*InputReportReasonGeoIrrelevant) Encode

Encode implements bin.Encoder.

func (*InputReportReasonGeoIrrelevant) String added in v0.12.0

String implements fmt.Stringer.

type InputReportReasonOther

type InputReportReasonOther struct {
	// Other report reason
	Text string
}

InputReportReasonOther represents TL type `inputReportReasonOther#e1746d0a`. Other

See https://core.telegram.org/constructor/inputReportReasonOther for reference.

func (*InputReportReasonOther) Decode

func (i *InputReportReasonOther) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputReportReasonOther) Encode

func (i *InputReportReasonOther) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputReportReasonOther) String added in v0.12.0

func (i *InputReportReasonOther) String() string

String implements fmt.Stringer.

type InputReportReasonPornography

type InputReportReasonPornography struct {
}

InputReportReasonPornography represents TL type `inputReportReasonPornography#2e59d922`. Report for pornography

See https://core.telegram.org/constructor/inputReportReasonPornography for reference.

func (*InputReportReasonPornography) Decode

Decode implements bin.Decoder.

func (*InputReportReasonPornography) Encode

Encode implements bin.Encoder.

func (*InputReportReasonPornography) String added in v0.12.0

String implements fmt.Stringer.

type InputReportReasonSpam

type InputReportReasonSpam struct {
}

InputReportReasonSpam represents TL type `inputReportReasonSpam#58dbcab8`. Report for spam

See https://core.telegram.org/constructor/inputReportReasonSpam for reference.

func (*InputReportReasonSpam) Decode

func (i *InputReportReasonSpam) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputReportReasonSpam) Encode

func (i *InputReportReasonSpam) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputReportReasonSpam) String added in v0.12.0

func (i *InputReportReasonSpam) String() string

String implements fmt.Stringer.

type InputReportReasonViolence

type InputReportReasonViolence struct {
}

InputReportReasonViolence represents TL type `inputReportReasonViolence#1e22c78d`. Report for violence

See https://core.telegram.org/constructor/inputReportReasonViolence for reference.

func (*InputReportReasonViolence) Decode

func (i *InputReportReasonViolence) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputReportReasonViolence) Encode

func (i *InputReportReasonViolence) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputReportReasonViolence) String added in v0.12.0

func (i *InputReportReasonViolence) String() string

String implements fmt.Stringer.

type InputSecureFile

type InputSecureFile struct {
	// Secure file ID
	ID int64
	// Secure file access hash
	AccessHash int64
}

InputSecureFile represents TL type `inputSecureFile#5367e5be`. Preuploaded passport¹ file, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#inputsecurefile

See https://core.telegram.org/constructor/inputSecureFile for reference.

func (*InputSecureFile) Decode

func (i *InputSecureFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputSecureFile) Encode

func (i *InputSecureFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputSecureFile) String added in v0.12.0

func (i *InputSecureFile) String() string

String implements fmt.Stringer.

type InputSecureFileBox

type InputSecureFileBox struct {
	InputSecureFile InputSecureFileClass
}

InputSecureFile boxes the InputSecureFileClass providing a helper.

func (*InputSecureFileBox) Decode

func (b *InputSecureFileBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputSecureFileBox.

func (*InputSecureFileBox) Encode

func (b *InputSecureFileBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputSecureFileBox.

type InputSecureFileClass

type InputSecureFileClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputSecureFileClass represents InputSecureFile generic type.

See https://core.telegram.org/type/InputSecureFile for reference.

Example:

g, err := DecodeInputSecureFile(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputSecureFileUploaded: // inputSecureFileUploaded#3334b0f0
case *InputSecureFile: // inputSecureFile#5367e5be
default: panic(v)
}

func DecodeInputSecureFile

func DecodeInputSecureFile(buf *bin.Buffer) (InputSecureFileClass, error)

DecodeInputSecureFile implements binary de-serialization for InputSecureFileClass.

type InputSecureFileLocation

type InputSecureFileLocation struct {
	// File ID, id parameter value from secureFile¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureFile
	ID int64
	// Checksum, access_hash parameter value from secureFile¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureFile
	AccessHash int64
}

InputSecureFileLocation represents TL type `inputSecureFileLocation#cbc7ee28`. Location of encrypted telegram passport¹ file.

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/constructor/inputSecureFileLocation for reference.

func (*InputSecureFileLocation) Decode

func (i *InputSecureFileLocation) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputSecureFileLocation) Encode

func (i *InputSecureFileLocation) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputSecureFileLocation) String added in v0.12.0

func (i *InputSecureFileLocation) String() string

String implements fmt.Stringer.

type InputSecureFileUploaded

type InputSecureFileUploaded struct {
	// Secure file ID
	ID int64
	// Secure file part count
	Parts int
	// MD5 hash of encrypted uploaded file, to be checked server-side
	Md5Checksum string
	// File hash
	FileHash []byte
	// Secret
	Secret []byte
}

InputSecureFileUploaded represents TL type `inputSecureFileUploaded#3334b0f0`. Uploaded secure file, for more info see the passport docs »¹

Links:

  1. https://core.telegram.org/passport/encryption#inputsecurefile

See https://core.telegram.org/constructor/inputSecureFileUploaded for reference.

func (*InputSecureFileUploaded) Decode

func (i *InputSecureFileUploaded) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputSecureFileUploaded) Encode

func (i *InputSecureFileUploaded) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputSecureFileUploaded) String added in v0.12.0

func (i *InputSecureFileUploaded) String() string

String implements fmt.Stringer.

type InputSecureValue

type InputSecureValue struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Secure passport¹ value type
	//
	// Links:
	//  1) https://core.telegram.org/passport
	Type SecureValueTypeClass
	// Encrypted Telegram Passport¹ element data
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetData and GetData helpers.
	Data SecureData
	// Encrypted passport¹ file with the front side of the document
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetFrontSide and GetFrontSide helpers.
	FrontSide InputSecureFileClass
	// Encrypted passport¹ file with the reverse side of the document
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetReverseSide and GetReverseSide helpers.
	ReverseSide InputSecureFileClass
	// Encrypted passport¹ file with a selfie of the user holding the document
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetSelfie and GetSelfie helpers.
	Selfie InputSecureFileClass
	// Array of encrypted passport¹ files with translated versions of the provided documents
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetTranslation and GetTranslation helpers.
	Translation []InputSecureFileClass
	// Array of encrypted passport¹ files with photos the of the documents
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetFiles and GetFiles helpers.
	Files []InputSecureFileClass
	// Plaintext verified passport¹ data
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetPlainData and GetPlainData helpers.
	PlainData SecurePlainDataClass
}

InputSecureValue represents TL type `inputSecureValue#db21d0a7`. Secure value, for more info see the passport docs »¹

Links:

  1. https://core.telegram.org/passport/encryption#encryption

See https://core.telegram.org/constructor/inputSecureValue for reference.

func (*InputSecureValue) Decode

func (i *InputSecureValue) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputSecureValue) Encode

func (i *InputSecureValue) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputSecureValue) GetData

func (i *InputSecureValue) GetData() (value SecureData, ok bool)

GetData returns value of Data conditional field and boolean which is true if field was set.

func (*InputSecureValue) GetFiles

func (i *InputSecureValue) GetFiles() (value []InputSecureFileClass, ok bool)

GetFiles returns value of Files conditional field and boolean which is true if field was set.

func (*InputSecureValue) GetFrontSide

func (i *InputSecureValue) GetFrontSide() (value InputSecureFileClass, ok bool)

GetFrontSide returns value of FrontSide conditional field and boolean which is true if field was set.

func (*InputSecureValue) GetPlainData

func (i *InputSecureValue) GetPlainData() (value SecurePlainDataClass, ok bool)

GetPlainData returns value of PlainData conditional field and boolean which is true if field was set.

func (*InputSecureValue) GetReverseSide

func (i *InputSecureValue) GetReverseSide() (value InputSecureFileClass, ok bool)

GetReverseSide returns value of ReverseSide conditional field and boolean which is true if field was set.

func (*InputSecureValue) GetSelfie

func (i *InputSecureValue) GetSelfie() (value InputSecureFileClass, ok bool)

GetSelfie returns value of Selfie conditional field and boolean which is true if field was set.

func (*InputSecureValue) GetTranslation

func (i *InputSecureValue) GetTranslation() (value []InputSecureFileClass, ok bool)

GetTranslation returns value of Translation conditional field and boolean which is true if field was set.

func (*InputSecureValue) SetData

func (i *InputSecureValue) SetData(value SecureData)

SetData sets value of Data conditional field.

func (*InputSecureValue) SetFiles

func (i *InputSecureValue) SetFiles(value []InputSecureFileClass)

SetFiles sets value of Files conditional field.

func (*InputSecureValue) SetFrontSide

func (i *InputSecureValue) SetFrontSide(value InputSecureFileClass)

SetFrontSide sets value of FrontSide conditional field.

func (*InputSecureValue) SetPlainData

func (i *InputSecureValue) SetPlainData(value SecurePlainDataClass)

SetPlainData sets value of PlainData conditional field.

func (*InputSecureValue) SetReverseSide

func (i *InputSecureValue) SetReverseSide(value InputSecureFileClass)

SetReverseSide sets value of ReverseSide conditional field.

func (*InputSecureValue) SetSelfie

func (i *InputSecureValue) SetSelfie(value InputSecureFileClass)

SetSelfie sets value of Selfie conditional field.

func (*InputSecureValue) SetTranslation

func (i *InputSecureValue) SetTranslation(value []InputSecureFileClass)

SetTranslation sets value of Translation conditional field.

func (*InputSecureValue) String added in v0.12.0

func (i *InputSecureValue) String() string

String implements fmt.Stringer.

type InputSingleMedia

type InputSingleMedia struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The media
	Media InputMediaClass
	// Unique client media ID required to prevent message resending
	RandomID int64
	// A caption for the media
	Message string
	// Message entities¹ for styled text
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
}

InputSingleMedia represents TL type `inputSingleMedia#1cc6e91f`. A single media in an album or grouped media¹ sent with messages.sendMultiMedia².

Links:

  1. https://core.telegram.org/api/files#albums-grouped-media
  2. https://core.telegram.org/method/messages.sendMultiMedia

See https://core.telegram.org/constructor/inputSingleMedia for reference.

func (*InputSingleMedia) Decode

func (i *InputSingleMedia) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputSingleMedia) Encode

func (i *InputSingleMedia) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputSingleMedia) GetEntities

func (i *InputSingleMedia) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*InputSingleMedia) SetEntities

func (i *InputSingleMedia) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*InputSingleMedia) String added in v0.12.0

func (i *InputSingleMedia) String() string

String implements fmt.Stringer.

type InputStickerSetAnimatedEmoji

type InputStickerSetAnimatedEmoji struct {
}

InputStickerSetAnimatedEmoji represents TL type `inputStickerSetAnimatedEmoji#28703c8`. Animated emojis stickerset

See https://core.telegram.org/constructor/inputStickerSetAnimatedEmoji for reference.

func (*InputStickerSetAnimatedEmoji) Decode

Decode implements bin.Decoder.

func (*InputStickerSetAnimatedEmoji) Encode

Encode implements bin.Encoder.

func (*InputStickerSetAnimatedEmoji) String added in v0.12.0

String implements fmt.Stringer.

type InputStickerSetBox

type InputStickerSetBox struct {
	InputStickerSet InputStickerSetClass
}

InputStickerSet boxes the InputStickerSetClass providing a helper.

func (*InputStickerSetBox) Decode

func (b *InputStickerSetBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputStickerSetBox.

func (*InputStickerSetBox) Encode

func (b *InputStickerSetBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputStickerSetBox.

type InputStickerSetClass

type InputStickerSetClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputStickerSetClass represents InputStickerSet generic type.

See https://core.telegram.org/type/InputStickerSet for reference.

Example:

g, err := DecodeInputStickerSet(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputStickerSetEmpty: // inputStickerSetEmpty#ffb62b95
case *InputStickerSetID: // inputStickerSetID#9de7a269
case *InputStickerSetShortName: // inputStickerSetShortName#861cc8a0
case *InputStickerSetAnimatedEmoji: // inputStickerSetAnimatedEmoji#28703c8
case *InputStickerSetDice: // inputStickerSetDice#e67f520e
default: panic(v)
}

func DecodeInputStickerSet

func DecodeInputStickerSet(buf *bin.Buffer) (InputStickerSetClass, error)

DecodeInputStickerSet implements binary de-serialization for InputStickerSetClass.

type InputStickerSetDice

type InputStickerSetDice struct {
	// The emoji, for now ,  and  are supported
	Emoticon string
}

InputStickerSetDice represents TL type `inputStickerSetDice#e67f520e`. Used for fetching animated dice stickers¹

Links:

  1. https://core.telegram.org/api/dice

See https://core.telegram.org/constructor/inputStickerSetDice for reference.

func (*InputStickerSetDice) Decode

func (i *InputStickerSetDice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputStickerSetDice) Encode

func (i *InputStickerSetDice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputStickerSetDice) String added in v0.12.0

func (i *InputStickerSetDice) String() string

String implements fmt.Stringer.

type InputStickerSetEmpty

type InputStickerSetEmpty struct {
}

InputStickerSetEmpty represents TL type `inputStickerSetEmpty#ffb62b95`. Empty constructor

See https://core.telegram.org/constructor/inputStickerSetEmpty for reference.

func (*InputStickerSetEmpty) Decode

func (i *InputStickerSetEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputStickerSetEmpty) Encode

func (i *InputStickerSetEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputStickerSetEmpty) String added in v0.12.0

func (i *InputStickerSetEmpty) String() string

String implements fmt.Stringer.

type InputStickerSetID

type InputStickerSetID struct {
	// ID
	ID int64
	// Access hash
	AccessHash int64
}

InputStickerSetID represents TL type `inputStickerSetID#9de7a269`. Stickerset by ID

See https://core.telegram.org/constructor/inputStickerSetID for reference.

func (*InputStickerSetID) Decode

func (i *InputStickerSetID) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputStickerSetID) Encode

func (i *InputStickerSetID) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputStickerSetID) String added in v0.12.0

func (i *InputStickerSetID) String() string

String implements fmt.Stringer.

type InputStickerSetItem

type InputStickerSetItem struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The sticker
	Document InputDocumentClass
	// Associated emoji
	Emoji string
	// Coordinates for mask sticker
	//
	// Use SetMaskCoords and GetMaskCoords helpers.
	MaskCoords MaskCoords
}

InputStickerSetItem represents TL type `inputStickerSetItem#ffa0a496`. Sticker in a stickerset

See https://core.telegram.org/constructor/inputStickerSetItem for reference.

func (*InputStickerSetItem) Decode

func (i *InputStickerSetItem) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputStickerSetItem) Encode

func (i *InputStickerSetItem) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputStickerSetItem) GetMaskCoords

func (i *InputStickerSetItem) GetMaskCoords() (value MaskCoords, ok bool)

GetMaskCoords returns value of MaskCoords conditional field and boolean which is true if field was set.

func (*InputStickerSetItem) SetMaskCoords

func (i *InputStickerSetItem) SetMaskCoords(value MaskCoords)

SetMaskCoords sets value of MaskCoords conditional field.

func (*InputStickerSetItem) String added in v0.12.0

func (i *InputStickerSetItem) String() string

String implements fmt.Stringer.

type InputStickerSetShortName

type InputStickerSetShortName struct {
	// From tg://addstickers?set=short_name
	ShortName string
}

InputStickerSetShortName represents TL type `inputStickerSetShortName#861cc8a0`. Stickerset by short name, from tg://addstickers?set=short_name

See https://core.telegram.org/constructor/inputStickerSetShortName for reference.

func (*InputStickerSetShortName) Decode

func (i *InputStickerSetShortName) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputStickerSetShortName) Encode

func (i *InputStickerSetShortName) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputStickerSetShortName) String added in v0.12.0

func (i *InputStickerSetShortName) String() string

String implements fmt.Stringer.

type InputStickerSetThumb

type InputStickerSetThumb struct {
	// Sticker set
	Stickerset InputStickerSetClass
	// Volume ID
	VolumeID int64
	// Local ID
	LocalID int
}

InputStickerSetThumb represents TL type `inputStickerSetThumb#dbaeae9`. Location of stickerset thumbnail (see files¹)

Links:

  1. https://core.telegram.org/api/files

See https://core.telegram.org/constructor/inputStickerSetThumb for reference.

func (*InputStickerSetThumb) Decode

func (i *InputStickerSetThumb) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputStickerSetThumb) Encode

func (i *InputStickerSetThumb) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputStickerSetThumb) String added in v0.12.0

func (i *InputStickerSetThumb) String() string

String implements fmt.Stringer.

type InputStickeredMediaBox

type InputStickeredMediaBox struct {
	InputStickeredMedia InputStickeredMediaClass
}

InputStickeredMedia boxes the InputStickeredMediaClass providing a helper.

func (*InputStickeredMediaBox) Decode

func (b *InputStickeredMediaBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputStickeredMediaBox.

func (*InputStickeredMediaBox) Encode

func (b *InputStickeredMediaBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputStickeredMediaBox.

type InputStickeredMediaClass

type InputStickeredMediaClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputStickeredMediaClass represents InputStickeredMedia generic type.

See https://core.telegram.org/type/InputStickeredMedia for reference.

Example:

g, err := DecodeInputStickeredMedia(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputStickeredMediaPhoto: // inputStickeredMediaPhoto#4a992157
case *InputStickeredMediaDocument: // inputStickeredMediaDocument#438865b
default: panic(v)
}

func DecodeInputStickeredMedia

func DecodeInputStickeredMedia(buf *bin.Buffer) (InputStickeredMediaClass, error)

DecodeInputStickeredMedia implements binary de-serialization for InputStickeredMediaClass.

type InputStickeredMediaDocument

type InputStickeredMediaDocument struct {
	// The document
	ID InputDocumentClass
}

InputStickeredMediaDocument represents TL type `inputStickeredMediaDocument#438865b`. A document with stickers attached

See https://core.telegram.org/constructor/inputStickeredMediaDocument for reference.

func (*InputStickeredMediaDocument) Decode

Decode implements bin.Decoder.

func (*InputStickeredMediaDocument) Encode

Encode implements bin.Encoder.

func (*InputStickeredMediaDocument) String added in v0.12.0

func (i *InputStickeredMediaDocument) String() string

String implements fmt.Stringer.

type InputStickeredMediaPhoto

type InputStickeredMediaPhoto struct {
	// The photo
	ID InputPhotoClass
}

InputStickeredMediaPhoto represents TL type `inputStickeredMediaPhoto#4a992157`. A photo with stickers attached

See https://core.telegram.org/constructor/inputStickeredMediaPhoto for reference.

func (*InputStickeredMediaPhoto) Decode

func (i *InputStickeredMediaPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputStickeredMediaPhoto) Encode

func (i *InputStickeredMediaPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputStickeredMediaPhoto) String added in v0.12.0

func (i *InputStickeredMediaPhoto) String() string

String implements fmt.Stringer.

type InputTakeoutFileLocation

type InputTakeoutFileLocation struct {
}

InputTakeoutFileLocation represents TL type `inputTakeoutFileLocation#29be5899`. Empty constructor for takeout

See https://core.telegram.org/constructor/inputTakeoutFileLocation for reference.

func (*InputTakeoutFileLocation) Decode

func (i *InputTakeoutFileLocation) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputTakeoutFileLocation) Encode

func (i *InputTakeoutFileLocation) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputTakeoutFileLocation) String added in v0.12.0

func (i *InputTakeoutFileLocation) String() string

String implements fmt.Stringer.

type InputTheme

type InputTheme struct {
	// ID
	ID int64
	// Access hash
	AccessHash int64
}

InputTheme represents TL type `inputTheme#3c5693e9`. Theme

See https://core.telegram.org/constructor/inputTheme for reference.

func (*InputTheme) Decode

func (i *InputTheme) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputTheme) Encode

func (i *InputTheme) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputTheme) String added in v0.12.0

func (i *InputTheme) String() string

String implements fmt.Stringer.

type InputThemeBox

type InputThemeBox struct {
	InputTheme InputThemeClass
}

InputTheme boxes the InputThemeClass providing a helper.

func (*InputThemeBox) Decode

func (b *InputThemeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputThemeBox.

func (*InputThemeBox) Encode

func (b *InputThemeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputThemeBox.

type InputThemeClass

type InputThemeClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputThemeClass represents InputTheme generic type.

See https://core.telegram.org/type/InputTheme for reference.

Example:

g, err := DecodeInputTheme(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputTheme: // inputTheme#3c5693e9
case *InputThemeSlug: // inputThemeSlug#f5890df1
default: panic(v)
}

func DecodeInputTheme

func DecodeInputTheme(buf *bin.Buffer) (InputThemeClass, error)

DecodeInputTheme implements binary de-serialization for InputThemeClass.

type InputThemeSettings

type InputThemeSettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Default theme on which this theme is based
	BaseTheme BaseThemeClass
	// Accent color, RGB24 format
	AccentColor int
	// Message gradient color (top), RGB24 format
	//
	// Use SetMessageTopColor and GetMessageTopColor helpers.
	MessageTopColor int
	// Message gradient color (bottom), RGB24 format
	//
	// Use SetMessageBottomColor and GetMessageBottomColor helpers.
	MessageBottomColor int
	// Wallpaper
	//
	// Use SetWallpaper and GetWallpaper helpers.
	Wallpaper InputWallPaperClass
	// Wallpaper settings
	//
	// Use SetWallpaperSettings and GetWallpaperSettings helpers.
	WallpaperSettings WallPaperSettings
}

InputThemeSettings represents TL type `inputThemeSettings#bd507cd1`. Theme settings

See https://core.telegram.org/constructor/inputThemeSettings for reference.

func (*InputThemeSettings) Decode

func (i *InputThemeSettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputThemeSettings) Encode

func (i *InputThemeSettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputThemeSettings) GetMessageBottomColor

func (i *InputThemeSettings) GetMessageBottomColor() (value int, ok bool)

GetMessageBottomColor returns value of MessageBottomColor conditional field and boolean which is true if field was set.

func (*InputThemeSettings) GetMessageTopColor

func (i *InputThemeSettings) GetMessageTopColor() (value int, ok bool)

GetMessageTopColor returns value of MessageTopColor conditional field and boolean which is true if field was set.

func (*InputThemeSettings) GetWallpaper

func (i *InputThemeSettings) GetWallpaper() (value InputWallPaperClass, ok bool)

GetWallpaper returns value of Wallpaper conditional field and boolean which is true if field was set.

func (*InputThemeSettings) GetWallpaperSettings

func (i *InputThemeSettings) GetWallpaperSettings() (value WallPaperSettings, ok bool)

GetWallpaperSettings returns value of WallpaperSettings conditional field and boolean which is true if field was set.

func (*InputThemeSettings) SetMessageBottomColor

func (i *InputThemeSettings) SetMessageBottomColor(value int)

SetMessageBottomColor sets value of MessageBottomColor conditional field.

func (*InputThemeSettings) SetMessageTopColor

func (i *InputThemeSettings) SetMessageTopColor(value int)

SetMessageTopColor sets value of MessageTopColor conditional field.

func (*InputThemeSettings) SetWallpaper

func (i *InputThemeSettings) SetWallpaper(value InputWallPaperClass)

SetWallpaper sets value of Wallpaper conditional field.

func (*InputThemeSettings) SetWallpaperSettings

func (i *InputThemeSettings) SetWallpaperSettings(value WallPaperSettings)

SetWallpaperSettings sets value of WallpaperSettings conditional field.

func (*InputThemeSettings) String added in v0.12.0

func (i *InputThemeSettings) String() string

String implements fmt.Stringer.

type InputThemeSlug

type InputThemeSlug struct {
	// Unique theme ID
	Slug string
}

InputThemeSlug represents TL type `inputThemeSlug#f5890df1`. Theme by theme ID

See https://core.telegram.org/constructor/inputThemeSlug for reference.

func (*InputThemeSlug) Decode

func (i *InputThemeSlug) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputThemeSlug) Encode

func (i *InputThemeSlug) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputThemeSlug) String added in v0.12.0

func (i *InputThemeSlug) String() string

String implements fmt.Stringer.

type InputUser

type InputUser struct {
	// User identifier
	UserID int
	// access_hash value from the user¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/constructor/user
	AccessHash int64
}

InputUser represents TL type `inputUser#d8292816`. Defines a user for further interaction.

See https://core.telegram.org/constructor/inputUser for reference.

func (*InputUser) Decode

func (i *InputUser) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputUser) Encode

func (i *InputUser) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputUser) String added in v0.12.0

func (i *InputUser) String() string

String implements fmt.Stringer.

type InputUserBox

type InputUserBox struct {
	InputUser InputUserClass
}

InputUser boxes the InputUserClass providing a helper.

func (*InputUserBox) Decode

func (b *InputUserBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputUserBox.

func (*InputUserBox) Encode

func (b *InputUserBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputUserBox.

type InputUserClass

type InputUserClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputUserClass represents InputUser generic type.

See https://core.telegram.org/type/InputUser for reference.

Example:

g, err := DecodeInputUser(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputUserEmpty: // inputUserEmpty#b98886cf
case *InputUserSelf: // inputUserSelf#f7c1b13f
case *InputUser: // inputUser#d8292816
case *InputUserFromMessage: // inputUserFromMessage#2d117597
default: panic(v)
}

func DecodeInputUser

func DecodeInputUser(buf *bin.Buffer) (InputUserClass, error)

DecodeInputUser implements binary de-serialization for InputUserClass.

type InputUserEmpty

type InputUserEmpty struct {
}

InputUserEmpty represents TL type `inputUserEmpty#b98886cf`. Empty constructor, does not define a user.

See https://core.telegram.org/constructor/inputUserEmpty for reference.

func (*InputUserEmpty) Decode

func (i *InputUserEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputUserEmpty) Encode

func (i *InputUserEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputUserEmpty) String added in v0.12.0

func (i *InputUserEmpty) String() string

String implements fmt.Stringer.

type InputUserFromMessage

type InputUserFromMessage struct {
	// The chat where the user was seen
	Peer InputPeerClass
	// The message ID
	MsgID int
	// The identifier of the user that was seen
	UserID int
}

InputUserFromMessage represents TL type `inputUserFromMessage#2d117597`. Defines a min¹ user that was seen in a certain message of a certain chat.

Links:

  1. https://core.telegram.org/api/min

See https://core.telegram.org/constructor/inputUserFromMessage for reference.

func (*InputUserFromMessage) Decode

func (i *InputUserFromMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputUserFromMessage) Encode

func (i *InputUserFromMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputUserFromMessage) String added in v0.12.0

func (i *InputUserFromMessage) String() string

String implements fmt.Stringer.

type InputUserSelf

type InputUserSelf struct {
}

InputUserSelf represents TL type `inputUserSelf#f7c1b13f`. Defines the current user.

See https://core.telegram.org/constructor/inputUserSelf for reference.

func (*InputUserSelf) Decode

func (i *InputUserSelf) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputUserSelf) Encode

func (i *InputUserSelf) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputUserSelf) String added in v0.12.0

func (i *InputUserSelf) String() string

String implements fmt.Stringer.

type InputWallPaper

type InputWallPaper struct {
	// Wallpaper ID
	ID int64
	// Access hash
	AccessHash int64
}

InputWallPaper represents TL type `inputWallPaper#e630b979`. Wallpaper

See https://core.telegram.org/constructor/inputWallPaper for reference.

func (*InputWallPaper) Decode

func (i *InputWallPaper) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputWallPaper) Encode

func (i *InputWallPaper) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputWallPaper) String added in v0.12.0

func (i *InputWallPaper) String() string

String implements fmt.Stringer.

type InputWallPaperBox

type InputWallPaperBox struct {
	InputWallPaper InputWallPaperClass
}

InputWallPaper boxes the InputWallPaperClass providing a helper.

func (*InputWallPaperBox) Decode

func (b *InputWallPaperBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputWallPaperBox.

func (*InputWallPaperBox) Encode

func (b *InputWallPaperBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputWallPaperBox.

type InputWallPaperClass

type InputWallPaperClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputWallPaperClass represents InputWallPaper generic type.

See https://core.telegram.org/type/InputWallPaper for reference.

Example:

g, err := DecodeInputWallPaper(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputWallPaper: // inputWallPaper#e630b979
case *InputWallPaperSlug: // inputWallPaperSlug#72091c80
case *InputWallPaperNoFile: // inputWallPaperNoFile#8427bbac
default: panic(v)
}

func DecodeInputWallPaper

func DecodeInputWallPaper(buf *bin.Buffer) (InputWallPaperClass, error)

DecodeInputWallPaper implements binary de-serialization for InputWallPaperClass.

type InputWallPaperNoFile

type InputWallPaperNoFile struct {
}

InputWallPaperNoFile represents TL type `inputWallPaperNoFile#8427bbac`. Wallpaper with no file

See https://core.telegram.org/constructor/inputWallPaperNoFile for reference.

func (*InputWallPaperNoFile) Decode

func (i *InputWallPaperNoFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputWallPaperNoFile) Encode

func (i *InputWallPaperNoFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputWallPaperNoFile) String added in v0.12.0

func (i *InputWallPaperNoFile) String() string

String implements fmt.Stringer.

type InputWallPaperSlug

type InputWallPaperSlug struct {
	// Unique wallpaper ID
	Slug string
}

InputWallPaperSlug represents TL type `inputWallPaperSlug#72091c80`. Wallpaper by slug (a unique ID)

See https://core.telegram.org/constructor/inputWallPaperSlug for reference.

func (*InputWallPaperSlug) Decode

func (i *InputWallPaperSlug) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputWallPaperSlug) Encode

func (i *InputWallPaperSlug) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputWallPaperSlug) String added in v0.12.0

func (i *InputWallPaperSlug) String() string

String implements fmt.Stringer.

type InputWebDocument

type InputWebDocument struct {
	// Remote document URL to be downloaded using the appropriate method¹
	//
	// Links:
	//  1) https://core.telegram.org/api/files
	URL string
	// Remote file size
	Size int
	// Mime type
	MimeType string
	// Attributes for media types
	Attributes []DocumentAttributeClass
}

InputWebDocument represents TL type `inputWebDocument#9bed434d`. The document

See https://core.telegram.org/constructor/inputWebDocument for reference.

func (*InputWebDocument) Decode

func (i *InputWebDocument) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputWebDocument) Encode

func (i *InputWebDocument) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputWebDocument) String added in v0.12.0

func (i *InputWebDocument) String() string

String implements fmt.Stringer.

type InputWebFileGeoPointLocation

type InputWebFileGeoPointLocation struct {
	// Geolocation
	GeoPoint InputGeoPointClass
	// Access hash
	AccessHash int64
	// Map width in pixels before applying scale; 16-1024
	W int
	// Map height in pixels before applying scale; 16-1024
	H int
	// Map zoom level; 13-20
	Zoom int
	// Map scale; 1-3
	Scale int
}

InputWebFileGeoPointLocation represents TL type `inputWebFileGeoPointLocation#9f2221c9`. Geolocation

See https://core.telegram.org/constructor/inputWebFileGeoPointLocation for reference.

func (*InputWebFileGeoPointLocation) Decode

Decode implements bin.Decoder.

func (*InputWebFileGeoPointLocation) Encode

Encode implements bin.Encoder.

func (*InputWebFileGeoPointLocation) String added in v0.12.0

String implements fmt.Stringer.

type InputWebFileLocation

type InputWebFileLocation struct {
	// HTTP URL of file
	URL string
	// Access hash
	AccessHash int64
}

InputWebFileLocation represents TL type `inputWebFileLocation#c239d686`. Location of a remote HTTP(s) file

See https://core.telegram.org/constructor/inputWebFileLocation for reference.

func (*InputWebFileLocation) Decode

func (i *InputWebFileLocation) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*InputWebFileLocation) Encode

func (i *InputWebFileLocation) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*InputWebFileLocation) String added in v0.12.0

func (i *InputWebFileLocation) String() string

String implements fmt.Stringer.

type InputWebFileLocationBox

type InputWebFileLocationBox struct {
	InputWebFileLocation InputWebFileLocationClass
}

InputWebFileLocation boxes the InputWebFileLocationClass providing a helper.

func (*InputWebFileLocationBox) Decode

func (b *InputWebFileLocationBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for InputWebFileLocationBox.

func (*InputWebFileLocationBox) Encode

func (b *InputWebFileLocationBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for InputWebFileLocationBox.

type InputWebFileLocationClass

type InputWebFileLocationClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

InputWebFileLocationClass represents InputWebFileLocation generic type.

See https://core.telegram.org/type/InputWebFileLocation for reference.

Example:

g, err := DecodeInputWebFileLocation(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputWebFileLocation: // inputWebFileLocation#c239d686
case *InputWebFileGeoPointLocation: // inputWebFileGeoPointLocation#9f2221c9
default: panic(v)
}

func DecodeInputWebFileLocation

func DecodeInputWebFileLocation(buf *bin.Buffer) (InputWebFileLocationClass, error)

DecodeInputWebFileLocation implements binary de-serialization for InputWebFileLocationClass.

type IntVector added in v0.8.0

type IntVector struct {
	// Elements of Vector<int>
	Elems []int
}

IntVector is a box for Vector<int>

func (*IntVector) Decode added in v0.8.0

func (vec *IntVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*IntVector) Encode added in v0.8.0

func (vec *IntVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*IntVector) String added in v0.12.0

func (vec *IntVector) String() string

String implements fmt.Stringer.

type Invoice

type Invoice struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Test invoice
	Test bool
	// Set this flag if you require the user's full name to complete the order
	NameRequested bool
	// Set this flag if you require the user's phone number to complete the order
	PhoneRequested bool
	// Set this flag if you require the user's email address to complete the order
	EmailRequested bool
	// Set this flag if you require the user's shipping address to complete the order
	ShippingAddressRequested bool
	// Set this flag if the final price depends on the shipping method
	Flexible bool
	// Set this flag if user's phone number should be sent to provider
	PhoneToProvider bool
	// Set this flag if user's email address should be sent to provider
	EmailToProvider bool
	// Three-letter ISO 4217 currency¹ code
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments#supported-currencies
	Currency string
	// Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
	Prices []LabeledPrice
}

Invoice represents TL type `invoice#c30aa358`. Invoice

See https://core.telegram.org/constructor/invoice for reference.

func (*Invoice) Decode

func (i *Invoice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Invoice) Encode

func (i *Invoice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Invoice) SetEmailRequested

func (i *Invoice) SetEmailRequested(value bool)

SetEmailRequested sets value of EmailRequested conditional field.

func (*Invoice) SetEmailToProvider

func (i *Invoice) SetEmailToProvider(value bool)

SetEmailToProvider sets value of EmailToProvider conditional field.

func (*Invoice) SetFlexible

func (i *Invoice) SetFlexible(value bool)

SetFlexible sets value of Flexible conditional field.

func (*Invoice) SetNameRequested

func (i *Invoice) SetNameRequested(value bool)

SetNameRequested sets value of NameRequested conditional field.

func (*Invoice) SetPhoneRequested

func (i *Invoice) SetPhoneRequested(value bool)

SetPhoneRequested sets value of PhoneRequested conditional field.

func (*Invoice) SetPhoneToProvider

func (i *Invoice) SetPhoneToProvider(value bool)

SetPhoneToProvider sets value of PhoneToProvider conditional field.

func (*Invoice) SetShippingAddressRequested

func (i *Invoice) SetShippingAddressRequested(value bool)

SetShippingAddressRequested sets value of ShippingAddressRequested conditional field.

func (*Invoice) SetTest

func (i *Invoice) SetTest(value bool)

SetTest sets value of Test conditional field.

func (*Invoice) String added in v0.12.0

func (i *Invoice) String() string

String implements fmt.Stringer.

type Invoker

type Invoker interface {
	InvokeRaw(ctx context.Context, input bin.Encoder, output bin.Decoder) error
}

Invoker can invoke raw MTProto rpc calls.

type JSONValueBox

type JSONValueBox struct {
	JSONValue JSONValueClass
}

JSONValue boxes the JSONValueClass providing a helper.

func (*JSONValueBox) Decode

func (b *JSONValueBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for JSONValueBox.

func (*JSONValueBox) Encode

func (b *JSONValueBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for JSONValueBox.

type JSONValueClass

type JSONValueClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

JSONValueClass represents JSONValue generic type.

See https://core.telegram.org/type/JSONValue for reference.

Example:

g, err := DecodeJSONValue(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *JsonNull: // jsonNull#3f6d7b68
case *JsonBool: // jsonBool#c7345e6a
case *JsonNumber: // jsonNumber#2be0dfa4
case *JsonString: // jsonString#b71e767a
case *JsonArray: // jsonArray#f7444763
case *JsonObject: // jsonObject#99c1d49d
default: panic(v)
}

func DecodeJSONValue

func DecodeJSONValue(buf *bin.Buffer) (JSONValueClass, error)

DecodeJSONValue implements binary de-serialization for JSONValueClass.

type JsonArray

type JsonArray struct {
	// JSON values
	Value []JSONValueClass
}

JsonArray represents TL type `jsonArray#f7444763`. JSON array

See https://core.telegram.org/constructor/jsonArray for reference.

func (*JsonArray) Decode

func (j *JsonArray) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*JsonArray) Encode

func (j *JsonArray) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*JsonArray) String added in v0.12.0

func (j *JsonArray) String() string

String implements fmt.Stringer.

type JsonBool

type JsonBool struct {
	// Value
	Value bool
}

JsonBool represents TL type `jsonBool#c7345e6a`. JSON boolean value

See https://core.telegram.org/constructor/jsonBool for reference.

func (*JsonBool) Decode

func (j *JsonBool) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*JsonBool) Encode

func (j *JsonBool) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*JsonBool) String added in v0.12.0

func (j *JsonBool) String() string

String implements fmt.Stringer.

type JsonNull

type JsonNull struct {
}

JsonNull represents TL type `jsonNull#3f6d7b68`. null JSON value

See https://core.telegram.org/constructor/jsonNull for reference.

func (*JsonNull) Decode

func (j *JsonNull) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*JsonNull) Encode

func (j *JsonNull) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*JsonNull) String added in v0.12.0

func (j *JsonNull) String() string

String implements fmt.Stringer.

type JsonNumber

type JsonNumber struct {
	// Value
	Value float64
}

JsonNumber represents TL type `jsonNumber#2be0dfa4`. JSON numeric value

See https://core.telegram.org/constructor/jsonNumber for reference.

func (*JsonNumber) Decode

func (j *JsonNumber) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*JsonNumber) Encode

func (j *JsonNumber) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*JsonNumber) String added in v0.12.0

func (j *JsonNumber) String() string

String implements fmt.Stringer.

type JsonObject

type JsonObject struct {
	// Values
	Value []JsonObjectValue
}

JsonObject represents TL type `jsonObject#99c1d49d`. JSON object value

See https://core.telegram.org/constructor/jsonObject for reference.

func (*JsonObject) Decode

func (j *JsonObject) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*JsonObject) Encode

func (j *JsonObject) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*JsonObject) String added in v0.12.0

func (j *JsonObject) String() string

String implements fmt.Stringer.

type JsonObjectValue

type JsonObjectValue struct {
	// Key
	Key string
	// Value
	Value JSONValueClass
}

JsonObjectValue represents TL type `jsonObjectValue#c0de1bd9`. JSON key: value pair

See https://core.telegram.org/constructor/jsonObjectValue for reference.

func (*JsonObjectValue) Decode

func (j *JsonObjectValue) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*JsonObjectValue) Encode

func (j *JsonObjectValue) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*JsonObjectValue) String added in v0.12.0

func (j *JsonObjectValue) String() string

String implements fmt.Stringer.

type JsonString

type JsonString struct {
	// Value
	Value string
}

JsonString represents TL type `jsonString#b71e767a`. JSON string

See https://core.telegram.org/constructor/jsonString for reference.

func (*JsonString) Decode

func (j *JsonString) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*JsonString) Encode

func (j *JsonString) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*JsonString) String added in v0.12.0

func (j *JsonString) String() string

String implements fmt.Stringer.

type KeyboardButton

type KeyboardButton struct {
	// Button text
	Text string
}

KeyboardButton represents TL type `keyboardButton#a2fa4880`. Bot keyboard button

See https://core.telegram.org/constructor/keyboardButton for reference.

func (*KeyboardButton) Decode

func (k *KeyboardButton) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*KeyboardButton) Encode

func (k *KeyboardButton) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*KeyboardButton) String added in v0.12.0

func (k *KeyboardButton) String() string

String implements fmt.Stringer.

type KeyboardButtonBox

type KeyboardButtonBox struct {
	KeyboardButton KeyboardButtonClass
}

KeyboardButton boxes the KeyboardButtonClass providing a helper.

func (*KeyboardButtonBox) Decode

func (b *KeyboardButtonBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for KeyboardButtonBox.

func (*KeyboardButtonBox) Encode

func (b *KeyboardButtonBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for KeyboardButtonBox.

type KeyboardButtonBuy

type KeyboardButtonBuy struct {
	// Button text
	Text string
}

KeyboardButtonBuy represents TL type `keyboardButtonBuy#afd93fbb`. Button to buy a product

See https://core.telegram.org/constructor/keyboardButtonBuy for reference.

func (*KeyboardButtonBuy) Decode

func (k *KeyboardButtonBuy) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*KeyboardButtonBuy) Encode

func (k *KeyboardButtonBuy) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*KeyboardButtonBuy) String added in v0.12.0

func (k *KeyboardButtonBuy) String() string

String implements fmt.Stringer.

type KeyboardButtonCallback

type KeyboardButtonCallback struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the user should verify his identity by entering his 2FA SRP parameters¹ to the messages.getBotCallbackAnswer² method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to SRP³. This button is mainly used by the official @botfather⁴ bot, for verifying the user's identity before transferring ownership of a bot to another user.
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	//  2) https://core.telegram.org/method/messages.getBotCallbackAnswer
	//  3) https://core.telegram.org/api/srp
	//  4) https://t.me/botfather
	RequiresPassword bool
	// Button text
	Text string
	// Callback data
	Data []byte
}

KeyboardButtonCallback represents TL type `keyboardButtonCallback#35bbdb6b`. Callback button

See https://core.telegram.org/constructor/keyboardButtonCallback for reference.

func (*KeyboardButtonCallback) Decode

func (k *KeyboardButtonCallback) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*KeyboardButtonCallback) Encode

func (k *KeyboardButtonCallback) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*KeyboardButtonCallback) SetRequiresPassword

func (k *KeyboardButtonCallback) SetRequiresPassword(value bool)

SetRequiresPassword sets value of RequiresPassword conditional field.

func (*KeyboardButtonCallback) String added in v0.12.0

func (k *KeyboardButtonCallback) String() string

String implements fmt.Stringer.

type KeyboardButtonClass

type KeyboardButtonClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

KeyboardButtonClass represents KeyboardButton generic type.

See https://core.telegram.org/type/KeyboardButton for reference.

Example:

g, err := DecodeKeyboardButton(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *KeyboardButton: // keyboardButton#a2fa4880
case *KeyboardButtonUrl: // keyboardButtonUrl#258aff05
case *KeyboardButtonCallback: // keyboardButtonCallback#35bbdb6b
case *KeyboardButtonRequestPhone: // keyboardButtonRequestPhone#b16a6c29
case *KeyboardButtonRequestGeoLocation: // keyboardButtonRequestGeoLocation#fc796b3f
case *KeyboardButtonSwitchInline: // keyboardButtonSwitchInline#568a748
case *KeyboardButtonGame: // keyboardButtonGame#50f41ccf
case *KeyboardButtonBuy: // keyboardButtonBuy#afd93fbb
case *KeyboardButtonUrlAuth: // keyboardButtonUrlAuth#10b78d29
case *InputKeyboardButtonUrlAuth: // inputKeyboardButtonUrlAuth#d02e7fd4
case *KeyboardButtonRequestPoll: // keyboardButtonRequestPoll#bbc7515d
default: panic(v)
}

func DecodeKeyboardButton

func DecodeKeyboardButton(buf *bin.Buffer) (KeyboardButtonClass, error)

DecodeKeyboardButton implements binary de-serialization for KeyboardButtonClass.

type KeyboardButtonGame

type KeyboardButtonGame struct {
	// Button text
	Text string
}

KeyboardButtonGame represents TL type `keyboardButtonGame#50f41ccf`. Button to start a game

See https://core.telegram.org/constructor/keyboardButtonGame for reference.

func (*KeyboardButtonGame) Decode

func (k *KeyboardButtonGame) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*KeyboardButtonGame) Encode

func (k *KeyboardButtonGame) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*KeyboardButtonGame) String added in v0.12.0

func (k *KeyboardButtonGame) String() string

String implements fmt.Stringer.

type KeyboardButtonRequestGeoLocation

type KeyboardButtonRequestGeoLocation struct {
	// Button text
	Text string
}

KeyboardButtonRequestGeoLocation represents TL type `keyboardButtonRequestGeoLocation#fc796b3f`. Button to request a user's geolocation

See https://core.telegram.org/constructor/keyboardButtonRequestGeoLocation for reference.

func (*KeyboardButtonRequestGeoLocation) Decode

Decode implements bin.Decoder.

func (*KeyboardButtonRequestGeoLocation) Encode

Encode implements bin.Encoder.

func (*KeyboardButtonRequestGeoLocation) String added in v0.12.0

String implements fmt.Stringer.

type KeyboardButtonRequestPhone

type KeyboardButtonRequestPhone struct {
	// Button text
	Text string
}

KeyboardButtonRequestPhone represents TL type `keyboardButtonRequestPhone#b16a6c29`. Button to request a user's phone number

See https://core.telegram.org/constructor/keyboardButtonRequestPhone for reference.

func (*KeyboardButtonRequestPhone) Decode

Decode implements bin.Decoder.

func (*KeyboardButtonRequestPhone) Encode

Encode implements bin.Encoder.

func (*KeyboardButtonRequestPhone) String added in v0.12.0

func (k *KeyboardButtonRequestPhone) String() string

String implements fmt.Stringer.

type KeyboardButtonRequestPoll

type KeyboardButtonRequestPoll struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If set, only quiz polls can be sent
	//
	// Use SetQuiz and GetQuiz helpers.
	Quiz bool
	// Button text
	Text string
}

KeyboardButtonRequestPoll represents TL type `keyboardButtonRequestPoll#bbc7515d`. A button that allows the user to create and send a poll when pressed; available only in private

See https://core.telegram.org/constructor/keyboardButtonRequestPoll for reference.

func (*KeyboardButtonRequestPoll) Decode

func (k *KeyboardButtonRequestPoll) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*KeyboardButtonRequestPoll) Encode

func (k *KeyboardButtonRequestPoll) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*KeyboardButtonRequestPoll) GetQuiz added in v0.17.0

func (k *KeyboardButtonRequestPoll) GetQuiz() (value bool, ok bool)

GetQuiz returns value of Quiz conditional field and boolean which is true if field was set.

func (*KeyboardButtonRequestPoll) SetQuiz

func (k *KeyboardButtonRequestPoll) SetQuiz(value bool)

SetQuiz sets value of Quiz conditional field.

func (*KeyboardButtonRequestPoll) String added in v0.12.0

func (k *KeyboardButtonRequestPoll) String() string

String implements fmt.Stringer.

type KeyboardButtonRow

type KeyboardButtonRow struct {
	// Bot or inline keyboard buttons
	Buttons []KeyboardButtonClass
}

KeyboardButtonRow represents TL type `keyboardButtonRow#77608b83`. Inline keyboard row

See https://core.telegram.org/constructor/keyboardButtonRow for reference.

func (*KeyboardButtonRow) Decode

func (k *KeyboardButtonRow) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*KeyboardButtonRow) Encode

func (k *KeyboardButtonRow) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*KeyboardButtonRow) String added in v0.12.0

func (k *KeyboardButtonRow) String() string

String implements fmt.Stringer.

type KeyboardButtonSwitchInline

type KeyboardButtonSwitchInline struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field.
	SamePeer bool
	// Button label
	Text string
	// The inline query to use
	Query string
}

KeyboardButtonSwitchInline represents TL type `keyboardButtonSwitchInline#568a748`. Button to force a user to switch to inline mode Pressing the button will prompt the user to select one of their chats, open that chat and insert the bot‘s username and the specified inline query in the input field.

See https://core.telegram.org/constructor/keyboardButtonSwitchInline for reference.

func (*KeyboardButtonSwitchInline) Decode

Decode implements bin.Decoder.

func (*KeyboardButtonSwitchInline) Encode

Encode implements bin.Encoder.

func (*KeyboardButtonSwitchInline) SetSamePeer

func (k *KeyboardButtonSwitchInline) SetSamePeer(value bool)

SetSamePeer sets value of SamePeer conditional field.

func (*KeyboardButtonSwitchInline) String added in v0.12.0

func (k *KeyboardButtonSwitchInline) String() string

String implements fmt.Stringer.

type KeyboardButtonUrl

type KeyboardButtonUrl struct {
	// Button label
	Text string
	// URL
	URL string
}

KeyboardButtonUrl represents TL type `keyboardButtonUrl#258aff05`. URL button

See https://core.telegram.org/constructor/keyboardButtonUrl for reference.

func (*KeyboardButtonUrl) Decode

func (k *KeyboardButtonUrl) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*KeyboardButtonUrl) Encode

func (k *KeyboardButtonUrl) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*KeyboardButtonUrl) String added in v0.12.0

func (k *KeyboardButtonUrl) String() string

String implements fmt.Stringer.

type KeyboardButtonUrlAuth

type KeyboardButtonUrlAuth struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Button label
	Text string
	// New text of the button in forwarded messages.
	//
	// Use SetFwdText and GetFwdText helpers.
	FwdText string
	// An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data¹.NOTE: Services must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization².
	//
	// Links:
	//  1) https://core.telegram.org/widgets/login#receiving-authorization-data
	//  2) https://core.telegram.org/widgets/login#checking-authorization
	URL string
	// ID of the button to pass to messages.requestUrlAuth¹
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.requestUrlAuth
	ButtonID int
}

KeyboardButtonUrlAuth represents TL type `keyboardButtonUrlAuth#10b78d29`. Button to request a user to authorize via URL using Seamless Telegram Login¹. When the user clicks on such a button, messages.requestUrlAuth² should be called, providing the button_id and the ID of the container message. The returned urlAuthResultRequest³ object will contain more details about the authorization request (request_write_access if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call messages.acceptUrlAuth⁴ to get a urlAuthResultAccepted⁵ with the URL to open instead of the url of this constructor, or a urlAuthResultDefault⁶, in which case the url of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the url of this constructor must be used.

Links:

  1. https://telegram.org/blog/privacy-discussions-web-bots#meet-seamless-web-bots
  2. https://core.telegram.org/method/messages.requestUrlAuth
  3. https://core.telegram.org/constructor/urlAuthResultRequest
  4. https://core.telegram.org/method/messages.acceptUrlAuth
  5. https://core.telegram.org/constructor/urlAuthResultAccepted
  6. https://core.telegram.org/constructor/urlAuthResultDefault

See https://core.telegram.org/constructor/keyboardButtonUrlAuth for reference.

func (*KeyboardButtonUrlAuth) Decode

func (k *KeyboardButtonUrlAuth) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*KeyboardButtonUrlAuth) Encode

func (k *KeyboardButtonUrlAuth) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*KeyboardButtonUrlAuth) GetFwdText

func (k *KeyboardButtonUrlAuth) GetFwdText() (value string, ok bool)

GetFwdText returns value of FwdText conditional field and boolean which is true if field was set.

func (*KeyboardButtonUrlAuth) SetFwdText

func (k *KeyboardButtonUrlAuth) SetFwdText(value string)

SetFwdText sets value of FwdText conditional field.

func (*KeyboardButtonUrlAuth) String added in v0.12.0

func (k *KeyboardButtonUrlAuth) String() string

String implements fmt.Stringer.

type LabeledPrice

type LabeledPrice struct {
	// Portion label
	Label string
	// Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json¹, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments/currencies.json
	Amount int64
}

LabeledPrice represents TL type `labeledPrice#cb296bf8`. This object represents a portion of the price for goods or services.

See https://core.telegram.org/constructor/labeledPrice for reference.

func (*LabeledPrice) Decode

func (l *LabeledPrice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*LabeledPrice) Encode

func (l *LabeledPrice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*LabeledPrice) String added in v0.12.0

func (l *LabeledPrice) String() string

String implements fmt.Stringer.

type LangPackDifference

type LangPackDifference struct {
	// Language code
	LangCode string
	// Previous version number
	FromVersion int
	// New version number
	Version int
	// Localized strings
	Strings []LangPackStringClass
}

LangPackDifference represents TL type `langPackDifference#f385c1f6`. Changes to the app's localization pack

See https://core.telegram.org/constructor/langPackDifference for reference.

func (*LangPackDifference) Decode

func (l *LangPackDifference) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*LangPackDifference) Encode

func (l *LangPackDifference) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*LangPackDifference) String added in v0.12.0

func (l *LangPackDifference) String() string

String implements fmt.Stringer.

type LangPackHandler added in v0.9.0

type LangPackHandler func(ctx UpdateContext, update *UpdateLangPack) error

LangPackHandler is a LangPack event handler.

type LangPackLanguage

type LangPackLanguage struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the language pack is official
	Official bool
	// Is this a localization pack for an RTL language
	Rtl bool
	// Is this a beta localization pack?
	Beta bool
	// Language name
	Name string
	// Language name in the language itself
	NativeName string
	// Language code (pack identifier)
	LangCode string
	// Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs
	//
	// Use SetBaseLangCode and GetBaseLangCode helpers.
	BaseLangCode string
	// 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 info
	//
	// Links:
	//  1) https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html
	PluralCode string
	// Total number of non-deleted strings from the language pack
	StringsCount int
	// Total number of translated strings from the language pack
	TranslatedCount int
	// Link to language translation interface; empty for custom local language packs
	TranslationsURL string
}

LangPackLanguage represents TL type `langPackLanguage#eeca5ce3`. Identifies a localization pack

See https://core.telegram.org/constructor/langPackLanguage for reference.

func (*LangPackLanguage) Decode

func (l *LangPackLanguage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*LangPackLanguage) Encode

func (l *LangPackLanguage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*LangPackLanguage) GetBaseLangCode

func (l *LangPackLanguage) GetBaseLangCode() (value string, ok bool)

GetBaseLangCode returns value of BaseLangCode conditional field and boolean which is true if field was set.

func (*LangPackLanguage) SetBaseLangCode

func (l *LangPackLanguage) SetBaseLangCode(value string)

SetBaseLangCode sets value of BaseLangCode conditional field.

func (*LangPackLanguage) SetBeta

func (l *LangPackLanguage) SetBeta(value bool)

SetBeta sets value of Beta conditional field.

func (*LangPackLanguage) SetOfficial

func (l *LangPackLanguage) SetOfficial(value bool)

SetOfficial sets value of Official conditional field.

func (*LangPackLanguage) SetRtl

func (l *LangPackLanguage) SetRtl(value bool)

SetRtl sets value of Rtl conditional field.

func (*LangPackLanguage) String added in v0.12.0

func (l *LangPackLanguage) String() string

String implements fmt.Stringer.

type LangPackLanguageVector added in v0.8.0

type LangPackLanguageVector struct {
	// Elements of Vector<LangPackLanguage>
	Elems []LangPackLanguage
}

LangPackLanguageVector is a box for Vector<LangPackLanguage>

func (*LangPackLanguageVector) Decode added in v0.8.0

func (vec *LangPackLanguageVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*LangPackLanguageVector) Encode added in v0.8.0

func (vec *LangPackLanguageVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*LangPackLanguageVector) String added in v0.12.0

func (vec *LangPackLanguageVector) String() string

String implements fmt.Stringer.

type LangPackString

type LangPackString struct {
	// Language key
	Key string
	// Value
	Value string
}

LangPackString represents TL type `langPackString#cad181f6`. Translated localization string

See https://core.telegram.org/constructor/langPackString for reference.

func (*LangPackString) Decode

func (l *LangPackString) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*LangPackString) Encode

func (l *LangPackString) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*LangPackString) String added in v0.12.0

func (l *LangPackString) String() string

String implements fmt.Stringer.

type LangPackStringBox

type LangPackStringBox struct {
	LangPackString LangPackStringClass
}

LangPackString boxes the LangPackStringClass providing a helper.

func (*LangPackStringBox) Decode

func (b *LangPackStringBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for LangPackStringBox.

func (*LangPackStringBox) Encode

func (b *LangPackStringBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for LangPackStringBox.

type LangPackStringClass

type LangPackStringClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

LangPackStringClass represents LangPackString generic type.

See https://core.telegram.org/type/LangPackString for reference.

Example:

g, err := DecodeLangPackString(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *LangPackString: // langPackString#cad181f6
case *LangPackStringPluralized: // langPackStringPluralized#6c47ac9f
case *LangPackStringDeleted: // langPackStringDeleted#2979eeb2
default: panic(v)
}

func DecodeLangPackString

func DecodeLangPackString(buf *bin.Buffer) (LangPackStringClass, error)

DecodeLangPackString implements binary de-serialization for LangPackStringClass.

type LangPackStringClassVector added in v0.8.0

type LangPackStringClassVector struct {
	// Elements of Vector<LangPackString>
	Elems []LangPackStringClass
}

LangPackStringClassVector is a box for Vector<LangPackString>

func (*LangPackStringClassVector) Decode added in v0.8.0

func (vec *LangPackStringClassVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*LangPackStringClassVector) Encode added in v0.8.0

func (vec *LangPackStringClassVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*LangPackStringClassVector) String added in v0.12.0

func (vec *LangPackStringClassVector) String() string

String implements fmt.Stringer.

type LangPackStringDeleted

type LangPackStringDeleted struct {
	// Localization key
	Key string
}

LangPackStringDeleted represents TL type `langPackStringDeleted#2979eeb2`. Deleted localization string

See https://core.telegram.org/constructor/langPackStringDeleted for reference.

func (*LangPackStringDeleted) Decode

func (l *LangPackStringDeleted) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*LangPackStringDeleted) Encode

func (l *LangPackStringDeleted) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*LangPackStringDeleted) String added in v0.12.0

func (l *LangPackStringDeleted) String() string

String implements fmt.Stringer.

type LangPackStringPluralized

type LangPackStringPluralized struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Localization key
	Key string
	// Value for zero objects
	//
	// Use SetZeroValue and GetZeroValue helpers.
	ZeroValue string
	// Value for one object
	//
	// Use SetOneValue and GetOneValue helpers.
	OneValue string
	// Value for two objects
	//
	// Use SetTwoValue and GetTwoValue helpers.
	TwoValue string
	// Value for a few objects
	//
	// Use SetFewValue and GetFewValue helpers.
	FewValue string
	// Value for many objects
	//
	// Use SetManyValue and GetManyValue helpers.
	ManyValue string
	// Default value
	OtherValue string
}

LangPackStringPluralized represents TL type `langPackStringPluralized#6c47ac9f`. 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 info

Links:

  1. https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html

See https://core.telegram.org/constructor/langPackStringPluralized for reference.

func (*LangPackStringPluralized) Decode

func (l *LangPackStringPluralized) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*LangPackStringPluralized) Encode

func (l *LangPackStringPluralized) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*LangPackStringPluralized) GetFewValue

func (l *LangPackStringPluralized) GetFewValue() (value string, ok bool)

GetFewValue returns value of FewValue conditional field and boolean which is true if field was set.

func (*LangPackStringPluralized) GetManyValue

func (l *LangPackStringPluralized) GetManyValue() (value string, ok bool)

GetManyValue returns value of ManyValue conditional field and boolean which is true if field was set.

func (*LangPackStringPluralized) GetOneValue

func (l *LangPackStringPluralized) GetOneValue() (value string, ok bool)

GetOneValue returns value of OneValue conditional field and boolean which is true if field was set.

func (*LangPackStringPluralized) GetTwoValue

func (l *LangPackStringPluralized) GetTwoValue() (value string, ok bool)

GetTwoValue returns value of TwoValue conditional field and boolean which is true if field was set.

func (*LangPackStringPluralized) GetZeroValue

func (l *LangPackStringPluralized) GetZeroValue() (value string, ok bool)

GetZeroValue returns value of ZeroValue conditional field and boolean which is true if field was set.

func (*LangPackStringPluralized) SetFewValue

func (l *LangPackStringPluralized) SetFewValue(value string)

SetFewValue sets value of FewValue conditional field.

func (*LangPackStringPluralized) SetManyValue

func (l *LangPackStringPluralized) SetManyValue(value string)

SetManyValue sets value of ManyValue conditional field.

func (*LangPackStringPluralized) SetOneValue

func (l *LangPackStringPluralized) SetOneValue(value string)

SetOneValue sets value of OneValue conditional field.

func (*LangPackStringPluralized) SetTwoValue

func (l *LangPackStringPluralized) SetTwoValue(value string)

SetTwoValue sets value of TwoValue conditional field.

func (*LangPackStringPluralized) SetZeroValue

func (l *LangPackStringPluralized) SetZeroValue(value string)

SetZeroValue sets value of ZeroValue conditional field.

func (*LangPackStringPluralized) String added in v0.12.0

func (l *LangPackStringPluralized) String() string

String implements fmt.Stringer.

type LangPackTooLongHandler added in v0.9.0

type LangPackTooLongHandler func(ctx UpdateContext, update *UpdateLangPackTooLong) error

LangPackTooLongHandler is a LangPackTooLong event handler.

type LangpackGetDifferenceRequest

type LangpackGetDifferenceRequest struct {
	// Language pack
	LangPack string
	// Language code
	LangCode string
	// Previous localization pack version
	FromVersion int
}

LangpackGetDifferenceRequest represents TL type `langpack.getDifference#cd984aa5`. Get new strings in languagepack

See https://core.telegram.org/method/langpack.getDifference for reference.

func (*LangpackGetDifferenceRequest) Decode

Decode implements bin.Decoder.

func (*LangpackGetDifferenceRequest) Encode

Encode implements bin.Encoder.

func (*LangpackGetDifferenceRequest) String added in v0.12.0

String implements fmt.Stringer.

type LangpackGetLangPackRequest

type LangpackGetLangPackRequest struct {
	// Language pack name
	LangPack string
	// Language code
	LangCode string
}

LangpackGetLangPackRequest represents TL type `langpack.getLangPack#f2f2330a`. Get localization pack strings

See https://core.telegram.org/method/langpack.getLangPack for reference.

func (*LangpackGetLangPackRequest) Decode

Decode implements bin.Decoder.

func (*LangpackGetLangPackRequest) Encode

Encode implements bin.Encoder.

func (*LangpackGetLangPackRequest) String added in v0.12.0

func (g *LangpackGetLangPackRequest) String() string

String implements fmt.Stringer.

type LangpackGetLanguageRequest

type LangpackGetLanguageRequest struct {
	// Language pack name
	LangPack string
	// Language code
	LangCode string
}

LangpackGetLanguageRequest represents TL type `langpack.getLanguage#6a596502`. Get information about a language in a localization pack

See https://core.telegram.org/method/langpack.getLanguage for reference.

func (*LangpackGetLanguageRequest) Decode

Decode implements bin.Decoder.

func (*LangpackGetLanguageRequest) Encode

Encode implements bin.Encoder.

func (*LangpackGetLanguageRequest) String added in v0.12.0

func (g *LangpackGetLanguageRequest) String() string

String implements fmt.Stringer.

type LangpackGetLanguagesRequest

type LangpackGetLanguagesRequest struct {
	// Language pack
	LangPack string
}

LangpackGetLanguagesRequest represents TL type `langpack.getLanguages#42c6978f`. Get information about all languages in a localization pack

See https://core.telegram.org/method/langpack.getLanguages for reference.

func (*LangpackGetLanguagesRequest) Decode

Decode implements bin.Decoder.

func (*LangpackGetLanguagesRequest) Encode

Encode implements bin.Encoder.

func (*LangpackGetLanguagesRequest) String added in v0.12.0

func (g *LangpackGetLanguagesRequest) String() string

String implements fmt.Stringer.

type LangpackGetStringsRequest

type LangpackGetStringsRequest struct {
	// Language pack name
	LangPack string
	// Language code
	LangCode string
	// Strings to get
	Keys []string
}

LangpackGetStringsRequest represents TL type `langpack.getStrings#efea3803`. Get strings from a language pack

See https://core.telegram.org/method/langpack.getStrings for reference.

func (*LangpackGetStringsRequest) Decode

func (g *LangpackGetStringsRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*LangpackGetStringsRequest) Encode

func (g *LangpackGetStringsRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*LangpackGetStringsRequest) String added in v0.12.0

func (g *LangpackGetStringsRequest) String() string

String implements fmt.Stringer.

type LoginTokenHandler added in v0.9.0

type LoginTokenHandler func(ctx UpdateContext, update *UpdateLoginToken) error

LoginTokenHandler is a LoginToken event handler.

type LongVector added in v0.8.0

type LongVector struct {
	// Elements of Vector<long>
	Elems []int64
}

LongVector is a box for Vector<long>

func (*LongVector) Decode added in v0.8.0

func (vec *LongVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*LongVector) Encode added in v0.8.0

func (vec *LongVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*LongVector) String added in v0.12.0

func (vec *LongVector) String() string

String implements fmt.Stringer.

type MaskCoords

type MaskCoords struct {
	// Part of the face, relative to which the mask should be placed
	N int
	// 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)
	X float64
	// Shift by Y-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)
	Y float64
	// Mask scaling coefficient. (For example, 2.0 means a doubled size)
	Zoom float64
}

MaskCoords represents TL type `maskCoords#aed6dbb2`. Position on a photo where a mask should be placed The n position indicates where the mask should be placed:

See https://core.telegram.org/constructor/maskCoords for reference.

func (*MaskCoords) Decode

func (m *MaskCoords) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MaskCoords) Encode

func (m *MaskCoords) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MaskCoords) String added in v0.12.0

func (m *MaskCoords) String() string

String implements fmt.Stringer.

type Message

type Message struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Is this an outgoing message
	Out bool
	// Whether we were mentioned¹ in this message
	//
	// Links:
	//  1) https://core.telegram.org/api/mentions
	Mentioned bool
	// Whether there are unread media attachments in this message
	MediaUnread bool
	// Whether this is a silent message (no notification triggered)
	Silent bool
	// Whether this is a channel post
	Post bool
	// Whether this is a scheduled message¹
	//
	// Links:
	//  1) https://core.telegram.org/api/scheduled-messages
	FromScheduled bool
	// This is a legacy message: it has to be refetched with the new layer
	Legacy bool
	// Whether the message should be shown as not modified to the user, even if an edit date is present
	EditHide bool
	// Whether this message is pinned¹
	//
	// Links:
	//  1) https://core.telegram.org/api/pin
	Pinned bool
	// ID of the message
	ID int
	// ID of the sender of the message
	//
	// Use SetFromID and GetFromID helpers.
	FromID PeerClass
	// Peer ID, the chat where this message was sent
	PeerID PeerClass
	// Info about forwarded messages
	//
	// Use SetFwdFrom and GetFwdFrom helpers.
	FwdFrom MessageFwdHeader
	// ID of the inline bot that generated the message
	//
	// Use SetViaBotID and GetViaBotID helpers.
	ViaBotID int
	// Reply information
	//
	// Use SetReplyTo and GetReplyTo helpers.
	ReplyTo MessageReplyHeader
	// Date of the message
	Date int
	// The message
	Message string
	// Media attachment
	//
	// Use SetMedia and GetMedia helpers.
	Media MessageMediaClass
	// Reply markup (bot/inline keyboards)
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
	// Message entities¹ for styled text
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
	// View count for channel posts
	//
	// Use SetViews and GetViews helpers.
	Views int
	// Forward counter
	//
	// Use SetForwards and GetForwards helpers.
	Forwards int
	// Info about post comments (for channels) or message replies (for groups)¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetReplies and GetReplies helpers.
	Replies MessageReplies
	// Last edit date of this message
	//
	// Use SetEditDate and GetEditDate helpers.
	EditDate int
	// Name of the author of this message for channel posts (with signatures enabled)
	//
	// Use SetPostAuthor and GetPostAuthor helpers.
	PostAuthor string
	// Multiple media messages sent using messages.sendMultiMedia¹ with the same grouped ID indicate an album or media group²
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.sendMultiMedia
	//  2) https://core.telegram.org/api/files#albums-grouped-media
	//
	// Use SetGroupedID and GetGroupedID helpers.
	GroupedID int64
	// Contains the reason why access to this message must be restricted.
	//
	// Use SetRestrictionReason and GetRestrictionReason helpers.
	RestrictionReason []RestrictionReason
}

Message represents TL type `message#58ae39c9`. A message

See https://core.telegram.org/constructor/message for reference.

func (*Message) Decode

func (m *Message) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Message) Encode

func (m *Message) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Message) GetEditDate

func (m *Message) GetEditDate() (value int, ok bool)

GetEditDate returns value of EditDate conditional field and boolean which is true if field was set.

func (*Message) GetEntities

func (m *Message) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*Message) GetForwards

func (m *Message) GetForwards() (value int, ok bool)

GetForwards returns value of Forwards conditional field and boolean which is true if field was set.

func (*Message) GetFromID

func (m *Message) GetFromID() (value PeerClass, ok bool)

GetFromID returns value of FromID conditional field and boolean which is true if field was set.

func (*Message) GetFwdFrom

func (m *Message) GetFwdFrom() (value MessageFwdHeader, ok bool)

GetFwdFrom returns value of FwdFrom conditional field and boolean which is true if field was set.

func (*Message) GetGroupedID

func (m *Message) GetGroupedID() (value int64, ok bool)

GetGroupedID returns value of GroupedID conditional field and boolean which is true if field was set.

func (*Message) GetMedia

func (m *Message) GetMedia() (value MessageMediaClass, ok bool)

GetMedia returns value of Media conditional field and boolean which is true if field was set.

func (*Message) GetPostAuthor

func (m *Message) GetPostAuthor() (value string, ok bool)

GetPostAuthor returns value of PostAuthor conditional field and boolean which is true if field was set.

func (*Message) GetReplies

func (m *Message) GetReplies() (value MessageReplies, ok bool)

GetReplies returns value of Replies conditional field and boolean which is true if field was set.

func (*Message) GetReplyMarkup

func (m *Message) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*Message) GetReplyTo

func (m *Message) GetReplyTo() (value MessageReplyHeader, ok bool)

GetReplyTo returns value of ReplyTo conditional field and boolean which is true if field was set.

func (*Message) GetRestrictionReason

func (m *Message) GetRestrictionReason() (value []RestrictionReason, ok bool)

GetRestrictionReason returns value of RestrictionReason conditional field and boolean which is true if field was set.

func (*Message) GetViaBotID

func (m *Message) GetViaBotID() (value int, ok bool)

GetViaBotID returns value of ViaBotID conditional field and boolean which is true if field was set.

func (*Message) GetViews

func (m *Message) GetViews() (value int, ok bool)

GetViews returns value of Views conditional field and boolean which is true if field was set.

func (*Message) SetEditDate

func (m *Message) SetEditDate(value int)

SetEditDate sets value of EditDate conditional field.

func (*Message) SetEditHide

func (m *Message) SetEditHide(value bool)

SetEditHide sets value of EditHide conditional field.

func (*Message) SetEntities

func (m *Message) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*Message) SetForwards

func (m *Message) SetForwards(value int)

SetForwards sets value of Forwards conditional field.

func (*Message) SetFromID

func (m *Message) SetFromID(value PeerClass)

SetFromID sets value of FromID conditional field.

func (*Message) SetFromScheduled

func (m *Message) SetFromScheduled(value bool)

SetFromScheduled sets value of FromScheduled conditional field.

func (*Message) SetFwdFrom

func (m *Message) SetFwdFrom(value MessageFwdHeader)

SetFwdFrom sets value of FwdFrom conditional field.

func (*Message) SetGroupedID

func (m *Message) SetGroupedID(value int64)

SetGroupedID sets value of GroupedID conditional field.

func (*Message) SetLegacy

func (m *Message) SetLegacy(value bool)

SetLegacy sets value of Legacy conditional field.

func (*Message) SetMedia

func (m *Message) SetMedia(value MessageMediaClass)

SetMedia sets value of Media conditional field.

func (*Message) SetMediaUnread

func (m *Message) SetMediaUnread(value bool)

SetMediaUnread sets value of MediaUnread conditional field.

func (*Message) SetMentioned

func (m *Message) SetMentioned(value bool)

SetMentioned sets value of Mentioned conditional field.

func (*Message) SetOut

func (m *Message) SetOut(value bool)

SetOut sets value of Out conditional field.

func (*Message) SetPinned

func (m *Message) SetPinned(value bool)

SetPinned sets value of Pinned conditional field.

func (*Message) SetPost

func (m *Message) SetPost(value bool)

SetPost sets value of Post conditional field.

func (*Message) SetPostAuthor

func (m *Message) SetPostAuthor(value string)

SetPostAuthor sets value of PostAuthor conditional field.

func (*Message) SetReplies

func (m *Message) SetReplies(value MessageReplies)

SetReplies sets value of Replies conditional field.

func (*Message) SetReplyMarkup

func (m *Message) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*Message) SetReplyTo

func (m *Message) SetReplyTo(value MessageReplyHeader)

SetReplyTo sets value of ReplyTo conditional field.

func (*Message) SetRestrictionReason

func (m *Message) SetRestrictionReason(value []RestrictionReason)

SetRestrictionReason sets value of RestrictionReason conditional field.

func (*Message) SetSilent

func (m *Message) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*Message) SetViaBotID

func (m *Message) SetViaBotID(value int)

SetViaBotID sets value of ViaBotID conditional field.

func (*Message) SetViews

func (m *Message) SetViews(value int)

SetViews sets value of Views conditional field.

func (*Message) String added in v0.12.0

func (m *Message) String() string

String implements fmt.Stringer.

type MessageActionBotAllowed

type MessageActionBotAllowed struct {
	// The domain name of the website on which the user has logged in.
	Domain string
}

MessageActionBotAllowed represents TL type `messageActionBotAllowed#abe9affe`. The domain name of the website on which the user has logged in. More about Telegram Login »¹

Links:

  1. https://core.telegram.org/widgets/login

See https://core.telegram.org/constructor/messageActionBotAllowed for reference.

func (*MessageActionBotAllowed) Decode

func (m *MessageActionBotAllowed) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionBotAllowed) Encode

func (m *MessageActionBotAllowed) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionBotAllowed) String added in v0.12.0

func (m *MessageActionBotAllowed) String() string

String implements fmt.Stringer.

type MessageActionBox

type MessageActionBox struct {
	MessageAction MessageActionClass
}

MessageAction boxes the MessageActionClass providing a helper.

func (*MessageActionBox) Decode

func (b *MessageActionBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessageActionBox.

func (*MessageActionBox) Encode

func (b *MessageActionBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessageActionBox.

type MessageActionChannelCreate

type MessageActionChannelCreate struct {
	// Original channel/supergroup title
	Title string
}

MessageActionChannelCreate represents TL type `messageActionChannelCreate#95d2ac92`. The channel was created

See https://core.telegram.org/constructor/messageActionChannelCreate for reference.

func (*MessageActionChannelCreate) Decode

Decode implements bin.Decoder.

func (*MessageActionChannelCreate) Encode

Encode implements bin.Encoder.

func (*MessageActionChannelCreate) String added in v0.12.0

func (m *MessageActionChannelCreate) String() string

String implements fmt.Stringer.

type MessageActionChannelMigrateFrom

type MessageActionChannelMigrateFrom struct {
	// The old chat tite
	Title string
	// The old chat ID
	ChatID int
}

MessageActionChannelMigrateFrom represents TL type `messageActionChannelMigrateFrom#b055eaee`. Indicates the channel was migrated¹ from the specified chat

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/messageActionChannelMigrateFrom for reference.

func (*MessageActionChannelMigrateFrom) Decode

Decode implements bin.Decoder.

func (*MessageActionChannelMigrateFrom) Encode

Encode implements bin.Encoder.

func (*MessageActionChannelMigrateFrom) String added in v0.12.0

String implements fmt.Stringer.

type MessageActionChatAddUser

type MessageActionChatAddUser struct {
	// Users that were invited to the chat
	Users []int
}

MessageActionChatAddUser represents TL type `messageActionChatAddUser#488a7337`. New member in the group

See https://core.telegram.org/constructor/messageActionChatAddUser for reference.

func (*MessageActionChatAddUser) Decode

func (m *MessageActionChatAddUser) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionChatAddUser) Encode

func (m *MessageActionChatAddUser) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionChatAddUser) String added in v0.12.0

func (m *MessageActionChatAddUser) String() string

String implements fmt.Stringer.

type MessageActionChatCreate

type MessageActionChatCreate struct {
	// Group name
	Title string
	// List of group members
	Users []int
}

MessageActionChatCreate represents TL type `messageActionChatCreate#a6638b9a`. Group created

See https://core.telegram.org/constructor/messageActionChatCreate for reference.

func (*MessageActionChatCreate) Decode

func (m *MessageActionChatCreate) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionChatCreate) Encode

func (m *MessageActionChatCreate) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionChatCreate) String added in v0.12.0

func (m *MessageActionChatCreate) String() string

String implements fmt.Stringer.

type MessageActionChatDeletePhoto

type MessageActionChatDeletePhoto struct {
}

MessageActionChatDeletePhoto represents TL type `messageActionChatDeletePhoto#95e3fbef`. Group profile photo removed.

See https://core.telegram.org/constructor/messageActionChatDeletePhoto for reference.

func (*MessageActionChatDeletePhoto) Decode

Decode implements bin.Decoder.

func (*MessageActionChatDeletePhoto) Encode

Encode implements bin.Encoder.

func (*MessageActionChatDeletePhoto) String added in v0.12.0

String implements fmt.Stringer.

type MessageActionChatDeleteUser

type MessageActionChatDeleteUser struct {
	// Leaving user ID
	UserID int
}

MessageActionChatDeleteUser represents TL type `messageActionChatDeleteUser#b2ae9b0c`. User left the group.

See https://core.telegram.org/constructor/messageActionChatDeleteUser for reference.

func (*MessageActionChatDeleteUser) Decode

Decode implements bin.Decoder.

func (*MessageActionChatDeleteUser) Encode

Encode implements bin.Encoder.

func (*MessageActionChatDeleteUser) String added in v0.12.0

func (m *MessageActionChatDeleteUser) String() string

String implements fmt.Stringer.

type MessageActionChatEditPhoto

type MessageActionChatEditPhoto struct {
	// New group pofile photo
	Photo PhotoClass
}

MessageActionChatEditPhoto represents TL type `messageActionChatEditPhoto#7fcb13a8`. Group profile changed

See https://core.telegram.org/constructor/messageActionChatEditPhoto for reference.

func (*MessageActionChatEditPhoto) Decode

Decode implements bin.Decoder.

func (*MessageActionChatEditPhoto) Encode

Encode implements bin.Encoder.

func (*MessageActionChatEditPhoto) String added in v0.12.0

func (m *MessageActionChatEditPhoto) String() string

String implements fmt.Stringer.

type MessageActionChatEditTitle

type MessageActionChatEditTitle struct {
	// New group name
	Title string
}

MessageActionChatEditTitle represents TL type `messageActionChatEditTitle#b5a1ce5a`. Group name changed.

See https://core.telegram.org/constructor/messageActionChatEditTitle for reference.

func (*MessageActionChatEditTitle) Decode

Decode implements bin.Decoder.

func (*MessageActionChatEditTitle) Encode

Encode implements bin.Encoder.

func (*MessageActionChatEditTitle) String added in v0.12.0

func (m *MessageActionChatEditTitle) String() string

String implements fmt.Stringer.

type MessageActionChatJoinedByLink struct {
	// ID of the user that created the invite link
	InviterID int
}

MessageActionChatJoinedByLink represents TL type `messageActionChatJoinedByLink#f89cf5e8`. A user joined the chat via an invite link

See https://core.telegram.org/constructor/messageActionChatJoinedByLink for reference.

func (*MessageActionChatJoinedByLink) Decode

Decode implements bin.Decoder.

func (*MessageActionChatJoinedByLink) Encode

Encode implements bin.Encoder.

func (*MessageActionChatJoinedByLink) String added in v0.12.0

String implements fmt.Stringer.

type MessageActionChatMigrateTo

type MessageActionChatMigrateTo struct {
	// The supergroup it was migrated to
	ChannelID int
}

MessageActionChatMigrateTo represents TL type `messageActionChatMigrateTo#51bdb021`. Indicates the chat was migrated¹ to the specified supergroup

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/messageActionChatMigrateTo for reference.

func (*MessageActionChatMigrateTo) Decode

Decode implements bin.Decoder.

func (*MessageActionChatMigrateTo) Encode

Encode implements bin.Encoder.

func (*MessageActionChatMigrateTo) String added in v0.12.0

func (m *MessageActionChatMigrateTo) String() string

String implements fmt.Stringer.

type MessageActionClass

type MessageActionClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessageActionClass represents MessageAction generic type.

See https://core.telegram.org/type/MessageAction for reference.

Example:

g, err := DecodeMessageAction(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessageActionEmpty: // messageActionEmpty#b6aef7b0
case *MessageActionChatCreate: // messageActionChatCreate#a6638b9a
case *MessageActionChatEditTitle: // messageActionChatEditTitle#b5a1ce5a
case *MessageActionChatEditPhoto: // messageActionChatEditPhoto#7fcb13a8
case *MessageActionChatDeletePhoto: // messageActionChatDeletePhoto#95e3fbef
case *MessageActionChatAddUser: // messageActionChatAddUser#488a7337
case *MessageActionChatDeleteUser: // messageActionChatDeleteUser#b2ae9b0c
case *MessageActionChatJoinedByLink: // messageActionChatJoinedByLink#f89cf5e8
case *MessageActionChannelCreate: // messageActionChannelCreate#95d2ac92
case *MessageActionChatMigrateTo: // messageActionChatMigrateTo#51bdb021
case *MessageActionChannelMigrateFrom: // messageActionChannelMigrateFrom#b055eaee
case *MessageActionPinMessage: // messageActionPinMessage#94bd38ed
case *MessageActionHistoryClear: // messageActionHistoryClear#9fbab604
case *MessageActionGameScore: // messageActionGameScore#92a72876
case *MessageActionPaymentSentMe: // messageActionPaymentSentMe#8f31b327
case *MessageActionPaymentSent: // messageActionPaymentSent#40699cd0
case *MessageActionPhoneCall: // messageActionPhoneCall#80e11a7f
case *MessageActionScreenshotTaken: // messageActionScreenshotTaken#4792929b
case *MessageActionCustomAction: // messageActionCustomAction#fae69f56
case *MessageActionBotAllowed: // messageActionBotAllowed#abe9affe
case *MessageActionSecureValuesSentMe: // messageActionSecureValuesSentMe#1b287353
case *MessageActionSecureValuesSent: // messageActionSecureValuesSent#d95c6154
case *MessageActionContactSignUp: // messageActionContactSignUp#f3f25f76
case *MessageActionGeoProximityReached: // messageActionGeoProximityReached#98e0d697
case *MessageActionGroupCall: // messageActionGroupCall#7a0d7f42
case *MessageActionInviteToGroupCall: // messageActionInviteToGroupCall#76b9f11a
default: panic(v)
}

func DecodeMessageAction

func DecodeMessageAction(buf *bin.Buffer) (MessageActionClass, error)

DecodeMessageAction implements binary de-serialization for MessageActionClass.

type MessageActionContactSignUp

type MessageActionContactSignUp struct {
}

MessageActionContactSignUp represents TL type `messageActionContactSignUp#f3f25f76`. A contact just signed up to telegram

See https://core.telegram.org/constructor/messageActionContactSignUp for reference.

func (*MessageActionContactSignUp) Decode

Decode implements bin.Decoder.

func (*MessageActionContactSignUp) Encode

Encode implements bin.Encoder.

func (*MessageActionContactSignUp) String added in v0.12.0

func (m *MessageActionContactSignUp) String() string

String implements fmt.Stringer.

type MessageActionCustomAction

type MessageActionCustomAction struct {
	// Action message
	Message string
}

MessageActionCustomAction represents TL type `messageActionCustomAction#fae69f56`. Custom action (most likely not supported by the current layer, an upgrade might be needed)

See https://core.telegram.org/constructor/messageActionCustomAction for reference.

func (*MessageActionCustomAction) Decode

func (m *MessageActionCustomAction) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionCustomAction) Encode

func (m *MessageActionCustomAction) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionCustomAction) String added in v0.12.0

func (m *MessageActionCustomAction) String() string

String implements fmt.Stringer.

type MessageActionEmpty

type MessageActionEmpty struct {
}

MessageActionEmpty represents TL type `messageActionEmpty#b6aef7b0`. Empty constructor.

See https://core.telegram.org/constructor/messageActionEmpty for reference.

func (*MessageActionEmpty) Decode

func (m *MessageActionEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionEmpty) Encode

func (m *MessageActionEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionEmpty) String added in v0.12.0

func (m *MessageActionEmpty) String() string

String implements fmt.Stringer.

type MessageActionGameScore

type MessageActionGameScore struct {
	// Game ID
	GameID int64
	// Score
	Score int
}

MessageActionGameScore represents TL type `messageActionGameScore#92a72876`. Someone scored in a game

See https://core.telegram.org/constructor/messageActionGameScore for reference.

func (*MessageActionGameScore) Decode

func (m *MessageActionGameScore) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionGameScore) Encode

func (m *MessageActionGameScore) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionGameScore) String added in v0.12.0

func (m *MessageActionGameScore) String() string

String implements fmt.Stringer.

type MessageActionGeoProximityReached

type MessageActionGeoProximityReached struct {
	// The user or chat that is now in proximity of to_id
	FromID PeerClass
	// The user or chat that subscribed to live geolocation proximity alerts¹
	//
	// Links:
	//  1) https://core.telegram.org/api/live-location#proximity-alert
	ToID PeerClass
	// Distance, in meters (0-100000)
	Distance int
}

MessageActionGeoProximityReached represents TL type `messageActionGeoProximityReached#98e0d697`. A user of the chat is now in proximity of another user

See https://core.telegram.org/constructor/messageActionGeoProximityReached for reference.

func (*MessageActionGeoProximityReached) Decode

Decode implements bin.Decoder.

func (*MessageActionGeoProximityReached) Encode

Encode implements bin.Encoder.

func (*MessageActionGeoProximityReached) String added in v0.12.0

String implements fmt.Stringer.

type MessageActionGroupCall added in v0.13.0

type MessageActionGroupCall struct {
	// Flags field of MessageActionGroupCall.
	Flags bin.Fields
	// Call field of MessageActionGroupCall.
	Call InputGroupCall
	// Duration field of MessageActionGroupCall.
	//
	// Use SetDuration and GetDuration helpers.
	Duration int
}

MessageActionGroupCall represents TL type `messageActionGroupCall#7a0d7f42`.

See https://core.telegram.org/constructor/messageActionGroupCall for reference.

func (*MessageActionGroupCall) Decode added in v0.13.0

func (m *MessageActionGroupCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionGroupCall) Encode added in v0.13.0

func (m *MessageActionGroupCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionGroupCall) GetDuration added in v0.13.0

func (m *MessageActionGroupCall) GetDuration() (value int, ok bool)

GetDuration returns value of Duration conditional field and boolean which is true if field was set.

func (*MessageActionGroupCall) SetDuration added in v0.13.0

func (m *MessageActionGroupCall) SetDuration(value int)

SetDuration sets value of Duration conditional field.

func (*MessageActionGroupCall) String added in v0.13.0

func (m *MessageActionGroupCall) String() string

String implements fmt.Stringer.

type MessageActionHistoryClear

type MessageActionHistoryClear struct {
}

MessageActionHistoryClear represents TL type `messageActionHistoryClear#9fbab604`. Chat history was cleared

See https://core.telegram.org/constructor/messageActionHistoryClear for reference.

func (*MessageActionHistoryClear) Decode

func (m *MessageActionHistoryClear) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionHistoryClear) Encode

func (m *MessageActionHistoryClear) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionHistoryClear) String added in v0.12.0

func (m *MessageActionHistoryClear) String() string

String implements fmt.Stringer.

type MessageActionInviteToGroupCall added in v0.13.0

type MessageActionInviteToGroupCall struct {
	// Call field of MessageActionInviteToGroupCall.
	Call InputGroupCall
	// Users field of MessageActionInviteToGroupCall.
	Users []int
}

MessageActionInviteToGroupCall represents TL type `messageActionInviteToGroupCall#76b9f11a`.

See https://core.telegram.org/constructor/messageActionInviteToGroupCall for reference.

func (*MessageActionInviteToGroupCall) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*MessageActionInviteToGroupCall) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*MessageActionInviteToGroupCall) String added in v0.13.0

String implements fmt.Stringer.

type MessageActionPaymentSent

type MessageActionPaymentSent struct {
	// Three-letter ISO 4217 currency¹ code
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments#supported-currencies
	Currency string
	// Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json¹, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments/currencies.json
	TotalAmount int64
}

MessageActionPaymentSent represents TL type `messageActionPaymentSent#40699cd0`. A payment was sent

See https://core.telegram.org/constructor/messageActionPaymentSent for reference.

func (*MessageActionPaymentSent) Decode

func (m *MessageActionPaymentSent) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionPaymentSent) Encode

func (m *MessageActionPaymentSent) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionPaymentSent) String added in v0.12.0

func (m *MessageActionPaymentSent) String() string

String implements fmt.Stringer.

type MessageActionPaymentSentMe

type MessageActionPaymentSentMe struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Three-letter ISO 4217 currency¹ code
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments#supported-currencies
	Currency string
	// Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json¹, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments/currencies.json
	TotalAmount int64
	// Bot specified invoice payload
	Payload []byte
	// Order info provided by the user
	//
	// Use SetInfo and GetInfo helpers.
	Info PaymentRequestedInfo
	// Identifier of the shipping option chosen by the user
	//
	// Use SetShippingOptionID and GetShippingOptionID helpers.
	ShippingOptionID string
	// Provider payment identifier
	Charge PaymentCharge
}

MessageActionPaymentSentMe represents TL type `messageActionPaymentSentMe#8f31b327`. A user just sent a payment to me (a bot)

See https://core.telegram.org/constructor/messageActionPaymentSentMe for reference.

func (*MessageActionPaymentSentMe) Decode

Decode implements bin.Decoder.

func (*MessageActionPaymentSentMe) Encode

Encode implements bin.Encoder.

func (*MessageActionPaymentSentMe) GetInfo

func (m *MessageActionPaymentSentMe) GetInfo() (value PaymentRequestedInfo, ok bool)

GetInfo returns value of Info conditional field and boolean which is true if field was set.

func (*MessageActionPaymentSentMe) GetShippingOptionID

func (m *MessageActionPaymentSentMe) GetShippingOptionID() (value string, ok bool)

GetShippingOptionID returns value of ShippingOptionID conditional field and boolean which is true if field was set.

func (*MessageActionPaymentSentMe) SetInfo

SetInfo sets value of Info conditional field.

func (*MessageActionPaymentSentMe) SetShippingOptionID

func (m *MessageActionPaymentSentMe) SetShippingOptionID(value string)

SetShippingOptionID sets value of ShippingOptionID conditional field.

func (*MessageActionPaymentSentMe) String added in v0.12.0

func (m *MessageActionPaymentSentMe) String() string

String implements fmt.Stringer.

type MessageActionPhoneCall

type MessageActionPhoneCall struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Is this a video call?
	Video bool
	// Call ID
	CallID int64
	// If the call has ended, the reason why it ended
	//
	// Use SetReason and GetReason helpers.
	Reason PhoneCallDiscardReasonClass
	// Duration of the call in seconds
	//
	// Use SetDuration and GetDuration helpers.
	Duration int
}

MessageActionPhoneCall represents TL type `messageActionPhoneCall#80e11a7f`. A phone call

See https://core.telegram.org/constructor/messageActionPhoneCall for reference.

func (*MessageActionPhoneCall) Decode

func (m *MessageActionPhoneCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionPhoneCall) Encode

func (m *MessageActionPhoneCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionPhoneCall) GetDuration

func (m *MessageActionPhoneCall) GetDuration() (value int, ok bool)

GetDuration returns value of Duration conditional field and boolean which is true if field was set.

func (*MessageActionPhoneCall) GetReason

func (m *MessageActionPhoneCall) GetReason() (value PhoneCallDiscardReasonClass, ok bool)

GetReason returns value of Reason conditional field and boolean which is true if field was set.

func (*MessageActionPhoneCall) SetDuration

func (m *MessageActionPhoneCall) SetDuration(value int)

SetDuration sets value of Duration conditional field.

func (*MessageActionPhoneCall) SetReason

SetReason sets value of Reason conditional field.

func (*MessageActionPhoneCall) SetVideo

func (m *MessageActionPhoneCall) SetVideo(value bool)

SetVideo sets value of Video conditional field.

func (*MessageActionPhoneCall) String added in v0.12.0

func (m *MessageActionPhoneCall) String() string

String implements fmt.Stringer.

type MessageActionPinMessage

type MessageActionPinMessage struct {
}

MessageActionPinMessage represents TL type `messageActionPinMessage#94bd38ed`. A message was pinned

See https://core.telegram.org/constructor/messageActionPinMessage for reference.

func (*MessageActionPinMessage) Decode

func (m *MessageActionPinMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageActionPinMessage) Encode

func (m *MessageActionPinMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageActionPinMessage) String added in v0.12.0

func (m *MessageActionPinMessage) String() string

String implements fmt.Stringer.

type MessageActionScreenshotTaken

type MessageActionScreenshotTaken struct {
}

MessageActionScreenshotTaken represents TL type `messageActionScreenshotTaken#4792929b`. A screenshot of the chat was taken

See https://core.telegram.org/constructor/messageActionScreenshotTaken for reference.

func (*MessageActionScreenshotTaken) Decode

Decode implements bin.Decoder.

func (*MessageActionScreenshotTaken) Encode

Encode implements bin.Encoder.

func (*MessageActionScreenshotTaken) String added in v0.12.0

String implements fmt.Stringer.

type MessageActionSecureValuesSent

type MessageActionSecureValuesSent struct {
	// Secure value types
	Types []SecureValueTypeClass
}

MessageActionSecureValuesSent represents TL type `messageActionSecureValuesSent#d95c6154`. Request for secure telegram passport¹ values was sent

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/constructor/messageActionSecureValuesSent for reference.

func (*MessageActionSecureValuesSent) Decode

Decode implements bin.Decoder.

func (*MessageActionSecureValuesSent) Encode

Encode implements bin.Encoder.

func (*MessageActionSecureValuesSent) String added in v0.12.0

String implements fmt.Stringer.

type MessageActionSecureValuesSentMe

type MessageActionSecureValuesSentMe struct {
	// Vector with information about documents and other Telegram Passport elements that were shared with the bot
	Values []SecureValue
	// Encrypted credentials required to decrypt the data
	Credentials SecureCredentialsEncrypted
}

MessageActionSecureValuesSentMe represents TL type `messageActionSecureValuesSentMe#1b287353`. Secure telegram passport¹ values were received

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/constructor/messageActionSecureValuesSentMe for reference.

func (*MessageActionSecureValuesSentMe) Decode

Decode implements bin.Decoder.

func (*MessageActionSecureValuesSentMe) Encode

Encode implements bin.Encoder.

func (*MessageActionSecureValuesSentMe) String added in v0.12.0

String implements fmt.Stringer.

type MessageBox

type MessageBox struct {
	Message MessageClass
}

Message boxes the MessageClass providing a helper.

func (*MessageBox) Decode

func (b *MessageBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessageBox.

func (*MessageBox) Encode

func (b *MessageBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessageBox.

type MessageClass

type MessageClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessageClass represents Message generic type.

See https://core.telegram.org/type/Message for reference.

Example:

g, err := DecodeMessage(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessageEmpty: // messageEmpty#83e5de54
case *Message: // message#58ae39c9
case *MessageService: // messageService#286fa604
default: panic(v)
}

func DecodeMessage

func DecodeMessage(buf *bin.Buffer) (MessageClass, error)

DecodeMessage implements binary de-serialization for MessageClass.

type MessageEmpty

type MessageEmpty struct {
	// Message identifier
	ID int
}

MessageEmpty represents TL type `messageEmpty#83e5de54`. Empty constructor, non-existent message.

See https://core.telegram.org/constructor/messageEmpty for reference.

func (*MessageEmpty) Decode

func (m *MessageEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEmpty) Encode

func (m *MessageEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEmpty) String added in v0.12.0

func (m *MessageEmpty) String() string

String implements fmt.Stringer.

type MessageEntityBankCard

type MessageEntityBankCard struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityBankCard represents TL type `messageEntityBankCard#761e6af4`. Indicates a credit card number

See https://core.telegram.org/constructor/messageEntityBankCard for reference.

func (*MessageEntityBankCard) Decode

func (m *MessageEntityBankCard) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityBankCard) Encode

func (m *MessageEntityBankCard) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityBankCard) String added in v0.12.0

func (m *MessageEntityBankCard) String() string

String implements fmt.Stringer.

type MessageEntityBlockquote

type MessageEntityBlockquote struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityBlockquote represents TL type `messageEntityBlockquote#20df5d0`. Message entity representing a block quote.

See https://core.telegram.org/constructor/messageEntityBlockquote for reference.

func (*MessageEntityBlockquote) Decode

func (m *MessageEntityBlockquote) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityBlockquote) Encode

func (m *MessageEntityBlockquote) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityBlockquote) String added in v0.12.0

func (m *MessageEntityBlockquote) String() string

String implements fmt.Stringer.

type MessageEntityBold

type MessageEntityBold struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityBold represents TL type `messageEntityBold#bd610bc9`. Message entity representing bold text.

See https://core.telegram.org/constructor/messageEntityBold for reference.

func (*MessageEntityBold) Decode

func (m *MessageEntityBold) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityBold) Encode

func (m *MessageEntityBold) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityBold) String added in v0.12.0

func (m *MessageEntityBold) String() string

String implements fmt.Stringer.

type MessageEntityBotCommand

type MessageEntityBotCommand struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityBotCommand represents TL type `messageEntityBotCommand#6cef8ac7`. Message entity representing a bot /command

See https://core.telegram.org/constructor/messageEntityBotCommand for reference.

func (*MessageEntityBotCommand) Decode

func (m *MessageEntityBotCommand) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityBotCommand) Encode

func (m *MessageEntityBotCommand) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityBotCommand) String added in v0.12.0

func (m *MessageEntityBotCommand) String() string

String implements fmt.Stringer.

type MessageEntityBox

type MessageEntityBox struct {
	MessageEntity MessageEntityClass
}

MessageEntity boxes the MessageEntityClass providing a helper.

func (*MessageEntityBox) Decode

func (b *MessageEntityBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessageEntityBox.

func (*MessageEntityBox) Encode

func (b *MessageEntityBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessageEntityBox.

type MessageEntityCashtag

type MessageEntityCashtag struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityCashtag represents TL type `messageEntityCashtag#4c4e743f`. Message entity representing a $cashtag.

See https://core.telegram.org/constructor/messageEntityCashtag for reference.

func (*MessageEntityCashtag) Decode

func (m *MessageEntityCashtag) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityCashtag) Encode

func (m *MessageEntityCashtag) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityCashtag) String added in v0.12.0

func (m *MessageEntityCashtag) String() string

String implements fmt.Stringer.

type MessageEntityClass

type MessageEntityClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessageEntityClass represents MessageEntity generic type.

See https://core.telegram.org/type/MessageEntity for reference.

Example:

g, err := DecodeMessageEntity(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessageEntityUnknown: // messageEntityUnknown#bb92ba95
case *MessageEntityMention: // messageEntityMention#fa04579d
case *MessageEntityHashtag: // messageEntityHashtag#6f635b0d
case *MessageEntityBotCommand: // messageEntityBotCommand#6cef8ac7
case *MessageEntityUrl: // messageEntityUrl#6ed02538
case *MessageEntityEmail: // messageEntityEmail#64e475c2
case *MessageEntityBold: // messageEntityBold#bd610bc9
case *MessageEntityItalic: // messageEntityItalic#826f8b60
case *MessageEntityCode: // messageEntityCode#28a20571
case *MessageEntityPre: // messageEntityPre#73924be0
case *MessageEntityTextUrl: // messageEntityTextUrl#76a6d327
case *MessageEntityMentionName: // messageEntityMentionName#352dca58
case *InputMessageEntityMentionName: // inputMessageEntityMentionName#208e68c9
case *MessageEntityPhone: // messageEntityPhone#9b69e34b
case *MessageEntityCashtag: // messageEntityCashtag#4c4e743f
case *MessageEntityUnderline: // messageEntityUnderline#9c4e7e8b
case *MessageEntityStrike: // messageEntityStrike#bf0693d4
case *MessageEntityBlockquote: // messageEntityBlockquote#20df5d0
case *MessageEntityBankCard: // messageEntityBankCard#761e6af4
default: panic(v)
}

func DecodeMessageEntity

func DecodeMessageEntity(buf *bin.Buffer) (MessageEntityClass, error)

DecodeMessageEntity implements binary de-serialization for MessageEntityClass.

type MessageEntityCode

type MessageEntityCode struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityCode represents TL type `messageEntityCode#28a20571`. Message entity representing a codeblock.

See https://core.telegram.org/constructor/messageEntityCode for reference.

func (*MessageEntityCode) Decode

func (m *MessageEntityCode) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityCode) Encode

func (m *MessageEntityCode) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityCode) String added in v0.12.0

func (m *MessageEntityCode) String() string

String implements fmt.Stringer.

type MessageEntityEmail

type MessageEntityEmail struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityEmail represents TL type `messageEntityEmail#64e475c2`. Message entity representing an email@example.com¹.

Links:

  1. https://core.telegram.orgmailto:email@example.com

See https://core.telegram.org/constructor/messageEntityEmail for reference.

func (*MessageEntityEmail) Decode

func (m *MessageEntityEmail) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityEmail) Encode

func (m *MessageEntityEmail) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityEmail) String added in v0.12.0

func (m *MessageEntityEmail) String() string

String implements fmt.Stringer.

type MessageEntityHashtag

type MessageEntityHashtag struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityHashtag represents TL type `messageEntityHashtag#6f635b0d`. #hashtag message entity

See https://core.telegram.org/constructor/messageEntityHashtag for reference.

func (*MessageEntityHashtag) Decode

func (m *MessageEntityHashtag) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityHashtag) Encode

func (m *MessageEntityHashtag) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityHashtag) String added in v0.12.0

func (m *MessageEntityHashtag) String() string

String implements fmt.Stringer.

type MessageEntityItalic

type MessageEntityItalic struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityItalic represents TL type `messageEntityItalic#826f8b60`. Message entity representing italic text.

See https://core.telegram.org/constructor/messageEntityItalic for reference.

func (*MessageEntityItalic) Decode

func (m *MessageEntityItalic) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityItalic) Encode

func (m *MessageEntityItalic) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityItalic) String added in v0.12.0

func (m *MessageEntityItalic) String() string

String implements fmt.Stringer.

type MessageEntityMention

type MessageEntityMention struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityMention represents TL type `messageEntityMention#fa04579d`. Message entity mentioning¹ the current user

Links:

  1. https://core.telegram.org/api/mentions

See https://core.telegram.org/constructor/messageEntityMention for reference.

func (*MessageEntityMention) Decode

func (m *MessageEntityMention) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityMention) Encode

func (m *MessageEntityMention) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityMention) String added in v0.12.0

func (m *MessageEntityMention) String() string

String implements fmt.Stringer.

type MessageEntityMentionName

type MessageEntityMentionName struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
	// Identifier of the user that was mentioned
	UserID int
}

MessageEntityMentionName represents TL type `messageEntityMentionName#352dca58`. Message entity representing a user mention¹: for creating a mention use inputMessageEntityMentionName².

Links:

  1. https://core.telegram.org/api/mentions
  2. https://core.telegram.org/constructor/inputMessageEntityMentionName

See https://core.telegram.org/constructor/messageEntityMentionName for reference.

func (*MessageEntityMentionName) Decode

func (m *MessageEntityMentionName) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityMentionName) Encode

func (m *MessageEntityMentionName) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityMentionName) String added in v0.12.0

func (m *MessageEntityMentionName) String() string

String implements fmt.Stringer.

type MessageEntityPhone

type MessageEntityPhone struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityPhone represents TL type `messageEntityPhone#9b69e34b`. Message entity representing a phone number.

See https://core.telegram.org/constructor/messageEntityPhone for reference.

func (*MessageEntityPhone) Decode

func (m *MessageEntityPhone) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityPhone) Encode

func (m *MessageEntityPhone) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityPhone) String added in v0.12.0

func (m *MessageEntityPhone) String() string

String implements fmt.Stringer.

type MessageEntityPre

type MessageEntityPre struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
	// Programming language of the code
	Language string
}

MessageEntityPre represents TL type `messageEntityPre#73924be0`. Message entity representing a preformatted codeblock, allowing the user to specify a programming language for the codeblock.

See https://core.telegram.org/constructor/messageEntityPre for reference.

func (*MessageEntityPre) Decode

func (m *MessageEntityPre) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityPre) Encode

func (m *MessageEntityPre) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityPre) String added in v0.12.0

func (m *MessageEntityPre) String() string

String implements fmt.Stringer.

type MessageEntityStrike

type MessageEntityStrike struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityStrike represents TL type `messageEntityStrike#bf0693d4`. Message entity representing strikethrough text.

See https://core.telegram.org/constructor/messageEntityStrike for reference.

func (*MessageEntityStrike) Decode

func (m *MessageEntityStrike) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityStrike) Encode

func (m *MessageEntityStrike) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityStrike) String added in v0.12.0

func (m *MessageEntityStrike) String() string

String implements fmt.Stringer.

type MessageEntityTextUrl

type MessageEntityTextUrl struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
	// The actual URL
	URL string
}

MessageEntityTextUrl represents TL type `messageEntityTextUrl#76a6d327`. Message entity representing a text url¹: for in-text urls like https://google.com² use messageEntityUrl³.

Links:

  1. https://google.com
  2. https://google.com
  3. https://core.telegram.org/constructor/messageEntityUrl

See https://core.telegram.org/constructor/messageEntityTextUrl for reference.

func (*MessageEntityTextUrl) Decode

func (m *MessageEntityTextUrl) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityTextUrl) Encode

func (m *MessageEntityTextUrl) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityTextUrl) String added in v0.12.0

func (m *MessageEntityTextUrl) String() string

String implements fmt.Stringer.

type MessageEntityUnderline

type MessageEntityUnderline struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityUnderline represents TL type `messageEntityUnderline#9c4e7e8b`. Message entity representing underlined text.

See https://core.telegram.org/constructor/messageEntityUnderline for reference.

func (*MessageEntityUnderline) Decode

func (m *MessageEntityUnderline) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityUnderline) Encode

func (m *MessageEntityUnderline) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityUnderline) String added in v0.12.0

func (m *MessageEntityUnderline) String() string

String implements fmt.Stringer.

type MessageEntityUnknown

type MessageEntityUnknown struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityUnknown represents TL type `messageEntityUnknown#bb92ba95`. Unknown message entity

See https://core.telegram.org/constructor/messageEntityUnknown for reference.

func (*MessageEntityUnknown) Decode

func (m *MessageEntityUnknown) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityUnknown) Encode

func (m *MessageEntityUnknown) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityUnknown) String added in v0.12.0

func (m *MessageEntityUnknown) String() string

String implements fmt.Stringer.

type MessageEntityUrl

type MessageEntityUrl struct {
	// Offset of message entity within message (in UTF-8 codepoints)
	Offset int
	// Length of message entity within message (in UTF-8 codepoints)
	Length int
}

MessageEntityUrl represents TL type `messageEntityUrl#6ed02538`. Message entity representing an in-text url: https://google.com¹; for text urls², use messageEntityTextUrl³.

Links:

  1. https://google.com
  2. https://google.com
  3. https://core.telegram.org/constructor/messageEntityTextUrl

See https://core.telegram.org/constructor/messageEntityUrl for reference.

func (*MessageEntityUrl) Decode

func (m *MessageEntityUrl) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageEntityUrl) Encode

func (m *MessageEntityUrl) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageEntityUrl) String added in v0.12.0

func (m *MessageEntityUrl) String() string

String implements fmt.Stringer.

type MessageFwdHeader

type MessageFwdHeader struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The ID of the user that originally sent the message
	//
	// Use SetFromID and GetFromID helpers.
	FromID PeerClass
	// The name of the user that originally sent the message
	//
	// Use SetFromName and GetFromName helpers.
	FromName string
	// When was the message originally sent
	Date int
	// ID of the channel message that was forwarded
	//
	// Use SetChannelPost and GetChannelPost helpers.
	ChannelPost int
	// For channels and if signatures are enabled, author of the channel message
	//
	// Use SetPostAuthor and GetPostAuthor helpers.
	PostAuthor string
	// Only for messages forwarded to the current user (inputPeerSelf), full info about the user/channel that originally sent the message
	//
	// Use SetSavedFromPeer and GetSavedFromPeer helpers.
	SavedFromPeer PeerClass
	// Only for messages forwarded to the current user (inputPeerSelf), ID of the message that was forwarded from the original user/channel
	//
	// Use SetSavedFromMsgID and GetSavedFromMsgID helpers.
	SavedFromMsgID int
	// PSA type
	//
	// Use SetPsaType and GetPsaType helpers.
	PsaType string
}

MessageFwdHeader represents TL type `messageFwdHeader#5f777dce`. Info about a forwarded message

See https://core.telegram.org/constructor/messageFwdHeader for reference.

func (*MessageFwdHeader) Decode

func (m *MessageFwdHeader) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageFwdHeader) Encode

func (m *MessageFwdHeader) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageFwdHeader) GetChannelPost

func (m *MessageFwdHeader) GetChannelPost() (value int, ok bool)

GetChannelPost returns value of ChannelPost conditional field and boolean which is true if field was set.

func (*MessageFwdHeader) GetFromID

func (m *MessageFwdHeader) GetFromID() (value PeerClass, ok bool)

GetFromID returns value of FromID conditional field and boolean which is true if field was set.

func (*MessageFwdHeader) GetFromName

func (m *MessageFwdHeader) GetFromName() (value string, ok bool)

GetFromName returns value of FromName conditional field and boolean which is true if field was set.

func (*MessageFwdHeader) GetPostAuthor

func (m *MessageFwdHeader) GetPostAuthor() (value string, ok bool)

GetPostAuthor returns value of PostAuthor conditional field and boolean which is true if field was set.

func (*MessageFwdHeader) GetPsaType

func (m *MessageFwdHeader) GetPsaType() (value string, ok bool)

GetPsaType returns value of PsaType conditional field and boolean which is true if field was set.

func (*MessageFwdHeader) GetSavedFromMsgID

func (m *MessageFwdHeader) GetSavedFromMsgID() (value int, ok bool)

GetSavedFromMsgID returns value of SavedFromMsgID conditional field and boolean which is true if field was set.

func (*MessageFwdHeader) GetSavedFromPeer

func (m *MessageFwdHeader) GetSavedFromPeer() (value PeerClass, ok bool)

GetSavedFromPeer returns value of SavedFromPeer conditional field and boolean which is true if field was set.

func (*MessageFwdHeader) SetChannelPost

func (m *MessageFwdHeader) SetChannelPost(value int)

SetChannelPost sets value of ChannelPost conditional field.

func (*MessageFwdHeader) SetFromID

func (m *MessageFwdHeader) SetFromID(value PeerClass)

SetFromID sets value of FromID conditional field.

func (*MessageFwdHeader) SetFromName

func (m *MessageFwdHeader) SetFromName(value string)

SetFromName sets value of FromName conditional field.

func (*MessageFwdHeader) SetPostAuthor

func (m *MessageFwdHeader) SetPostAuthor(value string)

SetPostAuthor sets value of PostAuthor conditional field.

func (*MessageFwdHeader) SetPsaType

func (m *MessageFwdHeader) SetPsaType(value string)

SetPsaType sets value of PsaType conditional field.

func (*MessageFwdHeader) SetSavedFromMsgID

func (m *MessageFwdHeader) SetSavedFromMsgID(value int)

SetSavedFromMsgID sets value of SavedFromMsgID conditional field.

func (*MessageFwdHeader) SetSavedFromPeer

func (m *MessageFwdHeader) SetSavedFromPeer(value PeerClass)

SetSavedFromPeer sets value of SavedFromPeer conditional field.

func (*MessageFwdHeader) String added in v0.12.0

func (m *MessageFwdHeader) String() string

String implements fmt.Stringer.

type MessageIDHandler added in v0.9.0

type MessageIDHandler func(ctx UpdateContext, update *UpdateMessageID) error

MessageIDHandler is a MessageID event handler.

type MessageInteractionCounters

type MessageInteractionCounters struct {
	// Message ID
	MsgID int
	// Views
	Views int
	// Number of times this message was forwarded
	Forwards int
}

MessageInteractionCounters represents TL type `messageInteractionCounters#ad4fc9bd`. Message interaction counters

See https://core.telegram.org/constructor/messageInteractionCounters for reference.

func (*MessageInteractionCounters) Decode

Decode implements bin.Decoder.

func (*MessageInteractionCounters) Encode

Encode implements bin.Encoder.

func (*MessageInteractionCounters) String added in v0.12.0

func (m *MessageInteractionCounters) String() string

String implements fmt.Stringer.

type MessageMediaBox

type MessageMediaBox struct {
	MessageMedia MessageMediaClass
}

MessageMedia boxes the MessageMediaClass providing a helper.

func (*MessageMediaBox) Decode

func (b *MessageMediaBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessageMediaBox.

func (*MessageMediaBox) Encode

func (b *MessageMediaBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessageMediaBox.

type MessageMediaClass

type MessageMediaClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessageMediaClass represents MessageMedia generic type.

See https://core.telegram.org/type/MessageMedia for reference.

Example:

g, err := DecodeMessageMedia(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessageMediaEmpty: // messageMediaEmpty#3ded6320
case *MessageMediaPhoto: // messageMediaPhoto#695150d7
case *MessageMediaGeo: // messageMediaGeo#56e0d474
case *MessageMediaContact: // messageMediaContact#cbf24940
case *MessageMediaUnsupported: // messageMediaUnsupported#9f84f49e
case *MessageMediaDocument: // messageMediaDocument#9cb070d7
case *MessageMediaWebPage: // messageMediaWebPage#a32dd600
case *MessageMediaVenue: // messageMediaVenue#2ec0533f
case *MessageMediaGame: // messageMediaGame#fdb19008
case *MessageMediaInvoice: // messageMediaInvoice#84551347
case *MessageMediaGeoLive: // messageMediaGeoLive#b940c666
case *MessageMediaPoll: // messageMediaPoll#4bd6e798
case *MessageMediaDice: // messageMediaDice#3f7ee58b
default: panic(v)
}

func DecodeMessageMedia

func DecodeMessageMedia(buf *bin.Buffer) (MessageMediaClass, error)

DecodeMessageMedia implements binary de-serialization for MessageMediaClass.

type MessageMediaContact

type MessageMediaContact struct {
	// Phone number
	PhoneNumber string
	// Contact's first name
	FirstName string
	// Contact's last name
	LastName string
	// VCARD of contact
	Vcard string
	// User identifier or 0, if the user with the given phone number is not registered
	UserID int
}

MessageMediaContact represents TL type `messageMediaContact#cbf24940`. Attached contact.

See https://core.telegram.org/constructor/messageMediaContact for reference.

func (*MessageMediaContact) Decode

func (m *MessageMediaContact) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaContact) Encode

func (m *MessageMediaContact) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaContact) String added in v0.12.0

func (m *MessageMediaContact) String() string

String implements fmt.Stringer.

type MessageMediaDice

type MessageMediaDice struct {
	// Dice value¹
	//
	// Links:
	//  1) https://core.telegram.org/api/dice
	Value int
	// The emoji, for now ,  and  are supported
	Emoticon string
}

MessageMediaDice represents TL type `messageMediaDice#3f7ee58b`. Dice-based animated sticker¹

Links:

  1. https://core.telegram.org/api/dice

See https://core.telegram.org/constructor/messageMediaDice for reference.

func (*MessageMediaDice) Decode

func (m *MessageMediaDice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaDice) Encode

func (m *MessageMediaDice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaDice) String added in v0.12.0

func (m *MessageMediaDice) String() string

String implements fmt.Stringer.

type MessageMediaDocument

type MessageMediaDocument struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Attached document
	//
	// Use SetDocument and GetDocument helpers.
	Document DocumentClass
	// Time to live of self-destructing document
	//
	// Use SetTTLSeconds and GetTTLSeconds helpers.
	TTLSeconds int
}

MessageMediaDocument represents TL type `messageMediaDocument#9cb070d7`. Document (video, audio, voice, sticker, any media type except photo)

See https://core.telegram.org/constructor/messageMediaDocument for reference.

func (*MessageMediaDocument) Decode

func (m *MessageMediaDocument) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaDocument) Encode

func (m *MessageMediaDocument) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaDocument) GetDocument

func (m *MessageMediaDocument) GetDocument() (value DocumentClass, ok bool)

GetDocument returns value of Document conditional field and boolean which is true if field was set.

func (*MessageMediaDocument) GetTTLSeconds

func (m *MessageMediaDocument) GetTTLSeconds() (value int, ok bool)

GetTTLSeconds returns value of TTLSeconds conditional field and boolean which is true if field was set.

func (*MessageMediaDocument) SetDocument

func (m *MessageMediaDocument) SetDocument(value DocumentClass)

SetDocument sets value of Document conditional field.

func (*MessageMediaDocument) SetTTLSeconds

func (m *MessageMediaDocument) SetTTLSeconds(value int)

SetTTLSeconds sets value of TTLSeconds conditional field.

func (*MessageMediaDocument) String added in v0.12.0

func (m *MessageMediaDocument) String() string

String implements fmt.Stringer.

type MessageMediaEmpty

type MessageMediaEmpty struct {
}

MessageMediaEmpty represents TL type `messageMediaEmpty#3ded6320`. Empty constructor.

See https://core.telegram.org/constructor/messageMediaEmpty for reference.

func (*MessageMediaEmpty) Decode

func (m *MessageMediaEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaEmpty) Encode

func (m *MessageMediaEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaEmpty) String added in v0.12.0

func (m *MessageMediaEmpty) String() string

String implements fmt.Stringer.

type MessageMediaGame

type MessageMediaGame struct {
	// Game
	Game Game
}

MessageMediaGame represents TL type `messageMediaGame#fdb19008`. Telegram game

See https://core.telegram.org/constructor/messageMediaGame for reference.

func (*MessageMediaGame) Decode

func (m *MessageMediaGame) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaGame) Encode

func (m *MessageMediaGame) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaGame) String added in v0.12.0

func (m *MessageMediaGame) String() string

String implements fmt.Stringer.

type MessageMediaGeo

type MessageMediaGeo struct {
	// GeoPoint
	Geo GeoPointClass
}

MessageMediaGeo represents TL type `messageMediaGeo#56e0d474`. Attached map.

See https://core.telegram.org/constructor/messageMediaGeo for reference.

func (*MessageMediaGeo) Decode

func (m *MessageMediaGeo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaGeo) Encode

func (m *MessageMediaGeo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaGeo) String added in v0.12.0

func (m *MessageMediaGeo) String() string

String implements fmt.Stringer.

type MessageMediaGeoLive

type MessageMediaGeoLive struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Geolocation
	Geo GeoPointClass
	// For live locations¹, a direction in which the location moves, in degrees; 1-360
	//
	// Links:
	//  1) https://core.telegram.org/api/live-location
	//
	// Use SetHeading and GetHeading helpers.
	Heading int
	// Validity period of provided geolocation
	Period int
	// For live locations¹, a maximum distance to another chat member for proximity alerts, in meters (0-100000).
	//
	// Links:
	//  1) https://core.telegram.org/api/live-location
	//
	// Use SetProximityNotificationRadius and GetProximityNotificationRadius helpers.
	ProximityNotificationRadius int
}

MessageMediaGeoLive represents TL type `messageMediaGeoLive#b940c666`. Indicates a live geolocation¹

Links:

  1. https://core.telegram.org/api/live-location

See https://core.telegram.org/constructor/messageMediaGeoLive for reference.

func (*MessageMediaGeoLive) Decode

func (m *MessageMediaGeoLive) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaGeoLive) Encode

func (m *MessageMediaGeoLive) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaGeoLive) GetHeading

func (m *MessageMediaGeoLive) GetHeading() (value int, ok bool)

GetHeading returns value of Heading conditional field and boolean which is true if field was set.

func (*MessageMediaGeoLive) GetProximityNotificationRadius

func (m *MessageMediaGeoLive) GetProximityNotificationRadius() (value int, ok bool)

GetProximityNotificationRadius returns value of ProximityNotificationRadius conditional field and boolean which is true if field was set.

func (*MessageMediaGeoLive) SetHeading

func (m *MessageMediaGeoLive) SetHeading(value int)

SetHeading sets value of Heading conditional field.

func (*MessageMediaGeoLive) SetProximityNotificationRadius

func (m *MessageMediaGeoLive) SetProximityNotificationRadius(value int)

SetProximityNotificationRadius sets value of ProximityNotificationRadius conditional field.

func (*MessageMediaGeoLive) String added in v0.12.0

func (m *MessageMediaGeoLive) String() string

String implements fmt.Stringer.

type MessageMediaInvoice

type MessageMediaInvoice struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the shipping address was requested
	ShippingAddressRequested bool
	// Whether this is an example invoice
	Test bool
	// Product name, 1-32 characters
	Title string
	// Product description, 1-255 characters
	Description string
	// URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.
	//
	// Use SetPhoto and GetPhoto helpers.
	Photo WebDocumentClass
	// Message ID of receipt: if set, clients should change the text of the first keyboardButtonBuy¹ button always attached to the message² to a localized version of the word Receipt
	//
	// Links:
	//  1) https://core.telegram.org/constructor/keyboardButtonBuy
	//  2) https://core.telegram.org/constructor/message
	//
	// Use SetReceiptMsgID and GetReceiptMsgID helpers.
	ReceiptMsgID int
	// Three-letter ISO 4217 currency¹ code
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments#supported-currencies
	Currency string
	// Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json¹, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments/currencies.json
	TotalAmount int64
	// Unique bot deep-linking parameter that can be used to generate this invoice
	StartParam string
}

MessageMediaInvoice represents TL type `messageMediaInvoice#84551347`. Invoice

See https://core.telegram.org/constructor/messageMediaInvoice for reference.

func (*MessageMediaInvoice) Decode

func (m *MessageMediaInvoice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaInvoice) Encode

func (m *MessageMediaInvoice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaInvoice) GetPhoto

func (m *MessageMediaInvoice) GetPhoto() (value WebDocumentClass, ok bool)

GetPhoto returns value of Photo conditional field and boolean which is true if field was set.

func (*MessageMediaInvoice) GetReceiptMsgID

func (m *MessageMediaInvoice) GetReceiptMsgID() (value int, ok bool)

GetReceiptMsgID returns value of ReceiptMsgID conditional field and boolean which is true if field was set.

func (*MessageMediaInvoice) SetPhoto

func (m *MessageMediaInvoice) SetPhoto(value WebDocumentClass)

SetPhoto sets value of Photo conditional field.

func (*MessageMediaInvoice) SetReceiptMsgID

func (m *MessageMediaInvoice) SetReceiptMsgID(value int)

SetReceiptMsgID sets value of ReceiptMsgID conditional field.

func (*MessageMediaInvoice) SetShippingAddressRequested

func (m *MessageMediaInvoice) SetShippingAddressRequested(value bool)

SetShippingAddressRequested sets value of ShippingAddressRequested conditional field.

func (*MessageMediaInvoice) SetTest

func (m *MessageMediaInvoice) SetTest(value bool)

SetTest sets value of Test conditional field.

func (*MessageMediaInvoice) String added in v0.12.0

func (m *MessageMediaInvoice) String() string

String implements fmt.Stringer.

type MessageMediaPhoto

type MessageMediaPhoto struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Photo
	//
	// Use SetPhoto and GetPhoto helpers.
	Photo PhotoClass
	// Time to live in seconds of self-destructing photo
	//
	// Use SetTTLSeconds and GetTTLSeconds helpers.
	TTLSeconds int
}

MessageMediaPhoto represents TL type `messageMediaPhoto#695150d7`. Attached photo.

See https://core.telegram.org/constructor/messageMediaPhoto for reference.

func (*MessageMediaPhoto) Decode

func (m *MessageMediaPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaPhoto) Encode

func (m *MessageMediaPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaPhoto) GetPhoto

func (m *MessageMediaPhoto) GetPhoto() (value PhotoClass, ok bool)

GetPhoto returns value of Photo conditional field and boolean which is true if field was set.

func (*MessageMediaPhoto) GetTTLSeconds

func (m *MessageMediaPhoto) GetTTLSeconds() (value int, ok bool)

GetTTLSeconds returns value of TTLSeconds conditional field and boolean which is true if field was set.

func (*MessageMediaPhoto) SetPhoto

func (m *MessageMediaPhoto) SetPhoto(value PhotoClass)

SetPhoto sets value of Photo conditional field.

func (*MessageMediaPhoto) SetTTLSeconds

func (m *MessageMediaPhoto) SetTTLSeconds(value int)

SetTTLSeconds sets value of TTLSeconds conditional field.

func (*MessageMediaPhoto) String added in v0.12.0

func (m *MessageMediaPhoto) String() string

String implements fmt.Stringer.

type MessageMediaPoll

type MessageMediaPoll struct {
	// The poll
	Poll Poll
	// The results of the poll
	Results PollResults
}

MessageMediaPoll represents TL type `messageMediaPoll#4bd6e798`. Poll

See https://core.telegram.org/constructor/messageMediaPoll for reference.

func (*MessageMediaPoll) Decode

func (m *MessageMediaPoll) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaPoll) Encode

func (m *MessageMediaPoll) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaPoll) String added in v0.12.0

func (m *MessageMediaPoll) String() string

String implements fmt.Stringer.

type MessageMediaUnsupported

type MessageMediaUnsupported struct {
}

MessageMediaUnsupported represents TL type `messageMediaUnsupported#9f84f49e`. Current version of the client does not support this media type.

See https://core.telegram.org/constructor/messageMediaUnsupported for reference.

func (*MessageMediaUnsupported) Decode

func (m *MessageMediaUnsupported) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaUnsupported) Encode

func (m *MessageMediaUnsupported) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaUnsupported) String added in v0.12.0

func (m *MessageMediaUnsupported) String() string

String implements fmt.Stringer.

type MessageMediaVenue

type MessageMediaVenue struct {
	// Geolocation of venue
	Geo GeoPointClass
	// Venue name
	Title string
	// Address
	Address string
	// Venue provider: currently only "foursquare" needs to be supported
	Provider string
	// Venue ID in the provider's database
	VenueID string
	// Venue type in the provider's database
	VenueType string
}

MessageMediaVenue represents TL type `messageMediaVenue#2ec0533f`. Venue

See https://core.telegram.org/constructor/messageMediaVenue for reference.

func (*MessageMediaVenue) Decode

func (m *MessageMediaVenue) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaVenue) Encode

func (m *MessageMediaVenue) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaVenue) String added in v0.12.0

func (m *MessageMediaVenue) String() string

String implements fmt.Stringer.

type MessageMediaWebPage

type MessageMediaWebPage struct {
	// Webpage preview
	Webpage WebPageClass
}

MessageMediaWebPage represents TL type `messageMediaWebPage#a32dd600`. Preview of webpage

See https://core.telegram.org/constructor/messageMediaWebPage for reference.

func (*MessageMediaWebPage) Decode

func (m *MessageMediaWebPage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageMediaWebPage) Encode

func (m *MessageMediaWebPage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageMediaWebPage) String added in v0.12.0

func (m *MessageMediaWebPage) String() string

String implements fmt.Stringer.

type MessagePollHandler added in v0.9.0

type MessagePollHandler func(ctx UpdateContext, update *UpdateMessagePoll) error

MessagePollHandler is a MessagePoll event handler.

type MessagePollVoteHandler added in v0.9.0

type MessagePollVoteHandler func(ctx UpdateContext, update *UpdateMessagePollVote) error

MessagePollVoteHandler is a MessagePollVote event handler.

type MessageRange

type MessageRange struct {
	// Start of range (message ID)
	MinID int
	// End of range (message ID)
	MaxID int
}

MessageRange represents TL type `messageRange#ae30253`. Indicates a range of chat messages

See https://core.telegram.org/constructor/messageRange for reference.

func (*MessageRange) Decode

func (m *MessageRange) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageRange) Encode

func (m *MessageRange) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageRange) String added in v0.12.0

func (m *MessageRange) String() string

String implements fmt.Stringer.

type MessageRangeVector added in v0.8.0

type MessageRangeVector struct {
	// Elements of Vector<MessageRange>
	Elems []MessageRange
}

MessageRangeVector is a box for Vector<MessageRange>

func (*MessageRangeVector) Decode added in v0.8.0

func (vec *MessageRangeVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageRangeVector) Encode added in v0.8.0

func (vec *MessageRangeVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageRangeVector) String added in v0.12.0

func (vec *MessageRangeVector) String() string

String implements fmt.Stringer.

type MessageReplies

type MessageReplies struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this constructor contains information about the comment section of a channel post, or a simple message thread¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	Comments bool
	// Contains the total number of replies in this thread or comment section.
	Replies int
	// PTS¹ of the message that started this thread.
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	RepliesPts int
	// For channel post comments, contains information about the last few comment posters for a specific thread, to show a small list of commenter profile pictures in client previews.
	//
	// Use SetRecentRepliers and GetRecentRepliers helpers.
	RecentRepliers []PeerClass
	// For channel post comments, contains the ID of the associated discussion supergroup¹
	//
	// Links:
	//  1) https://core.telegram.org/api/discussion
	//
	// Use SetChannelID and GetChannelID helpers.
	ChannelID int
	// ID of the latest message in this thread or comment section.
	//
	// Use SetMaxID and GetMaxID helpers.
	MaxID int
	// Contains the ID of the latest read message in this thread or comment section.
	//
	// Use SetReadMaxID and GetReadMaxID helpers.
	ReadMaxID int
}

MessageReplies represents TL type `messageReplies#4128faac`. Info about the comment section of a channel post, or a simple message thread¹

Links:

  1. https://core.telegram.org/api/threads

See https://core.telegram.org/constructor/messageReplies for reference.

func (*MessageReplies) Decode

func (m *MessageReplies) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageReplies) Encode

func (m *MessageReplies) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageReplies) GetChannelID

func (m *MessageReplies) GetChannelID() (value int, ok bool)

GetChannelID returns value of ChannelID conditional field and boolean which is true if field was set.

func (*MessageReplies) GetMaxID

func (m *MessageReplies) GetMaxID() (value int, ok bool)

GetMaxID returns value of MaxID conditional field and boolean which is true if field was set.

func (*MessageReplies) GetReadMaxID

func (m *MessageReplies) GetReadMaxID() (value int, ok bool)

GetReadMaxID returns value of ReadMaxID conditional field and boolean which is true if field was set.

func (*MessageReplies) GetRecentRepliers

func (m *MessageReplies) GetRecentRepliers() (value []PeerClass, ok bool)

GetRecentRepliers returns value of RecentRepliers conditional field and boolean which is true if field was set.

func (*MessageReplies) SetChannelID

func (m *MessageReplies) SetChannelID(value int)

SetChannelID sets value of ChannelID conditional field.

func (*MessageReplies) SetComments

func (m *MessageReplies) SetComments(value bool)

SetComments sets value of Comments conditional field.

func (*MessageReplies) SetMaxID

func (m *MessageReplies) SetMaxID(value int)

SetMaxID sets value of MaxID conditional field.

func (*MessageReplies) SetReadMaxID

func (m *MessageReplies) SetReadMaxID(value int)

SetReadMaxID sets value of ReadMaxID conditional field.

func (*MessageReplies) SetRecentRepliers

func (m *MessageReplies) SetRecentRepliers(value []PeerClass)

SetRecentRepliers sets value of RecentRepliers conditional field.

func (*MessageReplies) String added in v0.12.0

func (m *MessageReplies) String() string

String implements fmt.Stringer.

type MessageReplyHeader

type MessageReplyHeader struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// ID of message to which this message is replying
	ReplyToMsgID int
	// For replies sent in channel discussion threads¹ of which the current user is not a member, the discussion group ID
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetReplyToPeerID and GetReplyToPeerID helpers.
	ReplyToPeerID PeerClass
	// ID of the message that started this message thread¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetReplyToTopID and GetReplyToTopID helpers.
	ReplyToTopID int
}

MessageReplyHeader represents TL type `messageReplyHeader#a6d57763`. Message replies and thread¹ information

Links:

  1. https://core.telegram.org/api/threads

See https://core.telegram.org/constructor/messageReplyHeader for reference.

func (*MessageReplyHeader) Decode

func (m *MessageReplyHeader) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageReplyHeader) Encode

func (m *MessageReplyHeader) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageReplyHeader) GetReplyToPeerID

func (m *MessageReplyHeader) GetReplyToPeerID() (value PeerClass, ok bool)

GetReplyToPeerID returns value of ReplyToPeerID conditional field and boolean which is true if field was set.

func (*MessageReplyHeader) GetReplyToTopID

func (m *MessageReplyHeader) GetReplyToTopID() (value int, ok bool)

GetReplyToTopID returns value of ReplyToTopID conditional field and boolean which is true if field was set.

func (*MessageReplyHeader) SetReplyToPeerID

func (m *MessageReplyHeader) SetReplyToPeerID(value PeerClass)

SetReplyToPeerID sets value of ReplyToPeerID conditional field.

func (*MessageReplyHeader) SetReplyToTopID

func (m *MessageReplyHeader) SetReplyToTopID(value int)

SetReplyToTopID sets value of ReplyToTopID conditional field.

func (*MessageReplyHeader) String added in v0.12.0

func (m *MessageReplyHeader) String() string

String implements fmt.Stringer.

type MessageService

type MessageService struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the message is outgoing
	Out bool
	// Whether we were mentioned in the message
	Mentioned bool
	// Whether the message contains unread media
	MediaUnread bool
	// Whether the message is silent
	Silent bool
	// Whether it's a channel post
	Post bool
	// This is a legacy message: it has to be refetched with the new layer
	Legacy bool
	// Message ID
	ID int
	// ID of the sender of this message
	//
	// Use SetFromID and GetFromID helpers.
	FromID PeerClass
	// Sender of service message
	PeerID PeerClass
	// Reply (thread) information
	//
	// Use SetReplyTo and GetReplyTo helpers.
	ReplyTo MessageReplyHeader
	// Message date
	Date int
	// Event connected with the service message
	Action MessageActionClass
}

MessageService represents TL type `messageService#286fa604`. Indicates a service message

See https://core.telegram.org/constructor/messageService for reference.

func (*MessageService) Decode

func (m *MessageService) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageService) Encode

func (m *MessageService) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageService) GetFromID

func (m *MessageService) GetFromID() (value PeerClass, ok bool)

GetFromID returns value of FromID conditional field and boolean which is true if field was set.

func (*MessageService) GetReplyTo

func (m *MessageService) GetReplyTo() (value MessageReplyHeader, ok bool)

GetReplyTo returns value of ReplyTo conditional field and boolean which is true if field was set.

func (*MessageService) SetFromID

func (m *MessageService) SetFromID(value PeerClass)

SetFromID sets value of FromID conditional field.

func (*MessageService) SetLegacy

func (m *MessageService) SetLegacy(value bool)

SetLegacy sets value of Legacy conditional field.

func (*MessageService) SetMediaUnread

func (m *MessageService) SetMediaUnread(value bool)

SetMediaUnread sets value of MediaUnread conditional field.

func (*MessageService) SetMentioned

func (m *MessageService) SetMentioned(value bool)

SetMentioned sets value of Mentioned conditional field.

func (*MessageService) SetOut

func (m *MessageService) SetOut(value bool)

SetOut sets value of Out conditional field.

func (*MessageService) SetPost

func (m *MessageService) SetPost(value bool)

SetPost sets value of Post conditional field.

func (*MessageService) SetReplyTo

func (m *MessageService) SetReplyTo(value MessageReplyHeader)

SetReplyTo sets value of ReplyTo conditional field.

func (*MessageService) SetSilent

func (m *MessageService) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*MessageService) String added in v0.12.0

func (m *MessageService) String() string

String implements fmt.Stringer.

type MessageUserVote

type MessageUserVote struct {
	// User ID
	UserID int
	// The option chosen by the user
	Option []byte
	// When did the user cast the vote
	Date int
}

MessageUserVote represents TL type `messageUserVote#a28e5559`. How a user voted in a poll

See https://core.telegram.org/constructor/messageUserVote for reference.

func (*MessageUserVote) Decode

func (m *MessageUserVote) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageUserVote) Encode

func (m *MessageUserVote) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageUserVote) String added in v0.12.0

func (m *MessageUserVote) String() string

String implements fmt.Stringer.

type MessageUserVoteBox

type MessageUserVoteBox struct {
	MessageUserVote MessageUserVoteClass
}

MessageUserVote boxes the MessageUserVoteClass providing a helper.

func (*MessageUserVoteBox) Decode

func (b *MessageUserVoteBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessageUserVoteBox.

func (*MessageUserVoteBox) Encode

func (b *MessageUserVoteBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessageUserVoteBox.

type MessageUserVoteClass

type MessageUserVoteClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessageUserVoteClass represents MessageUserVote generic type.

See https://core.telegram.org/type/MessageUserVote for reference.

Example:

g, err := DecodeMessageUserVote(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessageUserVote: // messageUserVote#a28e5559
case *MessageUserVoteInputOption: // messageUserVoteInputOption#36377430
case *MessageUserVoteMultiple: // messageUserVoteMultiple#e8fe0de
default: panic(v)
}

func DecodeMessageUserVote

func DecodeMessageUserVote(buf *bin.Buffer) (MessageUserVoteClass, error)

DecodeMessageUserVote implements binary de-serialization for MessageUserVoteClass.

type MessageUserVoteInputOption

type MessageUserVoteInputOption struct {
	// The user that voted for the queried option
	UserID int
	// When did the user cast the vote
	Date int
}

MessageUserVoteInputOption represents TL type `messageUserVoteInputOption#36377430`. How a user voted in a poll (reduced constructor, returned if an option was provided to messages.getPollVotes¹)

Links:

  1. https://core.telegram.org/method/messages.getPollVotes

See https://core.telegram.org/constructor/messageUserVoteInputOption for reference.

func (*MessageUserVoteInputOption) Decode

Decode implements bin.Decoder.

func (*MessageUserVoteInputOption) Encode

Encode implements bin.Encoder.

func (*MessageUserVoteInputOption) String added in v0.12.0

func (m *MessageUserVoteInputOption) String() string

String implements fmt.Stringer.

type MessageUserVoteMultiple

type MessageUserVoteMultiple struct {
	// User ID
	UserID int
	// Options chosen by the user
	Options [][]byte
	// When did the user cast their votes
	Date int
}

MessageUserVoteMultiple represents TL type `messageUserVoteMultiple#e8fe0de`. How a user voted in a multiple-choice poll

See https://core.telegram.org/constructor/messageUserVoteMultiple for reference.

func (*MessageUserVoteMultiple) Decode

func (m *MessageUserVoteMultiple) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageUserVoteMultiple) Encode

func (m *MessageUserVoteMultiple) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageUserVoteMultiple) String added in v0.12.0

func (m *MessageUserVoteMultiple) String() string

String implements fmt.Stringer.

type MessageViews

type MessageViews struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Viewcount of message
	//
	// Use SetViews and GetViews helpers.
	Views int
	// Forward count of message
	//
	// Use SetForwards and GetForwards helpers.
	Forwards int
	// Reply and thread¹ information of message
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetReplies and GetReplies helpers.
	Replies MessageReplies
}

MessageViews represents TL type `messageViews#455b853d`. View, forward counter + info about replies of a specific message

See https://core.telegram.org/constructor/messageViews for reference.

func (*MessageViews) Decode

func (m *MessageViews) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessageViews) Encode

func (m *MessageViews) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessageViews) GetForwards

func (m *MessageViews) GetForwards() (value int, ok bool)

GetForwards returns value of Forwards conditional field and boolean which is true if field was set.

func (*MessageViews) GetReplies

func (m *MessageViews) GetReplies() (value MessageReplies, ok bool)

GetReplies returns value of Replies conditional field and boolean which is true if field was set.

func (*MessageViews) GetViews

func (m *MessageViews) GetViews() (value int, ok bool)

GetViews returns value of Views conditional field and boolean which is true if field was set.

func (*MessageViews) SetForwards

func (m *MessageViews) SetForwards(value int)

SetForwards sets value of Forwards conditional field.

func (*MessageViews) SetReplies

func (m *MessageViews) SetReplies(value MessageReplies)

SetReplies sets value of Replies conditional field.

func (*MessageViews) SetViews

func (m *MessageViews) SetViews(value int)

SetViews sets value of Views conditional field.

func (*MessageViews) String added in v0.12.0

func (m *MessageViews) String() string

String implements fmt.Stringer.

type MessagesAcceptEncryptionRequest

type MessagesAcceptEncryptionRequest struct {
	// Secret chat ID
	Peer InputEncryptedChat
	// B = g ^ b mod p, see Wikipedia¹
	//
	// Links:
	//  1) https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
	GB []byte
	// 64-bit fingerprint of the received key
	KeyFingerprint int64
}

MessagesAcceptEncryptionRequest represents TL type `messages.acceptEncryption#3dbc0415`. Confirms creation of a secret chat

See https://core.telegram.org/method/messages.acceptEncryption for reference.

func (*MessagesAcceptEncryptionRequest) Decode

Decode implements bin.Decoder.

func (*MessagesAcceptEncryptionRequest) Encode

Encode implements bin.Encoder.

func (*MessagesAcceptEncryptionRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesAcceptUrlAuthRequest

type MessagesAcceptUrlAuthRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Set this flag to allow the bot to send messages to you (if requested)
	WriteAllowed bool
	// The location of the message
	Peer InputPeerClass
	// Message ID of the message with the login button
	MsgID int
	// ID of the login button
	ButtonID int
}

MessagesAcceptUrlAuthRequest represents TL type `messages.acceptUrlAuth#f729ea98`. Use this to accept a Seamless Telegram Login authorization request, for more info click here »¹

Links:

  1. https://core.telegram.org/api/url-authorization

See https://core.telegram.org/method/messages.acceptUrlAuth for reference.

func (*MessagesAcceptUrlAuthRequest) Decode

Decode implements bin.Decoder.

func (*MessagesAcceptUrlAuthRequest) Encode

Encode implements bin.Encoder.

func (*MessagesAcceptUrlAuthRequest) SetWriteAllowed

func (a *MessagesAcceptUrlAuthRequest) SetWriteAllowed(value bool)

SetWriteAllowed sets value of WriteAllowed conditional field.

func (*MessagesAcceptUrlAuthRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesAddChatUserRequest

type MessagesAddChatUserRequest struct {
	// Chat ID
	ChatID int
	// User ID to be added
	UserID InputUserClass
	// Number of last messages to be forwarded
	FwdLimit int
}

MessagesAddChatUserRequest represents TL type `messages.addChatUser#f9a0aa09`. Adds a user to a chat and sends a service message on it.

See https://core.telegram.org/method/messages.addChatUser for reference.

func (*MessagesAddChatUserRequest) Decode

Decode implements bin.Decoder.

func (*MessagesAddChatUserRequest) Encode

Encode implements bin.Encoder.

func (*MessagesAddChatUserRequest) String added in v0.12.0

func (a *MessagesAddChatUserRequest) String() string

String implements fmt.Stringer.

type MessagesAffectedHistory

type MessagesAffectedHistory struct {
	// Number of events occured in a text box
	Pts int
	// Number of affected events
	PtsCount int
	// If a parameter contains positive value, it is necessary to repeat the method call using the given value; during the proceeding of all the history the value itself shall gradually decrease
	Offset int
}

MessagesAffectedHistory represents TL type `messages.affectedHistory#b45c69d1`. Affected part of communication history with the user or in a chat.

See https://core.telegram.org/constructor/messages.affectedHistory for reference.

func (*MessagesAffectedHistory) Decode

func (a *MessagesAffectedHistory) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesAffectedHistory) Encode

func (a *MessagesAffectedHistory) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesAffectedHistory) String added in v0.12.0

func (a *MessagesAffectedHistory) String() string

String implements fmt.Stringer.

type MessagesAffectedMessages

type MessagesAffectedMessages struct {
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

MessagesAffectedMessages represents TL type `messages.affectedMessages#84d19185`. Events affected by operation

See https://core.telegram.org/constructor/messages.affectedMessages for reference.

func (*MessagesAffectedMessages) Decode

func (a *MessagesAffectedMessages) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesAffectedMessages) Encode

func (a *MessagesAffectedMessages) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesAffectedMessages) String added in v0.12.0

func (a *MessagesAffectedMessages) String() string

String implements fmt.Stringer.

type MessagesAllStickers

type MessagesAllStickers struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// All stickersets
	Sets []StickerSet
}

MessagesAllStickers represents TL type `messages.allStickers#edfd405f`. Info about all installed stickers

See https://core.telegram.org/constructor/messages.allStickers for reference.

func (*MessagesAllStickers) Decode

func (a *MessagesAllStickers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesAllStickers) Encode

func (a *MessagesAllStickers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesAllStickers) String added in v0.12.0

func (a *MessagesAllStickers) String() string

String implements fmt.Stringer.

type MessagesAllStickersBox

type MessagesAllStickersBox struct {
	AllStickers MessagesAllStickersClass
}

MessagesAllStickers boxes the MessagesAllStickersClass providing a helper.

func (*MessagesAllStickersBox) Decode

func (b *MessagesAllStickersBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesAllStickersBox.

func (*MessagesAllStickersBox) Encode

func (b *MessagesAllStickersBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesAllStickersBox.

type MessagesAllStickersClass

type MessagesAllStickersClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesAllStickersClass represents messages.AllStickers generic type.

See https://core.telegram.org/type/messages.AllStickers for reference.

Example:

g, err := DecodeMessagesAllStickers(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesAllStickersNotModified: // messages.allStickersNotModified#e86602c3
case *MessagesAllStickers: // messages.allStickers#edfd405f
default: panic(v)
}

func DecodeMessagesAllStickers

func DecodeMessagesAllStickers(buf *bin.Buffer) (MessagesAllStickersClass, error)

DecodeMessagesAllStickers implements binary de-serialization for MessagesAllStickersClass.

type MessagesAllStickersNotModified

type MessagesAllStickersNotModified struct {
}

MessagesAllStickersNotModified represents TL type `messages.allStickersNotModified#e86602c3`. Info about all installed stickers hasn't changed

See https://core.telegram.org/constructor/messages.allStickersNotModified for reference.

func (*MessagesAllStickersNotModified) Decode

Decode implements bin.Decoder.

func (*MessagesAllStickersNotModified) Encode

Encode implements bin.Encoder.

func (*MessagesAllStickersNotModified) String added in v0.12.0

String implements fmt.Stringer.

type MessagesArchivedStickers

type MessagesArchivedStickers struct {
	// Number of archived stickers
	Count int
	// Archived stickersets
	Sets []StickerSetCoveredClass
}

MessagesArchivedStickers represents TL type `messages.archivedStickers#4fcba9c8`. Archived stickersets

See https://core.telegram.org/constructor/messages.archivedStickers for reference.

func (*MessagesArchivedStickers) Decode

func (a *MessagesArchivedStickers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesArchivedStickers) Encode

func (a *MessagesArchivedStickers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesArchivedStickers) String added in v0.12.0

func (a *MessagesArchivedStickers) String() string

String implements fmt.Stringer.

type MessagesBotCallbackAnswer

type MessagesBotCallbackAnswer struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether an alert should be shown to the user instead of a toast notification
	Alert bool
	// Whether an URL is present
	HasURL bool
	// Whether to show games in WebView or in native UI.
	NativeUI bool
	// Alert to show
	//
	// Use SetMessage and GetMessage helpers.
	Message string
	// URL to open
	//
	// Use SetURL and GetURL helpers.
	URL string
	// For how long should this answer be cached
	CacheTime int
}

MessagesBotCallbackAnswer represents TL type `messages.botCallbackAnswer#36585ea4`. Callback answer sent by the bot in response to a button press

See https://core.telegram.org/constructor/messages.botCallbackAnswer for reference.

func (*MessagesBotCallbackAnswer) Decode

func (b *MessagesBotCallbackAnswer) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesBotCallbackAnswer) Encode

func (b *MessagesBotCallbackAnswer) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesBotCallbackAnswer) GetMessage

func (b *MessagesBotCallbackAnswer) GetMessage() (value string, ok bool)

GetMessage returns value of Message conditional field and boolean which is true if field was set.

func (*MessagesBotCallbackAnswer) GetURL

func (b *MessagesBotCallbackAnswer) GetURL() (value string, ok bool)

GetURL returns value of URL conditional field and boolean which is true if field was set.

func (*MessagesBotCallbackAnswer) SetAlert

func (b *MessagesBotCallbackAnswer) SetAlert(value bool)

SetAlert sets value of Alert conditional field.

func (*MessagesBotCallbackAnswer) SetHasURL

func (b *MessagesBotCallbackAnswer) SetHasURL(value bool)

SetHasURL sets value of HasURL conditional field.

func (*MessagesBotCallbackAnswer) SetMessage

func (b *MessagesBotCallbackAnswer) SetMessage(value string)

SetMessage sets value of Message conditional field.

func (*MessagesBotCallbackAnswer) SetNativeUI

func (b *MessagesBotCallbackAnswer) SetNativeUI(value bool)

SetNativeUI sets value of NativeUI conditional field.

func (*MessagesBotCallbackAnswer) SetURL

func (b *MessagesBotCallbackAnswer) SetURL(value string)

SetURL sets value of URL conditional field.

func (*MessagesBotCallbackAnswer) String added in v0.12.0

func (b *MessagesBotCallbackAnswer) String() string

String implements fmt.Stringer.

type MessagesBotResults

type MessagesBotResults struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the result is a picture gallery
	Gallery bool
	// Query ID
	QueryID int64
	// The next offset to use when navigating through results
	//
	// Use SetNextOffset and GetNextOffset helpers.
	NextOffset string
	// Whether the bot requested the user to message him in private
	//
	// Use SetSwitchPm and GetSwitchPm helpers.
	SwitchPm InlineBotSwitchPM
	// The results
	Results []BotInlineResultClass
	// Caching validity of the results
	CacheTime int
	// Users mentioned in the results
	Users []UserClass
}

MessagesBotResults represents TL type `messages.botResults#947ca848`. Result of a query to an inline bot

See https://core.telegram.org/constructor/messages.botResults for reference.

func (*MessagesBotResults) Decode

func (b *MessagesBotResults) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesBotResults) Encode

func (b *MessagesBotResults) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesBotResults) GetNextOffset

func (b *MessagesBotResults) GetNextOffset() (value string, ok bool)

GetNextOffset returns value of NextOffset conditional field and boolean which is true if field was set.

func (*MessagesBotResults) GetSwitchPm

func (b *MessagesBotResults) GetSwitchPm() (value InlineBotSwitchPM, ok bool)

GetSwitchPm returns value of SwitchPm conditional field and boolean which is true if field was set.

func (*MessagesBotResults) SetGallery

func (b *MessagesBotResults) SetGallery(value bool)

SetGallery sets value of Gallery conditional field.

func (*MessagesBotResults) SetNextOffset

func (b *MessagesBotResults) SetNextOffset(value string)

SetNextOffset sets value of NextOffset conditional field.

func (*MessagesBotResults) SetSwitchPm

func (b *MessagesBotResults) SetSwitchPm(value InlineBotSwitchPM)

SetSwitchPm sets value of SwitchPm conditional field.

func (*MessagesBotResults) String added in v0.12.0

func (b *MessagesBotResults) String() string

String implements fmt.Stringer.

type MessagesChannelMessages

type MessagesChannelMessages struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If set, returned results may be inexact
	Inexact bool
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Total number of results were found server-side (may not be all included here)
	Count int
	// Indicates the absolute position of messages[0] within the total result set with count count. This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.
	//
	// Use SetOffsetIDOffset and GetOffsetIDOffset helpers.
	OffsetIDOffset int
	// Found messages
	Messages []MessageClass
	// Chats
	Chats []ChatClass
	// Users
	Users []UserClass
}

MessagesChannelMessages represents TL type `messages.channelMessages#64479808`. Channel messages

See https://core.telegram.org/constructor/messages.channelMessages for reference.

func (*MessagesChannelMessages) Decode

func (c *MessagesChannelMessages) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesChannelMessages) Encode

func (c *MessagesChannelMessages) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesChannelMessages) GetOffsetIDOffset

func (c *MessagesChannelMessages) GetOffsetIDOffset() (value int, ok bool)

GetOffsetIDOffset returns value of OffsetIDOffset conditional field and boolean which is true if field was set.

func (*MessagesChannelMessages) SetInexact

func (c *MessagesChannelMessages) SetInexact(value bool)

SetInexact sets value of Inexact conditional field.

func (*MessagesChannelMessages) SetOffsetIDOffset

func (c *MessagesChannelMessages) SetOffsetIDOffset(value int)

SetOffsetIDOffset sets value of OffsetIDOffset conditional field.

func (*MessagesChannelMessages) String added in v0.12.0

func (c *MessagesChannelMessages) String() string

String implements fmt.Stringer.

type MessagesChatFull

type MessagesChatFull struct {
	// Extended info on a chat
	FullChat ChatFullClass
	// List containing basic info on chat
	Chats []ChatClass
	// List of users mentioned above
	Users []UserClass
}

MessagesChatFull represents TL type `messages.chatFull#e5d7d19c`. Extended info on chat and auxiliary data.

See https://core.telegram.org/constructor/messages.chatFull for reference.

func (*MessagesChatFull) Decode

func (c *MessagesChatFull) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesChatFull) Encode

func (c *MessagesChatFull) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesChatFull) String added in v0.12.0

func (c *MessagesChatFull) String() string

String implements fmt.Stringer.

type MessagesChats

type MessagesChats struct {
	// List of chats
	Chats []ChatClass
}

MessagesChats represents TL type `messages.chats#64ff9fd5`. List of chats with auxiliary data.

See https://core.telegram.org/constructor/messages.chats for reference.

func (*MessagesChats) Decode

func (c *MessagesChats) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesChats) Encode

func (c *MessagesChats) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesChats) String added in v0.12.0

func (c *MessagesChats) String() string

String implements fmt.Stringer.

type MessagesChatsBox

type MessagesChatsBox struct {
	Chats MessagesChatsClass
}

MessagesChats boxes the MessagesChatsClass providing a helper.

func (*MessagesChatsBox) Decode

func (b *MessagesChatsBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesChatsBox.

func (*MessagesChatsBox) Encode

func (b *MessagesChatsBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesChatsBox.

type MessagesChatsClass

type MessagesChatsClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesChatsClass represents messages.Chats generic type.

See https://core.telegram.org/type/messages.Chats for reference.

Example:

g, err := DecodeMessagesChats(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesChats: // messages.chats#64ff9fd5
case *MessagesChatsSlice: // messages.chatsSlice#9cd81144
default: panic(v)
}

func DecodeMessagesChats

func DecodeMessagesChats(buf *bin.Buffer) (MessagesChatsClass, error)

DecodeMessagesChats implements binary de-serialization for MessagesChatsClass.

type MessagesChatsSlice

type MessagesChatsSlice struct {
	// Total number of results that were found server-side (not all are included in chats)
	Count int
	// Chats
	Chats []ChatClass
}

MessagesChatsSlice represents TL type `messages.chatsSlice#9cd81144`. Partial list of chats, more would have to be fetched with pagination¹

Links:

  1. https://core.telegram.org/api/offsets

See https://core.telegram.org/constructor/messages.chatsSlice for reference.

func (*MessagesChatsSlice) Decode

func (c *MessagesChatsSlice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesChatsSlice) Encode

func (c *MessagesChatsSlice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesChatsSlice) String added in v0.12.0

func (c *MessagesChatsSlice) String() string

String implements fmt.Stringer.

type MessagesCheckChatInviteRequest

type MessagesCheckChatInviteRequest struct {
	// Invite hash in t.me/joinchat/hash
	Hash string
}

MessagesCheckChatInviteRequest represents TL type `messages.checkChatInvite#3eadb1bb`. Check the validity of a chat invite link and get basic info about it

See https://core.telegram.org/method/messages.checkChatInvite for reference.

func (*MessagesCheckChatInviteRequest) Decode

Decode implements bin.Decoder.

func (*MessagesCheckChatInviteRequest) Encode

Encode implements bin.Encoder.

func (*MessagesCheckChatInviteRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesClearAllDraftsRequest

type MessagesClearAllDraftsRequest struct {
}

MessagesClearAllDraftsRequest represents TL type `messages.clearAllDrafts#7e58ee9c`. Clear all drafts¹.

Links:

  1. https://core.telegram.org/api/drafts

See https://core.telegram.org/method/messages.clearAllDrafts for reference.

func (*MessagesClearAllDraftsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesClearAllDraftsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesClearAllDraftsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesClearRecentStickersRequest

type MessagesClearRecentStickersRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Set this flag to clear the list of stickers recently attached to photo or video files
	Attached bool
}

MessagesClearRecentStickersRequest represents TL type `messages.clearRecentStickers#8999602d`. Clear recent stickers

See https://core.telegram.org/method/messages.clearRecentStickers for reference.

func (*MessagesClearRecentStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesClearRecentStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesClearRecentStickersRequest) SetAttached

func (c *MessagesClearRecentStickersRequest) SetAttached(value bool)

SetAttached sets value of Attached conditional field.

func (*MessagesClearRecentStickersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesCreateChatRequest

type MessagesCreateChatRequest struct {
	// List of user IDs to be invited
	Users []InputUserClass
	// Chat name
	Title string
}

MessagesCreateChatRequest represents TL type `messages.createChat#9cb126e`. Creates a new chat.

See https://core.telegram.org/method/messages.createChat for reference.

func (*MessagesCreateChatRequest) Decode

func (c *MessagesCreateChatRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesCreateChatRequest) Encode

func (c *MessagesCreateChatRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesCreateChatRequest) String added in v0.12.0

func (c *MessagesCreateChatRequest) String() string

String implements fmt.Stringer.

type MessagesDeleteChatUserRequest

type MessagesDeleteChatUserRequest struct {
	// Chat ID
	ChatID int
	// User ID to be deleted
	UserID InputUserClass
}

MessagesDeleteChatUserRequest represents TL type `messages.deleteChatUser#e0611f16`. Deletes a user from a chat and sends a service message on it.

See https://core.telegram.org/method/messages.deleteChatUser for reference.

func (*MessagesDeleteChatUserRequest) Decode

Decode implements bin.Decoder.

func (*MessagesDeleteChatUserRequest) Encode

Encode implements bin.Encoder.

func (*MessagesDeleteChatUserRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesDeleteHistoryRequest

type MessagesDeleteHistoryRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Just clear history for the current user, without actually removing messages for every chat user
	JustClear bool
	// Whether to delete the message history for all chat participants
	Revoke bool
	// User or chat, communication history of which will be deleted
	Peer InputPeerClass
	// Maximum ID of message to delete
	MaxID int
}

MessagesDeleteHistoryRequest represents TL type `messages.deleteHistory#1c015b09`. Deletes communication history.

See https://core.telegram.org/method/messages.deleteHistory for reference.

func (*MessagesDeleteHistoryRequest) Decode

Decode implements bin.Decoder.

func (*MessagesDeleteHistoryRequest) Encode

Encode implements bin.Encoder.

func (*MessagesDeleteHistoryRequest) SetJustClear

func (d *MessagesDeleteHistoryRequest) SetJustClear(value bool)

SetJustClear sets value of JustClear conditional field.

func (*MessagesDeleteHistoryRequest) SetRevoke

func (d *MessagesDeleteHistoryRequest) SetRevoke(value bool)

SetRevoke sets value of Revoke conditional field.

func (*MessagesDeleteHistoryRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesDeleteMessagesRequest

type MessagesDeleteMessagesRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to delete messages for all participants of the chat
	Revoke bool
	// Message ID list
	ID []int
}

MessagesDeleteMessagesRequest represents TL type `messages.deleteMessages#e58e95d2`. Deletes messages by their identifiers.

See https://core.telegram.org/method/messages.deleteMessages for reference.

func (*MessagesDeleteMessagesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesDeleteMessagesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesDeleteMessagesRequest) SetRevoke

func (d *MessagesDeleteMessagesRequest) SetRevoke(value bool)

SetRevoke sets value of Revoke conditional field.

func (*MessagesDeleteMessagesRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesDeleteScheduledMessagesRequest

type MessagesDeleteScheduledMessagesRequest struct {
	// Peer
	Peer InputPeerClass
	// Scheduled message IDs
	ID []int
}

MessagesDeleteScheduledMessagesRequest represents TL type `messages.deleteScheduledMessages#59ae2b16`. Delete scheduled messages

See https://core.telegram.org/method/messages.deleteScheduledMessages for reference.

func (*MessagesDeleteScheduledMessagesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesDeleteScheduledMessagesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesDeleteScheduledMessagesRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesDhConfig

type MessagesDhConfig struct {
	// New value prime, see Wikipedia¹
	//
	// Links:
	//  1) https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
	G int
	// New value primitive root, see Wikipedia¹
	//
	// Links:
	//  1) https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
	P []byte
	// Vestion of set of parameters
	Version int
	// Random sequence of bytes of assigned length
	Random []byte
}

MessagesDhConfig represents TL type `messages.dhConfig#2c221edd`. New set of configuring parameters.

See https://core.telegram.org/constructor/messages.dhConfig for reference.

func (*MessagesDhConfig) Decode

func (d *MessagesDhConfig) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesDhConfig) Encode

func (d *MessagesDhConfig) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesDhConfig) String added in v0.12.0

func (d *MessagesDhConfig) String() string

String implements fmt.Stringer.

type MessagesDhConfigBox

type MessagesDhConfigBox struct {
	DhConfig MessagesDhConfigClass
}

MessagesDhConfig boxes the MessagesDhConfigClass providing a helper.

func (*MessagesDhConfigBox) Decode

func (b *MessagesDhConfigBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesDhConfigBox.

func (*MessagesDhConfigBox) Encode

func (b *MessagesDhConfigBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesDhConfigBox.

type MessagesDhConfigClass

type MessagesDhConfigClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesDhConfigClass represents messages.DhConfig generic type.

See https://core.telegram.org/type/messages.DhConfig for reference.

Example:

g, err := DecodeMessagesDhConfig(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesDhConfigNotModified: // messages.dhConfigNotModified#c0e24635
case *MessagesDhConfig: // messages.dhConfig#2c221edd
default: panic(v)
}

func DecodeMessagesDhConfig

func DecodeMessagesDhConfig(buf *bin.Buffer) (MessagesDhConfigClass, error)

DecodeMessagesDhConfig implements binary de-serialization for MessagesDhConfigClass.

type MessagesDhConfigNotModified

type MessagesDhConfigNotModified struct {
	// Random sequence of bytes of assigned length
	Random []byte
}

MessagesDhConfigNotModified represents TL type `messages.dhConfigNotModified#c0e24635`. Configuring parameters did not change.

See https://core.telegram.org/constructor/messages.dhConfigNotModified for reference.

func (*MessagesDhConfigNotModified) Decode

Decode implements bin.Decoder.

func (*MessagesDhConfigNotModified) Encode

Encode implements bin.Encoder.

func (*MessagesDhConfigNotModified) String added in v0.12.0

func (d *MessagesDhConfigNotModified) String() string

String implements fmt.Stringer.

type MessagesDialogs

type MessagesDialogs struct {
	// List of chats
	Dialogs []DialogClass
	// List of last messages from each chat
	Messages []MessageClass
	// List of groups mentioned in the chats
	Chats []ChatClass
	// List of users mentioned in messages and groups
	Users []UserClass
}

MessagesDialogs represents TL type `messages.dialogs#15ba6c40`. Full list of chats with messages and auxiliary data.

See https://core.telegram.org/constructor/messages.dialogs for reference.

func (*MessagesDialogs) Decode

func (d *MessagesDialogs) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesDialogs) Encode

func (d *MessagesDialogs) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesDialogs) String added in v0.12.0

func (d *MessagesDialogs) String() string

String implements fmt.Stringer.

type MessagesDialogsBox

type MessagesDialogsBox struct {
	Dialogs MessagesDialogsClass
}

MessagesDialogs boxes the MessagesDialogsClass providing a helper.

func (*MessagesDialogsBox) Decode

func (b *MessagesDialogsBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesDialogsBox.

func (*MessagesDialogsBox) Encode

func (b *MessagesDialogsBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesDialogsBox.

type MessagesDialogsClass

type MessagesDialogsClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesDialogsClass represents messages.Dialogs generic type.

See https://core.telegram.org/type/messages.Dialogs for reference.

Example:

g, err := DecodeMessagesDialogs(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesDialogs: // messages.dialogs#15ba6c40
case *MessagesDialogsSlice: // messages.dialogsSlice#71e094f3
case *MessagesDialogsNotModified: // messages.dialogsNotModified#f0e3e596
default: panic(v)
}

func DecodeMessagesDialogs

func DecodeMessagesDialogs(buf *bin.Buffer) (MessagesDialogsClass, error)

DecodeMessagesDialogs implements binary de-serialization for MessagesDialogsClass.

type MessagesDialogsNotModified

type MessagesDialogsNotModified struct {
	// Number of dialogs found server-side by the query
	Count int
}

MessagesDialogsNotModified represents TL type `messages.dialogsNotModified#f0e3e596`. Dialogs haven't changed

See https://core.telegram.org/constructor/messages.dialogsNotModified for reference.

func (*MessagesDialogsNotModified) Decode

Decode implements bin.Decoder.

func (*MessagesDialogsNotModified) Encode

Encode implements bin.Encoder.

func (*MessagesDialogsNotModified) String added in v0.12.0

func (d *MessagesDialogsNotModified) String() string

String implements fmt.Stringer.

type MessagesDialogsSlice

type MessagesDialogsSlice struct {
	// Total number of dialogs
	Count int
	// List of dialogs
	Dialogs []DialogClass
	// List of last messages from dialogs
	Messages []MessageClass
	// List of chats mentioned in dialogs
	Chats []ChatClass
	// List of users mentioned in messages and chats
	Users []UserClass
}

MessagesDialogsSlice represents TL type `messages.dialogsSlice#71e094f3`. Incomplete list of dialogs with messages and auxiliary data.

See https://core.telegram.org/constructor/messages.dialogsSlice for reference.

func (*MessagesDialogsSlice) Decode

func (d *MessagesDialogsSlice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesDialogsSlice) Encode

func (d *MessagesDialogsSlice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesDialogsSlice) String added in v0.12.0

func (d *MessagesDialogsSlice) String() string

String implements fmt.Stringer.

type MessagesDiscardEncryptionRequest

type MessagesDiscardEncryptionRequest struct {
	// Secret chat ID
	ChatID int
}

MessagesDiscardEncryptionRequest represents TL type `messages.discardEncryption#edd923c5`. Cancels a request for creation and/or delete info on secret chat.

See https://core.telegram.org/method/messages.discardEncryption for reference.

func (*MessagesDiscardEncryptionRequest) Decode

Decode implements bin.Decoder.

func (*MessagesDiscardEncryptionRequest) Encode

Encode implements bin.Encoder.

func (*MessagesDiscardEncryptionRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesDiscussionMessage

type MessagesDiscussionMessage struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Discussion messages
	Messages []MessageClass
	// Message ID of latest reply in this thread¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetMaxID and GetMaxID helpers.
	MaxID int
	// Message ID of latest read incoming message in this thread¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetReadInboxMaxID and GetReadInboxMaxID helpers.
	ReadInboxMaxID int
	// Message ID of latest read outgoing message in this thread¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetReadOutboxMaxID and GetReadOutboxMaxID helpers.
	ReadOutboxMaxID int
	// Chats mentioned in constructor
	Chats []ChatClass
	// Users mentioned in constructor
	Users []UserClass
}

MessagesDiscussionMessage represents TL type `messages.discussionMessage#f5dd8f9d`. Information about a message thread¹

Links:

  1. https://core.telegram.org/api/threads

See https://core.telegram.org/constructor/messages.discussionMessage for reference.

func (*MessagesDiscussionMessage) Decode

func (d *MessagesDiscussionMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesDiscussionMessage) Encode

func (d *MessagesDiscussionMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesDiscussionMessage) GetMaxID

func (d *MessagesDiscussionMessage) GetMaxID() (value int, ok bool)

GetMaxID returns value of MaxID conditional field and boolean which is true if field was set.

func (*MessagesDiscussionMessage) GetReadInboxMaxID

func (d *MessagesDiscussionMessage) GetReadInboxMaxID() (value int, ok bool)

GetReadInboxMaxID returns value of ReadInboxMaxID conditional field and boolean which is true if field was set.

func (*MessagesDiscussionMessage) GetReadOutboxMaxID

func (d *MessagesDiscussionMessage) GetReadOutboxMaxID() (value int, ok bool)

GetReadOutboxMaxID returns value of ReadOutboxMaxID conditional field and boolean which is true if field was set.

func (*MessagesDiscussionMessage) SetMaxID

func (d *MessagesDiscussionMessage) SetMaxID(value int)

SetMaxID sets value of MaxID conditional field.

func (*MessagesDiscussionMessage) SetReadInboxMaxID

func (d *MessagesDiscussionMessage) SetReadInboxMaxID(value int)

SetReadInboxMaxID sets value of ReadInboxMaxID conditional field.

func (*MessagesDiscussionMessage) SetReadOutboxMaxID

func (d *MessagesDiscussionMessage) SetReadOutboxMaxID(value int)

SetReadOutboxMaxID sets value of ReadOutboxMaxID conditional field.

func (*MessagesDiscussionMessage) String added in v0.12.0

func (d *MessagesDiscussionMessage) String() string

String implements fmt.Stringer.

type MessagesEditChatAboutRequest

type MessagesEditChatAboutRequest struct {
	// The group/supergroup/channel¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Peer InputPeerClass
	// The new description
	About string
}

MessagesEditChatAboutRequest represents TL type `messages.editChatAbout#def60797`. Edit the description of a group/supergroup/channel¹.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/messages.editChatAbout for reference.

func (*MessagesEditChatAboutRequest) Decode

Decode implements bin.Decoder.

func (*MessagesEditChatAboutRequest) Encode

Encode implements bin.Encoder.

func (*MessagesEditChatAboutRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesEditChatAdminRequest

type MessagesEditChatAdminRequest struct {
	// The ID of the group
	ChatID int
	// The user to make admin
	UserID InputUserClass
	// Whether to make him admin
	IsAdmin bool
}

MessagesEditChatAdminRequest represents TL type `messages.editChatAdmin#a9e69f2e`. Make a user admin in a legacy group¹.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/messages.editChatAdmin for reference.

func (*MessagesEditChatAdminRequest) Decode

Decode implements bin.Decoder.

func (*MessagesEditChatAdminRequest) Encode

Encode implements bin.Encoder.

func (*MessagesEditChatAdminRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesEditChatDefaultBannedRightsRequest

type MessagesEditChatDefaultBannedRightsRequest struct {
	// The peer
	Peer InputPeerClass
	// The new global rights
	BannedRights ChatBannedRights
}

MessagesEditChatDefaultBannedRightsRequest represents TL type `messages.editChatDefaultBannedRights#a5866b41`. Edit the default banned rights of a channel/supergroup/group¹.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/messages.editChatDefaultBannedRights for reference.

func (*MessagesEditChatDefaultBannedRightsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesEditChatDefaultBannedRightsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesEditChatDefaultBannedRightsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesEditChatPhotoRequest

type MessagesEditChatPhotoRequest struct {
	// Chat ID
	ChatID int
	// Photo to be set
	Photo InputChatPhotoClass
}

MessagesEditChatPhotoRequest represents TL type `messages.editChatPhoto#ca4c79d8`. Changes chat photo and sends a service message on it

See https://core.telegram.org/method/messages.editChatPhoto for reference.

func (*MessagesEditChatPhotoRequest) Decode

Decode implements bin.Decoder.

func (*MessagesEditChatPhotoRequest) Encode

Encode implements bin.Encoder.

func (*MessagesEditChatPhotoRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesEditChatTitleRequest

type MessagesEditChatTitleRequest struct {
	// Chat ID
	ChatID int
	// New chat name, different from the old one
	Title string
}

MessagesEditChatTitleRequest represents TL type `messages.editChatTitle#dc452855`. Chanages chat name and sends a service message on it.

See https://core.telegram.org/method/messages.editChatTitle for reference.

func (*MessagesEditChatTitleRequest) Decode

Decode implements bin.Decoder.

func (*MessagesEditChatTitleRequest) Encode

Encode implements bin.Encoder.

func (*MessagesEditChatTitleRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesEditInlineBotMessageRequest

type MessagesEditInlineBotMessageRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Disable webpage preview
	NoWebpage bool
	// Sent inline message ID
	ID InputBotInlineMessageID
	// Message
	//
	// Use SetMessage and GetMessage helpers.
	Message string
	// Media
	//
	// Use SetMedia and GetMedia helpers.
	Media InputMediaClass
	// Reply markup for inline keyboards
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
}

MessagesEditInlineBotMessageRequest represents TL type `messages.editInlineBotMessage#83557dba`. Edit an inline bot message

See https://core.telegram.org/method/messages.editInlineBotMessage for reference.

func (*MessagesEditInlineBotMessageRequest) Decode

Decode implements bin.Decoder.

func (*MessagesEditInlineBotMessageRequest) Encode

Encode implements bin.Encoder.

func (*MessagesEditInlineBotMessageRequest) GetEntities

func (e *MessagesEditInlineBotMessageRequest) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*MessagesEditInlineBotMessageRequest) GetMedia

func (e *MessagesEditInlineBotMessageRequest) GetMedia() (value InputMediaClass, ok bool)

GetMedia returns value of Media conditional field and boolean which is true if field was set.

func (*MessagesEditInlineBotMessageRequest) GetMessage

func (e *MessagesEditInlineBotMessageRequest) GetMessage() (value string, ok bool)

GetMessage returns value of Message conditional field and boolean which is true if field was set.

func (*MessagesEditInlineBotMessageRequest) GetReplyMarkup

func (e *MessagesEditInlineBotMessageRequest) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*MessagesEditInlineBotMessageRequest) SetEntities

SetEntities sets value of Entities conditional field.

func (*MessagesEditInlineBotMessageRequest) SetMedia

SetMedia sets value of Media conditional field.

func (*MessagesEditInlineBotMessageRequest) SetMessage

func (e *MessagesEditInlineBotMessageRequest) SetMessage(value string)

SetMessage sets value of Message conditional field.

func (*MessagesEditInlineBotMessageRequest) SetNoWebpage

func (e *MessagesEditInlineBotMessageRequest) SetNoWebpage(value bool)

SetNoWebpage sets value of NoWebpage conditional field.

func (*MessagesEditInlineBotMessageRequest) SetReplyMarkup

func (e *MessagesEditInlineBotMessageRequest) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*MessagesEditInlineBotMessageRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesEditMessageRequest

type MessagesEditMessageRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Disable webpage preview
	NoWebpage bool
	// Where was the message sent
	Peer InputPeerClass
	// ID of the message to edit
	ID int
	// New message
	//
	// Use SetMessage and GetMessage helpers.
	Message string
	// New attached media
	//
	// Use SetMedia and GetMedia helpers.
	Media InputMediaClass
	// Reply markup for inline keyboards
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
	// Scheduled message date for scheduled messages¹
	//
	// Links:
	//  1) https://core.telegram.org/api/scheduled-messages
	//
	// Use SetScheduleDate and GetScheduleDate helpers.
	ScheduleDate int
}

MessagesEditMessageRequest represents TL type `messages.editMessage#48f71778`. Edit message

See https://core.telegram.org/method/messages.editMessage for reference.

func (*MessagesEditMessageRequest) Decode

Decode implements bin.Decoder.

func (*MessagesEditMessageRequest) Encode

Encode implements bin.Encoder.

func (*MessagesEditMessageRequest) GetEntities

func (e *MessagesEditMessageRequest) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*MessagesEditMessageRequest) GetMedia

func (e *MessagesEditMessageRequest) GetMedia() (value InputMediaClass, ok bool)

GetMedia returns value of Media conditional field and boolean which is true if field was set.

func (*MessagesEditMessageRequest) GetMessage

func (e *MessagesEditMessageRequest) GetMessage() (value string, ok bool)

GetMessage returns value of Message conditional field and boolean which is true if field was set.

func (*MessagesEditMessageRequest) GetReplyMarkup

func (e *MessagesEditMessageRequest) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*MessagesEditMessageRequest) GetScheduleDate

func (e *MessagesEditMessageRequest) GetScheduleDate() (value int, ok bool)

GetScheduleDate returns value of ScheduleDate conditional field and boolean which is true if field was set.

func (*MessagesEditMessageRequest) SetEntities

func (e *MessagesEditMessageRequest) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*MessagesEditMessageRequest) SetMedia

func (e *MessagesEditMessageRequest) SetMedia(value InputMediaClass)

SetMedia sets value of Media conditional field.

func (*MessagesEditMessageRequest) SetMessage

func (e *MessagesEditMessageRequest) SetMessage(value string)

SetMessage sets value of Message conditional field.

func (*MessagesEditMessageRequest) SetNoWebpage

func (e *MessagesEditMessageRequest) SetNoWebpage(value bool)

SetNoWebpage sets value of NoWebpage conditional field.

func (*MessagesEditMessageRequest) SetReplyMarkup

func (e *MessagesEditMessageRequest) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*MessagesEditMessageRequest) SetScheduleDate

func (e *MessagesEditMessageRequest) SetScheduleDate(value int)

SetScheduleDate sets value of ScheduleDate conditional field.

func (*MessagesEditMessageRequest) String added in v0.12.0

func (e *MessagesEditMessageRequest) String() string

String implements fmt.Stringer.

type MessagesExportChatInviteRequest

type MessagesExportChatInviteRequest struct {
	// Chat
	Peer InputPeerClass
}

MessagesExportChatInviteRequest represents TL type `messages.exportChatInvite#df7534c`. Export an invite link for a chat

See https://core.telegram.org/method/messages.exportChatInvite for reference.

func (*MessagesExportChatInviteRequest) Decode

Decode implements bin.Decoder.

func (*MessagesExportChatInviteRequest) Encode

Encode implements bin.Encoder.

func (*MessagesExportChatInviteRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesFaveStickerRequest

type MessagesFaveStickerRequest struct {
	// Sticker to mark as favorite
	ID InputDocumentClass
	// Unfavorite
	Unfave bool
}

MessagesFaveStickerRequest represents TL type `messages.faveSticker#b9ffc55b`. Mark a sticker as favorite

See https://core.telegram.org/method/messages.faveSticker for reference.

func (*MessagesFaveStickerRequest) Decode

Decode implements bin.Decoder.

func (*MessagesFaveStickerRequest) Encode

Encode implements bin.Encoder.

func (*MessagesFaveStickerRequest) String added in v0.12.0

func (f *MessagesFaveStickerRequest) String() string

String implements fmt.Stringer.

type MessagesFavedStickers

type MessagesFavedStickers struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// Emojis associated to stickers
	Packs []StickerPack
	// Favorited stickers
	Stickers []DocumentClass
}

MessagesFavedStickers represents TL type `messages.favedStickers#f37f2f16`. Favorited stickers

See https://core.telegram.org/constructor/messages.favedStickers for reference.

func (*MessagesFavedStickers) Decode

func (f *MessagesFavedStickers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesFavedStickers) Encode

func (f *MessagesFavedStickers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesFavedStickers) String added in v0.12.0

func (f *MessagesFavedStickers) String() string

String implements fmt.Stringer.

type MessagesFavedStickersBox

type MessagesFavedStickersBox struct {
	FavedStickers MessagesFavedStickersClass
}

MessagesFavedStickers boxes the MessagesFavedStickersClass providing a helper.

func (*MessagesFavedStickersBox) Decode

func (b *MessagesFavedStickersBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesFavedStickersBox.

func (*MessagesFavedStickersBox) Encode

func (b *MessagesFavedStickersBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesFavedStickersBox.

type MessagesFavedStickersClass

type MessagesFavedStickersClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesFavedStickersClass represents messages.FavedStickers generic type.

See https://core.telegram.org/type/messages.FavedStickers for reference.

Example:

g, err := DecodeMessagesFavedStickers(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesFavedStickersNotModified: // messages.favedStickersNotModified#9e8fa6d3
case *MessagesFavedStickers: // messages.favedStickers#f37f2f16
default: panic(v)
}

func DecodeMessagesFavedStickers

func DecodeMessagesFavedStickers(buf *bin.Buffer) (MessagesFavedStickersClass, error)

DecodeMessagesFavedStickers implements binary de-serialization for MessagesFavedStickersClass.

type MessagesFavedStickersNotModified

type MessagesFavedStickersNotModified struct {
}

MessagesFavedStickersNotModified represents TL type `messages.favedStickersNotModified#9e8fa6d3`. No new favorited stickers were found

See https://core.telegram.org/constructor/messages.favedStickersNotModified for reference.

func (*MessagesFavedStickersNotModified) Decode

Decode implements bin.Decoder.

func (*MessagesFavedStickersNotModified) Encode

Encode implements bin.Encoder.

func (*MessagesFavedStickersNotModified) String added in v0.12.0

String implements fmt.Stringer.

type MessagesFeaturedStickers

type MessagesFeaturedStickers struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// Total number of featured stickers
	Count int
	// Featured stickersets
	Sets []StickerSetCoveredClass
	// IDs of new featured stickersets
	Unread []int64
}

MessagesFeaturedStickers represents TL type `messages.featuredStickers#b6abc341`. Featured stickersets

See https://core.telegram.org/constructor/messages.featuredStickers for reference.

func (*MessagesFeaturedStickers) Decode

func (f *MessagesFeaturedStickers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesFeaturedStickers) Encode

func (f *MessagesFeaturedStickers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesFeaturedStickers) String added in v0.12.0

func (f *MessagesFeaturedStickers) String() string

String implements fmt.Stringer.

type MessagesFeaturedStickersBox

type MessagesFeaturedStickersBox struct {
	FeaturedStickers MessagesFeaturedStickersClass
}

MessagesFeaturedStickers boxes the MessagesFeaturedStickersClass providing a helper.

func (*MessagesFeaturedStickersBox) Decode

func (b *MessagesFeaturedStickersBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesFeaturedStickersBox.

func (*MessagesFeaturedStickersBox) Encode

func (b *MessagesFeaturedStickersBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesFeaturedStickersBox.

type MessagesFeaturedStickersClass

type MessagesFeaturedStickersClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesFeaturedStickersClass represents messages.FeaturedStickers generic type.

See https://core.telegram.org/type/messages.FeaturedStickers for reference.

Example:

g, err := DecodeMessagesFeaturedStickers(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesFeaturedStickersNotModified: // messages.featuredStickersNotModified#c6dc0c66
case *MessagesFeaturedStickers: // messages.featuredStickers#b6abc341
default: panic(v)
}

func DecodeMessagesFeaturedStickers

func DecodeMessagesFeaturedStickers(buf *bin.Buffer) (MessagesFeaturedStickersClass, error)

DecodeMessagesFeaturedStickers implements binary de-serialization for MessagesFeaturedStickersClass.

type MessagesFeaturedStickersNotModified

type MessagesFeaturedStickersNotModified struct {
	// Total number of featured stickers
	Count int
}

MessagesFeaturedStickersNotModified represents TL type `messages.featuredStickersNotModified#c6dc0c66`. Featured stickers haven't changed

See https://core.telegram.org/constructor/messages.featuredStickersNotModified for reference.

func (*MessagesFeaturedStickersNotModified) Decode

Decode implements bin.Decoder.

func (*MessagesFeaturedStickersNotModified) Encode

Encode implements bin.Encoder.

func (*MessagesFeaturedStickersNotModified) String added in v0.12.0

String implements fmt.Stringer.

type MessagesFilterBox

type MessagesFilterBox struct {
	MessagesFilter MessagesFilterClass
}

MessagesFilter boxes the MessagesFilterClass providing a helper.

func (*MessagesFilterBox) Decode

func (b *MessagesFilterBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesFilterBox.

func (*MessagesFilterBox) Encode

func (b *MessagesFilterBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesFilterBox.

type MessagesFilterClass

type MessagesFilterClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesFilterClass represents MessagesFilter generic type.

See https://core.telegram.org/type/MessagesFilter for reference.

Example:

g, err := DecodeMessagesFilter(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputMessagesFilterEmpty: // inputMessagesFilterEmpty#57e2f66c
case *InputMessagesFilterPhotos: // inputMessagesFilterPhotos#9609a51c
case *InputMessagesFilterVideo: // inputMessagesFilterVideo#9fc00e65
case *InputMessagesFilterPhotoVideo: // inputMessagesFilterPhotoVideo#56e9f0e4
case *InputMessagesFilterDocument: // inputMessagesFilterDocument#9eddf188
case *InputMessagesFilterUrl: // inputMessagesFilterUrl#7ef0dd87
case *InputMessagesFilterGif: // inputMessagesFilterGif#ffc86587
case *InputMessagesFilterVoice: // inputMessagesFilterVoice#50f5c392
case *InputMessagesFilterMusic: // inputMessagesFilterMusic#3751b49e
case *InputMessagesFilterChatPhotos: // inputMessagesFilterChatPhotos#3a20ecb8
case *InputMessagesFilterPhoneCalls: // inputMessagesFilterPhoneCalls#80c99768
case *InputMessagesFilterRoundVoice: // inputMessagesFilterRoundVoice#7a7c17a4
case *InputMessagesFilterRoundVideo: // inputMessagesFilterRoundVideo#b549da53
case *InputMessagesFilterMyMentions: // inputMessagesFilterMyMentions#c1f8e69a
case *InputMessagesFilterGeo: // inputMessagesFilterGeo#e7026d0d
case *InputMessagesFilterContacts: // inputMessagesFilterContacts#e062db83
case *InputMessagesFilterPinned: // inputMessagesFilterPinned#1bb00451
default: panic(v)
}

func DecodeMessagesFilter

func DecodeMessagesFilter(buf *bin.Buffer) (MessagesFilterClass, error)

DecodeMessagesFilter implements binary de-serialization for MessagesFilterClass.

type MessagesForwardMessagesRequest

type MessagesForwardMessagesRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to send messages silently (no notification will be triggered on the destination clients)
	Silent bool
	// Whether to send the message in background
	Background bool
	// When forwarding games, whether to include your score in the game
	WithMyScore bool
	// Source of messages
	FromPeer InputPeerClass
	// IDs of messages
	ID []int
	// Random ID to prevent resending of messages
	RandomID []int64
	// Destination peer
	ToPeer InputPeerClass
	// Scheduled message date for scheduled messages
	//
	// Use SetScheduleDate and GetScheduleDate helpers.
	ScheduleDate int
}

MessagesForwardMessagesRequest represents TL type `messages.forwardMessages#d9fee60e`. Forwards messages by their IDs.

See https://core.telegram.org/method/messages.forwardMessages for reference.

func (*MessagesForwardMessagesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesForwardMessagesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesForwardMessagesRequest) GetScheduleDate

func (f *MessagesForwardMessagesRequest) GetScheduleDate() (value int, ok bool)

GetScheduleDate returns value of ScheduleDate conditional field and boolean which is true if field was set.

func (*MessagesForwardMessagesRequest) SetBackground

func (f *MessagesForwardMessagesRequest) SetBackground(value bool)

SetBackground sets value of Background conditional field.

func (*MessagesForwardMessagesRequest) SetScheduleDate

func (f *MessagesForwardMessagesRequest) SetScheduleDate(value int)

SetScheduleDate sets value of ScheduleDate conditional field.

func (*MessagesForwardMessagesRequest) SetSilent

func (f *MessagesForwardMessagesRequest) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*MessagesForwardMessagesRequest) SetWithMyScore

func (f *MessagesForwardMessagesRequest) SetWithMyScore(value bool)

SetWithMyScore sets value of WithMyScore conditional field.

func (*MessagesForwardMessagesRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesFoundStickerSets

type MessagesFoundStickerSets struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// Found stickersets
	Sets []StickerSetCoveredClass
}

MessagesFoundStickerSets represents TL type `messages.foundStickerSets#5108d648`. Found stickersets

See https://core.telegram.org/constructor/messages.foundStickerSets for reference.

func (*MessagesFoundStickerSets) Decode

func (f *MessagesFoundStickerSets) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesFoundStickerSets) Encode

func (f *MessagesFoundStickerSets) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesFoundStickerSets) String added in v0.12.0

func (f *MessagesFoundStickerSets) String() string

String implements fmt.Stringer.

type MessagesFoundStickerSetsBox

type MessagesFoundStickerSetsBox struct {
	FoundStickerSets MessagesFoundStickerSetsClass
}

MessagesFoundStickerSets boxes the MessagesFoundStickerSetsClass providing a helper.

func (*MessagesFoundStickerSetsBox) Decode

func (b *MessagesFoundStickerSetsBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesFoundStickerSetsBox.

func (*MessagesFoundStickerSetsBox) Encode

func (b *MessagesFoundStickerSetsBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesFoundStickerSetsBox.

type MessagesFoundStickerSetsClass

type MessagesFoundStickerSetsClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesFoundStickerSetsClass represents messages.FoundStickerSets generic type.

See https://core.telegram.org/type/messages.FoundStickerSets for reference.

Example:

g, err := DecodeMessagesFoundStickerSets(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesFoundStickerSetsNotModified: // messages.foundStickerSetsNotModified#d54b65d
case *MessagesFoundStickerSets: // messages.foundStickerSets#5108d648
default: panic(v)
}

func DecodeMessagesFoundStickerSets

func DecodeMessagesFoundStickerSets(buf *bin.Buffer) (MessagesFoundStickerSetsClass, error)

DecodeMessagesFoundStickerSets implements binary de-serialization for MessagesFoundStickerSetsClass.

type MessagesFoundStickerSetsNotModified

type MessagesFoundStickerSetsNotModified struct {
}

MessagesFoundStickerSetsNotModified represents TL type `messages.foundStickerSetsNotModified#d54b65d`. No further results were found

See https://core.telegram.org/constructor/messages.foundStickerSetsNotModified for reference.

func (*MessagesFoundStickerSetsNotModified) Decode

Decode implements bin.Decoder.

func (*MessagesFoundStickerSetsNotModified) Encode

Encode implements bin.Encoder.

func (*MessagesFoundStickerSetsNotModified) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetAllChatsRequest

type MessagesGetAllChatsRequest struct {
	// Except these chats/channels/supergroups
	ExceptIds []int
}

MessagesGetAllChatsRequest represents TL type `messages.getAllChats#eba80ff0`. Get all chats, channels and supergroups

See https://core.telegram.org/method/messages.getAllChats for reference.

func (*MessagesGetAllChatsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetAllChatsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetAllChatsRequest) String added in v0.12.0

func (g *MessagesGetAllChatsRequest) String() string

String implements fmt.Stringer.

type MessagesGetAllDraftsRequest

type MessagesGetAllDraftsRequest struct {
}

MessagesGetAllDraftsRequest represents TL type `messages.getAllDrafts#6a3f8d65`. Save get all message drafts¹.

Links:

  1. https://core.telegram.org/api/drafts

See https://core.telegram.org/method/messages.getAllDrafts for reference.

func (*MessagesGetAllDraftsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetAllDraftsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetAllDraftsRequest) String added in v0.12.0

func (g *MessagesGetAllDraftsRequest) String() string

String implements fmt.Stringer.

type MessagesGetAllStickersRequest

type MessagesGetAllStickersRequest struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetAllStickersRequest represents TL type `messages.getAllStickers#1c9618b1`. Get all installed stickers

See https://core.telegram.org/method/messages.getAllStickers for reference.

func (*MessagesGetAllStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetAllStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetAllStickersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetArchivedStickersRequest

type MessagesGetArchivedStickersRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Get mask stickers
	Masks bool
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetID int64
	// Maximum number of results to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
}

MessagesGetArchivedStickersRequest represents TL type `messages.getArchivedStickers#57f17692`. Get all archived stickers

See https://core.telegram.org/method/messages.getArchivedStickers for reference.

func (*MessagesGetArchivedStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetArchivedStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetArchivedStickersRequest) SetMasks

func (g *MessagesGetArchivedStickersRequest) SetMasks(value bool)

SetMasks sets value of Masks conditional field.

func (*MessagesGetArchivedStickersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetAttachedStickersRequest

type MessagesGetAttachedStickersRequest struct {
	// Stickered media
	Media InputStickeredMediaClass
}

MessagesGetAttachedStickersRequest represents TL type `messages.getAttachedStickers#cc5b67cc`. Get stickers attached to a photo or video

See https://core.telegram.org/method/messages.getAttachedStickers for reference.

func (*MessagesGetAttachedStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetAttachedStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetAttachedStickersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetBotCallbackAnswerRequest

type MessagesGetBotCallbackAnswerRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is a "play game" button
	Game bool
	// Where was the inline keyboard sent
	Peer InputPeerClass
	// ID of the Message with the inline keyboard
	MsgID int
	// Callback data
	//
	// Use SetData and GetData helpers.
	Data []byte
	// For buttons requiring you to verify your identity with your 2FA password¹, the SRP payload generated using SRP².
	//
	// Links:
	//  1) https://core.telegram.org/constructor/keyboardButtonCallback
	//  2) https://core.telegram.org/api/srp
	//
	// Use SetPassword and GetPassword helpers.
	Password InputCheckPasswordSRPClass
}

MessagesGetBotCallbackAnswerRequest represents TL type `messages.getBotCallbackAnswer#9342ca07`. Press an inline callback button and get a callback answer from the bot

See https://core.telegram.org/method/messages.getBotCallbackAnswer for reference.

func (*MessagesGetBotCallbackAnswerRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetBotCallbackAnswerRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetBotCallbackAnswerRequest) GetData

func (g *MessagesGetBotCallbackAnswerRequest) GetData() (value []byte, ok bool)

GetData returns value of Data conditional field and boolean which is true if field was set.

func (*MessagesGetBotCallbackAnswerRequest) GetPassword

GetPassword returns value of Password conditional field and boolean which is true if field was set.

func (*MessagesGetBotCallbackAnswerRequest) SetData

func (g *MessagesGetBotCallbackAnswerRequest) SetData(value []byte)

SetData sets value of Data conditional field.

func (*MessagesGetBotCallbackAnswerRequest) SetGame

func (g *MessagesGetBotCallbackAnswerRequest) SetGame(value bool)

SetGame sets value of Game conditional field.

func (*MessagesGetBotCallbackAnswerRequest) SetPassword

SetPassword sets value of Password conditional field.

func (*MessagesGetBotCallbackAnswerRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetChatsRequest

type MessagesGetChatsRequest struct {
	// List of chat IDs
	ID []int
}

MessagesGetChatsRequest represents TL type `messages.getChats#3c6aa187`. Returns chat basic info on their IDs.

See https://core.telegram.org/method/messages.getChats for reference.

func (*MessagesGetChatsRequest) Decode

func (g *MessagesGetChatsRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesGetChatsRequest) Encode

func (g *MessagesGetChatsRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesGetChatsRequest) String added in v0.12.0

func (g *MessagesGetChatsRequest) String() string

String implements fmt.Stringer.

type MessagesGetCommonChatsRequest

type MessagesGetCommonChatsRequest struct {
	// User ID
	UserID InputUserClass
	// Maximum ID of chat to return (see pagination¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	MaxID int
	// Maximum number of results to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
}

MessagesGetCommonChatsRequest represents TL type `messages.getCommonChats#d0a48c4`. Get chats in common with a user

See https://core.telegram.org/method/messages.getCommonChats for reference.

func (*MessagesGetCommonChatsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetCommonChatsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetCommonChatsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetDhConfigRequest

type MessagesGetDhConfigRequest struct {
	// Value of the version parameter from messages.dhConfig¹, avialable at the client
	//
	// Links:
	//  1) https://core.telegram.org/constructor/messages.dhConfig
	Version int
	// Length of the required random sequence
	RandomLength int
}

MessagesGetDhConfigRequest represents TL type `messages.getDhConfig#26cf8950`. Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length.

See https://core.telegram.org/method/messages.getDhConfig for reference.

func (*MessagesGetDhConfigRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetDhConfigRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetDhConfigRequest) String added in v0.12.0

func (g *MessagesGetDhConfigRequest) String() string

String implements fmt.Stringer.

type MessagesGetDialogFiltersRequest

type MessagesGetDialogFiltersRequest struct {
}

MessagesGetDialogFiltersRequest represents TL type `messages.getDialogFilters#f19ed96d`. Get folders¹

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/method/messages.getDialogFilters for reference.

func (*MessagesGetDialogFiltersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetDialogFiltersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetDialogFiltersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetDialogUnreadMarksRequest

type MessagesGetDialogUnreadMarksRequest struct {
}

MessagesGetDialogUnreadMarksRequest represents TL type `messages.getDialogUnreadMarks#22e24e22`. Get dialogs manually marked as unread

See https://core.telegram.org/method/messages.getDialogUnreadMarks for reference.

func (*MessagesGetDialogUnreadMarksRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetDialogUnreadMarksRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetDialogUnreadMarksRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetDialogsRequest

type MessagesGetDialogsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Exclude pinned dialogs
	ExcludePinned bool
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetDate int
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetID int
	// Offset peer for pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetPeer InputPeerClass
	// Number of list elements to be returned
	Limit int
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetDialogsRequest represents TL type `messages.getDialogs#a0ee3b73`. Returns the current user dialog list.

See https://core.telegram.org/method/messages.getDialogs for reference.

func (*MessagesGetDialogsRequest) Decode

func (g *MessagesGetDialogsRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesGetDialogsRequest) Encode

func (g *MessagesGetDialogsRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesGetDialogsRequest) GetFolderID

func (g *MessagesGetDialogsRequest) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*MessagesGetDialogsRequest) SetExcludePinned

func (g *MessagesGetDialogsRequest) SetExcludePinned(value bool)

SetExcludePinned sets value of ExcludePinned conditional field.

func (*MessagesGetDialogsRequest) SetFolderID

func (g *MessagesGetDialogsRequest) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*MessagesGetDialogsRequest) String added in v0.12.0

func (g *MessagesGetDialogsRequest) String() string

String implements fmt.Stringer.

type MessagesGetDiscussionMessageRequest

type MessagesGetDiscussionMessageRequest struct {
	// Channel ID¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Peer InputPeerClass
	// Message ID
	MsgID int
}

MessagesGetDiscussionMessageRequest represents TL type `messages.getDiscussionMessage#446972fd`. Get discussion message¹ from the associated discussion group² of a channel to show it on top of the comment section, without actually joining the group

Links:

  1. https://core.telegram.org/api/threads
  2. https://core.telegram.org/api/discussion

See https://core.telegram.org/method/messages.getDiscussionMessage for reference.

func (*MessagesGetDiscussionMessageRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetDiscussionMessageRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetDiscussionMessageRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetDocumentByHashRequest

type MessagesGetDocumentByHashRequest struct {
	// SHA256 of file
	Sha256 []byte
	// Size of the file in bytes
	Size int
	// Mime type
	MimeType string
}

MessagesGetDocumentByHashRequest represents TL type `messages.getDocumentByHash#338e2464`. Get a document by its SHA256 hash, mainly used for gifs

See https://core.telegram.org/method/messages.getDocumentByHash for reference.

func (*MessagesGetDocumentByHashRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetDocumentByHashRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetDocumentByHashRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetEmojiKeywordsDifferenceRequest

type MessagesGetEmojiKeywordsDifferenceRequest struct {
	// Language code
	LangCode string
	// Previous emoji keyword localization version
	FromVersion int
}

MessagesGetEmojiKeywordsDifferenceRequest represents TL type `messages.getEmojiKeywordsDifference#1508b6af`. Get changed emoji keywords

See https://core.telegram.org/method/messages.getEmojiKeywordsDifference for reference.

func (*MessagesGetEmojiKeywordsDifferenceRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetEmojiKeywordsDifferenceRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetEmojiKeywordsDifferenceRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetEmojiKeywordsLanguagesRequest

type MessagesGetEmojiKeywordsLanguagesRequest struct {
	// Language codes
	LangCodes []string
}

MessagesGetEmojiKeywordsLanguagesRequest represents TL type `messages.getEmojiKeywordsLanguages#4e9963b2`. Get info about an emoji keyword localization

See https://core.telegram.org/method/messages.getEmojiKeywordsLanguages for reference.

func (*MessagesGetEmojiKeywordsLanguagesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetEmojiKeywordsLanguagesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetEmojiKeywordsLanguagesRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetEmojiKeywordsRequest

type MessagesGetEmojiKeywordsRequest struct {
	// Language code
	LangCode string
}

MessagesGetEmojiKeywordsRequest represents TL type `messages.getEmojiKeywords#35a0e062`. Get localized emoji keywords

See https://core.telegram.org/method/messages.getEmojiKeywords for reference.

func (*MessagesGetEmojiKeywordsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetEmojiKeywordsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetEmojiKeywordsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetEmojiURLRequest

type MessagesGetEmojiURLRequest struct {
	// Language code for which the emoji replacements will be suggested
	LangCode string
}

MessagesGetEmojiURLRequest represents TL type `messages.getEmojiURL#d5b10c26`. Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation

See https://core.telegram.org/method/messages.getEmojiURL for reference.

func (*MessagesGetEmojiURLRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetEmojiURLRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetEmojiURLRequest) String added in v0.12.0

func (g *MessagesGetEmojiURLRequest) String() string

String implements fmt.Stringer.

type MessagesGetFavedStickersRequest

type MessagesGetFavedStickersRequest struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetFavedStickersRequest represents TL type `messages.getFavedStickers#21ce0b0e`. Get faved stickers

See https://core.telegram.org/method/messages.getFavedStickers for reference.

func (*MessagesGetFavedStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetFavedStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetFavedStickersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetFeaturedStickersRequest

type MessagesGetFeaturedStickersRequest struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetFeaturedStickersRequest represents TL type `messages.getFeaturedStickers#2dacca4f`. Get featured stickers

See https://core.telegram.org/method/messages.getFeaturedStickers for reference.

func (*MessagesGetFeaturedStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetFeaturedStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetFeaturedStickersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetFullChatRequest

type MessagesGetFullChatRequest struct {
	// Chat ID
	ChatID int
}

MessagesGetFullChatRequest represents TL type `messages.getFullChat#3b831c66`. Returns full chat info according to its ID.

See https://core.telegram.org/method/messages.getFullChat for reference.

func (*MessagesGetFullChatRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetFullChatRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetFullChatRequest) String added in v0.12.0

func (g *MessagesGetFullChatRequest) String() string

String implements fmt.Stringer.

type MessagesGetGameHighScoresRequest

type MessagesGetGameHighScoresRequest struct {
	// Where was the game sent
	Peer InputPeerClass
	// ID of message with game media attachment
	ID int
	// Get high scores made by a certain user
	UserID InputUserClass
}

MessagesGetGameHighScoresRequest represents TL type `messages.getGameHighScores#e822649d`. Get highscores of a game

See https://core.telegram.org/method/messages.getGameHighScores for reference.

func (*MessagesGetGameHighScoresRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetGameHighScoresRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetGameHighScoresRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetHistoryRequest

type MessagesGetHistoryRequest struct {
	// Target peer
	Peer InputPeerClass
	// Only return messages starting from the specified message ID
	OffsetID int
	// Only return messages sent before the specified date
	OffsetDate int
	// Number of list elements to be skipped, negative values are also accepted.
	AddOffset int
	// Number of results to return
	Limit int
	// If a positive value was transferred, the method will return only messages with IDs less than max_id
	MaxID int
	// If a positive value was transferred, the method will return only messages with IDs more than min_id
	MinID int
	// Result hash¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Hash int
}

MessagesGetHistoryRequest represents TL type `messages.getHistory#dcbb8260`. Gets back the conversation history with one interlocutor / within a chat

See https://core.telegram.org/method/messages.getHistory for reference.

func (*MessagesGetHistoryRequest) Decode

func (g *MessagesGetHistoryRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesGetHistoryRequest) Encode

func (g *MessagesGetHistoryRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesGetHistoryRequest) String added in v0.12.0

func (g *MessagesGetHistoryRequest) String() string

String implements fmt.Stringer.

type MessagesGetInlineBotResultsRequest

type MessagesGetInlineBotResultsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The bot to query
	Bot InputUserClass
	// The currently opened chat
	Peer InputPeerClass
	// The geolocation, if requested
	//
	// Use SetGeoPoint and GetGeoPoint helpers.
	GeoPoint InputGeoPointClass
	// The query
	Query string
	// The offset within the results, will be passed directly as-is to the bot.
	Offset string
}

MessagesGetInlineBotResultsRequest represents TL type `messages.getInlineBotResults#514e999d`. Query an inline bot

See https://core.telegram.org/method/messages.getInlineBotResults for reference.

func (*MessagesGetInlineBotResultsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetInlineBotResultsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetInlineBotResultsRequest) GetGeoPoint

func (g *MessagesGetInlineBotResultsRequest) GetGeoPoint() (value InputGeoPointClass, ok bool)

GetGeoPoint returns value of GeoPoint conditional field and boolean which is true if field was set.

func (*MessagesGetInlineBotResultsRequest) SetGeoPoint

SetGeoPoint sets value of GeoPoint conditional field.

func (*MessagesGetInlineBotResultsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetInlineGameHighScoresRequest

type MessagesGetInlineGameHighScoresRequest struct {
	// ID of inline message
	ID InputBotInlineMessageID
	// Get high scores of a certain user
	UserID InputUserClass
}

MessagesGetInlineGameHighScoresRequest represents TL type `messages.getInlineGameHighScores#f635e1b`. Get highscores of a game sent using an inline bot

See https://core.telegram.org/method/messages.getInlineGameHighScores for reference.

func (*MessagesGetInlineGameHighScoresRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetInlineGameHighScoresRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetInlineGameHighScoresRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetMaskStickersRequest

type MessagesGetMaskStickersRequest struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetMaskStickersRequest represents TL type `messages.getMaskStickers#65b8c79f`. Get installed mask stickers

See https://core.telegram.org/method/messages.getMaskStickers for reference.

func (*MessagesGetMaskStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetMaskStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetMaskStickersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetMessageEditDataRequest

type MessagesGetMessageEditDataRequest struct {
	// Peer where the media was sent
	Peer InputPeerClass
	// ID of message
	ID int
}

MessagesGetMessageEditDataRequest represents TL type `messages.getMessageEditData#fda68d36`. Find out if a media message's caption can be edited

See https://core.telegram.org/method/messages.getMessageEditData for reference.

func (*MessagesGetMessageEditDataRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetMessageEditDataRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetMessageEditDataRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetMessagesRequest

type MessagesGetMessagesRequest struct {
	// Message ID list
	ID []InputMessageClass
}

MessagesGetMessagesRequest represents TL type `messages.getMessages#63c66506`. Returns the list of messages by their IDs.

See https://core.telegram.org/method/messages.getMessages for reference.

func (*MessagesGetMessagesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetMessagesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetMessagesRequest) String added in v0.12.0

func (g *MessagesGetMessagesRequest) String() string

String implements fmt.Stringer.

type MessagesGetMessagesViewsRequest

type MessagesGetMessagesViewsRequest struct {
	// Peer where the message was found
	Peer InputPeerClass
	// ID of message
	ID []int
	// Whether to mark the message as viewed and increment the view counter
	Increment bool
}

MessagesGetMessagesViewsRequest represents TL type `messages.getMessagesViews#5784d3e1`. Get and increase the view counter of a message sent or forwarded from a channel¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/messages.getMessagesViews for reference.

func (*MessagesGetMessagesViewsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetMessagesViewsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetMessagesViewsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetOldFeaturedStickersRequest

type MessagesGetOldFeaturedStickersRequest struct {
	// Offset
	Offset int
	// Maximum number of results to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetOldFeaturedStickersRequest represents TL type `messages.getOldFeaturedStickers#5fe7025b`. Method for fetching previously featured stickers

See https://core.telegram.org/method/messages.getOldFeaturedStickers for reference.

func (*MessagesGetOldFeaturedStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetOldFeaturedStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetOldFeaturedStickersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetOnlinesRequest

type MessagesGetOnlinesRequest struct {
	// The chat
	Peer InputPeerClass
}

MessagesGetOnlinesRequest represents TL type `messages.getOnlines#6e2be050`. Get count of online users in a chat

See https://core.telegram.org/method/messages.getOnlines for reference.

func (*MessagesGetOnlinesRequest) Decode

func (g *MessagesGetOnlinesRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesGetOnlinesRequest) Encode

func (g *MessagesGetOnlinesRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesGetOnlinesRequest) String added in v0.12.0

func (g *MessagesGetOnlinesRequest) String() string

String implements fmt.Stringer.

type MessagesGetPeerDialogsRequest

type MessagesGetPeerDialogsRequest struct {
	// Peers
	Peers []InputDialogPeerClass
}

MessagesGetPeerDialogsRequest represents TL type `messages.getPeerDialogs#e470bcfd`. Get dialog info of specified peers

See https://core.telegram.org/method/messages.getPeerDialogs for reference.

func (*MessagesGetPeerDialogsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetPeerDialogsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetPeerDialogsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetPeerSettingsRequest

type MessagesGetPeerSettingsRequest struct {
	// The peer
	Peer InputPeerClass
}

MessagesGetPeerSettingsRequest represents TL type `messages.getPeerSettings#3672e09c`. Get peer settings

See https://core.telegram.org/method/messages.getPeerSettings for reference.

func (*MessagesGetPeerSettingsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetPeerSettingsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetPeerSettingsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetPinnedDialogsRequest

type MessagesGetPinnedDialogsRequest struct {
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	FolderID int
}

MessagesGetPinnedDialogsRequest represents TL type `messages.getPinnedDialogs#d6b94df2`. Get pinned dialogs

See https://core.telegram.org/method/messages.getPinnedDialogs for reference.

func (*MessagesGetPinnedDialogsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetPinnedDialogsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetPinnedDialogsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetPollResultsRequest

type MessagesGetPollResultsRequest struct {
	// Peer where the poll was found
	Peer InputPeerClass
	// Message ID of poll message
	MsgID int
}

MessagesGetPollResultsRequest represents TL type `messages.getPollResults#73bb643b`. Get poll results

See https://core.telegram.org/method/messages.getPollResults for reference.

func (*MessagesGetPollResultsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetPollResultsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetPollResultsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetPollVotesRequest

type MessagesGetPollVotesRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Chat where the poll was sent
	Peer InputPeerClass
	// Message ID
	ID int
	// Get only results for the specified poll option
	//
	// Use SetOption and GetOption helpers.
	Option []byte
	// Offset for results, taken from the next_offset field of messages.votesList¹, initially an empty string. Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in messages.votesList² if it is empty, to avoid an infinite loop.
	//
	// Links:
	//  1) https://core.telegram.org/constructor/messages.votesList
	//  2) https://core.telegram.org/constructor/messages.votesList
	//
	// Use SetOffset and GetOffset helpers.
	Offset string
	// Number of results to return
	Limit int
}

MessagesGetPollVotesRequest represents TL type `messages.getPollVotes#b86e380e`. Get poll results for non-anonymous polls

See https://core.telegram.org/method/messages.getPollVotes for reference.

func (*MessagesGetPollVotesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetPollVotesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetPollVotesRequest) GetOffset

func (g *MessagesGetPollVotesRequest) GetOffset() (value string, ok bool)

GetOffset returns value of Offset conditional field and boolean which is true if field was set.

func (*MessagesGetPollVotesRequest) GetOption

func (g *MessagesGetPollVotesRequest) GetOption() (value []byte, ok bool)

GetOption returns value of Option conditional field and boolean which is true if field was set.

func (*MessagesGetPollVotesRequest) SetOffset

func (g *MessagesGetPollVotesRequest) SetOffset(value string)

SetOffset sets value of Offset conditional field.

func (*MessagesGetPollVotesRequest) SetOption

func (g *MessagesGetPollVotesRequest) SetOption(value []byte)

SetOption sets value of Option conditional field.

func (*MessagesGetPollVotesRequest) String added in v0.12.0

func (g *MessagesGetPollVotesRequest) String() string

String implements fmt.Stringer.

type MessagesGetRecentLocationsRequest

type MessagesGetRecentLocationsRequest struct {
	// User
	Peer InputPeerClass
	// Maximum number of results to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetRecentLocationsRequest represents TL type `messages.getRecentLocations#bbc45b09`. Get live location history of a certain user

See https://core.telegram.org/method/messages.getRecentLocations for reference.

func (*MessagesGetRecentLocationsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetRecentLocationsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetRecentLocationsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetRecentStickersRequest

type MessagesGetRecentStickersRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Get stickers recently attached to photo or video files
	Attached bool
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetRecentStickersRequest represents TL type `messages.getRecentStickers#5ea192c9`. Get recent stickers

See https://core.telegram.org/method/messages.getRecentStickers for reference.

func (*MessagesGetRecentStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetRecentStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetRecentStickersRequest) SetAttached

func (g *MessagesGetRecentStickersRequest) SetAttached(value bool)

SetAttached sets value of Attached conditional field.

func (*MessagesGetRecentStickersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetRepliesRequest

type MessagesGetRepliesRequest struct {
	// Peer
	Peer InputPeerClass
	// Message ID
	MsgID int
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetID int
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetDate int
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	AddOffset int
	// Maximum number of results to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
	// If a positive value was transferred, the method will return only messages with ID smaller than max_id
	MaxID int
	// If a positive value was transferred, the method will return only messages with ID bigger than min_id
	MinID int
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetRepliesRequest represents TL type `messages.getReplies#24b581ba`. Get messages in a reply thread

See https://core.telegram.org/method/messages.getReplies for reference.

func (*MessagesGetRepliesRequest) Decode

func (g *MessagesGetRepliesRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesGetRepliesRequest) Encode

func (g *MessagesGetRepliesRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesGetRepliesRequest) String added in v0.12.0

func (g *MessagesGetRepliesRequest) String() string

String implements fmt.Stringer.

type MessagesGetSavedGifsRequest

type MessagesGetSavedGifsRequest struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetSavedGifsRequest represents TL type `messages.getSavedGifs#83bf3d52`. Get saved GIFs

See https://core.telegram.org/method/messages.getSavedGifs for reference.

func (*MessagesGetSavedGifsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetSavedGifsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetSavedGifsRequest) String added in v0.12.0

func (g *MessagesGetSavedGifsRequest) String() string

String implements fmt.Stringer.

type MessagesGetScheduledHistoryRequest

type MessagesGetScheduledHistoryRequest struct {
	// Peer
	Peer InputPeerClass
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetScheduledHistoryRequest represents TL type `messages.getScheduledHistory#e2c2685b`. Get scheduled messages

See https://core.telegram.org/method/messages.getScheduledHistory for reference.

func (*MessagesGetScheduledHistoryRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetScheduledHistoryRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetScheduledHistoryRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetScheduledMessagesRequest

type MessagesGetScheduledMessagesRequest struct {
	// Peer
	Peer InputPeerClass
	// IDs of scheduled messages
	ID []int
}

MessagesGetScheduledMessagesRequest represents TL type `messages.getScheduledMessages#bdbb0464`. Get scheduled messages

See https://core.telegram.org/method/messages.getScheduledMessages for reference.

func (*MessagesGetScheduledMessagesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetScheduledMessagesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetScheduledMessagesRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetSearchCountersRequest

type MessagesGetSearchCountersRequest struct {
	// Peer where to search
	Peer InputPeerClass
	// Search filters
	Filters []MessagesFilterClass
}

MessagesGetSearchCountersRequest represents TL type `messages.getSearchCounters#732eef00`. Get the number of results that would be found by a messages.search¹ call with the same parameters

Links:

  1. https://core.telegram.org/method/messages.search

See https://core.telegram.org/method/messages.getSearchCounters for reference.

func (*MessagesGetSearchCountersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetSearchCountersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetSearchCountersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetSplitRangesRequest

type MessagesGetSplitRangesRequest struct {
}

MessagesGetSplitRangesRequest represents TL type `messages.getSplitRanges#1cff7e08`. Get message ranges for saving the user's chat history

See https://core.telegram.org/method/messages.getSplitRanges for reference.

func (*MessagesGetSplitRangesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetSplitRangesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetSplitRangesRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetStatsURLRequest

type MessagesGetStatsURLRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Pass true if a URL with the dark theme must be returned
	Dark bool
	// Chat identifier
	Peer InputPeerClass
	// Parameters from tg://statsrefresh?params=****** link
	Params string
}

MessagesGetStatsURLRequest represents TL type `messages.getStatsURL#812c2ae6`. Returns URL with the chat statistics. Currently this method can be used only for channels

See https://core.telegram.org/method/messages.getStatsURL for reference.

func (*MessagesGetStatsURLRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetStatsURLRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetStatsURLRequest) SetDark

func (g *MessagesGetStatsURLRequest) SetDark(value bool)

SetDark sets value of Dark conditional field.

func (*MessagesGetStatsURLRequest) String added in v0.12.0

func (g *MessagesGetStatsURLRequest) String() string

String implements fmt.Stringer.

type MessagesGetStickerSetRequest

type MessagesGetStickerSetRequest struct {
	// Stickerset
	Stickerset InputStickerSetClass
}

MessagesGetStickerSetRequest represents TL type `messages.getStickerSet#2619a90e`. Get info about a stickerset

See https://core.telegram.org/method/messages.getStickerSet for reference.

func (*MessagesGetStickerSetRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetStickerSetRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetStickerSetRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetStickersRequest

type MessagesGetStickersRequest struct {
	// The emoji
	Emoticon string
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetStickersRequest represents TL type `messages.getStickers#43d4f2c`. Get stickers by emoji

See https://core.telegram.org/method/messages.getStickers for reference.

func (*MessagesGetStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetStickersRequest) String added in v0.12.0

func (g *MessagesGetStickersRequest) String() string

String implements fmt.Stringer.

type MessagesGetSuggestedDialogFiltersRequest

type MessagesGetSuggestedDialogFiltersRequest struct {
}

MessagesGetSuggestedDialogFiltersRequest represents TL type `messages.getSuggestedDialogFilters#a29cd42c`. Get suggested folders¹

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/method/messages.getSuggestedDialogFilters for reference.

func (*MessagesGetSuggestedDialogFiltersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetSuggestedDialogFiltersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetSuggestedDialogFiltersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetUnreadMentionsRequest

type MessagesGetUnreadMentionsRequest struct {
	// Peer where to look for mentions
	Peer InputPeerClass
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetID int
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	AddOffset int
	// Maximum number of results to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
	// Maximum message ID to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	MaxID int
	// Minimum message ID to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	MinID int
}

MessagesGetUnreadMentionsRequest represents TL type `messages.getUnreadMentions#46578472`. Get unread messages where we were mentioned

See https://core.telegram.org/method/messages.getUnreadMentions for reference.

func (*MessagesGetUnreadMentionsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetUnreadMentionsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetUnreadMentionsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetWebPagePreviewRequest

type MessagesGetWebPagePreviewRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Message from which to extract the preview
	Message string
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
}

MessagesGetWebPagePreviewRequest represents TL type `messages.getWebPagePreview#8b68b0cc`. Get preview of webpage

See https://core.telegram.org/method/messages.getWebPagePreview for reference.

func (*MessagesGetWebPagePreviewRequest) Decode

Decode implements bin.Decoder.

func (*MessagesGetWebPagePreviewRequest) Encode

Encode implements bin.Encoder.

func (*MessagesGetWebPagePreviewRequest) GetEntities

func (g *MessagesGetWebPagePreviewRequest) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*MessagesGetWebPagePreviewRequest) SetEntities

func (g *MessagesGetWebPagePreviewRequest) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*MessagesGetWebPagePreviewRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesGetWebPageRequest

type MessagesGetWebPageRequest struct {
	// URL of IV page to fetch
	URL string
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesGetWebPageRequest represents TL type `messages.getWebPage#32ca8f91`. Get instant view¹ page

Links:

  1. https://instantview.telegram.org

See https://core.telegram.org/method/messages.getWebPage for reference.

func (*MessagesGetWebPageRequest) Decode

func (g *MessagesGetWebPageRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesGetWebPageRequest) Encode

func (g *MessagesGetWebPageRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesGetWebPageRequest) String added in v0.12.0

func (g *MessagesGetWebPageRequest) String() string

String implements fmt.Stringer.

type MessagesHidePeerSettingsBarRequest

type MessagesHidePeerSettingsBarRequest struct {
	// Peer
	Peer InputPeerClass
}

MessagesHidePeerSettingsBarRequest represents TL type `messages.hidePeerSettingsBar#4facb138`. Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the peer's settings¹.

Links:

  1. https://core.telegram.org/constructor/peerSettings

See https://core.telegram.org/method/messages.hidePeerSettingsBar for reference.

func (*MessagesHidePeerSettingsBarRequest) Decode

Decode implements bin.Decoder.

func (*MessagesHidePeerSettingsBarRequest) Encode

Encode implements bin.Encoder.

func (*MessagesHidePeerSettingsBarRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesHighScores

type MessagesHighScores struct {
	// Highscores
	Scores []HighScore
	// Users, associated to the highscores
	Users []UserClass
}

MessagesHighScores represents TL type `messages.highScores#9a3bfd99`. Highscores in a game

See https://core.telegram.org/constructor/messages.highScores for reference.

func (*MessagesHighScores) Decode

func (h *MessagesHighScores) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesHighScores) Encode

func (h *MessagesHighScores) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesHighScores) String added in v0.12.0

func (h *MessagesHighScores) String() string

String implements fmt.Stringer.

type MessagesImportChatInviteRequest

type MessagesImportChatInviteRequest struct {
	// hash from t.me/joinchat/hash
	Hash string
}

MessagesImportChatInviteRequest represents TL type `messages.importChatInvite#6c50051c`. Import a chat invite and join a private chat/supergroup/channel

See https://core.telegram.org/method/messages.importChatInvite for reference.

func (*MessagesImportChatInviteRequest) Decode

Decode implements bin.Decoder.

func (*MessagesImportChatInviteRequest) Encode

Encode implements bin.Encoder.

func (*MessagesImportChatInviteRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesInactiveChats

type MessagesInactiveChats struct {
	// When was the chat last active
	Dates []int
	// Chat list
	Chats []ChatClass
	// Users mentioned in the chat list
	Users []UserClass
}

MessagesInactiveChats represents TL type `messages.inactiveChats#a927fec5`. Inactive chat list

See https://core.telegram.org/constructor/messages.inactiveChats for reference.

func (*MessagesInactiveChats) Decode

func (i *MessagesInactiveChats) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesInactiveChats) Encode

func (i *MessagesInactiveChats) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesInactiveChats) String added in v0.12.0

func (i *MessagesInactiveChats) String() string

String implements fmt.Stringer.

type MessagesInstallStickerSetRequest

type MessagesInstallStickerSetRequest struct {
	// Stickerset to install
	Stickerset InputStickerSetClass
	// Whether to archive stickerset
	Archived bool
}

MessagesInstallStickerSetRequest represents TL type `messages.installStickerSet#c78fe460`. Install a stickerset

See https://core.telegram.org/method/messages.installStickerSet for reference.

func (*MessagesInstallStickerSetRequest) Decode

Decode implements bin.Decoder.

func (*MessagesInstallStickerSetRequest) Encode

Encode implements bin.Encoder.

func (*MessagesInstallStickerSetRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesMarkDialogUnreadRequest

type MessagesMarkDialogUnreadRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Mark as unread/read
	Unread bool
	// Dialog
	Peer InputDialogPeerClass
}

MessagesMarkDialogUnreadRequest represents TL type `messages.markDialogUnread#c286d98f`. Manually mark dialog as unread

See https://core.telegram.org/method/messages.markDialogUnread for reference.

func (*MessagesMarkDialogUnreadRequest) Decode

Decode implements bin.Decoder.

func (*MessagesMarkDialogUnreadRequest) Encode

Encode implements bin.Encoder.

func (*MessagesMarkDialogUnreadRequest) SetUnread

func (m *MessagesMarkDialogUnreadRequest) SetUnread(value bool)

SetUnread sets value of Unread conditional field.

func (*MessagesMarkDialogUnreadRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesMessageEditData

type MessagesMessageEditData struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Media caption, if the specified media's caption can be edited
	Caption bool
}

MessagesMessageEditData represents TL type `messages.messageEditData#26b5dde6`. Message edit data for media

See https://core.telegram.org/constructor/messages.messageEditData for reference.

func (*MessagesMessageEditData) Decode

func (m *MessagesMessageEditData) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesMessageEditData) Encode

func (m *MessagesMessageEditData) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesMessageEditData) SetCaption

func (m *MessagesMessageEditData) SetCaption(value bool)

SetCaption sets value of Caption conditional field.

func (*MessagesMessageEditData) String added in v0.12.0

func (m *MessagesMessageEditData) String() string

String implements fmt.Stringer.

type MessagesMessageViews

type MessagesMessageViews struct {
	// View, forward counter + info about replies
	Views []MessageViews
	// Chats mentioned in constructor
	Chats []ChatClass
	// Users mentioned in constructor
	Users []UserClass
}

MessagesMessageViews represents TL type `messages.messageViews#b6c4f543`. View, forward counter + info about replies

See https://core.telegram.org/constructor/messages.messageViews for reference.

func (*MessagesMessageViews) Decode

func (m *MessagesMessageViews) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesMessageViews) Encode

func (m *MessagesMessageViews) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesMessageViews) String added in v0.12.0

func (m *MessagesMessageViews) String() string

String implements fmt.Stringer.

type MessagesMessages

type MessagesMessages struct {
	// List of messages
	Messages []MessageClass
	// List of chats mentioned in dialogs
	Chats []ChatClass
	// List of users mentioned in messages and chats
	Users []UserClass
}

MessagesMessages represents TL type `messages.messages#8c718e87`. Full list of messages with auxilary data.

See https://core.telegram.org/constructor/messages.messages for reference.

func (*MessagesMessages) Decode

func (m *MessagesMessages) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesMessages) Encode

func (m *MessagesMessages) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesMessages) String added in v0.12.0

func (m *MessagesMessages) String() string

String implements fmt.Stringer.

type MessagesMessagesBox

type MessagesMessagesBox struct {
	Messages MessagesMessagesClass
}

MessagesMessages boxes the MessagesMessagesClass providing a helper.

func (*MessagesMessagesBox) Decode

func (b *MessagesMessagesBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesMessagesBox.

func (*MessagesMessagesBox) Encode

func (b *MessagesMessagesBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesMessagesBox.

type MessagesMessagesClass

type MessagesMessagesClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesMessagesClass represents messages.Messages generic type.

See https://core.telegram.org/type/messages.Messages for reference.

Example:

g, err := DecodeMessagesMessages(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesMessages: // messages.messages#8c718e87
case *MessagesMessagesSlice: // messages.messagesSlice#3a54685e
case *MessagesChannelMessages: // messages.channelMessages#64479808
case *MessagesMessagesNotModified: // messages.messagesNotModified#74535f21
default: panic(v)
}

func DecodeMessagesMessages

func DecodeMessagesMessages(buf *bin.Buffer) (MessagesMessagesClass, error)

DecodeMessagesMessages implements binary de-serialization for MessagesMessagesClass.

type MessagesMessagesNotModified

type MessagesMessagesNotModified struct {
	// Number of results found server-side by the given query
	Count int
}

MessagesMessagesNotModified represents TL type `messages.messagesNotModified#74535f21`. No new messages matching the query were found

See https://core.telegram.org/constructor/messages.messagesNotModified for reference.

func (*MessagesMessagesNotModified) Decode

Decode implements bin.Decoder.

func (*MessagesMessagesNotModified) Encode

Encode implements bin.Encoder.

func (*MessagesMessagesNotModified) String added in v0.12.0

func (m *MessagesMessagesNotModified) String() string

String implements fmt.Stringer.

type MessagesMessagesSlice

type MessagesMessagesSlice struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If set, indicates that the results may be inexact
	Inexact bool
	// Total number of messages in the list
	Count int
	// Rate to use in the offset_rate parameter in the next call to messages.searchGlobal¹
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.searchGlobal
	//
	// Use SetNextRate and GetNextRate helpers.
	NextRate int
	// Indicates the absolute position of messages[0] within the total result set with count count. This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}.
	//
	// Use SetOffsetIDOffset and GetOffsetIDOffset helpers.
	OffsetIDOffset int
	// List of messages
	Messages []MessageClass
	// List of chats mentioned in messages
	Chats []ChatClass
	// List of users mentioned in messages and chats
	Users []UserClass
}

MessagesMessagesSlice represents TL type `messages.messagesSlice#3a54685e`. Incomplete list of messages and auxiliary data.

See https://core.telegram.org/constructor/messages.messagesSlice for reference.

func (*MessagesMessagesSlice) Decode

func (m *MessagesMessagesSlice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesMessagesSlice) Encode

func (m *MessagesMessagesSlice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesMessagesSlice) GetNextRate

func (m *MessagesMessagesSlice) GetNextRate() (value int, ok bool)

GetNextRate returns value of NextRate conditional field and boolean which is true if field was set.

func (*MessagesMessagesSlice) GetOffsetIDOffset

func (m *MessagesMessagesSlice) GetOffsetIDOffset() (value int, ok bool)

GetOffsetIDOffset returns value of OffsetIDOffset conditional field and boolean which is true if field was set.

func (*MessagesMessagesSlice) SetInexact

func (m *MessagesMessagesSlice) SetInexact(value bool)

SetInexact sets value of Inexact conditional field.

func (*MessagesMessagesSlice) SetNextRate

func (m *MessagesMessagesSlice) SetNextRate(value int)

SetNextRate sets value of NextRate conditional field.

func (*MessagesMessagesSlice) SetOffsetIDOffset

func (m *MessagesMessagesSlice) SetOffsetIDOffset(value int)

SetOffsetIDOffset sets value of OffsetIDOffset conditional field.

func (*MessagesMessagesSlice) String added in v0.12.0

func (m *MessagesMessagesSlice) String() string

String implements fmt.Stringer.

type MessagesMigrateChatRequest

type MessagesMigrateChatRequest struct {
	// Legacy group to migrate
	ChatID int
}

MessagesMigrateChatRequest represents TL type `messages.migrateChat#15a3b8e3`. Turn a legacy group into a supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/method/messages.migrateChat for reference.

func (*MessagesMigrateChatRequest) Decode

Decode implements bin.Decoder.

func (*MessagesMigrateChatRequest) Encode

Encode implements bin.Encoder.

func (*MessagesMigrateChatRequest) String added in v0.12.0

func (m *MessagesMigrateChatRequest) String() string

String implements fmt.Stringer.

type MessagesPeerDialogs

type MessagesPeerDialogs struct {
	// Dialog info
	Dialogs []DialogClass
	// Messages mentioned in dialog info
	Messages []MessageClass
	// Chats
	Chats []ChatClass
	// Users
	Users []UserClass
	// Current update state of dialog¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	State UpdatesState
}

MessagesPeerDialogs represents TL type `messages.peerDialogs#3371c354`. Dialog info of multiple peers

See https://core.telegram.org/constructor/messages.peerDialogs for reference.

func (*MessagesPeerDialogs) Decode

func (p *MessagesPeerDialogs) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesPeerDialogs) Encode

func (p *MessagesPeerDialogs) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesPeerDialogs) String added in v0.12.0

func (p *MessagesPeerDialogs) String() string

String implements fmt.Stringer.

type MessagesReadDiscussionRequest

type MessagesReadDiscussionRequest struct {
	// Group ID
	Peer InputPeerClass
	// ID of message that started the thread
	MsgID int
	// ID up to which thread messages were read
	ReadMaxID int
}

MessagesReadDiscussionRequest represents TL type `messages.readDiscussion#f731a9f4`. Mark a thread¹ as read

Links:

  1. https://core.telegram.org/api/threads

See https://core.telegram.org/method/messages.readDiscussion for reference.

func (*MessagesReadDiscussionRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReadDiscussionRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReadDiscussionRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesReadEncryptedHistoryRequest

type MessagesReadEncryptedHistoryRequest struct {
	// Secret chat ID
	Peer InputEncryptedChat
	// Maximum date value for received messages in history
	MaxDate int
}

MessagesReadEncryptedHistoryRequest represents TL type `messages.readEncryptedHistory#7f4b690a`. Marks message history within a secret chat as read.

See https://core.telegram.org/method/messages.readEncryptedHistory for reference.

func (*MessagesReadEncryptedHistoryRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReadEncryptedHistoryRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReadEncryptedHistoryRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesReadFeaturedStickersRequest

type MessagesReadFeaturedStickersRequest struct {
	// IDs of stickersets to mark as read
	ID []int64
}

MessagesReadFeaturedStickersRequest represents TL type `messages.readFeaturedStickers#5b118126`. Mark new featured stickers as read

See https://core.telegram.org/method/messages.readFeaturedStickers for reference.

func (*MessagesReadFeaturedStickersRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReadFeaturedStickersRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReadFeaturedStickersRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesReadHistoryRequest

type MessagesReadHistoryRequest struct {
	// Target user or group
	Peer InputPeerClass
	// If a positive value is passed, only messages with identifiers less or equal than the given one will be read
	MaxID int
}

MessagesReadHistoryRequest represents TL type `messages.readHistory#e306d3a`. Marks message history as read.

See https://core.telegram.org/method/messages.readHistory for reference.

func (*MessagesReadHistoryRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReadHistoryRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReadHistoryRequest) String added in v0.12.0

func (r *MessagesReadHistoryRequest) String() string

String implements fmt.Stringer.

type MessagesReadMentionsRequest

type MessagesReadMentionsRequest struct {
	// Dialog
	Peer InputPeerClass
}

MessagesReadMentionsRequest represents TL type `messages.readMentions#f0189d3`. Mark mentions as read

See https://core.telegram.org/method/messages.readMentions for reference.

func (*MessagesReadMentionsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReadMentionsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReadMentionsRequest) String added in v0.12.0

func (r *MessagesReadMentionsRequest) String() string

String implements fmt.Stringer.

type MessagesReadMessageContentsRequest

type MessagesReadMessageContentsRequest struct {
	// Message ID list
	ID []int
}

MessagesReadMessageContentsRequest represents TL type `messages.readMessageContents#36a73f77`. Notifies the sender about the recipient having listened a voice message or watched a video.

See https://core.telegram.org/method/messages.readMessageContents for reference.

func (*MessagesReadMessageContentsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReadMessageContentsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReadMessageContentsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesReceivedMessagesRequest

type MessagesReceivedMessagesRequest struct {
	// Maximum message ID available in a client.
	MaxID int
}

MessagesReceivedMessagesRequest represents TL type `messages.receivedMessages#5a954c0`. Confirms receipt of messages by a client, cancels PUSH-notification sending.

See https://core.telegram.org/method/messages.receivedMessages for reference.

func (*MessagesReceivedMessagesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReceivedMessagesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReceivedMessagesRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesReceivedQueueRequest

type MessagesReceivedQueueRequest struct {
	// Maximum qts value available at the client
	MaxQts int
}

MessagesReceivedQueueRequest represents TL type `messages.receivedQueue#55a5bb66`. Confirms receipt of messages in a secret chat by client, cancels push notifications.

See https://core.telegram.org/method/messages.receivedQueue for reference.

func (*MessagesReceivedQueueRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReceivedQueueRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReceivedQueueRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesRecentStickers

type MessagesRecentStickers struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// Emojis associated to stickers
	Packs []StickerPack
	// Recent stickers
	Stickers []DocumentClass
	// When was each sticker last used
	Dates []int
}

MessagesRecentStickers represents TL type `messages.recentStickers#22f3afb3`. Recently used stickers

See https://core.telegram.org/constructor/messages.recentStickers for reference.

func (*MessagesRecentStickers) Decode

func (r *MessagesRecentStickers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesRecentStickers) Encode

func (r *MessagesRecentStickers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesRecentStickers) String added in v0.12.0

func (r *MessagesRecentStickers) String() string

String implements fmt.Stringer.

type MessagesRecentStickersBox

type MessagesRecentStickersBox struct {
	RecentStickers MessagesRecentStickersClass
}

MessagesRecentStickers boxes the MessagesRecentStickersClass providing a helper.

func (*MessagesRecentStickersBox) Decode

func (b *MessagesRecentStickersBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesRecentStickersBox.

func (*MessagesRecentStickersBox) Encode

func (b *MessagesRecentStickersBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesRecentStickersBox.

type MessagesRecentStickersClass

type MessagesRecentStickersClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesRecentStickersClass represents messages.RecentStickers generic type.

See https://core.telegram.org/type/messages.RecentStickers for reference.

Example:

g, err := DecodeMessagesRecentStickers(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesRecentStickersNotModified: // messages.recentStickersNotModified#b17f890
case *MessagesRecentStickers: // messages.recentStickers#22f3afb3
default: panic(v)
}

func DecodeMessagesRecentStickers

func DecodeMessagesRecentStickers(buf *bin.Buffer) (MessagesRecentStickersClass, error)

DecodeMessagesRecentStickers implements binary de-serialization for MessagesRecentStickersClass.

type MessagesRecentStickersNotModified

type MessagesRecentStickersNotModified struct {
}

MessagesRecentStickersNotModified represents TL type `messages.recentStickersNotModified#b17f890`. No new recent sticker was found

See https://core.telegram.org/constructor/messages.recentStickersNotModified for reference.

func (*MessagesRecentStickersNotModified) Decode

Decode implements bin.Decoder.

func (*MessagesRecentStickersNotModified) Encode

Encode implements bin.Encoder.

func (*MessagesRecentStickersNotModified) String added in v0.12.0

String implements fmt.Stringer.

type MessagesReorderPinnedDialogsRequest

type MessagesReorderPinnedDialogsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If set, dialogs pinned server-side but not present in the order field will be unpinned.
	Force bool
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	FolderID int
	// New dialog order
	Order []InputDialogPeerClass
}

MessagesReorderPinnedDialogsRequest represents TL type `messages.reorderPinnedDialogs#3b1adf37`. Reorder pinned dialogs

See https://core.telegram.org/method/messages.reorderPinnedDialogs for reference.

func (*MessagesReorderPinnedDialogsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReorderPinnedDialogsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReorderPinnedDialogsRequest) SetForce

func (r *MessagesReorderPinnedDialogsRequest) SetForce(value bool)

SetForce sets value of Force conditional field.

func (*MessagesReorderPinnedDialogsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesReorderStickerSetsRequest

type MessagesReorderStickerSetsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Reorder mask stickersets
	Masks bool
	// New stickerset order by stickerset IDs
	Order []int64
}

MessagesReorderStickerSetsRequest represents TL type `messages.reorderStickerSets#78337739`. Reorder installed stickersets

See https://core.telegram.org/method/messages.reorderStickerSets for reference.

func (*MessagesReorderStickerSetsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReorderStickerSetsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReorderStickerSetsRequest) SetMasks

func (r *MessagesReorderStickerSetsRequest) SetMasks(value bool)

SetMasks sets value of Masks conditional field.

func (*MessagesReorderStickerSetsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesReportEncryptedSpamRequest

type MessagesReportEncryptedSpamRequest struct {
	// The secret chat to report
	Peer InputEncryptedChat
}

MessagesReportEncryptedSpamRequest represents TL type `messages.reportEncryptedSpam#4b0c8c0f`. Report a secret chat for spam

See https://core.telegram.org/method/messages.reportEncryptedSpam for reference.

func (*MessagesReportEncryptedSpamRequest) Decode

Decode implements bin.Decoder.

func (*MessagesReportEncryptedSpamRequest) Encode

Encode implements bin.Encoder.

func (*MessagesReportEncryptedSpamRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesReportRequest

type MessagesReportRequest struct {
	// Peer
	Peer InputPeerClass
	// IDs of messages to report
	ID []int
	// Why are these messages being reported
	Reason ReportReasonClass
}

MessagesReportRequest represents TL type `messages.report#bd82b658`. Report a message in a chat for violation of telegram's Terms of Service

See https://core.telegram.org/method/messages.report for reference.

func (*MessagesReportRequest) Decode

func (r *MessagesReportRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesReportRequest) Encode

func (r *MessagesReportRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesReportRequest) String added in v0.12.0

func (r *MessagesReportRequest) String() string

String implements fmt.Stringer.

type MessagesReportSpamRequest

type MessagesReportSpamRequest struct {
	// Peer to report
	Peer InputPeerClass
}

MessagesReportSpamRequest represents TL type `messages.reportSpam#cf1592db`. Report a new incoming chat for spam, if the peer settings¹ of the chat allow us to do that

Links:

  1. https://core.telegram.org/constructor/peerSettings

See https://core.telegram.org/method/messages.reportSpam for reference.

func (*MessagesReportSpamRequest) Decode

func (r *MessagesReportSpamRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesReportSpamRequest) Encode

func (r *MessagesReportSpamRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesReportSpamRequest) String added in v0.12.0

func (r *MessagesReportSpamRequest) String() string

String implements fmt.Stringer.

type MessagesRequestEncryptionRequest

type MessagesRequestEncryptionRequest struct {
	// User ID
	UserID InputUserClass
	// Unique client request ID required to prevent resending. This also doubles as the chat ID.
	RandomID int
	// A = g ^ a mod p, see Wikipedia¹
	//
	// Links:
	//  1) https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange
	GA []byte
}

MessagesRequestEncryptionRequest represents TL type `messages.requestEncryption#f64daf43`. Sends a request to start a secret chat to the user.

See https://core.telegram.org/method/messages.requestEncryption for reference.

func (*MessagesRequestEncryptionRequest) Decode

Decode implements bin.Decoder.

func (*MessagesRequestEncryptionRequest) Encode

Encode implements bin.Encoder.

func (*MessagesRequestEncryptionRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesRequestUrlAuthRequest

type MessagesRequestUrlAuthRequest struct {
	// Peer where the message is located
	Peer InputPeerClass
	// The message
	MsgID int
	// The ID of the button with the authorization request
	ButtonID int
}

MessagesRequestUrlAuthRequest represents TL type `messages.requestUrlAuth#e33f5613`. Get more info about a Seamless Telegram Login authorization request, for more info click here »¹

Links:

  1. https://core.telegram.org/api/url-authorization

See https://core.telegram.org/method/messages.requestUrlAuth for reference.

func (*MessagesRequestUrlAuthRequest) Decode

Decode implements bin.Decoder.

func (*MessagesRequestUrlAuthRequest) Encode

Encode implements bin.Encoder.

func (*MessagesRequestUrlAuthRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSaveDraftRequest

type MessagesSaveDraftRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Disable generation of the webpage preview
	NoWebpage bool
	// Message ID the message should reply to
	//
	// Use SetReplyToMsgID and GetReplyToMsgID helpers.
	ReplyToMsgID int
	// Destination of the message that should be sent
	Peer InputPeerClass
	// The draft
	Message string
	// Message entities¹ for styled text
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
}

MessagesSaveDraftRequest represents TL type `messages.saveDraft#bc39e14b`. Save a message draft¹ associated to a chat.

Links:

  1. https://core.telegram.org/api/drafts

See https://core.telegram.org/method/messages.saveDraft for reference.

func (*MessagesSaveDraftRequest) Decode

func (s *MessagesSaveDraftRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesSaveDraftRequest) Encode

func (s *MessagesSaveDraftRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesSaveDraftRequest) GetEntities

func (s *MessagesSaveDraftRequest) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*MessagesSaveDraftRequest) GetReplyToMsgID

func (s *MessagesSaveDraftRequest) GetReplyToMsgID() (value int, ok bool)

GetReplyToMsgID returns value of ReplyToMsgID conditional field and boolean which is true if field was set.

func (*MessagesSaveDraftRequest) SetEntities

func (s *MessagesSaveDraftRequest) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*MessagesSaveDraftRequest) SetNoWebpage

func (s *MessagesSaveDraftRequest) SetNoWebpage(value bool)

SetNoWebpage sets value of NoWebpage conditional field.

func (*MessagesSaveDraftRequest) SetReplyToMsgID

func (s *MessagesSaveDraftRequest) SetReplyToMsgID(value int)

SetReplyToMsgID sets value of ReplyToMsgID conditional field.

func (*MessagesSaveDraftRequest) String added in v0.12.0

func (s *MessagesSaveDraftRequest) String() string

String implements fmt.Stringer.

type MessagesSaveGifRequest

type MessagesSaveGifRequest struct {
	// GIF to save
	ID InputDocumentClass
	// Whether to remove GIF from saved gifs list
	Unsave bool
}

MessagesSaveGifRequest represents TL type `messages.saveGif#327a30cb`. Add GIF to saved gifs list

See https://core.telegram.org/method/messages.saveGif for reference.

func (*MessagesSaveGifRequest) Decode

func (s *MessagesSaveGifRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesSaveGifRequest) Encode

func (s *MessagesSaveGifRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesSaveGifRequest) String added in v0.12.0

func (s *MessagesSaveGifRequest) String() string

String implements fmt.Stringer.

type MessagesSaveRecentStickerRequest

type MessagesSaveRecentStickerRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to add/remove stickers recently attached to photo or video files
	Attached bool
	// Sticker
	ID InputDocumentClass
	// Whether to save or unsave the sticker
	Unsave bool
}

MessagesSaveRecentStickerRequest represents TL type `messages.saveRecentSticker#392718f8`. Add/remove sticker from recent stickers list

See https://core.telegram.org/method/messages.saveRecentSticker for reference.

func (*MessagesSaveRecentStickerRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSaveRecentStickerRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSaveRecentStickerRequest) SetAttached

func (s *MessagesSaveRecentStickerRequest) SetAttached(value bool)

SetAttached sets value of Attached conditional field.

func (*MessagesSaveRecentStickerRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSavedGifs

type MessagesSavedGifs struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// List of saved gifs
	Gifs []DocumentClass
}

MessagesSavedGifs represents TL type `messages.savedGifs#2e0709a5`. Saved gifs

See https://core.telegram.org/constructor/messages.savedGifs for reference.

func (*MessagesSavedGifs) Decode

func (s *MessagesSavedGifs) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesSavedGifs) Encode

func (s *MessagesSavedGifs) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesSavedGifs) String added in v0.12.0

func (s *MessagesSavedGifs) String() string

String implements fmt.Stringer.

type MessagesSavedGifsBox

type MessagesSavedGifsBox struct {
	SavedGifs MessagesSavedGifsClass
}

MessagesSavedGifs boxes the MessagesSavedGifsClass providing a helper.

func (*MessagesSavedGifsBox) Decode

func (b *MessagesSavedGifsBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesSavedGifsBox.

func (*MessagesSavedGifsBox) Encode

func (b *MessagesSavedGifsBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesSavedGifsBox.

type MessagesSavedGifsClass

type MessagesSavedGifsClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesSavedGifsClass represents messages.SavedGifs generic type.

See https://core.telegram.org/type/messages.SavedGifs for reference.

Example:

g, err := DecodeMessagesSavedGifs(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesSavedGifsNotModified: // messages.savedGifsNotModified#e8025ca2
case *MessagesSavedGifs: // messages.savedGifs#2e0709a5
default: panic(v)
}

func DecodeMessagesSavedGifs

func DecodeMessagesSavedGifs(buf *bin.Buffer) (MessagesSavedGifsClass, error)

DecodeMessagesSavedGifs implements binary de-serialization for MessagesSavedGifsClass.

type MessagesSavedGifsNotModified

type MessagesSavedGifsNotModified struct {
}

MessagesSavedGifsNotModified represents TL type `messages.savedGifsNotModified#e8025ca2`. No new saved gifs were found

See https://core.telegram.org/constructor/messages.savedGifsNotModified for reference.

func (*MessagesSavedGifsNotModified) Decode

Decode implements bin.Decoder.

func (*MessagesSavedGifsNotModified) Encode

Encode implements bin.Encoder.

func (*MessagesSavedGifsNotModified) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSearchCounter

type MessagesSearchCounter struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If set, the results may be inexact
	Inexact bool
	// Provided message filter
	Filter MessagesFilterClass
	// Number of results that were found server-side
	Count int
}

MessagesSearchCounter represents TL type `messages.searchCounter#e844ebff`. Indicates how many results would be found by a messages.search¹ call with the same parameters

Links:

  1. https://core.telegram.org/method/messages.search

See https://core.telegram.org/constructor/messages.searchCounter for reference.

func (*MessagesSearchCounter) Decode

func (s *MessagesSearchCounter) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesSearchCounter) Encode

func (s *MessagesSearchCounter) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesSearchCounter) SetInexact

func (s *MessagesSearchCounter) SetInexact(value bool)

SetInexact sets value of Inexact conditional field.

func (*MessagesSearchCounter) String added in v0.12.0

func (s *MessagesSearchCounter) String() string

String implements fmt.Stringer.

type MessagesSearchCounterVector added in v0.8.0

type MessagesSearchCounterVector struct {
	// Elements of Vector<messages.SearchCounter>
	Elems []MessagesSearchCounter
}

MessagesSearchCounterVector is a box for Vector<messages.SearchCounter>

func (*MessagesSearchCounterVector) Decode added in v0.8.0

func (vec *MessagesSearchCounterVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesSearchCounterVector) Encode added in v0.8.0

func (vec *MessagesSearchCounterVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesSearchCounterVector) String added in v0.12.0

func (vec *MessagesSearchCounterVector) String() string

String implements fmt.Stringer.

type MessagesSearchGlobalRequest

type MessagesSearchGlobalRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// Query
	Q string
	// Global search filter
	Filter MessagesFilterClass
	// If a positive value was specified, the method will return only messages with date bigger than min_date
	MinDate int
	// If a positive value was transferred, the method will return only messages with date smaller than max_date
	MaxDate int
	// Initially 0, then set to the next_rate parameter of messages.messagesSlice¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/messages.messagesSlice
	OffsetRate int
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetPeer InputPeerClass
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetID int
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
}

MessagesSearchGlobalRequest represents TL type `messages.searchGlobal#4bc6589a`. Search for messages and peers globally

See https://core.telegram.org/method/messages.searchGlobal for reference.

func (*MessagesSearchGlobalRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSearchGlobalRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSearchGlobalRequest) GetFolderID

func (s *MessagesSearchGlobalRequest) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*MessagesSearchGlobalRequest) SetFolderID

func (s *MessagesSearchGlobalRequest) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*MessagesSearchGlobalRequest) String added in v0.12.0

func (s *MessagesSearchGlobalRequest) String() string

String implements fmt.Stringer.

type MessagesSearchRequest

type MessagesSearchRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// User or chat, histories with which are searched, or (inputPeerEmpty)¹ constructor for global search
	//
	// Links:
	//  1) https://core.telegram.org/constructor/inputPeerEmpty
	Peer InputPeerClass
	// Text search request
	Q string
	// Only return messages sent by the specified user ID
	//
	// Use SetFromID and GetFromID helpers.
	FromID InputPeerClass
	// Thread ID¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetTopMsgID and GetTopMsgID helpers.
	TopMsgID int
	// Filter to return only specified message types
	Filter MessagesFilterClass
	// If a positive value was transferred, only messages with a sending date bigger than the transferred one will be returned
	MinDate int
	// If a positive value was transferred, only messages with a sending date smaller than the transferred one will be returned
	MaxDate int
	// Only return messages starting from the specified message ID
	OffsetID int
	// Additional offset¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	AddOffset int
	// Number of results to return¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
	// Maximum message ID to return¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	MaxID int
	// Minimum message ID to return¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	MinID int
	// Hash¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Hash int
}

MessagesSearchRequest represents TL type `messages.search#c352eec`. Gets back found messages

See https://core.telegram.org/method/messages.search for reference.

func (*MessagesSearchRequest) Decode

func (s *MessagesSearchRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesSearchRequest) Encode

func (s *MessagesSearchRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesSearchRequest) GetFromID

func (s *MessagesSearchRequest) GetFromID() (value InputPeerClass, ok bool)

GetFromID returns value of FromID conditional field and boolean which is true if field was set.

func (*MessagesSearchRequest) GetTopMsgID

func (s *MessagesSearchRequest) GetTopMsgID() (value int, ok bool)

GetTopMsgID returns value of TopMsgID conditional field and boolean which is true if field was set.

func (*MessagesSearchRequest) SetFromID

func (s *MessagesSearchRequest) SetFromID(value InputPeerClass)

SetFromID sets value of FromID conditional field.

func (*MessagesSearchRequest) SetTopMsgID

func (s *MessagesSearchRequest) SetTopMsgID(value int)

SetTopMsgID sets value of TopMsgID conditional field.

func (*MessagesSearchRequest) String added in v0.12.0

func (s *MessagesSearchRequest) String() string

String implements fmt.Stringer.

type MessagesSearchStickerSetsRequest

type MessagesSearchStickerSetsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Exclude featured stickersets from results
	ExcludeFeatured bool
	// Query string
	Q string
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
}

MessagesSearchStickerSetsRequest represents TL type `messages.searchStickerSets#c2b7d08b`. Search for stickersets

See https://core.telegram.org/method/messages.searchStickerSets for reference.

func (*MessagesSearchStickerSetsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSearchStickerSetsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSearchStickerSetsRequest) SetExcludeFeatured

func (s *MessagesSearchStickerSetsRequest) SetExcludeFeatured(value bool)

SetExcludeFeatured sets value of ExcludeFeatured conditional field.

func (*MessagesSearchStickerSetsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSendEncryptedFileRequest

type MessagesSendEncryptedFileRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to send the file without triggering a notification
	Silent bool
	// Secret chat ID
	Peer InputEncryptedChat
	// Unique client message ID necessary to prevent message resending
	RandomID int64
	// TL-serialization of DecryptedMessage¹ type, encrypted with a key generated during chat initialization
	//
	// Links:
	//  1) https://core.telegram.org/type/DecryptedMessage
	Data []byte
	// File attachment for the secret chat
	File InputEncryptedFileClass
}

MessagesSendEncryptedFileRequest represents TL type `messages.sendEncryptedFile#5559481d`. Sends a message with a file attachment to a secret chat

See https://core.telegram.org/method/messages.sendEncryptedFile for reference.

func (*MessagesSendEncryptedFileRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSendEncryptedFileRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSendEncryptedFileRequest) SetSilent

func (s *MessagesSendEncryptedFileRequest) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*MessagesSendEncryptedFileRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSendEncryptedRequest

type MessagesSendEncryptedRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Send encrypted message without a notification
	Silent bool
	// Secret chat ID
	Peer InputEncryptedChat
	// Unique client message ID, necessary to avoid message resending
	RandomID int64
	// TL-serialization of DecryptedMessage¹ type, encrypted with a key that was created during chat initialization
	//
	// Links:
	//  1) https://core.telegram.org/type/DecryptedMessage
	Data []byte
}

MessagesSendEncryptedRequest represents TL type `messages.sendEncrypted#44fa7a15`. Sends a text message to a secret chat.

See https://core.telegram.org/method/messages.sendEncrypted for reference.

func (*MessagesSendEncryptedRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSendEncryptedRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSendEncryptedRequest) SetSilent

func (s *MessagesSendEncryptedRequest) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*MessagesSendEncryptedRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSendEncryptedServiceRequest

type MessagesSendEncryptedServiceRequest struct {
	// Secret chat ID
	Peer InputEncryptedChat
	// Unique client message ID required to prevent message resending
	RandomID int64
	// TL-serialization of  DecryptedMessage¹ type, encrypted with a key generated during chat initialization
	//
	// Links:
	//  1) https://core.telegram.org/type/DecryptedMessage
	Data []byte
}

MessagesSendEncryptedServiceRequest represents TL type `messages.sendEncryptedService#32d439a4`. Sends a service message to a secret chat.

See https://core.telegram.org/method/messages.sendEncryptedService for reference.

func (*MessagesSendEncryptedServiceRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSendEncryptedServiceRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSendEncryptedServiceRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSendInlineBotResultRequest

type MessagesSendInlineBotResultRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to send the message silently (no notification will be triggered on the other client)
	Silent bool
	// Whether to send the message in background
	Background bool
	// Whether to clear the draft¹
	//
	// Links:
	//  1) https://core.telegram.org/api/drafts
	ClearDraft bool
	// Whether to hide the via @botname in the resulting message (only for bot usernames encountered in the config¹)
	//
	// Links:
	//  1) https://core.telegram.org/constructor/config
	HideVia bool
	// Destination
	Peer InputPeerClass
	// ID of the message this message should reply to
	//
	// Use SetReplyToMsgID and GetReplyToMsgID helpers.
	ReplyToMsgID int
	// Random ID to avoid resending the same query
	RandomID int64
	// Query ID from messages.getInlineBotResults¹
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.getInlineBotResults
	QueryID int64
	// Result ID from messages.getInlineBotResults¹
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.getInlineBotResults
	ID string
	// Scheduled message date for scheduled messages
	//
	// Use SetScheduleDate and GetScheduleDate helpers.
	ScheduleDate int
}

MessagesSendInlineBotResultRequest represents TL type `messages.sendInlineBotResult#220815b0`. Send a result obtained using messages.getInlineBotResults¹.

Links:

  1. https://core.telegram.org/method/messages.getInlineBotResults

See https://core.telegram.org/method/messages.sendInlineBotResult for reference.

func (*MessagesSendInlineBotResultRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSendInlineBotResultRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSendInlineBotResultRequest) GetReplyToMsgID

func (s *MessagesSendInlineBotResultRequest) GetReplyToMsgID() (value int, ok bool)

GetReplyToMsgID returns value of ReplyToMsgID conditional field and boolean which is true if field was set.

func (*MessagesSendInlineBotResultRequest) GetScheduleDate

func (s *MessagesSendInlineBotResultRequest) GetScheduleDate() (value int, ok bool)

GetScheduleDate returns value of ScheduleDate conditional field and boolean which is true if field was set.

func (*MessagesSendInlineBotResultRequest) SetBackground

func (s *MessagesSendInlineBotResultRequest) SetBackground(value bool)

SetBackground sets value of Background conditional field.

func (*MessagesSendInlineBotResultRequest) SetClearDraft

func (s *MessagesSendInlineBotResultRequest) SetClearDraft(value bool)

SetClearDraft sets value of ClearDraft conditional field.

func (*MessagesSendInlineBotResultRequest) SetHideVia

func (s *MessagesSendInlineBotResultRequest) SetHideVia(value bool)

SetHideVia sets value of HideVia conditional field.

func (*MessagesSendInlineBotResultRequest) SetReplyToMsgID

func (s *MessagesSendInlineBotResultRequest) SetReplyToMsgID(value int)

SetReplyToMsgID sets value of ReplyToMsgID conditional field.

func (*MessagesSendInlineBotResultRequest) SetScheduleDate

func (s *MessagesSendInlineBotResultRequest) SetScheduleDate(value int)

SetScheduleDate sets value of ScheduleDate conditional field.

func (*MessagesSendInlineBotResultRequest) SetSilent

func (s *MessagesSendInlineBotResultRequest) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*MessagesSendInlineBotResultRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSendMediaRequest

type MessagesSendMediaRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Send message silently (no notification should be triggered)
	Silent bool
	// Send message in background
	Background bool
	// Clear the draft
	ClearDraft bool
	// Destination
	Peer InputPeerClass
	// Message ID to which this message should reply to
	//
	// Use SetReplyToMsgID and GetReplyToMsgID helpers.
	ReplyToMsgID int
	// Attached media
	Media InputMediaClass
	// Caption
	Message string
	// Random ID to avoid resending the same message
	RandomID int64
	// Reply markup for bot keyboards
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
	// Message entities¹ for styled text
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
	// Scheduled message date for scheduled messages¹
	//
	// Links:
	//  1) https://core.telegram.org/api/scheduled-messages
	//
	// Use SetScheduleDate and GetScheduleDate helpers.
	ScheduleDate int
}

MessagesSendMediaRequest represents TL type `messages.sendMedia#3491eba9`. Send a media

See https://core.telegram.org/method/messages.sendMedia for reference.

func (*MessagesSendMediaRequest) Decode

func (s *MessagesSendMediaRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesSendMediaRequest) Encode

func (s *MessagesSendMediaRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesSendMediaRequest) GetEntities

func (s *MessagesSendMediaRequest) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*MessagesSendMediaRequest) GetReplyMarkup

func (s *MessagesSendMediaRequest) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*MessagesSendMediaRequest) GetReplyToMsgID

func (s *MessagesSendMediaRequest) GetReplyToMsgID() (value int, ok bool)

GetReplyToMsgID returns value of ReplyToMsgID conditional field and boolean which is true if field was set.

func (*MessagesSendMediaRequest) GetScheduleDate

func (s *MessagesSendMediaRequest) GetScheduleDate() (value int, ok bool)

GetScheduleDate returns value of ScheduleDate conditional field and boolean which is true if field was set.

func (*MessagesSendMediaRequest) SetBackground

func (s *MessagesSendMediaRequest) SetBackground(value bool)

SetBackground sets value of Background conditional field.

func (*MessagesSendMediaRequest) SetClearDraft

func (s *MessagesSendMediaRequest) SetClearDraft(value bool)

SetClearDraft sets value of ClearDraft conditional field.

func (*MessagesSendMediaRequest) SetEntities

func (s *MessagesSendMediaRequest) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*MessagesSendMediaRequest) SetReplyMarkup

func (s *MessagesSendMediaRequest) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*MessagesSendMediaRequest) SetReplyToMsgID

func (s *MessagesSendMediaRequest) SetReplyToMsgID(value int)

SetReplyToMsgID sets value of ReplyToMsgID conditional field.

func (*MessagesSendMediaRequest) SetScheduleDate

func (s *MessagesSendMediaRequest) SetScheduleDate(value int)

SetScheduleDate sets value of ScheduleDate conditional field.

func (*MessagesSendMediaRequest) SetSilent

func (s *MessagesSendMediaRequest) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*MessagesSendMediaRequest) String added in v0.12.0

func (s *MessagesSendMediaRequest) String() string

String implements fmt.Stringer.

type MessagesSendMessageRequest

type MessagesSendMessageRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Set this flag to disable generation of the webpage preview
	NoWebpage bool
	// Send this message silently (no notifications for the receivers)
	Silent bool
	// Send this message as background message
	Background bool
	// Clear the draft field
	ClearDraft bool
	// The destination where the message will be sent
	Peer InputPeerClass
	// The message ID to which this message will reply to
	//
	// Use SetReplyToMsgID and GetReplyToMsgID helpers.
	ReplyToMsgID int
	// The message
	Message string
	// Unique client message ID required to prevent message resending
	RandomID int64
	// Reply markup for sending bot buttons
	//
	// Use SetReplyMarkup and GetReplyMarkup helpers.
	ReplyMarkup ReplyMarkupClass
	// Message entities¹ for sending styled text
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
	// Scheduled message date for scheduled messages¹
	//
	// Links:
	//  1) https://core.telegram.org/api/scheduled-messages
	//
	// Use SetScheduleDate and GetScheduleDate helpers.
	ScheduleDate int
}

MessagesSendMessageRequest represents TL type `messages.sendMessage#520c3870`. Sends a message to a chat

See https://core.telegram.org/method/messages.sendMessage for reference.

func (*MessagesSendMessageRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSendMessageRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSendMessageRequest) GetEntities

func (s *MessagesSendMessageRequest) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*MessagesSendMessageRequest) GetReplyMarkup

func (s *MessagesSendMessageRequest) GetReplyMarkup() (value ReplyMarkupClass, ok bool)

GetReplyMarkup returns value of ReplyMarkup conditional field and boolean which is true if field was set.

func (*MessagesSendMessageRequest) GetReplyToMsgID

func (s *MessagesSendMessageRequest) GetReplyToMsgID() (value int, ok bool)

GetReplyToMsgID returns value of ReplyToMsgID conditional field and boolean which is true if field was set.

func (*MessagesSendMessageRequest) GetScheduleDate

func (s *MessagesSendMessageRequest) GetScheduleDate() (value int, ok bool)

GetScheduleDate returns value of ScheduleDate conditional field and boolean which is true if field was set.

func (*MessagesSendMessageRequest) SetBackground

func (s *MessagesSendMessageRequest) SetBackground(value bool)

SetBackground sets value of Background conditional field.

func (*MessagesSendMessageRequest) SetClearDraft

func (s *MessagesSendMessageRequest) SetClearDraft(value bool)

SetClearDraft sets value of ClearDraft conditional field.

func (*MessagesSendMessageRequest) SetEntities

func (s *MessagesSendMessageRequest) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*MessagesSendMessageRequest) SetNoWebpage

func (s *MessagesSendMessageRequest) SetNoWebpage(value bool)

SetNoWebpage sets value of NoWebpage conditional field.

func (*MessagesSendMessageRequest) SetReplyMarkup

func (s *MessagesSendMessageRequest) SetReplyMarkup(value ReplyMarkupClass)

SetReplyMarkup sets value of ReplyMarkup conditional field.

func (*MessagesSendMessageRequest) SetReplyToMsgID

func (s *MessagesSendMessageRequest) SetReplyToMsgID(value int)

SetReplyToMsgID sets value of ReplyToMsgID conditional field.

func (*MessagesSendMessageRequest) SetScheduleDate

func (s *MessagesSendMessageRequest) SetScheduleDate(value int)

SetScheduleDate sets value of ScheduleDate conditional field.

func (*MessagesSendMessageRequest) SetSilent

func (s *MessagesSendMessageRequest) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*MessagesSendMessageRequest) String added in v0.12.0

func (s *MessagesSendMessageRequest) String() string

String implements fmt.Stringer.

type MessagesSendMultiMediaRequest

type MessagesSendMultiMediaRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to send the album silently (no notification triggered)
	Silent bool
	// Send in background?
	Background bool
	// Whether to clear drafts¹
	//
	// Links:
	//  1) https://core.telegram.org/api/drafts
	ClearDraft bool
	// The destination chat
	Peer InputPeerClass
	// The message to reply to
	//
	// Use SetReplyToMsgID and GetReplyToMsgID helpers.
	ReplyToMsgID int
	// The medias to send
	MultiMedia []InputSingleMedia
	// Scheduled message date for scheduled messages
	//
	// Use SetScheduleDate and GetScheduleDate helpers.
	ScheduleDate int
}

MessagesSendMultiMediaRequest represents TL type `messages.sendMultiMedia#cc0110cb`. Send an album or grouped media¹

Links:

  1. https://core.telegram.org/api/files#albums-grouped-media

See https://core.telegram.org/method/messages.sendMultiMedia for reference.

func (*MessagesSendMultiMediaRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSendMultiMediaRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSendMultiMediaRequest) GetReplyToMsgID

func (s *MessagesSendMultiMediaRequest) GetReplyToMsgID() (value int, ok bool)

GetReplyToMsgID returns value of ReplyToMsgID conditional field and boolean which is true if field was set.

func (*MessagesSendMultiMediaRequest) GetScheduleDate

func (s *MessagesSendMultiMediaRequest) GetScheduleDate() (value int, ok bool)

GetScheduleDate returns value of ScheduleDate conditional field and boolean which is true if field was set.

func (*MessagesSendMultiMediaRequest) SetBackground

func (s *MessagesSendMultiMediaRequest) SetBackground(value bool)

SetBackground sets value of Background conditional field.

func (*MessagesSendMultiMediaRequest) SetClearDraft

func (s *MessagesSendMultiMediaRequest) SetClearDraft(value bool)

SetClearDraft sets value of ClearDraft conditional field.

func (*MessagesSendMultiMediaRequest) SetReplyToMsgID

func (s *MessagesSendMultiMediaRequest) SetReplyToMsgID(value int)

SetReplyToMsgID sets value of ReplyToMsgID conditional field.

func (*MessagesSendMultiMediaRequest) SetScheduleDate

func (s *MessagesSendMultiMediaRequest) SetScheduleDate(value int)

SetScheduleDate sets value of ScheduleDate conditional field.

func (*MessagesSendMultiMediaRequest) SetSilent

func (s *MessagesSendMultiMediaRequest) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*MessagesSendMultiMediaRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSendScheduledMessagesRequest

type MessagesSendScheduledMessagesRequest struct {
	// Peer
	Peer InputPeerClass
	// Scheduled message IDs
	ID []int
}

MessagesSendScheduledMessagesRequest represents TL type `messages.sendScheduledMessages#bd38850a`. Send scheduled messages right away

See https://core.telegram.org/method/messages.sendScheduledMessages for reference.

func (*MessagesSendScheduledMessagesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSendScheduledMessagesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSendScheduledMessagesRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSendScreenshotNotificationRequest

type MessagesSendScreenshotNotificationRequest struct {
	// Other user
	Peer InputPeerClass
	// ID of message that was screenshotted, can be 0
	ReplyToMsgID int
	// Random ID to avoid message resending
	RandomID int64
}

MessagesSendScreenshotNotificationRequest represents TL type `messages.sendScreenshotNotification#c97df020`. Notify the other user in a private chat that a screenshot of the chat was taken

See https://core.telegram.org/method/messages.sendScreenshotNotification for reference.

func (*MessagesSendScreenshotNotificationRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSendScreenshotNotificationRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSendScreenshotNotificationRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSendVoteRequest

type MessagesSendVoteRequest struct {
	// The chat where the poll was sent
	Peer InputPeerClass
	// The message ID of the poll
	MsgID int
	// The options that were chosen
	Options [][]byte
}

MessagesSendVoteRequest represents TL type `messages.sendVote#10ea6184`. Vote in a poll¹

Links:

  1. https://core.telegram.org/constructor/poll

See https://core.telegram.org/method/messages.sendVote for reference.

func (*MessagesSendVoteRequest) Decode

func (s *MessagesSendVoteRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesSendVoteRequest) Encode

func (s *MessagesSendVoteRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesSendVoteRequest) String added in v0.12.0

func (s *MessagesSendVoteRequest) String() string

String implements fmt.Stringer.

type MessagesSentEncryptedFile

type MessagesSentEncryptedFile struct {
	// Sending date
	Date int
	// Attached file
	File EncryptedFileClass
}

MessagesSentEncryptedFile represents TL type `messages.sentEncryptedFile#9493ff32`. Message with a file enclosure sent to a protected chat

See https://core.telegram.org/constructor/messages.sentEncryptedFile for reference.

func (*MessagesSentEncryptedFile) Decode

func (s *MessagesSentEncryptedFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesSentEncryptedFile) Encode

func (s *MessagesSentEncryptedFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesSentEncryptedFile) String added in v0.12.0

func (s *MessagesSentEncryptedFile) String() string

String implements fmt.Stringer.

type MessagesSentEncryptedMessage

type MessagesSentEncryptedMessage struct {
	// Date of sending
	Date int
}

MessagesSentEncryptedMessage represents TL type `messages.sentEncryptedMessage#560f8935`. Message without file attachemts sent to an encrypted file.

See https://core.telegram.org/constructor/messages.sentEncryptedMessage for reference.

func (*MessagesSentEncryptedMessage) Decode

Decode implements bin.Decoder.

func (*MessagesSentEncryptedMessage) Encode

Encode implements bin.Encoder.

func (*MessagesSentEncryptedMessage) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSentEncryptedMessageBox

type MessagesSentEncryptedMessageBox struct {
	SentEncryptedMessage MessagesSentEncryptedMessageClass
}

MessagesSentEncryptedMessage boxes the MessagesSentEncryptedMessageClass providing a helper.

func (*MessagesSentEncryptedMessageBox) Decode

Decode implements bin.Decoder for MessagesSentEncryptedMessageBox.

func (*MessagesSentEncryptedMessageBox) Encode

Encode implements bin.Encode for MessagesSentEncryptedMessageBox.

type MessagesSentEncryptedMessageClass

type MessagesSentEncryptedMessageClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesSentEncryptedMessageClass represents messages.SentEncryptedMessage generic type.

See https://core.telegram.org/type/messages.SentEncryptedMessage for reference.

Example:

g, err := DecodeMessagesSentEncryptedMessage(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesSentEncryptedMessage: // messages.sentEncryptedMessage#560f8935
case *MessagesSentEncryptedFile: // messages.sentEncryptedFile#9493ff32
default: panic(v)
}

func DecodeMessagesSentEncryptedMessage

func DecodeMessagesSentEncryptedMessage(buf *bin.Buffer) (MessagesSentEncryptedMessageClass, error)

DecodeMessagesSentEncryptedMessage implements binary de-serialization for MessagesSentEncryptedMessageClass.

type MessagesSetBotCallbackAnswerRequest

type MessagesSetBotCallbackAnswerRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to show the message as a popup instead of a toast notification
	Alert bool
	// Query ID
	QueryID int64
	// Popup to show
	//
	// Use SetMessage and GetMessage helpers.
	Message string
	// URL to open
	//
	// Use SetURL and GetURL helpers.
	URL string
	// Cache validity
	CacheTime int
}

MessagesSetBotCallbackAnswerRequest represents TL type `messages.setBotCallbackAnswer#d58f130a`. Set the callback answer to a user button press (bots only)

See https://core.telegram.org/method/messages.setBotCallbackAnswer for reference.

func (*MessagesSetBotCallbackAnswerRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSetBotCallbackAnswerRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSetBotCallbackAnswerRequest) GetMessage

func (s *MessagesSetBotCallbackAnswerRequest) GetMessage() (value string, ok bool)

GetMessage returns value of Message conditional field and boolean which is true if field was set.

func (*MessagesSetBotCallbackAnswerRequest) GetURL

func (s *MessagesSetBotCallbackAnswerRequest) GetURL() (value string, ok bool)

GetURL returns value of URL conditional field and boolean which is true if field was set.

func (*MessagesSetBotCallbackAnswerRequest) SetAlert

func (s *MessagesSetBotCallbackAnswerRequest) SetAlert(value bool)

SetAlert sets value of Alert conditional field.

func (*MessagesSetBotCallbackAnswerRequest) SetMessage

func (s *MessagesSetBotCallbackAnswerRequest) SetMessage(value string)

SetMessage sets value of Message conditional field.

func (*MessagesSetBotCallbackAnswerRequest) SetURL

SetURL sets value of URL conditional field.

func (*MessagesSetBotCallbackAnswerRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSetBotPrecheckoutResultsRequest

type MessagesSetBotPrecheckoutResultsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the error field, instead
	Success bool
	// Unique identifier for the query to be answered
	QueryID int64
	// Required if the success isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.
	//
	// Use SetError and GetError helpers.
	Error string
}

MessagesSetBotPrecheckoutResultsRequest represents TL type `messages.setBotPrecheckoutResults#9c2dd95`. Once the user has confirmed their payment and shipping details, the bot receives an updateBotPrecheckoutQuery¹ update. Use this method to respond to such pre-checkout queries. Note: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent.

Links:

  1. https://core.telegram.org/constructor/updateBotPrecheckoutQuery

See https://core.telegram.org/method/messages.setBotPrecheckoutResults for reference.

func (*MessagesSetBotPrecheckoutResultsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSetBotPrecheckoutResultsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSetBotPrecheckoutResultsRequest) GetError

func (s *MessagesSetBotPrecheckoutResultsRequest) GetError() (value string, ok bool)

GetError returns value of Error conditional field and boolean which is true if field was set.

func (*MessagesSetBotPrecheckoutResultsRequest) SetError

SetError sets value of Error conditional field.

func (*MessagesSetBotPrecheckoutResultsRequest) SetSuccess

func (s *MessagesSetBotPrecheckoutResultsRequest) SetSuccess(value bool)

SetSuccess sets value of Success conditional field.

func (*MessagesSetBotPrecheckoutResultsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSetBotShippingResultsRequest

type MessagesSetBotShippingResultsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Unique identifier for the query to be answered
	QueryID int64
	// Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
	//
	// Use SetError and GetError helpers.
	Error string
	// A vector of available shipping options.
	//
	// Use SetShippingOptions and GetShippingOptions helpers.
	ShippingOptions []ShippingOption
}

MessagesSetBotShippingResultsRequest represents TL type `messages.setBotShippingResults#e5f672fa`. If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an updateBotShippingQuery¹ update. Use this method to reply to shipping queries.

Links:

  1. https://core.telegram.org/constructor/updateBotShippingQuery

See https://core.telegram.org/method/messages.setBotShippingResults for reference.

func (*MessagesSetBotShippingResultsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSetBotShippingResultsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSetBotShippingResultsRequest) GetError

func (s *MessagesSetBotShippingResultsRequest) GetError() (value string, ok bool)

GetError returns value of Error conditional field and boolean which is true if field was set.

func (*MessagesSetBotShippingResultsRequest) GetShippingOptions

func (s *MessagesSetBotShippingResultsRequest) GetShippingOptions() (value []ShippingOption, ok bool)

GetShippingOptions returns value of ShippingOptions conditional field and boolean which is true if field was set.

func (*MessagesSetBotShippingResultsRequest) SetError

func (s *MessagesSetBotShippingResultsRequest) SetError(value string)

SetError sets value of Error conditional field.

func (*MessagesSetBotShippingResultsRequest) SetShippingOptions

func (s *MessagesSetBotShippingResultsRequest) SetShippingOptions(value []ShippingOption)

SetShippingOptions sets value of ShippingOptions conditional field.

func (*MessagesSetBotShippingResultsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSetEncryptedTypingRequest

type MessagesSetEncryptedTypingRequest struct {
	// Secret chat ID
	Peer InputEncryptedChat
	// Typing.Possible values:(boolTrue)¹, if the user started typing and more than 5 seconds have passed since the last request(boolFalse)², if the user stopped typing
	//
	// Links:
	//  1) https://core.telegram.org/constructor/boolTrue
	//  2) https://core.telegram.org/constructor/boolFalse
	Typing bool
}

MessagesSetEncryptedTypingRequest represents TL type `messages.setEncryptedTyping#791451ed`. Send typing event by the current user to a secret chat.

See https://core.telegram.org/method/messages.setEncryptedTyping for reference.

func (*MessagesSetEncryptedTypingRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSetEncryptedTypingRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSetEncryptedTypingRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSetGameScoreRequest

type MessagesSetGameScoreRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Set this flag if the game message should be automatically edited to include the current scoreboard
	EditMessage bool
	// Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters
	Force bool
	// Unique identifier of target chat
	Peer InputPeerClass
	// Identifier of the sent message
	ID int
	// User identifier
	UserID InputUserClass
	// New score
	Score int
}

MessagesSetGameScoreRequest represents TL type `messages.setGameScore#8ef8ecc0`. Use this method to set the score of the specified user in a game sent as a normal message (bots only).

See https://core.telegram.org/method/messages.setGameScore for reference.

func (*MessagesSetGameScoreRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSetGameScoreRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSetGameScoreRequest) SetEditMessage

func (s *MessagesSetGameScoreRequest) SetEditMessage(value bool)

SetEditMessage sets value of EditMessage conditional field.

func (*MessagesSetGameScoreRequest) SetForce

func (s *MessagesSetGameScoreRequest) SetForce(value bool)

SetForce sets value of Force conditional field.

func (*MessagesSetGameScoreRequest) String added in v0.12.0

func (s *MessagesSetGameScoreRequest) String() string

String implements fmt.Stringer.

type MessagesSetInlineBotResultsRequest

type MessagesSetInlineBotResultsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Set this flag if the results are composed of media files
	Gallery bool
	// Set this flag if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query
	Private bool
	// Unique identifier for the answered query
	QueryID int64
	// Vector of results for the inline query
	Results []InputBotInlineResultClass
	// The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300.
	CacheTime int
	// Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don‘t support pagination. Offset length can’t exceed 64 bytes.
	//
	// Use SetNextOffset and GetNextOffset helpers.
	NextOffset string
	// If passed, clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter.
	//
	// Use SetSwitchPm and GetSwitchPm helpers.
	SwitchPm InlineBotSwitchPM
}

MessagesSetInlineBotResultsRequest represents TL type `messages.setInlineBotResults#eb5ea206`. Answer an inline query, for bots only

See https://core.telegram.org/method/messages.setInlineBotResults for reference.

func (*MessagesSetInlineBotResultsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSetInlineBotResultsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSetInlineBotResultsRequest) GetNextOffset

func (s *MessagesSetInlineBotResultsRequest) GetNextOffset() (value string, ok bool)

GetNextOffset returns value of NextOffset conditional field and boolean which is true if field was set.

func (*MessagesSetInlineBotResultsRequest) GetSwitchPm

func (s *MessagesSetInlineBotResultsRequest) GetSwitchPm() (value InlineBotSwitchPM, ok bool)

GetSwitchPm returns value of SwitchPm conditional field and boolean which is true if field was set.

func (*MessagesSetInlineBotResultsRequest) SetGallery

func (s *MessagesSetInlineBotResultsRequest) SetGallery(value bool)

SetGallery sets value of Gallery conditional field.

func (*MessagesSetInlineBotResultsRequest) SetNextOffset

func (s *MessagesSetInlineBotResultsRequest) SetNextOffset(value string)

SetNextOffset sets value of NextOffset conditional field.

func (*MessagesSetInlineBotResultsRequest) SetPrivate

func (s *MessagesSetInlineBotResultsRequest) SetPrivate(value bool)

SetPrivate sets value of Private conditional field.

func (*MessagesSetInlineBotResultsRequest) SetSwitchPm

SetSwitchPm sets value of SwitchPm conditional field.

func (*MessagesSetInlineBotResultsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSetInlineGameScoreRequest

type MessagesSetInlineGameScoreRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Set this flag if the game message should be automatically edited to include the current scoreboard
	EditMessage bool
	// Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters
	Force bool
	// ID of the inline message
	ID InputBotInlineMessageID
	// User identifier
	UserID InputUserClass
	// New score
	Score int
}

MessagesSetInlineGameScoreRequest represents TL type `messages.setInlineGameScore#15ad9f64`. Use this method to set the score of the specified user in a game sent as an inline message (bots only).

See https://core.telegram.org/method/messages.setInlineGameScore for reference.

func (*MessagesSetInlineGameScoreRequest) Decode

Decode implements bin.Decoder.

func (*MessagesSetInlineGameScoreRequest) Encode

Encode implements bin.Encoder.

func (*MessagesSetInlineGameScoreRequest) SetEditMessage

func (s *MessagesSetInlineGameScoreRequest) SetEditMessage(value bool)

SetEditMessage sets value of EditMessage conditional field.

func (*MessagesSetInlineGameScoreRequest) SetForce

func (s *MessagesSetInlineGameScoreRequest) SetForce(value bool)

SetForce sets value of Force conditional field.

func (*MessagesSetInlineGameScoreRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesSetTypingRequest

type MessagesSetTypingRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Target user or group
	Peer InputPeerClass
	// Thread ID¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetTopMsgID and GetTopMsgID helpers.
	TopMsgID int
	// Type of actionParameter added in Layer 17¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/layers#layer-17
	Action SendMessageActionClass
}

MessagesSetTypingRequest represents TL type `messages.setTyping#58943ee2`. Sends a current user typing event (see SendMessageAction¹ for all event types) to a conversation partner or group.

Links:

  1. https://core.telegram.org/type/SendMessageAction

See https://core.telegram.org/method/messages.setTyping for reference.

func (*MessagesSetTypingRequest) Decode

func (s *MessagesSetTypingRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesSetTypingRequest) Encode

func (s *MessagesSetTypingRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesSetTypingRequest) GetTopMsgID

func (s *MessagesSetTypingRequest) GetTopMsgID() (value int, ok bool)

GetTopMsgID returns value of TopMsgID conditional field and boolean which is true if field was set.

func (*MessagesSetTypingRequest) SetTopMsgID

func (s *MessagesSetTypingRequest) SetTopMsgID(value int)

SetTopMsgID sets value of TopMsgID conditional field.

func (*MessagesSetTypingRequest) String added in v0.12.0

func (s *MessagesSetTypingRequest) String() string

String implements fmt.Stringer.

type MessagesStartBotRequest

type MessagesStartBotRequest struct {
	// The bot
	Bot InputUserClass
	// The chat where to start the bot, can be the bot's private chat or a group
	Peer InputPeerClass
	// Random ID to avoid resending the same message
	RandomID int64
	// Deep linking parameter¹
	//
	// Links:
	//  1) https://core.telegram.org/bots#deep-linking
	StartParam string
}

MessagesStartBotRequest represents TL type `messages.startBot#e6df7378`. Start a conversation with a bot using a deep linking parameter¹

Links:

  1. https://core.telegram.org/bots#deep-linking

See https://core.telegram.org/method/messages.startBot for reference.

func (*MessagesStartBotRequest) Decode

func (s *MessagesStartBotRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesStartBotRequest) Encode

func (s *MessagesStartBotRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesStartBotRequest) String added in v0.12.0

func (s *MessagesStartBotRequest) String() string

String implements fmt.Stringer.

type MessagesStickerSet

type MessagesStickerSet struct {
	// The stickerset
	Set StickerSet
	// Emoji info for stickers
	Packs []StickerPack
	// Stickers in stickerset
	Documents []DocumentClass
}

MessagesStickerSet represents TL type `messages.stickerSet#b60a24a6`. Stickerset and stickers inside it

See https://core.telegram.org/constructor/messages.stickerSet for reference.

func (*MessagesStickerSet) Decode

func (s *MessagesStickerSet) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesStickerSet) Encode

func (s *MessagesStickerSet) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesStickerSet) String added in v0.12.0

func (s *MessagesStickerSet) String() string

String implements fmt.Stringer.

type MessagesStickerSetInstallResultArchive

type MessagesStickerSetInstallResultArchive struct {
	// Archived stickersets
	Sets []StickerSetCoveredClass
}

MessagesStickerSetInstallResultArchive represents TL type `messages.stickerSetInstallResultArchive#35e410a8`. The stickerset was installed, but since there are too many stickersets some were archived

See https://core.telegram.org/constructor/messages.stickerSetInstallResultArchive for reference.

func (*MessagesStickerSetInstallResultArchive) Decode

Decode implements bin.Decoder.

func (*MessagesStickerSetInstallResultArchive) Encode

Encode implements bin.Encoder.

func (*MessagesStickerSetInstallResultArchive) String added in v0.12.0

String implements fmt.Stringer.

type MessagesStickerSetInstallResultBox

type MessagesStickerSetInstallResultBox struct {
	StickerSetInstallResult MessagesStickerSetInstallResultClass
}

MessagesStickerSetInstallResult boxes the MessagesStickerSetInstallResultClass providing a helper.

func (*MessagesStickerSetInstallResultBox) Decode

Decode implements bin.Decoder for MessagesStickerSetInstallResultBox.

func (*MessagesStickerSetInstallResultBox) Encode

Encode implements bin.Encode for MessagesStickerSetInstallResultBox.

type MessagesStickerSetInstallResultClass

type MessagesStickerSetInstallResultClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesStickerSetInstallResultClass represents messages.StickerSetInstallResult generic type.

See https://core.telegram.org/type/messages.StickerSetInstallResult for reference.

Example:

g, err := DecodeMessagesStickerSetInstallResult(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesStickerSetInstallResultSuccess: // messages.stickerSetInstallResultSuccess#38641628
case *MessagesStickerSetInstallResultArchive: // messages.stickerSetInstallResultArchive#35e410a8
default: panic(v)
}

func DecodeMessagesStickerSetInstallResult

func DecodeMessagesStickerSetInstallResult(buf *bin.Buffer) (MessagesStickerSetInstallResultClass, error)

DecodeMessagesStickerSetInstallResult implements binary de-serialization for MessagesStickerSetInstallResultClass.

type MessagesStickerSetInstallResultSuccess

type MessagesStickerSetInstallResultSuccess struct {
}

MessagesStickerSetInstallResultSuccess represents TL type `messages.stickerSetInstallResultSuccess#38641628`. The stickerset was installed successfully

See https://core.telegram.org/constructor/messages.stickerSetInstallResultSuccess for reference.

func (*MessagesStickerSetInstallResultSuccess) Decode

Decode implements bin.Decoder.

func (*MessagesStickerSetInstallResultSuccess) Encode

Encode implements bin.Encoder.

func (*MessagesStickerSetInstallResultSuccess) String added in v0.12.0

String implements fmt.Stringer.

type MessagesStickers

type MessagesStickers struct {
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// Stickers
	Stickers []DocumentClass
}

MessagesStickers represents TL type `messages.stickers#e4599bbd`. Found stickers

See https://core.telegram.org/constructor/messages.stickers for reference.

func (*MessagesStickers) Decode

func (s *MessagesStickers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesStickers) Encode

func (s *MessagesStickers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesStickers) String added in v0.12.0

func (s *MessagesStickers) String() string

String implements fmt.Stringer.

type MessagesStickersBox

type MessagesStickersBox struct {
	Stickers MessagesStickersClass
}

MessagesStickers boxes the MessagesStickersClass providing a helper.

func (*MessagesStickersBox) Decode

func (b *MessagesStickersBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for MessagesStickersBox.

func (*MessagesStickersBox) Encode

func (b *MessagesStickersBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for MessagesStickersBox.

type MessagesStickersClass

type MessagesStickersClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

MessagesStickersClass represents messages.Stickers generic type.

See https://core.telegram.org/type/messages.Stickers for reference.

Example:

g, err := DecodeMessagesStickers(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *MessagesStickersNotModified: // messages.stickersNotModified#f1749a22
case *MessagesStickers: // messages.stickers#e4599bbd
default: panic(v)
}

func DecodeMessagesStickers

func DecodeMessagesStickers(buf *bin.Buffer) (MessagesStickersClass, error)

DecodeMessagesStickers implements binary de-serialization for MessagesStickersClass.

type MessagesStickersNotModified

type MessagesStickersNotModified struct {
}

MessagesStickersNotModified represents TL type `messages.stickersNotModified#f1749a22`. No new stickers were found for the given query

See https://core.telegram.org/constructor/messages.stickersNotModified for reference.

func (*MessagesStickersNotModified) Decode

Decode implements bin.Decoder.

func (*MessagesStickersNotModified) Encode

Encode implements bin.Encoder.

func (*MessagesStickersNotModified) String added in v0.12.0

func (s *MessagesStickersNotModified) String() string

String implements fmt.Stringer.

type MessagesToggleDialogPinRequest

type MessagesToggleDialogPinRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to pin or unpin the dialog
	Pinned bool
	// The dialog to pin
	Peer InputDialogPeerClass
}

MessagesToggleDialogPinRequest represents TL type `messages.toggleDialogPin#a731e257`. Pin/unpin a dialog

See https://core.telegram.org/method/messages.toggleDialogPin for reference.

func (*MessagesToggleDialogPinRequest) Decode

Decode implements bin.Decoder.

func (*MessagesToggleDialogPinRequest) Encode

Encode implements bin.Encoder.

func (*MessagesToggleDialogPinRequest) SetPinned

func (t *MessagesToggleDialogPinRequest) SetPinned(value bool)

SetPinned sets value of Pinned conditional field.

func (*MessagesToggleDialogPinRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesToggleStickerSetsRequest

type MessagesToggleStickerSetsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Uninstall the specified stickersets
	Uninstall bool
	// Archive the specified stickersets
	Archive bool
	// Unarchive the specified stickersets
	Unarchive bool
	// Stickersets to act upon
	Stickersets []InputStickerSetClass
}

MessagesToggleStickerSetsRequest represents TL type `messages.toggleStickerSets#b5052fea`. Apply changes to multiple stickersets

See https://core.telegram.org/method/messages.toggleStickerSets for reference.

func (*MessagesToggleStickerSetsRequest) Decode

Decode implements bin.Decoder.

func (*MessagesToggleStickerSetsRequest) Encode

Encode implements bin.Encoder.

func (*MessagesToggleStickerSetsRequest) SetArchive

func (t *MessagesToggleStickerSetsRequest) SetArchive(value bool)

SetArchive sets value of Archive conditional field.

func (*MessagesToggleStickerSetsRequest) SetUnarchive

func (t *MessagesToggleStickerSetsRequest) SetUnarchive(value bool)

SetUnarchive sets value of Unarchive conditional field.

func (*MessagesToggleStickerSetsRequest) SetUninstall

func (t *MessagesToggleStickerSetsRequest) SetUninstall(value bool)

SetUninstall sets value of Uninstall conditional field.

func (*MessagesToggleStickerSetsRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesUninstallStickerSetRequest

type MessagesUninstallStickerSetRequest struct {
	// The stickerset to uninstall
	Stickerset InputStickerSetClass
}

MessagesUninstallStickerSetRequest represents TL type `messages.uninstallStickerSet#f96e55de`. Uninstall a stickerset

See https://core.telegram.org/method/messages.uninstallStickerSet for reference.

func (*MessagesUninstallStickerSetRequest) Decode

Decode implements bin.Decoder.

func (*MessagesUninstallStickerSetRequest) Encode

Encode implements bin.Encoder.

func (*MessagesUninstallStickerSetRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesUnpinAllMessagesRequest

type MessagesUnpinAllMessagesRequest struct {
	// Chat where to unpin
	Peer InputPeerClass
}

MessagesUnpinAllMessagesRequest represents TL type `messages.unpinAllMessages#f025bc8b`. Unpin¹ all pinned messages

Links:

  1. https://core.telegram.org/api/pin

See https://core.telegram.org/method/messages.unpinAllMessages for reference.

func (*MessagesUnpinAllMessagesRequest) Decode

Decode implements bin.Decoder.

func (*MessagesUnpinAllMessagesRequest) Encode

Encode implements bin.Encoder.

func (*MessagesUnpinAllMessagesRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesUpdateDialogFilterRequest

type MessagesUpdateDialogFilterRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Folder¹ ID
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	ID int
	// Folder¹ info
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	//
	// Use SetFilter and GetFilter helpers.
	Filter DialogFilter
}

MessagesUpdateDialogFilterRequest represents TL type `messages.updateDialogFilter#1ad4a04a`. Update folder¹

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/method/messages.updateDialogFilter for reference.

func (*MessagesUpdateDialogFilterRequest) Decode

Decode implements bin.Decoder.

func (*MessagesUpdateDialogFilterRequest) Encode

Encode implements bin.Encoder.

func (*MessagesUpdateDialogFilterRequest) GetFilter

func (u *MessagesUpdateDialogFilterRequest) GetFilter() (value DialogFilter, ok bool)

GetFilter returns value of Filter conditional field and boolean which is true if field was set.

func (*MessagesUpdateDialogFilterRequest) SetFilter

func (u *MessagesUpdateDialogFilterRequest) SetFilter(value DialogFilter)

SetFilter sets value of Filter conditional field.

func (*MessagesUpdateDialogFilterRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesUpdateDialogFiltersOrderRequest

type MessagesUpdateDialogFiltersOrderRequest struct {
	// New folder¹ order
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	Order []int
}

MessagesUpdateDialogFiltersOrderRequest represents TL type `messages.updateDialogFiltersOrder#c563c1e4`. Reorder folders¹

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/method/messages.updateDialogFiltersOrder for reference.

func (*MessagesUpdateDialogFiltersOrderRequest) Decode

Decode implements bin.Decoder.

func (*MessagesUpdateDialogFiltersOrderRequest) Encode

Encode implements bin.Encoder.

func (*MessagesUpdateDialogFiltersOrderRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesUpdatePinnedMessageRequest

type MessagesUpdatePinnedMessageRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Pin the message silently, without triggering a notification
	Silent bool
	// Whether the message should unpinned or pinned
	Unpin bool
	// Whether the message should only be pinned on the local side of a one-to-one chat
	PmOneside bool
	// The peer where to pin the message
	Peer InputPeerClass
	// The message to pin or unpin
	ID int
}

MessagesUpdatePinnedMessageRequest represents TL type `messages.updatePinnedMessage#d2aaf7ec`. Pin a message

See https://core.telegram.org/method/messages.updatePinnedMessage for reference.

func (*MessagesUpdatePinnedMessageRequest) Decode

Decode implements bin.Decoder.

func (*MessagesUpdatePinnedMessageRequest) Encode

Encode implements bin.Encoder.

func (*MessagesUpdatePinnedMessageRequest) SetPmOneside

func (u *MessagesUpdatePinnedMessageRequest) SetPmOneside(value bool)

SetPmOneside sets value of PmOneside conditional field.

func (*MessagesUpdatePinnedMessageRequest) SetSilent

func (u *MessagesUpdatePinnedMessageRequest) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*MessagesUpdatePinnedMessageRequest) SetUnpin

func (u *MessagesUpdatePinnedMessageRequest) SetUnpin(value bool)

SetUnpin sets value of Unpin conditional field.

func (*MessagesUpdatePinnedMessageRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesUploadEncryptedFileRequest

type MessagesUploadEncryptedFileRequest struct {
	// The secret chat to associate the file to
	Peer InputEncryptedChat
	// The file
	File InputEncryptedFileClass
}

MessagesUploadEncryptedFileRequest represents TL type `messages.uploadEncryptedFile#5057c497`. Upload encrypted file and associate it to a secret chat

See https://core.telegram.org/method/messages.uploadEncryptedFile for reference.

func (*MessagesUploadEncryptedFileRequest) Decode

Decode implements bin.Decoder.

func (*MessagesUploadEncryptedFileRequest) Encode

Encode implements bin.Encoder.

func (*MessagesUploadEncryptedFileRequest) String added in v0.12.0

String implements fmt.Stringer.

type MessagesUploadMediaRequest

type MessagesUploadMediaRequest struct {
	// The chat, can be an inputPeerEmpty¹ for bots
	//
	// Links:
	//  1) https://core.telegram.org/constructor/inputPeerEmpty
	Peer InputPeerClass
	// File uploaded in chunks as described in files »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/files
	Media InputMediaClass
}

MessagesUploadMediaRequest represents TL type `messages.uploadMedia#519bc2b1`. Upload a file and associate it to a chat (without actually sending it to the chat)

See https://core.telegram.org/method/messages.uploadMedia for reference.

func (*MessagesUploadMediaRequest) Decode

Decode implements bin.Decoder.

func (*MessagesUploadMediaRequest) Encode

Encode implements bin.Encoder.

func (*MessagesUploadMediaRequest) String added in v0.12.0

func (u *MessagesUploadMediaRequest) String() string

String implements fmt.Stringer.

type MessagesVotesList

type MessagesVotesList struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Total number of votes for all options (or only for the chosen option, if provided to messages.getPollVotes¹)
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.getPollVotes
	Count int
	// Vote info for each user
	Votes []MessageUserVoteClass
	// Info about users that voted in the poll
	Users []UserClass
	// Offset to use with the next messages.getPollVotes¹ request, empty string if no more results are available.
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.getPollVotes
	//
	// Use SetNextOffset and GetNextOffset helpers.
	NextOffset string
}

MessagesVotesList represents TL type `messages.votesList#823f649`. How users voted in a poll

See https://core.telegram.org/constructor/messages.votesList for reference.

func (*MessagesVotesList) Decode

func (v *MessagesVotesList) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*MessagesVotesList) Encode

func (v *MessagesVotesList) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*MessagesVotesList) GetNextOffset

func (v *MessagesVotesList) GetNextOffset() (value string, ok bool)

GetNextOffset returns value of NextOffset conditional field and boolean which is true if field was set.

func (*MessagesVotesList) SetNextOffset

func (v *MessagesVotesList) SetNextOffset(value string)

SetNextOffset sets value of NextOffset conditional field.

func (*MessagesVotesList) String added in v0.12.0

func (v *MessagesVotesList) String() string

String implements fmt.Stringer.

type NearestDc

type NearestDc struct {
	// Country code determined by geo-ip
	Country string
	// Number of current data centre
	ThisDC int
	// Number of nearest data centre
	NearestDC int
}

NearestDc represents TL type `nearestDc#8e1a1775`. Nearest data centre, according to geo-ip.

See https://core.telegram.org/constructor/nearestDc for reference.

func (*NearestDc) Decode

func (n *NearestDc) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*NearestDc) Encode

func (n *NearestDc) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*NearestDc) String added in v0.12.0

func (n *NearestDc) String() string

String implements fmt.Stringer.

type NewChannelMessageHandler added in v0.9.0

type NewChannelMessageHandler func(ctx UpdateContext, update *UpdateNewChannelMessage) error

NewChannelMessageHandler is a NewChannelMessage event handler.

type NewEncryptedMessageHandler added in v0.9.0

type NewEncryptedMessageHandler func(ctx UpdateContext, update *UpdateNewEncryptedMessage) error

NewEncryptedMessageHandler is a NewEncryptedMessage event handler.

type NewMessageHandler added in v0.9.0

type NewMessageHandler func(ctx UpdateContext, update *UpdateNewMessage) error

NewMessageHandler is a NewMessage event handler.

type NewScheduledMessageHandler added in v0.9.0

type NewScheduledMessageHandler func(ctx UpdateContext, update *UpdateNewScheduledMessage) error

NewScheduledMessageHandler is a NewScheduledMessage event handler.

type NewStickerSetHandler added in v0.9.0

type NewStickerSetHandler func(ctx UpdateContext, update *UpdateNewStickerSet) error

NewStickerSetHandler is a NewStickerSet event handler.

type NotifyBroadcasts

type NotifyBroadcasts struct {
}

NotifyBroadcasts represents TL type `notifyBroadcasts#d612e8ef`. Channel notification settings

See https://core.telegram.org/constructor/notifyBroadcasts for reference.

func (*NotifyBroadcasts) Decode

func (n *NotifyBroadcasts) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*NotifyBroadcasts) Encode

func (n *NotifyBroadcasts) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*NotifyBroadcasts) String added in v0.12.0

func (n *NotifyBroadcasts) String() string

String implements fmt.Stringer.

type NotifyChats

type NotifyChats struct {
}

NotifyChats represents TL type `notifyChats#c007cec3`. Notifications generated by all groups.

See https://core.telegram.org/constructor/notifyChats for reference.

func (*NotifyChats) Decode

func (n *NotifyChats) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*NotifyChats) Encode

func (n *NotifyChats) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*NotifyChats) String added in v0.12.0

func (n *NotifyChats) String() string

String implements fmt.Stringer.

type NotifyPeer

type NotifyPeer struct {
	// user or group
	Peer PeerClass
}

NotifyPeer represents TL type `notifyPeer#9fd40bd8`. Notifications generated by a certain user or group.

See https://core.telegram.org/constructor/notifyPeer for reference.

func (*NotifyPeer) Decode

func (n *NotifyPeer) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*NotifyPeer) Encode

func (n *NotifyPeer) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*NotifyPeer) String added in v0.12.0

func (n *NotifyPeer) String() string

String implements fmt.Stringer.

type NotifyPeerBox

type NotifyPeerBox struct {
	NotifyPeer NotifyPeerClass
}

NotifyPeer boxes the NotifyPeerClass providing a helper.

func (*NotifyPeerBox) Decode

func (b *NotifyPeerBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for NotifyPeerBox.

func (*NotifyPeerBox) Encode

func (b *NotifyPeerBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for NotifyPeerBox.

type NotifyPeerClass

type NotifyPeerClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

NotifyPeerClass represents NotifyPeer generic type.

See https://core.telegram.org/type/NotifyPeer for reference.

Example:

g, err := DecodeNotifyPeer(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *NotifyPeer: // notifyPeer#9fd40bd8
case *NotifyUsers: // notifyUsers#b4c83b4c
case *NotifyChats: // notifyChats#c007cec3
case *NotifyBroadcasts: // notifyBroadcasts#d612e8ef
default: panic(v)
}

func DecodeNotifyPeer

func DecodeNotifyPeer(buf *bin.Buffer) (NotifyPeerClass, error)

DecodeNotifyPeer implements binary de-serialization for NotifyPeerClass.

type NotifySettingsHandler added in v0.9.0

type NotifySettingsHandler func(ctx UpdateContext, update *UpdateNotifySettings) error

NotifySettingsHandler is a NotifySettings event handler.

type NotifyUsers

type NotifyUsers struct {
}

NotifyUsers represents TL type `notifyUsers#b4c83b4c`. Notifications generated by all users.

See https://core.telegram.org/constructor/notifyUsers for reference.

func (*NotifyUsers) Decode

func (n *NotifyUsers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*NotifyUsers) Encode

func (n *NotifyUsers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*NotifyUsers) String added in v0.12.0

func (n *NotifyUsers) String() string

String implements fmt.Stringer.

type Null

type Null struct {
}

Null represents TL type `null#56730bcc`. Corresponds to an arbitrary empty object.

See https://core.telegram.org/constructor/null for reference.

func (*Null) Decode

func (n *Null) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Null) Encode

func (n *Null) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Null) String added in v0.12.0

func (n *Null) String() string

String implements fmt.Stringer.

type Page

type Page struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Indicates that not full page preview is available to the client and it will need to fetch full Instant View from the server using messages.getWebPagePreview¹.
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.getWebPagePreview
	Part bool
	// Whether the page contains RTL text
	Rtl bool
	// Whether this is an IV v2¹ page
	//
	// Links:
	//  1) https://instantview.telegram.org/docs#what-39s-new-in-2-0
	V2 bool
	// Original page HTTP URL
	URL string
	// Page elements (like with HTML elements, only as TL constructors)
	Blocks []PageBlockClass
	// Photos in page
	Photos []PhotoClass
	// Media in page
	Documents []DocumentClass
	// Viewcount
	//
	// Use SetViews and GetViews helpers.
	Views int
}

Page represents TL type `page#98657f0d`. Instant view¹ page

Links:

  1. https://instantview.telegram.org

See https://core.telegram.org/constructor/page for reference.

func (*Page) Decode

func (p *Page) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Page) Encode

func (p *Page) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Page) GetViews

func (p *Page) GetViews() (value int, ok bool)

GetViews returns value of Views conditional field and boolean which is true if field was set.

func (*Page) SetPart

func (p *Page) SetPart(value bool)

SetPart sets value of Part conditional field.

func (*Page) SetRtl

func (p *Page) SetRtl(value bool)

SetRtl sets value of Rtl conditional field.

func (*Page) SetV2

func (p *Page) SetV2(value bool)

SetV2 sets value of V2 conditional field.

func (*Page) SetViews

func (p *Page) SetViews(value int)

SetViews sets value of Views conditional field.

func (*Page) String added in v0.12.0

func (p *Page) String() string

String implements fmt.Stringer.

type PageBlockAnchor

type PageBlockAnchor struct {
	// Name of target section
	Name string
}

PageBlockAnchor represents TL type `pageBlockAnchor#ce0d37b0`. Link to section within the page itself (like <a href="#target">anchor</a>)

See https://core.telegram.org/constructor/pageBlockAnchor for reference.

func (*PageBlockAnchor) Decode

func (p *PageBlockAnchor) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockAnchor) Encode

func (p *PageBlockAnchor) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockAnchor) String added in v0.12.0

func (p *PageBlockAnchor) String() string

String implements fmt.Stringer.

type PageBlockAudio

type PageBlockAudio struct {
	// Audio ID (to be fetched from the container page¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/constructor/page
	AudioID int64
	// Audio caption
	Caption PageCaption
}

PageBlockAudio represents TL type `pageBlockAudio#804361ea`. Audio

See https://core.telegram.org/constructor/pageBlockAudio for reference.

func (*PageBlockAudio) Decode

func (p *PageBlockAudio) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockAudio) Encode

func (p *PageBlockAudio) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockAudio) String added in v0.12.0

func (p *PageBlockAudio) String() string

String implements fmt.Stringer.

type PageBlockAuthorDate

type PageBlockAuthorDate struct {
	// Author name
	Author RichTextClass
	// Date of pubblication
	PublishedDate int
}

PageBlockAuthorDate represents TL type `pageBlockAuthorDate#baafe5e0`. Author and date of creation of article

See https://core.telegram.org/constructor/pageBlockAuthorDate for reference.

func (*PageBlockAuthorDate) Decode

func (p *PageBlockAuthorDate) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockAuthorDate) Encode

func (p *PageBlockAuthorDate) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockAuthorDate) String added in v0.12.0

func (p *PageBlockAuthorDate) String() string

String implements fmt.Stringer.

type PageBlockBlockquote

type PageBlockBlockquote struct {
	// Quote contents
	Text RichTextClass
	// Caption
	Caption RichTextClass
}

PageBlockBlockquote represents TL type `pageBlockBlockquote#263d7c26`. Quote (equivalent to the HTML <blockquote>)

See https://core.telegram.org/constructor/pageBlockBlockquote for reference.

func (*PageBlockBlockquote) Decode

func (p *PageBlockBlockquote) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockBlockquote) Encode

func (p *PageBlockBlockquote) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockBlockquote) String added in v0.12.0

func (p *PageBlockBlockquote) String() string

String implements fmt.Stringer.

type PageBlockBox

type PageBlockBox struct {
	PageBlock PageBlockClass
}

PageBlock boxes the PageBlockClass providing a helper.

func (*PageBlockBox) Decode

func (b *PageBlockBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PageBlockBox.

func (*PageBlockBox) Encode

func (b *PageBlockBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PageBlockBox.

type PageBlockChannel

type PageBlockChannel struct {
	// The channel/supergroup/chat
	Channel ChatClass
}

PageBlockChannel represents TL type `pageBlockChannel#ef1751b5`. Reference to a telegram channel

See https://core.telegram.org/constructor/pageBlockChannel for reference.

func (*PageBlockChannel) Decode

func (p *PageBlockChannel) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockChannel) Encode

func (p *PageBlockChannel) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockChannel) String added in v0.12.0

func (p *PageBlockChannel) String() string

String implements fmt.Stringer.

type PageBlockClass

type PageBlockClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PageBlockClass represents PageBlock generic type.

See https://core.telegram.org/type/PageBlock for reference.

Example:

g, err := DecodePageBlock(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PageBlockUnsupported: // pageBlockUnsupported#13567e8a
case *PageBlockTitle: // pageBlockTitle#70abc3fd
case *PageBlockSubtitle: // pageBlockSubtitle#8ffa9a1f
case *PageBlockAuthorDate: // pageBlockAuthorDate#baafe5e0
case *PageBlockHeader: // pageBlockHeader#bfd064ec
case *PageBlockSubheader: // pageBlockSubheader#f12bb6e1
case *PageBlockParagraph: // pageBlockParagraph#467a0766
case *PageBlockPreformatted: // pageBlockPreformatted#c070d93e
case *PageBlockFooter: // pageBlockFooter#48870999
case *PageBlockDivider: // pageBlockDivider#db20b188
case *PageBlockAnchor: // pageBlockAnchor#ce0d37b0
case *PageBlockList: // pageBlockList#e4e88011
case *PageBlockBlockquote: // pageBlockBlockquote#263d7c26
case *PageBlockPullquote: // pageBlockPullquote#4f4456d3
case *PageBlockPhoto: // pageBlockPhoto#1759c560
case *PageBlockVideo: // pageBlockVideo#7c8fe7b6
case *PageBlockCover: // pageBlockCover#39f23300
case *PageBlockEmbed: // pageBlockEmbed#a8718dc5
case *PageBlockEmbedPost: // pageBlockEmbedPost#f259a80b
case *PageBlockCollage: // pageBlockCollage#65a0fa4d
case *PageBlockSlideshow: // pageBlockSlideshow#31f9590
case *PageBlockChannel: // pageBlockChannel#ef1751b5
case *PageBlockAudio: // pageBlockAudio#804361ea
case *PageBlockKicker: // pageBlockKicker#1e148390
case *PageBlockTable: // pageBlockTable#bf4dea82
case *PageBlockOrderedList: // pageBlockOrderedList#9a8ae1e1
case *PageBlockDetails: // pageBlockDetails#76768bed
case *PageBlockRelatedArticles: // pageBlockRelatedArticles#16115a96
case *PageBlockMap: // pageBlockMap#a44f3ef6
default: panic(v)
}

func DecodePageBlock

func DecodePageBlock(buf *bin.Buffer) (PageBlockClass, error)

DecodePageBlock implements binary de-serialization for PageBlockClass.

type PageBlockCollage

type PageBlockCollage struct {
	// Media elements
	Items []PageBlockClass
	// Caption
	Caption PageCaption
}

PageBlockCollage represents TL type `pageBlockCollage#65a0fa4d`. Collage of media

See https://core.telegram.org/constructor/pageBlockCollage for reference.

func (*PageBlockCollage) Decode

func (p *PageBlockCollage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockCollage) Encode

func (p *PageBlockCollage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockCollage) String added in v0.12.0

func (p *PageBlockCollage) String() string

String implements fmt.Stringer.

type PageBlockCover

type PageBlockCover struct {
	// Cover
	Cover PageBlockClass
}

PageBlockCover represents TL type `pageBlockCover#39f23300`. A page cover

See https://core.telegram.org/constructor/pageBlockCover for reference.

func (*PageBlockCover) Decode

func (p *PageBlockCover) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockCover) Encode

func (p *PageBlockCover) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockCover) String added in v0.12.0

func (p *PageBlockCover) String() string

String implements fmt.Stringer.

type PageBlockDetails

type PageBlockDetails struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the block is open by default
	Open bool
	// Block contents
	Blocks []PageBlockClass
	// Always visible heading for the block
	Title RichTextClass
}

PageBlockDetails represents TL type `pageBlockDetails#76768bed`. A collapsible details block

See https://core.telegram.org/constructor/pageBlockDetails for reference.

func (*PageBlockDetails) Decode

func (p *PageBlockDetails) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockDetails) Encode

func (p *PageBlockDetails) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockDetails) SetOpen

func (p *PageBlockDetails) SetOpen(value bool)

SetOpen sets value of Open conditional field.

func (*PageBlockDetails) String added in v0.12.0

func (p *PageBlockDetails) String() string

String implements fmt.Stringer.

type PageBlockDivider

type PageBlockDivider struct {
}

PageBlockDivider represents TL type `pageBlockDivider#db20b188`. An empty block separating a page

See https://core.telegram.org/constructor/pageBlockDivider for reference.

func (*PageBlockDivider) Decode

func (p *PageBlockDivider) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockDivider) Encode

func (p *PageBlockDivider) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockDivider) String added in v0.12.0

func (p *PageBlockDivider) String() string

String implements fmt.Stringer.

type PageBlockEmbed

type PageBlockEmbed struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the block should be full width
	FullWidth bool
	// Whether scrolling should be allowed
	AllowScrolling bool
	// Web page URL, if available
	//
	// Use SetURL and GetURL helpers.
	URL string
	// HTML-markup of the embedded page
	//
	// Use SetHTML and GetHTML helpers.
	HTML string
	// Poster photo, if available
	//
	// Use SetPosterPhotoID and GetPosterPhotoID helpers.
	PosterPhotoID int64
	// Block width, if known
	//
	// Use SetW and GetW helpers.
	W int
	// Block height, if known
	//
	// Use SetH and GetH helpers.
	H int
	// Caption
	Caption PageCaption
}

PageBlockEmbed represents TL type `pageBlockEmbed#a8718dc5`. An embedded webpage

See https://core.telegram.org/constructor/pageBlockEmbed for reference.

func (*PageBlockEmbed) Decode

func (p *PageBlockEmbed) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockEmbed) Encode

func (p *PageBlockEmbed) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockEmbed) GetH

func (p *PageBlockEmbed) GetH() (value int, ok bool)

GetH returns value of H conditional field and boolean which is true if field was set.

func (*PageBlockEmbed) GetHTML

func (p *PageBlockEmbed) GetHTML() (value string, ok bool)

GetHTML returns value of HTML conditional field and boolean which is true if field was set.

func (*PageBlockEmbed) GetPosterPhotoID

func (p *PageBlockEmbed) GetPosterPhotoID() (value int64, ok bool)

GetPosterPhotoID returns value of PosterPhotoID conditional field and boolean which is true if field was set.

func (*PageBlockEmbed) GetURL

func (p *PageBlockEmbed) GetURL() (value string, ok bool)

GetURL returns value of URL conditional field and boolean which is true if field was set.

func (*PageBlockEmbed) GetW

func (p *PageBlockEmbed) GetW() (value int, ok bool)

GetW returns value of W conditional field and boolean which is true if field was set.

func (*PageBlockEmbed) SetAllowScrolling

func (p *PageBlockEmbed) SetAllowScrolling(value bool)

SetAllowScrolling sets value of AllowScrolling conditional field.

func (*PageBlockEmbed) SetFullWidth

func (p *PageBlockEmbed) SetFullWidth(value bool)

SetFullWidth sets value of FullWidth conditional field.

func (*PageBlockEmbed) SetH

func (p *PageBlockEmbed) SetH(value int)

SetH sets value of H conditional field.

func (*PageBlockEmbed) SetHTML

func (p *PageBlockEmbed) SetHTML(value string)

SetHTML sets value of HTML conditional field.

func (*PageBlockEmbed) SetPosterPhotoID

func (p *PageBlockEmbed) SetPosterPhotoID(value int64)

SetPosterPhotoID sets value of PosterPhotoID conditional field.

func (*PageBlockEmbed) SetURL

func (p *PageBlockEmbed) SetURL(value string)

SetURL sets value of URL conditional field.

func (*PageBlockEmbed) SetW

func (p *PageBlockEmbed) SetW(value int)

SetW sets value of W conditional field.

func (*PageBlockEmbed) String added in v0.12.0

func (p *PageBlockEmbed) String() string

String implements fmt.Stringer.

type PageBlockEmbedPost

type PageBlockEmbedPost struct {
	// Web page URL
	URL string
	// ID of generated webpage preview
	WebpageID int64
	// ID of the author's photo
	AuthorPhotoID int64
	// Author name
	Author string
	// Creation date
	Date int
	// Post contents
	Blocks []PageBlockClass
	// Caption
	Caption PageCaption
}

PageBlockEmbedPost represents TL type `pageBlockEmbedPost#f259a80b`. An embedded post

See https://core.telegram.org/constructor/pageBlockEmbedPost for reference.

func (*PageBlockEmbedPost) Decode

func (p *PageBlockEmbedPost) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockEmbedPost) Encode

func (p *PageBlockEmbedPost) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockEmbedPost) String added in v0.12.0

func (p *PageBlockEmbedPost) String() string

String implements fmt.Stringer.

type PageBlockFooter

type PageBlockFooter struct {
	// Contents
	Text RichTextClass
}

PageBlockFooter represents TL type `pageBlockFooter#48870999`. Page footer

See https://core.telegram.org/constructor/pageBlockFooter for reference.

func (*PageBlockFooter) Decode

func (p *PageBlockFooter) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockFooter) Encode

func (p *PageBlockFooter) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockFooter) String added in v0.12.0

func (p *PageBlockFooter) String() string

String implements fmt.Stringer.

type PageBlockHeader

type PageBlockHeader struct {
	// Contents
	Text RichTextClass
}

PageBlockHeader represents TL type `pageBlockHeader#bfd064ec`. Page header

See https://core.telegram.org/constructor/pageBlockHeader for reference.

func (*PageBlockHeader) Decode

func (p *PageBlockHeader) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockHeader) Encode

func (p *PageBlockHeader) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockHeader) String added in v0.12.0

func (p *PageBlockHeader) String() string

String implements fmt.Stringer.

type PageBlockKicker

type PageBlockKicker struct {
	// Contents
	Text RichTextClass
}

PageBlockKicker represents TL type `pageBlockKicker#1e148390`. Kicker

See https://core.telegram.org/constructor/pageBlockKicker for reference.

func (*PageBlockKicker) Decode

func (p *PageBlockKicker) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockKicker) Encode

func (p *PageBlockKicker) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockKicker) String added in v0.12.0

func (p *PageBlockKicker) String() string

String implements fmt.Stringer.

type PageBlockList

type PageBlockList struct {
	// List of blocks in an IV page
	Items []PageListItemClass
}

PageBlockList represents TL type `pageBlockList#e4e88011`. Unordered list of IV blocks

See https://core.telegram.org/constructor/pageBlockList for reference.

func (*PageBlockList) Decode

func (p *PageBlockList) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockList) Encode

func (p *PageBlockList) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockList) String added in v0.12.0

func (p *PageBlockList) String() string

String implements fmt.Stringer.

type PageBlockMap

type PageBlockMap struct {
	// Location of the map center
	Geo GeoPointClass
	// Map zoom level; 13-20
	Zoom int
	// Map width in pixels before applying scale; 16-102
	W int
	// Map height in pixels before applying scale; 16-1024
	H int
	// Caption
	Caption PageCaption
}

PageBlockMap represents TL type `pageBlockMap#a44f3ef6`. A map

See https://core.telegram.org/constructor/pageBlockMap for reference.

func (*PageBlockMap) Decode

func (p *PageBlockMap) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockMap) Encode

func (p *PageBlockMap) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockMap) String added in v0.12.0

func (p *PageBlockMap) String() string

String implements fmt.Stringer.

type PageBlockOrderedList

type PageBlockOrderedList struct {
	// List items
	Items []PageListOrderedItemClass
}

PageBlockOrderedList represents TL type `pageBlockOrderedList#9a8ae1e1`. Ordered list of IV blocks

See https://core.telegram.org/constructor/pageBlockOrderedList for reference.

func (*PageBlockOrderedList) Decode

func (p *PageBlockOrderedList) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockOrderedList) Encode

func (p *PageBlockOrderedList) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockOrderedList) String added in v0.12.0

func (p *PageBlockOrderedList) String() string

String implements fmt.Stringer.

type PageBlockParagraph

type PageBlockParagraph struct {
	// Text
	Text RichTextClass
}

PageBlockParagraph represents TL type `pageBlockParagraph#467a0766`. A paragraph

See https://core.telegram.org/constructor/pageBlockParagraph for reference.

func (*PageBlockParagraph) Decode

func (p *PageBlockParagraph) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockParagraph) Encode

func (p *PageBlockParagraph) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockParagraph) String added in v0.12.0

func (p *PageBlockParagraph) String() string

String implements fmt.Stringer.

type PageBlockPhoto

type PageBlockPhoto struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Photo ID
	PhotoID int64
	// Caption
	Caption PageCaption
	// HTTP URL of page the photo leads to when clicked
	//
	// Use SetURL and GetURL helpers.
	URL string
	// ID of preview of the page the photo leads to when clicked
	//
	// Use SetWebpageID and GetWebpageID helpers.
	WebpageID int64
}

PageBlockPhoto represents TL type `pageBlockPhoto#1759c560`. A photo

See https://core.telegram.org/constructor/pageBlockPhoto for reference.

func (*PageBlockPhoto) Decode

func (p *PageBlockPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockPhoto) Encode

func (p *PageBlockPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockPhoto) GetURL

func (p *PageBlockPhoto) GetURL() (value string, ok bool)

GetURL returns value of URL conditional field and boolean which is true if field was set.

func (*PageBlockPhoto) GetWebpageID

func (p *PageBlockPhoto) GetWebpageID() (value int64, ok bool)

GetWebpageID returns value of WebpageID conditional field and boolean which is true if field was set.

func (*PageBlockPhoto) SetURL

func (p *PageBlockPhoto) SetURL(value string)

SetURL sets value of URL conditional field.

func (*PageBlockPhoto) SetWebpageID

func (p *PageBlockPhoto) SetWebpageID(value int64)

SetWebpageID sets value of WebpageID conditional field.

func (*PageBlockPhoto) String added in v0.12.0

func (p *PageBlockPhoto) String() string

String implements fmt.Stringer.

type PageBlockPreformatted

type PageBlockPreformatted struct {
	// Text
	Text RichTextClass
	// Programming language of preformatted text
	Language string
}

PageBlockPreformatted represents TL type `pageBlockPreformatted#c070d93e`. Preformatted (<pre> text)

See https://core.telegram.org/constructor/pageBlockPreformatted for reference.

func (*PageBlockPreformatted) Decode

func (p *PageBlockPreformatted) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockPreformatted) Encode

func (p *PageBlockPreformatted) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockPreformatted) String added in v0.12.0

func (p *PageBlockPreformatted) String() string

String implements fmt.Stringer.

type PageBlockPullquote

type PageBlockPullquote struct {
	// Text
	Text RichTextClass
	// Caption
	Caption RichTextClass
}

PageBlockPullquote represents TL type `pageBlockPullquote#4f4456d3`. Pullquote

See https://core.telegram.org/constructor/pageBlockPullquote for reference.

func (*PageBlockPullquote) Decode

func (p *PageBlockPullquote) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockPullquote) Encode

func (p *PageBlockPullquote) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockPullquote) String added in v0.12.0

func (p *PageBlockPullquote) String() string

String implements fmt.Stringer.

type PageBlockRelatedArticles

type PageBlockRelatedArticles struct {
	// Title
	Title RichTextClass
	// Related articles
	Articles []PageRelatedArticle
}

PageBlockRelatedArticles represents TL type `pageBlockRelatedArticles#16115a96`. Related articles

See https://core.telegram.org/constructor/pageBlockRelatedArticles for reference.

func (*PageBlockRelatedArticles) Decode

func (p *PageBlockRelatedArticles) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockRelatedArticles) Encode

func (p *PageBlockRelatedArticles) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockRelatedArticles) String added in v0.12.0

func (p *PageBlockRelatedArticles) String() string

String implements fmt.Stringer.

type PageBlockSlideshow

type PageBlockSlideshow struct {
	// Slideshow items
	Items []PageBlockClass
	// Caption
	Caption PageCaption
}

PageBlockSlideshow represents TL type `pageBlockSlideshow#31f9590`. Slideshow

See https://core.telegram.org/constructor/pageBlockSlideshow for reference.

func (*PageBlockSlideshow) Decode

func (p *PageBlockSlideshow) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockSlideshow) Encode

func (p *PageBlockSlideshow) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockSlideshow) String added in v0.12.0

func (p *PageBlockSlideshow) String() string

String implements fmt.Stringer.

type PageBlockSubheader

type PageBlockSubheader struct {
	// Subheader
	Text RichTextClass
}

PageBlockSubheader represents TL type `pageBlockSubheader#f12bb6e1`. Subheader

See https://core.telegram.org/constructor/pageBlockSubheader for reference.

func (*PageBlockSubheader) Decode

func (p *PageBlockSubheader) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockSubheader) Encode

func (p *PageBlockSubheader) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockSubheader) String added in v0.12.0

func (p *PageBlockSubheader) String() string

String implements fmt.Stringer.

type PageBlockSubtitle

type PageBlockSubtitle struct {
	// Text
	Text RichTextClass
}

PageBlockSubtitle represents TL type `pageBlockSubtitle#8ffa9a1f`. Subtitle

See https://core.telegram.org/constructor/pageBlockSubtitle for reference.

func (*PageBlockSubtitle) Decode

func (p *PageBlockSubtitle) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockSubtitle) Encode

func (p *PageBlockSubtitle) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockSubtitle) String added in v0.12.0

func (p *PageBlockSubtitle) String() string

String implements fmt.Stringer.

type PageBlockTable

type PageBlockTable struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Does the table have a visible border?
	Bordered bool
	// Is the table striped?
	Striped bool
	// Title
	Title RichTextClass
	// Table rows
	Rows []PageTableRow
}

PageBlockTable represents TL type `pageBlockTable#bf4dea82`. Table

See https://core.telegram.org/constructor/pageBlockTable for reference.

func (*PageBlockTable) Decode

func (p *PageBlockTable) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockTable) Encode

func (p *PageBlockTable) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockTable) SetBordered

func (p *PageBlockTable) SetBordered(value bool)

SetBordered sets value of Bordered conditional field.

func (*PageBlockTable) SetStriped

func (p *PageBlockTable) SetStriped(value bool)

SetStriped sets value of Striped conditional field.

func (*PageBlockTable) String added in v0.12.0

func (p *PageBlockTable) String() string

String implements fmt.Stringer.

type PageBlockTitle

type PageBlockTitle struct {
	// Title
	Text RichTextClass
}

PageBlockTitle represents TL type `pageBlockTitle#70abc3fd`. Title

See https://core.telegram.org/constructor/pageBlockTitle for reference.

func (*PageBlockTitle) Decode

func (p *PageBlockTitle) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockTitle) Encode

func (p *PageBlockTitle) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockTitle) String added in v0.12.0

func (p *PageBlockTitle) String() string

String implements fmt.Stringer.

type PageBlockUnsupported

type PageBlockUnsupported struct {
}

PageBlockUnsupported represents TL type `pageBlockUnsupported#13567e8a`. Unsupported IV element

See https://core.telegram.org/constructor/pageBlockUnsupported for reference.

func (*PageBlockUnsupported) Decode

func (p *PageBlockUnsupported) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockUnsupported) Encode

func (p *PageBlockUnsupported) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockUnsupported) String added in v0.12.0

func (p *PageBlockUnsupported) String() string

String implements fmt.Stringer.

type PageBlockVideo

type PageBlockVideo struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the video is set to autoplay
	Autoplay bool
	// Whether the video is set to loop
	Loop bool
	// Video ID
	VideoID int64
	// Caption
	Caption PageCaption
}

PageBlockVideo represents TL type `pageBlockVideo#7c8fe7b6`. Video

See https://core.telegram.org/constructor/pageBlockVideo for reference.

func (*PageBlockVideo) Decode

func (p *PageBlockVideo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageBlockVideo) Encode

func (p *PageBlockVideo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageBlockVideo) SetAutoplay

func (p *PageBlockVideo) SetAutoplay(value bool)

SetAutoplay sets value of Autoplay conditional field.

func (*PageBlockVideo) SetLoop

func (p *PageBlockVideo) SetLoop(value bool)

SetLoop sets value of Loop conditional field.

func (*PageBlockVideo) String added in v0.12.0

func (p *PageBlockVideo) String() string

String implements fmt.Stringer.

type PageCaption

type PageCaption struct {
	// Caption
	Text RichTextClass
	// Credits
	Credit RichTextClass
}

PageCaption represents TL type `pageCaption#6f747657`. Page caption

See https://core.telegram.org/constructor/pageCaption for reference.

func (*PageCaption) Decode

func (p *PageCaption) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageCaption) Encode

func (p *PageCaption) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageCaption) String added in v0.12.0

func (p *PageCaption) String() string

String implements fmt.Stringer.

type PageListItemBlocks

type PageListItemBlocks struct {
	// Blocks
	Blocks []PageBlockClass
}

PageListItemBlocks represents TL type `pageListItemBlocks#25e073fc`. List item

See https://core.telegram.org/constructor/pageListItemBlocks for reference.

func (*PageListItemBlocks) Decode

func (p *PageListItemBlocks) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageListItemBlocks) Encode

func (p *PageListItemBlocks) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageListItemBlocks) String added in v0.12.0

func (p *PageListItemBlocks) String() string

String implements fmt.Stringer.

type PageListItemBox

type PageListItemBox struct {
	PageListItem PageListItemClass
}

PageListItem boxes the PageListItemClass providing a helper.

func (*PageListItemBox) Decode

func (b *PageListItemBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PageListItemBox.

func (*PageListItemBox) Encode

func (b *PageListItemBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PageListItemBox.

type PageListItemClass

type PageListItemClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PageListItemClass represents PageListItem generic type.

See https://core.telegram.org/type/PageListItem for reference.

Example:

g, err := DecodePageListItem(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PageListItemText: // pageListItemText#b92fb6cd
case *PageListItemBlocks: // pageListItemBlocks#25e073fc
default: panic(v)
}

func DecodePageListItem

func DecodePageListItem(buf *bin.Buffer) (PageListItemClass, error)

DecodePageListItem implements binary de-serialization for PageListItemClass.

type PageListItemText

type PageListItemText struct {
	// Text
	Text RichTextClass
}

PageListItemText represents TL type `pageListItemText#b92fb6cd`. List item

See https://core.telegram.org/constructor/pageListItemText for reference.

func (*PageListItemText) Decode

func (p *PageListItemText) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageListItemText) Encode

func (p *PageListItemText) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageListItemText) String added in v0.12.0

func (p *PageListItemText) String() string

String implements fmt.Stringer.

type PageListOrderedItemBlocks

type PageListOrderedItemBlocks struct {
	// Number of element within ordered list
	Num string
	// Item contents
	Blocks []PageBlockClass
}

PageListOrderedItemBlocks represents TL type `pageListOrderedItemBlocks#98dd8936`. Ordered list of IV¹ blocks

Links:

  1. https://instantview.telegram.org

See https://core.telegram.org/constructor/pageListOrderedItemBlocks for reference.

func (*PageListOrderedItemBlocks) Decode

func (p *PageListOrderedItemBlocks) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageListOrderedItemBlocks) Encode

func (p *PageListOrderedItemBlocks) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageListOrderedItemBlocks) String added in v0.12.0

func (p *PageListOrderedItemBlocks) String() string

String implements fmt.Stringer.

type PageListOrderedItemBox

type PageListOrderedItemBox struct {
	PageListOrderedItem PageListOrderedItemClass
}

PageListOrderedItem boxes the PageListOrderedItemClass providing a helper.

func (*PageListOrderedItemBox) Decode

func (b *PageListOrderedItemBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PageListOrderedItemBox.

func (*PageListOrderedItemBox) Encode

func (b *PageListOrderedItemBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PageListOrderedItemBox.

type PageListOrderedItemClass

type PageListOrderedItemClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PageListOrderedItemClass represents PageListOrderedItem generic type.

See https://core.telegram.org/type/PageListOrderedItem for reference.

Example:

g, err := DecodePageListOrderedItem(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PageListOrderedItemText: // pageListOrderedItemText#5e068047
case *PageListOrderedItemBlocks: // pageListOrderedItemBlocks#98dd8936
default: panic(v)
}

func DecodePageListOrderedItem

func DecodePageListOrderedItem(buf *bin.Buffer) (PageListOrderedItemClass, error)

DecodePageListOrderedItem implements binary de-serialization for PageListOrderedItemClass.

type PageListOrderedItemText

type PageListOrderedItemText struct {
	// Number of element within ordered list
	Num string
	// Text
	Text RichTextClass
}

PageListOrderedItemText represents TL type `pageListOrderedItemText#5e068047`. Ordered list of text items

See https://core.telegram.org/constructor/pageListOrderedItemText for reference.

func (*PageListOrderedItemText) Decode

func (p *PageListOrderedItemText) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageListOrderedItemText) Encode

func (p *PageListOrderedItemText) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageListOrderedItemText) String added in v0.12.0

func (p *PageListOrderedItemText) String() string

String implements fmt.Stringer.

type PageRelatedArticle

type PageRelatedArticle struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// URL of article
	URL string
	// Webpage ID of generated IV preview
	WebpageID int64
	// Title
	//
	// Use SetTitle and GetTitle helpers.
	Title string
	// Description
	//
	// Use SetDescription and GetDescription helpers.
	Description string
	// ID of preview photo
	//
	// Use SetPhotoID and GetPhotoID helpers.
	PhotoID int64
	// Author name
	//
	// Use SetAuthor and GetAuthor helpers.
	Author string
	// Date of pubblication
	//
	// Use SetPublishedDate and GetPublishedDate helpers.
	PublishedDate int
}

PageRelatedArticle represents TL type `pageRelatedArticle#b390dc08`. Related article

See https://core.telegram.org/constructor/pageRelatedArticle for reference.

func (*PageRelatedArticle) Decode

func (p *PageRelatedArticle) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageRelatedArticle) Encode

func (p *PageRelatedArticle) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageRelatedArticle) GetAuthor

func (p *PageRelatedArticle) GetAuthor() (value string, ok bool)

GetAuthor returns value of Author conditional field and boolean which is true if field was set.

func (*PageRelatedArticle) GetDescription

func (p *PageRelatedArticle) GetDescription() (value string, ok bool)

GetDescription returns value of Description conditional field and boolean which is true if field was set.

func (*PageRelatedArticle) GetPhotoID

func (p *PageRelatedArticle) GetPhotoID() (value int64, ok bool)

GetPhotoID returns value of PhotoID conditional field and boolean which is true if field was set.

func (*PageRelatedArticle) GetPublishedDate

func (p *PageRelatedArticle) GetPublishedDate() (value int, ok bool)

GetPublishedDate returns value of PublishedDate conditional field and boolean which is true if field was set.

func (*PageRelatedArticle) GetTitle

func (p *PageRelatedArticle) GetTitle() (value string, ok bool)

GetTitle returns value of Title conditional field and boolean which is true if field was set.

func (*PageRelatedArticle) SetAuthor

func (p *PageRelatedArticle) SetAuthor(value string)

SetAuthor sets value of Author conditional field.

func (*PageRelatedArticle) SetDescription

func (p *PageRelatedArticle) SetDescription(value string)

SetDescription sets value of Description conditional field.

func (*PageRelatedArticle) SetPhotoID

func (p *PageRelatedArticle) SetPhotoID(value int64)

SetPhotoID sets value of PhotoID conditional field.

func (*PageRelatedArticle) SetPublishedDate

func (p *PageRelatedArticle) SetPublishedDate(value int)

SetPublishedDate sets value of PublishedDate conditional field.

func (*PageRelatedArticle) SetTitle

func (p *PageRelatedArticle) SetTitle(value string)

SetTitle sets value of Title conditional field.

func (*PageRelatedArticle) String added in v0.12.0

func (p *PageRelatedArticle) String() string

String implements fmt.Stringer.

type PageTableCell

type PageTableCell struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Is this element part of the column header
	Header bool
	// Horizontally centered block
	AlignCenter bool
	// Right-aligned block
	AlignRight bool
	// Vertically centered block
	ValignMiddle bool
	// Block vertically-alligned to the bottom
	ValignBottom bool
	// Content
	//
	// Use SetText and GetText helpers.
	Text RichTextClass
	// For how many columns should this cell extend
	//
	// Use SetColspan and GetColspan helpers.
	Colspan int
	// For how many rows should this cell extend
	//
	// Use SetRowspan and GetRowspan helpers.
	Rowspan int
}

PageTableCell represents TL type `pageTableCell#34566b6a`. Table cell

See https://core.telegram.org/constructor/pageTableCell for reference.

func (*PageTableCell) Decode

func (p *PageTableCell) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageTableCell) Encode

func (p *PageTableCell) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageTableCell) GetColspan

func (p *PageTableCell) GetColspan() (value int, ok bool)

GetColspan returns value of Colspan conditional field and boolean which is true if field was set.

func (*PageTableCell) GetRowspan

func (p *PageTableCell) GetRowspan() (value int, ok bool)

GetRowspan returns value of Rowspan conditional field and boolean which is true if field was set.

func (*PageTableCell) GetText

func (p *PageTableCell) GetText() (value RichTextClass, ok bool)

GetText returns value of Text conditional field and boolean which is true if field was set.

func (*PageTableCell) SetAlignCenter

func (p *PageTableCell) SetAlignCenter(value bool)

SetAlignCenter sets value of AlignCenter conditional field.

func (*PageTableCell) SetAlignRight

func (p *PageTableCell) SetAlignRight(value bool)

SetAlignRight sets value of AlignRight conditional field.

func (*PageTableCell) SetColspan

func (p *PageTableCell) SetColspan(value int)

SetColspan sets value of Colspan conditional field.

func (*PageTableCell) SetHeader

func (p *PageTableCell) SetHeader(value bool)

SetHeader sets value of Header conditional field.

func (*PageTableCell) SetRowspan

func (p *PageTableCell) SetRowspan(value int)

SetRowspan sets value of Rowspan conditional field.

func (*PageTableCell) SetText

func (p *PageTableCell) SetText(value RichTextClass)

SetText sets value of Text conditional field.

func (*PageTableCell) SetValignBottom

func (p *PageTableCell) SetValignBottom(value bool)

SetValignBottom sets value of ValignBottom conditional field.

func (*PageTableCell) SetValignMiddle

func (p *PageTableCell) SetValignMiddle(value bool)

SetValignMiddle sets value of ValignMiddle conditional field.

func (*PageTableCell) String added in v0.12.0

func (p *PageTableCell) String() string

String implements fmt.Stringer.

type PageTableRow

type PageTableRow struct {
	// Table cells
	Cells []PageTableCell
}

PageTableRow represents TL type `pageTableRow#e0c0c5e5`. Table row

See https://core.telegram.org/constructor/pageTableRow for reference.

func (*PageTableRow) Decode

func (p *PageTableRow) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PageTableRow) Encode

func (p *PageTableRow) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PageTableRow) String added in v0.12.0

func (p *PageTableRow) String() string

String implements fmt.Stringer.

type PasswordKdfAlgoBox

type PasswordKdfAlgoBox struct {
	PasswordKdfAlgo PasswordKdfAlgoClass
}

PasswordKdfAlgo boxes the PasswordKdfAlgoClass providing a helper.

func (*PasswordKdfAlgoBox) Decode

func (b *PasswordKdfAlgoBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PasswordKdfAlgoBox.

func (*PasswordKdfAlgoBox) Encode

func (b *PasswordKdfAlgoBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PasswordKdfAlgoBox.

type PasswordKdfAlgoClass

type PasswordKdfAlgoClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PasswordKdfAlgoClass represents PasswordKdfAlgo generic type.

See https://core.telegram.org/type/PasswordKdfAlgo for reference.

Example:

g, err := DecodePasswordKdfAlgo(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PasswordKdfAlgoUnknown: // passwordKdfAlgoUnknown#d45ab096
case *PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow: // passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow#3a912d4a
default: panic(v)
}

func DecodePasswordKdfAlgo

func DecodePasswordKdfAlgo(buf *bin.Buffer) (PasswordKdfAlgoClass, error)

DecodePasswordKdfAlgo implements binary de-serialization for PasswordKdfAlgoClass.

type PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow

type PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow struct {
	// One of two salts used by the derivation function (see SRP 2FA login¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	Salt1 []byte
	// One of two salts used by the derivation function (see SRP 2FA login¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	Salt2 []byte
	// Base (see SRP 2FA login¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	G int
	// 2048-bit modulus (see SRP 2FA login¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	P []byte
}

PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow represents TL type `passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow#3a912d4a`. This key derivation algorithm defines that SRP 2FA login¹ must be used

Links:

  1. https://core.telegram.org/api/srp

See https://core.telegram.org/constructor/passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow for reference.

func (*PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) Decode

Decode implements bin.Decoder.

func (*PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) Encode

Encode implements bin.Encoder.

func (*PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow) String added in v0.12.0

String implements fmt.Stringer.

type PasswordKdfAlgoUnknown

type PasswordKdfAlgoUnknown struct {
}

PasswordKdfAlgoUnknown represents TL type `passwordKdfAlgoUnknown#d45ab096`. Unknown KDF (most likely, the client is outdated and does not support the specified KDF algorithm)

See https://core.telegram.org/constructor/passwordKdfAlgoUnknown for reference.

func (*PasswordKdfAlgoUnknown) Decode

func (p *PasswordKdfAlgoUnknown) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PasswordKdfAlgoUnknown) Encode

func (p *PasswordKdfAlgoUnknown) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PasswordKdfAlgoUnknown) String added in v0.12.0

func (p *PasswordKdfAlgoUnknown) String() string

String implements fmt.Stringer.

type PaymentCharge

type PaymentCharge struct {
	// Telegram payment identifier
	ID string
	// Provider payment identifier
	ProviderChargeID string
}

PaymentCharge represents TL type `paymentCharge#ea02c27e`. Payment identifier

See https://core.telegram.org/constructor/paymentCharge for reference.

func (*PaymentCharge) Decode

func (p *PaymentCharge) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PaymentCharge) Encode

func (p *PaymentCharge) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PaymentCharge) String added in v0.12.0

func (p *PaymentCharge) String() string

String implements fmt.Stringer.

type PaymentRequestedInfo

type PaymentRequestedInfo struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// User's full name
	//
	// Use SetName and GetName helpers.
	Name string
	// User's phone number
	//
	// Use SetPhone and GetPhone helpers.
	Phone string
	// User's email address
	//
	// Use SetEmail and GetEmail helpers.
	Email string
	// User's shipping address
	//
	// Use SetShippingAddress and GetShippingAddress helpers.
	ShippingAddress PostAddress
}

PaymentRequestedInfo represents TL type `paymentRequestedInfo#909c3f94`. Order info provided by the user

See https://core.telegram.org/constructor/paymentRequestedInfo for reference.

func (*PaymentRequestedInfo) Decode

func (p *PaymentRequestedInfo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PaymentRequestedInfo) Encode

func (p *PaymentRequestedInfo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PaymentRequestedInfo) GetEmail

func (p *PaymentRequestedInfo) GetEmail() (value string, ok bool)

GetEmail returns value of Email conditional field and boolean which is true if field was set.

func (*PaymentRequestedInfo) GetName

func (p *PaymentRequestedInfo) GetName() (value string, ok bool)

GetName returns value of Name conditional field and boolean which is true if field was set.

func (*PaymentRequestedInfo) GetPhone

func (p *PaymentRequestedInfo) GetPhone() (value string, ok bool)

GetPhone returns value of Phone conditional field and boolean which is true if field was set.

func (*PaymentRequestedInfo) GetShippingAddress

func (p *PaymentRequestedInfo) GetShippingAddress() (value PostAddress, ok bool)

GetShippingAddress returns value of ShippingAddress conditional field and boolean which is true if field was set.

func (*PaymentRequestedInfo) SetEmail

func (p *PaymentRequestedInfo) SetEmail(value string)

SetEmail sets value of Email conditional field.

func (*PaymentRequestedInfo) SetName

func (p *PaymentRequestedInfo) SetName(value string)

SetName sets value of Name conditional field.

func (*PaymentRequestedInfo) SetPhone

func (p *PaymentRequestedInfo) SetPhone(value string)

SetPhone sets value of Phone conditional field.

func (*PaymentRequestedInfo) SetShippingAddress

func (p *PaymentRequestedInfo) SetShippingAddress(value PostAddress)

SetShippingAddress sets value of ShippingAddress conditional field.

func (*PaymentRequestedInfo) String added in v0.12.0

func (p *PaymentRequestedInfo) String() string

String implements fmt.Stringer.

type PaymentSavedCredentialsCard

type PaymentSavedCredentialsCard struct {
	// Card ID
	ID string
	// Title
	Title string
}

PaymentSavedCredentialsCard represents TL type `paymentSavedCredentialsCard#cdc27a1f`. Saved credit card

See https://core.telegram.org/constructor/paymentSavedCredentialsCard for reference.

func (*PaymentSavedCredentialsCard) Decode

Decode implements bin.Decoder.

func (*PaymentSavedCredentialsCard) Encode

Encode implements bin.Encoder.

func (*PaymentSavedCredentialsCard) String added in v0.12.0

func (p *PaymentSavedCredentialsCard) String() string

String implements fmt.Stringer.

type PaymentsBankCardData

type PaymentsBankCardData struct {
	// Credit card title
	Title string
	// Info URL(s) provided by the card's bank(s)
	OpenUrls []BankCardOpenUrl
}

PaymentsBankCardData represents TL type `payments.bankCardData#3e24e573`. Credit card info, provided by the card's bank(s)

See https://core.telegram.org/constructor/payments.bankCardData for reference.

func (*PaymentsBankCardData) Decode

func (b *PaymentsBankCardData) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*PaymentsBankCardData) Encode

func (b *PaymentsBankCardData) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*PaymentsBankCardData) String added in v0.12.0

func (b *PaymentsBankCardData) String() string

String implements fmt.Stringer.

type PaymentsClearSavedInfoRequest

type PaymentsClearSavedInfoRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Remove saved payment credentials
	Credentials bool
	// Clear the last order settings saved by the user
	Info bool
}

PaymentsClearSavedInfoRequest represents TL type `payments.clearSavedInfo#d83d70c1`. Clear saved payment information

See https://core.telegram.org/method/payments.clearSavedInfo for reference.

func (*PaymentsClearSavedInfoRequest) Decode

Decode implements bin.Decoder.

func (*PaymentsClearSavedInfoRequest) Encode

Encode implements bin.Encoder.

func (*PaymentsClearSavedInfoRequest) SetCredentials

func (c *PaymentsClearSavedInfoRequest) SetCredentials(value bool)

SetCredentials sets value of Credentials conditional field.

func (*PaymentsClearSavedInfoRequest) SetInfo

func (c *PaymentsClearSavedInfoRequest) SetInfo(value bool)

SetInfo sets value of Info conditional field.

func (*PaymentsClearSavedInfoRequest) String added in v0.12.0

String implements fmt.Stringer.

type PaymentsGetBankCardDataRequest

type PaymentsGetBankCardDataRequest struct {
	// Credit card number
	Number string
}

PaymentsGetBankCardDataRequest represents TL type `payments.getBankCardData#2e79d779`. Get info about a credit card

See https://core.telegram.org/method/payments.getBankCardData for reference.

func (*PaymentsGetBankCardDataRequest) Decode

Decode implements bin.Decoder.

func (*PaymentsGetBankCardDataRequest) Encode

Encode implements bin.Encoder.

func (*PaymentsGetBankCardDataRequest) String added in v0.12.0

String implements fmt.Stringer.

type PaymentsGetPaymentFormRequest

type PaymentsGetPaymentFormRequest struct {
	// Message ID of payment form
	MsgID int
}

PaymentsGetPaymentFormRequest represents TL type `payments.getPaymentForm#99f09745`. Get a payment form

See https://core.telegram.org/method/payments.getPaymentForm for reference.

func (*PaymentsGetPaymentFormRequest) Decode

Decode implements bin.Decoder.

func (*PaymentsGetPaymentFormRequest) Encode

Encode implements bin.Encoder.

func (*PaymentsGetPaymentFormRequest) String added in v0.12.0

String implements fmt.Stringer.

type PaymentsGetPaymentReceiptRequest

type PaymentsGetPaymentReceiptRequest struct {
	// Message ID of receipt
	MsgID int
}

PaymentsGetPaymentReceiptRequest represents TL type `payments.getPaymentReceipt#a092a980`. Get payment receipt

See https://core.telegram.org/method/payments.getPaymentReceipt for reference.

func (*PaymentsGetPaymentReceiptRequest) Decode

Decode implements bin.Decoder.

func (*PaymentsGetPaymentReceiptRequest) Encode

Encode implements bin.Encoder.

func (*PaymentsGetPaymentReceiptRequest) String added in v0.12.0

String implements fmt.Stringer.

type PaymentsGetSavedInfoRequest

type PaymentsGetSavedInfoRequest struct {
}

PaymentsGetSavedInfoRequest represents TL type `payments.getSavedInfo#227d824b`. Get saved payment information

See https://core.telegram.org/method/payments.getSavedInfo for reference.

func (*PaymentsGetSavedInfoRequest) Decode

Decode implements bin.Decoder.

func (*PaymentsGetSavedInfoRequest) Encode

Encode implements bin.Encoder.

func (*PaymentsGetSavedInfoRequest) String added in v0.12.0

func (g *PaymentsGetSavedInfoRequest) String() string

String implements fmt.Stringer.

type PaymentsPaymentForm

type PaymentsPaymentForm struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the user can choose to save credentials.
	CanSaveCredentials bool
	// Indicates that the user can save payment credentials, but only after setting up a 2FA password¹ (currently the account doesn't have a 2FA password²)
	//
	// Links:
	//  1) https://core.telegram.org/api/srp
	//  2) https://core.telegram.org/api/srp
	PasswordMissing bool
	// Bot ID
	BotID int
	// Invoice
	Invoice Invoice
	// Payment provider ID.
	ProviderID int
	// Payment form URL
	URL string
	// Payment provider name.One of the following:- stripe
	//
	// Use SetNativeProvider and GetNativeProvider helpers.
	NativeProvider string
	// Contains information about the payment provider, if available, to support it natively without the need for opening the URL.A JSON object that can contain the following fields:- publishable_key: Stripe API publishable key- apple_pay_merchant_id: Apple Pay merchant ID- android_pay_public_key: Android Pay public key- android_pay_bgcolor: Android Pay form background color- android_pay_inverse: Whether to use the dark theme in the Android Pay form- need_country: True, if the user country must be provided,- need_zip: True, if the user ZIP/postal code must be provided,- need_cardholder_name: True, if the cardholder name must be provided
	//
	// Use SetNativeParams and GetNativeParams helpers.
	NativeParams DataJSON
	// Saved server-side order information
	//
	// Use SetSavedInfo and GetSavedInfo helpers.
	SavedInfo PaymentRequestedInfo
	// Contains information about saved card credentials
	//
	// Use SetSavedCredentials and GetSavedCredentials helpers.
	SavedCredentials PaymentSavedCredentialsCard
	// Users
	Users []UserClass
}

PaymentsPaymentForm represents TL type `payments.paymentForm#3f56aea3`. Payment form

See https://core.telegram.org/constructor/payments.paymentForm for reference.

func (*PaymentsPaymentForm) Decode

func (p *PaymentsPaymentForm) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PaymentsPaymentForm) Encode

func (p *PaymentsPaymentForm) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PaymentsPaymentForm) GetNativeParams

func (p *PaymentsPaymentForm) GetNativeParams() (value DataJSON, ok bool)

GetNativeParams returns value of NativeParams conditional field and boolean which is true if field was set.

func (*PaymentsPaymentForm) GetNativeProvider

func (p *PaymentsPaymentForm) GetNativeProvider() (value string, ok bool)

GetNativeProvider returns value of NativeProvider conditional field and boolean which is true if field was set.

func (*PaymentsPaymentForm) GetSavedCredentials

func (p *PaymentsPaymentForm) GetSavedCredentials() (value PaymentSavedCredentialsCard, ok bool)

GetSavedCredentials returns value of SavedCredentials conditional field and boolean which is true if field was set.

func (*PaymentsPaymentForm) GetSavedInfo

func (p *PaymentsPaymentForm) GetSavedInfo() (value PaymentRequestedInfo, ok bool)

GetSavedInfo returns value of SavedInfo conditional field and boolean which is true if field was set.

func (*PaymentsPaymentForm) SetCanSaveCredentials

func (p *PaymentsPaymentForm) SetCanSaveCredentials(value bool)

SetCanSaveCredentials sets value of CanSaveCredentials conditional field.

func (*PaymentsPaymentForm) SetNativeParams

func (p *PaymentsPaymentForm) SetNativeParams(value DataJSON)

SetNativeParams sets value of NativeParams conditional field.

func (*PaymentsPaymentForm) SetNativeProvider

func (p *PaymentsPaymentForm) SetNativeProvider(value string)

SetNativeProvider sets value of NativeProvider conditional field.

func (*PaymentsPaymentForm) SetPasswordMissing

func (p *PaymentsPaymentForm) SetPasswordMissing(value bool)

SetPasswordMissing sets value of PasswordMissing conditional field.

func (*PaymentsPaymentForm) SetSavedCredentials

func (p *PaymentsPaymentForm) SetSavedCredentials(value PaymentSavedCredentialsCard)

SetSavedCredentials sets value of SavedCredentials conditional field.

func (*PaymentsPaymentForm) SetSavedInfo

func (p *PaymentsPaymentForm) SetSavedInfo(value PaymentRequestedInfo)

SetSavedInfo sets value of SavedInfo conditional field.

func (*PaymentsPaymentForm) String added in v0.12.0

func (p *PaymentsPaymentForm) String() string

String implements fmt.Stringer.

type PaymentsPaymentReceipt

type PaymentsPaymentReceipt struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Date of generation
	Date int
	// Bot ID
	BotID int
	// Invoice
	Invoice Invoice
	// Provider ID
	ProviderID int
	// Info
	//
	// Use SetInfo and GetInfo helpers.
	Info PaymentRequestedInfo
	// Selected shipping option
	//
	// Use SetShipping and GetShipping helpers.
	Shipping ShippingOption
	// Three-letter ISO 4217 currency¹ code
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments#supported-currencies
	Currency string
	// Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json¹, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments/currencies.json
	TotalAmount int64
	// Payment credential name
	CredentialsTitle string
	// Users
	Users []UserClass
}

PaymentsPaymentReceipt represents TL type `payments.paymentReceipt#500911e1`. Receipt

See https://core.telegram.org/constructor/payments.paymentReceipt for reference.

func (*PaymentsPaymentReceipt) Decode

func (p *PaymentsPaymentReceipt) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PaymentsPaymentReceipt) Encode

func (p *PaymentsPaymentReceipt) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PaymentsPaymentReceipt) GetInfo

func (p *PaymentsPaymentReceipt) GetInfo() (value PaymentRequestedInfo, ok bool)

GetInfo returns value of Info conditional field and boolean which is true if field was set.

func (*PaymentsPaymentReceipt) GetShipping

func (p *PaymentsPaymentReceipt) GetShipping() (value ShippingOption, ok bool)

GetShipping returns value of Shipping conditional field and boolean which is true if field was set.

func (*PaymentsPaymentReceipt) SetInfo

func (p *PaymentsPaymentReceipt) SetInfo(value PaymentRequestedInfo)

SetInfo sets value of Info conditional field.

func (*PaymentsPaymentReceipt) SetShipping

func (p *PaymentsPaymentReceipt) SetShipping(value ShippingOption)

SetShipping sets value of Shipping conditional field.

func (*PaymentsPaymentReceipt) String added in v0.12.0

func (p *PaymentsPaymentReceipt) String() string

String implements fmt.Stringer.

type PaymentsPaymentResult

type PaymentsPaymentResult struct {
	// Info about the payment
	Updates UpdatesClass
}

PaymentsPaymentResult represents TL type `payments.paymentResult#4e5f810d`. Payment result

See https://core.telegram.org/constructor/payments.paymentResult for reference.

func (*PaymentsPaymentResult) Decode

func (p *PaymentsPaymentResult) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PaymentsPaymentResult) Encode

func (p *PaymentsPaymentResult) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PaymentsPaymentResult) String added in v0.12.0

func (p *PaymentsPaymentResult) String() string

String implements fmt.Stringer.

type PaymentsPaymentResultBox

type PaymentsPaymentResultBox struct {
	PaymentResult PaymentsPaymentResultClass
}

PaymentsPaymentResult boxes the PaymentsPaymentResultClass providing a helper.

func (*PaymentsPaymentResultBox) Decode

func (b *PaymentsPaymentResultBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PaymentsPaymentResultBox.

func (*PaymentsPaymentResultBox) Encode

func (b *PaymentsPaymentResultBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PaymentsPaymentResultBox.

type PaymentsPaymentResultClass

type PaymentsPaymentResultClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PaymentsPaymentResultClass represents payments.PaymentResult generic type.

See https://core.telegram.org/type/payments.PaymentResult for reference.

Example:

g, err := DecodePaymentsPaymentResult(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PaymentsPaymentResult: // payments.paymentResult#4e5f810d
case *PaymentsPaymentVerificationNeeded: // payments.paymentVerificationNeeded#d8411139
default: panic(v)
}

func DecodePaymentsPaymentResult

func DecodePaymentsPaymentResult(buf *bin.Buffer) (PaymentsPaymentResultClass, error)

DecodePaymentsPaymentResult implements binary de-serialization for PaymentsPaymentResultClass.

type PaymentsPaymentVerificationNeeded

type PaymentsPaymentVerificationNeeded struct {
	// URL for additional payment credentials verification
	URL string
}

PaymentsPaymentVerificationNeeded represents TL type `payments.paymentVerificationNeeded#d8411139`. Payment was not successful, additional verification is needed

See https://core.telegram.org/constructor/payments.paymentVerificationNeeded for reference.

func (*PaymentsPaymentVerificationNeeded) Decode

Decode implements bin.Decoder.

func (*PaymentsPaymentVerificationNeeded) Encode

Encode implements bin.Encoder.

func (*PaymentsPaymentVerificationNeeded) String added in v0.12.0

String implements fmt.Stringer.

type PaymentsSavedInfo

type PaymentsSavedInfo struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the user has some saved payment credentials
	HasSavedCredentials bool
	// Saved server-side order information
	//
	// Use SetSavedInfo and GetSavedInfo helpers.
	SavedInfo PaymentRequestedInfo
}

PaymentsSavedInfo represents TL type `payments.savedInfo#fb8fe43c`. Saved server-side order information

See https://core.telegram.org/constructor/payments.savedInfo for reference.

func (*PaymentsSavedInfo) Decode

func (s *PaymentsSavedInfo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PaymentsSavedInfo) Encode

func (s *PaymentsSavedInfo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PaymentsSavedInfo) GetSavedInfo

func (s *PaymentsSavedInfo) GetSavedInfo() (value PaymentRequestedInfo, ok bool)

GetSavedInfo returns value of SavedInfo conditional field and boolean which is true if field was set.

func (*PaymentsSavedInfo) SetHasSavedCredentials

func (s *PaymentsSavedInfo) SetHasSavedCredentials(value bool)

SetHasSavedCredentials sets value of HasSavedCredentials conditional field.

func (*PaymentsSavedInfo) SetSavedInfo

func (s *PaymentsSavedInfo) SetSavedInfo(value PaymentRequestedInfo)

SetSavedInfo sets value of SavedInfo conditional field.

func (*PaymentsSavedInfo) String added in v0.12.0

func (s *PaymentsSavedInfo) String() string

String implements fmt.Stringer.

type PaymentsSendPaymentFormRequest

type PaymentsSendPaymentFormRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Message ID of form
	MsgID int
	// ID of saved and validated order info¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/payments.validatedRequestedInfo
	//
	// Use SetRequestedInfoID and GetRequestedInfoID helpers.
	RequestedInfoID string
	// Chosen shipping option ID
	//
	// Use SetShippingOptionID and GetShippingOptionID helpers.
	ShippingOptionID string
	// Payment credentials
	Credentials InputPaymentCredentialsClass
}

PaymentsSendPaymentFormRequest represents TL type `payments.sendPaymentForm#2b8879b3`. Send compiled payment form

See https://core.telegram.org/method/payments.sendPaymentForm for reference.

func (*PaymentsSendPaymentFormRequest) Decode

Decode implements bin.Decoder.

func (*PaymentsSendPaymentFormRequest) Encode

Encode implements bin.Encoder.

func (*PaymentsSendPaymentFormRequest) GetRequestedInfoID

func (s *PaymentsSendPaymentFormRequest) GetRequestedInfoID() (value string, ok bool)

GetRequestedInfoID returns value of RequestedInfoID conditional field and boolean which is true if field was set.

func (*PaymentsSendPaymentFormRequest) GetShippingOptionID

func (s *PaymentsSendPaymentFormRequest) GetShippingOptionID() (value string, ok bool)

GetShippingOptionID returns value of ShippingOptionID conditional field and boolean which is true if field was set.

func (*PaymentsSendPaymentFormRequest) SetRequestedInfoID

func (s *PaymentsSendPaymentFormRequest) SetRequestedInfoID(value string)

SetRequestedInfoID sets value of RequestedInfoID conditional field.

func (*PaymentsSendPaymentFormRequest) SetShippingOptionID

func (s *PaymentsSendPaymentFormRequest) SetShippingOptionID(value string)

SetShippingOptionID sets value of ShippingOptionID conditional field.

func (*PaymentsSendPaymentFormRequest) String added in v0.12.0

String implements fmt.Stringer.

type PaymentsValidateRequestedInfoRequest

type PaymentsValidateRequestedInfoRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Save order information to re-use it for future orders
	Save bool
	// Message ID of payment form
	MsgID int
	// Requested order information
	Info PaymentRequestedInfo
}

PaymentsValidateRequestedInfoRequest represents TL type `payments.validateRequestedInfo#770a8e74`. Submit requested order information for validation

See https://core.telegram.org/method/payments.validateRequestedInfo for reference.

func (*PaymentsValidateRequestedInfoRequest) Decode

Decode implements bin.Decoder.

func (*PaymentsValidateRequestedInfoRequest) Encode

Encode implements bin.Encoder.

func (*PaymentsValidateRequestedInfoRequest) SetSave

func (v *PaymentsValidateRequestedInfoRequest) SetSave(value bool)

SetSave sets value of Save conditional field.

func (*PaymentsValidateRequestedInfoRequest) String added in v0.12.0

String implements fmt.Stringer.

type PaymentsValidatedRequestedInfo

type PaymentsValidatedRequestedInfo struct {
	// Flags field of PaymentsValidatedRequestedInfo.
	Flags bin.Fields
	// ID field of PaymentsValidatedRequestedInfo.
	//
	// Use SetID and GetID helpers.
	ID string
	// ShippingOptions field of PaymentsValidatedRequestedInfo.
	//
	// Use SetShippingOptions and GetShippingOptions helpers.
	ShippingOptions []ShippingOption
}

PaymentsValidatedRequestedInfo represents TL type `payments.validatedRequestedInfo#d1451883`.

See https://core.telegram.org/constructor/payments.validatedRequestedInfo for reference.

func (*PaymentsValidatedRequestedInfo) Decode

Decode implements bin.Decoder.

func (*PaymentsValidatedRequestedInfo) Encode

Encode implements bin.Encoder.

func (*PaymentsValidatedRequestedInfo) GetID

func (v *PaymentsValidatedRequestedInfo) GetID() (value string, ok bool)

GetID returns value of ID conditional field and boolean which is true if field was set.

func (*PaymentsValidatedRequestedInfo) GetShippingOptions

func (v *PaymentsValidatedRequestedInfo) GetShippingOptions() (value []ShippingOption, ok bool)

GetShippingOptions returns value of ShippingOptions conditional field and boolean which is true if field was set.

func (*PaymentsValidatedRequestedInfo) SetID

func (v *PaymentsValidatedRequestedInfo) SetID(value string)

SetID sets value of ID conditional field.

func (*PaymentsValidatedRequestedInfo) SetShippingOptions

func (v *PaymentsValidatedRequestedInfo) SetShippingOptions(value []ShippingOption)

SetShippingOptions sets value of ShippingOptions conditional field.

func (*PaymentsValidatedRequestedInfo) String added in v0.12.0

String implements fmt.Stringer.

type PeerBlocked

type PeerBlocked struct {
	// Peer ID
	PeerID PeerClass
	// When was the peer blocked
	Date int
}

PeerBlocked represents TL type `peerBlocked#e8fd8014`. Information about a blocked peer

See https://core.telegram.org/constructor/peerBlocked for reference.

func (*PeerBlocked) Decode

func (p *PeerBlocked) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PeerBlocked) Encode

func (p *PeerBlocked) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PeerBlocked) String added in v0.12.0

func (p *PeerBlocked) String() string

String implements fmt.Stringer.

type PeerBlockedHandler added in v0.9.0

type PeerBlockedHandler func(ctx UpdateContext, update *UpdatePeerBlocked) error

PeerBlockedHandler is a PeerBlocked event handler.

type PeerBox

type PeerBox struct {
	Peer PeerClass
}

Peer boxes the PeerClass providing a helper.

func (*PeerBox) Decode

func (b *PeerBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PeerBox.

func (*PeerBox) Encode

func (b *PeerBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PeerBox.

type PeerChannel

type PeerChannel struct {
	// Channel ID
	ChannelID int
}

PeerChannel represents TL type `peerChannel#bddde532`. Channel/supergroup

See https://core.telegram.org/constructor/peerChannel for reference.

func (*PeerChannel) Decode

func (p *PeerChannel) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PeerChannel) Encode

func (p *PeerChannel) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PeerChannel) String added in v0.12.0

func (p *PeerChannel) String() string

String implements fmt.Stringer.

type PeerChat

type PeerChat struct {
	// Group identifier
	ChatID int
}

PeerChat represents TL type `peerChat#bad0e5bb`. Group.

See https://core.telegram.org/constructor/peerChat for reference.

func (*PeerChat) Decode

func (p *PeerChat) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PeerChat) Encode

func (p *PeerChat) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PeerChat) String added in v0.12.0

func (p *PeerChat) String() string

String implements fmt.Stringer.

type PeerClass

type PeerClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PeerClass represents Peer generic type.

See https://core.telegram.org/type/Peer for reference.

Example:

g, err := DecodePeer(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PeerUser: // peerUser#9db1bc6d
case *PeerChat: // peerChat#bad0e5bb
case *PeerChannel: // peerChannel#bddde532
default: panic(v)
}

func DecodePeer

func DecodePeer(buf *bin.Buffer) (PeerClass, error)

DecodePeer implements binary de-serialization for PeerClass.

type PeerLocated

type PeerLocated struct {
	// Peer
	Peer PeerClass
	// Validity period of current data
	Expires int
	// Distance from the peer in meters
	Distance int
}

PeerLocated represents TL type `peerLocated#ca461b5d`. Peer geolocated nearby

See https://core.telegram.org/constructor/peerLocated for reference.

func (*PeerLocated) Decode

func (p *PeerLocated) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PeerLocated) Encode

func (p *PeerLocated) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PeerLocated) String added in v0.12.0

func (p *PeerLocated) String() string

String implements fmt.Stringer.

type PeerLocatedBox

type PeerLocatedBox struct {
	PeerLocated PeerLocatedClass
}

PeerLocated boxes the PeerLocatedClass providing a helper.

func (*PeerLocatedBox) Decode

func (b *PeerLocatedBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PeerLocatedBox.

func (*PeerLocatedBox) Encode

func (b *PeerLocatedBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PeerLocatedBox.

type PeerLocatedClass

type PeerLocatedClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PeerLocatedClass represents PeerLocated generic type.

See https://core.telegram.org/type/PeerLocated for reference.

Example:

g, err := DecodePeerLocated(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PeerLocated: // peerLocated#ca461b5d
case *PeerSelfLocated: // peerSelfLocated#f8ec284b
default: panic(v)
}

func DecodePeerLocated

func DecodePeerLocated(buf *bin.Buffer) (PeerLocatedClass, error)

DecodePeerLocated implements binary de-serialization for PeerLocatedClass.

type PeerLocatedHandler added in v0.9.0

type PeerLocatedHandler func(ctx UpdateContext, update *UpdatePeerLocated) error

PeerLocatedHandler is a PeerLocated event handler.

type PeerNotifySettings

type PeerNotifySettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Display text in notifications
	//
	// Use SetShowPreviews and GetShowPreviews helpers.
	ShowPreviews bool
	// Mute peer?
	//
	// Use SetSilent and GetSilent helpers.
	Silent bool
	// Mute all notifications until this date
	//
	// Use SetMuteUntil and GetMuteUntil helpers.
	MuteUntil int
	// Audio file name for notifications
	//
	// Use SetSound and GetSound helpers.
	Sound string
}

PeerNotifySettings represents TL type `peerNotifySettings#af509d20`. Notification settings.

See https://core.telegram.org/constructor/peerNotifySettings for reference.

func (*PeerNotifySettings) Decode

func (p *PeerNotifySettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PeerNotifySettings) Encode

func (p *PeerNotifySettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PeerNotifySettings) GetMuteUntil

func (p *PeerNotifySettings) GetMuteUntil() (value int, ok bool)

GetMuteUntil returns value of MuteUntil conditional field and boolean which is true if field was set.

func (*PeerNotifySettings) GetShowPreviews added in v0.17.0

func (p *PeerNotifySettings) GetShowPreviews() (value bool, ok bool)

GetShowPreviews returns value of ShowPreviews conditional field and boolean which is true if field was set.

func (*PeerNotifySettings) GetSilent added in v0.17.0

func (p *PeerNotifySettings) GetSilent() (value bool, ok bool)

GetSilent returns value of Silent conditional field and boolean which is true if field was set.

func (*PeerNotifySettings) GetSound

func (p *PeerNotifySettings) GetSound() (value string, ok bool)

GetSound returns value of Sound conditional field and boolean which is true if field was set.

func (*PeerNotifySettings) SetMuteUntil

func (p *PeerNotifySettings) SetMuteUntil(value int)

SetMuteUntil sets value of MuteUntil conditional field.

func (*PeerNotifySettings) SetShowPreviews

func (p *PeerNotifySettings) SetShowPreviews(value bool)

SetShowPreviews sets value of ShowPreviews conditional field.

func (*PeerNotifySettings) SetSilent

func (p *PeerNotifySettings) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*PeerNotifySettings) SetSound

func (p *PeerNotifySettings) SetSound(value string)

SetSound sets value of Sound conditional field.

func (*PeerNotifySettings) String added in v0.12.0

func (p *PeerNotifySettings) String() string

String implements fmt.Stringer.

type PeerSelfLocated

type PeerSelfLocated struct {
	// Expiry of geolocation info for current peer
	Expires int
}

PeerSelfLocated represents TL type `peerSelfLocated#f8ec284b`. Current peer

See https://core.telegram.org/constructor/peerSelfLocated for reference.

func (*PeerSelfLocated) Decode

func (p *PeerSelfLocated) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PeerSelfLocated) Encode

func (p *PeerSelfLocated) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PeerSelfLocated) String added in v0.12.0

func (p *PeerSelfLocated) String() string

String implements fmt.Stringer.

type PeerSettings

type PeerSettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether we can still report the user for spam
	ReportSpam bool
	// Whether we can add the user as contact
	AddContact bool
	// Whether we can block the user
	BlockContact bool
	// Whether we can share the user's contact
	ShareContact bool
	// Whether a special exception for contacts is needed
	NeedContactsException bool
	// Whether we can report a geogroup is irrelevant for this location
	ReportGeo bool
	// Whether this peer was automatically archived according to privacy settings¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/globalPrivacySettings
	Autoarchived bool
	// Distance in meters between us and this peer
	//
	// Use SetGeoDistance and GetGeoDistance helpers.
	GeoDistance int
}

PeerSettings represents TL type `peerSettings#733f2961`. Peer settings

See https://core.telegram.org/constructor/peerSettings for reference.

func (*PeerSettings) Decode

func (p *PeerSettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PeerSettings) Encode

func (p *PeerSettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PeerSettings) GetGeoDistance

func (p *PeerSettings) GetGeoDistance() (value int, ok bool)

GetGeoDistance returns value of GeoDistance conditional field and boolean which is true if field was set.

func (*PeerSettings) SetAddContact

func (p *PeerSettings) SetAddContact(value bool)

SetAddContact sets value of AddContact conditional field.

func (*PeerSettings) SetAutoarchived

func (p *PeerSettings) SetAutoarchived(value bool)

SetAutoarchived sets value of Autoarchived conditional field.

func (*PeerSettings) SetBlockContact

func (p *PeerSettings) SetBlockContact(value bool)

SetBlockContact sets value of BlockContact conditional field.

func (*PeerSettings) SetGeoDistance

func (p *PeerSettings) SetGeoDistance(value int)

SetGeoDistance sets value of GeoDistance conditional field.

func (*PeerSettings) SetNeedContactsException

func (p *PeerSettings) SetNeedContactsException(value bool)

SetNeedContactsException sets value of NeedContactsException conditional field.

func (*PeerSettings) SetReportGeo

func (p *PeerSettings) SetReportGeo(value bool)

SetReportGeo sets value of ReportGeo conditional field.

func (*PeerSettings) SetReportSpam

func (p *PeerSettings) SetReportSpam(value bool)

SetReportSpam sets value of ReportSpam conditional field.

func (*PeerSettings) SetShareContact

func (p *PeerSettings) SetShareContact(value bool)

SetShareContact sets value of ShareContact conditional field.

func (*PeerSettings) String added in v0.12.0

func (p *PeerSettings) String() string

String implements fmt.Stringer.

type PeerSettingsHandler added in v0.9.0

type PeerSettingsHandler func(ctx UpdateContext, update *UpdatePeerSettings) error

PeerSettingsHandler is a PeerSettings event handler.

type PeerUser

type PeerUser struct {
	// User identifier
	UserID int
}

PeerUser represents TL type `peerUser#9db1bc6d`. Chat partner

See https://core.telegram.org/constructor/peerUser for reference.

func (*PeerUser) Decode

func (p *PeerUser) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PeerUser) Encode

func (p *PeerUser) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PeerUser) String added in v0.12.0

func (p *PeerUser) String() string

String implements fmt.Stringer.

type PhoneAcceptCallRequest

type PhoneAcceptCallRequest struct {
	// The call to accept
	Peer InputPhoneCall
	// Parameter for E2E encryption key exchange »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/end-to-end/voice-calls
	GB []byte
	// Phone call settings
	Protocol PhoneCallProtocol
}

PhoneAcceptCallRequest represents TL type `phone.acceptCall#3bd2b4a0`. Accept incoming call

See https://core.telegram.org/method/phone.acceptCall for reference.

func (*PhoneAcceptCallRequest) Decode

func (a *PhoneAcceptCallRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneAcceptCallRequest) Encode

func (a *PhoneAcceptCallRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneAcceptCallRequest) String added in v0.12.0

func (a *PhoneAcceptCallRequest) String() string

String implements fmt.Stringer.

type PhoneCall

type PhoneCall struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether P2P connection to the other peer is allowed
	P2PAllowed bool
	// Whether this is a video call
	Video bool
	// Call ID
	ID int64
	// Access hash
	AccessHash int64
	// Date of creation of the call
	Date int
	// User ID of the creator of the call
	AdminID int
	// User ID of the other participant in the call
	ParticipantID int
	// Parameter for key exchange¹
	//
	// Links:
	//  1) https://core.telegram.org/api/end-to-end/voice-calls
	GAOrB []byte
	// Key fingerprint¹
	//
	// Links:
	//  1) https://core.telegram.org/api/end-to-end/voice-calls
	KeyFingerprint int64
	// Call protocol info to be passed to libtgvoip
	Protocol PhoneCallProtocol
	// List of endpoints the user can connect to to exchange call data
	Connections []PhoneConnectionClass
	// When was the call actually started
	StartDate int
}

PhoneCall represents TL type `phoneCall#8742ae7f`. Phone call

See https://core.telegram.org/constructor/phoneCall for reference.

func (*PhoneCall) Decode

func (p *PhoneCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneCall) Encode

func (p *PhoneCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneCall) SetP2PAllowed

func (p *PhoneCall) SetP2PAllowed(value bool)

SetP2PAllowed sets value of P2PAllowed conditional field.

func (*PhoneCall) SetVideo

func (p *PhoneCall) SetVideo(value bool)

SetVideo sets value of Video conditional field.

func (*PhoneCall) String added in v0.12.0

func (p *PhoneCall) String() string

String implements fmt.Stringer.

type PhoneCallAccepted

type PhoneCallAccepted struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is a video call
	Video bool
	// ID of accepted phone call
	ID int64
	// Access hash of phone call
	AccessHash int64
	// When was the call accepted
	Date int
	// ID of the call creator
	AdminID int
	// ID of the other user in the call
	ParticipantID int
	// B parameter for secure E2E phone call key exchange¹
	//
	// Links:
	//  1) https://core.telegram.org/api/end-to-end/voice-calls
	GB []byte
	// Protocol to use for phone call
	Protocol PhoneCallProtocol
}

PhoneCallAccepted represents TL type `phoneCallAccepted#997c454a`. An accepted phone call

See https://core.telegram.org/constructor/phoneCallAccepted for reference.

func (*PhoneCallAccepted) Decode

func (p *PhoneCallAccepted) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneCallAccepted) Encode

func (p *PhoneCallAccepted) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneCallAccepted) SetVideo

func (p *PhoneCallAccepted) SetVideo(value bool)

SetVideo sets value of Video conditional field.

func (*PhoneCallAccepted) String added in v0.12.0

func (p *PhoneCallAccepted) String() string

String implements fmt.Stringer.

type PhoneCallBox

type PhoneCallBox struct {
	PhoneCall PhoneCallClass
}

PhoneCall boxes the PhoneCallClass providing a helper.

func (*PhoneCallBox) Decode

func (b *PhoneCallBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PhoneCallBox.

func (*PhoneCallBox) Encode

func (b *PhoneCallBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PhoneCallBox.

type PhoneCallClass

type PhoneCallClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PhoneCallClass represents PhoneCall generic type.

See https://core.telegram.org/type/PhoneCall for reference.

Example:

g, err := DecodePhoneCall(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PhoneCallEmpty: // phoneCallEmpty#5366c915
case *PhoneCallWaiting: // phoneCallWaiting#1b8f4ad1
case *PhoneCallRequested: // phoneCallRequested#87eabb53
case *PhoneCallAccepted: // phoneCallAccepted#997c454a
case *PhoneCall: // phoneCall#8742ae7f
case *PhoneCallDiscarded: // phoneCallDiscarded#50ca4de1
default: panic(v)
}

func DecodePhoneCall

func DecodePhoneCall(buf *bin.Buffer) (PhoneCallClass, error)

DecodePhoneCall implements binary de-serialization for PhoneCallClass.

type PhoneCallDiscardReasonBox

type PhoneCallDiscardReasonBox struct {
	PhoneCallDiscardReason PhoneCallDiscardReasonClass
}

PhoneCallDiscardReason boxes the PhoneCallDiscardReasonClass providing a helper.

func (*PhoneCallDiscardReasonBox) Decode

func (b *PhoneCallDiscardReasonBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PhoneCallDiscardReasonBox.

func (*PhoneCallDiscardReasonBox) Encode

func (b *PhoneCallDiscardReasonBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PhoneCallDiscardReasonBox.

type PhoneCallDiscardReasonBusy

type PhoneCallDiscardReasonBusy struct {
}

PhoneCallDiscardReasonBusy represents TL type `phoneCallDiscardReasonBusy#faf7e8c9`. The phone call was discared because the user is busy in another call

See https://core.telegram.org/constructor/phoneCallDiscardReasonBusy for reference.

func (*PhoneCallDiscardReasonBusy) Decode

Decode implements bin.Decoder.

func (*PhoneCallDiscardReasonBusy) Encode

Encode implements bin.Encoder.

func (*PhoneCallDiscardReasonBusy) String added in v0.12.0

func (p *PhoneCallDiscardReasonBusy) String() string

String implements fmt.Stringer.

type PhoneCallDiscardReasonClass

type PhoneCallDiscardReasonClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PhoneCallDiscardReasonClass represents PhoneCallDiscardReason generic type.

See https://core.telegram.org/type/PhoneCallDiscardReason for reference.

Example:

g, err := DecodePhoneCallDiscardReason(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PhoneCallDiscardReasonMissed: // phoneCallDiscardReasonMissed#85e42301
case *PhoneCallDiscardReasonDisconnect: // phoneCallDiscardReasonDisconnect#e095c1a0
case *PhoneCallDiscardReasonHangup: // phoneCallDiscardReasonHangup#57adc690
case *PhoneCallDiscardReasonBusy: // phoneCallDiscardReasonBusy#faf7e8c9
default: panic(v)
}

func DecodePhoneCallDiscardReason

func DecodePhoneCallDiscardReason(buf *bin.Buffer) (PhoneCallDiscardReasonClass, error)

DecodePhoneCallDiscardReason implements binary de-serialization for PhoneCallDiscardReasonClass.

type PhoneCallDiscardReasonDisconnect

type PhoneCallDiscardReasonDisconnect struct {
}

PhoneCallDiscardReasonDisconnect represents TL type `phoneCallDiscardReasonDisconnect#e095c1a0`. The phone call was disconnected

See https://core.telegram.org/constructor/phoneCallDiscardReasonDisconnect for reference.

func (*PhoneCallDiscardReasonDisconnect) Decode

Decode implements bin.Decoder.

func (*PhoneCallDiscardReasonDisconnect) Encode

Encode implements bin.Encoder.

func (*PhoneCallDiscardReasonDisconnect) String added in v0.12.0

String implements fmt.Stringer.

type PhoneCallDiscardReasonHangup

type PhoneCallDiscardReasonHangup struct {
}

PhoneCallDiscardReasonHangup represents TL type `phoneCallDiscardReasonHangup#57adc690`. The phone call was ended normally

See https://core.telegram.org/constructor/phoneCallDiscardReasonHangup for reference.

func (*PhoneCallDiscardReasonHangup) Decode

Decode implements bin.Decoder.

func (*PhoneCallDiscardReasonHangup) Encode

Encode implements bin.Encoder.

func (*PhoneCallDiscardReasonHangup) String added in v0.12.0

String implements fmt.Stringer.

type PhoneCallDiscardReasonMissed

type PhoneCallDiscardReasonMissed struct {
}

PhoneCallDiscardReasonMissed represents TL type `phoneCallDiscardReasonMissed#85e42301`. The phone call was missed

See https://core.telegram.org/constructor/phoneCallDiscardReasonMissed for reference.

func (*PhoneCallDiscardReasonMissed) Decode

Decode implements bin.Decoder.

func (*PhoneCallDiscardReasonMissed) Encode

Encode implements bin.Encoder.

func (*PhoneCallDiscardReasonMissed) String added in v0.12.0

String implements fmt.Stringer.

type PhoneCallDiscarded

type PhoneCallDiscarded struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the server required the user to rate¹ the call
	//
	// Links:
	//  1) https://core.telegram.org/method/phone.setCallRating
	NeedRating bool
	// Whether the server required the client to send¹ the libtgvoip call debug data
	//
	// Links:
	//  1) https://core.telegram.org/method/phone.saveCallDebug
	NeedDebug bool
	// Whether the call was a video call
	Video bool
	// Call ID
	ID int64
	// Why was the phone call discarded
	//
	// Use SetReason and GetReason helpers.
	Reason PhoneCallDiscardReasonClass
	// Duration of the phone call in seconds
	//
	// Use SetDuration and GetDuration helpers.
	Duration int
}

PhoneCallDiscarded represents TL type `phoneCallDiscarded#50ca4de1`. Indicates a discarded phone call

See https://core.telegram.org/constructor/phoneCallDiscarded for reference.

func (*PhoneCallDiscarded) Decode

func (p *PhoneCallDiscarded) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneCallDiscarded) Encode

func (p *PhoneCallDiscarded) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneCallDiscarded) GetDuration

func (p *PhoneCallDiscarded) GetDuration() (value int, ok bool)

GetDuration returns value of Duration conditional field and boolean which is true if field was set.

func (*PhoneCallDiscarded) GetReason

func (p *PhoneCallDiscarded) GetReason() (value PhoneCallDiscardReasonClass, ok bool)

GetReason returns value of Reason conditional field and boolean which is true if field was set.

func (*PhoneCallDiscarded) SetDuration

func (p *PhoneCallDiscarded) SetDuration(value int)

SetDuration sets value of Duration conditional field.

func (*PhoneCallDiscarded) SetNeedDebug

func (p *PhoneCallDiscarded) SetNeedDebug(value bool)

SetNeedDebug sets value of NeedDebug conditional field.

func (*PhoneCallDiscarded) SetNeedRating

func (p *PhoneCallDiscarded) SetNeedRating(value bool)

SetNeedRating sets value of NeedRating conditional field.

func (*PhoneCallDiscarded) SetReason

func (p *PhoneCallDiscarded) SetReason(value PhoneCallDiscardReasonClass)

SetReason sets value of Reason conditional field.

func (*PhoneCallDiscarded) SetVideo

func (p *PhoneCallDiscarded) SetVideo(value bool)

SetVideo sets value of Video conditional field.

func (*PhoneCallDiscarded) String added in v0.12.0

func (p *PhoneCallDiscarded) String() string

String implements fmt.Stringer.

type PhoneCallEmpty

type PhoneCallEmpty struct {
	// Call ID
	ID int64
}

PhoneCallEmpty represents TL type `phoneCallEmpty#5366c915`. Empty constructor

See https://core.telegram.org/constructor/phoneCallEmpty for reference.

func (*PhoneCallEmpty) Decode

func (p *PhoneCallEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneCallEmpty) Encode

func (p *PhoneCallEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneCallEmpty) String added in v0.12.0

func (p *PhoneCallEmpty) String() string

String implements fmt.Stringer.

type PhoneCallHandler added in v0.9.0

type PhoneCallHandler func(ctx UpdateContext, update *UpdatePhoneCall) error

PhoneCallHandler is a PhoneCall event handler.

type PhoneCallProtocol

type PhoneCallProtocol struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to allow P2P connection to the other participant
	UDPP2P bool
	// Whether to allow connection to the other participants through the reflector servers
	UDPReflector bool
	// Minimum layer for remote libtgvoip
	MinLayer int
	// Maximum layer for remote libtgvoip
	MaxLayer int
	// When using phone.requestCall¹ and phone.acceptCall², specify all library versions supported by the client. The server will merge and choose the best library version supported by both peers, returning only the best value in the result of the callee's phone.acceptCall³ and in the phoneCallAccepted⁴ update received by the caller.
	//
	// Links:
	//  1) https://core.telegram.org/method/phone.requestCall
	//  2) https://core.telegram.org/method/phone.acceptCall
	//  3) https://core.telegram.org/method/phone.acceptCall
	//  4) https://core.telegram.org/constructor/phoneCallAccepted
	LibraryVersions []string
}

PhoneCallProtocol represents TL type `phoneCallProtocol#fc878fc8`. Protocol info for libtgvoip

See https://core.telegram.org/constructor/phoneCallProtocol for reference.

func (*PhoneCallProtocol) Decode

func (p *PhoneCallProtocol) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneCallProtocol) Encode

func (p *PhoneCallProtocol) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneCallProtocol) SetUDPP2P

func (p *PhoneCallProtocol) SetUDPP2P(value bool)

SetUDPP2P sets value of UDPP2P conditional field.

func (*PhoneCallProtocol) SetUDPReflector

func (p *PhoneCallProtocol) SetUDPReflector(value bool)

SetUDPReflector sets value of UDPReflector conditional field.

func (*PhoneCallProtocol) String added in v0.12.0

func (p *PhoneCallProtocol) String() string

String implements fmt.Stringer.

type PhoneCallRequested

type PhoneCallRequested struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is a video call
	Video bool
	// Phone call ID
	ID int64
	// Access hash
	AccessHash int64
	// When was the phone call created
	Date int
	// ID of the creator of the phone call
	AdminID int
	// ID of the other participant of the phone call
	ParticipantID int
	// Parameter for key exchange¹
	//
	// Links:
	//  1) https://core.telegram.org/api/end-to-end/voice-calls
	GAHash []byte
	// Call protocol info to be passed to libtgvoip
	Protocol PhoneCallProtocol
}

PhoneCallRequested represents TL type `phoneCallRequested#87eabb53`. Requested phone call

See https://core.telegram.org/constructor/phoneCallRequested for reference.

func (*PhoneCallRequested) Decode

func (p *PhoneCallRequested) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneCallRequested) Encode

func (p *PhoneCallRequested) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneCallRequested) SetVideo

func (p *PhoneCallRequested) SetVideo(value bool)

SetVideo sets value of Video conditional field.

func (*PhoneCallRequested) String added in v0.12.0

func (p *PhoneCallRequested) String() string

String implements fmt.Stringer.

type PhoneCallSignalingDataHandler added in v0.9.0

type PhoneCallSignalingDataHandler func(ctx UpdateContext, update *UpdatePhoneCallSignalingData) error

PhoneCallSignalingDataHandler is a PhoneCallSignalingData event handler.

type PhoneCallWaiting

type PhoneCallWaiting struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Is this a video call
	Video bool
	// Call ID
	ID int64
	// Access hash
	AccessHash int64
	// Date
	Date int
	// Admin ID
	AdminID int
	// Participant ID
	ParticipantID int
	// Phone call protocol info
	Protocol PhoneCallProtocol
	// When was the phone call received
	//
	// Use SetReceiveDate and GetReceiveDate helpers.
	ReceiveDate int
}

PhoneCallWaiting represents TL type `phoneCallWaiting#1b8f4ad1`. Incoming phone call

See https://core.telegram.org/constructor/phoneCallWaiting for reference.

func (*PhoneCallWaiting) Decode

func (p *PhoneCallWaiting) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneCallWaiting) Encode

func (p *PhoneCallWaiting) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneCallWaiting) GetReceiveDate

func (p *PhoneCallWaiting) GetReceiveDate() (value int, ok bool)

GetReceiveDate returns value of ReceiveDate conditional field and boolean which is true if field was set.

func (*PhoneCallWaiting) SetReceiveDate

func (p *PhoneCallWaiting) SetReceiveDate(value int)

SetReceiveDate sets value of ReceiveDate conditional field.

func (*PhoneCallWaiting) SetVideo

func (p *PhoneCallWaiting) SetVideo(value bool)

SetVideo sets value of Video conditional field.

func (*PhoneCallWaiting) String added in v0.12.0

func (p *PhoneCallWaiting) String() string

String implements fmt.Stringer.

type PhoneCheckGroupCallRequest added in v0.13.0

type PhoneCheckGroupCallRequest struct {
	// Call field of PhoneCheckGroupCallRequest.
	Call InputGroupCall
	// Source field of PhoneCheckGroupCallRequest.
	Source int
}

PhoneCheckGroupCallRequest represents TL type `phone.checkGroupCall#b74a7bea`.

See https://core.telegram.org/method/phone.checkGroupCall for reference.

func (*PhoneCheckGroupCallRequest) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*PhoneCheckGroupCallRequest) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*PhoneCheckGroupCallRequest) String added in v0.13.0

func (c *PhoneCheckGroupCallRequest) String() string

String implements fmt.Stringer.

type PhoneConfirmCallRequest

type PhoneConfirmCallRequest struct {
	// The phone call
	Peer InputPhoneCall
	// Parameter for E2E encryption key exchange »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/end-to-end/voice-calls
	GA []byte
	// Key fingerprint
	KeyFingerprint int64
	// Phone call settings
	Protocol PhoneCallProtocol
}

PhoneConfirmCallRequest represents TL type `phone.confirmCall#2efe1722`. Complete phone call E2E encryption key exchange »¹

Links:

  1. https://core.telegram.org/api/end-to-end/voice-calls

See https://core.telegram.org/method/phone.confirmCall for reference.

func (*PhoneConfirmCallRequest) Decode

func (c *PhoneConfirmCallRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneConfirmCallRequest) Encode

func (c *PhoneConfirmCallRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneConfirmCallRequest) String added in v0.12.0

func (c *PhoneConfirmCallRequest) String() string

String implements fmt.Stringer.

type PhoneConnection

type PhoneConnection struct {
	// Endpoint ID
	ID int64
	// IP address of endpoint
	IP string
	// IPv6 address of endpoint
	Ipv6 string
	// Port ID
	Port int
	// Our peer tag
	PeerTag []byte
}

PhoneConnection represents TL type `phoneConnection#9d4c17c0`. Identifies an endpoint that can be used to connect to the other user in a phone call

See https://core.telegram.org/constructor/phoneConnection for reference.

func (*PhoneConnection) Decode

func (p *PhoneConnection) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneConnection) Encode

func (p *PhoneConnection) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneConnection) String added in v0.12.0

func (p *PhoneConnection) String() string

String implements fmt.Stringer.

type PhoneConnectionBox

type PhoneConnectionBox struct {
	PhoneConnection PhoneConnectionClass
}

PhoneConnection boxes the PhoneConnectionClass providing a helper.

func (*PhoneConnectionBox) Decode

func (b *PhoneConnectionBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PhoneConnectionBox.

func (*PhoneConnectionBox) Encode

func (b *PhoneConnectionBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PhoneConnectionBox.

type PhoneConnectionClass

type PhoneConnectionClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PhoneConnectionClass represents PhoneConnection generic type.

See https://core.telegram.org/type/PhoneConnection for reference.

Example:

g, err := DecodePhoneConnection(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PhoneConnection: // phoneConnection#9d4c17c0
case *PhoneConnectionWebrtc: // phoneConnectionWebrtc#635fe375
default: panic(v)
}

func DecodePhoneConnection

func DecodePhoneConnection(buf *bin.Buffer) (PhoneConnectionClass, error)

DecodePhoneConnection implements binary de-serialization for PhoneConnectionClass.

type PhoneConnectionWebrtc

type PhoneConnectionWebrtc struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is a TURN endpoint
	Turn bool
	// Whether this is a STUN endpoint
	Stun bool
	// Endpoint ID
	ID int64
	// IP address
	IP string
	// IPv6 address
	Ipv6 string
	// Port
	Port int
	// Username
	Username string
	// Password
	Password string
}

PhoneConnectionWebrtc represents TL type `phoneConnectionWebrtc#635fe375`. WebRTC connection parameters

See https://core.telegram.org/constructor/phoneConnectionWebrtc for reference.

func (*PhoneConnectionWebrtc) Decode

func (p *PhoneConnectionWebrtc) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneConnectionWebrtc) Encode

func (p *PhoneConnectionWebrtc) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneConnectionWebrtc) SetStun

func (p *PhoneConnectionWebrtc) SetStun(value bool)

SetStun sets value of Stun conditional field.

func (*PhoneConnectionWebrtc) SetTurn

func (p *PhoneConnectionWebrtc) SetTurn(value bool)

SetTurn sets value of Turn conditional field.

func (*PhoneConnectionWebrtc) String added in v0.12.0

func (p *PhoneConnectionWebrtc) String() string

String implements fmt.Stringer.

type PhoneCreateGroupCallRequest added in v0.13.0

type PhoneCreateGroupCallRequest struct {
	// Peer field of PhoneCreateGroupCallRequest.
	Peer InputPeerClass
	// RandomID field of PhoneCreateGroupCallRequest.
	RandomID int
}

PhoneCreateGroupCallRequest represents TL type `phone.createGroupCall#bd3dabe0`.

See https://core.telegram.org/method/phone.createGroupCall for reference.

func (*PhoneCreateGroupCallRequest) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*PhoneCreateGroupCallRequest) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*PhoneCreateGroupCallRequest) String added in v0.13.0

func (c *PhoneCreateGroupCallRequest) String() string

String implements fmt.Stringer.

type PhoneDiscardCallRequest

type PhoneDiscardCallRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is a video call
	Video bool
	// The phone call
	Peer InputPhoneCall
	// Call duration
	Duration int
	// Why was the call discarded
	Reason PhoneCallDiscardReasonClass
	// Preferred libtgvoip relay ID
	ConnectionID int64
}

PhoneDiscardCallRequest represents TL type `phone.discardCall#b2cbc1c0`. Refuse or end running call

See https://core.telegram.org/method/phone.discardCall for reference.

func (*PhoneDiscardCallRequest) Decode

func (d *PhoneDiscardCallRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneDiscardCallRequest) Encode

func (d *PhoneDiscardCallRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneDiscardCallRequest) SetVideo

func (d *PhoneDiscardCallRequest) SetVideo(value bool)

SetVideo sets value of Video conditional field.

func (*PhoneDiscardCallRequest) String added in v0.12.0

func (d *PhoneDiscardCallRequest) String() string

String implements fmt.Stringer.

type PhoneDiscardGroupCallRequest added in v0.13.0

type PhoneDiscardGroupCallRequest struct {
	// Call field of PhoneDiscardGroupCallRequest.
	Call InputGroupCall
}

PhoneDiscardGroupCallRequest represents TL type `phone.discardGroupCall#7a777135`.

See https://core.telegram.org/method/phone.discardGroupCall for reference.

func (*PhoneDiscardGroupCallRequest) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*PhoneDiscardGroupCallRequest) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*PhoneDiscardGroupCallRequest) String added in v0.13.0

String implements fmt.Stringer.

type PhoneEditGroupCallMemberRequest added in v0.13.0

type PhoneEditGroupCallMemberRequest struct {
	// Flags field of PhoneEditGroupCallMemberRequest.
	Flags bin.Fields
	// Muted field of PhoneEditGroupCallMemberRequest.
	Muted bool
	// Call field of PhoneEditGroupCallMemberRequest.
	Call InputGroupCall
	// UserID field of PhoneEditGroupCallMemberRequest.
	UserID InputUserClass
}

PhoneEditGroupCallMemberRequest represents TL type `phone.editGroupCallMember#63146ae4`.

See https://core.telegram.org/method/phone.editGroupCallMember for reference.

func (*PhoneEditGroupCallMemberRequest) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*PhoneEditGroupCallMemberRequest) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*PhoneEditGroupCallMemberRequest) SetMuted added in v0.13.0

func (e *PhoneEditGroupCallMemberRequest) SetMuted(value bool)

SetMuted sets value of Muted conditional field.

func (*PhoneEditGroupCallMemberRequest) String added in v0.13.0

String implements fmt.Stringer.

type PhoneGetCallConfigRequest

type PhoneGetCallConfigRequest struct {
}

PhoneGetCallConfigRequest represents TL type `phone.getCallConfig#55451fa9`. Get phone call configuration to be passed to libtgvoip's shared config

See https://core.telegram.org/method/phone.getCallConfig for reference.

func (*PhoneGetCallConfigRequest) Decode

func (g *PhoneGetCallConfigRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneGetCallConfigRequest) Encode

func (g *PhoneGetCallConfigRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneGetCallConfigRequest) String added in v0.12.0

func (g *PhoneGetCallConfigRequest) String() string

String implements fmt.Stringer.

type PhoneGetGroupCallRequest added in v0.13.0

type PhoneGetGroupCallRequest struct {
	// Call field of PhoneGetGroupCallRequest.
	Call InputGroupCall
}

PhoneGetGroupCallRequest represents TL type `phone.getGroupCall#c7cb017`.

See https://core.telegram.org/method/phone.getGroupCall for reference.

func (*PhoneGetGroupCallRequest) Decode added in v0.13.0

func (g *PhoneGetGroupCallRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneGetGroupCallRequest) Encode added in v0.13.0

func (g *PhoneGetGroupCallRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneGetGroupCallRequest) String added in v0.13.0

func (g *PhoneGetGroupCallRequest) String() string

String implements fmt.Stringer.

type PhoneGetGroupParticipantsRequest added in v0.13.0

type PhoneGetGroupParticipantsRequest struct {
	// Call field of PhoneGetGroupParticipantsRequest.
	Call InputGroupCall
	// Ids field of PhoneGetGroupParticipantsRequest.
	Ids []int
	// Sources field of PhoneGetGroupParticipantsRequest.
	Sources []int
	// Offset field of PhoneGetGroupParticipantsRequest.
	Offset string
	// Limit field of PhoneGetGroupParticipantsRequest.
	Limit int
}

PhoneGetGroupParticipantsRequest represents TL type `phone.getGroupParticipants#c9f1d285`.

See https://core.telegram.org/method/phone.getGroupParticipants for reference.

func (*PhoneGetGroupParticipantsRequest) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*PhoneGetGroupParticipantsRequest) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*PhoneGetGroupParticipantsRequest) String added in v0.13.0

String implements fmt.Stringer.

type PhoneGroupCall added in v0.13.0

type PhoneGroupCall struct {
	// Call field of PhoneGroupCall.
	Call GroupCallClass
	// Participants field of PhoneGroupCall.
	Participants []GroupCallParticipant
	// ParticipantsNextOffset field of PhoneGroupCall.
	ParticipantsNextOffset string
	// Users field of PhoneGroupCall.
	Users []UserClass
}

PhoneGroupCall represents TL type `phone.groupCall#66ab0bfc`.

See https://core.telegram.org/constructor/phone.groupCall for reference.

func (*PhoneGroupCall) Decode added in v0.13.0

func (g *PhoneGroupCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneGroupCall) Encode added in v0.13.0

func (g *PhoneGroupCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneGroupCall) String added in v0.13.0

func (g *PhoneGroupCall) String() string

String implements fmt.Stringer.

type PhoneGroupParticipants added in v0.13.0

type PhoneGroupParticipants struct {
	// Count field of PhoneGroupParticipants.
	Count int
	// Participants field of PhoneGroupParticipants.
	Participants []GroupCallParticipant
	// NextOffset field of PhoneGroupParticipants.
	NextOffset string
	// Users field of PhoneGroupParticipants.
	Users []UserClass
	// Version field of PhoneGroupParticipants.
	Version int
}

PhoneGroupParticipants represents TL type `phone.groupParticipants#9cfeb92d`.

See https://core.telegram.org/constructor/phone.groupParticipants for reference.

func (*PhoneGroupParticipants) Decode added in v0.13.0

func (g *PhoneGroupParticipants) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneGroupParticipants) Encode added in v0.13.0

func (g *PhoneGroupParticipants) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneGroupParticipants) String added in v0.13.0

func (g *PhoneGroupParticipants) String() string

String implements fmt.Stringer.

type PhoneInviteToGroupCallRequest added in v0.13.0

type PhoneInviteToGroupCallRequest struct {
	// Call field of PhoneInviteToGroupCallRequest.
	Call InputGroupCall
	// Users field of PhoneInviteToGroupCallRequest.
	Users []InputUserClass
}

PhoneInviteToGroupCallRequest represents TL type `phone.inviteToGroupCall#7b393160`.

See https://core.telegram.org/method/phone.inviteToGroupCall for reference.

func (*PhoneInviteToGroupCallRequest) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*PhoneInviteToGroupCallRequest) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*PhoneInviteToGroupCallRequest) String added in v0.13.0

String implements fmt.Stringer.

type PhoneJoinGroupCallRequest added in v0.13.0

type PhoneJoinGroupCallRequest struct {
	// Flags field of PhoneJoinGroupCallRequest.
	Flags bin.Fields
	// Muted field of PhoneJoinGroupCallRequest.
	Muted bool
	// Call field of PhoneJoinGroupCallRequest.
	Call InputGroupCall
	// Params field of PhoneJoinGroupCallRequest.
	Params DataJSON
}

PhoneJoinGroupCallRequest represents TL type `phone.joinGroupCall#5f9c8e62`.

See https://core.telegram.org/method/phone.joinGroupCall for reference.

func (*PhoneJoinGroupCallRequest) Decode added in v0.13.0

func (j *PhoneJoinGroupCallRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneJoinGroupCallRequest) Encode added in v0.13.0

func (j *PhoneJoinGroupCallRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneJoinGroupCallRequest) SetMuted added in v0.13.0

func (j *PhoneJoinGroupCallRequest) SetMuted(value bool)

SetMuted sets value of Muted conditional field.

func (*PhoneJoinGroupCallRequest) String added in v0.13.0

func (j *PhoneJoinGroupCallRequest) String() string

String implements fmt.Stringer.

type PhoneLeaveGroupCallRequest added in v0.13.0

type PhoneLeaveGroupCallRequest struct {
	// Call field of PhoneLeaveGroupCallRequest.
	Call InputGroupCall
	// Source field of PhoneLeaveGroupCallRequest.
	Source int
}

PhoneLeaveGroupCallRequest represents TL type `phone.leaveGroupCall#500377f9`.

See https://core.telegram.org/method/phone.leaveGroupCall for reference.

func (*PhoneLeaveGroupCallRequest) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*PhoneLeaveGroupCallRequest) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*PhoneLeaveGroupCallRequest) String added in v0.13.0

func (l *PhoneLeaveGroupCallRequest) String() string

String implements fmt.Stringer.

type PhonePhoneCall

type PhonePhoneCall struct {
	// The VoIP phone call
	PhoneCall PhoneCallClass
	// VoIP phone call participants
	Users []UserClass
}

PhonePhoneCall represents TL type `phone.phoneCall#ec82e140`. A VoIP phone call

See https://core.telegram.org/constructor/phone.phoneCall for reference.

func (*PhonePhoneCall) Decode

func (p *PhonePhoneCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhonePhoneCall) Encode

func (p *PhonePhoneCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhonePhoneCall) String added in v0.12.0

func (p *PhonePhoneCall) String() string

String implements fmt.Stringer.

type PhoneReceivedCallRequest

type PhoneReceivedCallRequest struct {
	// The phone call we're currently in
	Peer InputPhoneCall
}

PhoneReceivedCallRequest represents TL type `phone.receivedCall#17d54f61`. Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended.

See https://core.telegram.org/method/phone.receivedCall for reference.

func (*PhoneReceivedCallRequest) Decode

func (r *PhoneReceivedCallRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneReceivedCallRequest) Encode

func (r *PhoneReceivedCallRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneReceivedCallRequest) String added in v0.12.0

func (r *PhoneReceivedCallRequest) String() string

String implements fmt.Stringer.

type PhoneRequestCallRequest

type PhoneRequestCallRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to start a video call
	Video bool
	// Destination of the phone call
	UserID InputUserClass
	// Random ID to avoid resending the same object
	RandomID int
	// Parameter for E2E encryption key exchange »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/end-to-end/voice-calls
	GAHash []byte
	// Phone call settings
	Protocol PhoneCallProtocol
}

PhoneRequestCallRequest represents TL type `phone.requestCall#42ff96ed`. Start a telegram phone call

See https://core.telegram.org/method/phone.requestCall for reference.

func (*PhoneRequestCallRequest) Decode

func (r *PhoneRequestCallRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneRequestCallRequest) Encode

func (r *PhoneRequestCallRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneRequestCallRequest) SetVideo

func (r *PhoneRequestCallRequest) SetVideo(value bool)

SetVideo sets value of Video conditional field.

func (*PhoneRequestCallRequest) String added in v0.12.0

func (r *PhoneRequestCallRequest) String() string

String implements fmt.Stringer.

type PhoneSaveCallDebugRequest

type PhoneSaveCallDebugRequest struct {
	// Phone call
	Peer InputPhoneCall
	// Debug statistics obtained from libtgvoip
	Debug DataJSON
}

PhoneSaveCallDebugRequest represents TL type `phone.saveCallDebug#277add7e`. Send phone call debug data to server

See https://core.telegram.org/method/phone.saveCallDebug for reference.

func (*PhoneSaveCallDebugRequest) Decode

func (s *PhoneSaveCallDebugRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneSaveCallDebugRequest) Encode

func (s *PhoneSaveCallDebugRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneSaveCallDebugRequest) String added in v0.12.0

func (s *PhoneSaveCallDebugRequest) String() string

String implements fmt.Stringer.

type PhoneSendSignalingDataRequest

type PhoneSendSignalingDataRequest struct {
	// Phone call
	Peer InputPhoneCall
	// Signaling payload
	Data []byte
}

PhoneSendSignalingDataRequest represents TL type `phone.sendSignalingData#ff7a9383`. Send VoIP signaling data

See https://core.telegram.org/method/phone.sendSignalingData for reference.

func (*PhoneSendSignalingDataRequest) Decode

Decode implements bin.Decoder.

func (*PhoneSendSignalingDataRequest) Encode

Encode implements bin.Encoder.

func (*PhoneSendSignalingDataRequest) String added in v0.12.0

String implements fmt.Stringer.

type PhoneSetCallRatingRequest

type PhoneSetCallRatingRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the user decided on their own initiative to rate the call
	UserInitiative bool
	// The call to rate
	Peer InputPhoneCall
	// Rating in 1-5 stars
	Rating int
	// An additional comment
	Comment string
}

PhoneSetCallRatingRequest represents TL type `phone.setCallRating#59ead627`. Rate a call

See https://core.telegram.org/method/phone.setCallRating for reference.

func (*PhoneSetCallRatingRequest) Decode

func (s *PhoneSetCallRatingRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhoneSetCallRatingRequest) Encode

func (s *PhoneSetCallRatingRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhoneSetCallRatingRequest) SetUserInitiative

func (s *PhoneSetCallRatingRequest) SetUserInitiative(value bool)

SetUserInitiative sets value of UserInitiative conditional field.

func (*PhoneSetCallRatingRequest) String added in v0.12.0

func (s *PhoneSetCallRatingRequest) String() string

String implements fmt.Stringer.

type PhoneToggleGroupCallSettingsRequest added in v0.13.0

type PhoneToggleGroupCallSettingsRequest struct {
	// Flags field of PhoneToggleGroupCallSettingsRequest.
	Flags bin.Fields
	// Call field of PhoneToggleGroupCallSettingsRequest.
	Call InputGroupCall
	// JoinMuted field of PhoneToggleGroupCallSettingsRequest.
	//
	// Use SetJoinMuted and GetJoinMuted helpers.
	JoinMuted bool
}

PhoneToggleGroupCallSettingsRequest represents TL type `phone.toggleGroupCallSettings#74bbb43d`.

See https://core.telegram.org/method/phone.toggleGroupCallSettings for reference.

func (*PhoneToggleGroupCallSettingsRequest) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*PhoneToggleGroupCallSettingsRequest) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*PhoneToggleGroupCallSettingsRequest) GetJoinMuted added in v0.17.0

func (t *PhoneToggleGroupCallSettingsRequest) GetJoinMuted() (value bool, ok bool)

GetJoinMuted returns value of JoinMuted conditional field and boolean which is true if field was set.

func (*PhoneToggleGroupCallSettingsRequest) SetJoinMuted added in v0.13.0

func (t *PhoneToggleGroupCallSettingsRequest) SetJoinMuted(value bool)

SetJoinMuted sets value of JoinMuted conditional field.

func (*PhoneToggleGroupCallSettingsRequest) String added in v0.13.0

String implements fmt.Stringer.

type Photo

type Photo struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the photo has mask stickers attached to it
	HasStickers bool
	// ID
	ID int64
	// Access hash
	AccessHash int64
	// file reference¹
	//
	// Links:
	//  1) https://core.telegram.org/api/file_reference
	FileReference []byte
	// Date of upload
	Date int
	// Available sizes for download
	Sizes []PhotoSizeClass
	// For animated profiles¹, the MPEG4 videos
	//
	// Links:
	//  1) https://core.telegram.org/api/files#animated-profile-pictures
	//
	// Use SetVideoSizes and GetVideoSizes helpers.
	VideoSizes []VideoSize
	// DC ID to use for download
	DCID int
}

Photo represents TL type `photo#fb197a65`. Photo

See https://core.telegram.org/constructor/photo for reference.

func (*Photo) Decode

func (p *Photo) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Photo) Encode

func (p *Photo) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Photo) GetVideoSizes

func (p *Photo) GetVideoSizes() (value []VideoSize, ok bool)

GetVideoSizes returns value of VideoSizes conditional field and boolean which is true if field was set.

func (*Photo) SetHasStickers

func (p *Photo) SetHasStickers(value bool)

SetHasStickers sets value of HasStickers conditional field.

func (*Photo) SetVideoSizes

func (p *Photo) SetVideoSizes(value []VideoSize)

SetVideoSizes sets value of VideoSizes conditional field.

func (*Photo) String added in v0.12.0

func (p *Photo) String() string

String implements fmt.Stringer.

type PhotoBox

type PhotoBox struct {
	Photo PhotoClass
}

Photo boxes the PhotoClass providing a helper.

func (*PhotoBox) Decode

func (b *PhotoBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PhotoBox.

func (*PhotoBox) Encode

func (b *PhotoBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PhotoBox.

type PhotoCachedSize

type PhotoCachedSize struct {
	// Thumbnail type
	Type string
	// File location
	Location FileLocationToBeDeprecated
	// Image width
	W int
	// Image height
	H int
	// Binary data, file content
	Bytes []byte
}

PhotoCachedSize represents TL type `photoCachedSize#e9a734fa`. Description of an image and its content.

See https://core.telegram.org/constructor/photoCachedSize for reference.

func (*PhotoCachedSize) Decode

func (p *PhotoCachedSize) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotoCachedSize) Encode

func (p *PhotoCachedSize) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotoCachedSize) String added in v0.12.0

func (p *PhotoCachedSize) String() string

String implements fmt.Stringer.

type PhotoClass

type PhotoClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PhotoClass represents Photo generic type.

See https://core.telegram.org/type/Photo for reference.

Example:

g, err := DecodePhoto(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PhotoEmpty: // photoEmpty#2331b22d
case *Photo: // photo#fb197a65
default: panic(v)
}

func DecodePhoto

func DecodePhoto(buf *bin.Buffer) (PhotoClass, error)

DecodePhoto implements binary de-serialization for PhotoClass.

type PhotoEmpty

type PhotoEmpty struct {
	// Photo identifier
	ID int64
}

PhotoEmpty represents TL type `photoEmpty#2331b22d`. Empty constructor, non-existent photo

See https://core.telegram.org/constructor/photoEmpty for reference.

func (*PhotoEmpty) Decode

func (p *PhotoEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotoEmpty) Encode

func (p *PhotoEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotoEmpty) String added in v0.12.0

func (p *PhotoEmpty) String() string

String implements fmt.Stringer.

type PhotoPathSize

type PhotoPathSize struct {
	// Always j
	Type string
	// Compressed SVG path payload, see here for decompression instructions¹
	//
	// Links:
	//  1) https://core.telegram.org/api/files#vector-thumbnails
	Bytes []byte
}

PhotoPathSize represents TL type `photoPathSize#d8214d41`. Messages with animated stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual lottie animation.

See https://core.telegram.org/constructor/photoPathSize for reference.

func (*PhotoPathSize) Decode

func (p *PhotoPathSize) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotoPathSize) Encode

func (p *PhotoPathSize) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotoPathSize) String added in v0.12.0

func (p *PhotoPathSize) String() string

String implements fmt.Stringer.

type PhotoSize

type PhotoSize struct {
	// Thumbnail type
	Type string
	// File location
	Location FileLocationToBeDeprecated
	// Image width
	W int
	// Image height
	H int
	// File size
	Size int
}

PhotoSize represents TL type `photoSize#77bfb61b`. Image description.

See https://core.telegram.org/constructor/photoSize for reference.

func (*PhotoSize) Decode

func (p *PhotoSize) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotoSize) Encode

func (p *PhotoSize) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotoSize) String added in v0.12.0

func (p *PhotoSize) String() string

String implements fmt.Stringer.

type PhotoSizeBox

type PhotoSizeBox struct {
	PhotoSize PhotoSizeClass
}

PhotoSize boxes the PhotoSizeClass providing a helper.

func (*PhotoSizeBox) Decode

func (b *PhotoSizeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PhotoSizeBox.

func (*PhotoSizeBox) Encode

func (b *PhotoSizeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PhotoSizeBox.

type PhotoSizeClass

type PhotoSizeClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PhotoSizeClass represents PhotoSize generic type.

See https://core.telegram.org/type/PhotoSize for reference.

Example:

g, err := DecodePhotoSize(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PhotoSizeEmpty: // photoSizeEmpty#e17e23c
case *PhotoSize: // photoSize#77bfb61b
case *PhotoCachedSize: // photoCachedSize#e9a734fa
case *PhotoStrippedSize: // photoStrippedSize#e0b0bc2e
case *PhotoSizeProgressive: // photoSizeProgressive#5aa86a51
case *PhotoPathSize: // photoPathSize#d8214d41
default: panic(v)
}

func DecodePhotoSize

func DecodePhotoSize(buf *bin.Buffer) (PhotoSizeClass, error)

DecodePhotoSize implements binary de-serialization for PhotoSizeClass.

type PhotoSizeEmpty

type PhotoSizeEmpty struct {
	// Thumbnail type (see. photoSize¹)
	//
	// Links:
	//  1) https://core.telegram.org/constructor/photoSize
	Type string
}

PhotoSizeEmpty represents TL type `photoSizeEmpty#e17e23c`. Empty constructor. Image with this thumbnail is unavailable.

See https://core.telegram.org/constructor/photoSizeEmpty for reference.

func (*PhotoSizeEmpty) Decode

func (p *PhotoSizeEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotoSizeEmpty) Encode

func (p *PhotoSizeEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotoSizeEmpty) String added in v0.12.0

func (p *PhotoSizeEmpty) String() string

String implements fmt.Stringer.

type PhotoSizeProgressive

type PhotoSizeProgressive struct {
	// Photosize type
	Type string
	// File location
	Location FileLocationToBeDeprecated
	// Photo width
	W int
	// Photo height
	H int
	// Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image.
	Sizes []int
}

PhotoSizeProgressive represents TL type `photoSizeProgressive#5aa86a51`. Progressively encoded photosize

See https://core.telegram.org/constructor/photoSizeProgressive for reference.

func (*PhotoSizeProgressive) Decode

func (p *PhotoSizeProgressive) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotoSizeProgressive) Encode

func (p *PhotoSizeProgressive) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotoSizeProgressive) String added in v0.12.0

func (p *PhotoSizeProgressive) String() string

String implements fmt.Stringer.

type PhotoStrippedSize

type PhotoStrippedSize struct {
	// Thumbnail type
	Type string
	// Thumbnail data, see here for more info on decompression »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/files#stripped-thumbnails
	Bytes []byte
}

PhotoStrippedSize represents TL type `photoStrippedSize#e0b0bc2e`. A low-resolution compressed JPG payload

See https://core.telegram.org/constructor/photoStrippedSize for reference.

func (*PhotoStrippedSize) Decode

func (p *PhotoStrippedSize) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotoStrippedSize) Encode

func (p *PhotoStrippedSize) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotoStrippedSize) String added in v0.12.0

func (p *PhotoStrippedSize) String() string

String implements fmt.Stringer.

type PhotosDeletePhotosRequest

type PhotosDeletePhotosRequest struct {
	// Input photos to delete
	ID []InputPhotoClass
}

PhotosDeletePhotosRequest represents TL type `photos.deletePhotos#87cf7f2f`. Deletes profile photos.

See https://core.telegram.org/method/photos.deletePhotos for reference.

func (*PhotosDeletePhotosRequest) Decode

func (d *PhotosDeletePhotosRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotosDeletePhotosRequest) Encode

func (d *PhotosDeletePhotosRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotosDeletePhotosRequest) String added in v0.12.0

func (d *PhotosDeletePhotosRequest) String() string

String implements fmt.Stringer.

type PhotosGetUserPhotosRequest

type PhotosGetUserPhotosRequest struct {
	// User ID
	UserID InputUserClass
	// Number of list elements to be skipped
	Offset int
	// If a positive value was transferred, the method will return only photos with IDs less than the set one
	MaxID int64
	// Number of list elements to be returned
	Limit int
}

PhotosGetUserPhotosRequest represents TL type `photos.getUserPhotos#91cd32a8`. Returns the list of user photos.

See https://core.telegram.org/method/photos.getUserPhotos for reference.

func (*PhotosGetUserPhotosRequest) Decode

Decode implements bin.Decoder.

func (*PhotosGetUserPhotosRequest) Encode

Encode implements bin.Encoder.

func (*PhotosGetUserPhotosRequest) String added in v0.12.0

func (g *PhotosGetUserPhotosRequest) String() string

String implements fmt.Stringer.

type PhotosPhoto

type PhotosPhoto struct {
	// Photo
	Photo PhotoClass
	// Users
	Users []UserClass
}

PhotosPhoto represents TL type `photos.photo#20212ca8`. Photo with auxiliary data.

See https://core.telegram.org/constructor/photos.photo for reference.

func (*PhotosPhoto) Decode

func (p *PhotosPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotosPhoto) Encode

func (p *PhotosPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotosPhoto) String added in v0.12.0

func (p *PhotosPhoto) String() string

String implements fmt.Stringer.

type PhotosPhotos

type PhotosPhotos struct {
	// List of photos
	Photos []PhotoClass
	// List of mentioned users
	Users []UserClass
}

PhotosPhotos represents TL type `photos.photos#8dca6aa5`. Full list of photos with auxiliary data.

See https://core.telegram.org/constructor/photos.photos for reference.

func (*PhotosPhotos) Decode

func (p *PhotosPhotos) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotosPhotos) Encode

func (p *PhotosPhotos) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotosPhotos) String added in v0.12.0

func (p *PhotosPhotos) String() string

String implements fmt.Stringer.

type PhotosPhotosBox

type PhotosPhotosBox struct {
	Photos PhotosPhotosClass
}

PhotosPhotos boxes the PhotosPhotosClass providing a helper.

func (*PhotosPhotosBox) Decode

func (b *PhotosPhotosBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PhotosPhotosBox.

func (*PhotosPhotosBox) Encode

func (b *PhotosPhotosBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PhotosPhotosBox.

type PhotosPhotosClass

type PhotosPhotosClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PhotosPhotosClass represents photos.Photos generic type.

See https://core.telegram.org/type/photos.Photos for reference.

Example:

g, err := DecodePhotosPhotos(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PhotosPhotos: // photos.photos#8dca6aa5
case *PhotosPhotosSlice: // photos.photosSlice#15051f54
default: panic(v)
}

func DecodePhotosPhotos

func DecodePhotosPhotos(buf *bin.Buffer) (PhotosPhotosClass, error)

DecodePhotosPhotos implements binary de-serialization for PhotosPhotosClass.

type PhotosPhotosSlice

type PhotosPhotosSlice struct {
	// Total number of photos
	Count int
	// List of photos
	Photos []PhotoClass
	// List of mentioned users
	Users []UserClass
}

PhotosPhotosSlice represents TL type `photos.photosSlice#15051f54`. Incomplete list of photos with auxiliary data.

See https://core.telegram.org/constructor/photos.photosSlice for reference.

func (*PhotosPhotosSlice) Decode

func (p *PhotosPhotosSlice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PhotosPhotosSlice) Encode

func (p *PhotosPhotosSlice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PhotosPhotosSlice) String added in v0.12.0

func (p *PhotosPhotosSlice) String() string

String implements fmt.Stringer.

type PhotosUpdateProfilePhotoRequest

type PhotosUpdateProfilePhotoRequest struct {
	// Input photo
	ID InputPhotoClass
}

PhotosUpdateProfilePhotoRequest represents TL type `photos.updateProfilePhoto#72d4742c`. Installs a previously uploaded photo as a profile photo.

See https://core.telegram.org/method/photos.updateProfilePhoto for reference.

func (*PhotosUpdateProfilePhotoRequest) Decode

Decode implements bin.Decoder.

func (*PhotosUpdateProfilePhotoRequest) Encode

Encode implements bin.Encoder.

func (*PhotosUpdateProfilePhotoRequest) String added in v0.12.0

String implements fmt.Stringer.

type PhotosUploadProfilePhotoRequest

type PhotosUploadProfilePhotoRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// File saved in parts by means of upload.saveFilePart¹ method
	//
	// Links:
	//  1) https://core.telegram.org/method/upload.saveFilePart
	//
	// Use SetFile and GetFile helpers.
	File InputFileClass
	// Animated profile picture¹ video
	//
	// Links:
	//  1) https://core.telegram.org/api/files#animated-profile-pictures
	//
	// Use SetVideo and GetVideo helpers.
	Video InputFileClass
	// Floating point UNIX timestamp in seconds, indicating the frame of the video that should be used as static preview.
	//
	// Use SetVideoStartTs and GetVideoStartTs helpers.
	VideoStartTs float64
}

PhotosUploadProfilePhotoRequest represents TL type `photos.uploadProfilePhoto#89f30f69`. Updates current user profile photo.

See https://core.telegram.org/method/photos.uploadProfilePhoto for reference.

func (*PhotosUploadProfilePhotoRequest) Decode

Decode implements bin.Decoder.

func (*PhotosUploadProfilePhotoRequest) Encode

Encode implements bin.Encoder.

func (*PhotosUploadProfilePhotoRequest) GetFile

func (u *PhotosUploadProfilePhotoRequest) GetFile() (value InputFileClass, ok bool)

GetFile returns value of File conditional field and boolean which is true if field was set.

func (*PhotosUploadProfilePhotoRequest) GetVideo

func (u *PhotosUploadProfilePhotoRequest) GetVideo() (value InputFileClass, ok bool)

GetVideo returns value of Video conditional field and boolean which is true if field was set.

func (*PhotosUploadProfilePhotoRequest) GetVideoStartTs

func (u *PhotosUploadProfilePhotoRequest) GetVideoStartTs() (value float64, ok bool)

GetVideoStartTs returns value of VideoStartTs conditional field and boolean which is true if field was set.

func (*PhotosUploadProfilePhotoRequest) SetFile

SetFile sets value of File conditional field.

func (*PhotosUploadProfilePhotoRequest) SetVideo

SetVideo sets value of Video conditional field.

func (*PhotosUploadProfilePhotoRequest) SetVideoStartTs

func (u *PhotosUploadProfilePhotoRequest) SetVideoStartTs(value float64)

SetVideoStartTs sets value of VideoStartTs conditional field.

func (*PhotosUploadProfilePhotoRequest) String added in v0.12.0

String implements fmt.Stringer.

type PinnedChannelMessagesHandler added in v0.9.0

type PinnedChannelMessagesHandler func(ctx UpdateContext, update *UpdatePinnedChannelMessages) error

PinnedChannelMessagesHandler is a PinnedChannelMessages event handler.

type PinnedDialogsHandler added in v0.9.0

type PinnedDialogsHandler func(ctx UpdateContext, update *UpdatePinnedDialogs) error

PinnedDialogsHandler is a PinnedDialogs event handler.

type PinnedMessagesHandler added in v0.9.0

type PinnedMessagesHandler func(ctx UpdateContext, update *UpdatePinnedMessages) error

PinnedMessagesHandler is a PinnedMessages event handler.

type Poll

type Poll struct {
	// ID of the poll
	ID int64
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the poll is closed and doesn't accept any more answers
	Closed bool
	// Whether cast votes are publicly visible to all users (non-anonymous poll)
	PublicVoters bool
	// Whether multiple options can be chosen as answer
	MultipleChoice bool
	// Whether this is a quiz (with wrong and correct answers, results shown in the return type)
	Quiz bool
	// The question of the poll
	Question string
	// The possible answers, vote using messages.sendVote¹.
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.sendVote
	Answers []PollAnswer
	// Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.
	//
	// Use SetClosePeriod and GetClosePeriod helpers.
	ClosePeriod int
	// Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close_period.
	//
	// Use SetCloseDate and GetCloseDate helpers.
	CloseDate int
}

Poll represents TL type `poll#86e18161`. Poll

See https://core.telegram.org/constructor/poll for reference.

func (*Poll) Decode

func (p *Poll) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Poll) Encode

func (p *Poll) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Poll) GetCloseDate

func (p *Poll) GetCloseDate() (value int, ok bool)

GetCloseDate returns value of CloseDate conditional field and boolean which is true if field was set.

func (*Poll) GetClosePeriod

func (p *Poll) GetClosePeriod() (value int, ok bool)

GetClosePeriod returns value of ClosePeriod conditional field and boolean which is true if field was set.

func (*Poll) SetCloseDate

func (p *Poll) SetCloseDate(value int)

SetCloseDate sets value of CloseDate conditional field.

func (*Poll) SetClosePeriod

func (p *Poll) SetClosePeriod(value int)

SetClosePeriod sets value of ClosePeriod conditional field.

func (*Poll) SetClosed

func (p *Poll) SetClosed(value bool)

SetClosed sets value of Closed conditional field.

func (*Poll) SetMultipleChoice

func (p *Poll) SetMultipleChoice(value bool)

SetMultipleChoice sets value of MultipleChoice conditional field.

func (*Poll) SetPublicVoters

func (p *Poll) SetPublicVoters(value bool)

SetPublicVoters sets value of PublicVoters conditional field.

func (*Poll) SetQuiz

func (p *Poll) SetQuiz(value bool)

SetQuiz sets value of Quiz conditional field.

func (*Poll) String added in v0.12.0

func (p *Poll) String() string

String implements fmt.Stringer.

type PollAnswer

type PollAnswer struct {
	// Textual representation of the answer
	Text string
	// The param that has to be passed to messages.sendVote¹.
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.sendVote
	Option []byte
}

PollAnswer represents TL type `pollAnswer#6ca9c2e9`. A possible answer of a poll

See https://core.telegram.org/constructor/pollAnswer for reference.

func (*PollAnswer) Decode

func (p *PollAnswer) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PollAnswer) Encode

func (p *PollAnswer) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PollAnswer) String added in v0.12.0

func (p *PollAnswer) String() string

String implements fmt.Stringer.

type PollAnswerVoters

type PollAnswerVoters struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether we have chosen this answer
	Chosen bool
	// For quizes, whether the option we have chosen is correct
	Correct bool
	// The param that has to be passed to messages.sendVote¹.
	//
	// Links:
	//  1) https://core.telegram.org/method/messages.sendVote
	Option []byte
	// How many users voted for this option
	Voters int
}

PollAnswerVoters represents TL type `pollAnswerVoters#3b6ddad2`. A poll answer, and how users voted on it

See https://core.telegram.org/constructor/pollAnswerVoters for reference.

func (*PollAnswerVoters) Decode

func (p *PollAnswerVoters) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PollAnswerVoters) Encode

func (p *PollAnswerVoters) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PollAnswerVoters) SetChosen

func (p *PollAnswerVoters) SetChosen(value bool)

SetChosen sets value of Chosen conditional field.

func (*PollAnswerVoters) SetCorrect

func (p *PollAnswerVoters) SetCorrect(value bool)

SetCorrect sets value of Correct conditional field.

func (*PollAnswerVoters) String added in v0.12.0

func (p *PollAnswerVoters) String() string

String implements fmt.Stringer.

type PollResults

type PollResults struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Similar to min¹ objects, used for poll constructors that are the same for all users so they don't have option chosen by the current user (you can use messages.getPollResults² to get the full poll results).
	//
	// Links:
	//  1) https://core.telegram.org/api/min
	//  2) https://core.telegram.org/method/messages.getPollResults
	Min bool
	// Poll results
	//
	// Use SetResults and GetResults helpers.
	Results []PollAnswerVoters
	// Total number of people that voted in the poll
	//
	// Use SetTotalVoters and GetTotalVoters helpers.
	TotalVoters int
	// IDs of the last users that recently voted in the poll
	//
	// Use SetRecentVoters and GetRecentVoters helpers.
	RecentVoters []int
	// Explanation of quiz solution
	//
	// Use SetSolution and GetSolution helpers.
	Solution string
	// Message entities for styled text in quiz solution¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetSolutionEntities and GetSolutionEntities helpers.
	SolutionEntities []MessageEntityClass
}

PollResults represents TL type `pollResults#badcc1a3`. Results of poll

See https://core.telegram.org/constructor/pollResults for reference.

func (*PollResults) Decode

func (p *PollResults) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PollResults) Encode

func (p *PollResults) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PollResults) GetRecentVoters

func (p *PollResults) GetRecentVoters() (value []int, ok bool)

GetRecentVoters returns value of RecentVoters conditional field and boolean which is true if field was set.

func (*PollResults) GetResults

func (p *PollResults) GetResults() (value []PollAnswerVoters, ok bool)

GetResults returns value of Results conditional field and boolean which is true if field was set.

func (*PollResults) GetSolution

func (p *PollResults) GetSolution() (value string, ok bool)

GetSolution returns value of Solution conditional field and boolean which is true if field was set.

func (*PollResults) GetSolutionEntities

func (p *PollResults) GetSolutionEntities() (value []MessageEntityClass, ok bool)

GetSolutionEntities returns value of SolutionEntities conditional field and boolean which is true if field was set.

func (*PollResults) GetTotalVoters

func (p *PollResults) GetTotalVoters() (value int, ok bool)

GetTotalVoters returns value of TotalVoters conditional field and boolean which is true if field was set.

func (*PollResults) SetMin

func (p *PollResults) SetMin(value bool)

SetMin sets value of Min conditional field.

func (*PollResults) SetRecentVoters

func (p *PollResults) SetRecentVoters(value []int)

SetRecentVoters sets value of RecentVoters conditional field.

func (*PollResults) SetResults

func (p *PollResults) SetResults(value []PollAnswerVoters)

SetResults sets value of Results conditional field.

func (*PollResults) SetSolution

func (p *PollResults) SetSolution(value string)

SetSolution sets value of Solution conditional field.

func (*PollResults) SetSolutionEntities

func (p *PollResults) SetSolutionEntities(value []MessageEntityClass)

SetSolutionEntities sets value of SolutionEntities conditional field.

func (*PollResults) SetTotalVoters

func (p *PollResults) SetTotalVoters(value int)

SetTotalVoters sets value of TotalVoters conditional field.

func (*PollResults) String added in v0.12.0

func (p *PollResults) String() string

String implements fmt.Stringer.

type PopularContact

type PopularContact struct {
	// Contact identifier
	ClientID int64
	// How many people imported this contact
	Importers int
}

PopularContact represents TL type `popularContact#5ce14175`. Popular contact

See https://core.telegram.org/constructor/popularContact for reference.

func (*PopularContact) Decode

func (p *PopularContact) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PopularContact) Encode

func (p *PopularContact) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PopularContact) String added in v0.12.0

func (p *PopularContact) String() string

String implements fmt.Stringer.

type PostAddress

type PostAddress struct {
	// First line for the address
	StreetLine1 string
	// Second line for the address
	StreetLine2 string
	// City
	City string
	// State, if applicable (empty otherwise)
	State string
	// ISO 3166-1 alpha-2 country code
	CountryIso2 string
	// Address post code
	PostCode string
}

PostAddress represents TL type `postAddress#1e8caaeb`. Shipping address

See https://core.telegram.org/constructor/postAddress for reference.

func (*PostAddress) Decode

func (p *PostAddress) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PostAddress) Encode

func (p *PostAddress) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PostAddress) String added in v0.12.0

func (p *PostAddress) String() string

String implements fmt.Stringer.

type PrivacyHandler added in v0.9.0

type PrivacyHandler func(ctx UpdateContext, update *UpdatePrivacy) error

PrivacyHandler is a Privacy event handler.

type PrivacyKeyAddedByPhone

type PrivacyKeyAddedByPhone struct {
}

PrivacyKeyAddedByPhone represents TL type `privacyKeyAddedByPhone#42ffd42b`. Whether people can add you to their contact list by your phone number

See https://core.telegram.org/constructor/privacyKeyAddedByPhone for reference.

func (*PrivacyKeyAddedByPhone) Decode

func (p *PrivacyKeyAddedByPhone) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyKeyAddedByPhone) Encode

func (p *PrivacyKeyAddedByPhone) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyKeyAddedByPhone) String added in v0.12.0

func (p *PrivacyKeyAddedByPhone) String() string

String implements fmt.Stringer.

type PrivacyKeyBox

type PrivacyKeyBox struct {
	PrivacyKey PrivacyKeyClass
}

PrivacyKey boxes the PrivacyKeyClass providing a helper.

func (*PrivacyKeyBox) Decode

func (b *PrivacyKeyBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PrivacyKeyBox.

func (*PrivacyKeyBox) Encode

func (b *PrivacyKeyBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PrivacyKeyBox.

type PrivacyKeyChatInvite

type PrivacyKeyChatInvite struct {
}

PrivacyKeyChatInvite represents TL type `privacyKeyChatInvite#500e6dfa`. Whether the user can be invited to chats

See https://core.telegram.org/constructor/privacyKeyChatInvite for reference.

func (*PrivacyKeyChatInvite) Decode

func (p *PrivacyKeyChatInvite) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyKeyChatInvite) Encode

func (p *PrivacyKeyChatInvite) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyKeyChatInvite) String added in v0.12.0

func (p *PrivacyKeyChatInvite) String() string

String implements fmt.Stringer.

type PrivacyKeyClass

type PrivacyKeyClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PrivacyKeyClass represents PrivacyKey generic type.

See https://core.telegram.org/type/PrivacyKey for reference.

Example:

g, err := DecodePrivacyKey(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PrivacyKeyStatusTimestamp: // privacyKeyStatusTimestamp#bc2eab30
case *PrivacyKeyChatInvite: // privacyKeyChatInvite#500e6dfa
case *PrivacyKeyPhoneCall: // privacyKeyPhoneCall#3d662b7b
case *PrivacyKeyPhoneP2P: // privacyKeyPhoneP2P#39491cc8
case *PrivacyKeyForwards: // privacyKeyForwards#69ec56a3
case *PrivacyKeyProfilePhoto: // privacyKeyProfilePhoto#96151fed
case *PrivacyKeyPhoneNumber: // privacyKeyPhoneNumber#d19ae46d
case *PrivacyKeyAddedByPhone: // privacyKeyAddedByPhone#42ffd42b
default: panic(v)
}

func DecodePrivacyKey

func DecodePrivacyKey(buf *bin.Buffer) (PrivacyKeyClass, error)

DecodePrivacyKey implements binary de-serialization for PrivacyKeyClass.

type PrivacyKeyForwards

type PrivacyKeyForwards struct {
}

PrivacyKeyForwards represents TL type `privacyKeyForwards#69ec56a3`. Whether messages forwarded from the user will be anonymously forwarded¹

Links:

  1. https://telegram.org/blog/unsend-privacy-emoji#anonymous-forwarding

See https://core.telegram.org/constructor/privacyKeyForwards for reference.

func (*PrivacyKeyForwards) Decode

func (p *PrivacyKeyForwards) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyKeyForwards) Encode

func (p *PrivacyKeyForwards) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyKeyForwards) String added in v0.12.0

func (p *PrivacyKeyForwards) String() string

String implements fmt.Stringer.

type PrivacyKeyPhoneCall

type PrivacyKeyPhoneCall struct {
}

PrivacyKeyPhoneCall represents TL type `privacyKeyPhoneCall#3d662b7b`. Whether the user accepts phone calls

See https://core.telegram.org/constructor/privacyKeyPhoneCall for reference.

func (*PrivacyKeyPhoneCall) Decode

func (p *PrivacyKeyPhoneCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyKeyPhoneCall) Encode

func (p *PrivacyKeyPhoneCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyKeyPhoneCall) String added in v0.12.0

func (p *PrivacyKeyPhoneCall) String() string

String implements fmt.Stringer.

type PrivacyKeyPhoneNumber

type PrivacyKeyPhoneNumber struct {
}

PrivacyKeyPhoneNumber represents TL type `privacyKeyPhoneNumber#d19ae46d`. Whether the user allows us to see his phone number

See https://core.telegram.org/constructor/privacyKeyPhoneNumber for reference.

func (*PrivacyKeyPhoneNumber) Decode

func (p *PrivacyKeyPhoneNumber) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyKeyPhoneNumber) Encode

func (p *PrivacyKeyPhoneNumber) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyKeyPhoneNumber) String added in v0.12.0

func (p *PrivacyKeyPhoneNumber) String() string

String implements fmt.Stringer.

type PrivacyKeyPhoneP2P

type PrivacyKeyPhoneP2P struct {
}

PrivacyKeyPhoneP2P represents TL type `privacyKeyPhoneP2P#39491cc8`. Whether P2P connections in phone calls are allowed

See https://core.telegram.org/constructor/privacyKeyPhoneP2P for reference.

func (*PrivacyKeyPhoneP2P) Decode

func (p *PrivacyKeyPhoneP2P) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyKeyPhoneP2P) Encode

func (p *PrivacyKeyPhoneP2P) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyKeyPhoneP2P) String added in v0.12.0

func (p *PrivacyKeyPhoneP2P) String() string

String implements fmt.Stringer.

type PrivacyKeyProfilePhoto

type PrivacyKeyProfilePhoto struct {
}

PrivacyKeyProfilePhoto represents TL type `privacyKeyProfilePhoto#96151fed`. Whether the profile picture of the user is visible

See https://core.telegram.org/constructor/privacyKeyProfilePhoto for reference.

func (*PrivacyKeyProfilePhoto) Decode

func (p *PrivacyKeyProfilePhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyKeyProfilePhoto) Encode

func (p *PrivacyKeyProfilePhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyKeyProfilePhoto) String added in v0.12.0

func (p *PrivacyKeyProfilePhoto) String() string

String implements fmt.Stringer.

type PrivacyKeyStatusTimestamp

type PrivacyKeyStatusTimestamp struct {
}

PrivacyKeyStatusTimestamp represents TL type `privacyKeyStatusTimestamp#bc2eab30`. Whether we can see the last online timestamp

See https://core.telegram.org/constructor/privacyKeyStatusTimestamp for reference.

func (*PrivacyKeyStatusTimestamp) Decode

func (p *PrivacyKeyStatusTimestamp) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyKeyStatusTimestamp) Encode

func (p *PrivacyKeyStatusTimestamp) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyKeyStatusTimestamp) String added in v0.12.0

func (p *PrivacyKeyStatusTimestamp) String() string

String implements fmt.Stringer.

type PrivacyRuleBox

type PrivacyRuleBox struct {
	PrivacyRule PrivacyRuleClass
}

PrivacyRule boxes the PrivacyRuleClass providing a helper.

func (*PrivacyRuleBox) Decode

func (b *PrivacyRuleBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for PrivacyRuleBox.

func (*PrivacyRuleBox) Encode

func (b *PrivacyRuleBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for PrivacyRuleBox.

type PrivacyRuleClass

type PrivacyRuleClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

PrivacyRuleClass represents PrivacyRule generic type.

See https://core.telegram.org/type/PrivacyRule for reference.

Example:

g, err := DecodePrivacyRule(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *PrivacyValueAllowContacts: // privacyValueAllowContacts#fffe1bac
case *PrivacyValueAllowAll: // privacyValueAllowAll#65427b82
case *PrivacyValueAllowUsers: // privacyValueAllowUsers#4d5bbe0c
case *PrivacyValueDisallowContacts: // privacyValueDisallowContacts#f888fa1a
case *PrivacyValueDisallowAll: // privacyValueDisallowAll#8b73e763
case *PrivacyValueDisallowUsers: // privacyValueDisallowUsers#c7f49b7
case *PrivacyValueAllowChatParticipants: // privacyValueAllowChatParticipants#18be796b
case *PrivacyValueDisallowChatParticipants: // privacyValueDisallowChatParticipants#acae0690
default: panic(v)
}

func DecodePrivacyRule

func DecodePrivacyRule(buf *bin.Buffer) (PrivacyRuleClass, error)

DecodePrivacyRule implements binary de-serialization for PrivacyRuleClass.

type PrivacyValueAllowAll

type PrivacyValueAllowAll struct {
}

PrivacyValueAllowAll represents TL type `privacyValueAllowAll#65427b82`. Allow all users

See https://core.telegram.org/constructor/privacyValueAllowAll for reference.

func (*PrivacyValueAllowAll) Decode

func (p *PrivacyValueAllowAll) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyValueAllowAll) Encode

func (p *PrivacyValueAllowAll) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyValueAllowAll) String added in v0.12.0

func (p *PrivacyValueAllowAll) String() string

String implements fmt.Stringer.

type PrivacyValueAllowChatParticipants

type PrivacyValueAllowChatParticipants struct {
	// Allowed chats
	Chats []int
}

PrivacyValueAllowChatParticipants represents TL type `privacyValueAllowChatParticipants#18be796b`. Allow all participants of certain chats

See https://core.telegram.org/constructor/privacyValueAllowChatParticipants for reference.

func (*PrivacyValueAllowChatParticipants) Decode

Decode implements bin.Decoder.

func (*PrivacyValueAllowChatParticipants) Encode

Encode implements bin.Encoder.

func (*PrivacyValueAllowChatParticipants) String added in v0.12.0

String implements fmt.Stringer.

type PrivacyValueAllowContacts

type PrivacyValueAllowContacts struct {
}

PrivacyValueAllowContacts represents TL type `privacyValueAllowContacts#fffe1bac`. Allow all contacts

See https://core.telegram.org/constructor/privacyValueAllowContacts for reference.

func (*PrivacyValueAllowContacts) Decode

func (p *PrivacyValueAllowContacts) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyValueAllowContacts) Encode

func (p *PrivacyValueAllowContacts) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyValueAllowContacts) String added in v0.12.0

func (p *PrivacyValueAllowContacts) String() string

String implements fmt.Stringer.

type PrivacyValueAllowUsers

type PrivacyValueAllowUsers struct {
	// Allowed users
	Users []int
}

PrivacyValueAllowUsers represents TL type `privacyValueAllowUsers#4d5bbe0c`. Allow only certain users

See https://core.telegram.org/constructor/privacyValueAllowUsers for reference.

func (*PrivacyValueAllowUsers) Decode

func (p *PrivacyValueAllowUsers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyValueAllowUsers) Encode

func (p *PrivacyValueAllowUsers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyValueAllowUsers) String added in v0.12.0

func (p *PrivacyValueAllowUsers) String() string

String implements fmt.Stringer.

type PrivacyValueDisallowAll

type PrivacyValueDisallowAll struct {
}

PrivacyValueDisallowAll represents TL type `privacyValueDisallowAll#8b73e763`. Disallow all users

See https://core.telegram.org/constructor/privacyValueDisallowAll for reference.

func (*PrivacyValueDisallowAll) Decode

func (p *PrivacyValueDisallowAll) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyValueDisallowAll) Encode

func (p *PrivacyValueDisallowAll) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyValueDisallowAll) String added in v0.12.0

func (p *PrivacyValueDisallowAll) String() string

String implements fmt.Stringer.

type PrivacyValueDisallowChatParticipants

type PrivacyValueDisallowChatParticipants struct {
	// Disallowed chats
	Chats []int
}

PrivacyValueDisallowChatParticipants represents TL type `privacyValueDisallowChatParticipants#acae0690`. Disallow only participants of certain chats

See https://core.telegram.org/constructor/privacyValueDisallowChatParticipants for reference.

func (*PrivacyValueDisallowChatParticipants) Decode

Decode implements bin.Decoder.

func (*PrivacyValueDisallowChatParticipants) Encode

Encode implements bin.Encoder.

func (*PrivacyValueDisallowChatParticipants) String added in v0.12.0

String implements fmt.Stringer.

type PrivacyValueDisallowContacts

type PrivacyValueDisallowContacts struct {
}

PrivacyValueDisallowContacts represents TL type `privacyValueDisallowContacts#f888fa1a`. Disallow only contacts

See https://core.telegram.org/constructor/privacyValueDisallowContacts for reference.

func (*PrivacyValueDisallowContacts) Decode

Decode implements bin.Decoder.

func (*PrivacyValueDisallowContacts) Encode

Encode implements bin.Encoder.

func (*PrivacyValueDisallowContacts) String added in v0.12.0

String implements fmt.Stringer.

type PrivacyValueDisallowUsers

type PrivacyValueDisallowUsers struct {
	// Disallowed users
	Users []int
}

PrivacyValueDisallowUsers represents TL type `privacyValueDisallowUsers#c7f49b7`. Disallow only certain users

See https://core.telegram.org/constructor/privacyValueDisallowUsers for reference.

func (*PrivacyValueDisallowUsers) Decode

func (p *PrivacyValueDisallowUsers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*PrivacyValueDisallowUsers) Encode

func (p *PrivacyValueDisallowUsers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*PrivacyValueDisallowUsers) String added in v0.12.0

func (p *PrivacyValueDisallowUsers) String() string

String implements fmt.Stringer.

type PtsChangedHandler added in v0.9.0

type PtsChangedHandler func(ctx UpdateContext, update *UpdatePtsChanged) error

PtsChangedHandler is a PtsChanged event handler.

type ReadChannelDiscussionInboxHandler added in v0.9.0

type ReadChannelDiscussionInboxHandler func(ctx UpdateContext, update *UpdateReadChannelDiscussionInbox) error

ReadChannelDiscussionInboxHandler is a ReadChannelDiscussionInbox event handler.

type ReadChannelDiscussionOutboxHandler added in v0.9.0

type ReadChannelDiscussionOutboxHandler func(ctx UpdateContext, update *UpdateReadChannelDiscussionOutbox) error

ReadChannelDiscussionOutboxHandler is a ReadChannelDiscussionOutbox event handler.

type ReadChannelInboxHandler added in v0.9.0

type ReadChannelInboxHandler func(ctx UpdateContext, update *UpdateReadChannelInbox) error

ReadChannelInboxHandler is a ReadChannelInbox event handler.

type ReadChannelOutboxHandler added in v0.9.0

type ReadChannelOutboxHandler func(ctx UpdateContext, update *UpdateReadChannelOutbox) error

ReadChannelOutboxHandler is a ReadChannelOutbox event handler.

type ReadFeaturedStickersHandler added in v0.9.0

type ReadFeaturedStickersHandler func(ctx UpdateContext, update *UpdateReadFeaturedStickers) error

ReadFeaturedStickersHandler is a ReadFeaturedStickers event handler.

type ReadHistoryInboxHandler added in v0.9.0

type ReadHistoryInboxHandler func(ctx UpdateContext, update *UpdateReadHistoryInbox) error

ReadHistoryInboxHandler is a ReadHistoryInbox event handler.

type ReadHistoryOutboxHandler added in v0.9.0

type ReadHistoryOutboxHandler func(ctx UpdateContext, update *UpdateReadHistoryOutbox) error

ReadHistoryOutboxHandler is a ReadHistoryOutbox event handler.

type ReadMessagesContentsHandler added in v0.9.0

type ReadMessagesContentsHandler func(ctx UpdateContext, update *UpdateReadMessagesContents) error

ReadMessagesContentsHandler is a ReadMessagesContents event handler.

type ReceivedNotifyMessage

type ReceivedNotifyMessage struct {
	// Message ID, for which PUSH-notifications were canceled
	ID int
	// Reserved for future use
	Flags int
}

ReceivedNotifyMessage represents TL type `receivedNotifyMessage#a384b779`. Message ID, for which PUSH-notifications were cancelled.

See https://core.telegram.org/constructor/receivedNotifyMessage for reference.

func (*ReceivedNotifyMessage) Decode

func (r *ReceivedNotifyMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ReceivedNotifyMessage) Encode

func (r *ReceivedNotifyMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ReceivedNotifyMessage) String added in v0.12.0

func (r *ReceivedNotifyMessage) String() string

String implements fmt.Stringer.

type ReceivedNotifyMessageVector added in v0.8.0

type ReceivedNotifyMessageVector struct {
	// Elements of Vector<ReceivedNotifyMessage>
	Elems []ReceivedNotifyMessage
}

ReceivedNotifyMessageVector is a box for Vector<ReceivedNotifyMessage>

func (*ReceivedNotifyMessageVector) Decode added in v0.8.0

func (vec *ReceivedNotifyMessageVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ReceivedNotifyMessageVector) Encode added in v0.8.0

func (vec *ReceivedNotifyMessageVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ReceivedNotifyMessageVector) String added in v0.12.0

func (vec *ReceivedNotifyMessageVector) String() string

String implements fmt.Stringer.

type RecentMeUrlBox

type RecentMeUrlBox struct {
	RecentMeUrl RecentMeUrlClass
}

RecentMeUrl boxes the RecentMeUrlClass providing a helper.

func (*RecentMeUrlBox) Decode

func (b *RecentMeUrlBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for RecentMeUrlBox.

func (*RecentMeUrlBox) Encode

func (b *RecentMeUrlBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for RecentMeUrlBox.

type RecentMeUrlChat

type RecentMeUrlChat struct {
	// t.me URL
	URL string
	// Chat ID
	ChatID int
}

RecentMeUrlChat represents TL type `recentMeUrlChat#a01b22f9`. Recent t.me link to a chat

See https://core.telegram.org/constructor/recentMeUrlChat for reference.

func (*RecentMeUrlChat) Decode

func (r *RecentMeUrlChat) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*RecentMeUrlChat) Encode

func (r *RecentMeUrlChat) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*RecentMeUrlChat) String added in v0.12.0

func (r *RecentMeUrlChat) String() string

String implements fmt.Stringer.

type RecentMeUrlChatInvite

type RecentMeUrlChatInvite struct {
	// t.me URL
	URL string
	// Chat invitation
	ChatInvite ChatInviteClass
}

RecentMeUrlChatInvite represents TL type `recentMeUrlChatInvite#eb49081d`. Recent t.me invite link to a chat

See https://core.telegram.org/constructor/recentMeUrlChatInvite for reference.

func (*RecentMeUrlChatInvite) Decode

func (r *RecentMeUrlChatInvite) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*RecentMeUrlChatInvite) Encode

func (r *RecentMeUrlChatInvite) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*RecentMeUrlChatInvite) String added in v0.12.0

func (r *RecentMeUrlChatInvite) String() string

String implements fmt.Stringer.

type RecentMeUrlClass

type RecentMeUrlClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

RecentMeUrlClass represents RecentMeUrl generic type.

See https://core.telegram.org/type/RecentMeUrl for reference.

Example:

g, err := DecodeRecentMeUrl(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *RecentMeUrlUnknown: // recentMeUrlUnknown#46e1d13d
case *RecentMeUrlUser: // recentMeUrlUser#8dbc3336
case *RecentMeUrlChat: // recentMeUrlChat#a01b22f9
case *RecentMeUrlChatInvite: // recentMeUrlChatInvite#eb49081d
case *RecentMeUrlStickerSet: // recentMeUrlStickerSet#bc0a57dc
default: panic(v)
}

func DecodeRecentMeUrl

func DecodeRecentMeUrl(buf *bin.Buffer) (RecentMeUrlClass, error)

DecodeRecentMeUrl implements binary de-serialization for RecentMeUrlClass.

type RecentMeUrlStickerSet

type RecentMeUrlStickerSet struct {
	// t.me URL
	URL string
	// Stickerset
	Set StickerSetCoveredClass
}

RecentMeUrlStickerSet represents TL type `recentMeUrlStickerSet#bc0a57dc`. Recent t.me stickerset installation URL

See https://core.telegram.org/constructor/recentMeUrlStickerSet for reference.

func (*RecentMeUrlStickerSet) Decode

func (r *RecentMeUrlStickerSet) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*RecentMeUrlStickerSet) Encode

func (r *RecentMeUrlStickerSet) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*RecentMeUrlStickerSet) String added in v0.12.0

func (r *RecentMeUrlStickerSet) String() string

String implements fmt.Stringer.

type RecentMeUrlUnknown

type RecentMeUrlUnknown struct {
	// URL
	URL string
}

RecentMeUrlUnknown represents TL type `recentMeUrlUnknown#46e1d13d`. Unknown t.me url

See https://core.telegram.org/constructor/recentMeUrlUnknown for reference.

func (*RecentMeUrlUnknown) Decode

func (r *RecentMeUrlUnknown) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*RecentMeUrlUnknown) Encode

func (r *RecentMeUrlUnknown) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*RecentMeUrlUnknown) String added in v0.12.0

func (r *RecentMeUrlUnknown) String() string

String implements fmt.Stringer.

type RecentMeUrlUser

type RecentMeUrlUser struct {
	// URL
	URL string
	// User ID
	UserID int
}

RecentMeUrlUser represents TL type `recentMeUrlUser#8dbc3336`. Recent t.me link to a user

See https://core.telegram.org/constructor/recentMeUrlUser for reference.

func (*RecentMeUrlUser) Decode

func (r *RecentMeUrlUser) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*RecentMeUrlUser) Encode

func (r *RecentMeUrlUser) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*RecentMeUrlUser) String added in v0.12.0

func (r *RecentMeUrlUser) String() string

String implements fmt.Stringer.

type RecentStickersHandler added in v0.9.0

type RecentStickersHandler func(ctx UpdateContext, update *UpdateRecentStickers) error

RecentStickersHandler is a RecentStickers event handler.

type ReplyInlineMarkup

type ReplyInlineMarkup struct {
	// Bot or inline keyboard rows
	Rows []KeyboardButtonRow
}

ReplyInlineMarkup represents TL type `replyInlineMarkup#48a30254`. Bot or inline keyboard

See https://core.telegram.org/constructor/replyInlineMarkup for reference.

func (*ReplyInlineMarkup) Decode

func (r *ReplyInlineMarkup) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ReplyInlineMarkup) Encode

func (r *ReplyInlineMarkup) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ReplyInlineMarkup) String added in v0.12.0

func (r *ReplyInlineMarkup) String() string

String implements fmt.Stringer.

type ReplyKeyboardForceReply

type ReplyKeyboardForceReply struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again.
	SingleUse bool
	// Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. Example: A user requests to change the bot‘s language, bot replies to the request with a keyboard to select the new language. Other users in the group don’t see the keyboard.
	Selective bool
}

ReplyKeyboardForceReply represents TL type `replyKeyboardForceReply#f4108aa0`. Force the user to send a reply

See https://core.telegram.org/constructor/replyKeyboardForceReply for reference.

func (*ReplyKeyboardForceReply) Decode

func (r *ReplyKeyboardForceReply) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ReplyKeyboardForceReply) Encode

func (r *ReplyKeyboardForceReply) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ReplyKeyboardForceReply) SetSelective

func (r *ReplyKeyboardForceReply) SetSelective(value bool)

SetSelective sets value of Selective conditional field.

func (*ReplyKeyboardForceReply) SetSingleUse

func (r *ReplyKeyboardForceReply) SetSingleUse(value bool)

SetSingleUse sets value of SingleUse conditional field.

func (*ReplyKeyboardForceReply) String added in v0.12.0

func (r *ReplyKeyboardForceReply) String() string

String implements fmt.Stringer.

type ReplyKeyboardHide

type ReplyKeyboardHide struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Use this flag if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet
	Selective bool
}

ReplyKeyboardHide represents TL type `replyKeyboardHide#a03e5b85`. Hide sent bot keyboard

See https://core.telegram.org/constructor/replyKeyboardHide for reference.

func (*ReplyKeyboardHide) Decode

func (r *ReplyKeyboardHide) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ReplyKeyboardHide) Encode

func (r *ReplyKeyboardHide) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ReplyKeyboardHide) SetSelective

func (r *ReplyKeyboardHide) SetSelective(value bool)

SetSelective sets value of Selective conditional field.

func (*ReplyKeyboardHide) String added in v0.12.0

func (r *ReplyKeyboardHide) String() string

String implements fmt.Stringer.

type ReplyKeyboardMarkup

type ReplyKeyboardMarkup struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). If not set, the custom keyboard is always of the same height as the app's standard keyboard.
	Resize bool
	// Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again.
	SingleUse bool
	// Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.Example: A user requests to change the bot‘s language, bot replies to the request with a keyboard to select the new language. Other users in the group don’t see the keyboard.
	Selective bool
	// Button row
	Rows []KeyboardButtonRow
}

ReplyKeyboardMarkup represents TL type `replyKeyboardMarkup#3502758c`. Bot keyboard

See https://core.telegram.org/constructor/replyKeyboardMarkup for reference.

func (*ReplyKeyboardMarkup) Decode

func (r *ReplyKeyboardMarkup) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ReplyKeyboardMarkup) Encode

func (r *ReplyKeyboardMarkup) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ReplyKeyboardMarkup) SetResize

func (r *ReplyKeyboardMarkup) SetResize(value bool)

SetResize sets value of Resize conditional field.

func (*ReplyKeyboardMarkup) SetSelective

func (r *ReplyKeyboardMarkup) SetSelective(value bool)

SetSelective sets value of Selective conditional field.

func (*ReplyKeyboardMarkup) SetSingleUse

func (r *ReplyKeyboardMarkup) SetSingleUse(value bool)

SetSingleUse sets value of SingleUse conditional field.

func (*ReplyKeyboardMarkup) String added in v0.12.0

func (r *ReplyKeyboardMarkup) String() string

String implements fmt.Stringer.

type ReplyMarkupBox

type ReplyMarkupBox struct {
	ReplyMarkup ReplyMarkupClass
}

ReplyMarkup boxes the ReplyMarkupClass providing a helper.

func (*ReplyMarkupBox) Decode

func (b *ReplyMarkupBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ReplyMarkupBox.

func (*ReplyMarkupBox) Encode

func (b *ReplyMarkupBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ReplyMarkupBox.

type ReplyMarkupClass

type ReplyMarkupClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ReplyMarkupClass represents ReplyMarkup generic type.

See https://core.telegram.org/type/ReplyMarkup for reference.

Example:

g, err := DecodeReplyMarkup(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *ReplyKeyboardHide: // replyKeyboardHide#a03e5b85
case *ReplyKeyboardForceReply: // replyKeyboardForceReply#f4108aa0
case *ReplyKeyboardMarkup: // replyKeyboardMarkup#3502758c
case *ReplyInlineMarkup: // replyInlineMarkup#48a30254
default: panic(v)
}

func DecodeReplyMarkup

func DecodeReplyMarkup(buf *bin.Buffer) (ReplyMarkupClass, error)

DecodeReplyMarkup implements binary de-serialization for ReplyMarkupClass.

type ReportReasonBox

type ReportReasonBox struct {
	ReportReason ReportReasonClass
}

ReportReason boxes the ReportReasonClass providing a helper.

func (*ReportReasonBox) Decode

func (b *ReportReasonBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for ReportReasonBox.

func (*ReportReasonBox) Encode

func (b *ReportReasonBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for ReportReasonBox.

type ReportReasonClass

type ReportReasonClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

ReportReasonClass represents ReportReason generic type.

See https://core.telegram.org/type/ReportReason for reference.

Example:

g, err := DecodeReportReason(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *InputReportReasonSpam: // inputReportReasonSpam#58dbcab8
case *InputReportReasonViolence: // inputReportReasonViolence#1e22c78d
case *InputReportReasonPornography: // inputReportReasonPornography#2e59d922
case *InputReportReasonChildAbuse: // inputReportReasonChildAbuse#adf44ee3
case *InputReportReasonOther: // inputReportReasonOther#e1746d0a
case *InputReportReasonCopyright: // inputReportReasonCopyright#9b89f93a
case *InputReportReasonGeoIrrelevant: // inputReportReasonGeoIrrelevant#dbd4feed
default: panic(v)
}

func DecodeReportReason

func DecodeReportReason(buf *bin.Buffer) (ReportReasonClass, error)

DecodeReportReason implements binary de-serialization for ReportReasonClass.

type RestrictionReason

type RestrictionReason struct {
	// Platform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (android-ios, ios-wp, etc)
	Platform string
	// Restriction reason (porno, terms, etc.)
	Reason string
	// Error message to be shown to the user
	Text string
}

RestrictionReason represents TL type `restrictionReason#d072acb4`. Restriction reason. Contains the reason why access to a certain object must be restricted. Clients are supposed to deny access to the channel if the platform field is equal to all or to the current platform (ios, android, wp, etc.). Platforms can be concatenated (ios-android, ios-wp), unknown platforms are to be ignored. The text is the error message that should be shown to the user.

See https://core.telegram.org/constructor/restrictionReason for reference.

func (*RestrictionReason) Decode

func (r *RestrictionReason) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*RestrictionReason) Encode

func (r *RestrictionReason) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*RestrictionReason) String added in v0.12.0

func (r *RestrictionReason) String() string

String implements fmt.Stringer.

type RichTextBox

type RichTextBox struct {
	RichText RichTextClass
}

RichText boxes the RichTextClass providing a helper.

func (*RichTextBox) Decode

func (b *RichTextBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for RichTextBox.

func (*RichTextBox) Encode

func (b *RichTextBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for RichTextBox.

type RichTextClass

type RichTextClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

RichTextClass represents RichText generic type.

See https://core.telegram.org/type/RichText for reference.

Example:

g, err := DecodeRichText(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *TextEmpty: // textEmpty#dc3d824f
case *TextPlain: // textPlain#744694e0
case *TextBold: // textBold#6724abc4
case *TextItalic: // textItalic#d912a59c
case *TextUnderline: // textUnderline#c12622c4
case *TextStrike: // textStrike#9bf8bb95
case *TextFixed: // textFixed#6c3f19b9
case *TextUrl: // textUrl#3c2884c1
case *TextEmail: // textEmail#de5a0dd6
case *TextConcat: // textConcat#7e6260d7
case *TextSubscript: // textSubscript#ed6a8504
case *TextSuperscript: // textSuperscript#c7fb5e01
case *TextMarked: // textMarked#34b8621
case *TextPhone: // textPhone#1ccb966a
case *TextImage: // textImage#81ccf4f
case *TextAnchor: // textAnchor#35553762
default: panic(v)
}

func DecodeRichText

func DecodeRichText(buf *bin.Buffer) (RichTextClass, error)

DecodeRichText implements binary de-serialization for RichTextClass.

type SavedGifsHandler added in v0.9.0

type SavedGifsHandler func(ctx UpdateContext, update *UpdateSavedGifs) error

SavedGifsHandler is a SavedGifs event handler.

type SavedPhoneContact

type SavedPhoneContact struct {
	// Phone number
	Phone string
	// First name
	FirstName string
	// Last name
	LastName string
	// Date added
	Date int
}

SavedPhoneContact represents TL type `savedPhoneContact#1142bd56`. Saved contact

See https://core.telegram.org/constructor/savedPhoneContact for reference.

func (*SavedPhoneContact) Decode

func (s *SavedPhoneContact) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SavedPhoneContact) Encode

func (s *SavedPhoneContact) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SavedPhoneContact) String added in v0.12.0

func (s *SavedPhoneContact) String() string

String implements fmt.Stringer.

type SavedPhoneContactVector added in v0.8.0

type SavedPhoneContactVector struct {
	// Elements of Vector<SavedContact>
	Elems []SavedPhoneContact
}

SavedPhoneContactVector is a box for Vector<SavedContact>

func (*SavedPhoneContactVector) Decode added in v0.8.0

func (vec *SavedPhoneContactVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SavedPhoneContactVector) Encode added in v0.8.0

func (vec *SavedPhoneContactVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SavedPhoneContactVector) String added in v0.12.0

func (vec *SavedPhoneContactVector) String() string

String implements fmt.Stringer.

type SecureCredentialsEncrypted

type SecureCredentialsEncrypted struct {
	// Encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication, as described in decrypting data »¹
	//
	// Links:
	//  1) https://core.telegram.org/passport#decrypting-data
	Data []byte
	// Data hash for data authentication as described in decrypting data »¹
	//
	// Links:
	//  1) https://core.telegram.org/passport#decrypting-data
	Hash []byte
	// Secret, encrypted with the bot's public RSA key, required for data decryption as described in decrypting data »¹
	//
	// Links:
	//  1) https://core.telegram.org/passport#decrypting-data
	Secret []byte
}

SecureCredentialsEncrypted represents TL type `secureCredentialsEncrypted#33f0ea47`. Encrypted credentials required to decrypt telegram passport¹ data.

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/constructor/secureCredentialsEncrypted for reference.

func (*SecureCredentialsEncrypted) Decode

Decode implements bin.Decoder.

func (*SecureCredentialsEncrypted) Encode

Encode implements bin.Encoder.

func (*SecureCredentialsEncrypted) String added in v0.12.0

func (s *SecureCredentialsEncrypted) String() string

String implements fmt.Stringer.

type SecureData

type SecureData struct {
	// Data
	Data []byte
	// Data hash
	DataHash []byte
	// Secret
	Secret []byte
}

SecureData represents TL type `secureData#8aeabec3`. Secure passport¹ data, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#securedata

See https://core.telegram.org/constructor/secureData for reference.

func (*SecureData) Decode

func (s *SecureData) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureData) Encode

func (s *SecureData) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureData) String added in v0.12.0

func (s *SecureData) String() string

String implements fmt.Stringer.

type SecureFile

type SecureFile struct {
	// ID
	ID int64
	// Access hash
	AccessHash int64
	// File size
	Size int
	// DC ID
	DCID int
	// Date of upload
	Date int
	// File hash
	FileHash []byte
	// Secret
	Secret []byte
}

SecureFile represents TL type `secureFile#e0277a62`. Secure passport¹ file, for more info see the passport docs »²

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#inputsecurefile

See https://core.telegram.org/constructor/secureFile for reference.

func (*SecureFile) Decode

func (s *SecureFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureFile) Encode

func (s *SecureFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureFile) String added in v0.12.0

func (s *SecureFile) String() string

String implements fmt.Stringer.

type SecureFileBox

type SecureFileBox struct {
	SecureFile SecureFileClass
}

SecureFile boxes the SecureFileClass providing a helper.

func (*SecureFileBox) Decode

func (b *SecureFileBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for SecureFileBox.

func (*SecureFileBox) Encode

func (b *SecureFileBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for SecureFileBox.

type SecureFileClass

type SecureFileClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

SecureFileClass represents SecureFile generic type.

See https://core.telegram.org/type/SecureFile for reference.

Example:

g, err := DecodeSecureFile(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *SecureFileEmpty: // secureFileEmpty#64199744
case *SecureFile: // secureFile#e0277a62
default: panic(v)
}

func DecodeSecureFile

func DecodeSecureFile(buf *bin.Buffer) (SecureFileClass, error)

DecodeSecureFile implements binary de-serialization for SecureFileClass.

type SecureFileEmpty

type SecureFileEmpty struct {
}

SecureFileEmpty represents TL type `secureFileEmpty#64199744`. Empty constructor

See https://core.telegram.org/constructor/secureFileEmpty for reference.

func (*SecureFileEmpty) Decode

func (s *SecureFileEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureFileEmpty) Encode

func (s *SecureFileEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureFileEmpty) String added in v0.12.0

func (s *SecureFileEmpty) String() string

String implements fmt.Stringer.

type SecurePasswordKdfAlgoBox

type SecurePasswordKdfAlgoBox struct {
	SecurePasswordKdfAlgo SecurePasswordKdfAlgoClass
}

SecurePasswordKdfAlgo boxes the SecurePasswordKdfAlgoClass providing a helper.

func (*SecurePasswordKdfAlgoBox) Decode

func (b *SecurePasswordKdfAlgoBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for SecurePasswordKdfAlgoBox.

func (*SecurePasswordKdfAlgoBox) Encode

func (b *SecurePasswordKdfAlgoBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for SecurePasswordKdfAlgoBox.

type SecurePasswordKdfAlgoClass

type SecurePasswordKdfAlgoClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

SecurePasswordKdfAlgoClass represents SecurePasswordKdfAlgo generic type.

See https://core.telegram.org/type/SecurePasswordKdfAlgo for reference.

Example:

g, err := DecodeSecurePasswordKdfAlgo(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *SecurePasswordKdfAlgoUnknown: // securePasswordKdfAlgoUnknown#4a8537
case *SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000: // securePasswordKdfAlgoPBKDF2HMACSHA512iter100000#bbf2dda0
case *SecurePasswordKdfAlgoSHA512: // securePasswordKdfAlgoSHA512#86471d92
default: panic(v)
}

func DecodeSecurePasswordKdfAlgo

func DecodeSecurePasswordKdfAlgo(buf *bin.Buffer) (SecurePasswordKdfAlgoClass, error)

DecodeSecurePasswordKdfAlgo implements binary de-serialization for SecurePasswordKdfAlgoClass.

type SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000

type SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 struct {
	// Salt
	Salt []byte
}

SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 represents TL type `securePasswordKdfAlgoPBKDF2HMACSHA512iter100000#bbf2dda0`. PBKDF2 with SHA512 and 100000 iterations KDF algo

See https://core.telegram.org/constructor/securePasswordKdfAlgoPBKDF2HMACSHA512iter100000 for reference.

func (*SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000) Decode

Decode implements bin.Decoder.

func (*SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000) Encode

Encode implements bin.Encoder.

func (*SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000) String added in v0.12.0

String implements fmt.Stringer.

type SecurePasswordKdfAlgoSHA512

type SecurePasswordKdfAlgoSHA512 struct {
	// Salt
	Salt []byte
}

SecurePasswordKdfAlgoSHA512 represents TL type `securePasswordKdfAlgoSHA512#86471d92`. SHA512 KDF algo

See https://core.telegram.org/constructor/securePasswordKdfAlgoSHA512 for reference.

func (*SecurePasswordKdfAlgoSHA512) Decode

Decode implements bin.Decoder.

func (*SecurePasswordKdfAlgoSHA512) Encode

Encode implements bin.Encoder.

func (*SecurePasswordKdfAlgoSHA512) String added in v0.12.0

func (s *SecurePasswordKdfAlgoSHA512) String() string

String implements fmt.Stringer.

type SecurePasswordKdfAlgoUnknown

type SecurePasswordKdfAlgoUnknown struct {
}

SecurePasswordKdfAlgoUnknown represents TL type `securePasswordKdfAlgoUnknown#4a8537`. Unknown KDF algo (most likely the client has to be updated)

See https://core.telegram.org/constructor/securePasswordKdfAlgoUnknown for reference.

func (*SecurePasswordKdfAlgoUnknown) Decode

Decode implements bin.Decoder.

func (*SecurePasswordKdfAlgoUnknown) Encode

Encode implements bin.Encoder.

func (*SecurePasswordKdfAlgoUnknown) String added in v0.12.0

String implements fmt.Stringer.

type SecurePlainDataBox

type SecurePlainDataBox struct {
	SecurePlainData SecurePlainDataClass
}

SecurePlainData boxes the SecurePlainDataClass providing a helper.

func (*SecurePlainDataBox) Decode

func (b *SecurePlainDataBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for SecurePlainDataBox.

func (*SecurePlainDataBox) Encode

func (b *SecurePlainDataBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for SecurePlainDataBox.

type SecurePlainDataClass

type SecurePlainDataClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

SecurePlainDataClass represents SecurePlainData generic type.

See https://core.telegram.org/type/SecurePlainData for reference.

Example:

g, err := DecodeSecurePlainData(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *SecurePlainPhone: // securePlainPhone#7d6099dd
case *SecurePlainEmail: // securePlainEmail#21ec5a5f
default: panic(v)
}

func DecodeSecurePlainData

func DecodeSecurePlainData(buf *bin.Buffer) (SecurePlainDataClass, error)

DecodeSecurePlainData implements binary de-serialization for SecurePlainDataClass.

type SecurePlainEmail

type SecurePlainEmail struct {
	// Email address
	Email string
}

SecurePlainEmail represents TL type `securePlainEmail#21ec5a5f`. Email address to use in telegram passport¹: it must be verified, first »².

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#secureplaindata

See https://core.telegram.org/constructor/securePlainEmail for reference.

func (*SecurePlainEmail) Decode

func (s *SecurePlainEmail) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecurePlainEmail) Encode

func (s *SecurePlainEmail) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecurePlainEmail) String added in v0.12.0

func (s *SecurePlainEmail) String() string

String implements fmt.Stringer.

type SecurePlainPhone

type SecurePlainPhone struct {
	// Phone number
	Phone string
}

SecurePlainPhone represents TL type `securePlainPhone#7d6099dd`. Phone number to use in telegram passport¹: it must be verified, first »².

Links:

  1. https://core.telegram.org/passport
  2. https://core.telegram.org/passport/encryption#secureplaindata

See https://core.telegram.org/constructor/securePlainPhone for reference.

func (*SecurePlainPhone) Decode

func (s *SecurePlainPhone) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecurePlainPhone) Encode

func (s *SecurePlainPhone) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecurePlainPhone) String added in v0.12.0

func (s *SecurePlainPhone) String() string

String implements fmt.Stringer.

type SecureRequiredType

type SecureRequiredType struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Native names
	NativeNames bool
	// Is a selfie required
	SelfieRequired bool
	// Is a translation required
	TranslationRequired bool
	// Secure value type
	Type SecureValueTypeClass
}

SecureRequiredType represents TL type `secureRequiredType#829d99da`. Required type

See https://core.telegram.org/constructor/secureRequiredType for reference.

func (*SecureRequiredType) Decode

func (s *SecureRequiredType) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureRequiredType) Encode

func (s *SecureRequiredType) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureRequiredType) SetNativeNames

func (s *SecureRequiredType) SetNativeNames(value bool)

SetNativeNames sets value of NativeNames conditional field.

func (*SecureRequiredType) SetSelfieRequired

func (s *SecureRequiredType) SetSelfieRequired(value bool)

SetSelfieRequired sets value of SelfieRequired conditional field.

func (*SecureRequiredType) SetTranslationRequired

func (s *SecureRequiredType) SetTranslationRequired(value bool)

SetTranslationRequired sets value of TranslationRequired conditional field.

func (*SecureRequiredType) String added in v0.12.0

func (s *SecureRequiredType) String() string

String implements fmt.Stringer.

type SecureRequiredTypeBox

type SecureRequiredTypeBox struct {
	SecureRequiredType SecureRequiredTypeClass
}

SecureRequiredType boxes the SecureRequiredTypeClass providing a helper.

func (*SecureRequiredTypeBox) Decode

func (b *SecureRequiredTypeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for SecureRequiredTypeBox.

func (*SecureRequiredTypeBox) Encode

func (b *SecureRequiredTypeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for SecureRequiredTypeBox.

type SecureRequiredTypeClass

type SecureRequiredTypeClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

SecureRequiredTypeClass represents SecureRequiredType generic type.

See https://core.telegram.org/type/SecureRequiredType for reference.

Example:

g, err := DecodeSecureRequiredType(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *SecureRequiredType: // secureRequiredType#829d99da
case *SecureRequiredTypeOneOf: // secureRequiredTypeOneOf#27477b4
default: panic(v)
}

func DecodeSecureRequiredType

func DecodeSecureRequiredType(buf *bin.Buffer) (SecureRequiredTypeClass, error)

DecodeSecureRequiredType implements binary de-serialization for SecureRequiredTypeClass.

type SecureRequiredTypeOneOf

type SecureRequiredTypeOneOf struct {
	// Secure required value types
	Types []SecureRequiredTypeClass
}

SecureRequiredTypeOneOf represents TL type `secureRequiredTypeOneOf#27477b4`. One of

See https://core.telegram.org/constructor/secureRequiredTypeOneOf for reference.

func (*SecureRequiredTypeOneOf) Decode

func (s *SecureRequiredTypeOneOf) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureRequiredTypeOneOf) Encode

func (s *SecureRequiredTypeOneOf) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureRequiredTypeOneOf) String added in v0.12.0

func (s *SecureRequiredTypeOneOf) String() string

String implements fmt.Stringer.

type SecureSecretSettings

type SecureSecretSettings struct {
	// Secure KDF algo
	SecureAlgo SecurePasswordKdfAlgoClass
	// Secure secret
	SecureSecret []byte
	// Secret ID
	SecureSecretID int64
}

SecureSecretSettings represents TL type `secureSecretSettings#1527bcac`. Secure settings

See https://core.telegram.org/constructor/secureSecretSettings for reference.

func (*SecureSecretSettings) Decode

func (s *SecureSecretSettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureSecretSettings) Encode

func (s *SecureSecretSettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureSecretSettings) String added in v0.12.0

func (s *SecureSecretSettings) String() string

String implements fmt.Stringer.

type SecureValue

type SecureValue struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Secure passport¹ value type
	//
	// Links:
	//  1) https://core.telegram.org/passport
	Type SecureValueTypeClass
	// Encrypted Telegram Passport¹ element data
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetData and GetData helpers.
	Data SecureData
	// Encrypted passport¹ file with the front side of the document
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetFrontSide and GetFrontSide helpers.
	FrontSide SecureFileClass
	// Encrypted passport¹ file with the reverse side of the document
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetReverseSide and GetReverseSide helpers.
	ReverseSide SecureFileClass
	// Encrypted passport¹ file with a selfie of the user holding the document
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetSelfie and GetSelfie helpers.
	Selfie SecureFileClass
	// Array of encrypted passport¹ files with translated versions of the provided documents
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetTranslation and GetTranslation helpers.
	Translation []SecureFileClass
	// Array of encrypted passport¹ files with photos the of the documents
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetFiles and GetFiles helpers.
	Files []SecureFileClass
	// Plaintext verified passport¹ data
	//
	// Links:
	//  1) https://core.telegram.org/passport
	//
	// Use SetPlainData and GetPlainData helpers.
	PlainData SecurePlainDataClass
	// Data hash
	Hash []byte
}

SecureValue represents TL type `secureValue#187fa0ca`. Secure value

See https://core.telegram.org/constructor/secureValue for reference.

func (*SecureValue) Decode

func (s *SecureValue) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValue) Encode

func (s *SecureValue) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValue) GetData

func (s *SecureValue) GetData() (value SecureData, ok bool)

GetData returns value of Data conditional field and boolean which is true if field was set.

func (*SecureValue) GetFiles

func (s *SecureValue) GetFiles() (value []SecureFileClass, ok bool)

GetFiles returns value of Files conditional field and boolean which is true if field was set.

func (*SecureValue) GetFrontSide

func (s *SecureValue) GetFrontSide() (value SecureFileClass, ok bool)

GetFrontSide returns value of FrontSide conditional field and boolean which is true if field was set.

func (*SecureValue) GetPlainData

func (s *SecureValue) GetPlainData() (value SecurePlainDataClass, ok bool)

GetPlainData returns value of PlainData conditional field and boolean which is true if field was set.

func (*SecureValue) GetReverseSide

func (s *SecureValue) GetReverseSide() (value SecureFileClass, ok bool)

GetReverseSide returns value of ReverseSide conditional field and boolean which is true if field was set.

func (*SecureValue) GetSelfie

func (s *SecureValue) GetSelfie() (value SecureFileClass, ok bool)

GetSelfie returns value of Selfie conditional field and boolean which is true if field was set.

func (*SecureValue) GetTranslation

func (s *SecureValue) GetTranslation() (value []SecureFileClass, ok bool)

GetTranslation returns value of Translation conditional field and boolean which is true if field was set.

func (*SecureValue) SetData

func (s *SecureValue) SetData(value SecureData)

SetData sets value of Data conditional field.

func (*SecureValue) SetFiles

func (s *SecureValue) SetFiles(value []SecureFileClass)

SetFiles sets value of Files conditional field.

func (*SecureValue) SetFrontSide

func (s *SecureValue) SetFrontSide(value SecureFileClass)

SetFrontSide sets value of FrontSide conditional field.

func (*SecureValue) SetPlainData

func (s *SecureValue) SetPlainData(value SecurePlainDataClass)

SetPlainData sets value of PlainData conditional field.

func (*SecureValue) SetReverseSide

func (s *SecureValue) SetReverseSide(value SecureFileClass)

SetReverseSide sets value of ReverseSide conditional field.

func (*SecureValue) SetSelfie

func (s *SecureValue) SetSelfie(value SecureFileClass)

SetSelfie sets value of Selfie conditional field.

func (*SecureValue) SetTranslation

func (s *SecureValue) SetTranslation(value []SecureFileClass)

SetTranslation sets value of Translation conditional field.

func (*SecureValue) String added in v0.12.0

func (s *SecureValue) String() string

String implements fmt.Stringer.

type SecureValueError

type SecureValueError struct {
	// Type of element which has the issue
	Type SecureValueTypeClass
	// Hash
	Hash []byte
	// Error message
	Text string
}

SecureValueError represents TL type `secureValueError#869d758f`. Secure value error

See https://core.telegram.org/constructor/secureValueError for reference.

func (*SecureValueError) Decode

func (s *SecureValueError) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueError) Encode

func (s *SecureValueError) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueError) String added in v0.12.0

func (s *SecureValueError) String() string

String implements fmt.Stringer.

type SecureValueErrorBox

type SecureValueErrorBox struct {
	SecureValueError SecureValueErrorClass
}

SecureValueError boxes the SecureValueErrorClass providing a helper.

func (*SecureValueErrorBox) Decode

func (b *SecureValueErrorBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for SecureValueErrorBox.

func (*SecureValueErrorBox) Encode

func (b *SecureValueErrorBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for SecureValueErrorBox.

type SecureValueErrorClass

type SecureValueErrorClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

SecureValueErrorClass represents SecureValueError generic type.

See https://core.telegram.org/type/SecureValueError for reference.

Example:

g, err := DecodeSecureValueError(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *SecureValueErrorData: // secureValueErrorData#e8a40bd9
case *SecureValueErrorFrontSide: // secureValueErrorFrontSide#be3dfa
case *SecureValueErrorReverseSide: // secureValueErrorReverseSide#868a2aa5
case *SecureValueErrorSelfie: // secureValueErrorSelfie#e537ced6
case *SecureValueErrorFile: // secureValueErrorFile#7a700873
case *SecureValueErrorFiles: // secureValueErrorFiles#666220e9
case *SecureValueError: // secureValueError#869d758f
case *SecureValueErrorTranslationFile: // secureValueErrorTranslationFile#a1144770
case *SecureValueErrorTranslationFiles: // secureValueErrorTranslationFiles#34636dd8
default: panic(v)
}

func DecodeSecureValueError

func DecodeSecureValueError(buf *bin.Buffer) (SecureValueErrorClass, error)

DecodeSecureValueError implements binary de-serialization for SecureValueErrorClass.

type SecureValueErrorData

type SecureValueErrorData struct {
	// The section of the user's Telegram Passport which has the error, one of secureValueTypePersonalDetails¹, secureValueTypePassport², secureValueTypeDriverLicense³, secureValueTypeIdentityCard⁴, secureValueTypeInternalPassport⁵, secureValueTypeAddress⁶
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePersonalDetails
	//  2) https://core.telegram.org/constructor/secureValueTypePassport
	//  3) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  4) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  5) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	//  6) https://core.telegram.org/constructor/secureValueTypeAddress
	Type SecureValueTypeClass
	// Data hash
	DataHash []byte
	// Name of the data field which has the error
	Field string
	// Error message
	Text string
}

SecureValueErrorData represents TL type `secureValueErrorData#e8a40bd9`. Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.

See https://core.telegram.org/constructor/secureValueErrorData for reference.

func (*SecureValueErrorData) Decode

func (s *SecureValueErrorData) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueErrorData) Encode

func (s *SecureValueErrorData) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueErrorData) String added in v0.12.0

func (s *SecureValueErrorData) String() string

String implements fmt.Stringer.

type SecureValueErrorFile

type SecureValueErrorFile struct {
	// One of secureValueTypeUtilityBill¹, secureValueTypeBankStatement², secureValueTypeRentalAgreement³, secureValueTypePassportRegistration⁴, secureValueTypeTemporaryRegistration⁵
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypeUtilityBill
	//  2) https://core.telegram.org/constructor/secureValueTypeBankStatement
	//  3) https://core.telegram.org/constructor/secureValueTypeRentalAgreement
	//  4) https://core.telegram.org/constructor/secureValueTypePassportRegistration
	//  5) https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration
	Type SecureValueTypeClass
	// File hash
	FileHash []byte
	// Error message
	Text string
}

SecureValueErrorFile represents TL type `secureValueErrorFile#7a700873`. Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.

See https://core.telegram.org/constructor/secureValueErrorFile for reference.

func (*SecureValueErrorFile) Decode

func (s *SecureValueErrorFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueErrorFile) Encode

func (s *SecureValueErrorFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueErrorFile) String added in v0.12.0

func (s *SecureValueErrorFile) String() string

String implements fmt.Stringer.

type SecureValueErrorFiles

type SecureValueErrorFiles struct {
	// One of secureValueTypeUtilityBill¹, secureValueTypeBankStatement², secureValueTypeRentalAgreement³, secureValueTypePassportRegistration⁴, secureValueTypeTemporaryRegistration⁵
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypeUtilityBill
	//  2) https://core.telegram.org/constructor/secureValueTypeBankStatement
	//  3) https://core.telegram.org/constructor/secureValueTypeRentalAgreement
	//  4) https://core.telegram.org/constructor/secureValueTypePassportRegistration
	//  5) https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration
	Type SecureValueTypeClass
	// File hash
	FileHash [][]byte
	// Error message
	Text string
}

SecureValueErrorFiles represents TL type `secureValueErrorFiles#666220e9`. Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.

See https://core.telegram.org/constructor/secureValueErrorFiles for reference.

func (*SecureValueErrorFiles) Decode

func (s *SecureValueErrorFiles) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueErrorFiles) Encode

func (s *SecureValueErrorFiles) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueErrorFiles) String added in v0.12.0

func (s *SecureValueErrorFiles) String() string

String implements fmt.Stringer.

type SecureValueErrorFrontSide

type SecureValueErrorFrontSide struct {
	// One of secureValueTypePassport¹, secureValueTypeDriverLicense², secureValueTypeIdentityCard³, secureValueTypeInternalPassport⁴
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePassport
	//  2) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  3) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  4) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	Type SecureValueTypeClass
	// File hash
	FileHash []byte
	// Error message
	Text string
}

SecureValueErrorFrontSide represents TL type `secureValueErrorFrontSide#be3dfa`. Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.

See https://core.telegram.org/constructor/secureValueErrorFrontSide for reference.

func (*SecureValueErrorFrontSide) Decode

func (s *SecureValueErrorFrontSide) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueErrorFrontSide) Encode

func (s *SecureValueErrorFrontSide) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueErrorFrontSide) String added in v0.12.0

func (s *SecureValueErrorFrontSide) String() string

String implements fmt.Stringer.

type SecureValueErrorReverseSide

type SecureValueErrorReverseSide struct {
	// One of secureValueTypeDriverLicense¹, secureValueTypeIdentityCard²
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  2) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	Type SecureValueTypeClass
	// File hash
	FileHash []byte
	// Error message
	Text string
}

SecureValueErrorReverseSide represents TL type `secureValueErrorReverseSide#868a2aa5`. Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.

See https://core.telegram.org/constructor/secureValueErrorReverseSide for reference.

func (*SecureValueErrorReverseSide) Decode

Decode implements bin.Decoder.

func (*SecureValueErrorReverseSide) Encode

Encode implements bin.Encoder.

func (*SecureValueErrorReverseSide) String added in v0.12.0

func (s *SecureValueErrorReverseSide) String() string

String implements fmt.Stringer.

type SecureValueErrorSelfie

type SecureValueErrorSelfie struct {
	// One of secureValueTypePassport¹, secureValueTypeDriverLicense², secureValueTypeIdentityCard³, secureValueTypeInternalPassport⁴
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePassport
	//  2) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  3) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  4) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	Type SecureValueTypeClass
	// File hash
	FileHash []byte
	// Error message
	Text string
}

SecureValueErrorSelfie represents TL type `secureValueErrorSelfie#e537ced6`. Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.

See https://core.telegram.org/constructor/secureValueErrorSelfie for reference.

func (*SecureValueErrorSelfie) Decode

func (s *SecureValueErrorSelfie) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueErrorSelfie) Encode

func (s *SecureValueErrorSelfie) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueErrorSelfie) String added in v0.12.0

func (s *SecureValueErrorSelfie) String() string

String implements fmt.Stringer.

type SecureValueErrorTranslationFile

type SecureValueErrorTranslationFile struct {
	// One of secureValueTypePersonalDetails¹, secureValueTypePassport², secureValueTypeDriverLicense³, secureValueTypeIdentityCard⁴, secureValueTypeInternalPassport⁵, secureValueTypeUtilityBill⁶, secureValueTypeBankStatement⁷, secureValueTypeRentalAgreement⁸, secureValueTypePassportRegistration⁹, secureValueTypeTemporaryRegistration¹⁰
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePersonalDetails
	//  2) https://core.telegram.org/constructor/secureValueTypePassport
	//  3) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  4) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  5) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	//  6) https://core.telegram.org/constructor/secureValueTypeUtilityBill
	//  7) https://core.telegram.org/constructor/secureValueTypeBankStatement
	//  8) https://core.telegram.org/constructor/secureValueTypeRentalAgreement
	//  9) https://core.telegram.org/constructor/secureValueTypePassportRegistration
	//  10) https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration
	Type SecureValueTypeClass
	// File hash
	FileHash []byte
	// Error message
	Text string
}

SecureValueErrorTranslationFile represents TL type `secureValueErrorTranslationFile#a1144770`. Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.

See https://core.telegram.org/constructor/secureValueErrorTranslationFile for reference.

func (*SecureValueErrorTranslationFile) Decode

Decode implements bin.Decoder.

func (*SecureValueErrorTranslationFile) Encode

Encode implements bin.Encoder.

func (*SecureValueErrorTranslationFile) String added in v0.12.0

String implements fmt.Stringer.

type SecureValueErrorTranslationFiles

type SecureValueErrorTranslationFiles struct {
	// One of secureValueTypePersonalDetails¹, secureValueTypePassport², secureValueTypeDriverLicense³, secureValueTypeIdentityCard⁴, secureValueTypeInternalPassport⁵, secureValueTypeUtilityBill⁶, secureValueTypeBankStatement⁷, secureValueTypeRentalAgreement⁸, secureValueTypePassportRegistration⁹, secureValueTypeTemporaryRegistration¹⁰
	//
	// Links:
	//  1) https://core.telegram.org/constructor/secureValueTypePersonalDetails
	//  2) https://core.telegram.org/constructor/secureValueTypePassport
	//  3) https://core.telegram.org/constructor/secureValueTypeDriverLicense
	//  4) https://core.telegram.org/constructor/secureValueTypeIdentityCard
	//  5) https://core.telegram.org/constructor/secureValueTypeInternalPassport
	//  6) https://core.telegram.org/constructor/secureValueTypeUtilityBill
	//  7) https://core.telegram.org/constructor/secureValueTypeBankStatement
	//  8) https://core.telegram.org/constructor/secureValueTypeRentalAgreement
	//  9) https://core.telegram.org/constructor/secureValueTypePassportRegistration
	//  10) https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration
	Type SecureValueTypeClass
	// Hash
	FileHash [][]byte
	// Error message
	Text string
}

SecureValueErrorTranslationFiles represents TL type `secureValueErrorTranslationFiles#34636dd8`. Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation changes.

See https://core.telegram.org/constructor/secureValueErrorTranslationFiles for reference.

func (*SecureValueErrorTranslationFiles) Decode

Decode implements bin.Decoder.

func (*SecureValueErrorTranslationFiles) Encode

Encode implements bin.Encoder.

func (*SecureValueErrorTranslationFiles) String added in v0.12.0

String implements fmt.Stringer.

type SecureValueHash

type SecureValueHash struct {
	// Secure value type
	Type SecureValueTypeClass
	// Hash
	Hash []byte
}

SecureValueHash represents TL type `secureValueHash#ed1ecdb0`. Secure value hash

See https://core.telegram.org/constructor/secureValueHash for reference.

func (*SecureValueHash) Decode

func (s *SecureValueHash) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueHash) Encode

func (s *SecureValueHash) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueHash) String added in v0.12.0

func (s *SecureValueHash) String() string

String implements fmt.Stringer.

type SecureValueTypeAddress

type SecureValueTypeAddress struct {
}

SecureValueTypeAddress represents TL type `secureValueTypeAddress#cbe31e26`. Address

See https://core.telegram.org/constructor/secureValueTypeAddress for reference.

func (*SecureValueTypeAddress) Decode

func (s *SecureValueTypeAddress) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueTypeAddress) Encode

func (s *SecureValueTypeAddress) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueTypeAddress) String added in v0.12.0

func (s *SecureValueTypeAddress) String() string

String implements fmt.Stringer.

type SecureValueTypeBankStatement

type SecureValueTypeBankStatement struct {
}

SecureValueTypeBankStatement represents TL type `secureValueTypeBankStatement#89137c0d`. Bank statement

See https://core.telegram.org/constructor/secureValueTypeBankStatement for reference.

func (*SecureValueTypeBankStatement) Decode

Decode implements bin.Decoder.

func (*SecureValueTypeBankStatement) Encode

Encode implements bin.Encoder.

func (*SecureValueTypeBankStatement) String added in v0.12.0

String implements fmt.Stringer.

type SecureValueTypeBox

type SecureValueTypeBox struct {
	SecureValueType SecureValueTypeClass
}

SecureValueType boxes the SecureValueTypeClass providing a helper.

func (*SecureValueTypeBox) Decode

func (b *SecureValueTypeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for SecureValueTypeBox.

func (*SecureValueTypeBox) Encode

func (b *SecureValueTypeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for SecureValueTypeBox.

type SecureValueTypeClass

type SecureValueTypeClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

SecureValueTypeClass represents SecureValueType generic type.

See https://core.telegram.org/type/SecureValueType for reference.

Example:

g, err := DecodeSecureValueType(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *SecureValueTypePersonalDetails: // secureValueTypePersonalDetails#9d2a81e3
case *SecureValueTypePassport: // secureValueTypePassport#3dac6a00
case *SecureValueTypeDriverLicense: // secureValueTypeDriverLicense#6e425c4
case *SecureValueTypeIdentityCard: // secureValueTypeIdentityCard#a0d0744b
case *SecureValueTypeInternalPassport: // secureValueTypeInternalPassport#99a48f23
case *SecureValueTypeAddress: // secureValueTypeAddress#cbe31e26
case *SecureValueTypeUtilityBill: // secureValueTypeUtilityBill#fc36954e
case *SecureValueTypeBankStatement: // secureValueTypeBankStatement#89137c0d
case *SecureValueTypeRentalAgreement: // secureValueTypeRentalAgreement#8b883488
case *SecureValueTypePassportRegistration: // secureValueTypePassportRegistration#99e3806a
case *SecureValueTypeTemporaryRegistration: // secureValueTypeTemporaryRegistration#ea02ec33
case *SecureValueTypePhone: // secureValueTypePhone#b320aadb
case *SecureValueTypeEmail: // secureValueTypeEmail#8e3ca7ee
default: panic(v)
}

func DecodeSecureValueType

func DecodeSecureValueType(buf *bin.Buffer) (SecureValueTypeClass, error)

DecodeSecureValueType implements binary de-serialization for SecureValueTypeClass.

type SecureValueTypeDriverLicense

type SecureValueTypeDriverLicense struct {
}

SecureValueTypeDriverLicense represents TL type `secureValueTypeDriverLicense#6e425c4`. Driver's license

See https://core.telegram.org/constructor/secureValueTypeDriverLicense for reference.

func (*SecureValueTypeDriverLicense) Decode

Decode implements bin.Decoder.

func (*SecureValueTypeDriverLicense) Encode

Encode implements bin.Encoder.

func (*SecureValueTypeDriverLicense) String added in v0.12.0

String implements fmt.Stringer.

type SecureValueTypeEmail

type SecureValueTypeEmail struct {
}

SecureValueTypeEmail represents TL type `secureValueTypeEmail#8e3ca7ee`. Email

See https://core.telegram.org/constructor/secureValueTypeEmail for reference.

func (*SecureValueTypeEmail) Decode

func (s *SecureValueTypeEmail) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueTypeEmail) Encode

func (s *SecureValueTypeEmail) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueTypeEmail) String added in v0.12.0

func (s *SecureValueTypeEmail) String() string

String implements fmt.Stringer.

type SecureValueTypeIdentityCard

type SecureValueTypeIdentityCard struct {
}

SecureValueTypeIdentityCard represents TL type `secureValueTypeIdentityCard#a0d0744b`. Identity card

See https://core.telegram.org/constructor/secureValueTypeIdentityCard for reference.

func (*SecureValueTypeIdentityCard) Decode

Decode implements bin.Decoder.

func (*SecureValueTypeIdentityCard) Encode

Encode implements bin.Encoder.

func (*SecureValueTypeIdentityCard) String added in v0.12.0

func (s *SecureValueTypeIdentityCard) String() string

String implements fmt.Stringer.

type SecureValueTypeInternalPassport

type SecureValueTypeInternalPassport struct {
}

SecureValueTypeInternalPassport represents TL type `secureValueTypeInternalPassport#99a48f23`. Internal passport¹

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/constructor/secureValueTypeInternalPassport for reference.

func (*SecureValueTypeInternalPassport) Decode

Decode implements bin.Decoder.

func (*SecureValueTypeInternalPassport) Encode

Encode implements bin.Encoder.

func (*SecureValueTypeInternalPassport) String added in v0.12.0

String implements fmt.Stringer.

type SecureValueTypePassport

type SecureValueTypePassport struct {
}

SecureValueTypePassport represents TL type `secureValueTypePassport#3dac6a00`. Passport

See https://core.telegram.org/constructor/secureValueTypePassport for reference.

func (*SecureValueTypePassport) Decode

func (s *SecureValueTypePassport) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueTypePassport) Encode

func (s *SecureValueTypePassport) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueTypePassport) String added in v0.12.0

func (s *SecureValueTypePassport) String() string

String implements fmt.Stringer.

type SecureValueTypePassportRegistration

type SecureValueTypePassportRegistration struct {
}

SecureValueTypePassportRegistration represents TL type `secureValueTypePassportRegistration#99e3806a`. Internal registration passport¹

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/constructor/secureValueTypePassportRegistration for reference.

func (*SecureValueTypePassportRegistration) Decode

Decode implements bin.Decoder.

func (*SecureValueTypePassportRegistration) Encode

Encode implements bin.Encoder.

func (*SecureValueTypePassportRegistration) String added in v0.12.0

String implements fmt.Stringer.

type SecureValueTypePersonalDetails

type SecureValueTypePersonalDetails struct {
}

SecureValueTypePersonalDetails represents TL type `secureValueTypePersonalDetails#9d2a81e3`. Personal details

See https://core.telegram.org/constructor/secureValueTypePersonalDetails for reference.

func (*SecureValueTypePersonalDetails) Decode

Decode implements bin.Decoder.

func (*SecureValueTypePersonalDetails) Encode

Encode implements bin.Encoder.

func (*SecureValueTypePersonalDetails) String added in v0.12.0

String implements fmt.Stringer.

type SecureValueTypePhone

type SecureValueTypePhone struct {
}

SecureValueTypePhone represents TL type `secureValueTypePhone#b320aadb`. Phone

See https://core.telegram.org/constructor/secureValueTypePhone for reference.

func (*SecureValueTypePhone) Decode

func (s *SecureValueTypePhone) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueTypePhone) Encode

func (s *SecureValueTypePhone) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueTypePhone) String added in v0.12.0

func (s *SecureValueTypePhone) String() string

String implements fmt.Stringer.

type SecureValueTypeRentalAgreement

type SecureValueTypeRentalAgreement struct {
}

SecureValueTypeRentalAgreement represents TL type `secureValueTypeRentalAgreement#8b883488`. Rental agreement

See https://core.telegram.org/constructor/secureValueTypeRentalAgreement for reference.

func (*SecureValueTypeRentalAgreement) Decode

Decode implements bin.Decoder.

func (*SecureValueTypeRentalAgreement) Encode

Encode implements bin.Encoder.

func (*SecureValueTypeRentalAgreement) String added in v0.12.0

String implements fmt.Stringer.

type SecureValueTypeTemporaryRegistration

type SecureValueTypeTemporaryRegistration struct {
}

SecureValueTypeTemporaryRegistration represents TL type `secureValueTypeTemporaryRegistration#ea02ec33`. Temporary registration

See https://core.telegram.org/constructor/secureValueTypeTemporaryRegistration for reference.

func (*SecureValueTypeTemporaryRegistration) Decode

Decode implements bin.Decoder.

func (*SecureValueTypeTemporaryRegistration) Encode

Encode implements bin.Encoder.

func (*SecureValueTypeTemporaryRegistration) String added in v0.12.0

String implements fmt.Stringer.

type SecureValueTypeUtilityBill

type SecureValueTypeUtilityBill struct {
}

SecureValueTypeUtilityBill represents TL type `secureValueTypeUtilityBill#fc36954e`. Utility bill

See https://core.telegram.org/constructor/secureValueTypeUtilityBill for reference.

func (*SecureValueTypeUtilityBill) Decode

Decode implements bin.Decoder.

func (*SecureValueTypeUtilityBill) Encode

Encode implements bin.Encoder.

func (*SecureValueTypeUtilityBill) String added in v0.12.0

func (s *SecureValueTypeUtilityBill) String() string

String implements fmt.Stringer.

type SecureValueVector added in v0.8.0

type SecureValueVector struct {
	// Elements of Vector<SecureValue>
	Elems []SecureValue
}

SecureValueVector is a box for Vector<SecureValue>

func (*SecureValueVector) Decode added in v0.8.0

func (vec *SecureValueVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SecureValueVector) Encode added in v0.8.0

func (vec *SecureValueVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SecureValueVector) String added in v0.12.0

func (vec *SecureValueVector) String() string

String implements fmt.Stringer.

type SendMessageActionBox

type SendMessageActionBox struct {
	SendMessageAction SendMessageActionClass
}

SendMessageAction boxes the SendMessageActionClass providing a helper.

func (*SendMessageActionBox) Decode

func (b *SendMessageActionBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for SendMessageActionBox.

func (*SendMessageActionBox) Encode

func (b *SendMessageActionBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for SendMessageActionBox.

type SendMessageActionClass

type SendMessageActionClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

SendMessageActionClass represents SendMessageAction generic type.

See https://core.telegram.org/type/SendMessageAction for reference.

Example:

g, err := DecodeSendMessageAction(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *SendMessageTypingAction: // sendMessageTypingAction#16bf744e
case *SendMessageCancelAction: // sendMessageCancelAction#fd5ec8f5
case *SendMessageRecordVideoAction: // sendMessageRecordVideoAction#a187d66f
case *SendMessageUploadVideoAction: // sendMessageUploadVideoAction#e9763aec
case *SendMessageRecordAudioAction: // sendMessageRecordAudioAction#d52f73f7
case *SendMessageUploadAudioAction: // sendMessageUploadAudioAction#f351d7ab
case *SendMessageUploadPhotoAction: // sendMessageUploadPhotoAction#d1d34a26
case *SendMessageUploadDocumentAction: // sendMessageUploadDocumentAction#aa0cd9e4
case *SendMessageGeoLocationAction: // sendMessageGeoLocationAction#176f8ba1
case *SendMessageChooseContactAction: // sendMessageChooseContactAction#628cbc6f
case *SendMessageGamePlayAction: // sendMessageGamePlayAction#dd6a8f48
case *SendMessageRecordRoundAction: // sendMessageRecordRoundAction#88f27fbc
case *SendMessageUploadRoundAction: // sendMessageUploadRoundAction#243e1c66
case *SpeakingInGroupCallAction: // speakingInGroupCallAction#d92c2285
default: panic(v)
}

func DecodeSendMessageAction

func DecodeSendMessageAction(buf *bin.Buffer) (SendMessageActionClass, error)

DecodeSendMessageAction implements binary de-serialization for SendMessageActionClass.

type SendMessageCancelAction

type SendMessageCancelAction struct {
}

SendMessageCancelAction represents TL type `sendMessageCancelAction#fd5ec8f5`. Invalidate all previous action updates. E.g. when user deletes entered text or aborts a video upload.

See https://core.telegram.org/constructor/sendMessageCancelAction for reference.

func (*SendMessageCancelAction) Decode

func (s *SendMessageCancelAction) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SendMessageCancelAction) Encode

func (s *SendMessageCancelAction) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SendMessageCancelAction) String added in v0.12.0

func (s *SendMessageCancelAction) String() string

String implements fmt.Stringer.

type SendMessageChooseContactAction

type SendMessageChooseContactAction struct {
}

SendMessageChooseContactAction represents TL type `sendMessageChooseContactAction#628cbc6f`. User is selecting a contact to share.

See https://core.telegram.org/constructor/sendMessageChooseContactAction for reference.

func (*SendMessageChooseContactAction) Decode

Decode implements bin.Decoder.

func (*SendMessageChooseContactAction) Encode

Encode implements bin.Encoder.

func (*SendMessageChooseContactAction) String added in v0.12.0

String implements fmt.Stringer.

type SendMessageGamePlayAction

type SendMessageGamePlayAction struct {
}

SendMessageGamePlayAction represents TL type `sendMessageGamePlayAction#dd6a8f48`. User is playing a game

See https://core.telegram.org/constructor/sendMessageGamePlayAction for reference.

func (*SendMessageGamePlayAction) Decode

func (s *SendMessageGamePlayAction) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SendMessageGamePlayAction) Encode

func (s *SendMessageGamePlayAction) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SendMessageGamePlayAction) String added in v0.12.0

func (s *SendMessageGamePlayAction) String() string

String implements fmt.Stringer.

type SendMessageGeoLocationAction

type SendMessageGeoLocationAction struct {
}

SendMessageGeoLocationAction represents TL type `sendMessageGeoLocationAction#176f8ba1`. User is selecting a location to share.

See https://core.telegram.org/constructor/sendMessageGeoLocationAction for reference.

func (*SendMessageGeoLocationAction) Decode

Decode implements bin.Decoder.

func (*SendMessageGeoLocationAction) Encode

Encode implements bin.Encoder.

func (*SendMessageGeoLocationAction) String added in v0.12.0

String implements fmt.Stringer.

type SendMessageRecordAudioAction

type SendMessageRecordAudioAction struct {
}

SendMessageRecordAudioAction represents TL type `sendMessageRecordAudioAction#d52f73f7`. User is recording a voice message.

See https://core.telegram.org/constructor/sendMessageRecordAudioAction for reference.

func (*SendMessageRecordAudioAction) Decode

Decode implements bin.Decoder.

func (*SendMessageRecordAudioAction) Encode

Encode implements bin.Encoder.

func (*SendMessageRecordAudioAction) String added in v0.12.0

String implements fmt.Stringer.

type SendMessageRecordRoundAction

type SendMessageRecordRoundAction struct {
}

SendMessageRecordRoundAction represents TL type `sendMessageRecordRoundAction#88f27fbc`. User is recording a round video to share

See https://core.telegram.org/constructor/sendMessageRecordRoundAction for reference.

func (*SendMessageRecordRoundAction) Decode

Decode implements bin.Decoder.

func (*SendMessageRecordRoundAction) Encode

Encode implements bin.Encoder.

func (*SendMessageRecordRoundAction) String added in v0.12.0

String implements fmt.Stringer.

type SendMessageRecordVideoAction

type SendMessageRecordVideoAction struct {
}

SendMessageRecordVideoAction represents TL type `sendMessageRecordVideoAction#a187d66f`. User is recording a video.

See https://core.telegram.org/constructor/sendMessageRecordVideoAction for reference.

func (*SendMessageRecordVideoAction) Decode

Decode implements bin.Decoder.

func (*SendMessageRecordVideoAction) Encode

Encode implements bin.Encoder.

func (*SendMessageRecordVideoAction) String added in v0.12.0

String implements fmt.Stringer.

type SendMessageTypingAction

type SendMessageTypingAction struct {
}

SendMessageTypingAction represents TL type `sendMessageTypingAction#16bf744e`. User is typing.

See https://core.telegram.org/constructor/sendMessageTypingAction for reference.

func (*SendMessageTypingAction) Decode

func (s *SendMessageTypingAction) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SendMessageTypingAction) Encode

func (s *SendMessageTypingAction) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SendMessageTypingAction) String added in v0.12.0

func (s *SendMessageTypingAction) String() string

String implements fmt.Stringer.

type SendMessageUploadAudioAction

type SendMessageUploadAudioAction struct {
	// Progress percentage
	Progress int
}

SendMessageUploadAudioAction represents TL type `sendMessageUploadAudioAction#f351d7ab`. User is uploading a voice message.

See https://core.telegram.org/constructor/sendMessageUploadAudioAction for reference.

func (*SendMessageUploadAudioAction) Decode

Decode implements bin.Decoder.

func (*SendMessageUploadAudioAction) Encode

Encode implements bin.Encoder.

func (*SendMessageUploadAudioAction) String added in v0.12.0

String implements fmt.Stringer.

type SendMessageUploadDocumentAction

type SendMessageUploadDocumentAction struct {
	// Progress percentage
	Progress int
}

SendMessageUploadDocumentAction represents TL type `sendMessageUploadDocumentAction#aa0cd9e4`. User is uploading a file.

See https://core.telegram.org/constructor/sendMessageUploadDocumentAction for reference.

func (*SendMessageUploadDocumentAction) Decode

Decode implements bin.Decoder.

func (*SendMessageUploadDocumentAction) Encode

Encode implements bin.Encoder.

func (*SendMessageUploadDocumentAction) String added in v0.12.0

String implements fmt.Stringer.

type SendMessageUploadPhotoAction

type SendMessageUploadPhotoAction struct {
	// Progress percentage
	Progress int
}

SendMessageUploadPhotoAction represents TL type `sendMessageUploadPhotoAction#d1d34a26`. User is uploading a photo.

See https://core.telegram.org/constructor/sendMessageUploadPhotoAction for reference.

func (*SendMessageUploadPhotoAction) Decode

Decode implements bin.Decoder.

func (*SendMessageUploadPhotoAction) Encode

Encode implements bin.Encoder.

func (*SendMessageUploadPhotoAction) String added in v0.12.0

String implements fmt.Stringer.

type SendMessageUploadRoundAction

type SendMessageUploadRoundAction struct {
	// Progress percentage
	Progress int
}

SendMessageUploadRoundAction represents TL type `sendMessageUploadRoundAction#243e1c66`. User is uploading a round video

See https://core.telegram.org/constructor/sendMessageUploadRoundAction for reference.

func (*SendMessageUploadRoundAction) Decode

Decode implements bin.Decoder.

func (*SendMessageUploadRoundAction) Encode

Encode implements bin.Encoder.

func (*SendMessageUploadRoundAction) String added in v0.12.0

String implements fmt.Stringer.

type SendMessageUploadVideoAction

type SendMessageUploadVideoAction struct {
	// Progress percentage
	Progress int
}

SendMessageUploadVideoAction represents TL type `sendMessageUploadVideoAction#e9763aec`. User is uploading a video.

See https://core.telegram.org/constructor/sendMessageUploadVideoAction for reference.

func (*SendMessageUploadVideoAction) Decode

Decode implements bin.Decoder.

func (*SendMessageUploadVideoAction) Encode

Encode implements bin.Encoder.

func (*SendMessageUploadVideoAction) String added in v0.12.0

String implements fmt.Stringer.

type ServiceNotificationHandler added in v0.9.0

type ServiceNotificationHandler func(ctx UpdateContext, update *UpdateServiceNotification) error

ServiceNotificationHandler is a ServiceNotification event handler.

type ShippingOption

type ShippingOption struct {
	// Option ID
	ID string
	// Title
	Title string
	// List of price portions
	Prices []LabeledPrice
}

ShippingOption represents TL type `shippingOption#b6213cdf`. Shipping option

See https://core.telegram.org/constructor/shippingOption for reference.

func (*ShippingOption) Decode

func (s *ShippingOption) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ShippingOption) Encode

func (s *ShippingOption) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ShippingOption) String added in v0.12.0

func (s *ShippingOption) String() string

String implements fmt.Stringer.

type SpeakingInGroupCallAction added in v0.13.0

type SpeakingInGroupCallAction struct {
}

SpeakingInGroupCallAction represents TL type `speakingInGroupCallAction#d92c2285`.

See https://core.telegram.org/constructor/speakingInGroupCallAction for reference.

func (*SpeakingInGroupCallAction) Decode added in v0.13.0

func (s *SpeakingInGroupCallAction) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*SpeakingInGroupCallAction) Encode added in v0.13.0

func (s *SpeakingInGroupCallAction) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*SpeakingInGroupCallAction) String added in v0.13.0

func (s *SpeakingInGroupCallAction) String() string

String implements fmt.Stringer.

type StatsAbsValueAndPrev

type StatsAbsValueAndPrev struct {
	// Current value
	Current float64
	// Previous value
	Previous float64
}

StatsAbsValueAndPrev represents TL type `statsAbsValueAndPrev#cb43acde`. Statistics value couple; intial and final value for period of time currently in consideration

See https://core.telegram.org/constructor/statsAbsValueAndPrev for reference.

func (*StatsAbsValueAndPrev) Decode

func (s *StatsAbsValueAndPrev) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsAbsValueAndPrev) Encode

func (s *StatsAbsValueAndPrev) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsAbsValueAndPrev) String added in v0.12.0

func (s *StatsAbsValueAndPrev) String() string

String implements fmt.Stringer.

type StatsBroadcastStats

type StatsBroadcastStats struct {
	// Period in consideration
	Period StatsDateRangeDays
	// Follower count change for period in consideration
	Followers StatsAbsValueAndPrev
	// total_viewcount/postcount, for posts posted during the period in consideration (views_per_post). Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date).
	ViewsPerPost StatsAbsValueAndPrev
	// total_viewcount/postcount, for posts posted during the period in consideration (views_per_post). Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
	SharesPerPost StatsAbsValueAndPrev
	// Percentage of subscribers with enabled notifications
	EnabledNotifications StatsPercentValue
	// Channel growth graph (absolute subscriber count)
	GrowthGraph StatsGraphClass
	// Followers growth graph (relative subscriber count)
	FollowersGraph StatsGraphClass
	// Muted users graph (relative)
	MuteGraph StatsGraphClass
	// Views per hour graph (absolute)
	TopHoursGraph StatsGraphClass
	// Interactions graph (absolute)
	InteractionsGraph StatsGraphClass
	// IV interactions graph (absolute)
	IvInteractionsGraph StatsGraphClass
	// Views by source graph (absolute)
	ViewsBySourceGraph StatsGraphClass
	// New followers by source graph (absolute)
	NewFollowersBySourceGraph StatsGraphClass
	// Subscriber language graph (piechart)
	LanguagesGraph StatsGraphClass
	// Recent message interactions
	RecentMessageInteractions []MessageInteractionCounters
}

StatsBroadcastStats represents TL type `stats.broadcastStats#bdf78394`. Channel statistics¹.

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/constructor/stats.broadcastStats for reference.

func (*StatsBroadcastStats) Decode

func (b *StatsBroadcastStats) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsBroadcastStats) Encode

func (b *StatsBroadcastStats) Encode(buf *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsBroadcastStats) String added in v0.12.0

func (b *StatsBroadcastStats) String() string

String implements fmt.Stringer.

type StatsDateRangeDays

type StatsDateRangeDays struct {
	// Initial date
	MinDate int
	// Final date
	MaxDate int
}

StatsDateRangeDays represents TL type `statsDateRangeDays#b637edaf`. Channel statistics¹ date range

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/constructor/statsDateRangeDays for reference.

func (*StatsDateRangeDays) Decode

func (s *StatsDateRangeDays) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsDateRangeDays) Encode

func (s *StatsDateRangeDays) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsDateRangeDays) String added in v0.12.0

func (s *StatsDateRangeDays) String() string

String implements fmt.Stringer.

type StatsGetBroadcastStatsRequest

type StatsGetBroadcastStatsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to enable dark theme for graph colors
	Dark bool
	// The channel
	Channel InputChannelClass
}

StatsGetBroadcastStatsRequest represents TL type `stats.getBroadcastStats#ab42441a`. Get channel statistics¹

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/method/stats.getBroadcastStats for reference.

func (*StatsGetBroadcastStatsRequest) Decode

Decode implements bin.Decoder.

func (*StatsGetBroadcastStatsRequest) Encode

Encode implements bin.Encoder.

func (*StatsGetBroadcastStatsRequest) SetDark

func (g *StatsGetBroadcastStatsRequest) SetDark(value bool)

SetDark sets value of Dark conditional field.

func (*StatsGetBroadcastStatsRequest) String added in v0.12.0

String implements fmt.Stringer.

type StatsGetMegagroupStatsRequest

type StatsGetMegagroupStatsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to enable dark theme for graph colors
	Dark bool
	// Supergroup ID¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	Channel InputChannelClass
}

StatsGetMegagroupStatsRequest represents TL type `stats.getMegagroupStats#dcdf8607`. Get supergroup statistics¹

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/method/stats.getMegagroupStats for reference.

func (*StatsGetMegagroupStatsRequest) Decode

Decode implements bin.Decoder.

func (*StatsGetMegagroupStatsRequest) Encode

Encode implements bin.Encoder.

func (*StatsGetMegagroupStatsRequest) SetDark

func (g *StatsGetMegagroupStatsRequest) SetDark(value bool)

SetDark sets value of Dark conditional field.

func (*StatsGetMegagroupStatsRequest) String added in v0.12.0

String implements fmt.Stringer.

type StatsGetMessagePublicForwardsRequest

type StatsGetMessagePublicForwardsRequest struct {
	// Source channel
	Channel InputChannelClass
	// Source message ID
	MsgID int
	// Initially 0, then set to the next_rate parameter of messages.messagesSlice¹
	//
	// Links:
	//  1) https://core.telegram.org/constructor/messages.messagesSlice
	OffsetRate int
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetPeer InputPeerClass
	// Offsets for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	OffsetID int
	// Maximum number of results to return, see pagination¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets
	Limit int
}

StatsGetMessagePublicForwardsRequest represents TL type `stats.getMessagePublicForwards#5630281b`. Obtains a list of messages, indicating to which other public channels was a channel message forwarded. Will return a list of messages¹ with peer_id equal to the public channel to which this message was forwarded.

Links:

  1. https://core.telegram.org/constructor/message

See https://core.telegram.org/method/stats.getMessagePublicForwards for reference.

func (*StatsGetMessagePublicForwardsRequest) Decode

Decode implements bin.Decoder.

func (*StatsGetMessagePublicForwardsRequest) Encode

Encode implements bin.Encoder.

func (*StatsGetMessagePublicForwardsRequest) String added in v0.12.0

String implements fmt.Stringer.

type StatsGetMessageStatsRequest

type StatsGetMessageStatsRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether to enable dark theme for graph colors
	Dark bool
	// Channel ID
	Channel InputChannelClass
	// Message ID
	MsgID int
}

StatsGetMessageStatsRequest represents TL type `stats.getMessageStats#b6e0a3f5`. Get message statistics¹

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/method/stats.getMessageStats for reference.

func (*StatsGetMessageStatsRequest) Decode

Decode implements bin.Decoder.

func (*StatsGetMessageStatsRequest) Encode

Encode implements bin.Encoder.

func (*StatsGetMessageStatsRequest) SetDark

func (g *StatsGetMessageStatsRequest) SetDark(value bool)

SetDark sets value of Dark conditional field.

func (*StatsGetMessageStatsRequest) String added in v0.12.0

func (g *StatsGetMessageStatsRequest) String() string

String implements fmt.Stringer.

type StatsGraph

type StatsGraph struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Statistics data
	JSON DataJSON
	// Zoom token
	//
	// Use SetZoomToken and GetZoomToken helpers.
	ZoomToken string
}

StatsGraph represents TL type `statsGraph#8ea464b6`. Channel statistics graph¹

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/constructor/statsGraph for reference.

func (*StatsGraph) Decode

func (s *StatsGraph) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsGraph) Encode

func (s *StatsGraph) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsGraph) GetZoomToken

func (s *StatsGraph) GetZoomToken() (value string, ok bool)

GetZoomToken returns value of ZoomToken conditional field and boolean which is true if field was set.

func (*StatsGraph) SetZoomToken

func (s *StatsGraph) SetZoomToken(value string)

SetZoomToken sets value of ZoomToken conditional field.

func (*StatsGraph) String added in v0.12.0

func (s *StatsGraph) String() string

String implements fmt.Stringer.

type StatsGraphAsync

type StatsGraphAsync struct {
	// Token to use for fetching the async graph
	Token string
}

StatsGraphAsync represents TL type `statsGraphAsync#4a27eb2d`. This channel statistics graph¹ must be generated asynchronously using stats.loadAsyncGraph² to reduce server load

Links:

  1. https://core.telegram.org/api/stats
  2. https://core.telegram.org/method/stats.loadAsyncGraph

See https://core.telegram.org/constructor/statsGraphAsync for reference.

func (*StatsGraphAsync) Decode

func (s *StatsGraphAsync) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsGraphAsync) Encode

func (s *StatsGraphAsync) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsGraphAsync) String added in v0.12.0

func (s *StatsGraphAsync) String() string

String implements fmt.Stringer.

type StatsGraphBox

type StatsGraphBox struct {
	StatsGraph StatsGraphClass
}

StatsGraph boxes the StatsGraphClass providing a helper.

func (*StatsGraphBox) Decode

func (b *StatsGraphBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for StatsGraphBox.

func (*StatsGraphBox) Encode

func (b *StatsGraphBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for StatsGraphBox.

type StatsGraphClass

type StatsGraphClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

StatsGraphClass represents StatsGraph generic type.

See https://core.telegram.org/type/StatsGraph for reference.

Example:

g, err := DecodeStatsGraph(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *StatsGraphAsync: // statsGraphAsync#4a27eb2d
case *StatsGraphError: // statsGraphError#bedc9822
case *StatsGraph: // statsGraph#8ea464b6
default: panic(v)
}

func DecodeStatsGraph

func DecodeStatsGraph(buf *bin.Buffer) (StatsGraphClass, error)

DecodeStatsGraph implements binary de-serialization for StatsGraphClass.

type StatsGraphError

type StatsGraphError struct {
	// The error
	Error string
}

StatsGraphError represents TL type `statsGraphError#bedc9822`. An error occurred while generating the statistics graph¹

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/constructor/statsGraphError for reference.

func (*StatsGraphError) Decode

func (s *StatsGraphError) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsGraphError) Encode

func (s *StatsGraphError) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsGraphError) String added in v0.12.0

func (s *StatsGraphError) String() string

String implements fmt.Stringer.

type StatsGroupTopAdmin

type StatsGroupTopAdmin struct {
	// User ID
	UserID int
	// Number of deleted messages for statistics¹ period in consideration
	//
	// Links:
	//  1) https://core.telegram.org/api/stats
	Deleted int
	// Number of kicked users for statistics¹ period in consideration
	//
	// Links:
	//  1) https://core.telegram.org/api/stats
	Kicked int
	// Number of banned users for statistics¹ period in consideration
	//
	// Links:
	//  1) https://core.telegram.org/api/stats
	Banned int
}

StatsGroupTopAdmin represents TL type `statsGroupTopAdmin#6014f412`. Information about an active admin in a supergroup

See https://core.telegram.org/constructor/statsGroupTopAdmin for reference.

func (*StatsGroupTopAdmin) Decode

func (s *StatsGroupTopAdmin) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsGroupTopAdmin) Encode

func (s *StatsGroupTopAdmin) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsGroupTopAdmin) String added in v0.12.0

func (s *StatsGroupTopAdmin) String() string

String implements fmt.Stringer.

type StatsGroupTopInviter

type StatsGroupTopInviter struct {
	// User ID
	UserID int
	// Number of invitations for statistics¹ period in consideration
	//
	// Links:
	//  1) https://core.telegram.org/api/stats
	Invitations int
}

StatsGroupTopInviter represents TL type `statsGroupTopInviter#31962a4c`. Information about an active supergroup inviter

See https://core.telegram.org/constructor/statsGroupTopInviter for reference.

func (*StatsGroupTopInviter) Decode

func (s *StatsGroupTopInviter) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsGroupTopInviter) Encode

func (s *StatsGroupTopInviter) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsGroupTopInviter) String added in v0.12.0

func (s *StatsGroupTopInviter) String() string

String implements fmt.Stringer.

type StatsGroupTopPoster

type StatsGroupTopPoster struct {
	// User ID
	UserID int
	// Number of messages for statistics¹ period in consideration
	//
	// Links:
	//  1) https://core.telegram.org/api/stats
	Messages int
	// Average number of characters per message
	AvgChars int
}

StatsGroupTopPoster represents TL type `statsGroupTopPoster#18f3d0f7`. Information about an active user in a supergroup

See https://core.telegram.org/constructor/statsGroupTopPoster for reference.

func (*StatsGroupTopPoster) Decode

func (s *StatsGroupTopPoster) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsGroupTopPoster) Encode

func (s *StatsGroupTopPoster) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsGroupTopPoster) String added in v0.12.0

func (s *StatsGroupTopPoster) String() string

String implements fmt.Stringer.

type StatsLoadAsyncGraphRequest

type StatsLoadAsyncGraphRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Graph token from statsGraphAsync¹ constructor
	//
	// Links:
	//  1) https://core.telegram.org/constructor/statsGraphAsync
	Token string
	// Zoom value, if required
	//
	// Use SetX and GetX helpers.
	X int64
}

StatsLoadAsyncGraphRequest represents TL type `stats.loadAsyncGraph#621d5fa0`. Load channel statistics graph¹ asynchronously

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/method/stats.loadAsyncGraph for reference.

func (*StatsLoadAsyncGraphRequest) Decode

Decode implements bin.Decoder.

func (*StatsLoadAsyncGraphRequest) Encode

Encode implements bin.Encoder.

func (*StatsLoadAsyncGraphRequest) GetX

func (l *StatsLoadAsyncGraphRequest) GetX() (value int64, ok bool)

GetX returns value of X conditional field and boolean which is true if field was set.

func (*StatsLoadAsyncGraphRequest) SetX

func (l *StatsLoadAsyncGraphRequest) SetX(value int64)

SetX sets value of X conditional field.

func (*StatsLoadAsyncGraphRequest) String added in v0.12.0

func (l *StatsLoadAsyncGraphRequest) String() string

String implements fmt.Stringer.

type StatsMegagroupStats

type StatsMegagroupStats struct {
	// Period in consideration
	Period StatsDateRangeDays
	// Member count change for period in consideration
	Members StatsAbsValueAndPrev
	// Message number change for period in consideration
	Messages StatsAbsValueAndPrev
	// Number of users that viewed messages, for range in consideration
	Viewers StatsAbsValueAndPrev
	// Number of users that posted messages, for range in consideration
	Posters StatsAbsValueAndPrev
	// Supergroup growth graph (absolute subscriber count)
	GrowthGraph StatsGraphClass
	// Members growth (relative subscriber count)
	MembersGraph StatsGraphClass
	// New members by source graph
	NewMembersBySourceGraph StatsGraphClass
	// Subscriber language graph (piechart)
	LanguagesGraph StatsGraphClass
	// Message activity graph (stacked bar graph, message type)
	MessagesGraph StatsGraphClass
	// Group activity graph (deleted, modified messages, blocked users)
	ActionsGraph StatsGraphClass
	// Activity per hour graph (absolute)
	TopHoursGraph StatsGraphClass
	// Activity per day of week graph (absolute)
	WeekdaysGraph StatsGraphClass
	// Info about most active group members
	TopPosters []StatsGroupTopPoster
	// Info about most active group admins
	TopAdmins []StatsGroupTopAdmin
	// Info about most active group inviters
	TopInviters []StatsGroupTopInviter
	// Info about users mentioned in statistics
	Users []UserClass
}

StatsMegagroupStats represents TL type `stats.megagroupStats#ef7ff916`. Supergroup statistics¹

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/constructor/stats.megagroupStats for reference.

func (*StatsMegagroupStats) Decode

func (m *StatsMegagroupStats) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsMegagroupStats) Encode

func (m *StatsMegagroupStats) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsMegagroupStats) String added in v0.12.0

func (m *StatsMegagroupStats) String() string

String implements fmt.Stringer.

type StatsMessageStats

type StatsMessageStats struct {
	// Message view graph
	ViewsGraph StatsGraphClass
}

StatsMessageStats represents TL type `stats.messageStats#8999f295`. Message statistics

See https://core.telegram.org/constructor/stats.messageStats for reference.

func (*StatsMessageStats) Decode

func (m *StatsMessageStats) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsMessageStats) Encode

func (m *StatsMessageStats) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsMessageStats) String added in v0.12.0

func (m *StatsMessageStats) String() string

String implements fmt.Stringer.

type StatsPercentValue

type StatsPercentValue struct {
	// Partial value
	Part float64
	// Total value
	Total float64
}

StatsPercentValue represents TL type `statsPercentValue#cbce2fe0`. Channel statistics percentage¹. Compute the percentage simply by doing part * total / 100

Links:

  1. https://core.telegram.org/api/stats

See https://core.telegram.org/constructor/statsPercentValue for reference.

func (*StatsPercentValue) Decode

func (s *StatsPercentValue) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsPercentValue) Encode

func (s *StatsPercentValue) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsPercentValue) String added in v0.12.0

func (s *StatsPercentValue) String() string

String implements fmt.Stringer.

type StatsURL

type StatsURL struct {
	// Chat statistics
	URL string
}

StatsURL represents TL type `statsURL#47a971e0`. URL with chat statistics

See https://core.telegram.org/constructor/statsURL for reference.

func (*StatsURL) Decode

func (s *StatsURL) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StatsURL) Encode

func (s *StatsURL) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StatsURL) String added in v0.12.0

func (s *StatsURL) String() string

String implements fmt.Stringer.

type StickerPack

type StickerPack struct {
	// Emoji
	Emoticon string
	// Stickers
	Documents []int64
}

StickerPack represents TL type `stickerPack#12b299d4`. A stickerpack is a group of stickers associated to the same emoji. It is not a sticker pack the way it is usually intended, you may be looking for a StickerSet¹.

Links:

  1. https://core.telegram.org/type/StickerSet

See https://core.telegram.org/constructor/stickerPack for reference.

func (*StickerPack) Decode

func (s *StickerPack) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StickerPack) Encode

func (s *StickerPack) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StickerPack) String added in v0.12.0

func (s *StickerPack) String() string

String implements fmt.Stringer.

type StickerSet

type StickerSet struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this stickerset was archived (due to too many saved stickers in the current account)
	Archived bool
	// Is this stickerset official
	Official bool
	// Is this a mask stickerset
	Masks bool
	// Is this an animated stickerpack
	Animated bool
	// When was this stickerset installed
	//
	// Use SetInstalledDate and GetInstalledDate helpers.
	InstalledDate int
	// ID of the stickerset
	ID int64
	// Access hash of stickerset
	AccessHash int64
	// Title of stickerset
	Title string
	// Short name of stickerset to use in tg://addstickers?set=short_name
	ShortName string
	// Thumbs field of StickerSet.
	//
	// Use SetThumbs and GetThumbs helpers.
	Thumbs []PhotoSizeClass
	// DC ID of thumbnail
	//
	// Use SetThumbDCID and GetThumbDCID helpers.
	ThumbDCID int
	// Number of stickers in pack
	Count int
	// Hash
	Hash int
}

StickerSet represents TL type `stickerSet#40e237a8`. Represents a stickerset (stickerpack)

See https://core.telegram.org/constructor/stickerSet for reference.

func (*StickerSet) Decode

func (s *StickerSet) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StickerSet) Encode

func (s *StickerSet) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StickerSet) GetInstalledDate

func (s *StickerSet) GetInstalledDate() (value int, ok bool)

GetInstalledDate returns value of InstalledDate conditional field and boolean which is true if field was set.

func (*StickerSet) GetThumbDCID

func (s *StickerSet) GetThumbDCID() (value int, ok bool)

GetThumbDCID returns value of ThumbDCID conditional field and boolean which is true if field was set.

func (*StickerSet) GetThumbs added in v0.13.0

func (s *StickerSet) GetThumbs() (value []PhotoSizeClass, ok bool)

GetThumbs returns value of Thumbs conditional field and boolean which is true if field was set.

func (*StickerSet) SetAnimated

func (s *StickerSet) SetAnimated(value bool)

SetAnimated sets value of Animated conditional field.

func (*StickerSet) SetArchived

func (s *StickerSet) SetArchived(value bool)

SetArchived sets value of Archived conditional field.

func (*StickerSet) SetInstalledDate

func (s *StickerSet) SetInstalledDate(value int)

SetInstalledDate sets value of InstalledDate conditional field.

func (*StickerSet) SetMasks

func (s *StickerSet) SetMasks(value bool)

SetMasks sets value of Masks conditional field.

func (*StickerSet) SetOfficial

func (s *StickerSet) SetOfficial(value bool)

SetOfficial sets value of Official conditional field.

func (*StickerSet) SetThumbDCID

func (s *StickerSet) SetThumbDCID(value int)

SetThumbDCID sets value of ThumbDCID conditional field.

func (*StickerSet) SetThumbs added in v0.13.0

func (s *StickerSet) SetThumbs(value []PhotoSizeClass)

SetThumbs sets value of Thumbs conditional field.

func (*StickerSet) String added in v0.12.0

func (s *StickerSet) String() string

String implements fmt.Stringer.

type StickerSetCovered

type StickerSetCovered struct {
	// Stickerset
	Set StickerSet
	// Preview
	Cover DocumentClass
}

StickerSetCovered represents TL type `stickerSetCovered#6410a5d2`. Stickerset, with a specific sticker as preview

See https://core.telegram.org/constructor/stickerSetCovered for reference.

func (*StickerSetCovered) Decode

func (s *StickerSetCovered) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StickerSetCovered) Encode

func (s *StickerSetCovered) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StickerSetCovered) String added in v0.12.0

func (s *StickerSetCovered) String() string

String implements fmt.Stringer.

type StickerSetCoveredBox

type StickerSetCoveredBox struct {
	StickerSetCovered StickerSetCoveredClass
}

StickerSetCovered boxes the StickerSetCoveredClass providing a helper.

func (*StickerSetCoveredBox) Decode

func (b *StickerSetCoveredBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for StickerSetCoveredBox.

func (*StickerSetCoveredBox) Encode

func (b *StickerSetCoveredBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for StickerSetCoveredBox.

type StickerSetCoveredClass

type StickerSetCoveredClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

StickerSetCoveredClass represents StickerSetCovered generic type.

See https://core.telegram.org/type/StickerSetCovered for reference.

Example:

g, err := DecodeStickerSetCovered(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *StickerSetCovered: // stickerSetCovered#6410a5d2
case *StickerSetMultiCovered: // stickerSetMultiCovered#3407e51b
default: panic(v)
}

func DecodeStickerSetCovered

func DecodeStickerSetCovered(buf *bin.Buffer) (StickerSetCoveredClass, error)

DecodeStickerSetCovered implements binary de-serialization for StickerSetCoveredClass.

type StickerSetCoveredClassVector added in v0.8.0

type StickerSetCoveredClassVector struct {
	// Elements of Vector<StickerSetCovered>
	Elems []StickerSetCoveredClass
}

StickerSetCoveredClassVector is a box for Vector<StickerSetCovered>

func (*StickerSetCoveredClassVector) Decode added in v0.8.0

func (vec *StickerSetCoveredClassVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StickerSetCoveredClassVector) Encode added in v0.8.0

func (vec *StickerSetCoveredClassVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StickerSetCoveredClassVector) String added in v0.12.0

func (vec *StickerSetCoveredClassVector) String() string

String implements fmt.Stringer.

type StickerSetMultiCovered

type StickerSetMultiCovered struct {
	// Stickerset
	Set StickerSet
	// Preview stickers
	Covers []DocumentClass
}

StickerSetMultiCovered represents TL type `stickerSetMultiCovered#3407e51b`. Stickerset, with a specific stickers as preview

See https://core.telegram.org/constructor/stickerSetMultiCovered for reference.

func (*StickerSetMultiCovered) Decode

func (s *StickerSetMultiCovered) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StickerSetMultiCovered) Encode

func (s *StickerSetMultiCovered) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StickerSetMultiCovered) String added in v0.12.0

func (s *StickerSetMultiCovered) String() string

String implements fmt.Stringer.

type StickerSetsHandler added in v0.9.0

type StickerSetsHandler func(ctx UpdateContext, update *UpdateStickerSets) error

StickerSetsHandler is a StickerSets event handler.

type StickerSetsOrderHandler added in v0.9.0

type StickerSetsOrderHandler func(ctx UpdateContext, update *UpdateStickerSetsOrder) error

StickerSetsOrderHandler is a StickerSetsOrder event handler.

type StickersAddStickerToSetRequest

type StickersAddStickerToSetRequest struct {
	// The stickerset
	Stickerset InputStickerSetClass
	// The sticker
	Sticker InputStickerSetItem
}

StickersAddStickerToSetRequest represents TL type `stickers.addStickerToSet#8653febe`. Add a sticker to a stickerset, bots only. The sticker set must have been created by the bot.

See https://core.telegram.org/method/stickers.addStickerToSet for reference.

func (*StickersAddStickerToSetRequest) Decode

Decode implements bin.Decoder.

func (*StickersAddStickerToSetRequest) Encode

Encode implements bin.Encoder.

func (*StickersAddStickerToSetRequest) String added in v0.12.0

String implements fmt.Stringer.

type StickersChangeStickerPositionRequest

type StickersChangeStickerPositionRequest struct {
	// The sticker
	Sticker InputDocumentClass
	// The new position of the sticker, zero-based
	Position int
}

StickersChangeStickerPositionRequest represents TL type `stickers.changeStickerPosition#ffb6d4ca`. Changes the absolute position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot

See https://core.telegram.org/method/stickers.changeStickerPosition for reference.

func (*StickersChangeStickerPositionRequest) Decode

Decode implements bin.Decoder.

func (*StickersChangeStickerPositionRequest) Encode

Encode implements bin.Encoder.

func (*StickersChangeStickerPositionRequest) String added in v0.12.0

String implements fmt.Stringer.

type StickersCreateStickerSetRequest

type StickersCreateStickerSetRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is a mask stickerset
	Masks bool
	// Whether this is an animated stickerset
	Animated bool
	// Stickerset owner
	UserID InputUserClass
	// Stickerset name, 1-64 chars
	Title string
	// Sticker set name. Can contain only English letters, digits and underscores. Must end with "by" ( is case insensitive); 1-64 characters
	ShortName string
	// Thumbnail
	//
	// Use SetThumb and GetThumb helpers.
	Thumb InputDocumentClass
	// Stickers
	Stickers []InputStickerSetItem
}

StickersCreateStickerSetRequest represents TL type `stickers.createStickerSet#f1036780`. Create a stickerset, bots only.

See https://core.telegram.org/method/stickers.createStickerSet for reference.

func (*StickersCreateStickerSetRequest) Decode

Decode implements bin.Decoder.

func (*StickersCreateStickerSetRequest) Encode

Encode implements bin.Encoder.

func (*StickersCreateStickerSetRequest) GetThumb

func (c *StickersCreateStickerSetRequest) GetThumb() (value InputDocumentClass, ok bool)

GetThumb returns value of Thumb conditional field and boolean which is true if field was set.

func (*StickersCreateStickerSetRequest) SetAnimated

func (c *StickersCreateStickerSetRequest) SetAnimated(value bool)

SetAnimated sets value of Animated conditional field.

func (*StickersCreateStickerSetRequest) SetMasks

func (c *StickersCreateStickerSetRequest) SetMasks(value bool)

SetMasks sets value of Masks conditional field.

func (*StickersCreateStickerSetRequest) SetThumb

SetThumb sets value of Thumb conditional field.

func (*StickersCreateStickerSetRequest) String added in v0.12.0

String implements fmt.Stringer.

type StickersRemoveStickerFromSetRequest

type StickersRemoveStickerFromSetRequest struct {
	// The sticker to remove
	Sticker InputDocumentClass
}

StickersRemoveStickerFromSetRequest represents TL type `stickers.removeStickerFromSet#f7760f51`. Remove a sticker from the set where it belongs, bots only. The sticker set must have been created by the bot.

See https://core.telegram.org/method/stickers.removeStickerFromSet for reference.

func (*StickersRemoveStickerFromSetRequest) Decode

Decode implements bin.Decoder.

func (*StickersRemoveStickerFromSetRequest) Encode

Encode implements bin.Encoder.

func (*StickersRemoveStickerFromSetRequest) String added in v0.12.0

String implements fmt.Stringer.

type StickersSetStickerSetThumbRequest

type StickersSetStickerSetThumbRequest struct {
	// Stickerset
	Stickerset InputStickerSetClass
	// Thumbnail
	Thumb InputDocumentClass
}

StickersSetStickerSetThumbRequest represents TL type `stickers.setStickerSetThumb#9a364e30`. Set stickerset thumbnail

See https://core.telegram.org/method/stickers.setStickerSetThumb for reference.

func (*StickersSetStickerSetThumbRequest) Decode

Decode implements bin.Decoder.

func (*StickersSetStickerSetThumbRequest) Encode

Encode implements bin.Encoder.

func (*StickersSetStickerSetThumbRequest) String added in v0.12.0

String implements fmt.Stringer.

type StorageFileGif

type StorageFileGif struct {
}

StorageFileGif represents TL type `storage.fileGif#cae1aadf`. GIF image. MIME type: image/gif.

See https://core.telegram.org/constructor/storage.fileGif for reference.

func (*StorageFileGif) Decode

func (f *StorageFileGif) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StorageFileGif) Encode

func (f *StorageFileGif) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StorageFileGif) String added in v0.12.0

func (f *StorageFileGif) String() string

String implements fmt.Stringer.

type StorageFileJpeg

type StorageFileJpeg struct {
}

StorageFileJpeg represents TL type `storage.fileJpeg#7efe0e`. JPEG image. MIME type: image/jpeg.

See https://core.telegram.org/constructor/storage.fileJpeg for reference.

func (*StorageFileJpeg) Decode

func (f *StorageFileJpeg) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StorageFileJpeg) Encode

func (f *StorageFileJpeg) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StorageFileJpeg) String added in v0.12.0

func (f *StorageFileJpeg) String() string

String implements fmt.Stringer.

type StorageFileMov

type StorageFileMov struct {
}

StorageFileMov represents TL type `storage.fileMov#4b09ebbc`. Quicktime video. MIME type: video/quicktime.

See https://core.telegram.org/constructor/storage.fileMov for reference.

func (*StorageFileMov) Decode

func (f *StorageFileMov) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StorageFileMov) Encode

func (f *StorageFileMov) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StorageFileMov) String added in v0.12.0

func (f *StorageFileMov) String() string

String implements fmt.Stringer.

type StorageFileMp3

type StorageFileMp3 struct {
}

StorageFileMp3 represents TL type `storage.fileMp3#528a0677`. Mp3 audio. MIME type: audio/mpeg.

See https://core.telegram.org/constructor/storage.fileMp3 for reference.

func (*StorageFileMp3) Decode

func (f *StorageFileMp3) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StorageFileMp3) Encode

func (f *StorageFileMp3) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StorageFileMp3) String added in v0.12.0

func (f *StorageFileMp3) String() string

String implements fmt.Stringer.

type StorageFileMp4

type StorageFileMp4 struct {
}

StorageFileMp4 represents TL type `storage.fileMp4#b3cea0e4`. MPEG-4 video. MIME type: video/mp4.

See https://core.telegram.org/constructor/storage.fileMp4 for reference.

func (*StorageFileMp4) Decode

func (f *StorageFileMp4) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StorageFileMp4) Encode

func (f *StorageFileMp4) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StorageFileMp4) String added in v0.12.0

func (f *StorageFileMp4) String() string

String implements fmt.Stringer.

type StorageFilePartial

type StorageFilePartial struct {
}

StorageFilePartial represents TL type `storage.filePartial#40bc6f52`. Part of a bigger file.

See https://core.telegram.org/constructor/storage.filePartial for reference.

func (*StorageFilePartial) Decode

func (f *StorageFilePartial) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StorageFilePartial) Encode

func (f *StorageFilePartial) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StorageFilePartial) String added in v0.12.0

func (f *StorageFilePartial) String() string

String implements fmt.Stringer.

type StorageFilePdf

type StorageFilePdf struct {
}

StorageFilePdf represents TL type `storage.filePdf#ae1e508d`. PDF document image. MIME type: application/pdf.

See https://core.telegram.org/constructor/storage.filePdf for reference.

func (*StorageFilePdf) Decode

func (f *StorageFilePdf) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StorageFilePdf) Encode

func (f *StorageFilePdf) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StorageFilePdf) String added in v0.12.0

func (f *StorageFilePdf) String() string

String implements fmt.Stringer.

type StorageFilePng

type StorageFilePng struct {
}

StorageFilePng represents TL type `storage.filePng#a4f63c0`. PNG image. MIME type: image/png.

See https://core.telegram.org/constructor/storage.filePng for reference.

func (*StorageFilePng) Decode

func (f *StorageFilePng) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StorageFilePng) Encode

func (f *StorageFilePng) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StorageFilePng) String added in v0.12.0

func (f *StorageFilePng) String() string

String implements fmt.Stringer.

type StorageFileTypeBox

type StorageFileTypeBox struct {
	FileType StorageFileTypeClass
}

StorageFileType boxes the StorageFileTypeClass providing a helper.

func (*StorageFileTypeBox) Decode

func (b *StorageFileTypeBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for StorageFileTypeBox.

func (*StorageFileTypeBox) Encode

func (b *StorageFileTypeBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for StorageFileTypeBox.

type StorageFileTypeClass

type StorageFileTypeClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

StorageFileTypeClass represents storage.FileType generic type.

See https://core.telegram.org/type/storage.FileType for reference.

Example:

g, err := DecodeStorageFileType(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *StorageFileUnknown: // storage.fileUnknown#aa963b05
case *StorageFilePartial: // storage.filePartial#40bc6f52
case *StorageFileJpeg: // storage.fileJpeg#7efe0e
case *StorageFileGif: // storage.fileGif#cae1aadf
case *StorageFilePng: // storage.filePng#a4f63c0
case *StorageFilePdf: // storage.filePdf#ae1e508d
case *StorageFileMp3: // storage.fileMp3#528a0677
case *StorageFileMov: // storage.fileMov#4b09ebbc
case *StorageFileMp4: // storage.fileMp4#b3cea0e4
case *StorageFileWebp: // storage.fileWebp#1081464c
default: panic(v)
}

func DecodeStorageFileType

func DecodeStorageFileType(buf *bin.Buffer) (StorageFileTypeClass, error)

DecodeStorageFileType implements binary de-serialization for StorageFileTypeClass.

type StorageFileUnknown

type StorageFileUnknown struct {
}

StorageFileUnknown represents TL type `storage.fileUnknown#aa963b05`. Unknown type.

See https://core.telegram.org/constructor/storage.fileUnknown for reference.

func (*StorageFileUnknown) Decode

func (f *StorageFileUnknown) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StorageFileUnknown) Encode

func (f *StorageFileUnknown) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StorageFileUnknown) String added in v0.12.0

func (f *StorageFileUnknown) String() string

String implements fmt.Stringer.

type StorageFileWebp

type StorageFileWebp struct {
}

StorageFileWebp represents TL type `storage.fileWebp#1081464c`. WEBP image. MIME type: image/webp.

See https://core.telegram.org/constructor/storage.fileWebp for reference.

func (*StorageFileWebp) Decode

func (f *StorageFileWebp) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*StorageFileWebp) Encode

func (f *StorageFileWebp) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*StorageFileWebp) String added in v0.12.0

func (f *StorageFileWebp) String() string

String implements fmt.Stringer.

type TextAnchor

type TextAnchor struct {
	// Text
	Text RichTextClass
	// Section name
	Name string
}

TextAnchor represents TL type `textAnchor#35553762`. Text linking to another section of the page

See https://core.telegram.org/constructor/textAnchor for reference.

func (*TextAnchor) Decode

func (t *TextAnchor) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextAnchor) Encode

func (t *TextAnchor) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextAnchor) String added in v0.12.0

func (t *TextAnchor) String() string

String implements fmt.Stringer.

type TextBold

type TextBold struct {
	// Text
	Text RichTextClass
}

TextBold represents TL type `textBold#6724abc4`. Bold text

See https://core.telegram.org/constructor/textBold for reference.

func (*TextBold) Decode

func (t *TextBold) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextBold) Encode

func (t *TextBold) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextBold) String added in v0.12.0

func (t *TextBold) String() string

String implements fmt.Stringer.

type TextConcat

type TextConcat struct {
	// Concatenated rich texts
	Texts []RichTextClass
}

TextConcat represents TL type `textConcat#7e6260d7`. Concatenation of rich texts

See https://core.telegram.org/constructor/textConcat for reference.

func (*TextConcat) Decode

func (t *TextConcat) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextConcat) Encode

func (t *TextConcat) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextConcat) String added in v0.12.0

func (t *TextConcat) String() string

String implements fmt.Stringer.

type TextEmail

type TextEmail struct {
	// Link text
	Text RichTextClass
	// Email address
	Email string
}

TextEmail represents TL type `textEmail#de5a0dd6`. Rich text email link

See https://core.telegram.org/constructor/textEmail for reference.

func (*TextEmail) Decode

func (t *TextEmail) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEmail) Encode

func (t *TextEmail) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEmail) String added in v0.12.0

func (t *TextEmail) String() string

String implements fmt.Stringer.

type TextEmpty

type TextEmpty struct {
}

TextEmpty represents TL type `textEmpty#dc3d824f`. Empty rich text element

See https://core.telegram.org/constructor/textEmpty for reference.

func (*TextEmpty) Decode

func (t *TextEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextEmpty) Encode

func (t *TextEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextEmpty) String added in v0.12.0

func (t *TextEmpty) String() string

String implements fmt.Stringer.

type TextFixed

type TextFixed struct {
	// Text
	Text RichTextClass
}

TextFixed represents TL type `textFixed#6c3f19b9`. fixed-width rich text

See https://core.telegram.org/constructor/textFixed for reference.

func (*TextFixed) Decode

func (t *TextFixed) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextFixed) Encode

func (t *TextFixed) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextFixed) String added in v0.12.0

func (t *TextFixed) String() string

String implements fmt.Stringer.

type TextImage

type TextImage struct {
	// Document ID
	DocumentID int64
	// Width
	W int
	// Height
	H int
}

TextImage represents TL type `textImage#81ccf4f`. Inline image

See https://core.telegram.org/constructor/textImage for reference.

func (*TextImage) Decode

func (t *TextImage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextImage) Encode

func (t *TextImage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextImage) String added in v0.12.0

func (t *TextImage) String() string

String implements fmt.Stringer.

type TextItalic

type TextItalic struct {
	// Text
	Text RichTextClass
}

TextItalic represents TL type `textItalic#d912a59c`. Italic text

See https://core.telegram.org/constructor/textItalic for reference.

func (*TextItalic) Decode

func (t *TextItalic) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextItalic) Encode

func (t *TextItalic) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextItalic) String added in v0.12.0

func (t *TextItalic) String() string

String implements fmt.Stringer.

type TextMarked

type TextMarked struct {
	// Text
	Text RichTextClass
}

TextMarked represents TL type `textMarked#34b8621`. Highlighted text

See https://core.telegram.org/constructor/textMarked for reference.

func (*TextMarked) Decode

func (t *TextMarked) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextMarked) Encode

func (t *TextMarked) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextMarked) String added in v0.12.0

func (t *TextMarked) String() string

String implements fmt.Stringer.

type TextPhone

type TextPhone struct {
	// Text
	Text RichTextClass
	// Phone number
	Phone string
}

TextPhone represents TL type `textPhone#1ccb966a`. Rich text linked to a phone number

See https://core.telegram.org/constructor/textPhone for reference.

func (*TextPhone) Decode

func (t *TextPhone) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextPhone) Encode

func (t *TextPhone) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextPhone) String added in v0.12.0

func (t *TextPhone) String() string

String implements fmt.Stringer.

type TextPlain

type TextPlain struct {
	// Text
	Text string
}

TextPlain represents TL type `textPlain#744694e0`. Plain text

See https://core.telegram.org/constructor/textPlain for reference.

func (*TextPlain) Decode

func (t *TextPlain) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextPlain) Encode

func (t *TextPlain) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextPlain) String added in v0.12.0

func (t *TextPlain) String() string

String implements fmt.Stringer.

type TextStrike

type TextStrike struct {
	// Text
	Text RichTextClass
}

TextStrike represents TL type `textStrike#9bf8bb95`. Strikethrough text

See https://core.telegram.org/constructor/textStrike for reference.

func (*TextStrike) Decode

func (t *TextStrike) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextStrike) Encode

func (t *TextStrike) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextStrike) String added in v0.12.0

func (t *TextStrike) String() string

String implements fmt.Stringer.

type TextSubscript

type TextSubscript struct {
	// Text
	Text RichTextClass
}

TextSubscript represents TL type `textSubscript#ed6a8504`. Subscript text

See https://core.telegram.org/constructor/textSubscript for reference.

func (*TextSubscript) Decode

func (t *TextSubscript) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextSubscript) Encode

func (t *TextSubscript) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextSubscript) String added in v0.12.0

func (t *TextSubscript) String() string

String implements fmt.Stringer.

type TextSuperscript

type TextSuperscript struct {
	// Text
	Text RichTextClass
}

TextSuperscript represents TL type `textSuperscript#c7fb5e01`. Superscript text

See https://core.telegram.org/constructor/textSuperscript for reference.

func (*TextSuperscript) Decode

func (t *TextSuperscript) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextSuperscript) Encode

func (t *TextSuperscript) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextSuperscript) String added in v0.12.0

func (t *TextSuperscript) String() string

String implements fmt.Stringer.

type TextUnderline

type TextUnderline struct {
	// Text
	Text RichTextClass
}

TextUnderline represents TL type `textUnderline#c12622c4`. Underlined text

See https://core.telegram.org/constructor/textUnderline for reference.

func (*TextUnderline) Decode

func (t *TextUnderline) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextUnderline) Encode

func (t *TextUnderline) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextUnderline) String added in v0.12.0

func (t *TextUnderline) String() string

String implements fmt.Stringer.

type TextUrl

type TextUrl struct {
	// Text of link
	Text RichTextClass
	// Webpage HTTP URL
	URL string
	// If a preview was already generated for the page, the page ID
	WebpageID int64
}

TextUrl represents TL type `textUrl#3c2884c1`. Link

See https://core.telegram.org/constructor/textUrl for reference.

func (*TextUrl) Decode

func (t *TextUrl) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TextUrl) Encode

func (t *TextUrl) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TextUrl) String added in v0.12.0

func (t *TextUrl) String() string

String implements fmt.Stringer.

type Theme

type Theme struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the current user is the creator of this theme
	Creator bool
	// Whether this is the default theme
	Default bool
	// Theme ID
	ID int64
	// Theme access hash
	AccessHash int64
	// Unique theme ID
	Slug string
	// Theme name
	Title string
	// Theme
	//
	// Use SetDocument and GetDocument helpers.
	Document DocumentClass
	// Theme settings
	//
	// Use SetSettings and GetSettings helpers.
	Settings ThemeSettings
	// Installation count
	InstallsCount int
}

Theme represents TL type `theme#28f1114`. Theme

See https://core.telegram.org/constructor/theme for reference.

func (*Theme) Decode

func (t *Theme) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Theme) Encode

func (t *Theme) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Theme) GetDocument

func (t *Theme) GetDocument() (value DocumentClass, ok bool)

GetDocument returns value of Document conditional field and boolean which is true if field was set.

func (*Theme) GetSettings

func (t *Theme) GetSettings() (value ThemeSettings, ok bool)

GetSettings returns value of Settings conditional field and boolean which is true if field was set.

func (*Theme) SetCreator

func (t *Theme) SetCreator(value bool)

SetCreator sets value of Creator conditional field.

func (*Theme) SetDefault

func (t *Theme) SetDefault(value bool)

SetDefault sets value of Default conditional field.

func (*Theme) SetDocument

func (t *Theme) SetDocument(value DocumentClass)

SetDocument sets value of Document conditional field.

func (*Theme) SetSettings

func (t *Theme) SetSettings(value ThemeSettings)

SetSettings sets value of Settings conditional field.

func (*Theme) String added in v0.12.0

func (t *Theme) String() string

String implements fmt.Stringer.

type ThemeHandler added in v0.9.0

type ThemeHandler func(ctx UpdateContext, update *UpdateTheme) error

ThemeHandler is a Theme event handler.

type ThemeSettings

type ThemeSettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Base theme
	BaseTheme BaseThemeClass
	// Accent color, RGB24 format
	AccentColor int
	// Message gradient color (top), RGB24 format
	//
	// Use SetMessageTopColor and GetMessageTopColor helpers.
	MessageTopColor int
	// Message gradient color (bottom), RGB24 format
	//
	// Use SetMessageBottomColor and GetMessageBottomColor helpers.
	MessageBottomColor int
	// Wallpaper
	//
	// Use SetWallpaper and GetWallpaper helpers.
	Wallpaper WallPaperClass
}

ThemeSettings represents TL type `themeSettings#9c14984a`. Theme settings

See https://core.telegram.org/constructor/themeSettings for reference.

func (*ThemeSettings) Decode

func (t *ThemeSettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*ThemeSettings) Encode

func (t *ThemeSettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*ThemeSettings) GetMessageBottomColor

func (t *ThemeSettings) GetMessageBottomColor() (value int, ok bool)

GetMessageBottomColor returns value of MessageBottomColor conditional field and boolean which is true if field was set.

func (*ThemeSettings) GetMessageTopColor

func (t *ThemeSettings) GetMessageTopColor() (value int, ok bool)

GetMessageTopColor returns value of MessageTopColor conditional field and boolean which is true if field was set.

func (*ThemeSettings) GetWallpaper

func (t *ThemeSettings) GetWallpaper() (value WallPaperClass, ok bool)

GetWallpaper returns value of Wallpaper conditional field and boolean which is true if field was set.

func (*ThemeSettings) SetMessageBottomColor

func (t *ThemeSettings) SetMessageBottomColor(value int)

SetMessageBottomColor sets value of MessageBottomColor conditional field.

func (*ThemeSettings) SetMessageTopColor

func (t *ThemeSettings) SetMessageTopColor(value int)

SetMessageTopColor sets value of MessageTopColor conditional field.

func (*ThemeSettings) SetWallpaper

func (t *ThemeSettings) SetWallpaper(value WallPaperClass)

SetWallpaper sets value of Wallpaper conditional field.

func (*ThemeSettings) String added in v0.12.0

func (t *ThemeSettings) String() string

String implements fmt.Stringer.

type TopPeer

type TopPeer struct {
	// Peer
	Peer PeerClass
	// Rating as computed in top peer rating »¹
	//
	// Links:
	//  1) https://core.telegram.org/api/top-rating
	Rating float64
}

TopPeer represents TL type `topPeer#edcdc05b`. Top peer

See https://core.telegram.org/constructor/topPeer for reference.

func (*TopPeer) Decode

func (t *TopPeer) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TopPeer) Encode

func (t *TopPeer) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TopPeer) String added in v0.12.0

func (t *TopPeer) String() string

String implements fmt.Stringer.

type TopPeerCategoryBotsInline

type TopPeerCategoryBotsInline struct {
}

TopPeerCategoryBotsInline represents TL type `topPeerCategoryBotsInline#148677e2`. Most used inline bots

See https://core.telegram.org/constructor/topPeerCategoryBotsInline for reference.

func (*TopPeerCategoryBotsInline) Decode

func (t *TopPeerCategoryBotsInline) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TopPeerCategoryBotsInline) Encode

func (t *TopPeerCategoryBotsInline) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TopPeerCategoryBotsInline) String added in v0.12.0

func (t *TopPeerCategoryBotsInline) String() string

String implements fmt.Stringer.

type TopPeerCategoryBotsPM

type TopPeerCategoryBotsPM struct {
}

TopPeerCategoryBotsPM represents TL type `topPeerCategoryBotsPM#ab661b5b`. Most used bots

See https://core.telegram.org/constructor/topPeerCategoryBotsPM for reference.

func (*TopPeerCategoryBotsPM) Decode

func (t *TopPeerCategoryBotsPM) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TopPeerCategoryBotsPM) Encode

func (t *TopPeerCategoryBotsPM) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TopPeerCategoryBotsPM) String added in v0.12.0

func (t *TopPeerCategoryBotsPM) String() string

String implements fmt.Stringer.

type TopPeerCategoryBox

type TopPeerCategoryBox struct {
	TopPeerCategory TopPeerCategoryClass
}

TopPeerCategory boxes the TopPeerCategoryClass providing a helper.

func (*TopPeerCategoryBox) Decode

func (b *TopPeerCategoryBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for TopPeerCategoryBox.

func (*TopPeerCategoryBox) Encode

func (b *TopPeerCategoryBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for TopPeerCategoryBox.

type TopPeerCategoryChannels

type TopPeerCategoryChannels struct {
}

TopPeerCategoryChannels represents TL type `topPeerCategoryChannels#161d9628`. Most frequently visited channels

See https://core.telegram.org/constructor/topPeerCategoryChannels for reference.

func (*TopPeerCategoryChannels) Decode

func (t *TopPeerCategoryChannels) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TopPeerCategoryChannels) Encode

func (t *TopPeerCategoryChannels) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TopPeerCategoryChannels) String added in v0.12.0

func (t *TopPeerCategoryChannels) String() string

String implements fmt.Stringer.

type TopPeerCategoryClass

type TopPeerCategoryClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

TopPeerCategoryClass represents TopPeerCategory generic type.

See https://core.telegram.org/type/TopPeerCategory for reference.

Example:

g, err := DecodeTopPeerCategory(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *TopPeerCategoryBotsPM: // topPeerCategoryBotsPM#ab661b5b
case *TopPeerCategoryBotsInline: // topPeerCategoryBotsInline#148677e2
case *TopPeerCategoryCorrespondents: // topPeerCategoryCorrespondents#637b7ed
case *TopPeerCategoryGroups: // topPeerCategoryGroups#bd17a14a
case *TopPeerCategoryChannels: // topPeerCategoryChannels#161d9628
case *TopPeerCategoryPhoneCalls: // topPeerCategoryPhoneCalls#1e76a78c
case *TopPeerCategoryForwardUsers: // topPeerCategoryForwardUsers#a8406ca9
case *TopPeerCategoryForwardChats: // topPeerCategoryForwardChats#fbeec0f0
default: panic(v)
}

func DecodeTopPeerCategory

func DecodeTopPeerCategory(buf *bin.Buffer) (TopPeerCategoryClass, error)

DecodeTopPeerCategory implements binary de-serialization for TopPeerCategoryClass.

type TopPeerCategoryCorrespondents

type TopPeerCategoryCorrespondents struct {
}

TopPeerCategoryCorrespondents represents TL type `topPeerCategoryCorrespondents#637b7ed`. Users we've chatted most frequently with

See https://core.telegram.org/constructor/topPeerCategoryCorrespondents for reference.

func (*TopPeerCategoryCorrespondents) Decode

Decode implements bin.Decoder.

func (*TopPeerCategoryCorrespondents) Encode

Encode implements bin.Encoder.

func (*TopPeerCategoryCorrespondents) String added in v0.12.0

String implements fmt.Stringer.

type TopPeerCategoryForwardChats

type TopPeerCategoryForwardChats struct {
}

TopPeerCategoryForwardChats represents TL type `topPeerCategoryForwardChats#fbeec0f0`. Chats to which the users often forwards messages to

See https://core.telegram.org/constructor/topPeerCategoryForwardChats for reference.

func (*TopPeerCategoryForwardChats) Decode

Decode implements bin.Decoder.

func (*TopPeerCategoryForwardChats) Encode

Encode implements bin.Encoder.

func (*TopPeerCategoryForwardChats) String added in v0.12.0

func (t *TopPeerCategoryForwardChats) String() string

String implements fmt.Stringer.

type TopPeerCategoryForwardUsers

type TopPeerCategoryForwardUsers struct {
}

TopPeerCategoryForwardUsers represents TL type `topPeerCategoryForwardUsers#a8406ca9`. Users to which the users often forwards messages to

See https://core.telegram.org/constructor/topPeerCategoryForwardUsers for reference.

func (*TopPeerCategoryForwardUsers) Decode

Decode implements bin.Decoder.

func (*TopPeerCategoryForwardUsers) Encode

Encode implements bin.Encoder.

func (*TopPeerCategoryForwardUsers) String added in v0.12.0

func (t *TopPeerCategoryForwardUsers) String() string

String implements fmt.Stringer.

type TopPeerCategoryGroups

type TopPeerCategoryGroups struct {
}

TopPeerCategoryGroups represents TL type `topPeerCategoryGroups#bd17a14a`. Often-opened groups and supergroups

See https://core.telegram.org/constructor/topPeerCategoryGroups for reference.

func (*TopPeerCategoryGroups) Decode

func (t *TopPeerCategoryGroups) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TopPeerCategoryGroups) Encode

func (t *TopPeerCategoryGroups) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TopPeerCategoryGroups) String added in v0.12.0

func (t *TopPeerCategoryGroups) String() string

String implements fmt.Stringer.

type TopPeerCategoryPeers

type TopPeerCategoryPeers struct {
	// Top peer category of peers
	Category TopPeerCategoryClass
	// Count of peers
	Count int
	// Peers
	Peers []TopPeer
}

TopPeerCategoryPeers represents TL type `topPeerCategoryPeers#fb834291`. Top peer category

See https://core.telegram.org/constructor/topPeerCategoryPeers for reference.

func (*TopPeerCategoryPeers) Decode

func (t *TopPeerCategoryPeers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TopPeerCategoryPeers) Encode

func (t *TopPeerCategoryPeers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TopPeerCategoryPeers) String added in v0.12.0

func (t *TopPeerCategoryPeers) String() string

String implements fmt.Stringer.

type TopPeerCategoryPhoneCalls

type TopPeerCategoryPhoneCalls struct {
}

TopPeerCategoryPhoneCalls represents TL type `topPeerCategoryPhoneCalls#1e76a78c`. Most frequently called users

See https://core.telegram.org/constructor/topPeerCategoryPhoneCalls for reference.

func (*TopPeerCategoryPhoneCalls) Decode

func (t *TopPeerCategoryPhoneCalls) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*TopPeerCategoryPhoneCalls) Encode

func (t *TopPeerCategoryPhoneCalls) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*TopPeerCategoryPhoneCalls) String added in v0.12.0

func (t *TopPeerCategoryPhoneCalls) String() string

String implements fmt.Stringer.

type True

type True struct {
}

True represents TL type `true#3fedd339`. See predefined identifiers¹.

Links:

  1. https://core.telegram.org/mtproto/TL-formal#predefined-identifiers

See https://core.telegram.org/constructor/true for reference.

func (*True) Decode

func (t *True) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*True) Encode

func (t *True) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*True) String added in v0.12.0

func (t *True) String() string

String implements fmt.Stringer.

type UpdateBotCallbackQuery

type UpdateBotCallbackQuery struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Query ID
	QueryID int64
	// ID of the user that pressed the button
	UserID int
	// Chat where the inline keyboard was sent
	Peer PeerClass
	// Message ID
	MsgID int
	// Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
	ChatInstance int64
	// Callback data
	//
	// Use SetData and GetData helpers.
	Data []byte
	// Short name of a Game to be returned, serves as the unique identifier for the game
	//
	// Use SetGameShortName and GetGameShortName helpers.
	GameShortName string
}

UpdateBotCallbackQuery represents TL type `updateBotCallbackQuery#e73547e1`. A callback button was pressed, and the button data was sent to the bot that created the button

See https://core.telegram.org/constructor/updateBotCallbackQuery for reference.

func (*UpdateBotCallbackQuery) Decode

func (u *UpdateBotCallbackQuery) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateBotCallbackQuery) Encode

func (u *UpdateBotCallbackQuery) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateBotCallbackQuery) GetData

func (u *UpdateBotCallbackQuery) GetData() (value []byte, ok bool)

GetData returns value of Data conditional field and boolean which is true if field was set.

func (*UpdateBotCallbackQuery) GetGameShortName

func (u *UpdateBotCallbackQuery) GetGameShortName() (value string, ok bool)

GetGameShortName returns value of GameShortName conditional field and boolean which is true if field was set.

func (*UpdateBotCallbackQuery) SetData

func (u *UpdateBotCallbackQuery) SetData(value []byte)

SetData sets value of Data conditional field.

func (*UpdateBotCallbackQuery) SetGameShortName

func (u *UpdateBotCallbackQuery) SetGameShortName(value string)

SetGameShortName sets value of GameShortName conditional field.

func (*UpdateBotCallbackQuery) String added in v0.12.0

func (u *UpdateBotCallbackQuery) String() string

String implements fmt.Stringer.

type UpdateBotInlineQuery

type UpdateBotInlineQuery struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Query ID
	QueryID int64
	// User that sent the query
	UserID int
	// Text of query
	Query string
	// Attached geolocation
	//
	// Use SetGeo and GetGeo helpers.
	Geo GeoPointClass
	// PeerType field of UpdateBotInlineQuery.
	//
	// Use SetPeerType and GetPeerType helpers.
	PeerType InlineQueryPeerTypeClass
	// Offset to navigate through results
	Offset string
}

UpdateBotInlineQuery represents TL type `updateBotInlineQuery#3f2038db`. An incoming inline query

See https://core.telegram.org/constructor/updateBotInlineQuery for reference.

func (*UpdateBotInlineQuery) Decode

func (u *UpdateBotInlineQuery) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateBotInlineQuery) Encode

func (u *UpdateBotInlineQuery) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateBotInlineQuery) GetGeo

func (u *UpdateBotInlineQuery) GetGeo() (value GeoPointClass, ok bool)

GetGeo returns value of Geo conditional field and boolean which is true if field was set.

func (*UpdateBotInlineQuery) GetPeerType added in v0.13.0

func (u *UpdateBotInlineQuery) GetPeerType() (value InlineQueryPeerTypeClass, ok bool)

GetPeerType returns value of PeerType conditional field and boolean which is true if field was set.

func (*UpdateBotInlineQuery) SetGeo

func (u *UpdateBotInlineQuery) SetGeo(value GeoPointClass)

SetGeo sets value of Geo conditional field.

func (*UpdateBotInlineQuery) SetPeerType added in v0.13.0

func (u *UpdateBotInlineQuery) SetPeerType(value InlineQueryPeerTypeClass)

SetPeerType sets value of PeerType conditional field.

func (*UpdateBotInlineQuery) String added in v0.12.0

func (u *UpdateBotInlineQuery) String() string

String implements fmt.Stringer.

type UpdateBotInlineSend

type UpdateBotInlineSend struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The user that chose the result
	UserID int
	// The query that was used to obtain the result
	Query string
	// Optional. Sender location, only for bots that require user location
	//
	// Use SetGeo and GetGeo helpers.
	Geo GeoPointClass
	// The unique identifier for the result that was chosen
	ID string
	// Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.
	//
	// Use SetMsgID and GetMsgID helpers.
	MsgID InputBotInlineMessageID
}

UpdateBotInlineSend represents TL type `updateBotInlineSend#e48f964`. The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting¹ for details on how to enable these updates for your bot.

Links:

  1. https://core.telegram.org/bots/inline#collecting-feedback

See https://core.telegram.org/constructor/updateBotInlineSend for reference.

func (*UpdateBotInlineSend) Decode

func (u *UpdateBotInlineSend) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateBotInlineSend) Encode

func (u *UpdateBotInlineSend) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateBotInlineSend) GetGeo

func (u *UpdateBotInlineSend) GetGeo() (value GeoPointClass, ok bool)

GetGeo returns value of Geo conditional field and boolean which is true if field was set.

func (*UpdateBotInlineSend) GetMsgID

func (u *UpdateBotInlineSend) GetMsgID() (value InputBotInlineMessageID, ok bool)

GetMsgID returns value of MsgID conditional field and boolean which is true if field was set.

func (*UpdateBotInlineSend) SetGeo

func (u *UpdateBotInlineSend) SetGeo(value GeoPointClass)

SetGeo sets value of Geo conditional field.

func (*UpdateBotInlineSend) SetMsgID

func (u *UpdateBotInlineSend) SetMsgID(value InputBotInlineMessageID)

SetMsgID sets value of MsgID conditional field.

func (*UpdateBotInlineSend) String added in v0.12.0

func (u *UpdateBotInlineSend) String() string

String implements fmt.Stringer.

type UpdateBotPrecheckoutQuery

type UpdateBotPrecheckoutQuery struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Unique query identifier
	QueryID int64
	// User who sent the query
	UserID int
	// Bot specified invoice payload
	Payload []byte
	// Order info provided by the user
	//
	// Use SetInfo and GetInfo helpers.
	Info PaymentRequestedInfo
	// Identifier of the shipping option chosen by the user
	//
	// Use SetShippingOptionID and GetShippingOptionID helpers.
	ShippingOptionID string
	// Three-letter ISO 4217 currency¹ code
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments#supported-currencies
	Currency string
	// Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json¹, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
	//
	// Links:
	//  1) https://core.telegram.org/bots/payments/currencies.json
	TotalAmount int64
}

UpdateBotPrecheckoutQuery represents TL type `updateBotPrecheckoutQuery#5d2f3aa9`. This object contains information about an incoming pre-checkout query.

See https://core.telegram.org/constructor/updateBotPrecheckoutQuery for reference.

func (*UpdateBotPrecheckoutQuery) Decode

func (u *UpdateBotPrecheckoutQuery) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateBotPrecheckoutQuery) Encode

func (u *UpdateBotPrecheckoutQuery) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateBotPrecheckoutQuery) GetInfo

func (u *UpdateBotPrecheckoutQuery) GetInfo() (value PaymentRequestedInfo, ok bool)

GetInfo returns value of Info conditional field and boolean which is true if field was set.

func (*UpdateBotPrecheckoutQuery) GetShippingOptionID

func (u *UpdateBotPrecheckoutQuery) GetShippingOptionID() (value string, ok bool)

GetShippingOptionID returns value of ShippingOptionID conditional field and boolean which is true if field was set.

func (*UpdateBotPrecheckoutQuery) SetInfo

SetInfo sets value of Info conditional field.

func (*UpdateBotPrecheckoutQuery) SetShippingOptionID

func (u *UpdateBotPrecheckoutQuery) SetShippingOptionID(value string)

SetShippingOptionID sets value of ShippingOptionID conditional field.

func (*UpdateBotPrecheckoutQuery) String added in v0.12.0

func (u *UpdateBotPrecheckoutQuery) String() string

String implements fmt.Stringer.

type UpdateBotShippingQuery

type UpdateBotShippingQuery struct {
	// Unique query identifier
	QueryID int64
	// User who sent the query
	UserID int
	// Bot specified invoice payload
	Payload []byte
	// User specified shipping address
	ShippingAddress PostAddress
}

UpdateBotShippingQuery represents TL type `updateBotShippingQuery#e0cdc940`. This object contains information about an incoming shipping query.

See https://core.telegram.org/constructor/updateBotShippingQuery for reference.

func (*UpdateBotShippingQuery) Decode

func (u *UpdateBotShippingQuery) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateBotShippingQuery) Encode

func (u *UpdateBotShippingQuery) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateBotShippingQuery) String added in v0.12.0

func (u *UpdateBotShippingQuery) String() string

String implements fmt.Stringer.

type UpdateBotWebhookJSON

type UpdateBotWebhookJSON struct {
	// The event
	Data DataJSON
}

UpdateBotWebhookJSON represents TL type `updateBotWebhookJSON#8317c0c3`. A new incoming event; for bots only

See https://core.telegram.org/constructor/updateBotWebhookJSON for reference.

func (*UpdateBotWebhookJSON) Decode

func (u *UpdateBotWebhookJSON) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateBotWebhookJSON) Encode

func (u *UpdateBotWebhookJSON) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateBotWebhookJSON) String added in v0.12.0

func (u *UpdateBotWebhookJSON) String() string

String implements fmt.Stringer.

type UpdateBotWebhookJSONQuery

type UpdateBotWebhookJSONQuery struct {
	// Query identifier
	QueryID int64
	// Query data
	Data DataJSON
	// Query timeout
	Timeout int
}

UpdateBotWebhookJSONQuery represents TL type `updateBotWebhookJSONQuery#9b9240a6`. A new incoming query; for bots only

See https://core.telegram.org/constructor/updateBotWebhookJSONQuery for reference.

func (*UpdateBotWebhookJSONQuery) Decode

func (u *UpdateBotWebhookJSONQuery) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateBotWebhookJSONQuery) Encode

func (u *UpdateBotWebhookJSONQuery) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateBotWebhookJSONQuery) String added in v0.12.0

func (u *UpdateBotWebhookJSONQuery) String() string

String implements fmt.Stringer.

type UpdateBox

type UpdateBox struct {
	Update UpdateClass
}

Update boxes the UpdateClass providing a helper.

func (*UpdateBox) Decode

func (b *UpdateBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UpdateBox.

func (*UpdateBox) Encode

func (b *UpdateBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UpdateBox.

type UpdateChannel

type UpdateChannel struct {
	// Channel ID
	ChannelID int
}

UpdateChannel represents TL type `updateChannel#b6d45656`. A new channel is available

See https://core.telegram.org/constructor/updateChannel for reference.

func (*UpdateChannel) Decode

func (u *UpdateChannel) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateChannel) Encode

func (u *UpdateChannel) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateChannel) String added in v0.12.0

func (u *UpdateChannel) String() string

String implements fmt.Stringer.

type UpdateChannelAvailableMessages

type UpdateChannelAvailableMessages struct {
	// Channel/supergroup ID
	ChannelID int
	// Identifier of a maximum unavailable message in a channel due to hidden history.
	AvailableMinID int
}

UpdateChannelAvailableMessages represents TL type `updateChannelAvailableMessages#70db6837`. The history of a channel/supergroup¹ was hidden.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateChannelAvailableMessages for reference.

func (*UpdateChannelAvailableMessages) Decode

Decode implements bin.Decoder.

func (*UpdateChannelAvailableMessages) Encode

Encode implements bin.Encoder.

func (*UpdateChannelAvailableMessages) String added in v0.12.0

String implements fmt.Stringer.

type UpdateChannelMessageForwards

type UpdateChannelMessageForwards struct {
	// Channel ID
	ChannelID int
	// ID of the message
	ID int
	// New forward counter
	Forwards int
}

UpdateChannelMessageForwards represents TL type `updateChannelMessageForwards#6e8a84df`. The forward counter of a message in a channel has changed

See https://core.telegram.org/constructor/updateChannelMessageForwards for reference.

func (*UpdateChannelMessageForwards) Decode

Decode implements bin.Decoder.

func (*UpdateChannelMessageForwards) Encode

Encode implements bin.Encoder.

func (*UpdateChannelMessageForwards) String added in v0.12.0

String implements fmt.Stringer.

type UpdateChannelMessageViews

type UpdateChannelMessageViews struct {
	// Channel ID
	ChannelID int
	// ID of the message
	ID int
	// New view counter
	Views int
}

UpdateChannelMessageViews represents TL type `updateChannelMessageViews#98a12b4b`. The view counter of a message in a channel has changed

See https://core.telegram.org/constructor/updateChannelMessageViews for reference.

func (*UpdateChannelMessageViews) Decode

func (u *UpdateChannelMessageViews) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateChannelMessageViews) Encode

func (u *UpdateChannelMessageViews) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateChannelMessageViews) String added in v0.12.0

func (u *UpdateChannelMessageViews) String() string

String implements fmt.Stringer.

type UpdateChannelParticipant

type UpdateChannelParticipant struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Channel ID
	ChannelID int
	// Date of the event
	Date int
	// User in question
	UserID int
	// Previous participant status
	//
	// Use SetPrevParticipant and GetPrevParticipant helpers.
	PrevParticipant ChannelParticipantClass
	// New participant status
	//
	// Use SetNewParticipant and GetNewParticipant helpers.
	NewParticipant ChannelParticipantClass
	// PTS¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Qts int
}

UpdateChannelParticipant represents TL type `updateChannelParticipant#65d2b464`. A participant has left, joined, was banned or admined in a channel or supergroup¹.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateChannelParticipant for reference.

func (*UpdateChannelParticipant) Decode

func (u *UpdateChannelParticipant) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateChannelParticipant) Encode

func (u *UpdateChannelParticipant) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateChannelParticipant) GetNewParticipant

func (u *UpdateChannelParticipant) GetNewParticipant() (value ChannelParticipantClass, ok bool)

GetNewParticipant returns value of NewParticipant conditional field and boolean which is true if field was set.

func (*UpdateChannelParticipant) GetPrevParticipant

func (u *UpdateChannelParticipant) GetPrevParticipant() (value ChannelParticipantClass, ok bool)

GetPrevParticipant returns value of PrevParticipant conditional field and boolean which is true if field was set.

func (*UpdateChannelParticipant) SetNewParticipant

func (u *UpdateChannelParticipant) SetNewParticipant(value ChannelParticipantClass)

SetNewParticipant sets value of NewParticipant conditional field.

func (*UpdateChannelParticipant) SetPrevParticipant

func (u *UpdateChannelParticipant) SetPrevParticipant(value ChannelParticipantClass)

SetPrevParticipant sets value of PrevParticipant conditional field.

func (*UpdateChannelParticipant) String added in v0.12.0

func (u *UpdateChannelParticipant) String() string

String implements fmt.Stringer.

type UpdateChannelReadMessagesContents

type UpdateChannelReadMessagesContents struct {
	// Channel/supergroup¹ ID
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	ChannelID int
	// IDs of messages that were read
	Messages []int
}

UpdateChannelReadMessagesContents represents TL type `updateChannelReadMessagesContents#89893b45`. The specified channel/supergroup¹ messages were read

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateChannelReadMessagesContents for reference.

func (*UpdateChannelReadMessagesContents) Decode

Decode implements bin.Decoder.

func (*UpdateChannelReadMessagesContents) Encode

Encode implements bin.Encoder.

func (*UpdateChannelReadMessagesContents) String added in v0.12.0

String implements fmt.Stringer.

type UpdateChannelTooLong

type UpdateChannelTooLong struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// The channel
	ChannelID int
	// The PTS¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	//
	// Use SetPts and GetPts helpers.
	Pts int
}

UpdateChannelTooLong represents TL type `updateChannelTooLong#eb0467fb`. There are new updates in the specified channel, the client must fetch them. If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.

See https://core.telegram.org/constructor/updateChannelTooLong for reference.

func (*UpdateChannelTooLong) Decode

func (u *UpdateChannelTooLong) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateChannelTooLong) Encode

func (u *UpdateChannelTooLong) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateChannelTooLong) GetPts

func (u *UpdateChannelTooLong) GetPts() (value int, ok bool)

GetPts returns value of Pts conditional field and boolean which is true if field was set.

func (*UpdateChannelTooLong) SetPts

func (u *UpdateChannelTooLong) SetPts(value int)

SetPts sets value of Pts conditional field.

func (*UpdateChannelTooLong) String added in v0.12.0

func (u *UpdateChannelTooLong) String() string

String implements fmt.Stringer.

type UpdateChannelUserTyping

type UpdateChannelUserTyping struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Channel ID
	ChannelID int
	// Thread ID¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetTopMsgID and GetTopMsgID helpers.
	TopMsgID int
	// User ID
	UserID int
	// Whether the user is typing, sending a media or doing something else
	Action SendMessageActionClass
}

UpdateChannelUserTyping represents TL type `updateChannelUserTyping#ff2abe9f`. A user is typing in a supergroup, channel¹ or message thread²

Links:

  1. https://core.telegram.org/api/channel
  2. https://core.telegram.org/api/threads

See https://core.telegram.org/constructor/updateChannelUserTyping for reference.

func (*UpdateChannelUserTyping) Decode

func (u *UpdateChannelUserTyping) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateChannelUserTyping) Encode

func (u *UpdateChannelUserTyping) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateChannelUserTyping) GetTopMsgID

func (u *UpdateChannelUserTyping) GetTopMsgID() (value int, ok bool)

GetTopMsgID returns value of TopMsgID conditional field and boolean which is true if field was set.

func (*UpdateChannelUserTyping) SetTopMsgID

func (u *UpdateChannelUserTyping) SetTopMsgID(value int)

SetTopMsgID sets value of TopMsgID conditional field.

func (*UpdateChannelUserTyping) String added in v0.12.0

func (u *UpdateChannelUserTyping) String() string

String implements fmt.Stringer.

type UpdateChannelWebPage

type UpdateChannelWebPage struct {
	// Channel/supergroup¹ ID
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	ChannelID int
	// Generated webpage preview
	Webpage WebPageClass
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateChannelWebPage represents TL type `updateChannelWebPage#40771900`. A webpage preview of a link in a channel/supergroup¹ message was generated

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateChannelWebPage for reference.

func (*UpdateChannelWebPage) Decode

func (u *UpdateChannelWebPage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateChannelWebPage) Encode

func (u *UpdateChannelWebPage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateChannelWebPage) String added in v0.12.0

func (u *UpdateChannelWebPage) String() string

String implements fmt.Stringer.

type UpdateChat added in v0.13.0

type UpdateChat struct {
	// ChatID field of UpdateChat.
	ChatID int
}

UpdateChat represents TL type `updateChat#1330a196`.

See https://core.telegram.org/constructor/updateChat for reference.

func (*UpdateChat) Decode added in v0.13.0

func (u *UpdateChat) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateChat) Encode added in v0.13.0

func (u *UpdateChat) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateChat) String added in v0.13.0

func (u *UpdateChat) String() string

String implements fmt.Stringer.

type UpdateChatDefaultBannedRights

type UpdateChatDefaultBannedRights struct {
	// The chat
	Peer PeerClass
	// New default banned rights
	DefaultBannedRights ChatBannedRights
	// Version
	Version int
}

UpdateChatDefaultBannedRights represents TL type `updateChatDefaultBannedRights#54c01850`. Default banned rights in a normal chat¹ were updated

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateChatDefaultBannedRights for reference.

func (*UpdateChatDefaultBannedRights) Decode

Decode implements bin.Decoder.

func (*UpdateChatDefaultBannedRights) Encode

Encode implements bin.Encoder.

func (*UpdateChatDefaultBannedRights) String added in v0.12.0

String implements fmt.Stringer.

type UpdateChatParticipantAdd

type UpdateChatParticipantAdd struct {
	// Group ID
	ChatID int
	// ID of the new member
	UserID int
	// ID of the user, who added member to the group
	InviterID int
	// When was the participant added
	Date int
	// Chat version number
	Version int
}

UpdateChatParticipantAdd represents TL type `updateChatParticipantAdd#ea4b0e5c`. New group member.

See https://core.telegram.org/constructor/updateChatParticipantAdd for reference.

func (*UpdateChatParticipantAdd) Decode

func (u *UpdateChatParticipantAdd) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateChatParticipantAdd) Encode

func (u *UpdateChatParticipantAdd) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateChatParticipantAdd) String added in v0.12.0

func (u *UpdateChatParticipantAdd) String() string

String implements fmt.Stringer.

type UpdateChatParticipantAdmin

type UpdateChatParticipantAdmin struct {
	// Chat ID
	ChatID int
	// ID of the (de)admined user
	UserID int
	// Whether the user was rendered admin
	IsAdmin bool
	// Used in basic groups to reorder updates and make sure that all of them was received.
	Version int
}

UpdateChatParticipantAdmin represents TL type `updateChatParticipantAdmin#b6901959`. Admin permissions of a user in a legacy group¹ were changed

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateChatParticipantAdmin for reference.

func (*UpdateChatParticipantAdmin) Decode

Decode implements bin.Decoder.

func (*UpdateChatParticipantAdmin) Encode

Encode implements bin.Encoder.

func (*UpdateChatParticipantAdmin) String added in v0.12.0

func (u *UpdateChatParticipantAdmin) String() string

String implements fmt.Stringer.

type UpdateChatParticipantDelete

type UpdateChatParticipantDelete struct {
	// Group ID
	ChatID int
	// ID of the user
	UserID int
	// Used in basic groups to reorder updates and make sure that all of them was received.
	Version int
}

UpdateChatParticipantDelete represents TL type `updateChatParticipantDelete#6e5f8c22`. A member has left the group.

See https://core.telegram.org/constructor/updateChatParticipantDelete for reference.

func (*UpdateChatParticipantDelete) Decode

Decode implements bin.Decoder.

func (*UpdateChatParticipantDelete) Encode

Encode implements bin.Encoder.

func (*UpdateChatParticipantDelete) String added in v0.12.0

func (u *UpdateChatParticipantDelete) String() string

String implements fmt.Stringer.

type UpdateChatParticipants

type UpdateChatParticipants struct {
	// Updated chat participants
	Participants ChatParticipantsClass
}

UpdateChatParticipants represents TL type `updateChatParticipants#7761198`. Composition of chat participants changed.

See https://core.telegram.org/constructor/updateChatParticipants for reference.

func (*UpdateChatParticipants) Decode

func (u *UpdateChatParticipants) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateChatParticipants) Encode

func (u *UpdateChatParticipants) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateChatParticipants) String added in v0.12.0

func (u *UpdateChatParticipants) String() string

String implements fmt.Stringer.

type UpdateChatUserTyping

type UpdateChatUserTyping struct {
	// Group id
	ChatID int
	// User id
	UserID int
	// Type of actionParameter added in Layer 17¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/layers#layer-17
	Action SendMessageActionClass
}

UpdateChatUserTyping represents TL type `updateChatUserTyping#9a65ea1f`. The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no repeated update received after 6 seconds, it should be considered that the user stopped doing whatever he's been doing.

See https://core.telegram.org/constructor/updateChatUserTyping for reference.

func (*UpdateChatUserTyping) Decode

func (u *UpdateChatUserTyping) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateChatUserTyping) Encode

func (u *UpdateChatUserTyping) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateChatUserTyping) String added in v0.12.0

func (u *UpdateChatUserTyping) String() string

String implements fmt.Stringer.

type UpdateClass

type UpdateClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

UpdateClass represents Update generic type.

See https://core.telegram.org/type/Update for reference.

Example:

g, err := DecodeUpdate(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *UpdateNewMessage: // updateNewMessage#1f2b0afd
case *UpdateMessageID: // updateMessageID#4e90bfd6
case *UpdateDeleteMessages: // updateDeleteMessages#a20db0e5
case *UpdateUserTyping: // updateUserTyping#5c486927
case *UpdateChatUserTyping: // updateChatUserTyping#9a65ea1f
case *UpdateChatParticipants: // updateChatParticipants#7761198
case *UpdateUserStatus: // updateUserStatus#1bfbd823
case *UpdateUserName: // updateUserName#a7332b73
case *UpdateUserPhoto: // updateUserPhoto#95313b0c
case *UpdateNewEncryptedMessage: // updateNewEncryptedMessage#12bcbd9a
case *UpdateEncryptedChatTyping: // updateEncryptedChatTyping#1710f156
case *UpdateEncryption: // updateEncryption#b4a2e88d
case *UpdateEncryptedMessagesRead: // updateEncryptedMessagesRead#38fe25b7
case *UpdateChatParticipantAdd: // updateChatParticipantAdd#ea4b0e5c
case *UpdateChatParticipantDelete: // updateChatParticipantDelete#6e5f8c22
case *UpdateDcOptions: // updateDcOptions#8e5e9873
case *UpdateNotifySettings: // updateNotifySettings#bec268ef
case *UpdateServiceNotification: // updateServiceNotification#ebe46819
case *UpdatePrivacy: // updatePrivacy#ee3b272a
case *UpdateUserPhone: // updateUserPhone#12b9417b
case *UpdateReadHistoryInbox: // updateReadHistoryInbox#9c974fdf
case *UpdateReadHistoryOutbox: // updateReadHistoryOutbox#2f2f21bf
case *UpdateWebPage: // updateWebPage#7f891213
case *UpdateReadMessagesContents: // updateReadMessagesContents#68c13933
case *UpdateChannelTooLong: // updateChannelTooLong#eb0467fb
case *UpdateChannel: // updateChannel#b6d45656
case *UpdateNewChannelMessage: // updateNewChannelMessage#62ba04d9
case *UpdateReadChannelInbox: // updateReadChannelInbox#330b5424
case *UpdateDeleteChannelMessages: // updateDeleteChannelMessages#c37521c9
case *UpdateChannelMessageViews: // updateChannelMessageViews#98a12b4b
case *UpdateChatParticipantAdmin: // updateChatParticipantAdmin#b6901959
case *UpdateNewStickerSet: // updateNewStickerSet#688a30aa
case *UpdateStickerSetsOrder: // updateStickerSetsOrder#bb2d201
case *UpdateStickerSets: // updateStickerSets#43ae3dec
case *UpdateSavedGifs: // updateSavedGifs#9375341e
case *UpdateBotInlineQuery: // updateBotInlineQuery#3f2038db
case *UpdateBotInlineSend: // updateBotInlineSend#e48f964
case *UpdateEditChannelMessage: // updateEditChannelMessage#1b3f4df7
case *UpdateBotCallbackQuery: // updateBotCallbackQuery#e73547e1
case *UpdateEditMessage: // updateEditMessage#e40370a3
case *UpdateInlineBotCallbackQuery: // updateInlineBotCallbackQuery#f9d27a5a
case *UpdateReadChannelOutbox: // updateReadChannelOutbox#25d6c9c7
case *UpdateDraftMessage: // updateDraftMessage#ee2bb969
case *UpdateReadFeaturedStickers: // updateReadFeaturedStickers#571d2742
case *UpdateRecentStickers: // updateRecentStickers#9a422c20
case *UpdateConfig: // updateConfig#a229dd06
case *UpdatePtsChanged: // updatePtsChanged#3354678f
case *UpdateChannelWebPage: // updateChannelWebPage#40771900
case *UpdateDialogPinned: // updateDialogPinned#6e6fe51c
case *UpdatePinnedDialogs: // updatePinnedDialogs#fa0f3ca2
case *UpdateBotWebhookJSON: // updateBotWebhookJSON#8317c0c3
case *UpdateBotWebhookJSONQuery: // updateBotWebhookJSONQuery#9b9240a6
case *UpdateBotShippingQuery: // updateBotShippingQuery#e0cdc940
case *UpdateBotPrecheckoutQuery: // updateBotPrecheckoutQuery#5d2f3aa9
case *UpdatePhoneCall: // updatePhoneCall#ab0f6b1e
case *UpdateLangPackTooLong: // updateLangPackTooLong#46560264
case *UpdateLangPack: // updateLangPack#56022f4d
case *UpdateFavedStickers: // updateFavedStickers#e511996d
case *UpdateChannelReadMessagesContents: // updateChannelReadMessagesContents#89893b45
case *UpdateContactsReset: // updateContactsReset#7084a7be
case *UpdateChannelAvailableMessages: // updateChannelAvailableMessages#70db6837
case *UpdateDialogUnreadMark: // updateDialogUnreadMark#e16459c3
case *UpdateMessagePoll: // updateMessagePoll#aca1657b
case *UpdateChatDefaultBannedRights: // updateChatDefaultBannedRights#54c01850
case *UpdateFolderPeers: // updateFolderPeers#19360dc0
case *UpdatePeerSettings: // updatePeerSettings#6a7e7366
case *UpdatePeerLocated: // updatePeerLocated#b4afcfb0
case *UpdateNewScheduledMessage: // updateNewScheduledMessage#39a51dfb
case *UpdateDeleteScheduledMessages: // updateDeleteScheduledMessages#90866cee
case *UpdateTheme: // updateTheme#8216fba3
case *UpdateGeoLiveViewed: // updateGeoLiveViewed#871fb939
case *UpdateLoginToken: // updateLoginToken#564fe691
case *UpdateMessagePollVote: // updateMessagePollVote#42f88f2c
case *UpdateDialogFilter: // updateDialogFilter#26ffde7d
case *UpdateDialogFilterOrder: // updateDialogFilterOrder#a5d72105
case *UpdateDialogFilters: // updateDialogFilters#3504914f
case *UpdatePhoneCallSignalingData: // updatePhoneCallSignalingData#2661bf09
case *UpdateChannelParticipant: // updateChannelParticipant#65d2b464
case *UpdateChannelMessageForwards: // updateChannelMessageForwards#6e8a84df
case *UpdateReadChannelDiscussionInbox: // updateReadChannelDiscussionInbox#1cc7de54
case *UpdateReadChannelDiscussionOutbox: // updateReadChannelDiscussionOutbox#4638a26c
case *UpdatePeerBlocked: // updatePeerBlocked#246a4b22
case *UpdateChannelUserTyping: // updateChannelUserTyping#ff2abe9f
case *UpdatePinnedMessages: // updatePinnedMessages#ed85eab5
case *UpdatePinnedChannelMessages: // updatePinnedChannelMessages#8588878b
case *UpdateChat: // updateChat#1330a196
case *UpdateGroupCallParticipants: // updateGroupCallParticipants#f2ebdb4e
case *UpdateGroupCall: // updateGroupCall#a45eb99b
default: panic(v)
}

func DecodeUpdate

func DecodeUpdate(buf *bin.Buffer) (UpdateClass, error)

DecodeUpdate implements binary de-serialization for UpdateClass.

type UpdateConfig

type UpdateConfig struct {
}

UpdateConfig represents TL type `updateConfig#a229dd06`. The server-side configuration has changed; the client should re-fetch the config using help.getConfig¹

Links:

  1. https://core.telegram.org/method/help.getConfig

See https://core.telegram.org/constructor/updateConfig for reference.

func (*UpdateConfig) Decode

func (u *UpdateConfig) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateConfig) Encode

func (u *UpdateConfig) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateConfig) String added in v0.12.0

func (u *UpdateConfig) String() string

String implements fmt.Stringer.

type UpdateContactsReset

type UpdateContactsReset struct {
}

UpdateContactsReset represents TL type `updateContactsReset#7084a7be`. All contacts were deleted

See https://core.telegram.org/constructor/updateContactsReset for reference.

func (*UpdateContactsReset) Decode

func (u *UpdateContactsReset) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateContactsReset) Encode

func (u *UpdateContactsReset) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateContactsReset) String added in v0.12.0

func (u *UpdateContactsReset) String() string

String implements fmt.Stringer.

type UpdateContext added in v0.9.0

type UpdateContext struct {
	context.Context

	Users map[int]*User
	Chats map[int]*Chat
	// contains filtered or unexported fields
}

type UpdateDcOptions

type UpdateDcOptions struct {
	// New connection options
	DCOptions []DcOption
}

UpdateDcOptions represents TL type `updateDcOptions#8e5e9873`. Changes in the data center configuration options.

See https://core.telegram.org/constructor/updateDcOptions for reference.

func (*UpdateDcOptions) Decode

func (u *UpdateDcOptions) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateDcOptions) Encode

func (u *UpdateDcOptions) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateDcOptions) String added in v0.12.0

func (u *UpdateDcOptions) String() string

String implements fmt.Stringer.

type UpdateDeleteChannelMessages

type UpdateDeleteChannelMessages struct {
	// Channel ID
	ChannelID int
	// IDs of messages that were deleted
	Messages []int
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateDeleteChannelMessages represents TL type `updateDeleteChannelMessages#c37521c9`. Some messages in a supergroup/channel¹ were deleted

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateDeleteChannelMessages for reference.

func (*UpdateDeleteChannelMessages) Decode

Decode implements bin.Decoder.

func (*UpdateDeleteChannelMessages) Encode

Encode implements bin.Encoder.

func (*UpdateDeleteChannelMessages) String added in v0.12.0

func (u *UpdateDeleteChannelMessages) String() string

String implements fmt.Stringer.

type UpdateDeleteMessages

type UpdateDeleteMessages struct {
	// List of identifiers of deleted messages
	Messages []int
	// New quality of actions in a message box
	Pts int
	// Number of generated events¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateDeleteMessages represents TL type `updateDeleteMessages#a20db0e5`. Messages were deleted.

See https://core.telegram.org/constructor/updateDeleteMessages for reference.

func (*UpdateDeleteMessages) Decode

func (u *UpdateDeleteMessages) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateDeleteMessages) Encode

func (u *UpdateDeleteMessages) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateDeleteMessages) String added in v0.12.0

func (u *UpdateDeleteMessages) String() string

String implements fmt.Stringer.

type UpdateDeleteScheduledMessages

type UpdateDeleteScheduledMessages struct {
	// Peer
	Peer PeerClass
	// Deleted scheduled messages
	Messages []int
}

UpdateDeleteScheduledMessages represents TL type `updateDeleteScheduledMessages#90866cee`. Some scheduled messages¹ were deleted from the schedule queue of a chat

Links:

  1. https://core.telegram.org/api/scheduled-messages

See https://core.telegram.org/constructor/updateDeleteScheduledMessages for reference.

func (*UpdateDeleteScheduledMessages) Decode

Decode implements bin.Decoder.

func (*UpdateDeleteScheduledMessages) Encode

Encode implements bin.Encoder.

func (*UpdateDeleteScheduledMessages) String added in v0.12.0

String implements fmt.Stringer.

type UpdateDialogFilter

type UpdateDialogFilter struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Folder¹ ID
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	ID int
	// Folder¹ info
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	//
	// Use SetFilter and GetFilter helpers.
	Filter DialogFilter
}

UpdateDialogFilter represents TL type `updateDialogFilter#26ffde7d`. A new folder¹ was added

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/constructor/updateDialogFilter for reference.

func (*UpdateDialogFilter) Decode

func (u *UpdateDialogFilter) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateDialogFilter) Encode

func (u *UpdateDialogFilter) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateDialogFilter) GetFilter

func (u *UpdateDialogFilter) GetFilter() (value DialogFilter, ok bool)

GetFilter returns value of Filter conditional field and boolean which is true if field was set.

func (*UpdateDialogFilter) SetFilter

func (u *UpdateDialogFilter) SetFilter(value DialogFilter)

SetFilter sets value of Filter conditional field.

func (*UpdateDialogFilter) String added in v0.12.0

func (u *UpdateDialogFilter) String() string

String implements fmt.Stringer.

type UpdateDialogFilterOrder

type UpdateDialogFilterOrder struct {
	// Ordered folder IDs¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders
	Order []int
}

UpdateDialogFilterOrder represents TL type `updateDialogFilterOrder#a5d72105`. New folder¹ order

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/constructor/updateDialogFilterOrder for reference.

func (*UpdateDialogFilterOrder) Decode

func (u *UpdateDialogFilterOrder) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateDialogFilterOrder) Encode

func (u *UpdateDialogFilterOrder) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateDialogFilterOrder) String added in v0.12.0

func (u *UpdateDialogFilterOrder) String() string

String implements fmt.Stringer.

type UpdateDialogFilters

type UpdateDialogFilters struct {
}

UpdateDialogFilters represents TL type `updateDialogFilters#3504914f`. Clients should update folder¹ info

Links:

  1. https://core.telegram.org/api/folders

See https://core.telegram.org/constructor/updateDialogFilters for reference.

func (*UpdateDialogFilters) Decode

func (u *UpdateDialogFilters) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateDialogFilters) Encode

func (u *UpdateDialogFilters) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateDialogFilters) String added in v0.12.0

func (u *UpdateDialogFilters) String() string

String implements fmt.Stringer.

type UpdateDialogPinned

type UpdateDialogPinned struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the dialog was pinned
	Pinned bool
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// The dialog
	Peer DialogPeerClass
}

UpdateDialogPinned represents TL type `updateDialogPinned#6e6fe51c`. A dialog was pinned/unpinned

See https://core.telegram.org/constructor/updateDialogPinned for reference.

func (*UpdateDialogPinned) Decode

func (u *UpdateDialogPinned) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateDialogPinned) Encode

func (u *UpdateDialogPinned) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateDialogPinned) GetFolderID

func (u *UpdateDialogPinned) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*UpdateDialogPinned) SetFolderID

func (u *UpdateDialogPinned) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*UpdateDialogPinned) SetPinned

func (u *UpdateDialogPinned) SetPinned(value bool)

SetPinned sets value of Pinned conditional field.

func (*UpdateDialogPinned) String added in v0.12.0

func (u *UpdateDialogPinned) String() string

String implements fmt.Stringer.

type UpdateDialogUnreadMark

type UpdateDialogUnreadMark struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Was the chat marked or unmarked as read
	Unread bool
	// The dialog
	Peer DialogPeerClass
}

UpdateDialogUnreadMark represents TL type `updateDialogUnreadMark#e16459c3`. The manual unread mark of a chat was changed

See https://core.telegram.org/constructor/updateDialogUnreadMark for reference.

func (*UpdateDialogUnreadMark) Decode

func (u *UpdateDialogUnreadMark) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateDialogUnreadMark) Encode

func (u *UpdateDialogUnreadMark) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateDialogUnreadMark) SetUnread

func (u *UpdateDialogUnreadMark) SetUnread(value bool)

SetUnread sets value of Unread conditional field.

func (*UpdateDialogUnreadMark) String added in v0.12.0

func (u *UpdateDialogUnreadMark) String() string

String implements fmt.Stringer.

type UpdateDispatcher added in v0.9.0

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

func NewUpdateDispatcher added in v0.9.0

func NewUpdateDispatcher() UpdateDispatcher

func (UpdateDispatcher) Handle added in v0.9.0

func (u UpdateDispatcher) Handle(ctx context.Context, updates *Updates) error

func (UpdateDispatcher) OnBotCallbackQuery added in v0.9.0

func (u UpdateDispatcher) OnBotCallbackQuery(handler BotCallbackQueryHandler)

OnBotCallbackQuery sets BotCallbackQuery handler.

func (UpdateDispatcher) OnBotInlineQuery added in v0.9.0

func (u UpdateDispatcher) OnBotInlineQuery(handler BotInlineQueryHandler)

OnBotInlineQuery sets BotInlineQuery handler.

func (UpdateDispatcher) OnBotInlineSend added in v0.9.0

func (u UpdateDispatcher) OnBotInlineSend(handler BotInlineSendHandler)

OnBotInlineSend sets BotInlineSend handler.

func (UpdateDispatcher) OnBotPrecheckoutQuery added in v0.9.0

func (u UpdateDispatcher) OnBotPrecheckoutQuery(handler BotPrecheckoutQueryHandler)

OnBotPrecheckoutQuery sets BotPrecheckoutQuery handler.

func (UpdateDispatcher) OnBotShippingQuery added in v0.9.0

func (u UpdateDispatcher) OnBotShippingQuery(handler BotShippingQueryHandler)

OnBotShippingQuery sets BotShippingQuery handler.

func (UpdateDispatcher) OnBotWebhookJSON added in v0.9.0

func (u UpdateDispatcher) OnBotWebhookJSON(handler BotWebhookJSONHandler)

OnBotWebhookJSON sets BotWebhookJSON handler.

func (UpdateDispatcher) OnBotWebhookJSONQuery added in v0.9.0

func (u UpdateDispatcher) OnBotWebhookJSONQuery(handler BotWebhookJSONQueryHandler)

OnBotWebhookJSONQuery sets BotWebhookJSONQuery handler.

func (UpdateDispatcher) OnChannel added in v0.9.0

func (u UpdateDispatcher) OnChannel(handler ChannelHandler)

OnChannel sets Channel handler.

func (UpdateDispatcher) OnChannelAvailableMessages added in v0.9.0

func (u UpdateDispatcher) OnChannelAvailableMessages(handler ChannelAvailableMessagesHandler)

OnChannelAvailableMessages sets ChannelAvailableMessages handler.

func (UpdateDispatcher) OnChannelMessageForwards added in v0.9.0

func (u UpdateDispatcher) OnChannelMessageForwards(handler ChannelMessageForwardsHandler)

OnChannelMessageForwards sets ChannelMessageForwards handler.

func (UpdateDispatcher) OnChannelMessageViews added in v0.9.0

func (u UpdateDispatcher) OnChannelMessageViews(handler ChannelMessageViewsHandler)

OnChannelMessageViews sets ChannelMessageViews handler.

func (UpdateDispatcher) OnChannelParticipant added in v0.9.0

func (u UpdateDispatcher) OnChannelParticipant(handler ChannelParticipantHandler)

OnChannelParticipant sets ChannelParticipant handler.

func (UpdateDispatcher) OnChannelReadMessagesContents added in v0.9.0

func (u UpdateDispatcher) OnChannelReadMessagesContents(handler ChannelReadMessagesContentsHandler)

OnChannelReadMessagesContents sets ChannelReadMessagesContents handler.

func (UpdateDispatcher) OnChannelTooLong added in v0.9.0

func (u UpdateDispatcher) OnChannelTooLong(handler ChannelTooLongHandler)

OnChannelTooLong sets ChannelTooLong handler.

func (UpdateDispatcher) OnChannelUserTyping added in v0.9.0

func (u UpdateDispatcher) OnChannelUserTyping(handler ChannelUserTypingHandler)

OnChannelUserTyping sets ChannelUserTyping handler.

func (UpdateDispatcher) OnChannelWebPage added in v0.9.0

func (u UpdateDispatcher) OnChannelWebPage(handler ChannelWebPageHandler)

OnChannelWebPage sets ChannelWebPage handler.

func (UpdateDispatcher) OnChat added in v0.13.0

func (u UpdateDispatcher) OnChat(handler ChatHandler)

OnChat sets Chat handler.

func (UpdateDispatcher) OnChatDefaultBannedRights added in v0.9.0

func (u UpdateDispatcher) OnChatDefaultBannedRights(handler ChatDefaultBannedRightsHandler)

OnChatDefaultBannedRights sets ChatDefaultBannedRights handler.

func (UpdateDispatcher) OnChatParticipantAdd added in v0.9.0

func (u UpdateDispatcher) OnChatParticipantAdd(handler ChatParticipantAddHandler)

OnChatParticipantAdd sets ChatParticipantAdd handler.

func (UpdateDispatcher) OnChatParticipantAdmin added in v0.9.0

func (u UpdateDispatcher) OnChatParticipantAdmin(handler ChatParticipantAdminHandler)

OnChatParticipantAdmin sets ChatParticipantAdmin handler.

func (UpdateDispatcher) OnChatParticipantDelete added in v0.9.0

func (u UpdateDispatcher) OnChatParticipantDelete(handler ChatParticipantDeleteHandler)

OnChatParticipantDelete sets ChatParticipantDelete handler.

func (UpdateDispatcher) OnChatParticipants added in v0.9.0

func (u UpdateDispatcher) OnChatParticipants(handler ChatParticipantsHandler)

OnChatParticipants sets ChatParticipants handler.

func (UpdateDispatcher) OnChatUserTyping added in v0.9.0

func (u UpdateDispatcher) OnChatUserTyping(handler ChatUserTypingHandler)

OnChatUserTyping sets ChatUserTyping handler.

func (UpdateDispatcher) OnConfig added in v0.9.0

func (u UpdateDispatcher) OnConfig(handler ConfigHandler)

OnConfig sets Config handler.

func (UpdateDispatcher) OnContactsReset added in v0.9.0

func (u UpdateDispatcher) OnContactsReset(handler ContactsResetHandler)

OnContactsReset sets ContactsReset handler.

func (UpdateDispatcher) OnDcOptions added in v0.9.0

func (u UpdateDispatcher) OnDcOptions(handler DcOptionsHandler)

OnDcOptions sets DcOptions handler.

func (UpdateDispatcher) OnDeleteChannelMessages added in v0.9.0

func (u UpdateDispatcher) OnDeleteChannelMessages(handler DeleteChannelMessagesHandler)

OnDeleteChannelMessages sets DeleteChannelMessages handler.

func (UpdateDispatcher) OnDeleteMessages added in v0.9.0

func (u UpdateDispatcher) OnDeleteMessages(handler DeleteMessagesHandler)

OnDeleteMessages sets DeleteMessages handler.

func (UpdateDispatcher) OnDeleteScheduledMessages added in v0.9.0

func (u UpdateDispatcher) OnDeleteScheduledMessages(handler DeleteScheduledMessagesHandler)

OnDeleteScheduledMessages sets DeleteScheduledMessages handler.

func (UpdateDispatcher) OnDialogFilter added in v0.9.0

func (u UpdateDispatcher) OnDialogFilter(handler DialogFilterHandler)

OnDialogFilter sets DialogFilter handler.

func (UpdateDispatcher) OnDialogFilterOrder added in v0.9.0

func (u UpdateDispatcher) OnDialogFilterOrder(handler DialogFilterOrderHandler)

OnDialogFilterOrder sets DialogFilterOrder handler.

func (UpdateDispatcher) OnDialogFilters added in v0.9.0

func (u UpdateDispatcher) OnDialogFilters(handler DialogFiltersHandler)

OnDialogFilters sets DialogFilters handler.

func (UpdateDispatcher) OnDialogPinned added in v0.9.0

func (u UpdateDispatcher) OnDialogPinned(handler DialogPinnedHandler)

OnDialogPinned sets DialogPinned handler.

func (UpdateDispatcher) OnDialogUnreadMark added in v0.9.0

func (u UpdateDispatcher) OnDialogUnreadMark(handler DialogUnreadMarkHandler)

OnDialogUnreadMark sets DialogUnreadMark handler.

func (UpdateDispatcher) OnDraftMessage added in v0.9.0

func (u UpdateDispatcher) OnDraftMessage(handler DraftMessageHandler)

OnDraftMessage sets DraftMessage handler.

func (UpdateDispatcher) OnEditChannelMessage added in v0.9.0

func (u UpdateDispatcher) OnEditChannelMessage(handler EditChannelMessageHandler)

OnEditChannelMessage sets EditChannelMessage handler.

func (UpdateDispatcher) OnEditMessage added in v0.9.0

func (u UpdateDispatcher) OnEditMessage(handler EditMessageHandler)

OnEditMessage sets EditMessage handler.

func (UpdateDispatcher) OnEncryptedChatTyping added in v0.9.0

func (u UpdateDispatcher) OnEncryptedChatTyping(handler EncryptedChatTypingHandler)

OnEncryptedChatTyping sets EncryptedChatTyping handler.

func (UpdateDispatcher) OnEncryptedMessagesRead added in v0.9.0

func (u UpdateDispatcher) OnEncryptedMessagesRead(handler EncryptedMessagesReadHandler)

OnEncryptedMessagesRead sets EncryptedMessagesRead handler.

func (UpdateDispatcher) OnEncryption added in v0.9.0

func (u UpdateDispatcher) OnEncryption(handler EncryptionHandler)

OnEncryption sets Encryption handler.

func (UpdateDispatcher) OnFavedStickers added in v0.9.0

func (u UpdateDispatcher) OnFavedStickers(handler FavedStickersHandler)

OnFavedStickers sets FavedStickers handler.

func (UpdateDispatcher) OnFolderPeers added in v0.9.0

func (u UpdateDispatcher) OnFolderPeers(handler FolderPeersHandler)

OnFolderPeers sets FolderPeers handler.

func (UpdateDispatcher) OnGeoLiveViewed added in v0.9.0

func (u UpdateDispatcher) OnGeoLiveViewed(handler GeoLiveViewedHandler)

OnGeoLiveViewed sets GeoLiveViewed handler.

func (UpdateDispatcher) OnGroupCall added in v0.13.0

func (u UpdateDispatcher) OnGroupCall(handler GroupCallHandler)

OnGroupCall sets GroupCall handler.

func (UpdateDispatcher) OnGroupCallParticipants added in v0.13.0

func (u UpdateDispatcher) OnGroupCallParticipants(handler GroupCallParticipantsHandler)

OnGroupCallParticipants sets GroupCallParticipants handler.

func (UpdateDispatcher) OnInlineBotCallbackQuery added in v0.9.0

func (u UpdateDispatcher) OnInlineBotCallbackQuery(handler InlineBotCallbackQueryHandler)

OnInlineBotCallbackQuery sets InlineBotCallbackQuery handler.

func (UpdateDispatcher) OnLangPack added in v0.9.0

func (u UpdateDispatcher) OnLangPack(handler LangPackHandler)

OnLangPack sets LangPack handler.

func (UpdateDispatcher) OnLangPackTooLong added in v0.9.0

func (u UpdateDispatcher) OnLangPackTooLong(handler LangPackTooLongHandler)

OnLangPackTooLong sets LangPackTooLong handler.

func (UpdateDispatcher) OnLoginToken added in v0.9.0

func (u UpdateDispatcher) OnLoginToken(handler LoginTokenHandler)

OnLoginToken sets LoginToken handler.

func (UpdateDispatcher) OnMessageID added in v0.9.0

func (u UpdateDispatcher) OnMessageID(handler MessageIDHandler)

OnMessageID sets MessageID handler.

func (UpdateDispatcher) OnMessagePoll added in v0.9.0

func (u UpdateDispatcher) OnMessagePoll(handler MessagePollHandler)

OnMessagePoll sets MessagePoll handler.

func (UpdateDispatcher) OnMessagePollVote added in v0.9.0

func (u UpdateDispatcher) OnMessagePollVote(handler MessagePollVoteHandler)

OnMessagePollVote sets MessagePollVote handler.

func (UpdateDispatcher) OnNewChannelMessage added in v0.9.0

func (u UpdateDispatcher) OnNewChannelMessage(handler NewChannelMessageHandler)

OnNewChannelMessage sets NewChannelMessage handler.

func (UpdateDispatcher) OnNewEncryptedMessage added in v0.9.0

func (u UpdateDispatcher) OnNewEncryptedMessage(handler NewEncryptedMessageHandler)

OnNewEncryptedMessage sets NewEncryptedMessage handler.

func (UpdateDispatcher) OnNewMessage added in v0.9.0

func (u UpdateDispatcher) OnNewMessage(handler NewMessageHandler)

OnNewMessage sets NewMessage handler.

func (UpdateDispatcher) OnNewScheduledMessage added in v0.9.0

func (u UpdateDispatcher) OnNewScheduledMessage(handler NewScheduledMessageHandler)

OnNewScheduledMessage sets NewScheduledMessage handler.

func (UpdateDispatcher) OnNewStickerSet added in v0.9.0

func (u UpdateDispatcher) OnNewStickerSet(handler NewStickerSetHandler)

OnNewStickerSet sets NewStickerSet handler.

func (UpdateDispatcher) OnNotifySettings added in v0.9.0

func (u UpdateDispatcher) OnNotifySettings(handler NotifySettingsHandler)

OnNotifySettings sets NotifySettings handler.

func (UpdateDispatcher) OnPeerBlocked added in v0.9.0

func (u UpdateDispatcher) OnPeerBlocked(handler PeerBlockedHandler)

OnPeerBlocked sets PeerBlocked handler.

func (UpdateDispatcher) OnPeerLocated added in v0.9.0

func (u UpdateDispatcher) OnPeerLocated(handler PeerLocatedHandler)

OnPeerLocated sets PeerLocated handler.

func (UpdateDispatcher) OnPeerSettings added in v0.9.0

func (u UpdateDispatcher) OnPeerSettings(handler PeerSettingsHandler)

OnPeerSettings sets PeerSettings handler.

func (UpdateDispatcher) OnPhoneCall added in v0.9.0

func (u UpdateDispatcher) OnPhoneCall(handler PhoneCallHandler)

OnPhoneCall sets PhoneCall handler.

func (UpdateDispatcher) OnPhoneCallSignalingData added in v0.9.0

func (u UpdateDispatcher) OnPhoneCallSignalingData(handler PhoneCallSignalingDataHandler)

OnPhoneCallSignalingData sets PhoneCallSignalingData handler.

func (UpdateDispatcher) OnPinnedChannelMessages added in v0.9.0

func (u UpdateDispatcher) OnPinnedChannelMessages(handler PinnedChannelMessagesHandler)

OnPinnedChannelMessages sets PinnedChannelMessages handler.

func (UpdateDispatcher) OnPinnedDialogs added in v0.9.0

func (u UpdateDispatcher) OnPinnedDialogs(handler PinnedDialogsHandler)

OnPinnedDialogs sets PinnedDialogs handler.

func (UpdateDispatcher) OnPinnedMessages added in v0.9.0

func (u UpdateDispatcher) OnPinnedMessages(handler PinnedMessagesHandler)

OnPinnedMessages sets PinnedMessages handler.

func (UpdateDispatcher) OnPrivacy added in v0.9.0

func (u UpdateDispatcher) OnPrivacy(handler PrivacyHandler)

OnPrivacy sets Privacy handler.

func (UpdateDispatcher) OnPtsChanged added in v0.9.0

func (u UpdateDispatcher) OnPtsChanged(handler PtsChangedHandler)

OnPtsChanged sets PtsChanged handler.

func (UpdateDispatcher) OnReadChannelDiscussionInbox added in v0.9.0

func (u UpdateDispatcher) OnReadChannelDiscussionInbox(handler ReadChannelDiscussionInboxHandler)

OnReadChannelDiscussionInbox sets ReadChannelDiscussionInbox handler.

func (UpdateDispatcher) OnReadChannelDiscussionOutbox added in v0.9.0

func (u UpdateDispatcher) OnReadChannelDiscussionOutbox(handler ReadChannelDiscussionOutboxHandler)

OnReadChannelDiscussionOutbox sets ReadChannelDiscussionOutbox handler.

func (UpdateDispatcher) OnReadChannelInbox added in v0.9.0

func (u UpdateDispatcher) OnReadChannelInbox(handler ReadChannelInboxHandler)

OnReadChannelInbox sets ReadChannelInbox handler.

func (UpdateDispatcher) OnReadChannelOutbox added in v0.9.0

func (u UpdateDispatcher) OnReadChannelOutbox(handler ReadChannelOutboxHandler)

OnReadChannelOutbox sets ReadChannelOutbox handler.

func (UpdateDispatcher) OnReadFeaturedStickers added in v0.9.0

func (u UpdateDispatcher) OnReadFeaturedStickers(handler ReadFeaturedStickersHandler)

OnReadFeaturedStickers sets ReadFeaturedStickers handler.

func (UpdateDispatcher) OnReadHistoryInbox added in v0.9.0

func (u UpdateDispatcher) OnReadHistoryInbox(handler ReadHistoryInboxHandler)

OnReadHistoryInbox sets ReadHistoryInbox handler.

func (UpdateDispatcher) OnReadHistoryOutbox added in v0.9.0

func (u UpdateDispatcher) OnReadHistoryOutbox(handler ReadHistoryOutboxHandler)

OnReadHistoryOutbox sets ReadHistoryOutbox handler.

func (UpdateDispatcher) OnReadMessagesContents added in v0.9.0

func (u UpdateDispatcher) OnReadMessagesContents(handler ReadMessagesContentsHandler)

OnReadMessagesContents sets ReadMessagesContents handler.

func (UpdateDispatcher) OnRecentStickers added in v0.9.0

func (u UpdateDispatcher) OnRecentStickers(handler RecentStickersHandler)

OnRecentStickers sets RecentStickers handler.

func (UpdateDispatcher) OnSavedGifs added in v0.9.0

func (u UpdateDispatcher) OnSavedGifs(handler SavedGifsHandler)

OnSavedGifs sets SavedGifs handler.

func (UpdateDispatcher) OnServiceNotification added in v0.9.0

func (u UpdateDispatcher) OnServiceNotification(handler ServiceNotificationHandler)

OnServiceNotification sets ServiceNotification handler.

func (UpdateDispatcher) OnStickerSets added in v0.9.0

func (u UpdateDispatcher) OnStickerSets(handler StickerSetsHandler)

OnStickerSets sets StickerSets handler.

func (UpdateDispatcher) OnStickerSetsOrder added in v0.9.0

func (u UpdateDispatcher) OnStickerSetsOrder(handler StickerSetsOrderHandler)

OnStickerSetsOrder sets StickerSetsOrder handler.

func (UpdateDispatcher) OnTheme added in v0.9.0

func (u UpdateDispatcher) OnTheme(handler ThemeHandler)

OnTheme sets Theme handler.

func (UpdateDispatcher) OnUserName added in v0.9.0

func (u UpdateDispatcher) OnUserName(handler UserNameHandler)

OnUserName sets UserName handler.

func (UpdateDispatcher) OnUserPhone added in v0.9.0

func (u UpdateDispatcher) OnUserPhone(handler UserPhoneHandler)

OnUserPhone sets UserPhone handler.

func (UpdateDispatcher) OnUserPhoto added in v0.9.0

func (u UpdateDispatcher) OnUserPhoto(handler UserPhotoHandler)

OnUserPhoto sets UserPhoto handler.

func (UpdateDispatcher) OnUserStatus added in v0.9.0

func (u UpdateDispatcher) OnUserStatus(handler UserStatusHandler)

OnUserStatus sets UserStatus handler.

func (UpdateDispatcher) OnUserTyping added in v0.9.0

func (u UpdateDispatcher) OnUserTyping(handler UserTypingHandler)

OnUserTyping sets UserTyping handler.

func (UpdateDispatcher) OnWebPage added in v0.9.0

func (u UpdateDispatcher) OnWebPage(handler WebPageHandler)

OnWebPage sets WebPage handler.

type UpdateDraftMessage

type UpdateDraftMessage struct {
	// The peer to which the draft is associated
	Peer PeerClass
	// The draft
	Draft DraftMessageClass
}

UpdateDraftMessage represents TL type `updateDraftMessage#ee2bb969`. Notifies a change of a message draft¹.

Links:

  1. https://core.telegram.org/api/drafts

See https://core.telegram.org/constructor/updateDraftMessage for reference.

func (*UpdateDraftMessage) Decode

func (u *UpdateDraftMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateDraftMessage) Encode

func (u *UpdateDraftMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateDraftMessage) String added in v0.12.0

func (u *UpdateDraftMessage) String() string

String implements fmt.Stringer.

type UpdateEditChannelMessage

type UpdateEditChannelMessage struct {
	// The new message
	Message MessageClass
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateEditChannelMessage represents TL type `updateEditChannelMessage#1b3f4df7`. A message was edited in a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateEditChannelMessage for reference.

func (*UpdateEditChannelMessage) Decode

func (u *UpdateEditChannelMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateEditChannelMessage) Encode

func (u *UpdateEditChannelMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateEditChannelMessage) String added in v0.12.0

func (u *UpdateEditChannelMessage) String() string

String implements fmt.Stringer.

type UpdateEditMessage

type UpdateEditMessage struct {
	// The new edited message
	Message MessageClass
	// PTS¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// PTS count¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateEditMessage represents TL type `updateEditMessage#e40370a3`. A message was edited

See https://core.telegram.org/constructor/updateEditMessage for reference.

func (*UpdateEditMessage) Decode

func (u *UpdateEditMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateEditMessage) Encode

func (u *UpdateEditMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateEditMessage) String added in v0.12.0

func (u *UpdateEditMessage) String() string

String implements fmt.Stringer.

type UpdateEncryptedChatTyping

type UpdateEncryptedChatTyping struct {
	// Chat ID
	ChatID int
}

UpdateEncryptedChatTyping represents TL type `updateEncryptedChatTyping#1710f156`. Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing.

See https://core.telegram.org/constructor/updateEncryptedChatTyping for reference.

func (*UpdateEncryptedChatTyping) Decode

func (u *UpdateEncryptedChatTyping) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateEncryptedChatTyping) Encode

func (u *UpdateEncryptedChatTyping) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateEncryptedChatTyping) String added in v0.12.0

func (u *UpdateEncryptedChatTyping) String() string

String implements fmt.Stringer.

type UpdateEncryptedMessagesRead

type UpdateEncryptedMessagesRead struct {
	// Chat ID
	ChatID int
	// Maximum value of data for read messages
	MaxDate int
	// Time when messages were read
	Date int
}

UpdateEncryptedMessagesRead represents TL type `updateEncryptedMessagesRead#38fe25b7`. Communication history in an encrypted chat was marked as read.

See https://core.telegram.org/constructor/updateEncryptedMessagesRead for reference.

func (*UpdateEncryptedMessagesRead) Decode

Decode implements bin.Decoder.

func (*UpdateEncryptedMessagesRead) Encode

Encode implements bin.Encoder.

func (*UpdateEncryptedMessagesRead) String added in v0.12.0

func (u *UpdateEncryptedMessagesRead) String() string

String implements fmt.Stringer.

type UpdateEncryption

type UpdateEncryption struct {
	// Encrypted chat
	Chat EncryptedChatClass
	// Date of change
	Date int
}

UpdateEncryption represents TL type `updateEncryption#b4a2e88d`. Change of state in an encrypted chat.

See https://core.telegram.org/constructor/updateEncryption for reference.

func (*UpdateEncryption) Decode

func (u *UpdateEncryption) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateEncryption) Encode

func (u *UpdateEncryption) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateEncryption) String added in v0.12.0

func (u *UpdateEncryption) String() string

String implements fmt.Stringer.

type UpdateFavedStickers

type UpdateFavedStickers struct {
}

UpdateFavedStickers represents TL type `updateFavedStickers#e511996d`. The list of favorited stickers was changed, the client should call messages.getFavedStickers¹ to refetch the new list

Links:

  1. https://core.telegram.org/method/messages.getFavedStickers

See https://core.telegram.org/constructor/updateFavedStickers for reference.

func (*UpdateFavedStickers) Decode

func (u *UpdateFavedStickers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateFavedStickers) Encode

func (u *UpdateFavedStickers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateFavedStickers) String added in v0.12.0

func (u *UpdateFavedStickers) String() string

String implements fmt.Stringer.

type UpdateFolderPeers

type UpdateFolderPeers struct {
	// New peer list
	FolderPeers []FolderPeer
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateFolderPeers represents TL type `updateFolderPeers#19360dc0`. The peer list of a peer folder¹ was updated

Links:

  1. https://core.telegram.org/api/folders#peer-folders

See https://core.telegram.org/constructor/updateFolderPeers for reference.

func (*UpdateFolderPeers) Decode

func (u *UpdateFolderPeers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateFolderPeers) Encode

func (u *UpdateFolderPeers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateFolderPeers) String added in v0.12.0

func (u *UpdateFolderPeers) String() string

String implements fmt.Stringer.

type UpdateGeoLiveViewed

type UpdateGeoLiveViewed struct {
	// The user that viewed the live geoposition
	Peer PeerClass
	// Message ID of geoposition message
	MsgID int
}

UpdateGeoLiveViewed represents TL type `updateGeoLiveViewed#871fb939`. Live geoposition message was viewed

See https://core.telegram.org/constructor/updateGeoLiveViewed for reference.

func (*UpdateGeoLiveViewed) Decode

func (u *UpdateGeoLiveViewed) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateGeoLiveViewed) Encode

func (u *UpdateGeoLiveViewed) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateGeoLiveViewed) String added in v0.12.0

func (u *UpdateGeoLiveViewed) String() string

String implements fmt.Stringer.

type UpdateGroupCall added in v0.13.0

type UpdateGroupCall struct {
	// ChatID field of UpdateGroupCall.
	ChatID int
	// Call field of UpdateGroupCall.
	Call GroupCallClass
}

UpdateGroupCall represents TL type `updateGroupCall#a45eb99b`.

See https://core.telegram.org/constructor/updateGroupCall for reference.

func (*UpdateGroupCall) Decode added in v0.13.0

func (u *UpdateGroupCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateGroupCall) Encode added in v0.13.0

func (u *UpdateGroupCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateGroupCall) String added in v0.13.0

func (u *UpdateGroupCall) String() string

String implements fmt.Stringer.

type UpdateGroupCallParticipants added in v0.13.0

type UpdateGroupCallParticipants struct {
	// Call field of UpdateGroupCallParticipants.
	Call InputGroupCall
	// Participants field of UpdateGroupCallParticipants.
	Participants []GroupCallParticipant
	// Version field of UpdateGroupCallParticipants.
	Version int
}

UpdateGroupCallParticipants represents TL type `updateGroupCallParticipants#f2ebdb4e`.

See https://core.telegram.org/constructor/updateGroupCallParticipants for reference.

func (*UpdateGroupCallParticipants) Decode added in v0.13.0

Decode implements bin.Decoder.

func (*UpdateGroupCallParticipants) Encode added in v0.13.0

Encode implements bin.Encoder.

func (*UpdateGroupCallParticipants) String added in v0.13.0

func (u *UpdateGroupCallParticipants) String() string

String implements fmt.Stringer.

type UpdateInlineBotCallbackQuery

type UpdateInlineBotCallbackQuery struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Query ID
	QueryID int64
	// ID of the user that pressed the button
	UserID int
	// ID of the inline message with the button
	MsgID InputBotInlineMessageID
	// Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
	ChatInstance int64
	// Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.
	//
	// Use SetData and GetData helpers.
	Data []byte
	// Short name of a Game to be returned, serves as the unique identifier for the game
	//
	// Use SetGameShortName and GetGameShortName helpers.
	GameShortName string
}

UpdateInlineBotCallbackQuery represents TL type `updateInlineBotCallbackQuery#f9d27a5a`. This notification is received by bots when a button is pressed

See https://core.telegram.org/constructor/updateInlineBotCallbackQuery for reference.

func (*UpdateInlineBotCallbackQuery) Decode

Decode implements bin.Decoder.

func (*UpdateInlineBotCallbackQuery) Encode

Encode implements bin.Encoder.

func (*UpdateInlineBotCallbackQuery) GetData

func (u *UpdateInlineBotCallbackQuery) GetData() (value []byte, ok bool)

GetData returns value of Data conditional field and boolean which is true if field was set.

func (*UpdateInlineBotCallbackQuery) GetGameShortName

func (u *UpdateInlineBotCallbackQuery) GetGameShortName() (value string, ok bool)

GetGameShortName returns value of GameShortName conditional field and boolean which is true if field was set.

func (*UpdateInlineBotCallbackQuery) SetData

func (u *UpdateInlineBotCallbackQuery) SetData(value []byte)

SetData sets value of Data conditional field.

func (*UpdateInlineBotCallbackQuery) SetGameShortName

func (u *UpdateInlineBotCallbackQuery) SetGameShortName(value string)

SetGameShortName sets value of GameShortName conditional field.

func (*UpdateInlineBotCallbackQuery) String added in v0.12.0

String implements fmt.Stringer.

type UpdateLangPack

type UpdateLangPack struct {
	// Changed strings
	Difference LangPackDifference
}

UpdateLangPack represents TL type `updateLangPack#56022f4d`. Language pack updated

See https://core.telegram.org/constructor/updateLangPack for reference.

func (*UpdateLangPack) Decode

func (u *UpdateLangPack) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateLangPack) Encode

func (u *UpdateLangPack) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateLangPack) String added in v0.12.0

func (u *UpdateLangPack) String() string

String implements fmt.Stringer.

type UpdateLangPackTooLong

type UpdateLangPackTooLong struct {
	// Language code
	LangCode string
}

UpdateLangPackTooLong represents TL type `updateLangPackTooLong#46560264`. A language pack has changed, the client should manually fetch the changed strings using langpack.getDifference¹

Links:

  1. https://core.telegram.org/method/langpack.getDifference

See https://core.telegram.org/constructor/updateLangPackTooLong for reference.

func (*UpdateLangPackTooLong) Decode

func (u *UpdateLangPackTooLong) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateLangPackTooLong) Encode

func (u *UpdateLangPackTooLong) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateLangPackTooLong) String added in v0.12.0

func (u *UpdateLangPackTooLong) String() string

String implements fmt.Stringer.

type UpdateLoginToken

type UpdateLoginToken struct {
}

UpdateLoginToken represents TL type `updateLoginToken#564fe691`. A login token (for login via QR code) was accepted.

See https://core.telegram.org/constructor/updateLoginToken for reference.

func (*UpdateLoginToken) Decode

func (u *UpdateLoginToken) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateLoginToken) Encode

func (u *UpdateLoginToken) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateLoginToken) String added in v0.12.0

func (u *UpdateLoginToken) String() string

String implements fmt.Stringer.

type UpdateMessageID

type UpdateMessageID struct {
	// id identifier of a respective Message¹
	//
	// Links:
	//  1) https://core.telegram.org/type/Message
	ID int
	// Previuosly transferred client random_id identifier
	RandomID int64
}

UpdateMessageID represents TL type `updateMessageID#4e90bfd6`. Sent message with random_id client identifier was assigned an identifier.

See https://core.telegram.org/constructor/updateMessageID for reference.

func (*UpdateMessageID) Decode

func (u *UpdateMessageID) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateMessageID) Encode

func (u *UpdateMessageID) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateMessageID) String added in v0.12.0

func (u *UpdateMessageID) String() string

String implements fmt.Stringer.

type UpdateMessagePoll

type UpdateMessagePoll struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Poll ID
	PollID int64
	// If the server knows the client hasn't cached this poll yet, the poll itself
	//
	// Use SetPoll and GetPoll helpers.
	Poll Poll
	// New poll results
	Results PollResults
}

UpdateMessagePoll represents TL type `updateMessagePoll#aca1657b`. The results of a poll have changed

See https://core.telegram.org/constructor/updateMessagePoll for reference.

func (*UpdateMessagePoll) Decode

func (u *UpdateMessagePoll) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateMessagePoll) Encode

func (u *UpdateMessagePoll) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateMessagePoll) GetPoll

func (u *UpdateMessagePoll) GetPoll() (value Poll, ok bool)

GetPoll returns value of Poll conditional field and boolean which is true if field was set.

func (*UpdateMessagePoll) SetPoll

func (u *UpdateMessagePoll) SetPoll(value Poll)

SetPoll sets value of Poll conditional field.

func (*UpdateMessagePoll) String added in v0.12.0

func (u *UpdateMessagePoll) String() string

String implements fmt.Stringer.

type UpdateMessagePollVote

type UpdateMessagePollVote struct {
	// Poll ID
	PollID int64
	// User ID
	UserID int
	// Chosen option(s)
	Options [][]byte
}

UpdateMessagePollVote represents TL type `updateMessagePollVote#42f88f2c`. A specific user has voted in a poll

See https://core.telegram.org/constructor/updateMessagePollVote for reference.

func (*UpdateMessagePollVote) Decode

func (u *UpdateMessagePollVote) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateMessagePollVote) Encode

func (u *UpdateMessagePollVote) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateMessagePollVote) String added in v0.12.0

func (u *UpdateMessagePollVote) String() string

String implements fmt.Stringer.

type UpdateNewChannelMessage

type UpdateNewChannelMessage struct {
	// New message
	Message MessageClass
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateNewChannelMessage represents TL type `updateNewChannelMessage#62ba04d9`. A new message was sent in a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateNewChannelMessage for reference.

func (*UpdateNewChannelMessage) Decode

func (u *UpdateNewChannelMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateNewChannelMessage) Encode

func (u *UpdateNewChannelMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateNewChannelMessage) String added in v0.12.0

func (u *UpdateNewChannelMessage) String() string

String implements fmt.Stringer.

type UpdateNewEncryptedMessage

type UpdateNewEncryptedMessage struct {
	// Message
	Message EncryptedMessageClass
	// New qts value
	Qts int
}

UpdateNewEncryptedMessage represents TL type `updateNewEncryptedMessage#12bcbd9a`. New encrypted message.

See https://core.telegram.org/constructor/updateNewEncryptedMessage for reference.

func (*UpdateNewEncryptedMessage) Decode

func (u *UpdateNewEncryptedMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateNewEncryptedMessage) Encode

func (u *UpdateNewEncryptedMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateNewEncryptedMessage) String added in v0.12.0

func (u *UpdateNewEncryptedMessage) String() string

String implements fmt.Stringer.

type UpdateNewMessage

type UpdateNewMessage struct {
	// Message
	Message MessageClass
	// New quantity of actions in a message box
	Pts int
	// Number of generated events
	PtsCount int
}

UpdateNewMessage represents TL type `updateNewMessage#1f2b0afd`. New message in a private chat or in a legacy group¹.

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateNewMessage for reference.

func (*UpdateNewMessage) Decode

func (u *UpdateNewMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateNewMessage) Encode

func (u *UpdateNewMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateNewMessage) String added in v0.12.0

func (u *UpdateNewMessage) String() string

String implements fmt.Stringer.

type UpdateNewScheduledMessage

type UpdateNewScheduledMessage struct {
	// Message
	Message MessageClass
}

UpdateNewScheduledMessage represents TL type `updateNewScheduledMessage#39a51dfb`. A message was added to the schedule queue of a chat¹

Links:

  1. https://core.telegram.org/api/scheduled-messages

See https://core.telegram.org/constructor/updateNewScheduledMessage for reference.

func (*UpdateNewScheduledMessage) Decode

func (u *UpdateNewScheduledMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateNewScheduledMessage) Encode

func (u *UpdateNewScheduledMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateNewScheduledMessage) String added in v0.12.0

func (u *UpdateNewScheduledMessage) String() string

String implements fmt.Stringer.

type UpdateNewStickerSet

type UpdateNewStickerSet struct {
	// The installed stickerset
	Stickerset MessagesStickerSet
}

UpdateNewStickerSet represents TL type `updateNewStickerSet#688a30aa`. A new stickerset was installed

See https://core.telegram.org/constructor/updateNewStickerSet for reference.

func (*UpdateNewStickerSet) Decode

func (u *UpdateNewStickerSet) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateNewStickerSet) Encode

func (u *UpdateNewStickerSet) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateNewStickerSet) String added in v0.12.0

func (u *UpdateNewStickerSet) String() string

String implements fmt.Stringer.

type UpdateNotifySettings

type UpdateNotifySettings struct {
	// Nofication source
	Peer NotifyPeerClass
	// New notification settings
	NotifySettings PeerNotifySettings
}

UpdateNotifySettings represents TL type `updateNotifySettings#bec268ef`. Changes in notification settings.

See https://core.telegram.org/constructor/updateNotifySettings for reference.

func (*UpdateNotifySettings) Decode

func (u *UpdateNotifySettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateNotifySettings) Encode

func (u *UpdateNotifySettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateNotifySettings) String added in v0.12.0

func (u *UpdateNotifySettings) String() string

String implements fmt.Stringer.

type UpdatePeerBlocked

type UpdatePeerBlocked struct {
	// The blocked peer
	PeerID PeerClass
	// Whether the peer was blocked or unblocked
	Blocked bool
}

UpdatePeerBlocked represents TL type `updatePeerBlocked#246a4b22`. A peer was blocked

See https://core.telegram.org/constructor/updatePeerBlocked for reference.

func (*UpdatePeerBlocked) Decode

func (u *UpdatePeerBlocked) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatePeerBlocked) Encode

func (u *UpdatePeerBlocked) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatePeerBlocked) String added in v0.12.0

func (u *UpdatePeerBlocked) String() string

String implements fmt.Stringer.

type UpdatePeerLocated

type UpdatePeerLocated struct {
	// Geolocated peer list update
	Peers []PeerLocatedClass
}

UpdatePeerLocated represents TL type `updatePeerLocated#b4afcfb0`. List of peers near you was updated

See https://core.telegram.org/constructor/updatePeerLocated for reference.

func (*UpdatePeerLocated) Decode

func (u *UpdatePeerLocated) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatePeerLocated) Encode

func (u *UpdatePeerLocated) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatePeerLocated) String added in v0.12.0

func (u *UpdatePeerLocated) String() string

String implements fmt.Stringer.

type UpdatePeerSettings

type UpdatePeerSettings struct {
	// The peer
	Peer PeerClass
	// Associated peer settings
	Settings PeerSettings
}

UpdatePeerSettings represents TL type `updatePeerSettings#6a7e7366`. Settings of a certain peer have changed

See https://core.telegram.org/constructor/updatePeerSettings for reference.

func (*UpdatePeerSettings) Decode

func (u *UpdatePeerSettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatePeerSettings) Encode

func (u *UpdatePeerSettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatePeerSettings) String added in v0.12.0

func (u *UpdatePeerSettings) String() string

String implements fmt.Stringer.

type UpdatePhoneCall

type UpdatePhoneCall struct {
	// Phone call
	PhoneCall PhoneCallClass
}

UpdatePhoneCall represents TL type `updatePhoneCall#ab0f6b1e`. An incoming phone call

See https://core.telegram.org/constructor/updatePhoneCall for reference.

func (*UpdatePhoneCall) Decode

func (u *UpdatePhoneCall) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatePhoneCall) Encode

func (u *UpdatePhoneCall) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatePhoneCall) String added in v0.12.0

func (u *UpdatePhoneCall) String() string

String implements fmt.Stringer.

type UpdatePhoneCallSignalingData

type UpdatePhoneCallSignalingData struct {
	// Phone call ID
	PhoneCallID int64
	// Signaling payload
	Data []byte
}

UpdatePhoneCallSignalingData represents TL type `updatePhoneCallSignalingData#2661bf09`. Incoming phone call signaling payload

See https://core.telegram.org/constructor/updatePhoneCallSignalingData for reference.

func (*UpdatePhoneCallSignalingData) Decode

Decode implements bin.Decoder.

func (*UpdatePhoneCallSignalingData) Encode

Encode implements bin.Encoder.

func (*UpdatePhoneCallSignalingData) String added in v0.12.0

String implements fmt.Stringer.

type UpdatePinnedChannelMessages

type UpdatePinnedChannelMessages struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the messages were pinned or unpinned
	Pinned bool
	// Channel ID
	ChannelID int
	// Messages
	Messages []int
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdatePinnedChannelMessages represents TL type `updatePinnedChannelMessages#8588878b`. Messages were pinned/unpinned in a channel/supergroup¹

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updatePinnedChannelMessages for reference.

func (*UpdatePinnedChannelMessages) Decode

Decode implements bin.Decoder.

func (*UpdatePinnedChannelMessages) Encode

Encode implements bin.Encoder.

func (*UpdatePinnedChannelMessages) SetPinned

func (u *UpdatePinnedChannelMessages) SetPinned(value bool)

SetPinned sets value of Pinned conditional field.

func (*UpdatePinnedChannelMessages) String added in v0.12.0

func (u *UpdatePinnedChannelMessages) String() string

String implements fmt.Stringer.

type UpdatePinnedDialogs

type UpdatePinnedDialogs struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// New order of pinned dialogs
	//
	// Use SetOrder and GetOrder helpers.
	Order []DialogPeerClass
}

UpdatePinnedDialogs represents TL type `updatePinnedDialogs#fa0f3ca2`. Pinned dialogs were updated

See https://core.telegram.org/constructor/updatePinnedDialogs for reference.

func (*UpdatePinnedDialogs) Decode

func (u *UpdatePinnedDialogs) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatePinnedDialogs) Encode

func (u *UpdatePinnedDialogs) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatePinnedDialogs) GetFolderID

func (u *UpdatePinnedDialogs) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*UpdatePinnedDialogs) GetOrder

func (u *UpdatePinnedDialogs) GetOrder() (value []DialogPeerClass, ok bool)

GetOrder returns value of Order conditional field and boolean which is true if field was set.

func (*UpdatePinnedDialogs) SetFolderID

func (u *UpdatePinnedDialogs) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*UpdatePinnedDialogs) SetOrder

func (u *UpdatePinnedDialogs) SetOrder(value []DialogPeerClass)

SetOrder sets value of Order conditional field.

func (*UpdatePinnedDialogs) String added in v0.12.0

func (u *UpdatePinnedDialogs) String() string

String implements fmt.Stringer.

type UpdatePinnedMessages

type UpdatePinnedMessages struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the messages were pinned or unpinned
	Pinned bool
	// Peer
	Peer PeerClass
	// Message IDs
	Messages []int
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdatePinnedMessages represents TL type `updatePinnedMessages#ed85eab5`. Some messages were pinned in a chat

See https://core.telegram.org/constructor/updatePinnedMessages for reference.

func (*UpdatePinnedMessages) Decode

func (u *UpdatePinnedMessages) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatePinnedMessages) Encode

func (u *UpdatePinnedMessages) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatePinnedMessages) SetPinned

func (u *UpdatePinnedMessages) SetPinned(value bool)

SetPinned sets value of Pinned conditional field.

func (*UpdatePinnedMessages) String added in v0.12.0

func (u *UpdatePinnedMessages) String() string

String implements fmt.Stringer.

type UpdatePrivacy

type UpdatePrivacy struct {
	// Peers to which the privacy rules apply
	Key PrivacyKeyClass
	// New privacy rules
	Rules []PrivacyRuleClass
}

UpdatePrivacy represents TL type `updatePrivacy#ee3b272a`. Privacy rules were changed

See https://core.telegram.org/constructor/updatePrivacy for reference.

func (*UpdatePrivacy) Decode

func (u *UpdatePrivacy) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatePrivacy) Encode

func (u *UpdatePrivacy) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatePrivacy) String added in v0.12.0

func (u *UpdatePrivacy) String() string

String implements fmt.Stringer.

type UpdatePtsChanged

type UpdatePtsChanged struct {
}

UpdatePtsChanged represents TL type `updatePtsChanged#3354678f`. Common message box sequence PTS¹ has changed, state has to be refetched using updates.getState²

Links:

  1. https://core.telegram.org/api/updates
  2. https://core.telegram.org/api/updates#fetching-state

See https://core.telegram.org/constructor/updatePtsChanged for reference.

func (*UpdatePtsChanged) Decode

func (u *UpdatePtsChanged) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatePtsChanged) Encode

func (u *UpdatePtsChanged) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatePtsChanged) String added in v0.12.0

func (u *UpdatePtsChanged) String() string

String implements fmt.Stringer.

type UpdateReadChannelDiscussionInbox

type UpdateReadChannelDiscussionInbox struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Discussion group ID¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	ChannelID int
	// ID of the group message that started the thread¹ (message in linked discussion group)
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	TopMsgID int
	// Message ID of latest read incoming message for this thread¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	ReadMaxID int
	// If set, contains the ID of the channel¹ that contains the post that started the comment thread² in the discussion group (channel_id)
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	//  2) https://core.telegram.org/api/threads
	//
	// Use SetBroadcastID and GetBroadcastID helpers.
	BroadcastID int
	// If set, contains the ID of the channel post that started the the comment thread¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetBroadcastPost and GetBroadcastPost helpers.
	BroadcastPost int
}

UpdateReadChannelDiscussionInbox represents TL type `updateReadChannelDiscussionInbox#1cc7de54`. Incoming comments in a discussion thread¹ were marked as read

Links:

  1. https://core.telegram.org/api/threads

See https://core.telegram.org/constructor/updateReadChannelDiscussionInbox for reference.

func (*UpdateReadChannelDiscussionInbox) Decode

Decode implements bin.Decoder.

func (*UpdateReadChannelDiscussionInbox) Encode

Encode implements bin.Encoder.

func (*UpdateReadChannelDiscussionInbox) GetBroadcastID

func (u *UpdateReadChannelDiscussionInbox) GetBroadcastID() (value int, ok bool)

GetBroadcastID returns value of BroadcastID conditional field and boolean which is true if field was set.

func (*UpdateReadChannelDiscussionInbox) GetBroadcastPost

func (u *UpdateReadChannelDiscussionInbox) GetBroadcastPost() (value int, ok bool)

GetBroadcastPost returns value of BroadcastPost conditional field and boolean which is true if field was set.

func (*UpdateReadChannelDiscussionInbox) SetBroadcastID

func (u *UpdateReadChannelDiscussionInbox) SetBroadcastID(value int)

SetBroadcastID sets value of BroadcastID conditional field.

func (*UpdateReadChannelDiscussionInbox) SetBroadcastPost

func (u *UpdateReadChannelDiscussionInbox) SetBroadcastPost(value int)

SetBroadcastPost sets value of BroadcastPost conditional field.

func (*UpdateReadChannelDiscussionInbox) String added in v0.12.0

String implements fmt.Stringer.

type UpdateReadChannelDiscussionOutbox

type UpdateReadChannelDiscussionOutbox struct {
	// Supergroup ID¹
	//
	// Links:
	//  1) https://core.telegram.org/api/channel
	ChannelID int
	// ID of the group message that started the thread¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	TopMsgID int
	// Message ID of latest read outgoing message for this thread¹
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	ReadMaxID int
}

UpdateReadChannelDiscussionOutbox represents TL type `updateReadChannelDiscussionOutbox#4638a26c`. Outgoing comments in a discussion thread¹ were marked as read

Links:

  1. https://core.telegram.org/api/threads

See https://core.telegram.org/constructor/updateReadChannelDiscussionOutbox for reference.

func (*UpdateReadChannelDiscussionOutbox) Decode

Decode implements bin.Decoder.

func (*UpdateReadChannelDiscussionOutbox) Encode

Encode implements bin.Encoder.

func (*UpdateReadChannelDiscussionOutbox) String added in v0.12.0

String implements fmt.Stringer.

type UpdateReadChannelInbox

type UpdateReadChannelInbox struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// Channel/supergroup ID
	ChannelID int
	// Position up to which all incoming messages are read.
	MaxID int
	// Count of messages weren't read yet
	StillUnreadCount int
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
}

UpdateReadChannelInbox represents TL type `updateReadChannelInbox#330b5424`. Incoming messages in a channel/supergroup¹ were read

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateReadChannelInbox for reference.

func (*UpdateReadChannelInbox) Decode

func (u *UpdateReadChannelInbox) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateReadChannelInbox) Encode

func (u *UpdateReadChannelInbox) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateReadChannelInbox) GetFolderID

func (u *UpdateReadChannelInbox) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*UpdateReadChannelInbox) SetFolderID

func (u *UpdateReadChannelInbox) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*UpdateReadChannelInbox) String added in v0.12.0

func (u *UpdateReadChannelInbox) String() string

String implements fmt.Stringer.

type UpdateReadChannelOutbox

type UpdateReadChannelOutbox struct {
	// Channel/supergroup ID
	ChannelID int
	// Position up to which all outgoing messages are read.
	MaxID int
}

UpdateReadChannelOutbox represents TL type `updateReadChannelOutbox#25d6c9c7`. Outgoing messages in a channel/supergroup¹ were read

Links:

  1. https://core.telegram.org/api/channel

See https://core.telegram.org/constructor/updateReadChannelOutbox for reference.

func (*UpdateReadChannelOutbox) Decode

func (u *UpdateReadChannelOutbox) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateReadChannelOutbox) Encode

func (u *UpdateReadChannelOutbox) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateReadChannelOutbox) String added in v0.12.0

func (u *UpdateReadChannelOutbox) String() string

String implements fmt.Stringer.

type UpdateReadFeaturedStickers

type UpdateReadFeaturedStickers struct {
}

UpdateReadFeaturedStickers represents TL type `updateReadFeaturedStickers#571d2742`. Some featured stickers were marked as read

See https://core.telegram.org/constructor/updateReadFeaturedStickers for reference.

func (*UpdateReadFeaturedStickers) Decode

Decode implements bin.Decoder.

func (*UpdateReadFeaturedStickers) Encode

Encode implements bin.Encoder.

func (*UpdateReadFeaturedStickers) String added in v0.12.0

func (u *UpdateReadFeaturedStickers) String() string

String implements fmt.Stringer.

type UpdateReadHistoryInbox

type UpdateReadHistoryInbox struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
	// Peer
	Peer PeerClass
	// Maximum ID of messages read
	MaxID int
	// Number of messages that are still unread
	StillUnreadCount int
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateReadHistoryInbox represents TL type `updateReadHistoryInbox#9c974fdf`. Incoming messages were read

See https://core.telegram.org/constructor/updateReadHistoryInbox for reference.

func (*UpdateReadHistoryInbox) Decode

func (u *UpdateReadHistoryInbox) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateReadHistoryInbox) Encode

func (u *UpdateReadHistoryInbox) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateReadHistoryInbox) GetFolderID

func (u *UpdateReadHistoryInbox) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*UpdateReadHistoryInbox) SetFolderID

func (u *UpdateReadHistoryInbox) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*UpdateReadHistoryInbox) String added in v0.12.0

func (u *UpdateReadHistoryInbox) String() string

String implements fmt.Stringer.

type UpdateReadHistoryOutbox

type UpdateReadHistoryOutbox struct {
	// Peer
	Peer PeerClass
	// Maximum ID of read outgoing messages
	MaxID int
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateReadHistoryOutbox represents TL type `updateReadHistoryOutbox#2f2f21bf`. Outgoing messages were read

See https://core.telegram.org/constructor/updateReadHistoryOutbox for reference.

func (*UpdateReadHistoryOutbox) Decode

func (u *UpdateReadHistoryOutbox) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateReadHistoryOutbox) Encode

func (u *UpdateReadHistoryOutbox) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateReadHistoryOutbox) String added in v0.12.0

func (u *UpdateReadHistoryOutbox) String() string

String implements fmt.Stringer.

type UpdateReadMessagesContents

type UpdateReadMessagesContents struct {
	// IDs of read messages
	Messages []int
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateReadMessagesContents represents TL type `updateReadMessagesContents#68c13933`. Contents of messages in the common message box¹ were read

Links:

  1. https://core.telegram.org/api/updates

See https://core.telegram.org/constructor/updateReadMessagesContents for reference.

func (*UpdateReadMessagesContents) Decode

Decode implements bin.Decoder.

func (*UpdateReadMessagesContents) Encode

Encode implements bin.Encoder.

func (*UpdateReadMessagesContents) String added in v0.12.0

func (u *UpdateReadMessagesContents) String() string

String implements fmt.Stringer.

type UpdateRecentStickers

type UpdateRecentStickers struct {
}

UpdateRecentStickers represents TL type `updateRecentStickers#9a422c20`. The recent sticker list was updated

See https://core.telegram.org/constructor/updateRecentStickers for reference.

func (*UpdateRecentStickers) Decode

func (u *UpdateRecentStickers) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateRecentStickers) Encode

func (u *UpdateRecentStickers) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateRecentStickers) String added in v0.12.0

func (u *UpdateRecentStickers) String() string

String implements fmt.Stringer.

type UpdateSavedGifs

type UpdateSavedGifs struct {
}

UpdateSavedGifs represents TL type `updateSavedGifs#9375341e`. The saved gif list has changed, the client should refetch it using messages.getSavedGifs¹

Links:

  1. https://core.telegram.org/method/messages.getSavedGifs

See https://core.telegram.org/constructor/updateSavedGifs for reference.

func (*UpdateSavedGifs) Decode

func (u *UpdateSavedGifs) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateSavedGifs) Encode

func (u *UpdateSavedGifs) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateSavedGifs) String added in v0.12.0

func (u *UpdateSavedGifs) String() string

String implements fmt.Stringer.

type UpdateServiceNotification

type UpdateServiceNotification struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// (boolTrue) if the message must be displayed in a popup.
	Popup bool
	// When was the notification receivedThe message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).
	//
	// Use SetInboxDate and GetInboxDate helpers.
	InboxDate int
	// String, identical in format and contents to the type¹ field in API errors. Describes type of service message. It is acceptable to ignore repeated messages of the same type within a short period of time (15 minutes).
	//
	// Links:
	//  1) https://core.telegram.org/api/errors#error-type
	Type string
	// Message text
	Message string
	// Media content (optional)
	Media MessageMediaClass
	// Message entities for styled text¹
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	Entities []MessageEntityClass
}

UpdateServiceNotification represents TL type `updateServiceNotification#ebe46819`. A service message for the user. The app must show the message to the user upon receiving this update. In case the popup parameter was passed, the text message must be displayed in a popup alert immediately upon receipt. It is recommended to handle the text as you would an ordinary message in terms of highlighting links, etc. The message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).

See https://core.telegram.org/constructor/updateServiceNotification for reference.

func (*UpdateServiceNotification) Decode

func (u *UpdateServiceNotification) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateServiceNotification) Encode

func (u *UpdateServiceNotification) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateServiceNotification) GetInboxDate

func (u *UpdateServiceNotification) GetInboxDate() (value int, ok bool)

GetInboxDate returns value of InboxDate conditional field and boolean which is true if field was set.

func (*UpdateServiceNotification) SetInboxDate

func (u *UpdateServiceNotification) SetInboxDate(value int)

SetInboxDate sets value of InboxDate conditional field.

func (*UpdateServiceNotification) SetPopup

func (u *UpdateServiceNotification) SetPopup(value bool)

SetPopup sets value of Popup conditional field.

func (*UpdateServiceNotification) String added in v0.12.0

func (u *UpdateServiceNotification) String() string

String implements fmt.Stringer.

type UpdateShort

type UpdateShort struct {
	// Update
	Update UpdateClass
	// Date of event
	Date int
}

UpdateShort represents TL type `updateShort#78d4dec1`. Shortened constructor containing info on one update not requiring auxiliary data

See https://core.telegram.org/constructor/updateShort for reference.

func (*UpdateShort) Decode

func (u *UpdateShort) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateShort) Encode

func (u *UpdateShort) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateShort) String added in v0.12.0

func (u *UpdateShort) String() string

String implements fmt.Stringer.

type UpdateShortChatMessage

type UpdateShortChatMessage struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the message is outgoing
	Out bool
	// Whether we were mentioned in this message
	Mentioned bool
	// Whether the message contains some unread mentions
	MediaUnread bool
	// If true, the message is a silent message, no notifications should be triggered
	Silent bool
	// ID of the message
	ID int
	// ID of the sender of the message
	FromID int
	// ID of the chat where the message was sent
	ChatID int
	// Message
	Message string
	// PTS¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// PTS count¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
	// date¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Date int
	// Info about a forwarded message
	//
	// Use SetFwdFrom and GetFwdFrom helpers.
	FwdFrom MessageFwdHeader
	// Info about the inline bot used to generate this message
	//
	// Use SetViaBotID and GetViaBotID helpers.
	ViaBotID int
	// Reply (thread) information
	//
	// Use SetReplyTo and GetReplyTo helpers.
	ReplyTo MessageReplyHeader
	// Entities¹ for styled text
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
}

UpdateShortChatMessage represents TL type `updateShortChatMessage#402d5dbb`. Shortened constructor containing info on one new incoming text message from a chat

See https://core.telegram.org/constructor/updateShortChatMessage for reference.

func (*UpdateShortChatMessage) Decode

func (u *UpdateShortChatMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateShortChatMessage) Encode

func (u *UpdateShortChatMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateShortChatMessage) GetEntities

func (u *UpdateShortChatMessage) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*UpdateShortChatMessage) GetFwdFrom

func (u *UpdateShortChatMessage) GetFwdFrom() (value MessageFwdHeader, ok bool)

GetFwdFrom returns value of FwdFrom conditional field and boolean which is true if field was set.

func (*UpdateShortChatMessage) GetReplyTo

func (u *UpdateShortChatMessage) GetReplyTo() (value MessageReplyHeader, ok bool)

GetReplyTo returns value of ReplyTo conditional field and boolean which is true if field was set.

func (*UpdateShortChatMessage) GetViaBotID

func (u *UpdateShortChatMessage) GetViaBotID() (value int, ok bool)

GetViaBotID returns value of ViaBotID conditional field and boolean which is true if field was set.

func (*UpdateShortChatMessage) SetEntities

func (u *UpdateShortChatMessage) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*UpdateShortChatMessage) SetFwdFrom

func (u *UpdateShortChatMessage) SetFwdFrom(value MessageFwdHeader)

SetFwdFrom sets value of FwdFrom conditional field.

func (*UpdateShortChatMessage) SetMediaUnread

func (u *UpdateShortChatMessage) SetMediaUnread(value bool)

SetMediaUnread sets value of MediaUnread conditional field.

func (*UpdateShortChatMessage) SetMentioned

func (u *UpdateShortChatMessage) SetMentioned(value bool)

SetMentioned sets value of Mentioned conditional field.

func (*UpdateShortChatMessage) SetOut

func (u *UpdateShortChatMessage) SetOut(value bool)

SetOut sets value of Out conditional field.

func (*UpdateShortChatMessage) SetReplyTo

func (u *UpdateShortChatMessage) SetReplyTo(value MessageReplyHeader)

SetReplyTo sets value of ReplyTo conditional field.

func (*UpdateShortChatMessage) SetSilent

func (u *UpdateShortChatMessage) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*UpdateShortChatMessage) SetViaBotID

func (u *UpdateShortChatMessage) SetViaBotID(value int)

SetViaBotID sets value of ViaBotID conditional field.

func (*UpdateShortChatMessage) String added in v0.12.0

func (u *UpdateShortChatMessage) String() string

String implements fmt.Stringer.

type UpdateShortMessage

type UpdateShortMessage struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the message is outgoing
	Out bool
	// Whether we were mentioned in the message
	Mentioned bool
	// Whether there are some unread mentions in this message
	MediaUnread bool
	// If true, the message is a silent message, no notifications should be triggered
	Silent bool
	// The message ID
	ID int
	// The ID of the sender (if outgoing will be the ID of the destination) of the message
	UserID int
	// The message
	Message string
	// PTS¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// PTS count¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
	// date¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Date int
	// Info about a forwarded message
	//
	// Use SetFwdFrom and GetFwdFrom helpers.
	FwdFrom MessageFwdHeader
	// Info about the inline bot used to generate this message
	//
	// Use SetViaBotID and GetViaBotID helpers.
	ViaBotID int
	// Reply and thread¹ information
	//
	// Links:
	//  1) https://core.telegram.org/api/threads
	//
	// Use SetReplyTo and GetReplyTo helpers.
	ReplyTo MessageReplyHeader
	// Entities¹ for styled text
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
}

UpdateShortMessage represents TL type `updateShortMessage#2296d2c8`. Info about a message sent to (received from) another user

See https://core.telegram.org/constructor/updateShortMessage for reference.

func (*UpdateShortMessage) Decode

func (u *UpdateShortMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateShortMessage) Encode

func (u *UpdateShortMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateShortMessage) GetEntities

func (u *UpdateShortMessage) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*UpdateShortMessage) GetFwdFrom

func (u *UpdateShortMessage) GetFwdFrom() (value MessageFwdHeader, ok bool)

GetFwdFrom returns value of FwdFrom conditional field and boolean which is true if field was set.

func (*UpdateShortMessage) GetReplyTo

func (u *UpdateShortMessage) GetReplyTo() (value MessageReplyHeader, ok bool)

GetReplyTo returns value of ReplyTo conditional field and boolean which is true if field was set.

func (*UpdateShortMessage) GetViaBotID

func (u *UpdateShortMessage) GetViaBotID() (value int, ok bool)

GetViaBotID returns value of ViaBotID conditional field and boolean which is true if field was set.

func (*UpdateShortMessage) SetEntities

func (u *UpdateShortMessage) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*UpdateShortMessage) SetFwdFrom

func (u *UpdateShortMessage) SetFwdFrom(value MessageFwdHeader)

SetFwdFrom sets value of FwdFrom conditional field.

func (*UpdateShortMessage) SetMediaUnread

func (u *UpdateShortMessage) SetMediaUnread(value bool)

SetMediaUnread sets value of MediaUnread conditional field.

func (*UpdateShortMessage) SetMentioned

func (u *UpdateShortMessage) SetMentioned(value bool)

SetMentioned sets value of Mentioned conditional field.

func (*UpdateShortMessage) SetOut

func (u *UpdateShortMessage) SetOut(value bool)

SetOut sets value of Out conditional field.

func (*UpdateShortMessage) SetReplyTo

func (u *UpdateShortMessage) SetReplyTo(value MessageReplyHeader)

SetReplyTo sets value of ReplyTo conditional field.

func (*UpdateShortMessage) SetSilent

func (u *UpdateShortMessage) SetSilent(value bool)

SetSilent sets value of Silent conditional field.

func (*UpdateShortMessage) SetViaBotID

func (u *UpdateShortMessage) SetViaBotID(value int)

SetViaBotID sets value of ViaBotID conditional field.

func (*UpdateShortMessage) String added in v0.12.0

func (u *UpdateShortMessage) String() string

String implements fmt.Stringer.

type UpdateShortSentMessage

type UpdateShortSentMessage struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the message is outgoing
	Out bool
	// ID of the sent message
	ID int
	// PTS¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// PTS count¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
	// date¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Date int
	// Attached media
	//
	// Use SetMedia and GetMedia helpers.
	Media MessageMediaClass
	// Entities¹ for styled text
	//
	// Links:
	//  1) https://core.telegram.org/api/entities
	//
	// Use SetEntities and GetEntities helpers.
	Entities []MessageEntityClass
}

UpdateShortSentMessage represents TL type `updateShortSentMessage#11f1331c`. Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object).

See https://core.telegram.org/constructor/updateShortSentMessage for reference.

func (*UpdateShortSentMessage) Decode

func (u *UpdateShortSentMessage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateShortSentMessage) Encode

func (u *UpdateShortSentMessage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateShortSentMessage) GetEntities

func (u *UpdateShortSentMessage) GetEntities() (value []MessageEntityClass, ok bool)

GetEntities returns value of Entities conditional field and boolean which is true if field was set.

func (*UpdateShortSentMessage) GetMedia

func (u *UpdateShortSentMessage) GetMedia() (value MessageMediaClass, ok bool)

GetMedia returns value of Media conditional field and boolean which is true if field was set.

func (*UpdateShortSentMessage) SetEntities

func (u *UpdateShortSentMessage) SetEntities(value []MessageEntityClass)

SetEntities sets value of Entities conditional field.

func (*UpdateShortSentMessage) SetMedia

func (u *UpdateShortSentMessage) SetMedia(value MessageMediaClass)

SetMedia sets value of Media conditional field.

func (*UpdateShortSentMessage) SetOut

func (u *UpdateShortSentMessage) SetOut(value bool)

SetOut sets value of Out conditional field.

func (*UpdateShortSentMessage) String added in v0.12.0

func (u *UpdateShortSentMessage) String() string

String implements fmt.Stringer.

type UpdateStickerSets

type UpdateStickerSets struct {
}

UpdateStickerSets represents TL type `updateStickerSets#43ae3dec`. Installed stickersets have changed, the client should refetch them using messages.getAllStickers¹

Links:

  1. https://core.telegram.org/method/messages.getAllStickers

See https://core.telegram.org/constructor/updateStickerSets for reference.

func (*UpdateStickerSets) Decode

func (u *UpdateStickerSets) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateStickerSets) Encode

func (u *UpdateStickerSets) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateStickerSets) String added in v0.12.0

func (u *UpdateStickerSets) String() string

String implements fmt.Stringer.

type UpdateStickerSetsOrder

type UpdateStickerSetsOrder struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the updated stickers are mask stickers
	Masks bool
	// New sticker order by sticker ID
	Order []int64
}

UpdateStickerSetsOrder represents TL type `updateStickerSetsOrder#bb2d201`. The order of stickersets was changed

See https://core.telegram.org/constructor/updateStickerSetsOrder for reference.

func (*UpdateStickerSetsOrder) Decode

func (u *UpdateStickerSetsOrder) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateStickerSetsOrder) Encode

func (u *UpdateStickerSetsOrder) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateStickerSetsOrder) SetMasks

func (u *UpdateStickerSetsOrder) SetMasks(value bool)

SetMasks sets value of Masks conditional field.

func (*UpdateStickerSetsOrder) String added in v0.12.0

func (u *UpdateStickerSetsOrder) String() string

String implements fmt.Stringer.

type UpdateTheme

type UpdateTheme struct {
	// Theme
	Theme Theme
}

UpdateTheme represents TL type `updateTheme#8216fba3`. A cloud theme was updated

See https://core.telegram.org/constructor/updateTheme for reference.

func (*UpdateTheme) Decode

func (u *UpdateTheme) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateTheme) Encode

func (u *UpdateTheme) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateTheme) String added in v0.12.0

func (u *UpdateTheme) String() string

String implements fmt.Stringer.

type UpdateUserName

type UpdateUserName struct {
	// User identifier
	UserID int
	// New first name. Corresponds to the new value of real_first_name field of the userFull¹ constructor.
	//
	// Links:
	//  1) https://core.telegram.org/constructor/userFull
	FirstName string
	// New last name. Corresponds to the new value of real_last_name field of the userFull¹ constructor.
	//
	// Links:
	//  1) https://core.telegram.org/constructor/userFull
	LastName string
	// New username.Parameter added in Layer 18¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/layers#layer-18
	Username string
}

UpdateUserName represents TL type `updateUserName#a7332b73`. Changes the user's first name, last name and username.

See https://core.telegram.org/constructor/updateUserName for reference.

func (*UpdateUserName) Decode

func (u *UpdateUserName) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateUserName) Encode

func (u *UpdateUserName) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateUserName) String added in v0.12.0

func (u *UpdateUserName) String() string

String implements fmt.Stringer.

type UpdateUserPhone

type UpdateUserPhone struct {
	// User ID
	UserID int
	// New phone number
	Phone string
}

UpdateUserPhone represents TL type `updateUserPhone#12b9417b`. A user's phone number was changed

See https://core.telegram.org/constructor/updateUserPhone for reference.

func (*UpdateUserPhone) Decode

func (u *UpdateUserPhone) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateUserPhone) Encode

func (u *UpdateUserPhone) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateUserPhone) String added in v0.12.0

func (u *UpdateUserPhone) String() string

String implements fmt.Stringer.

type UpdateUserPhoto

type UpdateUserPhoto struct {
	// User identifier
	UserID int
	// Date of photo update.
	Date int
	// New profile photo
	Photo UserProfilePhotoClass
	// (boolTrue¹), if one of the previously used photos is set a profile photo.
	//
	// Links:
	//  1) https://core.telegram.org/constructor/boolTrue
	Previous bool
}

UpdateUserPhoto represents TL type `updateUserPhoto#95313b0c`. Change of contact's profile photo.

See https://core.telegram.org/constructor/updateUserPhoto for reference.

func (*UpdateUserPhoto) Decode

func (u *UpdateUserPhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateUserPhoto) Encode

func (u *UpdateUserPhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateUserPhoto) String added in v0.12.0

func (u *UpdateUserPhoto) String() string

String implements fmt.Stringer.

type UpdateUserStatus

type UpdateUserStatus struct {
	// User identifier
	UserID int
	// New status
	Status UserStatusClass
}

UpdateUserStatus represents TL type `updateUserStatus#1bfbd823`. Contact status update.

See https://core.telegram.org/constructor/updateUserStatus for reference.

func (*UpdateUserStatus) Decode

func (u *UpdateUserStatus) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateUserStatus) Encode

func (u *UpdateUserStatus) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateUserStatus) String added in v0.12.0

func (u *UpdateUserStatus) String() string

String implements fmt.Stringer.

type UpdateUserTyping

type UpdateUserTyping struct {
	// User id
	UserID int
	// Action typeParam added in Layer 17¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/layers#layer-17
	Action SendMessageActionClass
}

UpdateUserTyping represents TL type `updateUserTyping#5c486927`. The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no repeated update received after 6 seconds, it should be considered that the user stopped doing whatever he's been doing.

See https://core.telegram.org/constructor/updateUserTyping for reference.

func (*UpdateUserTyping) Decode

func (u *UpdateUserTyping) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateUserTyping) Encode

func (u *UpdateUserTyping) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateUserTyping) String added in v0.12.0

func (u *UpdateUserTyping) String() string

String implements fmt.Stringer.

type UpdateWebPage

type UpdateWebPage struct {
	// Webpage preview
	Webpage WebPageClass
	// Event count after generation¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Number of events that were generated¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	PtsCount int
}

UpdateWebPage represents TL type `updateWebPage#7f891213`. An instant view¹ webpage preview was generated

Links:

  1. https://instantview.telegram.org

See https://core.telegram.org/constructor/updateWebPage for reference.

func (*UpdateWebPage) Decode

func (u *UpdateWebPage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdateWebPage) Encode

func (u *UpdateWebPage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdateWebPage) String added in v0.12.0

func (u *UpdateWebPage) String() string

String implements fmt.Stringer.

type Updates

type Updates struct {
	// Updates field of Updates.
	Updates []UpdateClass
	// Users field of Updates.
	Users []UserClass
	// Chats field of Updates.
	Chats []ChatClass
	// Date field of Updates.
	Date int
	// Seq field of Updates.
	Seq int
}

Updates represents TL type `updates#74ae4240`.

See https://core.telegram.org/constructor/updates for reference.

func (*Updates) Decode

func (u *Updates) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*Updates) Encode

func (u *Updates) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*Updates) String added in v0.12.0

func (u *Updates) String() string

String implements fmt.Stringer.

type UpdatesBox

type UpdatesBox struct {
	Updates UpdatesClass
}

Updates boxes the UpdatesClass providing a helper.

func (*UpdatesBox) Decode

func (b *UpdatesBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UpdatesBox.

func (*UpdatesBox) Encode

func (b *UpdatesBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UpdatesBox.

type UpdatesChannelDifference

type UpdatesChannelDifference struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether there are more updates to be fetched using getDifference, starting from the provided pts
	Final bool
	// The PTS¹ from which to start getting updates the next time
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Clients are supposed to refetch the channel difference after timeout seconds have elapsed
	//
	// Use SetTimeout and GetTimeout helpers.
	Timeout int
	// New messages
	NewMessages []MessageClass
	// Other updates
	OtherUpdates []UpdateClass
	// Chats
	Chats []ChatClass
	// Users
	Users []UserClass
}

UpdatesChannelDifference represents TL type `updates.channelDifference#2064674e`. The new updates

See https://core.telegram.org/constructor/updates.channelDifference for reference.

func (*UpdatesChannelDifference) Decode

func (c *UpdatesChannelDifference) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatesChannelDifference) Encode

func (c *UpdatesChannelDifference) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatesChannelDifference) GetTimeout

func (c *UpdatesChannelDifference) GetTimeout() (value int, ok bool)

GetTimeout returns value of Timeout conditional field and boolean which is true if field was set.

func (*UpdatesChannelDifference) SetFinal

func (c *UpdatesChannelDifference) SetFinal(value bool)

SetFinal sets value of Final conditional field.

func (*UpdatesChannelDifference) SetTimeout

func (c *UpdatesChannelDifference) SetTimeout(value int)

SetTimeout sets value of Timeout conditional field.

func (*UpdatesChannelDifference) String added in v0.12.0

func (c *UpdatesChannelDifference) String() string

String implements fmt.Stringer.

type UpdatesChannelDifferenceBox

type UpdatesChannelDifferenceBox struct {
	ChannelDifference UpdatesChannelDifferenceClass
}

UpdatesChannelDifference boxes the UpdatesChannelDifferenceClass providing a helper.

func (*UpdatesChannelDifferenceBox) Decode

func (b *UpdatesChannelDifferenceBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UpdatesChannelDifferenceBox.

func (*UpdatesChannelDifferenceBox) Encode

func (b *UpdatesChannelDifferenceBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UpdatesChannelDifferenceBox.

type UpdatesChannelDifferenceClass

type UpdatesChannelDifferenceClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

UpdatesChannelDifferenceClass represents updates.ChannelDifference generic type.

See https://core.telegram.org/type/updates.ChannelDifference for reference.

Example:

g, err := DecodeUpdatesChannelDifference(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *UpdatesChannelDifferenceEmpty: // updates.channelDifferenceEmpty#3e11affb
case *UpdatesChannelDifferenceTooLong: // updates.channelDifferenceTooLong#a4bcc6fe
case *UpdatesChannelDifference: // updates.channelDifference#2064674e
default: panic(v)
}

func DecodeUpdatesChannelDifference

func DecodeUpdatesChannelDifference(buf *bin.Buffer) (UpdatesChannelDifferenceClass, error)

DecodeUpdatesChannelDifference implements binary de-serialization for UpdatesChannelDifferenceClass.

type UpdatesChannelDifferenceEmpty

type UpdatesChannelDifferenceEmpty struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether there are more updates that must be fetched (always false)
	Final bool
	// The latest PTS¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// Clients are supposed to refetch the channel difference after timeout seconds have elapsed
	//
	// Use SetTimeout and GetTimeout helpers.
	Timeout int
}

UpdatesChannelDifferenceEmpty represents TL type `updates.channelDifferenceEmpty#3e11affb`. There are no new updates

See https://core.telegram.org/constructor/updates.channelDifferenceEmpty for reference.

func (*UpdatesChannelDifferenceEmpty) Decode

Decode implements bin.Decoder.

func (*UpdatesChannelDifferenceEmpty) Encode

Encode implements bin.Encoder.

func (*UpdatesChannelDifferenceEmpty) GetTimeout

func (c *UpdatesChannelDifferenceEmpty) GetTimeout() (value int, ok bool)

GetTimeout returns value of Timeout conditional field and boolean which is true if field was set.

func (*UpdatesChannelDifferenceEmpty) SetFinal

func (c *UpdatesChannelDifferenceEmpty) SetFinal(value bool)

SetFinal sets value of Final conditional field.

func (*UpdatesChannelDifferenceEmpty) SetTimeout

func (c *UpdatesChannelDifferenceEmpty) SetTimeout(value int)

SetTimeout sets value of Timeout conditional field.

func (*UpdatesChannelDifferenceEmpty) String added in v0.12.0

String implements fmt.Stringer.

type UpdatesChannelDifferenceTooLong

type UpdatesChannelDifferenceTooLong struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether there are more updates that must be fetched (always false)
	Final bool
	// Clients are supposed to refetch the channel difference after timeout seconds have elapsed
	//
	// Use SetTimeout and GetTimeout helpers.
	Timeout int
	// Dialog containing the latest PTS¹ that can be used to reset the channel state
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Dialog DialogClass
	// The latest messages
	Messages []MessageClass
	// Chats from messages
	Chats []ChatClass
	// Users from messages
	Users []UserClass
}

UpdatesChannelDifferenceTooLong represents TL type `updates.channelDifferenceTooLong#a4bcc6fe`. The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways:

See https://core.telegram.org/constructor/updates.channelDifferenceTooLong for reference.

func (*UpdatesChannelDifferenceTooLong) Decode

Decode implements bin.Decoder.

func (*UpdatesChannelDifferenceTooLong) Encode

Encode implements bin.Encoder.

func (*UpdatesChannelDifferenceTooLong) GetTimeout

func (c *UpdatesChannelDifferenceTooLong) GetTimeout() (value int, ok bool)

GetTimeout returns value of Timeout conditional field and boolean which is true if field was set.

func (*UpdatesChannelDifferenceTooLong) SetFinal

func (c *UpdatesChannelDifferenceTooLong) SetFinal(value bool)

SetFinal sets value of Final conditional field.

func (*UpdatesChannelDifferenceTooLong) SetTimeout

func (c *UpdatesChannelDifferenceTooLong) SetTimeout(value int)

SetTimeout sets value of Timeout conditional field.

func (*UpdatesChannelDifferenceTooLong) String added in v0.12.0

String implements fmt.Stringer.

type UpdatesClass

type UpdatesClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

UpdatesClass represents Updates generic type.

See https://core.telegram.org/type/Updates for reference.

Example:

g, err := DecodeUpdates(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *UpdatesTooLong: // updatesTooLong#e317af7e
case *UpdateShortMessage: // updateShortMessage#2296d2c8
case *UpdateShortChatMessage: // updateShortChatMessage#402d5dbb
case *UpdateShort: // updateShort#78d4dec1
case *UpdatesCombined: // updatesCombined#725b04c3
case *Updates: // updates#74ae4240
case *UpdateShortSentMessage: // updateShortSentMessage#11f1331c
default: panic(v)
}

func DecodeUpdates

func DecodeUpdates(buf *bin.Buffer) (UpdatesClass, error)

DecodeUpdates implements binary de-serialization for UpdatesClass.

type UpdatesCombined

type UpdatesCombined struct {
	// List of updates
	Updates []UpdateClass
	// List of users mentioned in updates
	Users []UserClass
	// List of chats mentioned in updates
	Chats []ChatClass
	// Current date
	Date int
	// Value seq for the earliest update in a group
	SeqStart int
	// Value seq for the latest update in a group
	Seq int
}

UpdatesCombined represents TL type `updatesCombined#725b04c3`. Constructor for a group of updates.

See https://core.telegram.org/constructor/updatesCombined for reference.

func (*UpdatesCombined) Decode

func (u *UpdatesCombined) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatesCombined) Encode

func (u *UpdatesCombined) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatesCombined) String added in v0.12.0

func (u *UpdatesCombined) String() string

String implements fmt.Stringer.

type UpdatesDifference

type UpdatesDifference struct {
	// List of new messages
	NewMessages []MessageClass
	// List of new encrypted secret chat messages
	NewEncryptedMessages []EncryptedMessageClass
	// List of updates
	OtherUpdates []UpdateClass
	// List of chats mentioned in events
	Chats []ChatClass
	// List of users mentioned in events
	Users []UserClass
	// Current state
	State UpdatesState
}

UpdatesDifference represents TL type `updates.difference#f49ca0`. Full list of occurred events.

See https://core.telegram.org/constructor/updates.difference for reference.

func (*UpdatesDifference) Decode

func (d *UpdatesDifference) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatesDifference) Encode

func (d *UpdatesDifference) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatesDifference) String added in v0.12.0

func (d *UpdatesDifference) String() string

String implements fmt.Stringer.

type UpdatesDifferenceBox

type UpdatesDifferenceBox struct {
	Difference UpdatesDifferenceClass
}

UpdatesDifference boxes the UpdatesDifferenceClass providing a helper.

func (*UpdatesDifferenceBox) Decode

func (b *UpdatesDifferenceBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UpdatesDifferenceBox.

func (*UpdatesDifferenceBox) Encode

func (b *UpdatesDifferenceBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UpdatesDifferenceBox.

type UpdatesDifferenceClass

type UpdatesDifferenceClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

UpdatesDifferenceClass represents updates.Difference generic type.

See https://core.telegram.org/type/updates.Difference for reference.

Example:

g, err := DecodeUpdatesDifference(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *UpdatesDifferenceEmpty: // updates.differenceEmpty#5d75a138
case *UpdatesDifference: // updates.difference#f49ca0
case *UpdatesDifferenceSlice: // updates.differenceSlice#a8fb1981
case *UpdatesDifferenceTooLong: // updates.differenceTooLong#4afe8f6d
default: panic(v)
}

func DecodeUpdatesDifference

func DecodeUpdatesDifference(buf *bin.Buffer) (UpdatesDifferenceClass, error)

DecodeUpdatesDifference implements binary de-serialization for UpdatesDifferenceClass.

type UpdatesDifferenceEmpty

type UpdatesDifferenceEmpty struct {
	// Current date
	Date int
	// Number of sent updates
	Seq int
}

UpdatesDifferenceEmpty represents TL type `updates.differenceEmpty#5d75a138`. No events.

See https://core.telegram.org/constructor/updates.differenceEmpty for reference.

func (*UpdatesDifferenceEmpty) Decode

func (d *UpdatesDifferenceEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatesDifferenceEmpty) Encode

func (d *UpdatesDifferenceEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatesDifferenceEmpty) String added in v0.12.0

func (d *UpdatesDifferenceEmpty) String() string

String implements fmt.Stringer.

type UpdatesDifferenceSlice

type UpdatesDifferenceSlice struct {
	// List of new messgaes
	NewMessages []MessageClass
	// New messages from the encrypted event sequence¹
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	NewEncryptedMessages []EncryptedMessageClass
	// List of updates
	OtherUpdates []UpdateClass
	// List of chats mentioned in events
	Chats []ChatClass
	// List of users mentioned in events
	Users []UserClass
	// Intermediary state
	IntermediateState UpdatesState
}

UpdatesDifferenceSlice represents TL type `updates.differenceSlice#a8fb1981`. Incomplete list of occurred events.

See https://core.telegram.org/constructor/updates.differenceSlice for reference.

func (*UpdatesDifferenceSlice) Decode

func (d *UpdatesDifferenceSlice) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatesDifferenceSlice) Encode

func (d *UpdatesDifferenceSlice) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatesDifferenceSlice) String added in v0.12.0

func (d *UpdatesDifferenceSlice) String() string

String implements fmt.Stringer.

type UpdatesDifferenceTooLong

type UpdatesDifferenceTooLong struct {
	// The new state to use.
	Pts int
}

UpdatesDifferenceTooLong represents TL type `updates.differenceTooLong#4afe8f6d`. The difference is too long¹, and the specified state must be used to refetch updates.

Links:

  1. https://core.telegram.org/api/updates#recovering-gaps

See https://core.telegram.org/constructor/updates.differenceTooLong for reference.

func (*UpdatesDifferenceTooLong) Decode

func (d *UpdatesDifferenceTooLong) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatesDifferenceTooLong) Encode

func (d *UpdatesDifferenceTooLong) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatesDifferenceTooLong) String added in v0.12.0

func (d *UpdatesDifferenceTooLong) String() string

String implements fmt.Stringer.

type UpdatesGetChannelDifferenceRequest

type UpdatesGetChannelDifferenceRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Set to true to skip some possibly unneeded updates and reduce server-side load
	Force bool
	// The channel
	Channel InputChannelClass
	// Messsage filter
	Filter ChannelMessagesFilterClass
	// Persistent timestamp (see updates¹)
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// How many updates to fetch, max 100000Ordinary (non-bot) users are supposed to pass 10-100
	Limit int
}

UpdatesGetChannelDifferenceRequest represents TL type `updates.getChannelDifference#3173d78`. Returns the difference between the current state of updates of a certain channel and transmitted.

See https://core.telegram.org/method/updates.getChannelDifference for reference.

func (*UpdatesGetChannelDifferenceRequest) Decode

Decode implements bin.Decoder.

func (*UpdatesGetChannelDifferenceRequest) Encode

Encode implements bin.Encoder.

func (*UpdatesGetChannelDifferenceRequest) SetForce

func (g *UpdatesGetChannelDifferenceRequest) SetForce(value bool)

SetForce sets value of Force conditional field.

func (*UpdatesGetChannelDifferenceRequest) String added in v0.12.0

String implements fmt.Stringer.

type UpdatesGetDifferenceRequest

type UpdatesGetDifferenceRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// PTS, see updates¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Pts int
	// For fast updating: if provided and pts + pts_total_limit < remote pts, updates.differenceTooLong¹ will be returned.Simply tells the server to not return the difference if it is bigger than pts_total_limitIf the remote pts is too big (> ~4000000), this field will default to 1000000
	//
	// Links:
	//  1) https://core.telegram.org/constructor/updates.differenceTooLong
	//
	// Use SetPtsTotalLimit and GetPtsTotalLimit helpers.
	PtsTotalLimit int
	// date, see updates¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Date int
	// QTS, see updates¹.
	//
	// Links:
	//  1) https://core.telegram.org/api/updates
	Qts int
}

UpdatesGetDifferenceRequest represents TL type `updates.getDifference#25939651`. Get new updates¹.

Links:

  1. https://core.telegram.org/api/updates

See https://core.telegram.org/method/updates.getDifference for reference.

func (*UpdatesGetDifferenceRequest) Decode

Decode implements bin.Decoder.

func (*UpdatesGetDifferenceRequest) Encode

Encode implements bin.Encoder.

func (*UpdatesGetDifferenceRequest) GetPtsTotalLimit

func (g *UpdatesGetDifferenceRequest) GetPtsTotalLimit() (value int, ok bool)

GetPtsTotalLimit returns value of PtsTotalLimit conditional field and boolean which is true if field was set.

func (*UpdatesGetDifferenceRequest) SetPtsTotalLimit

func (g *UpdatesGetDifferenceRequest) SetPtsTotalLimit(value int)

SetPtsTotalLimit sets value of PtsTotalLimit conditional field.

func (*UpdatesGetDifferenceRequest) String added in v0.12.0

func (g *UpdatesGetDifferenceRequest) String() string

String implements fmt.Stringer.

type UpdatesGetStateRequest

type UpdatesGetStateRequest struct {
}

UpdatesGetStateRequest represents TL type `updates.getState#edd4882a`. Returns a current state of updates.

See https://core.telegram.org/method/updates.getState for reference.

func (*UpdatesGetStateRequest) Decode

func (g *UpdatesGetStateRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatesGetStateRequest) Encode

func (g *UpdatesGetStateRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatesGetStateRequest) String added in v0.12.0

func (g *UpdatesGetStateRequest) String() string

String implements fmt.Stringer.

type UpdatesState

type UpdatesState struct {
	// Number of events occured in a text box
	Pts int
	// Position in a sequence of updates in secret chats. For further detailes refer to article secret chats¹Parameter was added in eigth layer².
	//
	// Links:
	//  1) https://core.telegram.org/api/end-to-end
	//  2) https://core.telegram.org/api/layers#layer-8
	Qts int
	// Date of condition
	Date int
	// Number of sent updates
	Seq int
	// Number of unread messages
	UnreadCount int
}

UpdatesState represents TL type `updates.state#a56c2a3e`. Updates state.

See https://core.telegram.org/constructor/updates.state for reference.

func (*UpdatesState) Decode

func (s *UpdatesState) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatesState) Encode

func (s *UpdatesState) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatesState) String added in v0.12.0

func (s *UpdatesState) String() string

String implements fmt.Stringer.

type UpdatesTooLong

type UpdatesTooLong struct {
}

UpdatesTooLong represents TL type `updatesTooLong#e317af7e`. Too many updates, it is necessary to execute updates.getDifference¹.

Links:

  1. https://core.telegram.org/method/updates.getDifference

See https://core.telegram.org/constructor/updatesTooLong for reference.

func (*UpdatesTooLong) Decode

func (u *UpdatesTooLong) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UpdatesTooLong) Encode

func (u *UpdatesTooLong) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UpdatesTooLong) String added in v0.12.0

func (u *UpdatesTooLong) String() string

String implements fmt.Stringer.

type UploadCdnFile

type UploadCdnFile struct {
	// The data
	Bytes []byte
}

UploadCdnFile represents TL type `upload.cdnFile#a99fca4f`. Represent a chunk of a CDN¹ file.

Links:

  1. https://core.telegram.org/cdn

See https://core.telegram.org/constructor/upload.cdnFile for reference.

func (*UploadCdnFile) Decode

func (c *UploadCdnFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UploadCdnFile) Encode

func (c *UploadCdnFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UploadCdnFile) String added in v0.12.0

func (c *UploadCdnFile) String() string

String implements fmt.Stringer.

type UploadCdnFileBox

type UploadCdnFileBox struct {
	CdnFile UploadCdnFileClass
}

UploadCdnFile boxes the UploadCdnFileClass providing a helper.

func (*UploadCdnFileBox) Decode

func (b *UploadCdnFileBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UploadCdnFileBox.

func (*UploadCdnFileBox) Encode

func (b *UploadCdnFileBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UploadCdnFileBox.

type UploadCdnFileClass

type UploadCdnFileClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

UploadCdnFileClass represents upload.CdnFile generic type.

See https://core.telegram.org/type/upload.CdnFile for reference.

Example:

g, err := DecodeUploadCdnFile(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *UploadCdnFileReuploadNeeded: // upload.cdnFileReuploadNeeded#eea8e46e
case *UploadCdnFile: // upload.cdnFile#a99fca4f
default: panic(v)
}

func DecodeUploadCdnFile

func DecodeUploadCdnFile(buf *bin.Buffer) (UploadCdnFileClass, error)

DecodeUploadCdnFile implements binary de-serialization for UploadCdnFileClass.

type UploadCdnFileReuploadNeeded

type UploadCdnFileReuploadNeeded struct {
	// Request token (see CDN¹)
	//
	// Links:
	//  1) https://core.telegram.org/cdn
	RequestToken []byte
}

UploadCdnFileReuploadNeeded represents TL type `upload.cdnFileReuploadNeeded#eea8e46e`. The file was cleared from the temporary RAM cache of the CDN¹ and has to be reuploaded.

Links:

  1. https://core.telegram.org/cdn

See https://core.telegram.org/constructor/upload.cdnFileReuploadNeeded for reference.

func (*UploadCdnFileReuploadNeeded) Decode

Decode implements bin.Decoder.

func (*UploadCdnFileReuploadNeeded) Encode

Encode implements bin.Encoder.

func (*UploadCdnFileReuploadNeeded) String added in v0.12.0

func (c *UploadCdnFileReuploadNeeded) String() string

String implements fmt.Stringer.

type UploadFile

type UploadFile struct {
	// File type
	Type StorageFileTypeClass
	// Modification type
	Mtime int
	// Binary data, file content
	Bytes []byte
}

UploadFile represents TL type `upload.file#96a18d5`. File content.

See https://core.telegram.org/constructor/upload.file for reference.

func (*UploadFile) Decode

func (f *UploadFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UploadFile) Encode

func (f *UploadFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UploadFile) String added in v0.12.0

func (f *UploadFile) String() string

String implements fmt.Stringer.

type UploadFileBox

type UploadFileBox struct {
	File UploadFileClass
}

UploadFile boxes the UploadFileClass providing a helper.

func (*UploadFileBox) Decode

func (b *UploadFileBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UploadFileBox.

func (*UploadFileBox) Encode

func (b *UploadFileBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UploadFileBox.

type UploadFileCdnRedirect

type UploadFileCdnRedirect struct {
	// CDN DC¹ ID
	//
	// Links:
	//  1) https://core.telegram.org/cdn
	DCID int
	// File token (see CDN files¹)
	//
	// Links:
	//  1) https://core.telegram.org/cdn
	FileToken []byte
	// Encryption key (see CDN files¹)
	//
	// Links:
	//  1) https://core.telegram.org/cdn
	EncryptionKey []byte
	// Encryption IV (see CDN files¹)
	//
	// Links:
	//  1) https://core.telegram.org/cdn
	EncryptionIv []byte
	// File hashes (see CDN files¹)
	//
	// Links:
	//  1) https://core.telegram.org/cdn
	FileHashes []FileHash
}

UploadFileCdnRedirect represents TL type `upload.fileCdnRedirect#f18cda44`. The file must be downloaded from a CDN DC¹.

Links:

  1. https://core.telegram.org/cdn

See https://core.telegram.org/constructor/upload.fileCdnRedirect for reference.

func (*UploadFileCdnRedirect) Decode

func (f *UploadFileCdnRedirect) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UploadFileCdnRedirect) Encode

func (f *UploadFileCdnRedirect) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UploadFileCdnRedirect) String added in v0.12.0

func (f *UploadFileCdnRedirect) String() string

String implements fmt.Stringer.

type UploadFileClass

type UploadFileClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

UploadFileClass represents upload.File generic type.

See https://core.telegram.org/type/upload.File for reference.

Example:

g, err := DecodeUploadFile(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *UploadFile: // upload.file#96a18d5
case *UploadFileCdnRedirect: // upload.fileCdnRedirect#f18cda44
default: panic(v)
}

func DecodeUploadFile

func DecodeUploadFile(buf *bin.Buffer) (UploadFileClass, error)

DecodeUploadFile implements binary de-serialization for UploadFileClass.

type UploadGetCdnFileHashesRequest

type UploadGetCdnFileHashesRequest struct {
	// File
	FileToken []byte
	// Offset from which to start getting hashes
	Offset int
}

UploadGetCdnFileHashesRequest represents TL type `upload.getCdnFileHashes#4da54231`. Get SHA256 hashes for verifying downloaded CDN¹ files

Links:

  1. https://core.telegram.org/cdn

See https://core.telegram.org/method/upload.getCdnFileHashes for reference.

func (*UploadGetCdnFileHashesRequest) Decode

Decode implements bin.Decoder.

func (*UploadGetCdnFileHashesRequest) Encode

Encode implements bin.Encoder.

func (*UploadGetCdnFileHashesRequest) String added in v0.12.0

String implements fmt.Stringer.

type UploadGetCdnFileRequest

type UploadGetCdnFileRequest struct {
	// File token
	FileToken []byte
	// Offset of chunk to download
	Offset int
	// Length of chunk to download
	Limit int
}

UploadGetCdnFileRequest represents TL type `upload.getCdnFile#2000bcc3`. Download a CDN¹ file.

Links:

  1. https://core.telegram.org/cdn

See https://core.telegram.org/method/upload.getCdnFile for reference.

func (*UploadGetCdnFileRequest) Decode

func (g *UploadGetCdnFileRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UploadGetCdnFileRequest) Encode

func (g *UploadGetCdnFileRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UploadGetCdnFileRequest) String added in v0.12.0

func (g *UploadGetCdnFileRequest) String() string

String implements fmt.Stringer.

type UploadGetFileHashesRequest

type UploadGetFileHashesRequest struct {
	// File
	Location InputFileLocationClass
	// Offset from which to get file hashes
	Offset int
}

UploadGetFileHashesRequest represents TL type `upload.getFileHashes#c7025931`. Get SHA256 hashes for verifying downloaded files

See https://core.telegram.org/method/upload.getFileHashes for reference.

func (*UploadGetFileHashesRequest) Decode

Decode implements bin.Decoder.

func (*UploadGetFileHashesRequest) Encode

Encode implements bin.Encoder.

func (*UploadGetFileHashesRequest) String added in v0.12.0

func (g *UploadGetFileHashesRequest) String() string

String implements fmt.Stringer.

type UploadGetFileRequest

type UploadGetFileRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Disable some checks on limit and offset values, useful for example to stream videos by keyframes
	Precise bool
	// Whether the current client supports CDN downloads¹
	//
	// Links:
	//  1) https://core.telegram.org/cdn
	CDNSupported bool
	// File location
	Location InputFileLocationClass
	// Number of bytes to be skipped
	Offset int
	// Number of bytes to be returned
	Limit int
}

UploadGetFileRequest represents TL type `upload.getFile#b15a9afc`. Returns content of a whole file or its part.

See https://core.telegram.org/method/upload.getFile for reference.

func (*UploadGetFileRequest) Decode

func (g *UploadGetFileRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UploadGetFileRequest) Encode

func (g *UploadGetFileRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UploadGetFileRequest) SetCDNSupported

func (g *UploadGetFileRequest) SetCDNSupported(value bool)

SetCDNSupported sets value of CDNSupported conditional field.

func (*UploadGetFileRequest) SetPrecise

func (g *UploadGetFileRequest) SetPrecise(value bool)

SetPrecise sets value of Precise conditional field.

func (*UploadGetFileRequest) String added in v0.12.0

func (g *UploadGetFileRequest) String() string

String implements fmt.Stringer.

type UploadGetWebFileRequest

type UploadGetWebFileRequest struct {
	// Location field of UploadGetWebFileRequest.
	Location InputWebFileLocationClass
	// Offset field of UploadGetWebFileRequest.
	Offset int
	// Limit field of UploadGetWebFileRequest.
	Limit int
}

UploadGetWebFileRequest represents TL type `upload.getWebFile#24e6818d`.

See https://core.telegram.org/method/upload.getWebFile for reference.

func (*UploadGetWebFileRequest) Decode

func (g *UploadGetWebFileRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UploadGetWebFileRequest) Encode

func (g *UploadGetWebFileRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UploadGetWebFileRequest) String added in v0.12.0

func (g *UploadGetWebFileRequest) String() string

String implements fmt.Stringer.

type UploadReuploadCdnFileRequest

type UploadReuploadCdnFileRequest struct {
	// File token
	FileToken []byte
	// Request token
	RequestToken []byte
}

UploadReuploadCdnFileRequest represents TL type `upload.reuploadCdnFile#9b2754a8`. Request a reupload of a certain file to a CDN DC¹.

Links:

  1. https://core.telegram.org/cdn

See https://core.telegram.org/method/upload.reuploadCdnFile for reference.

func (*UploadReuploadCdnFileRequest) Decode

Decode implements bin.Decoder.

func (*UploadReuploadCdnFileRequest) Encode

Encode implements bin.Encoder.

func (*UploadReuploadCdnFileRequest) String added in v0.12.0

String implements fmt.Stringer.

type UploadSaveBigFilePartRequest

type UploadSaveBigFilePartRequest struct {
	// Random file id, created by the client
	FileID int64
	// Part sequence number
	FilePart int
	// Total number of parts
	FileTotalParts int
	// Binary data, part contents
	Bytes []byte
}

UploadSaveBigFilePartRequest represents TL type `upload.saveBigFilePart#de7b673d`. Saves a part of a large file (over 10Mb in size) to be later passed to one of the methods.

See https://core.telegram.org/method/upload.saveBigFilePart for reference.

func (*UploadSaveBigFilePartRequest) Decode

Decode implements bin.Decoder.

func (*UploadSaveBigFilePartRequest) Encode

Encode implements bin.Encoder.

func (*UploadSaveBigFilePartRequest) String added in v0.12.0

String implements fmt.Stringer.

type UploadSaveFilePartRequest

type UploadSaveFilePartRequest struct {
	// Random file identifier created by the client
	FileID int64
	// Numerical order of a part
	FilePart int
	// Binary data, contend of a part
	Bytes []byte
}

UploadSaveFilePartRequest represents TL type `upload.saveFilePart#b304a621`. Saves a part of file for futher sending to one of the methods.

See https://core.telegram.org/method/upload.saveFilePart for reference.

func (*UploadSaveFilePartRequest) Decode

func (s *UploadSaveFilePartRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UploadSaveFilePartRequest) Encode

func (s *UploadSaveFilePartRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UploadSaveFilePartRequest) String added in v0.12.0

func (s *UploadSaveFilePartRequest) String() string

String implements fmt.Stringer.

type UploadWebFile

type UploadWebFile struct {
	// File size
	Size int
	// Mime type
	MimeType string
	// File type
	FileType StorageFileTypeClass
	// Modified time
	Mtime int
	// Data
	Bytes []byte
}

UploadWebFile represents TL type `upload.webFile#21e753bc`. Represents a chunk of an HTTP webfile¹ downloaded through telegram's secure MTProto servers

Links:

  1. https://core.telegram.org/api/files

See https://core.telegram.org/constructor/upload.webFile for reference.

func (*UploadWebFile) Decode

func (w *UploadWebFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UploadWebFile) Encode

func (w *UploadWebFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UploadWebFile) String added in v0.12.0

func (w *UploadWebFile) String() string

String implements fmt.Stringer.

type UrlAuthResultAccepted

type UrlAuthResultAccepted struct {
	// The URL name of the website on which the user has logged in.
	URL string
}

UrlAuthResultAccepted represents TL type `urlAuthResultAccepted#8f8c0e4e`. Details about an accepted authorization request, for more info click here »¹

Links:

  1. https://core.telegram.org/api/url-authorization

See https://core.telegram.org/constructor/urlAuthResultAccepted for reference.

func (*UrlAuthResultAccepted) Decode

func (u *UrlAuthResultAccepted) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UrlAuthResultAccepted) Encode

func (u *UrlAuthResultAccepted) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UrlAuthResultAccepted) String added in v0.12.0

func (u *UrlAuthResultAccepted) String() string

String implements fmt.Stringer.

type UrlAuthResultBox

type UrlAuthResultBox struct {
	UrlAuthResult UrlAuthResultClass
}

UrlAuthResult boxes the UrlAuthResultClass providing a helper.

func (*UrlAuthResultBox) Decode

func (b *UrlAuthResultBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UrlAuthResultBox.

func (*UrlAuthResultBox) Encode

func (b *UrlAuthResultBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UrlAuthResultBox.

type UrlAuthResultClass

type UrlAuthResultClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

UrlAuthResultClass represents UrlAuthResult generic type.

See https://core.telegram.org/type/UrlAuthResult for reference.

Example:

g, err := DecodeUrlAuthResult(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *UrlAuthResultRequest: // urlAuthResultRequest#92d33a0e
case *UrlAuthResultAccepted: // urlAuthResultAccepted#8f8c0e4e
case *UrlAuthResultDefault: // urlAuthResultDefault#a9d6db1f
default: panic(v)
}

func DecodeUrlAuthResult

func DecodeUrlAuthResult(buf *bin.Buffer) (UrlAuthResultClass, error)

DecodeUrlAuthResult implements binary de-serialization for UrlAuthResultClass.

type UrlAuthResultDefault

type UrlAuthResultDefault struct {
}

UrlAuthResultDefault represents TL type `urlAuthResultDefault#a9d6db1f`. Details about an accepted authorization request, for more info click here »¹

Links:

  1. https://core.telegram.org/api/url-authorization

See https://core.telegram.org/constructor/urlAuthResultDefault for reference.

func (*UrlAuthResultDefault) Decode

func (u *UrlAuthResultDefault) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UrlAuthResultDefault) Encode

func (u *UrlAuthResultDefault) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UrlAuthResultDefault) String added in v0.12.0

func (u *UrlAuthResultDefault) String() string

String implements fmt.Stringer.

type UrlAuthResultRequest

type UrlAuthResultRequest struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether the bot would like to send messages to the user
	RequestWriteAccess bool
	// Username of a bot, which will be used for user authorization. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot¹ for more details.
	//
	// Links:
	//  1) https://core.telegram.org/widgets/login#linking-your-domain-to-the-bot
	Bot UserClass
	// The domain name of the website on which the user will log in.
	Domain string
}

UrlAuthResultRequest represents TL type `urlAuthResultRequest#92d33a0e`. Details about the authorization request, for more info click here »¹

Links:

  1. https://core.telegram.org/api/url-authorization

See https://core.telegram.org/constructor/urlAuthResultRequest for reference.

func (*UrlAuthResultRequest) Decode

func (u *UrlAuthResultRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UrlAuthResultRequest) Encode

func (u *UrlAuthResultRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UrlAuthResultRequest) SetRequestWriteAccess

func (u *UrlAuthResultRequest) SetRequestWriteAccess(value bool)

SetRequestWriteAccess sets value of RequestWriteAccess conditional field.

func (*UrlAuthResultRequest) String added in v0.12.0

func (u *UrlAuthResultRequest) String() string

String implements fmt.Stringer.

type User

type User struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this user indicates the currently logged in user
	Self bool
	// Whether this user is a contact
	Contact bool
	// Whether this user is a mutual contact
	MutualContact bool
	// Whether the account of this user was deleted
	Deleted bool
	// Is this user a bot?
	Bot bool
	// Can the bot see all messages in groups?
	BotChatHistory bool
	// Can the bot be added to groups?
	BotNochats bool
	// Whether this user is verified
	Verified bool
	// Access to this user must be restricted for the reason specified in restriction_reason
	Restricted bool
	// See min¹
	//
	// Links:
	//  1) https://core.telegram.org/api/min
	Min bool
	// Whether the bot can request our geolocation in inline mode
	BotInlineGeo bool
	// Whether this is an official support user
	Support bool
	// This may be a scam user
	Scam bool
	// If set, the profile picture for this user should be refetched
	ApplyMinPhoto bool
	// ID of the user
	ID int
	// Access hash of the user
	//
	// Use SetAccessHash and GetAccessHash helpers.
	AccessHash int64
	// First name
	//
	// Use SetFirstName and GetFirstName helpers.
	FirstName string
	// Last name
	//
	// Use SetLastName and GetLastName helpers.
	LastName string
	// Username
	//
	// Use SetUsername and GetUsername helpers.
	Username string
	// Phone number
	//
	// Use SetPhone and GetPhone helpers.
	Phone string
	// Profile picture of user
	//
	// Use SetPhoto and GetPhoto helpers.
	Photo UserProfilePhotoClass
	// Online status of user
	//
	// Use SetStatus and GetStatus helpers.
	Status UserStatusClass
	// Version of the bot_info field in userFull¹, incremented every time it changes
	//
	// Links:
	//  1) https://core.telegram.org/constructor/userFull
	//
	// Use SetBotInfoVersion and GetBotInfoVersion helpers.
	BotInfoVersion int
	// Contains the reason why access to this user must be restricted.
	//
	// Use SetRestrictionReason and GetRestrictionReason helpers.
	RestrictionReason []RestrictionReason
	// Inline placeholder for this inline bot
	//
	// Use SetBotInlinePlaceholder and GetBotInlinePlaceholder helpers.
	BotInlinePlaceholder string
	// Language code of the user
	//
	// Use SetLangCode and GetLangCode helpers.
	LangCode string
}

User represents TL type `user#938458c1`. Indicates info about a certain user

See https://core.telegram.org/constructor/user for reference.

func (*User) Decode

func (u *User) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*User) Encode

func (u *User) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*User) GetAccessHash

func (u *User) GetAccessHash() (value int64, ok bool)

GetAccessHash returns value of AccessHash conditional field and boolean which is true if field was set.

func (*User) GetBotInfoVersion

func (u *User) GetBotInfoVersion() (value int, ok bool)

GetBotInfoVersion returns value of BotInfoVersion conditional field and boolean which is true if field was set.

func (*User) GetBotInlinePlaceholder

func (u *User) GetBotInlinePlaceholder() (value string, ok bool)

GetBotInlinePlaceholder returns value of BotInlinePlaceholder conditional field and boolean which is true if field was set.

func (*User) GetFirstName

func (u *User) GetFirstName() (value string, ok bool)

GetFirstName returns value of FirstName conditional field and boolean which is true if field was set.

func (*User) GetLangCode

func (u *User) GetLangCode() (value string, ok bool)

GetLangCode returns value of LangCode conditional field and boolean which is true if field was set.

func (*User) GetLastName

func (u *User) GetLastName() (value string, ok bool)

GetLastName returns value of LastName conditional field and boolean which is true if field was set.

func (*User) GetPhone

func (u *User) GetPhone() (value string, ok bool)

GetPhone returns value of Phone conditional field and boolean which is true if field was set.

func (*User) GetPhoto

func (u *User) GetPhoto() (value UserProfilePhotoClass, ok bool)

GetPhoto returns value of Photo conditional field and boolean which is true if field was set.

func (*User) GetRestrictionReason

func (u *User) GetRestrictionReason() (value []RestrictionReason, ok bool)

GetRestrictionReason returns value of RestrictionReason conditional field and boolean which is true if field was set.

func (*User) GetStatus

func (u *User) GetStatus() (value UserStatusClass, ok bool)

GetStatus returns value of Status conditional field and boolean which is true if field was set.

func (*User) GetUsername

func (u *User) GetUsername() (value string, ok bool)

GetUsername returns value of Username conditional field and boolean which is true if field was set.

func (*User) SetAccessHash

func (u *User) SetAccessHash(value int64)

SetAccessHash sets value of AccessHash conditional field.

func (*User) SetApplyMinPhoto

func (u *User) SetApplyMinPhoto(value bool)

SetApplyMinPhoto sets value of ApplyMinPhoto conditional field.

func (*User) SetBot

func (u *User) SetBot(value bool)

SetBot sets value of Bot conditional field.

func (*User) SetBotChatHistory

func (u *User) SetBotChatHistory(value bool)

SetBotChatHistory sets value of BotChatHistory conditional field.

func (*User) SetBotInfoVersion

func (u *User) SetBotInfoVersion(value int)

SetBotInfoVersion sets value of BotInfoVersion conditional field.

func (*User) SetBotInlineGeo

func (u *User) SetBotInlineGeo(value bool)

SetBotInlineGeo sets value of BotInlineGeo conditional field.

func (*User) SetBotInlinePlaceholder

func (u *User) SetBotInlinePlaceholder(value string)

SetBotInlinePlaceholder sets value of BotInlinePlaceholder conditional field.

func (*User) SetBotNochats

func (u *User) SetBotNochats(value bool)

SetBotNochats sets value of BotNochats conditional field.

func (*User) SetContact

func (u *User) SetContact(value bool)

SetContact sets value of Contact conditional field.

func (*User) SetDeleted

func (u *User) SetDeleted(value bool)

SetDeleted sets value of Deleted conditional field.

func (*User) SetFirstName

func (u *User) SetFirstName(value string)

SetFirstName sets value of FirstName conditional field.

func (*User) SetLangCode

func (u *User) SetLangCode(value string)

SetLangCode sets value of LangCode conditional field.

func (*User) SetLastName

func (u *User) SetLastName(value string)

SetLastName sets value of LastName conditional field.

func (*User) SetMin

func (u *User) SetMin(value bool)

SetMin sets value of Min conditional field.

func (*User) SetMutualContact

func (u *User) SetMutualContact(value bool)

SetMutualContact sets value of MutualContact conditional field.

func (*User) SetPhone

func (u *User) SetPhone(value string)

SetPhone sets value of Phone conditional field.

func (*User) SetPhoto

func (u *User) SetPhoto(value UserProfilePhotoClass)

SetPhoto sets value of Photo conditional field.

func (*User) SetRestricted

func (u *User) SetRestricted(value bool)

SetRestricted sets value of Restricted conditional field.

func (*User) SetRestrictionReason

func (u *User) SetRestrictionReason(value []RestrictionReason)

SetRestrictionReason sets value of RestrictionReason conditional field.

func (*User) SetScam

func (u *User) SetScam(value bool)

SetScam sets value of Scam conditional field.

func (*User) SetSelf

func (u *User) SetSelf(value bool)

SetSelf sets value of Self conditional field.

func (*User) SetStatus

func (u *User) SetStatus(value UserStatusClass)

SetStatus sets value of Status conditional field.

func (*User) SetSupport

func (u *User) SetSupport(value bool)

SetSupport sets value of Support conditional field.

func (*User) SetUsername

func (u *User) SetUsername(value string)

SetUsername sets value of Username conditional field.

func (*User) SetVerified

func (u *User) SetVerified(value bool)

SetVerified sets value of Verified conditional field.

func (*User) String added in v0.12.0

func (u *User) String() string

String implements fmt.Stringer.

type UserBox

type UserBox struct {
	User UserClass
}

User boxes the UserClass providing a helper.

func (*UserBox) Decode

func (b *UserBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UserBox.

func (*UserBox) Encode

func (b *UserBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UserBox.

type UserClass

type UserClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

UserClass represents User generic type.

See https://core.telegram.org/type/User for reference.

Example:

g, err := DecodeUser(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *UserEmpty: // userEmpty#200250ba
case *User: // user#938458c1
default: panic(v)
}

func DecodeUser

func DecodeUser(buf *bin.Buffer) (UserClass, error)

DecodeUser implements binary de-serialization for UserClass.

type UserClassVector added in v0.8.0

type UserClassVector struct {
	// Elements of Vector<User>
	Elems []UserClass
}

UserClassVector is a box for Vector<User>

func (*UserClassVector) Decode added in v0.8.0

func (vec *UserClassVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserClassVector) Encode added in v0.8.0

func (vec *UserClassVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserClassVector) String added in v0.12.0

func (vec *UserClassVector) String() string

String implements fmt.Stringer.

type UserEmpty

type UserEmpty struct {
	// User identifier or 0
	ID int
}

UserEmpty represents TL type `userEmpty#200250ba`. Empty constructor, non-existent user.

See https://core.telegram.org/constructor/userEmpty for reference.

func (*UserEmpty) Decode

func (u *UserEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserEmpty) Encode

func (u *UserEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserEmpty) String added in v0.12.0

func (u *UserEmpty) String() string

String implements fmt.Stringer.

type UserFull

type UserFull struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether you have blocked this user
	Blocked bool
	// Whether this user can make VoIP calls
	PhoneCallsAvailable bool
	// Whether this user's privacy settings allow you to call him
	PhoneCallsPrivate bool
	// Whether you can pin messages in the chat with this user, you can do this only for a chat with yourself
	CanPinMessage bool
	// Whether scheduled messages¹ are available
	//
	// Links:
	//  1) https://core.telegram.org/api/scheduled-messages
	HasScheduled bool
	// Whether the user can receive video calls
	VideoCallsAvailable bool
	// Remaining user info
	User UserClass
	// Bio of the user
	//
	// Use SetAbout and GetAbout helpers.
	About string
	// Peer settings
	Settings PeerSettings
	// Profile photo
	//
	// Use SetProfilePhoto and GetProfilePhoto helpers.
	ProfilePhoto PhotoClass
	// Notification settings
	NotifySettings PeerNotifySettings
	// For bots, info about the bot (bot commands, etc)
	//
	// Use SetBotInfo and GetBotInfo helpers.
	BotInfo BotInfo
	// Message ID of the last pinned message¹
	//
	// Links:
	//  1) https://core.telegram.org/api/pin
	//
	// Use SetPinnedMsgID and GetPinnedMsgID helpers.
	PinnedMsgID int
	// Chats in common with this user
	CommonChatsCount int
	// Peer folder ID, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/folders#peer-folders
	//
	// Use SetFolderID and GetFolderID helpers.
	FolderID int
}

UserFull represents TL type `userFull#edf17c12`. Extended user info

See https://core.telegram.org/constructor/userFull for reference.

func (*UserFull) Decode

func (u *UserFull) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserFull) Encode

func (u *UserFull) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserFull) GetAbout

func (u *UserFull) GetAbout() (value string, ok bool)

GetAbout returns value of About conditional field and boolean which is true if field was set.

func (*UserFull) GetBotInfo

func (u *UserFull) GetBotInfo() (value BotInfo, ok bool)

GetBotInfo returns value of BotInfo conditional field and boolean which is true if field was set.

func (*UserFull) GetFolderID

func (u *UserFull) GetFolderID() (value int, ok bool)

GetFolderID returns value of FolderID conditional field and boolean which is true if field was set.

func (*UserFull) GetPinnedMsgID

func (u *UserFull) GetPinnedMsgID() (value int, ok bool)

GetPinnedMsgID returns value of PinnedMsgID conditional field and boolean which is true if field was set.

func (*UserFull) GetProfilePhoto

func (u *UserFull) GetProfilePhoto() (value PhotoClass, ok bool)

GetProfilePhoto returns value of ProfilePhoto conditional field and boolean which is true if field was set.

func (*UserFull) SetAbout

func (u *UserFull) SetAbout(value string)

SetAbout sets value of About conditional field.

func (*UserFull) SetBlocked

func (u *UserFull) SetBlocked(value bool)

SetBlocked sets value of Blocked conditional field.

func (*UserFull) SetBotInfo

func (u *UserFull) SetBotInfo(value BotInfo)

SetBotInfo sets value of BotInfo conditional field.

func (*UserFull) SetCanPinMessage

func (u *UserFull) SetCanPinMessage(value bool)

SetCanPinMessage sets value of CanPinMessage conditional field.

func (*UserFull) SetFolderID

func (u *UserFull) SetFolderID(value int)

SetFolderID sets value of FolderID conditional field.

func (*UserFull) SetHasScheduled

func (u *UserFull) SetHasScheduled(value bool)

SetHasScheduled sets value of HasScheduled conditional field.

func (*UserFull) SetPhoneCallsAvailable

func (u *UserFull) SetPhoneCallsAvailable(value bool)

SetPhoneCallsAvailable sets value of PhoneCallsAvailable conditional field.

func (*UserFull) SetPhoneCallsPrivate

func (u *UserFull) SetPhoneCallsPrivate(value bool)

SetPhoneCallsPrivate sets value of PhoneCallsPrivate conditional field.

func (*UserFull) SetPinnedMsgID

func (u *UserFull) SetPinnedMsgID(value int)

SetPinnedMsgID sets value of PinnedMsgID conditional field.

func (*UserFull) SetProfilePhoto

func (u *UserFull) SetProfilePhoto(value PhotoClass)

SetProfilePhoto sets value of ProfilePhoto conditional field.

func (*UserFull) SetVideoCallsAvailable

func (u *UserFull) SetVideoCallsAvailable(value bool)

SetVideoCallsAvailable sets value of VideoCallsAvailable conditional field.

func (*UserFull) String added in v0.12.0

func (u *UserFull) String() string

String implements fmt.Stringer.

type UserNameHandler added in v0.9.0

type UserNameHandler func(ctx UpdateContext, update *UpdateUserName) error

UserNameHandler is a UserName event handler.

type UserPhoneHandler added in v0.9.0

type UserPhoneHandler func(ctx UpdateContext, update *UpdateUserPhone) error

UserPhoneHandler is a UserPhone event handler.

type UserPhotoHandler added in v0.9.0

type UserPhotoHandler func(ctx UpdateContext, update *UpdateUserPhoto) error

UserPhotoHandler is a UserPhoto event handler.

type UserProfilePhoto

type UserProfilePhoto struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether an animated profile picture¹ is available for this user
	//
	// Links:
	//  1) https://core.telegram.org/api/files#animated-profile-pictures
	HasVideo bool
	// Identifier of the respective photoParameter added in Layer 2¹
	//
	// Links:
	//  1) https://core.telegram.org/api/layers#layer-2
	PhotoID int64
	// Location of the file, corresponding to the small profile photo thumbnail
	PhotoSmall FileLocationToBeDeprecated
	// Location of the file, corresponding to the big profile photo thumbnail
	PhotoBig FileLocationToBeDeprecated
	// DC ID where the photo is stored
	DCID int
}

UserProfilePhoto represents TL type `userProfilePhoto#69d3ab26`. User profile photo.

See https://core.telegram.org/constructor/userProfilePhoto for reference.

func (*UserProfilePhoto) Decode

func (u *UserProfilePhoto) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserProfilePhoto) Encode

func (u *UserProfilePhoto) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserProfilePhoto) SetHasVideo

func (u *UserProfilePhoto) SetHasVideo(value bool)

SetHasVideo sets value of HasVideo conditional field.

func (*UserProfilePhoto) String added in v0.12.0

func (u *UserProfilePhoto) String() string

String implements fmt.Stringer.

type UserProfilePhotoBox

type UserProfilePhotoBox struct {
	UserProfilePhoto UserProfilePhotoClass
}

UserProfilePhoto boxes the UserProfilePhotoClass providing a helper.

func (*UserProfilePhotoBox) Decode

func (b *UserProfilePhotoBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UserProfilePhotoBox.

func (*UserProfilePhotoBox) Encode

func (b *UserProfilePhotoBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UserProfilePhotoBox.

type UserProfilePhotoClass

type UserProfilePhotoClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

UserProfilePhotoClass represents UserProfilePhoto generic type.

See https://core.telegram.org/type/UserProfilePhoto for reference.

Example:

g, err := DecodeUserProfilePhoto(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *UserProfilePhotoEmpty: // userProfilePhotoEmpty#4f11bae1
case *UserProfilePhoto: // userProfilePhoto#69d3ab26
default: panic(v)
}

func DecodeUserProfilePhoto

func DecodeUserProfilePhoto(buf *bin.Buffer) (UserProfilePhotoClass, error)

DecodeUserProfilePhoto implements binary de-serialization for UserProfilePhotoClass.

type UserProfilePhotoEmpty

type UserProfilePhotoEmpty struct {
}

UserProfilePhotoEmpty represents TL type `userProfilePhotoEmpty#4f11bae1`. Profile photo has not been set, or was hidden.

See https://core.telegram.org/constructor/userProfilePhotoEmpty for reference.

func (*UserProfilePhotoEmpty) Decode

func (u *UserProfilePhotoEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserProfilePhotoEmpty) Encode

func (u *UserProfilePhotoEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserProfilePhotoEmpty) String added in v0.12.0

func (u *UserProfilePhotoEmpty) String() string

String implements fmt.Stringer.

type UserStatusBox

type UserStatusBox struct {
	UserStatus UserStatusClass
}

UserStatus boxes the UserStatusClass providing a helper.

func (*UserStatusBox) Decode

func (b *UserStatusBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for UserStatusBox.

func (*UserStatusBox) Encode

func (b *UserStatusBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for UserStatusBox.

type UserStatusClass

type UserStatusClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

UserStatusClass represents UserStatus generic type.

See https://core.telegram.org/type/UserStatus for reference.

Example:

g, err := DecodeUserStatus(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *UserStatusEmpty: // userStatusEmpty#9d05049
case *UserStatusOnline: // userStatusOnline#edb93949
case *UserStatusOffline: // userStatusOffline#8c703f
case *UserStatusRecently: // userStatusRecently#e26f42f1
case *UserStatusLastWeek: // userStatusLastWeek#7bf09fc
case *UserStatusLastMonth: // userStatusLastMonth#77ebc742
default: panic(v)
}

func DecodeUserStatus

func DecodeUserStatus(buf *bin.Buffer) (UserStatusClass, error)

DecodeUserStatus implements binary de-serialization for UserStatusClass.

type UserStatusEmpty

type UserStatusEmpty struct {
}

UserStatusEmpty represents TL type `userStatusEmpty#9d05049`. User status has not been set yet.

See https://core.telegram.org/constructor/userStatusEmpty for reference.

func (*UserStatusEmpty) Decode

func (u *UserStatusEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserStatusEmpty) Encode

func (u *UserStatusEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserStatusEmpty) String added in v0.12.0

func (u *UserStatusEmpty) String() string

String implements fmt.Stringer.

type UserStatusHandler added in v0.9.0

type UserStatusHandler func(ctx UpdateContext, update *UpdateUserStatus) error

UserStatusHandler is a UserStatus event handler.

type UserStatusLastMonth

type UserStatusLastMonth struct {
}

UserStatusLastMonth represents TL type `userStatusLastMonth#77ebc742`. Online status: last seen last month

See https://core.telegram.org/constructor/userStatusLastMonth for reference.

func (*UserStatusLastMonth) Decode

func (u *UserStatusLastMonth) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserStatusLastMonth) Encode

func (u *UserStatusLastMonth) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserStatusLastMonth) String added in v0.12.0

func (u *UserStatusLastMonth) String() string

String implements fmt.Stringer.

type UserStatusLastWeek

type UserStatusLastWeek struct {
}

UserStatusLastWeek represents TL type `userStatusLastWeek#7bf09fc`. Online status: last seen last week

See https://core.telegram.org/constructor/userStatusLastWeek for reference.

func (*UserStatusLastWeek) Decode

func (u *UserStatusLastWeek) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserStatusLastWeek) Encode

func (u *UserStatusLastWeek) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserStatusLastWeek) String added in v0.12.0

func (u *UserStatusLastWeek) String() string

String implements fmt.Stringer.

type UserStatusOffline

type UserStatusOffline struct {
	// Time the user was last seen online
	WasOnline int
}

UserStatusOffline represents TL type `userStatusOffline#8c703f`. The user's offline status.

See https://core.telegram.org/constructor/userStatusOffline for reference.

func (*UserStatusOffline) Decode

func (u *UserStatusOffline) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserStatusOffline) Encode

func (u *UserStatusOffline) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserStatusOffline) String added in v0.12.0

func (u *UserStatusOffline) String() string

String implements fmt.Stringer.

type UserStatusOnline

type UserStatusOnline struct {
	// Time to expiration of the current online status
	Expires int
}

UserStatusOnline represents TL type `userStatusOnline#edb93949`. Online status of the user.

See https://core.telegram.org/constructor/userStatusOnline for reference.

func (*UserStatusOnline) Decode

func (u *UserStatusOnline) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserStatusOnline) Encode

func (u *UserStatusOnline) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserStatusOnline) String added in v0.12.0

func (u *UserStatusOnline) String() string

String implements fmt.Stringer.

type UserStatusRecently

type UserStatusRecently struct {
}

UserStatusRecently represents TL type `userStatusRecently#e26f42f1`. Online status: last seen recently

See https://core.telegram.org/constructor/userStatusRecently for reference.

func (*UserStatusRecently) Decode

func (u *UserStatusRecently) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UserStatusRecently) Encode

func (u *UserStatusRecently) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UserStatusRecently) String added in v0.12.0

func (u *UserStatusRecently) String() string

String implements fmt.Stringer.

type UserTypingHandler added in v0.9.0

type UserTypingHandler func(ctx UpdateContext, update *UpdateUserTyping) error

UserTypingHandler is a UserTyping event handler.

type UsersGetFullUserRequest

type UsersGetFullUserRequest struct {
	// User ID
	ID InputUserClass
}

UsersGetFullUserRequest represents TL type `users.getFullUser#ca30a5b1`. Returns extended user info by ID.

See https://core.telegram.org/method/users.getFullUser for reference.

func (*UsersGetFullUserRequest) Decode

func (g *UsersGetFullUserRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UsersGetFullUserRequest) Encode

func (g *UsersGetFullUserRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UsersGetFullUserRequest) String added in v0.12.0

func (g *UsersGetFullUserRequest) String() string

String implements fmt.Stringer.

type UsersGetUsersRequest

type UsersGetUsersRequest struct {
	// List of user identifiers
	ID []InputUserClass
}

UsersGetUsersRequest represents TL type `users.getUsers#d91a548`. Returns basic user info according to their identifiers.

See https://core.telegram.org/method/users.getUsers for reference.

func (*UsersGetUsersRequest) Decode

func (g *UsersGetUsersRequest) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*UsersGetUsersRequest) Encode

func (g *UsersGetUsersRequest) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*UsersGetUsersRequest) String added in v0.12.0

func (g *UsersGetUsersRequest) String() string

String implements fmt.Stringer.

type UsersSetSecureValueErrorsRequest

type UsersSetSecureValueErrorsRequest struct {
	// The user
	ID InputUserClass
	// Errors
	Errors []SecureValueErrorClass
}

UsersSetSecureValueErrorsRequest represents TL type `users.setSecureValueErrors#90c894b5`. Notify the user that the sent passport¹ data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

Links:

  1. https://core.telegram.org/passport

See https://core.telegram.org/method/users.setSecureValueErrors for reference.

func (*UsersSetSecureValueErrorsRequest) Decode

Decode implements bin.Decoder.

func (*UsersSetSecureValueErrorsRequest) Encode

Encode implements bin.Encoder.

func (*UsersSetSecureValueErrorsRequest) String added in v0.12.0

String implements fmt.Stringer.

type VideoSize

type VideoSize struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// u for animated profile pictures, and v for trimmed and downscaled video previews
	Type string
	// File location
	Location FileLocationToBeDeprecated
	// Video width
	W int
	// Video height
	H int
	// File size
	Size int
	// Timestamp that should be shown as static preview to the user (seconds)
	//
	// Use SetVideoStartTs and GetVideoStartTs helpers.
	VideoStartTs float64
}

VideoSize represents TL type `videoSize#e831c556`. Animated profile picture¹ in MPEG4 format

Links:

  1. https://core.telegram.org/api/files#animated-profile-pictures

See https://core.telegram.org/constructor/videoSize for reference.

func (*VideoSize) Decode

func (v *VideoSize) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*VideoSize) Encode

func (v *VideoSize) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*VideoSize) GetVideoStartTs

func (v *VideoSize) GetVideoStartTs() (value float64, ok bool)

GetVideoStartTs returns value of VideoStartTs conditional field and boolean which is true if field was set.

func (*VideoSize) SetVideoStartTs

func (v *VideoSize) SetVideoStartTs(value float64)

SetVideoStartTs sets value of VideoStartTs conditional field.

func (*VideoSize) String added in v0.12.0

func (v *VideoSize) String() string

String implements fmt.Stringer.

type WallPaper

type WallPaper struct {
	// Identifier
	ID int64
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Creator of the wallpaper
	Creator bool
	// Whether this is the default wallpaper
	Default bool
	// Pattern
	Pattern bool
	// Dark mode
	Dark bool
	// Access hash
	AccessHash int64
	// Unique wallpaper ID
	Slug string
	// The actual wallpaper
	Document DocumentClass
	// Wallpaper settings
	//
	// Use SetSettings and GetSettings helpers.
	Settings WallPaperSettings
}

WallPaper represents TL type `wallPaper#a437c3ed`. Wallpaper settings.

See https://core.telegram.org/constructor/wallPaper for reference.

func (*WallPaper) Decode

func (w *WallPaper) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WallPaper) Encode

func (w *WallPaper) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WallPaper) GetSettings

func (w *WallPaper) GetSettings() (value WallPaperSettings, ok bool)

GetSettings returns value of Settings conditional field and boolean which is true if field was set.

func (*WallPaper) SetCreator

func (w *WallPaper) SetCreator(value bool)

SetCreator sets value of Creator conditional field.

func (*WallPaper) SetDark

func (w *WallPaper) SetDark(value bool)

SetDark sets value of Dark conditional field.

func (*WallPaper) SetDefault

func (w *WallPaper) SetDefault(value bool)

SetDefault sets value of Default conditional field.

func (*WallPaper) SetPattern

func (w *WallPaper) SetPattern(value bool)

SetPattern sets value of Pattern conditional field.

func (*WallPaper) SetSettings

func (w *WallPaper) SetSettings(value WallPaperSettings)

SetSettings sets value of Settings conditional field.

func (*WallPaper) String added in v0.12.0

func (w *WallPaper) String() string

String implements fmt.Stringer.

type WallPaperBox

type WallPaperBox struct {
	WallPaper WallPaperClass
}

WallPaper boxes the WallPaperClass providing a helper.

func (*WallPaperBox) Decode

func (b *WallPaperBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for WallPaperBox.

func (*WallPaperBox) Encode

func (b *WallPaperBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for WallPaperBox.

type WallPaperClass

type WallPaperClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

WallPaperClass represents WallPaper generic type.

See https://core.telegram.org/type/WallPaper for reference.

Example:

g, err := DecodeWallPaper(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *WallPaper: // wallPaper#a437c3ed
case *WallPaperNoFile: // wallPaperNoFile#8af40b25
default: panic(v)
}

func DecodeWallPaper

func DecodeWallPaper(buf *bin.Buffer) (WallPaperClass, error)

DecodeWallPaper implements binary de-serialization for WallPaperClass.

type WallPaperClassVector added in v0.8.0

type WallPaperClassVector struct {
	// Elements of Vector<WallPaper>
	Elems []WallPaperClass
}

WallPaperClassVector is a box for Vector<WallPaper>

func (*WallPaperClassVector) Decode added in v0.8.0

func (vec *WallPaperClassVector) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WallPaperClassVector) Encode added in v0.8.0

func (vec *WallPaperClassVector) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WallPaperClassVector) String added in v0.12.0

func (vec *WallPaperClassVector) String() string

String implements fmt.Stringer.

type WallPaperNoFile

type WallPaperNoFile struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Whether this is the default wallpaper
	Default bool
	// Dark mode
	Dark bool
	// Wallpaper settings
	//
	// Use SetSettings and GetSettings helpers.
	Settings WallPaperSettings
}

WallPaperNoFile represents TL type `wallPaperNoFile#8af40b25`. No file wallpaper

See https://core.telegram.org/constructor/wallPaperNoFile for reference.

func (*WallPaperNoFile) Decode

func (w *WallPaperNoFile) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WallPaperNoFile) Encode

func (w *WallPaperNoFile) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WallPaperNoFile) GetSettings

func (w *WallPaperNoFile) GetSettings() (value WallPaperSettings, ok bool)

GetSettings returns value of Settings conditional field and boolean which is true if field was set.

func (*WallPaperNoFile) SetDark

func (w *WallPaperNoFile) SetDark(value bool)

SetDark sets value of Dark conditional field.

func (*WallPaperNoFile) SetDefault

func (w *WallPaperNoFile) SetDefault(value bool)

SetDefault sets value of Default conditional field.

func (*WallPaperNoFile) SetSettings

func (w *WallPaperNoFile) SetSettings(value WallPaperSettings)

SetSettings sets value of Settings conditional field.

func (*WallPaperNoFile) String added in v0.12.0

func (w *WallPaperNoFile) String() string

String implements fmt.Stringer.

type WallPaperSettings

type WallPaperSettings struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// If set, the wallpaper must be downscaled to fit in 450x450 square and then box-blurred with radius 12
	Blur bool
	// If set, the background needs to be slightly moved when device is rotated
	Motion bool
	// If set, a PNG pattern is to be combined with the color chosen by the user: the main color of the background in RGB24 format
	//
	// Use SetBackgroundColor and GetBackgroundColor helpers.
	BackgroundColor int
	// If set, a PNG pattern is to be combined with the first and second background colors (RGB24 format) in a top-bottom gradient
	//
	// Use SetSecondBackgroundColor and GetSecondBackgroundColor helpers.
	SecondBackgroundColor int
	// Intensity of the pattern when it is shown above the main background color, 0-100
	//
	// Use SetIntensity and GetIntensity helpers.
	Intensity int
	// Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45
	//
	// Use SetRotation and GetRotation helpers.
	Rotation int
}

WallPaperSettings represents TL type `wallPaperSettings#5086cf8`. Wallpaper settings

See https://core.telegram.org/constructor/wallPaperSettings for reference.

func (*WallPaperSettings) Decode

func (w *WallPaperSettings) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WallPaperSettings) Encode

func (w *WallPaperSettings) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WallPaperSettings) GetBackgroundColor

func (w *WallPaperSettings) GetBackgroundColor() (value int, ok bool)

GetBackgroundColor returns value of BackgroundColor conditional field and boolean which is true if field was set.

func (*WallPaperSettings) GetIntensity

func (w *WallPaperSettings) GetIntensity() (value int, ok bool)

GetIntensity returns value of Intensity conditional field and boolean which is true if field was set.

func (*WallPaperSettings) GetRotation

func (w *WallPaperSettings) GetRotation() (value int, ok bool)

GetRotation returns value of Rotation conditional field and boolean which is true if field was set.

func (*WallPaperSettings) GetSecondBackgroundColor

func (w *WallPaperSettings) GetSecondBackgroundColor() (value int, ok bool)

GetSecondBackgroundColor returns value of SecondBackgroundColor conditional field and boolean which is true if field was set.

func (*WallPaperSettings) SetBackgroundColor

func (w *WallPaperSettings) SetBackgroundColor(value int)

SetBackgroundColor sets value of BackgroundColor conditional field.

func (*WallPaperSettings) SetBlur

func (w *WallPaperSettings) SetBlur(value bool)

SetBlur sets value of Blur conditional field.

func (*WallPaperSettings) SetIntensity

func (w *WallPaperSettings) SetIntensity(value int)

SetIntensity sets value of Intensity conditional field.

func (*WallPaperSettings) SetMotion

func (w *WallPaperSettings) SetMotion(value bool)

SetMotion sets value of Motion conditional field.

func (*WallPaperSettings) SetRotation

func (w *WallPaperSettings) SetRotation(value int)

SetRotation sets value of Rotation conditional field.

func (*WallPaperSettings) SetSecondBackgroundColor

func (w *WallPaperSettings) SetSecondBackgroundColor(value int)

SetSecondBackgroundColor sets value of SecondBackgroundColor conditional field.

func (*WallPaperSettings) String added in v0.12.0

func (w *WallPaperSettings) String() string

String implements fmt.Stringer.

type WebAuthorization

type WebAuthorization struct {
	// Authorization hash
	Hash int64
	// Bot ID
	BotID int
	// The domain name of the website on which the user has logged in.
	Domain string
	// Browser user-agent
	Browser string
	// Platform
	Platform string
	// When was the web session created
	DateCreated int
	// When was the web session last active
	DateActive int
	// IP address
	IP string
	// Region, determined from IP address
	Region string
}

WebAuthorization represents TL type `webAuthorization#cac943f2`. Represents a bot logged in using the Telegram login widget¹

Links:

  1. https://core.telegram.org/widgets/login

See https://core.telegram.org/constructor/webAuthorization for reference.

func (*WebAuthorization) Decode

func (w *WebAuthorization) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WebAuthorization) Encode

func (w *WebAuthorization) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WebAuthorization) String added in v0.12.0

func (w *WebAuthorization) String() string

String implements fmt.Stringer.

type WebDocument

type WebDocument struct {
	// Document URL
	URL string
	// Access hash
	AccessHash int64
	// File size
	Size int
	// MIME type
	MimeType string
	// Attributes for media types
	Attributes []DocumentAttributeClass
}

WebDocument represents TL type `webDocument#1c570ed1`. Remote document

See https://core.telegram.org/constructor/webDocument for reference.

func (*WebDocument) Decode

func (w *WebDocument) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WebDocument) Encode

func (w *WebDocument) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WebDocument) String added in v0.12.0

func (w *WebDocument) String() string

String implements fmt.Stringer.

type WebDocumentBox

type WebDocumentBox struct {
	WebDocument WebDocumentClass
}

WebDocument boxes the WebDocumentClass providing a helper.

func (*WebDocumentBox) Decode

func (b *WebDocumentBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for WebDocumentBox.

func (*WebDocumentBox) Encode

func (b *WebDocumentBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for WebDocumentBox.

type WebDocumentClass

type WebDocumentClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

WebDocumentClass represents WebDocument generic type.

See https://core.telegram.org/type/WebDocument for reference.

Example:

g, err := DecodeWebDocument(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *WebDocument: // webDocument#1c570ed1
case *WebDocumentNoProxy: // webDocumentNoProxy#f9c8bcc6
default: panic(v)
}

func DecodeWebDocument

func DecodeWebDocument(buf *bin.Buffer) (WebDocumentClass, error)

DecodeWebDocument implements binary de-serialization for WebDocumentClass.

type WebDocumentNoProxy

type WebDocumentNoProxy struct {
	// Document URL
	URL string
	// File size
	Size int
	// MIME type
	MimeType string
	// Attributes for media types
	Attributes []DocumentAttributeClass
}

WebDocumentNoProxy represents TL type `webDocumentNoProxy#f9c8bcc6`. Remote document that can be downloaded without proxying through telegram¹

Links:

  1. https://core.telegram.org/api/files

See https://core.telegram.org/constructor/webDocumentNoProxy for reference.

func (*WebDocumentNoProxy) Decode

func (w *WebDocumentNoProxy) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WebDocumentNoProxy) Encode

func (w *WebDocumentNoProxy) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WebDocumentNoProxy) String added in v0.12.0

func (w *WebDocumentNoProxy) String() string

String implements fmt.Stringer.

type WebPage

type WebPage struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Preview ID
	ID int64
	// URL of previewed webpage
	URL string
	// Webpage URL to be displayed to the user
	DisplayURL string
	// Hash for pagination, for more info click here¹
	//
	// Links:
	//  1) https://core.telegram.org/api/offsets#hash-generation
	Hash int
	// Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else
	//
	// Use SetType and GetType helpers.
	Type string
	// Short name of the site (e.g., Google Docs, App Store)
	//
	// Use SetSiteName and GetSiteName helpers.
	SiteName string
	// Title of the content
	//
	// Use SetTitle and GetTitle helpers.
	Title string
	// Content description
	//
	// Use SetDescription and GetDescription helpers.
	Description string
	// Image representing the content
	//
	// Use SetPhoto and GetPhoto helpers.
	Photo PhotoClass
	// URL to show in the embedded preview
	//
	// Use SetEmbedURL and GetEmbedURL helpers.
	EmbedURL string
	// MIME type of the embedded preview, (e.g., text/html or video/mp4)
	//
	// Use SetEmbedType and GetEmbedType helpers.
	EmbedType string
	// Width of the embedded preview
	//
	// Use SetEmbedWidth and GetEmbedWidth helpers.
	EmbedWidth int
	// Height of the embedded preview
	//
	// Use SetEmbedHeight and GetEmbedHeight helpers.
	EmbedHeight int
	// Duration of the content, in seconds
	//
	// Use SetDuration and GetDuration helpers.
	Duration int
	// Author of the content
	//
	// Use SetAuthor and GetAuthor helpers.
	Author string
	// Preview of the content as a media file
	//
	// Use SetDocument and GetDocument helpers.
	Document DocumentClass
	// Page contents in instant view¹ format
	//
	// Links:
	//  1) https://instantview.telegram.org
	//
	// Use SetCachedPage and GetCachedPage helpers.
	CachedPage Page
	// Webpage attributes
	//
	// Use SetAttributes and GetAttributes helpers.
	Attributes []WebPageAttributeTheme
}

WebPage represents TL type `webPage#e89c45b2`. Webpage preview

See https://core.telegram.org/constructor/webPage for reference.

func (*WebPage) Decode

func (w *WebPage) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WebPage) Encode

func (w *WebPage) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WebPage) GetAttributes

func (w *WebPage) GetAttributes() (value []WebPageAttributeTheme, ok bool)

GetAttributes returns value of Attributes conditional field and boolean which is true if field was set.

func (*WebPage) GetAuthor

func (w *WebPage) GetAuthor() (value string, ok bool)

GetAuthor returns value of Author conditional field and boolean which is true if field was set.

func (*WebPage) GetCachedPage

func (w *WebPage) GetCachedPage() (value Page, ok bool)

GetCachedPage returns value of CachedPage conditional field and boolean which is true if field was set.

func (*WebPage) GetDescription

func (w *WebPage) GetDescription() (value string, ok bool)

GetDescription returns value of Description conditional field and boolean which is true if field was set.

func (*WebPage) GetDocument

func (w *WebPage) GetDocument() (value DocumentClass, ok bool)

GetDocument returns value of Document conditional field and boolean which is true if field was set.

func (*WebPage) GetDuration

func (w *WebPage) GetDuration() (value int, ok bool)

GetDuration returns value of Duration conditional field and boolean which is true if field was set.

func (*WebPage) GetEmbedHeight

func (w *WebPage) GetEmbedHeight() (value int, ok bool)

GetEmbedHeight returns value of EmbedHeight conditional field and boolean which is true if field was set.

func (*WebPage) GetEmbedType

func (w *WebPage) GetEmbedType() (value string, ok bool)

GetEmbedType returns value of EmbedType conditional field and boolean which is true if field was set.

func (*WebPage) GetEmbedURL

func (w *WebPage) GetEmbedURL() (value string, ok bool)

GetEmbedURL returns value of EmbedURL conditional field and boolean which is true if field was set.

func (*WebPage) GetEmbedWidth

func (w *WebPage) GetEmbedWidth() (value int, ok bool)

GetEmbedWidth returns value of EmbedWidth conditional field and boolean which is true if field was set.

func (*WebPage) GetPhoto

func (w *WebPage) GetPhoto() (value PhotoClass, ok bool)

GetPhoto returns value of Photo conditional field and boolean which is true if field was set.

func (*WebPage) GetSiteName

func (w *WebPage) GetSiteName() (value string, ok bool)

GetSiteName returns value of SiteName conditional field and boolean which is true if field was set.

func (*WebPage) GetTitle

func (w *WebPage) GetTitle() (value string, ok bool)

GetTitle returns value of Title conditional field and boolean which is true if field was set.

func (*WebPage) GetType

func (w *WebPage) GetType() (value string, ok bool)

GetType returns value of Type conditional field and boolean which is true if field was set.

func (*WebPage) SetAttributes

func (w *WebPage) SetAttributes(value []WebPageAttributeTheme)

SetAttributes sets value of Attributes conditional field.

func (*WebPage) SetAuthor

func (w *WebPage) SetAuthor(value string)

SetAuthor sets value of Author conditional field.

func (*WebPage) SetCachedPage

func (w *WebPage) SetCachedPage(value Page)

SetCachedPage sets value of CachedPage conditional field.

func (*WebPage) SetDescription

func (w *WebPage) SetDescription(value string)

SetDescription sets value of Description conditional field.

func (*WebPage) SetDocument

func (w *WebPage) SetDocument(value DocumentClass)

SetDocument sets value of Document conditional field.

func (*WebPage) SetDuration

func (w *WebPage) SetDuration(value int)

SetDuration sets value of Duration conditional field.

func (*WebPage) SetEmbedHeight

func (w *WebPage) SetEmbedHeight(value int)

SetEmbedHeight sets value of EmbedHeight conditional field.

func (*WebPage) SetEmbedType

func (w *WebPage) SetEmbedType(value string)

SetEmbedType sets value of EmbedType conditional field.

func (*WebPage) SetEmbedURL

func (w *WebPage) SetEmbedURL(value string)

SetEmbedURL sets value of EmbedURL conditional field.

func (*WebPage) SetEmbedWidth

func (w *WebPage) SetEmbedWidth(value int)

SetEmbedWidth sets value of EmbedWidth conditional field.

func (*WebPage) SetPhoto

func (w *WebPage) SetPhoto(value PhotoClass)

SetPhoto sets value of Photo conditional field.

func (*WebPage) SetSiteName

func (w *WebPage) SetSiteName(value string)

SetSiteName sets value of SiteName conditional field.

func (*WebPage) SetTitle

func (w *WebPage) SetTitle(value string)

SetTitle sets value of Title conditional field.

func (*WebPage) SetType

func (w *WebPage) SetType(value string)

SetType sets value of Type conditional field.

func (*WebPage) String added in v0.12.0

func (w *WebPage) String() string

String implements fmt.Stringer.

type WebPageAttributeTheme

type WebPageAttributeTheme struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Theme files
	//
	// Use SetDocuments and GetDocuments helpers.
	Documents []DocumentClass
	// Theme settings
	//
	// Use SetSettings and GetSettings helpers.
	Settings ThemeSettings
}

WebPageAttributeTheme represents TL type `webPageAttributeTheme#54b56617`. Page theme

See https://core.telegram.org/constructor/webPageAttributeTheme for reference.

func (*WebPageAttributeTheme) Decode

func (w *WebPageAttributeTheme) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WebPageAttributeTheme) Encode

func (w *WebPageAttributeTheme) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WebPageAttributeTheme) GetDocuments

func (w *WebPageAttributeTheme) GetDocuments() (value []DocumentClass, ok bool)

GetDocuments returns value of Documents conditional field and boolean which is true if field was set.

func (*WebPageAttributeTheme) GetSettings

func (w *WebPageAttributeTheme) GetSettings() (value ThemeSettings, ok bool)

GetSettings returns value of Settings conditional field and boolean which is true if field was set.

func (*WebPageAttributeTheme) SetDocuments

func (w *WebPageAttributeTheme) SetDocuments(value []DocumentClass)

SetDocuments sets value of Documents conditional field.

func (*WebPageAttributeTheme) SetSettings

func (w *WebPageAttributeTheme) SetSettings(value ThemeSettings)

SetSettings sets value of Settings conditional field.

func (*WebPageAttributeTheme) String added in v0.12.0

func (w *WebPageAttributeTheme) String() string

String implements fmt.Stringer.

type WebPageBox

type WebPageBox struct {
	WebPage WebPageClass
}

WebPage boxes the WebPageClass providing a helper.

func (*WebPageBox) Decode

func (b *WebPageBox) Decode(buf *bin.Buffer) error

Decode implements bin.Decoder for WebPageBox.

func (*WebPageBox) Encode

func (b *WebPageBox) Encode(buf *bin.Buffer) error

Encode implements bin.Encode for WebPageBox.

type WebPageClass

type WebPageClass interface {
	bin.Encoder
	bin.Decoder

	fmt.Stringer
	// contains filtered or unexported methods
}

WebPageClass represents WebPage generic type.

See https://core.telegram.org/type/WebPage for reference.

Example:

g, err := DecodeWebPage(buf)
if err != nil {
    panic(err)
}
switch v := g.(type) {
case *WebPageEmpty: // webPageEmpty#eb1477e8
case *WebPagePending: // webPagePending#c586da1c
case *WebPage: // webPage#e89c45b2
case *WebPageNotModified: // webPageNotModified#7311ca11
default: panic(v)
}

func DecodeWebPage

func DecodeWebPage(buf *bin.Buffer) (WebPageClass, error)

DecodeWebPage implements binary de-serialization for WebPageClass.

type WebPageEmpty

type WebPageEmpty struct {
	// Preview ID
	ID int64
}

WebPageEmpty represents TL type `webPageEmpty#eb1477e8`. No preview is available for the webpage

See https://core.telegram.org/constructor/webPageEmpty for reference.

func (*WebPageEmpty) Decode

func (w *WebPageEmpty) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WebPageEmpty) Encode

func (w *WebPageEmpty) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WebPageEmpty) String added in v0.12.0

func (w *WebPageEmpty) String() string

String implements fmt.Stringer.

type WebPageHandler added in v0.9.0

type WebPageHandler func(ctx UpdateContext, update *UpdateWebPage) error

WebPageHandler is a WebPage event handler.

type WebPageNotModified

type WebPageNotModified struct {
	// Flags, see TL conditional fields¹
	//
	// Links:
	//  1) https://core.telegram.org/mtproto/TL-combinators#conditional-fields
	Flags bin.Fields
	// Page view count
	//
	// Use SetCachedPageViews and GetCachedPageViews helpers.
	CachedPageViews int
}

WebPageNotModified represents TL type `webPageNotModified#7311ca11`. The preview of the webpage hasn't changed

See https://core.telegram.org/constructor/webPageNotModified for reference.

func (*WebPageNotModified) Decode

func (w *WebPageNotModified) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WebPageNotModified) Encode

func (w *WebPageNotModified) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WebPageNotModified) GetCachedPageViews

func (w *WebPageNotModified) GetCachedPageViews() (value int, ok bool)

GetCachedPageViews returns value of CachedPageViews conditional field and boolean which is true if field was set.

func (*WebPageNotModified) SetCachedPageViews

func (w *WebPageNotModified) SetCachedPageViews(value int)

SetCachedPageViews sets value of CachedPageViews conditional field.

func (*WebPageNotModified) String added in v0.12.0

func (w *WebPageNotModified) String() string

String implements fmt.Stringer.

type WebPagePending

type WebPagePending struct {
	// ID of preview
	ID int64
	// When was the processing started
	Date int
}

WebPagePending represents TL type `webPagePending#c586da1c`. A preview of the webpage is currently being generated

See https://core.telegram.org/constructor/webPagePending for reference.

func (*WebPagePending) Decode

func (w *WebPagePending) Decode(b *bin.Buffer) error

Decode implements bin.Decoder.

func (*WebPagePending) Encode

func (w *WebPagePending) Encode(b *bin.Buffer) error

Encode implements bin.Encoder.

func (*WebPagePending) String added in v0.12.0

func (w *WebPagePending) String() string

String implements fmt.Stringer.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL