Documentation
¶
Index ¶
- func SetFilePath(path string)
- func SetLogVerbosityLevel(level int)
- type Client
- func (client *Client) AcceptCall(callID int32, protocol *tdlib.CallProtocol) (*tdlib.Ok, error)
- func (client *Client) AcceptTermsOfService(termsOfServiceID string) (*tdlib.Ok, error)
- func (client *Client) AddChatMember(chatID int64, userID int64, forwardLimit int32) (*tdlib.Ok, error)
- func (client *Client) AddChatMembers(chatID int64, userIDs []int64) (*tdlib.Ok, error)
- func (client *Client) AddChatToList(chatID int64, chatList tdlib.ChatList) (*tdlib.Ok, error)
- func (client *Client) AddContact(contact *tdlib.Contact, sharePhoneNumber bool) (*tdlib.Ok, error)
- func (client *Client) AddCustomServerLanguagePack(languagePackID string) (*tdlib.Ok, error)
- func (client *Client) AddEventReceiver(msgInstance tdlib.TdMessage, filterFunc EventFilterFunc, channelCapacity int) EventReceiver
- func (client *Client) AddFavoriteSticker(sticker tdlib.InputFile) (*tdlib.Ok, error)
- func (client *Client) AddLocalMessage(chatID int64, sender tdlib.MessageSender, replyToMessageID int64, ...) (*tdlib.Message, error)
- func (client *Client) AddLogMessage(verbosityLevel int32, text string) (*tdlib.Ok, error)
- func (client *Client) AddNetworkStatistics(entry tdlib.NetworkStatisticsEntry) (*tdlib.Ok, error)
- func (client *Client) AddProxy(server string, port int32, enable bool, typeParam tdlib.ProxyType) (*tdlib.Proxy, error)
- func (client *Client) AddRecentSticker(isAttached bool, sticker tdlib.InputFile) (*tdlib.Stickers, error)
- func (client *Client) AddRecentlyFoundChat(chatID int64) (*tdlib.Ok, error)
- func (client *Client) AddSavedAnimation(animation tdlib.InputFile) (*tdlib.Ok, error)
- func (client *Client) AddStickerToSet(userID int64, name string, sticker tdlib.InputSticker) (*tdlib.StickerSet, error)
- func (client *Client) AnswerCallbackQuery(callbackQueryID *tdlib.JSONInt64, text string, showAlert bool, uRL string, ...) (*tdlib.Ok, error)
- func (client *Client) AnswerCustomQuery(customQueryID *tdlib.JSONInt64, data string) (*tdlib.Ok, error)
- func (client *Client) AnswerInlineQuery(inlineQueryID *tdlib.JSONInt64, isPersonal bool, ...) (*tdlib.Ok, error)
- func (client *Client) AnswerPreCheckoutQuery(preCheckoutQueryID *tdlib.JSONInt64, errorMessage string) (*tdlib.Ok, error)
- func (client *Client) AnswerShippingQuery(shippingQueryID *tdlib.JSONInt64, shippingOptions []tdlib.ShippingOption, ...) (*tdlib.Ok, error)
- func (client *Client) Authorize() (tdlib.AuthorizationState, error)
- func (client *Client) BanChatMember(chatID int64, memberID tdlib.MessageSender, bannedUntilDate int32, ...) (*tdlib.Ok, error)
- func (client *Client) BlockMessageSenderFromReplies(messageID int64, deleteMessage bool, deleteAllMessages bool, reportSpam bool) (*tdlib.Ok, error)
- func (client *Client) CanTransferOwnership() (tdlib.CanTransferOwnershipResult, error)
- func (client *Client) CancelDownloadFile(fileID int32, onlyIfPending bool) (*tdlib.Ok, error)
- func (client *Client) CancelPasswordReset() (*tdlib.Ok, error)
- func (client *Client) CancelUploadFile(fileID int32) (*tdlib.Ok, error)
- func (client *Client) ChangeImportedContacts(contacts []tdlib.Contact) (*tdlib.ImportedContacts, error)
- func (client *Client) ChangePhoneNumber(phoneNumber string, settings *tdlib.PhoneNumberAuthenticationSettings) (*tdlib.AuthenticationCodeInfo, error)
- func (client *Client) ChangeStickerSet(setID *tdlib.JSONInt64, isInstalled bool, isArchived bool) (*tdlib.Ok, error)
- func (client *Client) CheckAuthenticationBotToken(token string) (*tdlib.Ok, error)
- func (client *Client) CheckAuthenticationCode(code string) (*tdlib.Ok, error)
- func (client *Client) CheckAuthenticationPassword(password string) (*tdlib.Ok, error)
- func (client *Client) CheckAuthenticationPasswordRecoveryCode(recoveryCode string) (*tdlib.Ok, error)
- func (client *Client) CheckChangePhoneNumberCode(code string) (*tdlib.Ok, error)
- func (client *Client) CheckChatInviteLink(inviteLink string) (*tdlib.ChatInviteLinkInfo, error)
- func (client *Client) CheckChatUsername(chatID int64, username string) (tdlib.CheckChatUsernameResult, error)
- func (client *Client) CheckCreatedPublicChatsLimit(typeParam tdlib.PublicChatType) (*tdlib.Ok, error)
- func (client *Client) CheckDatabaseEncryptionKey(encryptionKey []byte) (*tdlib.Ok, error)
- func (client *Client) CheckEmailAddressVerificationCode(code string) (*tdlib.Ok, error)
- func (client *Client) CheckPasswordRecoveryCode(recoveryCode string) (*tdlib.Ok, error)
- func (client *Client) CheckPhoneNumberConfirmationCode(code string) (*tdlib.Ok, error)
- func (client *Client) CheckPhoneNumberVerificationCode(code string) (*tdlib.Ok, error)
- func (client *Client) CheckRecoveryEmailAddressCode(code string) (*tdlib.PasswordState, error)
- func (client *Client) CheckStickerSetName(name string) (tdlib.CheckStickerSetNameResult, error)
- func (client *Client) CleanFileName(fileName string) (*tdlib.Text, error)
- func (client *Client) ClearAllDraftMessages(excludeSecretChats bool) (*tdlib.Ok, error)
- func (client *Client) ClearImportedContacts() (*tdlib.Ok, error)
- func (client *Client) ClearRecentStickers(isAttached bool) (*tdlib.Ok, error)
- func (client *Client) ClearRecentlyFoundChats() (*tdlib.Ok, error)
- func (client *Client) Close() (*tdlib.Ok, error)
- func (client *Client) CloseChat(chatID int64) (*tdlib.Ok, error)
- func (client *Client) CloseSecretChat(secretChatID int32) (*tdlib.Ok, error)
- func (client *Client) ConfirmQrCodeAuthentication(link string) (*tdlib.Session, error)
- func (client *Client) CreateBasicGroupChat(basicGroupID int64, force bool) (*tdlib.Chat, error)
- func (client *Client) CreateCall(userID int64, protocol *tdlib.CallProtocol, isVideo bool) (*tdlib.CallID, error)
- func (client *Client) CreateChatFilter(filter *tdlib.ChatFilter) (*tdlib.ChatFilterInfo, error)
- func (client *Client) CreateChatInviteLink(chatID int64, expireDate int32, memberLimit int32) (*tdlib.ChatInviteLink, error)
- func (client *Client) CreateNewBasicGroupChat(userIDs []int64, title string) (*tdlib.Chat, error)
- func (client *Client) CreateNewSecretChat(userID int64) (*tdlib.Chat, error)
- func (client *Client) CreateNewStickerSet(userID int64, title string, name string, isMasks bool, ...) (*tdlib.StickerSet, error)
- func (client *Client) CreateNewSupergroupChat(title string, isChannel bool, description string, location *tdlib.ChatLocation, ...) (*tdlib.Chat, error)
- func (client *Client) CreatePrivateChat(userID int64, force bool) (*tdlib.Chat, error)
- func (client *Client) CreateSecretChat(secretChatID int32) (*tdlib.Chat, error)
- func (client *Client) CreateSupergroupChat(supergroupID int64, force bool) (*tdlib.Chat, error)
- func (client *Client) CreateTemporaryPassword(password string, validFor int32) (*tdlib.TemporaryPasswordState, error)
- func (client *Client) CreateVoiceChat(chatID int64, title string, startDate int32) (*tdlib.GroupCallID, error)
- func (client *Client) DeleteAccount(reason string) (*tdlib.Ok, error)
- func (client *Client) DeleteAllCallMessages(revoke bool) (*tdlib.Ok, error)
- func (client *Client) DeleteAllRevokedChatInviteLinks(chatID int64, creatorUserID int64) (*tdlib.Ok, error)
- func (client *Client) DeleteChat(chatID int64) (*tdlib.Ok, error)
- func (client *Client) DeleteChatFilter(chatFilterID int32) (*tdlib.Ok, error)
- func (client *Client) DeleteChatHistory(chatID int64, removeFromChatList bool, revoke bool) (*tdlib.Ok, error)
- func (client *Client) DeleteChatMessagesFromUser(chatID int64, userID int64) (*tdlib.Ok, error)
- func (client *Client) DeleteChatReplyMarkup(chatID int64, messageID int64) (*tdlib.Ok, error)
- func (client *Client) DeleteCommands(scope tdlib.BotCommandScope, languageCode string) (*tdlib.Ok, error)
- func (client *Client) DeleteFile(fileID int32) (*tdlib.Ok, error)
- func (client *Client) DeleteLanguagePack(languagePackID string) (*tdlib.Ok, error)
- func (client *Client) DeleteMessages(chatID int64, messageIDs []int64, revoke bool) (*tdlib.Ok, error)
- func (client *Client) DeletePassportElement(typeParam tdlib.PassportElementType) (*tdlib.Ok, error)
- func (client *Client) DeleteProfilePhoto(profilePhotoID *tdlib.JSONInt64) (*tdlib.Ok, error)
- func (client *Client) DeleteRevokedChatInviteLink(chatID int64, inviteLink string) (*tdlib.Ok, error)
- func (client *Client) DeleteSavedCredentials() (*tdlib.Ok, error)
- func (client *Client) DeleteSavedOrderInfo() (*tdlib.Ok, error)
- func (client *Client) Destroy() (*tdlib.Ok, error)
- func (client *Client) DestroyInstance()
- func (client *Client) DisableProxy() (*tdlib.Ok, error)
- func (client *Client) DiscardCall(callID int32, isDisconnected bool, duration int32, isVideo bool, ...) (*tdlib.Ok, error)
- func (client *Client) DiscardGroupCall(groupCallID int32) (*tdlib.Ok, error)
- func (client *Client) DisconnectAllWebsites() (*tdlib.Ok, error)
- func (client *Client) DisconnectWebsite(websiteID *tdlib.JSONInt64) (*tdlib.Ok, error)
- func (client *Client) DownloadFile(fileID int32, priority int32, offset int32, limit int32, synchronous bool) (*tdlib.File, error)
- func (client *Client) EditChatFilter(chatFilterID int32, filter *tdlib.ChatFilter) (*tdlib.ChatFilterInfo, error)
- func (client *Client) EditChatInviteLink(chatID int64, inviteLink string, expireDate int32, memberLimit int32) (*tdlib.ChatInviteLink, error)
- func (client *Client) EditCustomLanguagePackInfo(info *tdlib.LanguagePackInfo) (*tdlib.Ok, error)
- func (client *Client) EditInlineMessageCaption(inlineMessageID string, replyMarkup tdlib.ReplyMarkup, ...) (*tdlib.Ok, error)
- func (client *Client) EditInlineMessageLiveLocation(inlineMessageID string, replyMarkup tdlib.ReplyMarkup, ...) (*tdlib.Ok, error)
- func (client *Client) EditInlineMessageMedia(inlineMessageID string, replyMarkup tdlib.ReplyMarkup, ...) (*tdlib.Ok, error)
- func (client *Client) EditInlineMessageReplyMarkup(inlineMessageID string, replyMarkup tdlib.ReplyMarkup) (*tdlib.Ok, error)
- func (client *Client) EditInlineMessageText(inlineMessageID string, replyMarkup tdlib.ReplyMarkup, ...) (*tdlib.Ok, error)
- func (client *Client) EditMessageCaption(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup, ...) (*tdlib.Message, error)
- func (client *Client) EditMessageLiveLocation(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup, ...) (*tdlib.Message, error)
- func (client *Client) EditMessageMedia(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup, ...) (*tdlib.Message, error)
- func (client *Client) EditMessageReplyMarkup(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup) (*tdlib.Message, error)
- func (client *Client) EditMessageSchedulingState(chatID int64, messageID int64, schedulingState tdlib.MessageSchedulingState) (*tdlib.Ok, error)
- func (client *Client) EditMessageText(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup, ...) (*tdlib.Message, error)
- func (client *Client) EditProxy(proxyID int32, server string, port int32, enable bool, ...) (*tdlib.Proxy, error)
- func (client *Client) EnableProxy(proxyID int32) (*tdlib.Ok, error)
- func (client *Client) EndGroupCallRecording(groupCallID int32) (*tdlib.Ok, error)
- func (client *Client) EndGroupCallScreenSharing(groupCallID int32) (*tdlib.Ok, error)
- func (client *Client) Execute(jsonQuery interface{}) tdlib.UpdateMsg
- func (client *Client) FinishFileGeneration(generationID *tdlib.JSONInt64, error *tdlib.Error) (*tdlib.Ok, error)
- func (client *Client) ForwardMessages(chatID int64, fromChatID int64, messageIDs []int64, ...) (*tdlib.Messages, error)
- func (client *Client) GetAccountTTL() (*tdlib.AccountTTL, error)
- func (client *Client) GetActiveLiveLocationMessages() (*tdlib.Messages, error)
- func (client *Client) GetActiveSessions() (*tdlib.Sessions, error)
- func (client *Client) GetAllPassportElements(password string) (*tdlib.PassportElements, error)
- func (client *Client) GetApplicationConfig() (tdlib.JsonValue, error)
- func (client *Client) GetApplicationDownloadLink() (*tdlib.HttpURL, error)
- func (client *Client) GetArchivedStickerSets(isMasks bool, offsetStickerSetID *tdlib.JSONInt64, limit int32) (*tdlib.StickerSets, error)
- func (client *Client) GetAttachedStickerSets(fileID int32) (*tdlib.StickerSets, error)
- func (client *Client) GetAuthorizationState() (tdlib.AuthorizationState, error)
- func (client *Client) GetAutoDownloadSettingsPresets() (*tdlib.AutoDownloadSettingsPresets, error)
- func (client *Client) GetBackgroundURL(name string, typeParam tdlib.BackgroundType) (*tdlib.HttpURL, error)
- func (client *Client) GetBackgrounds(forDarkTheme bool) (*tdlib.Backgrounds, error)
- func (client *Client) GetBankCardInfo(bankCardNumber string) (*tdlib.BankCardInfo, error)
- func (client *Client) GetBasicGroup(basicGroupID int64) (*tdlib.BasicGroup, error)
- func (client *Client) GetBasicGroupFullInfo(basicGroupID int64) (*tdlib.BasicGroupFullInfo, error)
- func (client *Client) GetBlockedMessageSenders(offset int32, limit int32) (*tdlib.MessageSenders, error)
- func (client *Client) GetCallbackQueryAnswer(chatID int64, messageID int64, payload tdlib.CallbackQueryPayload) (*tdlib.CallbackQueryAnswer, error)
- func (client *Client) GetCallbackQueryMessage(chatID int64, messageID int64, callbackQueryID *tdlib.JSONInt64) (*tdlib.Message, error)
- func (client *Client) GetChat(chatID int64) (*tdlib.Chat, error)
- func (client *Client) GetChatAdministrators(chatID int64) (*tdlib.ChatAdministrators, error)
- func (client *Client) GetChatEventLog(chatID int64, query string, fromEventID *tdlib.JSONInt64, limit int32, ...) (*tdlib.ChatEvents, error)
- func (client *Client) GetChatFilter(chatFilterID int32) (*tdlib.ChatFilter, error)
- func (client *Client) GetChatFilterDefaultIconName(filter *tdlib.ChatFilter) (*tdlib.Text, error)
- func (client *Client) GetChatHistory(chatID int64, fromMessageID int64, offset int32, limit int32, onlyLocal bool) (*tdlib.Messages, error)
- func (client *Client) GetChatInviteLink(chatID int64, inviteLink string) (*tdlib.ChatInviteLink, error)
- func (client *Client) GetChatInviteLinkCounts(chatID int64) (*tdlib.ChatInviteLinkCounts, error)
- func (client *Client) GetChatInviteLinkMembers(chatID int64, inviteLink string, offsetMember *tdlib.ChatInviteLinkMember, ...) (*tdlib.ChatInviteLinkMembers, error)
- func (client *Client) GetChatInviteLinks(chatID int64, creatorUserID int64, isRevoked bool, offsetDate int32, ...) (*tdlib.ChatInviteLinks, error)
- func (client *Client) GetChatListsToAddChat(chatID int64) (*tdlib.ChatLists, error)
- func (client *Client) GetChatMember(chatID int64, memberID tdlib.MessageSender) (*tdlib.ChatMember, error)
- func (client *Client) GetChatMessageByDate(chatID int64, date int32) (*tdlib.Message, error)
- func (client *Client) GetChatMessageCount(chatID int64, filter tdlib.SearchMessagesFilter, returnLocal bool) (*tdlib.Count, error)
- func (client *Client) GetChatNotificationSettingsExceptions(scope tdlib.NotificationSettingsScope, compareSound bool) (*tdlib.Chats, error)
- func (client *Client) GetChatPinnedMessage(chatID int64) (*tdlib.Message, error)
- func (client *Client) GetChatScheduledMessages(chatID int64) (*tdlib.Messages, error)
- func (client *Client) GetChatSponsoredMessages(chatID int64) (*tdlib.SponsoredMessages, error)
- func (client *Client) GetChatStatistics(chatID int64, isDark bool) (tdlib.ChatStatistics, error)
- func (client *Client) GetChatStatisticsURL(chatID int64, parameters string, isDark bool) (*tdlib.HttpURL, error)
- func (client *Client) GetChats(chatList tdlib.ChatList, limit int32) (*tdlib.Chats, error)
- func (client *Client) GetCommands(scope tdlib.BotCommandScope, languageCode string) (*tdlib.BotCommands, error)
- func (client *Client) GetConnectedWebsites() (*tdlib.ConnectedWebsites, error)
- func (client *Client) GetContacts() (*tdlib.Users, error)
- func (client *Client) GetCountries() (*tdlib.Countries, error)
- func (client *Client) GetCountryCode() (*tdlib.Text, error)
- func (client *Client) GetCreatedPublicChats(typeParam tdlib.PublicChatType) (*tdlib.Chats, error)
- func (client *Client) GetCurrentState() (*tdlib.Updates, error)
- func (client *Client) GetDatabaseStatistics() (*tdlib.DatabaseStatistics, error)
- func (client *Client) GetDeepLinkInfo(link string) (*tdlib.DeepLinkInfo, error)
- func (client *Client) GetEmojiSuggestionsURL(languageCode string) (*tdlib.HttpURL, error)
- func (client *Client) GetExternalLink(link string, allowWriteAccess bool) (*tdlib.HttpURL, error)
- func (client *Client) GetExternalLinkInfo(link string) (tdlib.LoginURLInfo, error)
- func (client *Client) GetFavoriteStickers() (*tdlib.Stickers, error)
- func (client *Client) GetFile(fileID int32) (*tdlib.File, error)
- func (client *Client) GetFileDownloadedPrefixSize(fileID int32, offset int32) (*tdlib.Count, error)
- func (client *Client) GetFileExtension(mimeType string) (*tdlib.Text, error)
- func (client *Client) GetFileMimeType(fileName string) (*tdlib.Text, error)
- func (client *Client) GetGameHighScores(chatID int64, messageID int64, userID int64) (*tdlib.GameHighScores, error)
- func (client *Client) GetGroupCall(groupCallID int32) (*tdlib.GroupCall, error)
- func (client *Client) GetGroupCallInviteLink(groupCallID int32, canSelfUnmute bool) (*tdlib.HttpURL, error)
- func (client *Client) GetGroupCallStreamSegment(groupCallID int32, timeOffset int64, scale int32, channelID int32, ...) (*tdlib.FilePart, error)
- func (client *Client) GetGroupsInCommon(userID int64, offsetChatID int64, limit int32) (*tdlib.Chats, error)
- func (client *Client) GetImportedContactCount() (*tdlib.Count, error)
- func (client *Client) GetInactiveSupergroupChats() (*tdlib.Chats, error)
- func (client *Client) GetInlineGameHighScores(inlineMessageID string, userID int64) (*tdlib.GameHighScores, error)
- func (client *Client) GetInlineQueryResults(botUserID int64, chatID int64, userLocation *tdlib.Location, query string, ...) (*tdlib.InlineQueryResults, error)
- func (client *Client) GetInstalledStickerSets(isMasks bool) (*tdlib.StickerSets, error)
- func (client *Client) GetInternalLinkType(link string) (tdlib.InternalLinkType, error)
- func (client *Client) GetJsonString(jsonStringValue tdlib.JsonValue) (*tdlib.Text, error)
- func (client *Client) GetJsonValue(jsonString string) (tdlib.JsonValue, error)
- func (client *Client) GetLanguagePackInfo(languagePackID string) (*tdlib.LanguagePackInfo, error)
- func (client *Client) GetLanguagePackString(languagePackDatabasePath string, localizationTarget string, ...) (tdlib.LanguagePackStringValue, error)
- func (client *Client) GetLanguagePackStrings(languagePackID string, keys []string) (*tdlib.LanguagePackStrings, error)
- func (client *Client) GetLocalizationTargetInfo(onlyLocal bool) (*tdlib.LocalizationTargetInfo, error)
- func (client *Client) GetLogStream() (tdlib.LogStream, error)
- func (client *Client) GetLogTagVerbosityLevel(tag string) (*tdlib.LogVerbosityLevel, error)
- func (client *Client) GetLogTags() (*tdlib.LogTags, error)
- func (client *Client) GetLogVerbosityLevel() (*tdlib.LogVerbosityLevel, error)
- func (client *Client) GetLoginURL(chatID int64, messageID int64, buttonID int64, allowWriteAccess bool) (*tdlib.HttpURL, error)
- func (client *Client) GetLoginURLInfo(chatID int64, messageID int64, buttonID int64) (tdlib.LoginURLInfo, error)
- func (client *Client) GetMapThumbnailFile(location *tdlib.Location, zoom int32, width int32, height int32, scale int32, ...) (*tdlib.File, error)
- func (client *Client) GetMarkdownText(text *tdlib.FormattedText) (*tdlib.FormattedText, error)
- func (client *Client) GetMe() (*tdlib.User, error)
- func (client *Client) GetMessage(chatID int64, messageID int64) (*tdlib.Message, error)
- func (client *Client) GetMessageEmbeddingCode(chatID int64, messageID int64, forAlbum bool) (*tdlib.Text, error)
- func (client *Client) GetMessageFileType(messageFileHead string) (tdlib.MessageFileType, error)
- func (client *Client) GetMessageImportConfirmationText(chatID int64) (*tdlib.Text, error)
- func (client *Client) GetMessageLink(chatID int64, messageID int64, mediaTimestamp int32, forAlbum bool, ...) (*tdlib.MessageLink, error)
- func (client *Client) GetMessageLinkInfo(uRL string) (*tdlib.MessageLinkInfo, error)
- func (client *Client) GetMessageLocally(chatID int64, messageID int64) (*tdlib.Message, error)
- func (client *Client) GetMessagePublicForwards(chatID int64, messageID int64, offset string, limit int32) (*tdlib.FoundMessages, error)
- func (client *Client) GetMessageStatistics(chatID int64, messageID int64, isDark bool) (*tdlib.MessageStatistics, error)
- func (client *Client) GetMessageThread(chatID int64, messageID int64) (*tdlib.MessageThreadInfo, error)
- func (client *Client) GetMessageThreadHistory(chatID int64, messageID int64, fromMessageID int64, offset int32, limit int32) (*tdlib.Messages, error)
- func (client *Client) GetMessages(chatID int64, messageIDs []int64) (*tdlib.Messages, error)
- func (client *Client) GetNetworkStatistics(onlyCurrent bool) (*tdlib.NetworkStatistics, error)
- func (client *Client) GetOption(name string) (tdlib.OptionValue, error)
- func (client *Client) GetPassportAuthorizationForm(botUserID int64, scope string, publicKey string, nonce string) (*tdlib.PassportAuthorizationForm, error)
- func (client *Client) GetPassportAuthorizationFormAvailableElements(autorizationFormID int32, password string) (*tdlib.PassportElementsWithErrors, error)
- func (client *Client) GetPassportElement(typeParam tdlib.PassportElementType, password string) (tdlib.PassportElement, error)
- func (client *Client) GetPasswordState() (*tdlib.PasswordState, error)
- func (client *Client) GetPaymentForm(chatID int64, messageID int64, theme *tdlib.PaymentFormTheme) (*tdlib.PaymentForm, error)
- func (client *Client) GetPaymentReceipt(chatID int64, messageID int64) (*tdlib.PaymentReceipt, error)
- func (client *Client) GetPhoneNumberInfo(phoneNumberPrefix string) (*tdlib.PhoneNumberInfo, error)
- func (client *Client) GetPhoneNumberInfoSync(languageCode string, phoneNumberPrefix string) (*tdlib.PhoneNumberInfo, error)
- func (client *Client) GetPollVoters(chatID int64, messageID int64, optionID int32, offset int32, limit int32) (*tdlib.Users, error)
- func (client *Client) GetPreferredCountryLanguage(countryCode string) (*tdlib.Text, error)
- func (client *Client) GetProxies() (*tdlib.Proxies, error)
- func (client *Client) GetProxyLink(proxyID int32) (*tdlib.HttpURL, error)
- func (client *Client) GetPushReceiverID(payload string) (*tdlib.PushReceiverID, error)
- func (client *Client) GetRawUpdatesChannel(capacity int) chan tdlib.UpdateMsg
- func (client *Client) GetRecentInlineBots() (*tdlib.Users, error)
- func (client *Client) GetRecentStickers(isAttached bool) (*tdlib.Stickers, error)
- func (client *Client) GetRecentlyOpenedChats(limit int32) (*tdlib.Chats, error)
- func (client *Client) GetRecentlyVisitedTMeURLs(referrer string) (*tdlib.TMeURLs, error)
- func (client *Client) GetRecommendedChatFilters() (*tdlib.RecommendedChatFilters, error)
- func (client *Client) GetRecoveryEmailAddress(password string) (*tdlib.RecoveryEmailAddress, error)
- func (client *Client) GetRemoteFile(remoteFileID string, fileType tdlib.FileType) (*tdlib.File, error)
- func (client *Client) GetRepliedMessage(chatID int64, messageID int64) (*tdlib.Message, error)
- func (client *Client) GetSavedAnimations() (*tdlib.Animations, error)
- func (client *Client) GetSavedOrderInfo() (*tdlib.OrderInfo, error)
- func (client *Client) GetScopeNotificationSettings(scope tdlib.NotificationSettingsScope) (*tdlib.ScopeNotificationSettings, error)
- func (client *Client) GetSecretChat(secretChatID int32) (*tdlib.SecretChat, error)
- func (client *Client) GetStatisticalGraph(chatID int64, token string, x int64) (tdlib.StatisticalGraph, error)
- func (client *Client) GetStickerEmojis(sticker tdlib.InputFile) (*tdlib.Emojis, error)
- func (client *Client) GetStickerSet(setID *tdlib.JSONInt64) (*tdlib.StickerSet, error)
- func (client *Client) GetStickers(emoji string, limit int32) (*tdlib.Stickers, error)
- func (client *Client) GetStorageStatistics(chatLimit int32) (*tdlib.StorageStatistics, error)
- func (client *Client) GetStorageStatisticsFast() (*tdlib.StorageStatisticsFast, error)
- func (client *Client) GetSuggestedFileName(fileID int32, directory string) (*tdlib.Text, error)
- func (client *Client) GetSuggestedStickerSetName(title string) (*tdlib.Text, error)
- func (client *Client) GetSuitableDiscussionChats() (*tdlib.Chats, error)
- func (client *Client) GetSupergroup(supergroupID int64) (*tdlib.Supergroup, error)
- func (client *Client) GetSupergroupFullInfo(supergroupID int64) (*tdlib.SupergroupFullInfo, error)
- func (client *Client) GetSupergroupMembers(supergroupID int64, filter tdlib.SupergroupMembersFilter, offset int32, ...) (*tdlib.ChatMembers, error)
- func (client *Client) GetSupportUser() (*tdlib.User, error)
- func (client *Client) GetTemporaryPasswordState() (*tdlib.TemporaryPasswordState, error)
- func (client *Client) GetTextEntities(text string) (*tdlib.TextEntities, error)
- func (client *Client) GetTopChats(category tdlib.TopChatCategory, limit int32) (*tdlib.Chats, error)
- func (client *Client) GetTrendingStickerSets(offset int32, limit int32) (*tdlib.StickerSets, error)
- func (client *Client) GetUser(userID int64) (*tdlib.User, error)
- func (client *Client) GetUserFullInfo(userID int64) (*tdlib.UserFullInfo, error)
- func (client *Client) GetUserPrivacySettingRules(setting tdlib.UserPrivacySetting) (*tdlib.UserPrivacySettingRules, error)
- func (client *Client) GetUserProfilePhotos(userID int64, offset int32, limit int32) (*tdlib.ChatPhotos, error)
- func (client *Client) GetVoiceChatAvailableParticipants(chatID int64) (*tdlib.MessageSenders, error)
- func (client *Client) GetWebPageInstantView(uRL string, forceFull bool) (*tdlib.WebPageInstantView, error)
- func (client *Client) GetWebPagePreview(text *tdlib.FormattedText) (*tdlib.WebPage, error)
- func (client *Client) HideSuggestedAction(action tdlib.SuggestedAction) (*tdlib.Ok, error)
- func (client *Client) ImportContacts(contacts []tdlib.Contact) (*tdlib.ImportedContacts, error)
- func (client *Client) ImportMessages(chatID int64, messageFile tdlib.InputFile, attachedFiles []tdlib.InputFile) (*tdlib.Ok, error)
- func (client *Client) InviteGroupCallParticipants(groupCallID int32, userIDs []int64) (*tdlib.Ok, error)
- func (client *Client) JoinChat(chatID int64) (*tdlib.Ok, error)
- func (client *Client) JoinChatByInviteLink(inviteLink string) (*tdlib.Chat, error)
- func (client *Client) JoinGroupCall(groupCallID int32, participantID tdlib.MessageSender, audioSourceID int32, ...) (*tdlib.Text, error)
- func (client *Client) LeaveChat(chatID int64) (*tdlib.Ok, error)
- func (client *Client) LeaveGroupCall(groupCallID int32) (*tdlib.Ok, error)
- func (client *Client) LoadChats(chatList tdlib.ChatList, limit int32) (*tdlib.Ok, error)
- func (client *Client) LoadGroupCallParticipants(groupCallID int32, limit int32) (*tdlib.Ok, error)
- func (client *Client) LogOut() (*tdlib.Ok, error)
- func (client *Client) OpenChat(chatID int64) (*tdlib.Ok, error)
- func (client *Client) OpenMessageContent(chatID int64, messageID int64) (*tdlib.Ok, error)
- func (client *Client) OptimizeStorage(size int64, tTL int32, count int32, immunityDelay int32, ...) (*tdlib.StorageStatistics, error)
- func (client *Client) ParseMarkdown(text *tdlib.FormattedText) (*tdlib.FormattedText, error)
- func (client *Client) ParseTextEntities(text string, parseMode tdlib.TextParseMode) (*tdlib.FormattedText, error)
- func (client *Client) PinChatMessage(chatID int64, messageID int64, disableNotification bool, onlyForSelf bool) (*tdlib.Ok, error)
- func (client *Client) PingProxy(proxyID int32) (*tdlib.Seconds, error)
- func (client *Client) ProcessPushNotification(payload string) (*tdlib.Ok, error)
- func (client *Client) ReadAllChatMentions(chatID int64) (*tdlib.Ok, error)
- func (client *Client) ReadFilePart(fileID int32, offset int32, count int32) (*tdlib.FilePart, error)
- func (client *Client) Receive(timeout float64) []byte
- func (client *Client) RecoverAuthenticationPassword(recoveryCode string, newPassword string, newHint string) (*tdlib.Ok, error)
- func (client *Client) RecoverPassword(recoveryCode string, newPassword string, newHint string) (*tdlib.PasswordState, error)
- func (client *Client) RegisterDevice(deviceToken tdlib.DeviceToken, otherUserIDs []int64) (*tdlib.PushReceiverID, error)
- func (client *Client) RegisterUser(firstName string, lastName string) (*tdlib.Ok, error)
- func (client *Client) RemoveBackground(backgroundID *tdlib.JSONInt64) (*tdlib.Ok, error)
- func (client *Client) RemoveChatActionBar(chatID int64) (*tdlib.Ok, error)
- func (client *Client) RemoveContacts(userIDs []int64) (*tdlib.Ok, error)
- func (client *Client) RemoveFavoriteSticker(sticker tdlib.InputFile) (*tdlib.Ok, error)
- func (client *Client) RemoveNotification(notificationGroupID int32, notificationID int32) (*tdlib.Ok, error)
- func (client *Client) RemoveNotificationGroup(notificationGroupID int32, maxNotificationID int32) (*tdlib.Ok, error)
- func (client *Client) RemoveProxy(proxyID int32) (*tdlib.Ok, error)
- func (client *Client) RemoveRecentHashtag(hashtag string) (*tdlib.Ok, error)
- func (client *Client) RemoveRecentSticker(isAttached bool, sticker tdlib.InputFile) (*tdlib.Ok, error)
- func (client *Client) RemoveRecentlyFoundChat(chatID int64) (*tdlib.Ok, error)
- func (client *Client) RemoveSavedAnimation(animation tdlib.InputFile) (*tdlib.Ok, error)
- func (client *Client) RemoveStickerFromSet(sticker tdlib.InputFile) (*tdlib.Ok, error)
- func (client *Client) RemoveTopChat(category tdlib.TopChatCategory, chatID int64) (*tdlib.Ok, error)
- func (client *Client) ReorderChatFilters(chatFilterIDs []int32) (*tdlib.Ok, error)
- func (client *Client) ReorderInstalledStickerSets(isMasks bool, stickerSetIDs []tdlib.JSONInt64) (*tdlib.Ok, error)
- func (client *Client) ReplacePrimaryChatInviteLink(chatID int64) (*tdlib.ChatInviteLink, error)
- func (client *Client) ReportChat(chatID int64, messageIDs []int64, reason tdlib.ChatReportReason, text string) (*tdlib.Ok, error)
- func (client *Client) ReportChatPhoto(chatID int64, fileID int32, reason tdlib.ChatReportReason, text string) (*tdlib.Ok, error)
- func (client *Client) ReportSupergroupSpam(supergroupID int64, userID int64, messageIDs []int64) (*tdlib.Ok, error)
- func (client *Client) RequestAuthenticationPasswordRecovery() (*tdlib.Ok, error)
- func (client *Client) RequestPasswordRecovery() (*tdlib.EmailAddressAuthenticationCodeInfo, error)
- func (client *Client) RequestQrCodeAuthentication(otherUserIDs []int64) (*tdlib.Ok, error)
- func (client *Client) ResendAuthenticationCode() (*tdlib.Ok, error)
- func (client *Client) ResendChangePhoneNumberCode() (*tdlib.AuthenticationCodeInfo, error)
- func (client *Client) ResendEmailAddressVerificationCode() (*tdlib.EmailAddressAuthenticationCodeInfo, error)
- func (client *Client) ResendMessages(chatID int64, messageIDs []int64) (*tdlib.Messages, error)
- func (client *Client) ResendPhoneNumberConfirmationCode() (*tdlib.AuthenticationCodeInfo, error)
- func (client *Client) ResendPhoneNumberVerificationCode() (*tdlib.AuthenticationCodeInfo, error)
- func (client *Client) ResendRecoveryEmailAddressCode() (*tdlib.PasswordState, error)
- func (client *Client) ResetAllNotificationSettings() (*tdlib.Ok, error)
- func (client *Client) ResetBackgrounds() (*tdlib.Ok, error)
- func (client *Client) ResetNetworkStatistics() (*tdlib.Ok, error)
- func (client *Client) ResetPassword() (tdlib.ResetPasswordResult, error)
- func (client *Client) RevokeChatInviteLink(chatID int64, inviteLink string) (*tdlib.ChatInviteLinks, error)
- func (client *Client) RevokeGroupCallInviteLink(groupCallID int32) (*tdlib.Ok, error)
- func (client *Client) SaveApplicationLogEvent(typeParam string, chatID int64, data tdlib.JsonValue) (*tdlib.Ok, error)
- func (client *Client) SearchBackground(name string) (*tdlib.Background, error)
- func (client *Client) SearchCallMessages(fromMessageID int64, limit int32, onlyMissed bool) (*tdlib.Messages, error)
- func (client *Client) SearchChatMembers(chatID int64, query string, limit int32, filter tdlib.ChatMembersFilter) (*tdlib.ChatMembers, error)
- func (client *Client) SearchChatMessages(chatID int64, query string, sender tdlib.MessageSender, fromMessageID int64, ...) (*tdlib.Messages, error)
- func (client *Client) SearchChatRecentLocationMessages(chatID int64, limit int32) (*tdlib.Messages, error)
- func (client *Client) SearchChats(query string, limit int32) (*tdlib.Chats, error)
- func (client *Client) SearchChatsNearby(location *tdlib.Location) (*tdlib.ChatsNearby, error)
- func (client *Client) SearchChatsOnServer(query string, limit int32) (*tdlib.Chats, error)
- func (client *Client) SearchContacts(query string, limit int32) (*tdlib.Users, error)
- func (client *Client) SearchEmojis(text string, exactMatch bool, inputLanguageCodes []string) (*tdlib.Emojis, error)
- func (client *Client) SearchHashtags(prefix string, limit int32) (*tdlib.Hashtags, error)
- func (client *Client) SearchInstalledStickerSets(isMasks bool, query string, limit int32) (*tdlib.StickerSets, error)
- func (client *Client) SearchMessages(chatList tdlib.ChatList, query string, offsetDate int32, offsetChatID int64, ...) (*tdlib.Messages, error)
- func (client *Client) SearchPublicChat(username string) (*tdlib.Chat, error)
- func (client *Client) SearchPublicChats(query string) (*tdlib.Chats, error)
- func (client *Client) SearchSecretMessages(chatID int64, query string, offset string, limit int32, ...) (*tdlib.FoundMessages, error)
- func (client *Client) SearchStickerSet(name string) (*tdlib.StickerSet, error)
- func (client *Client) SearchStickerSets(query string) (*tdlib.StickerSets, error)
- func (client *Client) SearchStickers(emoji string, limit int32) (*tdlib.Stickers, error)
- func (client *Client) Send(jsonQuery interface{})
- func (client *Client) SendAndCatch(jsonQuery interface{}) (tdlib.UpdateMsg, error)
- func (client *Client) SendAuthCode(code string) (tdlib.AuthorizationState, error)
- func (client *Client) SendAuthPassword(password string) (tdlib.AuthorizationState, error)
- func (client *Client) SendBotStartMessage(botUserID int64, chatID int64, parameter string) (*tdlib.Message, error)
- func (client *Client) SendCallDebugInformation(callID int32, debugInformation string) (*tdlib.Ok, error)
- func (client *Client) SendCallRating(callID int32, rating int32, comment string, problems []tdlib.CallProblem) (*tdlib.Ok, error)
- func (client *Client) SendCallSignalingData(callID int32, data []byte) (*tdlib.Ok, error)
- func (client *Client) SendChatAction(chatID int64, messageThreadID int64, action tdlib.ChatAction) (*tdlib.Ok, error)
- func (client *Client) SendChatScreenshotTakenNotification(chatID int64) (*tdlib.Ok, error)
- func (client *Client) SendCustomRequest(method string, parameters string) (*tdlib.CustomRequestResult, error)
- func (client *Client) SendEmailAddressVerificationCode(emailAddress string) (*tdlib.EmailAddressAuthenticationCodeInfo, error)
- func (client *Client) SendInlineQueryResultMessage(chatID int64, messageThreadID int64, replyToMessageID int64, ...) (*tdlib.Message, error)
- func (client *Client) SendMessage(chatID int64, messageThreadID int64, replyToMessageID int64, ...) (*tdlib.Message, error)
- func (client *Client) SendMessageAlbum(chatID int64, messageThreadID int64, replyToMessageID int64, ...) (*tdlib.Messages, error)
- func (client *Client) SendPassportAuthorizationForm(autorizationFormID int32, typeParams []tdlib.PassportElementType) (*tdlib.Ok, error)
- func (client *Client) SendPaymentForm(chatID int64, messageID int64, paymentFormID *tdlib.JSONInt64, ...) (*tdlib.PaymentResult, error)
- func (client *Client) SendPhoneNumber(phoneNumber string) (tdlib.AuthorizationState, error)
- func (client *Client) SendPhoneNumberConfirmationCode(hash string, phoneNumber string, ...) (*tdlib.AuthenticationCodeInfo, error)
- func (client *Client) SendPhoneNumberVerificationCode(phoneNumber string, settings *tdlib.PhoneNumberAuthenticationSettings) (*tdlib.AuthenticationCodeInfo, error)
- func (client *Client) SetAccountTTL(tTL *tdlib.AccountTTL) (*tdlib.Ok, error)
- func (client *Client) SetAlarm(seconds float64) (*tdlib.Ok, error)
- func (client *Client) SetAuthenticationPhoneNumber(phoneNumber string, settings *tdlib.PhoneNumberAuthenticationSettings) (*tdlib.Ok, error)
- func (client *Client) SetAutoDownloadSettings(settings *tdlib.AutoDownloadSettings, typeParam tdlib.NetworkType) (*tdlib.Ok, error)
- func (client *Client) SetBackground(background tdlib.InputBackground, typeParam tdlib.BackgroundType, ...) (*tdlib.Background, error)
- func (client *Client) SetBio(bio string) (*tdlib.Ok, error)
- func (client *Client) SetBotUpdatesStatus(pendingUpdateCount int32, errorMessage string) (*tdlib.Ok, error)
- func (client *Client) SetChatClientData(chatID int64, clientData string) (*tdlib.Ok, error)
- func (client *Client) SetChatDescription(chatID int64, description string) (*tdlib.Ok, error)
- func (client *Client) SetChatDiscussionGroup(chatID int64, discussionChatID int64) (*tdlib.Ok, error)
- func (client *Client) SetChatDraftMessage(chatID int64, messageThreadID int64, draftMessage *tdlib.DraftMessage) (*tdlib.Ok, error)
- func (client *Client) SetChatLocation(chatID int64, location *tdlib.ChatLocation) (*tdlib.Ok, error)
- func (client *Client) SetChatMemberStatus(chatID int64, memberID tdlib.MessageSender, status tdlib.ChatMemberStatus) (*tdlib.Ok, error)
- func (client *Client) SetChatMessageTTLSetting(chatID int64, tTL int32) (*tdlib.Ok, error)
- func (client *Client) SetChatNotificationSettings(chatID int64, notificationSettings *tdlib.ChatNotificationSettings) (*tdlib.Ok, error)
- func (client *Client) SetChatPermissions(chatID int64, permissions *tdlib.ChatPermissions) (*tdlib.Ok, error)
- func (client *Client) SetChatPhoto(chatID int64, photo tdlib.InputChatPhoto) (*tdlib.Ok, error)
- func (client *Client) SetChatSlowModeDelay(chatID int64, slowModeDelay int32) (*tdlib.Ok, error)
- func (client *Client) SetChatTheme(chatID int64, themeName string) (*tdlib.Ok, error)
- func (client *Client) SetChatTitle(chatID int64, title string) (*tdlib.Ok, error)
- func (client *Client) SetCommands(scope tdlib.BotCommandScope, languageCode string, commands []tdlib.BotCommand) (*tdlib.Ok, error)
- func (client *Client) SetCustomLanguagePack(info *tdlib.LanguagePackInfo, strings []tdlib.LanguagePackString) (*tdlib.Ok, error)
- func (client *Client) SetCustomLanguagePackString(languagePackID string, newString *tdlib.LanguagePackString) (*tdlib.Ok, error)
- func (client *Client) SetDatabaseEncryptionKey(newEncryptionKey []byte) (*tdlib.Ok, error)
- func (client *Client) SetFileGenerationProgress(generationID *tdlib.JSONInt64, expectedSize int32, localPrefixSize int32) (*tdlib.Ok, error)
- func (client *Client) SetGameScore(chatID int64, messageID int64, editMessage bool, userID int64, score int32, ...) (*tdlib.Message, error)
- func (client *Client) SetGroupCallParticipantIsSpeaking(groupCallID int32, audioSource int32, isSpeaking bool) (*tdlib.Ok, error)
- func (client *Client) SetGroupCallParticipantVolumeLevel(groupCallID int32, participantID tdlib.MessageSender, volumeLevel int32) (*tdlib.Ok, error)
- func (client *Client) SetGroupCallTitle(groupCallID int32, title string) (*tdlib.Ok, error)
- func (client *Client) SetInlineGameScore(inlineMessageID string, editMessage bool, userID int64, score int32, ...) (*tdlib.Ok, error)
- func (client *Client) SetLocation(location *tdlib.Location) (*tdlib.Ok, error)
- func (client *Client) SetLogStream(logStream tdlib.LogStream) (*tdlib.Ok, error)
- func (client *Client) SetLogTagVerbosityLevel(tag string, newVerbosityLevel int32) (*tdlib.Ok, error)
- func (client *Client) SetLogVerbosityLevel(newVerbosityLevel int32) (*tdlib.Ok, error)
- func (client *Client) SetName(firstName string, lastName string) (*tdlib.Ok, error)
- func (client *Client) SetNetworkType(typeParam tdlib.NetworkType) (*tdlib.Ok, error)
- func (client *Client) SetOption(name string, value tdlib.OptionValue) (*tdlib.Ok, error)
- func (client *Client) SetPassportElement(element tdlib.InputPassportElement, password string) (tdlib.PassportElement, error)
- func (client *Client) SetPassportElementErrors(userID int64, errors []tdlib.InputPassportElementError) (*tdlib.Ok, error)
- func (client *Client) SetPassword(oldPassword string, newPassword string, newHint string, ...) (*tdlib.PasswordState, error)
- func (client *Client) SetPinnedChats(chatList tdlib.ChatList, chatIDs []int64) (*tdlib.Ok, error)
- func (client *Client) SetPollAnswer(chatID int64, messageID int64, optionIDs []int32) (*tdlib.Ok, error)
- func (client *Client) SetProfilePhoto(photo tdlib.InputChatPhoto) (*tdlib.Ok, error)
- func (client *Client) SetRecoveryEmailAddress(password string, newRecoveryEmailAddress string) (*tdlib.PasswordState, error)
- func (client *Client) SetScopeNotificationSettings(scope tdlib.NotificationSettingsScope, ...) (*tdlib.Ok, error)
- func (client *Client) SetStickerPositionInSet(sticker tdlib.InputFile, position int32) (*tdlib.Ok, error)
- func (client *Client) SetStickerSetThumbnail(userID int64, name string, thumbnail tdlib.InputFile) (*tdlib.StickerSet, error)
- func (client *Client) SetSupergroupStickerSet(supergroupID int64, stickerSetID *tdlib.JSONInt64) (*tdlib.Ok, error)
- func (client *Client) SetSupergroupUsername(supergroupID int64, username string) (*tdlib.Ok, error)
- func (client *Client) SetTdlibParameters(parameters *tdlib.TdlibParameters) (*tdlib.Ok, error)
- func (client *Client) SetUserPrivacySettingRules(setting tdlib.UserPrivacySetting, rules *tdlib.UserPrivacySettingRules) (*tdlib.Ok, error)
- func (client *Client) SetUsername(username string) (*tdlib.Ok, error)
- func (client *Client) SetVoiceChatDefaultParticipant(chatID int64, defaultParticipantID tdlib.MessageSender) (*tdlib.Ok, error)
- func (client *Client) SharePhoneNumber(userID int64) (*tdlib.Ok, error)
- func (client *Client) StartGroupCallRecording(groupCallID int32, title string, recordVideo bool, usePortraitOrientation bool) (*tdlib.Ok, error)
- func (client *Client) StartGroupCallScreenSharing(groupCallID int32, audioSourceID int32, payload string) (*tdlib.Text, error)
- func (client *Client) StartScheduledGroupCall(groupCallID int32) (*tdlib.Ok, error)
- func (client *Client) StopPoll(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup) (*tdlib.Ok, error)
- func (client *Client) SynchronizeLanguagePack(languagePackID string) (*tdlib.Ok, error)
- func (client *Client) TerminateAllOtherSessions() (*tdlib.Ok, error)
- func (client *Client) TerminateSession(sessionID *tdlib.JSONInt64) (*tdlib.Ok, error)
- func (client *Client) TestCallBytes(x []byte) (*tdlib.TestBytes, error)
- func (client *Client) TestCallEmpty() (*tdlib.Ok, error)
- func (client *Client) TestCallString(x string) (*tdlib.TestString, error)
- func (client *Client) TestCallVectorInt(x []int32) (*tdlib.TestVectorInt, error)
- func (client *Client) TestCallVectorIntObject(x []tdlib.TestInt) (*tdlib.TestVectorIntObject, error)
- func (client *Client) TestCallVectorString(x []string) (*tdlib.TestVectorString, error)
- func (client *Client) TestCallVectorStringObject(x []tdlib.TestString) (*tdlib.TestVectorStringObject, error)
- func (client *Client) TestGetDifference() (*tdlib.Ok, error)
- func (client *Client) TestNetwork() (*tdlib.Ok, error)
- func (client *Client) TestProxy(server string, port int32, typeParam tdlib.ProxyType, dcID int32, ...) (*tdlib.Ok, error)
- func (client *Client) TestReturnError(error *tdlib.Error) (*tdlib.Error, error)
- func (client *Client) TestSquareInt(x int32) (*tdlib.TestInt, error)
- func (client *Client) TestUseUpdate() (tdlib.Update, error)
- func (client *Client) ToggleChatDefaultDisableNotification(chatID int64, defaultDisableNotification bool) (*tdlib.Ok, error)
- func (client *Client) ToggleChatIsMarkedAsUnread(chatID int64, isMarkedAsUnread bool) (*tdlib.Ok, error)
- func (client *Client) ToggleChatIsPinned(chatList tdlib.ChatList, chatID int64, isPinned bool) (*tdlib.Ok, error)
- func (client *Client) ToggleGroupCallEnabledStartNotification(groupCallID int32, enabledStartNotification bool) (*tdlib.Ok, error)
- func (client *Client) ToggleGroupCallIsMyVideoEnabled(groupCallID int32, isMyVideoEnabled bool) (*tdlib.Ok, error)
- func (client *Client) ToggleGroupCallIsMyVideoPaused(groupCallID int32, isMyVideoPaused bool) (*tdlib.Ok, error)
- func (client *Client) ToggleGroupCallMuteNewParticipants(groupCallID int32, muteNewParticipants bool) (*tdlib.Ok, error)
- func (client *Client) ToggleGroupCallParticipantIsHandRaised(groupCallID int32, participantID tdlib.MessageSender, isHandRaised bool) (*tdlib.Ok, error)
- func (client *Client) ToggleGroupCallParticipantIsMuted(groupCallID int32, participantID tdlib.MessageSender, isMuted bool) (*tdlib.Ok, error)
- func (client *Client) ToggleGroupCallScreenSharingIsPaused(groupCallID int32, isPaused bool) (*tdlib.Ok, error)
- func (client *Client) ToggleMessageSenderIsBlocked(sender tdlib.MessageSender, isBlocked bool) (*tdlib.Ok, error)
- func (client *Client) ToggleSupergroupIsAllHistoryAvailable(supergroupID int64, isAllHistoryAvailable bool) (*tdlib.Ok, error)
- func (client *Client) ToggleSupergroupIsBroadcastGroup(supergroupID int64) (*tdlib.Ok, error)
- func (client *Client) ToggleSupergroupSignMessages(supergroupID int64, signMessages bool) (*tdlib.Ok, error)
- func (client *Client) TransferChatOwnership(chatID int64, userID int64, password string) (*tdlib.Ok, error)
- func (client *Client) UnpinAllChatMessages(chatID int64) (*tdlib.Ok, error)
- func (client *Client) UnpinChatMessage(chatID int64, messageID int64) (*tdlib.Ok, error)
- func (client *Client) UpgradeBasicGroupChatToSupergroupChat(chatID int64) (*tdlib.Chat, error)
- func (client *Client) UploadFile(file tdlib.InputFile, fileType tdlib.FileType, priority int32) (*tdlib.File, error)
- func (client *Client) UploadStickerFile(userID int64, sticker tdlib.InputSticker) (*tdlib.File, error)
- func (client *Client) ValidateOrderInfo(chatID int64, messageID int64, orderInfo *tdlib.OrderInfo, allowSave bool) (*tdlib.ValidatedOrderInfo, error)
- func (client *Client) ViewMessages(chatID int64, messageThreadID int64, messageIDs []int64, forceRead bool) (*tdlib.Ok, error)
- func (client *Client) ViewSponsoredMessage(chatID int64, sponsoredMessageID int32) (*tdlib.Ok, error)
- func (client *Client) ViewTrendingStickerSets(stickerSetIDs []tdlib.JSONInt64) (*tdlib.Ok, error)
- func (client *Client) WriteGeneratedFilePart(generationID *tdlib.JSONInt64, offset int32, data []byte) (*tdlib.Ok, error)
- type Config
- type EventFilterFunc
- type EventReceiver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetFilePath ¶
func SetFilePath(path string)
SetFilePath Sets the path to the file to where the internal TDLib log will be written. By default TDLib writes logs to stderr or an OS specific log. Use this method to write the log to a file instead.
func SetLogVerbosityLevel ¶
func SetLogVerbosityLevel(level int)
SetLogVerbosityLevel Sets the verbosity level of the internal logging of TDLib. By default the TDLib uses a verbosity level of 5 for logging.
Types ¶
type Client ¶
type Client struct { Client unsafe.Pointer Config Config // contains filtered or unexported fields }
Client is the Telegram TdLib client
func NewClient ¶
NewClient Creates a new instance of TDLib. Has two public fields: Client itself and RawUpdates channel
func (*Client) AcceptCall ¶
AcceptCall Accepts an incoming call @param callID Call identifier @param protocol Description of the call protocols supported by the application
func (*Client) AcceptTermsOfService ¶
AcceptTermsOfService Accepts Telegram terms of services @param termsOfServiceID Terms of service identifier
func (*Client) AddChatMember ¶
func (client *Client) AddChatMember(chatID int64, userID int64, forwardLimit int32) (*tdlib.Ok, error)
AddChatMember Adds a new member to a chat. Members can't be added to private or secret chats @param chatID Chat identifier @param userID Identifier of the user @param forwardLimit The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels
func (*Client) AddChatMembers ¶
AddChatMembers Adds multiple new members to a chat. Currently this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members @param chatID Chat identifier @param userIDs Identifiers of the users to be added to the chat. The maximum number of added users is 20 for supergroups and 100 for channels
func (*Client) AddChatToList ¶
AddChatToList Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed @param chatID Chat identifier @param chatList The chat list. Use getChatListsToAddChat to get suitable chat lists
func (*Client) AddContact ¶
AddContact Adds a user to the contact list or edits an existing contact by their user identifier @param contact The contact to add or edit; phone number can be empty and needs to be specified only if known, vCard is ignored @param sharePhoneNumber True, if the new contact needs to be allowed to see current user's phone number. A corresponding rule to userPrivacySettingShowPhoneNumber will be added if needed. Use the field UserFullInfo.need_phone_number_privacy_exception to check whether the current user needs to be asked to share their phone number
func (*Client) AddCustomServerLanguagePack ¶
AddCustomServerLanguagePack Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization @param languagePackID Identifier of a language pack to be added; may be different from a name that is used in an "https://t.me/setlanguage/" link
func (*Client) AddEventReceiver ¶
func (client *Client) AddEventReceiver(msgInstance tdlib.TdMessage, filterFunc EventFilterFunc, channelCapacity int) EventReceiver
AddEventReceiver adds a new receiver to be subscribed in receiver channels @param msgInstance what kind of message do you want to receive? @param
func (*Client) AddFavoriteSticker ¶
AddFavoriteSticker Adds a new sticker to the list of favorite stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list @param sticker Sticker file to add
func (*Client) AddLocalMessage ¶
func (client *Client) AddLocalMessage(chatID int64, sender tdlib.MessageSender, replyToMessageID int64, disableNotification bool, inputMessageContent tdlib.InputMessageContent) (*tdlib.Message, error)
AddLocalMessage Adds a local message to a chat. The message is persistent across application restarts only if the message database is used. Returns the added message @param chatID Target chat @param sender The sender sender of the message @param replyToMessageID Identifier of the message to reply to or 0 @param disableNotification Pass true to disable notification for the message @param inputMessageContent The content of the message to be added
func (*Client) AddLogMessage ¶
AddLogMessage Adds a message to TDLib internal log. Can be called synchronously @param verbosityLevel The minimum verbosity level needed for the message to be logged; 0-1023 @param text Text of a message to log
func (*Client) AddNetworkStatistics ¶
AddNetworkStatistics Adds the specified data to data usage statistics. Can be called before authorization @param entry The network statistics entry with the data to be added to statistics
func (*Client) AddProxy ¶
func (client *Client) AddProxy(server string, port int32, enable bool, typeParam tdlib.ProxyType) (*tdlib.Proxy, error)
AddProxy Adds a proxy server for network requests. Can be called before authorization @param server Proxy server IP address @param port Proxy server port @param enable True, if the proxy should be enabled @param typeParam Proxy type
func (*Client) AddRecentSticker ¶
func (client *Client) AddRecentSticker(isAttached bool, sticker tdlib.InputFile) (*tdlib.Stickers, error)
AddRecentSticker Manually adds a new sticker to the list of recently used stickers. The new sticker is added to the top of the list. If the sticker was already in the list, it is removed from the list first. Only stickers belonging to a sticker set can be added to this list @param isAttached Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers @param sticker Sticker file to add
func (*Client) AddRecentlyFoundChat ¶
AddRecentlyFoundChat Adds a chat to the list of recently found chats. The chat is added to the beginning of the list. If the chat is already in the list, it will be removed from the list first @param chatID Identifier of the chat to add
func (*Client) AddSavedAnimation ¶
AddSavedAnimation Manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type "video/mp4" can be added to the list @param animation The animation file to be added. Only animations known to the server (i.e. successfully sent via a message) can be added to the list
func (*Client) AddStickerToSet ¶
func (client *Client) AddStickerToSet(userID int64, name string, sticker tdlib.InputSticker) (*tdlib.StickerSet, error)
AddStickerToSet Adds a new sticker to a set; for bots only. Returns the sticker set @param userID Sticker set owner @param name Sticker set name @param sticker Sticker to add to the set
func (*Client) AnswerCallbackQuery ¶
func (client *Client) AnswerCallbackQuery(callbackQueryID *tdlib.JSONInt64, text string, showAlert bool, uRL string, cacheTime int32) (*tdlib.Ok, error)
AnswerCallbackQuery Sets the result of a callback query; for bots only @param callbackQueryID Identifier of the callback query @param text Text of the answer @param showAlert If true, an alert should be shown to the user instead of a toast notification @param uRL URL to be opened @param cacheTime Time during which the result of the query can be cached, in seconds
func (*Client) AnswerCustomQuery ¶
func (client *Client) AnswerCustomQuery(customQueryID *tdlib.JSONInt64, data string) (*tdlib.Ok, error)
AnswerCustomQuery Answers a custom query; for bots only @param customQueryID Identifier of a custom query @param data JSON-serialized answer to the query
func (*Client) AnswerInlineQuery ¶
func (client *Client) AnswerInlineQuery(inlineQueryID *tdlib.JSONInt64, isPersonal bool, results []tdlib.InputInlineQueryResult, cacheTime int32, nextOffset string, switchPmText string, switchPmParameter string) (*tdlib.Ok, error)
AnswerInlineQuery Sets the result of an inline query; for bots only @param inlineQueryID Identifier of the inline query @param isPersonal True, if the result of the query can be cached for the specified user @param results The results of the query @param cacheTime Allowed time to cache the results of the query, in seconds @param nextOffset Offset for the next inline query; pass an empty string if there are no more results @param switchPmText If non-empty, this text should be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter @param switchPmParameter The parameter for the bot start message
func (*Client) AnswerPreCheckoutQuery ¶
func (client *Client) AnswerPreCheckoutQuery(preCheckoutQueryID *tdlib.JSONInt64, errorMessage string) (*tdlib.Ok, error)
AnswerPreCheckoutQuery Sets the result of a pre-checkout query; for bots only @param preCheckoutQueryID Identifier of the pre-checkout query @param errorMessage An error message, empty on success
func (*Client) AnswerShippingQuery ¶
func (client *Client) AnswerShippingQuery(shippingQueryID *tdlib.JSONInt64, shippingOptions []tdlib.ShippingOption, errorMessage string) (*tdlib.Ok, error)
AnswerShippingQuery Sets the result of a shipping query; for bots only @param shippingQueryID Identifier of the shipping query @param shippingOptions Available shipping options @param errorMessage An error message, empty on success
func (*Client) Authorize ¶
func (client *Client) Authorize() (tdlib.AuthorizationState, error)
Authorize is used to authorize the users
func (*Client) BanChatMember ¶
func (client *Client) BanChatMember(chatID int64, memberID tdlib.MessageSender, bannedUntilDate int32, revokeMessages bool) (*tdlib.Ok, error)
BanChatMember Bans a member in a chat. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first @param chatID Chat identifier @param memberID Member identifier @param bannedUntilDate Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups @param revokeMessages Pass true to delete all messages in the chat for the user that is being removed. Always true for supergroups and channels
func (*Client) BlockMessageSenderFromReplies ¶
func (client *Client) BlockMessageSenderFromReplies(messageID int64, deleteMessage bool, deleteAllMessages bool, reportSpam bool) (*tdlib.Ok, error)
BlockMessageSenderFromReplies Blocks an original sender of a message in the Replies chat @param messageID The identifier of an incoming message in the Replies chat @param deleteMessage Pass true if the message must be deleted @param deleteAllMessages Pass true if all messages from the same sender must be deleted @param reportSpam Pass true if the sender must be reported to the Telegram moderators
func (*Client) CanTransferOwnership ¶
func (client *Client) CanTransferOwnership() (tdlib.CanTransferOwnershipResult, error)
CanTransferOwnership Checks whether the current session can be used to transfer a chat ownership to another user
func (*Client) CancelDownloadFile ¶
CancelDownloadFile Stops the downloading of a file. If a file has already been downloaded, does nothing @param fileID Identifier of a file to stop downloading @param onlyIfPending Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server
func (*Client) CancelPasswordReset ¶
CancelPasswordReset Cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date > 0
func (*Client) CancelUploadFile ¶
CancelUploadFile Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined @param fileID Identifier of the file to stop uploading
func (*Client) ChangeImportedContacts ¶
func (client *Client) ChangeImportedContacts(contacts []tdlib.Contact) (*tdlib.ImportedContacts, error)
ChangeImportedContacts Changes imported contacts using the list of contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts. Query result depends on the result of the previous query, so only one query is possible at the same time @param contacts The new list of contacts, contact's vCard are ignored and are not imported
func (*Client) ChangePhoneNumber ¶
func (client *Client) ChangePhoneNumber(phoneNumber string, settings *tdlib.PhoneNumberAuthenticationSettings) (*tdlib.AuthenticationCodeInfo, error)
ChangePhoneNumber Changes the phone number of the user and sends an authentication code to the user's new phone number. On success, returns information about the sent code @param phoneNumber The new phone number of the user in international format @param settings Settings for the authentication of the user's phone number
func (*Client) ChangeStickerSet ¶
func (client *Client) ChangeStickerSet(setID *tdlib.JSONInt64, isInstalled bool, isArchived bool) (*tdlib.Ok, error)
ChangeStickerSet Installs/uninstalls or activates/archives a sticker set @param setID Identifier of the sticker set @param isInstalled The new value of is_installed @param isArchived The new value of is_archived. A sticker set can't be installed and archived simultaneously
func (*Client) CheckAuthenticationBotToken ¶
CheckAuthenticationBotToken Checks the authentication token of a bot; to log in as a bot. Works only when the current authorization state is authorizationStateWaitPhoneNumber. Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in @param token The bot token
func (*Client) CheckAuthenticationCode ¶
CheckAuthenticationCode Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode @param code The verification code received via SMS, Telegram message, phone call, or flash call
func (*Client) CheckAuthenticationPassword ¶
CheckAuthenticationPassword Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword @param password The password to check
func (*Client) CheckAuthenticationPasswordRecoveryCode ¶
func (client *Client) CheckAuthenticationPasswordRecoveryCode(recoveryCode string) (*tdlib.Ok, error)
CheckAuthenticationPasswordRecoveryCode Checks whether a password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword @param recoveryCode Recovery code to check
func (*Client) CheckChangePhoneNumberCode ¶
CheckChangePhoneNumberCode Checks the authentication code sent to confirm a new phone number of the user @param code Verification code received by SMS, phone call or flash call
func (*Client) CheckChatInviteLink ¶
func (client *Client) CheckChatInviteLink(inviteLink string) (*tdlib.ChatInviteLinkInfo, error)
CheckChatInviteLink Checks the validity of an invite link for a chat and returns information about the corresponding chat @param inviteLink Invite link to be checked
func (*Client) CheckChatUsername ¶
func (client *Client) CheckChatUsername(chatID int64, username string) (tdlib.CheckChatUsernameResult, error)
CheckChatUsername Checks whether a username can be set for a chat @param chatID Chat identifier; should be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if the chat is being created @param username Username to be checked
func (*Client) CheckCreatedPublicChatsLimit ¶
func (client *Client) CheckCreatedPublicChatsLimit(typeParam tdlib.PublicChatType) (*tdlib.Ok, error)
CheckCreatedPublicChatsLimit Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached @param typeParam Type of the public chats, for which to check the limit
func (*Client) CheckDatabaseEncryptionKey ¶
CheckDatabaseEncryptionKey Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey @param encryptionKey Encryption key to check or set up
func (*Client) CheckEmailAddressVerificationCode ¶
CheckEmailAddressVerificationCode Checks the email address verification code for Telegram Passport @param code Verification code
func (*Client) CheckPasswordRecoveryCode ¶
CheckPasswordRecoveryCode Checks whether a 2-step verification password recovery code sent to an email address is valid @param recoveryCode Recovery code to check
func (*Client) CheckPhoneNumberConfirmationCode ¶
CheckPhoneNumberConfirmationCode Checks phone number confirmation code @param code The phone number confirmation code
func (*Client) CheckPhoneNumberVerificationCode ¶
CheckPhoneNumberVerificationCode Checks the phone number verification code for Telegram Passport @param code Verification code
func (*Client) CheckRecoveryEmailAddressCode ¶
func (client *Client) CheckRecoveryEmailAddressCode(code string) (*tdlib.PasswordState, error)
CheckRecoveryEmailAddressCode Checks the 2-step verification recovery email address verification code @param code Verification code
func (*Client) CheckStickerSetName ¶
func (client *Client) CheckStickerSetName(name string) (tdlib.CheckStickerSetNameResult, error)
CheckStickerSetName Checks whether a name can be used for a new sticker set @param name Name to be checked
func (*Client) CleanFileName ¶
CleanFileName Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously @param fileName File name or path to the file
func (*Client) ClearAllDraftMessages ¶
ClearAllDraftMessages Clears draft messages in all chats @param excludeSecretChats If true, local draft messages in secret chats will not be cleared
func (*Client) ClearImportedContacts ¶
ClearImportedContacts Clears all imported contacts, contact list remains unchanged
func (*Client) ClearRecentStickers ¶
ClearRecentStickers Clears the list of recently used stickers @param isAttached Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers
func (*Client) ClearRecentlyFoundChats ¶
ClearRecentlyFoundChats Clears the list of recently found chats
func (*Client) Close ¶
Close Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent. Can be called before initialization
func (*Client) CloseChat ¶
CloseChat Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed @param chatID Chat identifier
func (*Client) CloseSecretChat ¶
CloseSecretChat Closes a secret chat, effectively transferring its state to secretChatStateClosed @param secretChatID Secret chat identifier
func (*Client) ConfirmQrCodeAuthentication ¶
ConfirmQrCodeAuthentication Confirms QR code authentication on another device. Returns created session on success @param link A link from a QR code. The link must be scanned by the in-app camera
func (*Client) CreateBasicGroupChat ¶
CreateBasicGroupChat Returns an existing chat corresponding to a known basic group @param basicGroupID Basic group identifier @param force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect
func (*Client) CreateCall ¶
func (client *Client) CreateCall(userID int64, protocol *tdlib.CallProtocol, isVideo bool) (*tdlib.CallID, error)
CreateCall Creates a new call @param userID Identifier of the user to be called @param protocol Description of the call protocols supported by the application @param isVideo True, if a video call needs to be created
func (*Client) CreateChatFilter ¶
func (client *Client) CreateChatFilter(filter *tdlib.ChatFilter) (*tdlib.ChatFilterInfo, error)
CreateChatFilter Creates new chat filter. Returns information about the created chat filter @param filter Chat filter
func (*Client) CreateChatInviteLink ¶
func (client *Client) CreateChatInviteLink(chatID int64, expireDate int32, memberLimit int32) (*tdlib.ChatInviteLink, error)
CreateChatInviteLink Creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat @param chatID Chat identifier @param expireDate Point in time (Unix timestamp) when the link will expire; pass 0 if never @param memberLimit The maximum number of chat members that can join the chat by the link simultaneously; 0-99999; pass 0 if not limited
func (*Client) CreateNewBasicGroupChat ¶
CreateNewBasicGroupChat Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat @param userIDs Identifiers of users to be added to the basic group @param title Title of the new basic group; 1-128 characters
func (*Client) CreateNewSecretChat ¶
CreateNewSecretChat Creates a new secret chat. Returns the newly created chat @param userID Identifier of the target user
func (*Client) CreateNewStickerSet ¶
func (client *Client) CreateNewStickerSet(userID int64, title string, name string, isMasks bool, stickers []tdlib.InputSticker, source string) (*tdlib.StickerSet, error)
CreateNewStickerSet Creates a new sticker set. Returns the newly created sticker set @param userID Sticker set owner; ignored for regular users @param title Sticker set title; 1-64 characters @param name Sticker set name. Can contain only English letters, digits and underscores. Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive) for bots; 1-64 characters @param isMasks True, if stickers are masks. Animated stickers can't be masks @param stickers List of stickers to be added to the set; must be non-empty. All stickers must be of the same type. For animated stickers, uploadStickerFile must be used before the sticker is shown @param source Source of the sticker set; may be empty if unknown
func (*Client) CreateNewSupergroupChat ¶
func (client *Client) CreateNewSupergroupChat(title string, isChannel bool, description string, location *tdlib.ChatLocation, forImport bool) (*tdlib.Chat, error)
CreateNewSupergroupChat Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat @param title Title of the new chat; 1-128 characters @param isChannel True, if a channel chat needs to be created @param description Chat description; 0-255 characters @param location Chat location if a location-based supergroup is being created @param forImport True, if the supergroup is created for importing messages using importMessage
func (*Client) CreatePrivateChat ¶
CreatePrivateChat Returns an existing chat corresponding to a given user @param userID User identifier @param force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect
func (*Client) CreateSecretChat ¶
CreateSecretChat Returns an existing chat corresponding to a known secret chat @param secretChatID Secret chat identifier
func (*Client) CreateSupergroupChat ¶
CreateSupergroupChat Returns an existing chat corresponding to a known supergroup or channel @param supergroupID Supergroup or channel identifier @param force If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect
func (*Client) CreateTemporaryPassword ¶
func (client *Client) CreateTemporaryPassword(password string, validFor int32) (*tdlib.TemporaryPasswordState, error)
CreateTemporaryPassword Creates a new temporary password for processing payments @param password Persistent user password @param validFor Time during which the temporary password will be valid, in seconds; should be between 60 and 86400
func (*Client) CreateVoiceChat ¶
func (client *Client) CreateVoiceChat(chatID int64, title string, startDate int32) (*tdlib.GroupCallID, error)
CreateVoiceChat Creates a voice chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_voice_chats rights @param chatID Chat identifier, in which the voice chat will be created @param title Group call title; if empty, chat title will be used @param startDate Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the voice chat immediately. The date must be at least 10 seconds and at most 8 days in the future
func (*Client) DeleteAccount ¶
DeleteAccount Deletes the account of the current user, deleting all information associated with the user from the server. The phone number of the account can be used to create a new account. Can be called before authorization when the current authorization state is authorizationStateWaitPassword @param reason The reason why the account was deleted; optional
func (*Client) DeleteAllCallMessages ¶
DeleteAllCallMessages Deletes all call messages @param revoke Pass true to delete the messages for all users
func (*Client) DeleteAllRevokedChatInviteLinks ¶
func (client *Client) DeleteAllRevokedChatInviteLinks(chatID int64, creatorUserID int64) (*tdlib.Ok, error)
DeleteAllRevokedChatInviteLinks Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @param chatID Chat identifier @param creatorUserID User identifier of a chat administrator, which links will be deleted. Must be an identifier of the current user for non-owner
func (*Client) DeleteChat ¶
DeleteChat Deletes a chat along with all messages in the corresponding chat for all chat members; requires owner privileges. For group chats this will release the username and remove all members. Chats with more than 1000 members can't be deleted using this method @param chatID Chat identifier
func (*Client) DeleteChatFilter ¶
DeleteChatFilter Deletes existing chat filter @param chatFilterID Chat filter identifier
func (*Client) DeleteChatHistory ¶
func (client *Client) DeleteChatHistory(chatID int64, removeFromChatList bool, revoke bool) (*tdlib.Ok, error)
DeleteChatHistory Deletes all messages in the chat. Use Chat.can_be_deleted_only_for_self and Chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat @param chatID Chat identifier @param removeFromChatList Pass true if the chat should be removed from the chat list @param revoke Pass true to try to delete chat history for all users
func (*Client) DeleteChatMessagesFromUser ¶
DeleteChatMessagesFromUser Deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires can_delete_messages administrator privileges @param chatID Chat identifier @param userID User identifier
func (*Client) DeleteChatReplyMarkup ¶
DeleteChatReplyMarkup Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup will be changed @param chatID Chat identifier @param messageID The message identifier of the used keyboard
func (*Client) DeleteCommands ¶
func (client *Client) DeleteCommands(scope tdlib.BotCommandScope, languageCode string) (*tdlib.Ok, error)
DeleteCommands Deletes commands supported by the bot for the given user scope and language; for bots only @param scope The scope to which the commands are relevant @param languageCode A two-letter ISO 639-1 country code or an empty string
func (*Client) DeleteFile ¶
DeleteFile Deletes a file from the TDLib file cache @param fileID Identifier of the file to delete
func (*Client) DeleteLanguagePack ¶
DeleteLanguagePack Deletes all information about a language pack in the current localization target. The language pack which is currently in use (including base language pack) or is being synchronized can't be deleted. Can be called before authorization @param languagePackID Identifier of the language pack to delete
func (*Client) DeleteMessages ¶
func (client *Client) DeleteMessages(chatID int64, messageIDs []int64, revoke bool) (*tdlib.Ok, error)
DeleteMessages Deletes messages @param chatID Chat identifier @param messageIDs Identifiers of the messages to be deleted @param revoke Pass true to try to delete messages for all chat members. Always true for supergroups, channels and secret chats
func (*Client) DeletePassportElement ¶
DeletePassportElement Deletes a Telegram Passport element @param typeParam Element type
func (*Client) DeleteProfilePhoto ¶
DeleteProfilePhoto Deletes a profile photo @param profilePhotoID Identifier of the profile photo to delete
func (*Client) DeleteRevokedChatInviteLink ¶
func (client *Client) DeleteRevokedChatInviteLink(chatID int64, inviteLink string) (*tdlib.Ok, error)
DeleteRevokedChatInviteLink Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @param chatID Chat identifier @param inviteLink Invite link to revoke
func (*Client) DeleteSavedCredentials ¶
DeleteSavedCredentials Deletes saved credentials for all payment provider bots
func (*Client) DeleteSavedOrderInfo ¶
DeleteSavedOrderInfo Deletes saved order info
func (*Client) Destroy ¶
Destroy Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization
func (*Client) DestroyInstance ¶
func (client *Client) DestroyInstance()
DestroyInstance Destroys the TDLib client instance. After this is called the client instance shouldn't be used anymore.
func (*Client) DisableProxy ¶
DisableProxy Disables the currently enabled proxy. Can be called before authorization
func (*Client) DiscardCall ¶
func (client *Client) DiscardCall(callID int32, isDisconnected bool, duration int32, isVideo bool, connectionID *tdlib.JSONInt64) (*tdlib.Ok, error)
DiscardCall Discards a call @param callID Call identifier @param isDisconnected True, if the user was disconnected @param duration The call duration, in seconds @param isVideo True, if the call was a video call @param connectionID Identifier of the connection used during the call
func (*Client) DiscardGroupCall ¶
DiscardGroupCall Discards a group call. Requires groupCall.can_be_managed @param groupCallID Group call identifier
func (*Client) DisconnectAllWebsites ¶
DisconnectAllWebsites Disconnects all websites from the current user's Telegram account
func (*Client) DisconnectWebsite ¶
DisconnectWebsite Disconnects website from the current user's Telegram account @param websiteID Website identifier
func (*Client) DownloadFile ¶
func (client *Client) DownloadFile(fileID int32, priority int32, offset int32, limit int32, synchronous bool) (*tdlib.File, error)
DownloadFile Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates @param fileID Identifier of the file to download @param priority Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first @param offset The starting position from which the file should be downloaded @param limit Number of bytes which should be downloaded starting from the "offset" position before the download will be automatically canceled; use 0 to download without a limit @param synchronous If false, this request returns file state just after the download has been started. If true, this request returns file state only after the download has succeeded, has failed, has been canceled or a new downloadFile request with different offset/limit parameters was sent
func (*Client) EditChatFilter ¶
func (client *Client) EditChatFilter(chatFilterID int32, filter *tdlib.ChatFilter) (*tdlib.ChatFilterInfo, error)
EditChatFilter Edits existing chat filter. Returns information about the edited chat filter @param chatFilterID Chat filter identifier @param filter The edited chat filter
func (*Client) EditChatInviteLink ¶
func (client *Client) EditChatInviteLink(chatID int64, inviteLink string, expireDate int32, memberLimit int32) (*tdlib.ChatInviteLink, error)
EditChatInviteLink Edits a non-primary invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @param chatID Chat identifier @param inviteLink Invite link to be edited @param expireDate Point in time (Unix timestamp) when the link will expire; pass 0 if never @param memberLimit The maximum number of chat members that can join the chat by the link simultaneously; 0-99999; pass 0 if not limited
func (*Client) EditCustomLanguagePackInfo ¶
EditCustomLanguagePackInfo Edits information about a custom local language pack in the current localization target. Can be called before authorization @param info New information about the custom local language pack
func (*Client) EditInlineMessageCaption ¶
func (client *Client) EditInlineMessageCaption(inlineMessageID string, replyMarkup tdlib.ReplyMarkup, caption *tdlib.FormattedText) (*tdlib.Ok, error)
EditInlineMessageCaption Edits the caption of an inline message sent via a bot; for bots only @param inlineMessageID Inline message identifier @param replyMarkup The new message reply markup @param caption New message content caption; 0-GetOption("message_caption_length_max") characters
func (*Client) EditInlineMessageLiveLocation ¶
func (client *Client) EditInlineMessageLiveLocation(inlineMessageID string, replyMarkup tdlib.ReplyMarkup, location *tdlib.Location, heading int32, proximityAlertRadius int32) (*tdlib.Ok, error)
EditInlineMessageLiveLocation Edits the content of a live location in an inline message sent via a bot; for bots only @param inlineMessageID Inline message identifier @param replyMarkup The new message reply markup @param location New location content of the message; may be null. Pass null to stop sharing the live location @param heading The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown @param proximityAlertRadius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled
func (*Client) EditInlineMessageMedia ¶
func (client *Client) EditInlineMessageMedia(inlineMessageID string, replyMarkup tdlib.ReplyMarkup, inputMessageContent tdlib.InputMessageContent) (*tdlib.Ok, error)
EditInlineMessageMedia Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message sent via a bot; for bots only @param inlineMessageID Inline message identifier @param replyMarkup The new message reply markup; for bots only @param inputMessageContent New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo
func (*Client) EditInlineMessageReplyMarkup ¶
func (client *Client) EditInlineMessageReplyMarkup(inlineMessageID string, replyMarkup tdlib.ReplyMarkup) (*tdlib.Ok, error)
EditInlineMessageReplyMarkup Edits the reply markup of an inline message sent via a bot; for bots only @param inlineMessageID Inline message identifier @param replyMarkup The new message reply markup
func (*Client) EditInlineMessageText ¶
func (client *Client) EditInlineMessageText(inlineMessageID string, replyMarkup tdlib.ReplyMarkup, inputMessageContent tdlib.InputMessageContent) (*tdlib.Ok, error)
EditInlineMessageText Edits the text of an inline text or game message sent via a bot; for bots only @param inlineMessageID Inline message identifier @param replyMarkup The new message reply markup @param inputMessageContent New text content of the message. Should be of type inputMessageText
func (*Client) EditMessageCaption ¶
func (client *Client) EditMessageCaption(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup, caption *tdlib.FormattedText) (*tdlib.Message, error)
EditMessageCaption Edits the message content caption. Returns the edited message after the edit is completed on the server side @param chatID The chat the message belongs to @param messageID Identifier of the message @param replyMarkup The new message reply markup; for bots only @param caption New message content caption; 0-GetOption("message_caption_length_max") characters
func (*Client) EditMessageLiveLocation ¶
func (client *Client) EditMessageLiveLocation(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup, location *tdlib.Location, heading int32, proximityAlertRadius int32) (*tdlib.Message, error)
EditMessageLiveLocation Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side @param chatID The chat the message belongs to @param messageID Identifier of the message @param replyMarkup The new message reply markup; for bots only @param location New location content of the message; may be null. Pass null to stop sharing the live location @param heading The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown @param proximityAlertRadius The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled
func (*Client) EditMessageMedia ¶
func (client *Client) EditMessageMedia(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup, inputMessageContent tdlib.InputMessageContent) (*tdlib.Message, error)
EditMessageMedia Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side @param chatID The chat the message belongs to @param messageID Identifier of the message @param replyMarkup The new message reply markup; for bots only @param inputMessageContent New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo
func (*Client) EditMessageReplyMarkup ¶
func (client *Client) EditMessageReplyMarkup(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup) (*tdlib.Message, error)
EditMessageReplyMarkup Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side @param chatID The chat the message belongs to @param messageID Identifier of the message @param replyMarkup The new message reply markup
func (*Client) EditMessageSchedulingState ¶
func (client *Client) EditMessageSchedulingState(chatID int64, messageID int64, schedulingState tdlib.MessageSchedulingState) (*tdlib.Ok, error)
EditMessageSchedulingState Edits the time when a scheduled message will be sent. Scheduling state of all messages in the same album or forwarded together with the message will be also changed @param chatID The chat the message belongs to @param messageID Identifier of the message @param schedulingState The new message scheduling state. Pass null to send the message immediately
func (*Client) EditMessageText ¶
func (client *Client) EditMessageText(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup, inputMessageContent tdlib.InputMessageContent) (*tdlib.Message, error)
EditMessageText Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side @param chatID The chat the message belongs to @param messageID Identifier of the message @param replyMarkup The new message reply markup; for bots only @param inputMessageContent New text content of the message. Should be of type inputMessageText
func (*Client) EditProxy ¶
func (client *Client) EditProxy(proxyID int32, server string, port int32, enable bool, typeParam tdlib.ProxyType) (*tdlib.Proxy, error)
EditProxy Edits an existing proxy server for network requests. Can be called before authorization @param proxyID Proxy identifier @param server Proxy server IP address @param port Proxy server port @param enable True, if the proxy should be enabled @param typeParam Proxy type
func (*Client) EnableProxy ¶
EnableProxy Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization @param proxyID Proxy identifier
func (*Client) EndGroupCallRecording ¶
EndGroupCallRecording Ends recording of an active group call. Requires groupCall.can_be_managed group call flag @param groupCallID Group call identifier
func (*Client) EndGroupCallScreenSharing ¶
EndGroupCallScreenSharing Ends screen sharing in a joined group call @param groupCallID Group call identifier
func (*Client) Execute ¶
Execute Synchronously executes TDLib request. Only a few requests can be executed synchronously.
func (*Client) FinishFileGeneration ¶
func (client *Client) FinishFileGeneration(generationID *tdlib.JSONInt64, error *tdlib.Error) (*tdlib.Ok, error)
FinishFileGeneration Finishes the file generation @param generationID The identifier of the generation process @param error If set, means that file generation has failed and should be terminated
func (*Client) ForwardMessages ¶
func (client *Client) ForwardMessages(chatID int64, fromChatID int64, messageIDs []int64, options *tdlib.MessageSendOptions, sendCopy bool, removeCaption bool, onlyPreview bool) (*tdlib.Messages, error)
ForwardMessages Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message @param chatID Identifier of the chat to which to forward messages @param fromChatID Identifier of the chat from which to forward messages @param messageIDs Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously @param options Options to be used to send the messages @param sendCopy If true, content of the messages will be copied without links to the original messages. Always true if the messages are forwarded to a secret chat @param removeCaption If true, media caption of message copies will be removed. Ignored if send_copy is false @param onlyPreview If true, messages will not be forwarded and instead fake messages will be returned
func (*Client) GetAccountTTL ¶
func (client *Client) GetAccountTTL() (*tdlib.AccountTTL, error)
GetAccountTTL Returns the period of inactivity after which the account of the current user will automatically be deleted
func (*Client) GetActiveLiveLocationMessages ¶
GetActiveLiveLocationMessages Returns all active live locations that should be updated by the application. The list is persistent across application restarts only if the message database is used
func (*Client) GetActiveSessions ¶
GetActiveSessions Returns all active sessions of the current user
func (*Client) GetAllPassportElements ¶
func (client *Client) GetAllPassportElements(password string) (*tdlib.PassportElements, error)
GetAllPassportElements Returns all available Telegram Passport elements @param password Password of the current user
func (*Client) GetApplicationConfig ¶
GetApplicationConfig Returns application config, provided by the server. Can be called before authorization
func (*Client) GetApplicationDownloadLink ¶
GetApplicationDownloadLink Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram
func (*Client) GetArchivedStickerSets ¶
func (client *Client) GetArchivedStickerSets(isMasks bool, offsetStickerSetID *tdlib.JSONInt64, limit int32) (*tdlib.StickerSets, error)
GetArchivedStickerSets Returns a list of archived sticker sets @param isMasks Pass true to return mask stickers sets; pass false to return ordinary sticker sets @param offsetStickerSetID Identifier of the sticker set from which to return the result @param limit The maximum number of sticker sets to return
func (*Client) GetAttachedStickerSets ¶
func (client *Client) GetAttachedStickerSets(fileID int32) (*tdlib.StickerSets, error)
GetAttachedStickerSets Returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets @param fileID File identifier
func (*Client) GetAuthorizationState ¶
func (client *Client) GetAuthorizationState() (tdlib.AuthorizationState, error)
GetAuthorizationState Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state. Can be called before initialization
func (*Client) GetAutoDownloadSettingsPresets ¶
func (client *Client) GetAutoDownloadSettingsPresets() (*tdlib.AutoDownloadSettingsPresets, error)
GetAutoDownloadSettingsPresets Returns auto-download settings presets for the current user
func (*Client) GetBackgroundURL ¶
func (client *Client) GetBackgroundURL(name string, typeParam tdlib.BackgroundType) (*tdlib.HttpURL, error)
GetBackgroundURL Constructs a persistent HTTP URL for a background @param name Background name @param typeParam Background type
func (*Client) GetBackgrounds ¶
func (client *Client) GetBackgrounds(forDarkTheme bool) (*tdlib.Backgrounds, error)
GetBackgrounds Returns backgrounds installed by the user @param forDarkTheme True, if the backgrounds must be ordered for dark theme
func (*Client) GetBankCardInfo ¶
func (client *Client) GetBankCardInfo(bankCardNumber string) (*tdlib.BankCardInfo, error)
GetBankCardInfo Returns information about a bank card @param bankCardNumber The bank card number
func (*Client) GetBasicGroup ¶
func (client *Client) GetBasicGroup(basicGroupID int64) (*tdlib.BasicGroup, error)
GetBasicGroup Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot @param basicGroupID Basic group identifier
func (*Client) GetBasicGroupFullInfo ¶
func (client *Client) GetBasicGroupFullInfo(basicGroupID int64) (*tdlib.BasicGroupFullInfo, error)
GetBasicGroupFullInfo Returns full information about a basic group by its identifier @param basicGroupID Basic group identifier
func (*Client) GetBlockedMessageSenders ¶
func (client *Client) GetBlockedMessageSenders(offset int32, limit int32) (*tdlib.MessageSenders, error)
GetBlockedMessageSenders Returns users and chats that were blocked by the current user @param offset Number of users and chats to skip in the result; must be non-negative @param limit The maximum number of users and chats to return; up to 100
func (*Client) GetCallbackQueryAnswer ¶
func (client *Client) GetCallbackQueryAnswer(chatID int64, messageID int64, payload tdlib.CallbackQueryPayload) (*tdlib.CallbackQueryAnswer, error)
GetCallbackQueryAnswer Sends a callback query to a bot and returns an answer. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @param chatID Identifier of the chat with the message @param messageID Identifier of the message from which the query originated @param payload Query payload
func (*Client) GetCallbackQueryMessage ¶
func (client *Client) GetCallbackQueryMessage(chatID int64, messageID int64, callbackQueryID *tdlib.JSONInt64) (*tdlib.Message, error)
GetCallbackQueryMessage Returns information about a message with the callback button that originated a callback query; for bots only @param chatID Identifier of the chat the message belongs to @param messageID Message identifier @param callbackQueryID Identifier of the callback query
func (*Client) GetChat ¶
GetChat Returns information about a chat by its identifier, this is an offline request if the current user is not a bot @param chatID Chat identifier
func (*Client) GetChatAdministrators ¶
func (client *Client) GetChatAdministrators(chatID int64) (*tdlib.ChatAdministrators, error)
GetChatAdministrators Returns a list of administrators of the chat with their custom titles @param chatID Chat identifier
func (*Client) GetChatEventLog ¶
func (client *Client) GetChatEventLog(chatID int64, query string, fromEventID *tdlib.JSONInt64, limit int32, filters *tdlib.ChatEventLogFilters, userIDs []int64) (*tdlib.ChatEvents, error)
GetChatEventLog Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing event_id) @param chatID Chat identifier @param query Search query by which to filter events @param fromEventID Identifier of an event from which to return results. Use 0 to get results from the latest events @param limit The maximum number of events to return; up to 100 @param filters The types of events to return. By default, all types will be returned @param userIDs User identifiers by which to filter events. By default, events relating to all users will be returned
func (*Client) GetChatFilter ¶
func (client *Client) GetChatFilter(chatFilterID int32) (*tdlib.ChatFilter, error)
GetChatFilter Returns information about a chat filter by its identifier @param chatFilterID Chat filter identifier
func (*Client) GetChatFilterDefaultIconName ¶
GetChatFilterDefaultIconName Returns default icon name for a filter. Can be called synchronously @param filter Chat filter
func (*Client) GetChatHistory ¶
func (client *Client) GetChatHistory(chatID int64, fromMessageID int64, offset int32, limit int32, onlyLocal bool) (*tdlib.Messages, error)
GetChatHistory Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib. This is an offline request if only_local is true @param chatID Chat identifier @param fromMessageID Identifier of the message starting from which history must be fetched; use 0 to get results from the last message @param offset Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally some newer messages @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit @param onlyLocal If true, returns only messages that are available locally without sending network requests
func (*Client) GetChatInviteLink ¶
func (client *Client) GetChatInviteLink(chatID int64, inviteLink string) (*tdlib.ChatInviteLink, error)
GetChatInviteLink Returns information about an invite link. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links @param chatID Chat identifier @param inviteLink Invite link to get
func (*Client) GetChatInviteLinkCounts ¶
func (client *Client) GetChatInviteLinkCounts(chatID int64) (*tdlib.ChatInviteLinkCounts, error)
GetChatInviteLinkCounts Returns list of chat administrators with number of their invite links. Requires owner privileges in the chat @param chatID Chat identifier
func (*Client) GetChatInviteLinkMembers ¶
func (client *Client) GetChatInviteLinkMembers(chatID int64, inviteLink string, offsetMember *tdlib.ChatInviteLinkMember, limit int32) (*tdlib.ChatInviteLinkMembers, error)
GetChatInviteLinkMembers Returns chat members joined a chat by an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @param chatID Chat identifier @param inviteLink Invite link for which to return chat members @param offsetMember A chat member from which to return next chat members; use null to get results from the beginning @param limit The maximum number of chat members to return
func (*Client) GetChatInviteLinks ¶
func (client *Client) GetChatInviteLinks(chatID int64, creatorUserID int64, isRevoked bool, offsetDate int32, offsetInviteLink string, limit int32) (*tdlib.ChatInviteLinks, error)
GetChatInviteLinks Returns invite links for a chat created by specified administrator. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links @param chatID Chat identifier @param creatorUserID User identifier of a chat administrator. Must be an identifier of the current user for non-owner @param isRevoked Pass true if revoked links needs to be returned instead of active or expired @param offsetDate Creation date of an invite link starting after which to return invite links; use 0 to get results from the beginning @param offsetInviteLink Invite link starting after which to return invite links; use empty string to get results from the beginning @param limit The maximum number of invite links to return
func (*Client) GetChatListsToAddChat ¶
GetChatListsToAddChat Returns chat lists to which the chat can be added. This is an offline request @param chatID Chat identifier
func (*Client) GetChatMember ¶
func (client *Client) GetChatMember(chatID int64, memberID tdlib.MessageSender) (*tdlib.ChatMember, error)
GetChatMember Returns information about a single member of a chat @param chatID Chat identifier @param memberID Member identifier
func (*Client) GetChatMessageByDate ¶
GetChatMessageByDate Returns the last message sent in a chat no later than the specified date @param chatID Chat identifier @param date Point in time (Unix timestamp) relative to which to search for messages
func (*Client) GetChatMessageCount ¶
func (client *Client) GetChatMessageCount(chatID int64, filter tdlib.SearchMessagesFilter, returnLocal bool) (*tdlib.Count, error)
GetChatMessageCount Returns approximate number of messages of the specified type in the chat @param chatID Identifier of the chat in which to count messages @param filter Filter for message content; searchMessagesFilterEmpty is unsupported in this function @param returnLocal If true, returns count that is available locally without sending network requests, returning -1 if the number of messages is unknown
func (*Client) GetChatNotificationSettingsExceptions ¶
func (client *Client) GetChatNotificationSettingsExceptions(scope tdlib.NotificationSettingsScope, compareSound bool) (*tdlib.Chats, error)
GetChatNotificationSettingsExceptions Returns list of chats with non-default notification settings @param scope If specified, only chats from the specified scope will be returned @param compareSound If true, also chats with non-default sound will be returned
func (*Client) GetChatPinnedMessage ¶
GetChatPinnedMessage Returns information about a newest pinned message in the chat @param chatID Identifier of the chat the message belongs to
func (*Client) GetChatScheduledMessages ¶
GetChatScheduledMessages Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id) @param chatID Chat identifier
func (*Client) GetChatSponsoredMessages ¶
func (client *Client) GetChatSponsoredMessages(chatID int64) (*tdlib.SponsoredMessages, error)
GetChatSponsoredMessages Returns sponsored messages to be shown in a chat; for channel chats only @param chatID Identifier of the chat
func (*Client) GetChatStatistics ¶
GetChatStatistics Returns detailed statistics about a chat. Currently this method can be used only for supergroups and channels. Can be used only if SupergroupFullInfo.can_get_statistics == true @param chatID Chat identifier @param isDark Pass true if a dark theme is used by the application
func (*Client) GetChatStatisticsURL ¶
func (client *Client) GetChatStatisticsURL(chatID int64, parameters string, isDark bool) (*tdlib.HttpURL, error)
GetChatStatisticsURL Returns an HTTP URL with the chat statistics. Currently this method of getting the statistics are disabled and can be deleted in the future @param chatID Chat identifier @param parameters Parameters for the request @param isDark Pass true if a URL with the dark theme must be returned
func (*Client) GetChats ¶
GetChats Returns an ordered list of chats from the beginning of a chat list. For informational purposes only. Use loadChats instead to maintain chat lists @param chatList The chat list in which to return chats @param limit The maximum number of chats to be returned
func (*Client) GetCommands ¶
func (client *Client) GetCommands(scope tdlib.BotCommandScope, languageCode string) (*tdlib.BotCommands, error)
GetCommands Returns the list of commands supported by the bot for the given user scope and language; for bots only @param scope The scope to which the commands are relevant @param languageCode A two-letter ISO 639-1 country code or an empty string
func (*Client) GetConnectedWebsites ¶
func (client *Client) GetConnectedWebsites() (*tdlib.ConnectedWebsites, error)
GetConnectedWebsites Returns all website where the current user used Telegram to log in
func (*Client) GetContacts ¶
GetContacts Returns all user contacts
func (*Client) GetCountries ¶
GetCountries Returns information about existing countries. Can be called before authorization
func (*Client) GetCountryCode ¶
GetCountryCode Uses the current IP address to find the current country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization
func (*Client) GetCreatedPublicChats ¶
GetCreatedPublicChats Returns a list of public chats of the specified type, owned by the user @param typeParam Type of the public chats to return
func (*Client) GetCurrentState ¶
GetCurrentState Returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationState/UpdateUser/UpdateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization
func (*Client) GetDatabaseStatistics ¶
func (client *Client) GetDatabaseStatistics() (*tdlib.DatabaseStatistics, error)
GetDatabaseStatistics Returns database statistics
func (*Client) GetDeepLinkInfo ¶
func (client *Client) GetDeepLinkInfo(link string) (*tdlib.DeepLinkInfo, error)
GetDeepLinkInfo Returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:some_unsupported_feature" for testing. Returns a 404 error for unknown links. Can be called before authorization @param link The link
func (*Client) GetEmojiSuggestionsURL ¶
GetEmojiSuggestionsURL Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation @param languageCode Language code for which the emoji replacements will be suggested
func (*Client) GetExternalLink ¶
GetExternalLink Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed @param link The HTTP link @param allowWriteAccess True, if the current user allowed the bot, returned in getExternalLinkInfo, to send them messages
func (*Client) GetExternalLinkInfo ¶
func (client *Client) GetExternalLinkInfo(link string) (tdlib.LoginURLInfo, error)
GetExternalLinkInfo Returns information about an action to be done when the current user clicks an external link. Don't use this method for links from secret chats if web page preview is disabled in secret chats @param link The link
func (*Client) GetFavoriteStickers ¶
GetFavoriteStickers Returns favorite stickers
func (*Client) GetFile ¶
GetFile Returns information about a file; this is an offline request @param fileID Identifier of the file to get
func (*Client) GetFileDownloadedPrefixSize ¶
GetFileDownloadedPrefixSize Returns file downloaded prefix size from a given offset, in bytes @param fileID Identifier of the file @param offset Offset from which downloaded prefix size should be calculated
func (*Client) GetFileExtension ¶
GetFileExtension Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously @param mimeType The MIME type of the file
func (*Client) GetFileMimeType ¶
GetFileMimeType Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously @param fileName The name of the file or path to the file
func (*Client) GetGameHighScores ¶
func (client *Client) GetGameHighScores(chatID int64, messageID int64, userID int64) (*tdlib.GameHighScores, error)
GetGameHighScores Returns the high scores for a game and some part of the high score table in the range of the specified user; for bots only @param chatID The chat that contains the message with the game @param messageID Identifier of the message @param userID User identifier
func (*Client) GetGroupCall ¶
GetGroupCall Returns information about a group call @param groupCallID Group call identifier
func (*Client) GetGroupCallInviteLink ¶
func (client *Client) GetGroupCallInviteLink(groupCallID int32, canSelfUnmute bool) (*tdlib.HttpURL, error)
GetGroupCallInviteLink Returns invite link to a voice chat in a public chat @param groupCallID Group call identifier @param canSelfUnmute Pass true if the invite_link should contain an invite hash, passing which to joinGroupCall would allow the invited user to unmute themselves. Requires groupCall.can_be_managed group call flag
func (*Client) GetGroupCallStreamSegment ¶
func (client *Client) GetGroupCallStreamSegment(groupCallID int32, timeOffset int64, scale int32, channelID int32, videoQuality tdlib.GroupCallVideoQuality) (*tdlib.FilePart, error)
GetGroupCallStreamSegment Returns a file with a segment of a group call stream in a modified OGG format for audio or MPEG-4 format for video @param groupCallID Group call identifier @param timeOffset Point in time when the stream segment begins; Unix timestamp in milliseconds @param scale Segment duration scale; 0-1. Segment's duration is 1000/(2**scale) milliseconds @param channelID Identifier of an audio/video channel to get as received from tgcalls @param videoQuality Video quality as received from tgcalls
func (*Client) GetGroupsInCommon ¶
func (client *Client) GetGroupsInCommon(userID int64, offsetChatID int64, limit int32) (*tdlib.Chats, error)
GetGroupsInCommon Returns a list of common group chats with a given user. Chats are sorted by their type and creation date @param userID User identifier @param offsetChatID Chat identifier starting from which to return chats; use 0 for the first request @param limit The maximum number of chats to be returned; up to 100
func (*Client) GetImportedContactCount ¶
GetImportedContactCount Returns the total number of imported contacts
func (*Client) GetInactiveSupergroupChats ¶
GetInactiveSupergroupChats Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error
func (*Client) GetInlineGameHighScores ¶
func (client *Client) GetInlineGameHighScores(inlineMessageID string, userID int64) (*tdlib.GameHighScores, error)
GetInlineGameHighScores Returns game high scores and some part of the high score table in the range of the specified user; for bots only @param inlineMessageID Inline message identifier @param userID User identifier
func (*Client) GetInlineQueryResults ¶
func (client *Client) GetInlineQueryResults(botUserID int64, chatID int64, userLocation *tdlib.Location, query string, offset string) (*tdlib.InlineQueryResults, error)
GetInlineQueryResults Sends an inline query to a bot and returns its results. Returns an error with code 502 if the bot fails to answer the query before the query timeout expires @param botUserID The identifier of the target bot @param chatID Identifier of the chat where the query was sent @param userLocation Location of the user, only if needed @param query Text of the query @param offset Offset of the first entry to return
func (*Client) GetInstalledStickerSets ¶
func (client *Client) GetInstalledStickerSets(isMasks bool) (*tdlib.StickerSets, error)
GetInstalledStickerSets Returns a list of installed sticker sets @param isMasks Pass true to return mask sticker sets; pass false to return ordinary sticker sets
func (*Client) GetInternalLinkType ¶
func (client *Client) GetInternalLinkType(link string) (tdlib.InternalLinkType, error)
GetInternalLinkType Returns information about the type of an internal link. Returns a 404 error if the link is not internal. Can be called before authorization @param link The link
func (*Client) GetJsonString ¶
GetJsonString Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously @param jsonStringValue The JsonValue object
func (*Client) GetJsonValue ¶
GetJsonValue Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously @param jsonString The JSON-serialized string
func (*Client) GetLanguagePackInfo ¶
func (client *Client) GetLanguagePackInfo(languagePackID string) (*tdlib.LanguagePackInfo, error)
GetLanguagePackInfo Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization @param languagePackID Language pack identifier
func (*Client) GetLanguagePackString ¶
func (client *Client) GetLanguagePackString(languagePackDatabasePath string, localizationTarget string, languagePackID string, key string) (tdlib.LanguagePackStringValue, error)
GetLanguagePackString Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously @param languagePackDatabasePath Path to the language pack database in which strings are stored @param localizationTarget Localization target to which the language pack belongs @param languagePackID Language pack identifier @param key Language pack key of the string to be returned
func (*Client) GetLanguagePackStrings ¶
func (client *Client) GetLanguagePackStrings(languagePackID string, keys []string) (*tdlib.LanguagePackStrings, error)
GetLanguagePackStrings Returns strings from a language pack in the current localization target by their keys. Can be called before authorization @param languagePackID Language pack identifier of the strings to be returned @param keys Language pack keys of the strings to be returned; leave empty to request all available strings
func (*Client) GetLocalizationTargetInfo ¶
func (client *Client) GetLocalizationTargetInfo(onlyLocal bool) (*tdlib.LocalizationTargetInfo, error)
GetLocalizationTargetInfo Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization @param onlyLocal If true, returns only locally available information without sending network requests
func (*Client) GetLogStream ¶
GetLogStream Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously
func (*Client) GetLogTagVerbosityLevel ¶
func (client *Client) GetLogTagVerbosityLevel(tag string) (*tdlib.LogVerbosityLevel, error)
GetLogTagVerbosityLevel Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously @param tag Logging tag to change verbosity level
func (*Client) GetLogTags ¶
GetLogTags Returns list of available TDLib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. Can be called synchronously
func (*Client) GetLogVerbosityLevel ¶
func (client *Client) GetLogVerbosityLevel() (*tdlib.LogVerbosityLevel, error)
GetLogVerbosityLevel Returns current verbosity level of the internal logging of TDLib. Can be called synchronously
func (*Client) GetLoginURL ¶
func (client *Client) GetLoginURL(chatID int64, messageID int64, buttonID int64, allowWriteAccess bool) (*tdlib.HttpURL, error)
GetLoginURL Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline button of type inlineKeyboardButtonTypeLoginUrl. Use the method getLoginUrlInfo to find whether a prior user confirmation is needed. If an error is returned, then the button must be handled as an ordinary URL button @param chatID Chat identifier of the message with the button @param messageID Message identifier of the message with the button @param buttonID Button identifier @param allowWriteAccess True, if the user allowed the bot to send them messages
func (*Client) GetLoginURLInfo ¶
func (client *Client) GetLoginURLInfo(chatID int64, messageID int64, buttonID int64) (tdlib.LoginURLInfo, error)
GetLoginURLInfo Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button @param chatID Chat identifier of the message with the button @param messageID Message identifier of the message with the button @param buttonID Button identifier
func (*Client) GetMapThumbnailFile ¶
func (client *Client) GetMapThumbnailFile(location *tdlib.Location, zoom int32, width int32, height int32, scale int32, chatID int64) (*tdlib.File, error)
GetMapThumbnailFile Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded @param location Location of the map center @param zoom Map zoom level; 13-20 @param width Map width in pixels before applying scale; 16-1024 @param height Map height in pixels before applying scale; 16-1024 @param scale Map scale; 1-3 @param chatID Identifier of a chat, in which the thumbnail will be shown. Use 0 if unknown
func (*Client) GetMarkdownText ¶
func (client *Client) GetMarkdownText(text *tdlib.FormattedText) (*tdlib.FormattedText, error)
GetMarkdownText Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously @param text The text
func (*Client) GetMessage ¶
GetMessage Returns information about a message @param chatID Identifier of the chat the message belongs to @param messageID Identifier of the message to get
func (*Client) GetMessageEmbeddingCode ¶
func (client *Client) GetMessageEmbeddingCode(chatID int64, messageID int64, forAlbum bool) (*tdlib.Text, error)
GetMessageEmbeddingCode Returns an HTML code for embedding the message. Available only for messages in supergroups and channels with a username @param chatID Identifier of the chat to which the message belongs @param messageID Identifier of the message @param forAlbum Pass true to return an HTML code for embedding of the whole media album
func (*Client) GetMessageFileType ¶
func (client *Client) GetMessageFileType(messageFileHead string) (tdlib.MessageFileType, error)
GetMessageFileType Returns information about a file with messages exported from another app @param messageFileHead Beginning of the message file; up to 100 first lines
func (*Client) GetMessageImportConfirmationText ¶
GetMessageImportConfirmationText Returns a confirmation text to be shown to the user before starting message import @param chatID Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right
func (*Client) GetMessageLink ¶
func (client *Client) GetMessageLink(chatID int64, messageID int64, mediaTimestamp int32, forAlbum bool, forComment bool) (*tdlib.MessageLink, error)
GetMessageLink Returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels, or if message.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline request @param chatID Identifier of the chat to which the message belongs @param messageID Identifier of the message @param mediaTimestamp If not 0, timestamp from which the video/audio/video note/voice note playing should start, in seconds. The media can be in the message content or in its web page preview @param forAlbum Pass true to create a link for the whole media album @param forComment Pass true to create a link to the message as a channel post comment, or from a message thread
func (*Client) GetMessageLinkInfo ¶
func (client *Client) GetMessageLinkInfo(uRL string) (*tdlib.MessageLinkInfo, error)
GetMessageLinkInfo Returns information about a public or private message link. Can be called for any internal link of the type internalLinkTypeMessage @param uRL The message link
func (*Client) GetMessageLocally ¶
GetMessageLocally Returns information about a message, if it is available locally without sending network request. This is an offline request @param chatID Identifier of the chat the message belongs to @param messageID Identifier of the message to get
func (*Client) GetMessagePublicForwards ¶
func (client *Client) GetMessagePublicForwards(chatID int64, messageID int64, offset string, limit int32) (*tdlib.FoundMessages, error)
GetMessagePublicForwards Returns forwarded copies of a channel message to different public channels. For optimal performance, the number of returned messages is chosen by TDLib @param chatID Chat identifier of the message @param messageID Message identifier @param offset Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
func (*Client) GetMessageStatistics ¶
func (client *Client) GetMessageStatistics(chatID int64, messageID int64, isDark bool) (*tdlib.MessageStatistics, error)
GetMessageStatistics Returns detailed statistics about a message. Can be used only if Message.can_get_statistics == true @param chatID Chat identifier @param messageID Message identifier @param isDark Pass true if a dark theme is used by the application
func (*Client) GetMessageThread ¶
func (client *Client) GetMessageThread(chatID int64, messageID int64) (*tdlib.MessageThreadInfo, error)
GetMessageThread Returns information about a message thread. Can be used only if message.can_get_message_thread == true @param chatID Chat identifier @param messageID Identifier of the message
func (*Client) GetMessageThreadHistory ¶
func (client *Client) GetMessageThreadHistory(chatID int64, messageID int64, fromMessageID int64, offset int32, limit int32) (*tdlib.Messages, error)
GetMessageThreadHistory Returns messages in a message thread of a message. Can be used only if message.can_get_message_thread == true. Message thread of a channel message is in the channel's linked supergroup. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib @param chatID Chat identifier @param messageID Message identifier, which thread history needs to be returned @param fromMessageID Identifier of the message starting from which history must be fetched; use 0 to get results from the last message @param offset Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally some newer messages @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
func (*Client) GetMessages ¶
GetMessages Returns information about messages. If a message is not found, returns null on the corresponding position of the result @param chatID Identifier of the chat the messages belong to @param messageIDs Identifiers of the messages to get
func (*Client) GetNetworkStatistics ¶
func (client *Client) GetNetworkStatistics(onlyCurrent bool) (*tdlib.NetworkStatistics, error)
GetNetworkStatistics Returns network data usage statistics. Can be called before authorization @param onlyCurrent If true, returns only data for the current library launch
func (*Client) GetOption ¶
func (client *Client) GetOption(name string) (tdlib.OptionValue, error)
GetOption Returns the value of an option by its name. (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before authorization @param name The name of the option
func (*Client) GetPassportAuthorizationForm ¶
func (client *Client) GetPassportAuthorizationForm(botUserID int64, scope string, publicKey string, nonce string) (*tdlib.PassportAuthorizationForm, error)
GetPassportAuthorizationForm Returns a Telegram Passport authorization form for sharing data with a service @param botUserID User identifier of the service's bot @param scope Telegram Passport element types requested by the service @param publicKey Service's public key @param nonce Unique request identifier provided by the service
func (*Client) GetPassportAuthorizationFormAvailableElements ¶
func (client *Client) GetPassportAuthorizationFormAvailableElements(autorizationFormID int32, password string) (*tdlib.PassportElementsWithErrors, error)
GetPassportAuthorizationFormAvailableElements Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form @param autorizationFormID Authorization form identifier @param password Password of the current user
func (*Client) GetPassportElement ¶
func (client *Client) GetPassportElement(typeParam tdlib.PassportElementType, password string) (tdlib.PassportElement, error)
GetPassportElement Returns one of the available Telegram Passport elements @param typeParam Telegram Passport element type @param password Password of the current user
func (*Client) GetPasswordState ¶
func (client *Client) GetPasswordState() (*tdlib.PasswordState, error)
GetPasswordState Returns the current state of 2-step verification
func (*Client) GetPaymentForm ¶
func (client *Client) GetPaymentForm(chatID int64, messageID int64, theme *tdlib.PaymentFormTheme) (*tdlib.PaymentForm, error)
GetPaymentForm Returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy @param chatID Chat identifier of the Invoice message @param messageID Message identifier @param theme Preferred payment form theme
func (*Client) GetPaymentReceipt ¶
func (client *Client) GetPaymentReceipt(chatID int64, messageID int64) (*tdlib.PaymentReceipt, error)
GetPaymentReceipt Returns information about a successful payment @param chatID Chat identifier of the PaymentSuccessful message @param messageID Message identifier
func (*Client) GetPhoneNumberInfo ¶
func (client *Client) GetPhoneNumberInfo(phoneNumberPrefix string) (*tdlib.PhoneNumberInfo, error)
GetPhoneNumberInfo Returns information about a phone number by its prefix. Can be called before authorization @param phoneNumberPrefix The phone number prefix
func (*Client) GetPhoneNumberInfoSync ¶
func (client *Client) GetPhoneNumberInfoSync(languageCode string, phoneNumberPrefix string) (*tdlib.PhoneNumberInfo, error)
GetPhoneNumberInfoSync Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously @param languageCode A two-letter ISO 639-1 country code for country information localization @param phoneNumberPrefix The phone number prefix
func (*Client) GetPollVoters ¶
func (client *Client) GetPollVoters(chatID int64, messageID int64, optionID int32, offset int32, limit int32) (*tdlib.Users, error)
GetPollVoters Returns users voted for the specified option in a non-anonymous polls. For optimal performance, the number of returned users is chosen by TDLib @param chatID Identifier of the chat to which the poll belongs @param messageID Identifier of the message containing the poll @param optionID 0-based identifier of the answer option @param offset Number of users to skip in the result; must be non-negative @param limit The maximum number of users to be returned; must be positive and can't be greater than 50. For optimal performance, the number of returned users is chosen by TDLib and can be smaller than the specified limit, even if the end of the voter list has not been reached
func (*Client) GetPreferredCountryLanguage ¶
GetPreferredCountryLanguage Returns an IETF language tag of the language preferred in the country, which should be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown @param countryCode A two-letter ISO 3166-1 alpha-2 country code
func (*Client) GetProxies ¶
GetProxies Returns list of proxies that are currently set up. Can be called before authorization
func (*Client) GetProxyLink ¶
GetProxyLink Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization @param proxyID Proxy identifier
func (*Client) GetPushReceiverID ¶
func (client *Client) GetPushReceiverID(payload string) (*tdlib.PushReceiverID, error)
GetPushReceiverID Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously @param payload JSON-encoded push notification payload
func (*Client) GetRawUpdatesChannel ¶
GetRawUpdatesChannel creates a general channel that fetches every update comming from tdlib
func (*Client) GetRecentInlineBots ¶
GetRecentInlineBots Returns up to 20 recently used inline bots in the order of their last usage
func (*Client) GetRecentStickers ¶
GetRecentStickers Returns a list of recently used stickers @param isAttached Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers
func (*Client) GetRecentlyOpenedChats ¶
GetRecentlyOpenedChats Returns recently opened chats, this is an offline request. Returns chats in the order of last opening @param limit The maximum number of chats to be returned
func (*Client) GetRecentlyVisitedTMeURLs ¶
GetRecentlyVisitedTMeURLs Returns t.me URLs recently visited by a newly registered user @param referrer Google Play referrer to identify the user
func (*Client) GetRecommendedChatFilters ¶
func (client *Client) GetRecommendedChatFilters() (*tdlib.RecommendedChatFilters, error)
GetRecommendedChatFilters Returns recommended chat filters for the current user
func (*Client) GetRecoveryEmailAddress ¶
func (client *Client) GetRecoveryEmailAddress(password string) (*tdlib.RecoveryEmailAddress, error)
GetRecoveryEmailAddress Returns a 2-step verification recovery email address that was previously set up. This method can be used to verify a password provided by the user @param password The password for the current user
func (*Client) GetRemoteFile ¶
func (client *Client) GetRemoteFile(remoteFileID string, fileType tdlib.FileType) (*tdlib.File, error)
GetRemoteFile Returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user. For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application @param remoteFileID Remote identifier of the file to get @param fileType File type, if known
func (*Client) GetRepliedMessage ¶
GetRepliedMessage Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, and the invoice message for messages of the types messagePinMessage, messageGameScore, and messagePaymentSuccessful respectively @param chatID Identifier of the chat the message belongs to @param messageID Identifier of the message reply to which to get
func (*Client) GetSavedAnimations ¶
func (client *Client) GetSavedAnimations() (*tdlib.Animations, error)
GetSavedAnimations Returns saved animations
func (*Client) GetSavedOrderInfo ¶
GetSavedOrderInfo Returns saved order info, if any
func (*Client) GetScopeNotificationSettings ¶
func (client *Client) GetScopeNotificationSettings(scope tdlib.NotificationSettingsScope) (*tdlib.ScopeNotificationSettings, error)
GetScopeNotificationSettings Returns the notification settings for chats of a given type @param scope Types of chats for which to return the notification settings information
func (*Client) GetSecretChat ¶
func (client *Client) GetSecretChat(secretChatID int32) (*tdlib.SecretChat, error)
GetSecretChat Returns information about a secret chat by its identifier. This is an offline request @param secretChatID Secret chat identifier
func (*Client) GetStatisticalGraph ¶
func (client *Client) GetStatisticalGraph(chatID int64, token string, x int64) (tdlib.StatisticalGraph, error)
GetStatisticalGraph Loads an asynchronous or a zoomed in statistical graph @param chatID Chat identifier @param token The token for graph loading @param x X-value for zoomed in graph or 0 otherwise
func (*Client) GetStickerEmojis ¶
GetStickerEmojis Returns emoji corresponding to a sticker. The list is only for informational purposes, because a sticker is always sent with a fixed emoji from the corresponding Sticker object @param sticker Sticker file identifier
func (*Client) GetStickerSet ¶
GetStickerSet Returns information about a sticker set by its identifier @param setID Identifier of the sticker set
func (*Client) GetStickers ¶
GetStickers Returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is not empty, favorite and recently used stickers may also be returned @param emoji String representation of emoji. If empty, returns all known installed stickers @param limit The maximum number of stickers to be returned
func (*Client) GetStorageStatistics ¶
func (client *Client) GetStorageStatistics(chatLimit int32) (*tdlib.StorageStatistics, error)
GetStorageStatistics Returns storage usage statistics. Can be called before authorization @param chatLimit The maximum number of chats with the largest storage usage for which separate statistics should be returned. All other chats will be grouped in entries with chat_id == 0. If the chat info database is not used, the chat_limit is ignored and is always set to 0
func (*Client) GetStorageStatisticsFast ¶
func (client *Client) GetStorageStatisticsFast() (*tdlib.StorageStatisticsFast, error)
GetStorageStatisticsFast Quickly returns approximate storage usage statistics. Can be called before authorization
func (*Client) GetSuggestedFileName ¶
GetSuggestedFileName Returns suggested name for saving a file in a given directory @param fileID Identifier of the file @param directory Directory in which the file is supposed to be saved
func (*Client) GetSuggestedStickerSetName ¶
GetSuggestedStickerSetName Returns a suggested name for a new sticker set with a given title @param title Sticker set title; 1-64 characters
func (*Client) GetSuitableDiscussionChats ¶
GetSuitableDiscussionChats Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first
func (*Client) GetSupergroup ¶
func (client *Client) GetSupergroup(supergroupID int64) (*tdlib.Supergroup, error)
GetSupergroup Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot @param supergroupID Supergroup or channel identifier
func (*Client) GetSupergroupFullInfo ¶
func (client *Client) GetSupergroupFullInfo(supergroupID int64) (*tdlib.SupergroupFullInfo, error)
GetSupergroupFullInfo Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute @param supergroupID Supergroup or channel identifier
func (*Client) GetSupergroupMembers ¶
func (client *Client) GetSupergroupMembers(supergroupID int64, filter tdlib.SupergroupMembersFilter, offset int32, limit int32) (*tdlib.ChatMembers, error)
GetSupergroupMembers Returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.can_get_members == true; additionally, administrator privileges may be required for some filters @param supergroupID Identifier of the supergroup or channel @param filter The type of users to return. By default, supergroupMembersFilterRecent @param offset Number of users to skip @param limit The maximum number of users be returned; up to 200
func (*Client) GetSupportUser ¶
GetSupportUser Returns a user that can be contacted to get support
func (*Client) GetTemporaryPasswordState ¶
func (client *Client) GetTemporaryPasswordState() (*tdlib.TemporaryPasswordState, error)
GetTemporaryPasswordState Returns information about the current temporary password
func (*Client) GetTextEntities ¶
func (client *Client) GetTextEntities(text string) (*tdlib.TextEntities, error)
GetTextEntities Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. Can be called synchronously @param text The text in which to look for entites
func (*Client) GetTopChats ¶
func (client *Client) GetTopChats(category tdlib.TopChatCategory, limit int32) (*tdlib.Chats, error)
GetTopChats Returns a list of frequently used chats. Supported only if the chat info database is enabled @param category Category of chats to be returned @param limit The maximum number of chats to be returned; up to 30
func (*Client) GetTrendingStickerSets ¶
GetTrendingStickerSets Returns a list of trending sticker sets. For optimal performance, the number of returned sticker sets is chosen by TDLib @param offset The offset from which to return the sticker sets; must be non-negative @param limit The maximum number of sticker sets to be returned; must be non-negative. For optimal performance, the number of returned sticker sets is chosen by TDLib and can be smaller than the specified limit, even if the end of the list has not been reached
func (*Client) GetUser ¶
GetUser Returns information about a user by their identifier. This is an offline request if the current user is not a bot @param userID User identifier
func (*Client) GetUserFullInfo ¶
func (client *Client) GetUserFullInfo(userID int64) (*tdlib.UserFullInfo, error)
GetUserFullInfo Returns full information about a user by their identifier @param userID User identifier
func (*Client) GetUserPrivacySettingRules ¶
func (client *Client) GetUserPrivacySettingRules(setting tdlib.UserPrivacySetting) (*tdlib.UserPrivacySettingRules, error)
GetUserPrivacySettingRules Returns the current privacy settings @param setting The privacy setting
func (*Client) GetUserProfilePhotos ¶
func (client *Client) GetUserProfilePhotos(userID int64, offset int32, limit int32) (*tdlib.ChatPhotos, error)
GetUserProfilePhotos Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already @param userID User identifier @param offset The number of photos to skip; must be non-negative @param limit The maximum number of photos to be returned; up to 100
func (*Client) GetVoiceChatAvailableParticipants ¶
func (client *Client) GetVoiceChatAvailableParticipants(chatID int64) (*tdlib.MessageSenders, error)
GetVoiceChatAvailableParticipants Returns list of participant identifiers, which can be used to join voice chats in a chat @param chatID Chat identifier
func (*Client) GetWebPageInstantView ¶
func (client *Client) GetWebPageInstantView(uRL string, forceFull bool) (*tdlib.WebPageInstantView, error)
GetWebPageInstantView Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page @param uRL The web page URL @param forceFull If true, the full instant view for the web page will be returned
func (*Client) GetWebPagePreview ¶
GetWebPagePreview Returns a web page preview by the text of the message. Do not call this function too often. Returns a 404 error if the web page has no preview @param text Message text with formatting
func (*Client) HideSuggestedAction ¶
HideSuggestedAction Hides a suggested action @param action Suggested action to hide
func (*Client) ImportContacts ¶
ImportContacts Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored @param contacts The list of contacts to import or edit; contacts' vCard are ignored and are not imported
func (*Client) ImportMessages ¶
func (client *Client) ImportMessages(chatID int64, messageFile tdlib.InputFile, attachedFiles []tdlib.InputFile) (*tdlib.Ok, error)
ImportMessages Imports messages exported from another app @param chatID Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right @param messageFile File with messages to import. Only inputFileLocal and inputFileGenerated are supported. The file must not be previously uploaded @param attachedFiles Files used in the imported messages. Only inputFileLocal and inputFileGenerated are supported. The files must not be previously uploaded
func (*Client) InviteGroupCallParticipants ¶
func (client *Client) InviteGroupCallParticipants(groupCallID int32, userIDs []int64) (*tdlib.Ok, error)
InviteGroupCallParticipants Invites users to an active group call. Sends a service message of type messageInviteToGroupCall for voice chats @param groupCallID Group call identifier @param userIDs User identifiers. At most 10 users can be invited simultaneously
func (*Client) JoinChat ¶
JoinChat Adds the current user as a new member to a chat. Private and secret chats can't be joined using this method @param chatID Chat identifier
func (*Client) JoinChatByInviteLink ¶
JoinChatByInviteLink Uses an invite link to add the current user to the chat if possible @param inviteLink Invite link to use
func (*Client) JoinGroupCall ¶
func (client *Client) JoinGroupCall(groupCallID int32, participantID tdlib.MessageSender, audioSourceID int32, payload string, isMuted bool, isMyVideoEnabled bool, inviteHash string) (*tdlib.Text, error)
JoinGroupCall Joins an active group call. Returns join response payload for tgcalls @param groupCallID Group call identifier @param participantID Identifier of a group call participant, which will be used to join the call; voice chats only @param audioSourceID Caller audio channel synchronization source identifier; received from tgcalls @param payload Group call join payload; received from tgcalls @param isMuted True, if the user's microphone is muted @param isMyVideoEnabled True, if the user's video is enabled @param inviteHash If non-empty, invite hash to be used to join the group call without being muted by administrators
func (*Client) LeaveChat ¶
LeaveChat Removes the current user from chat members. Private and secret chats can't be left using this method @param chatID Chat identifier
func (*Client) LeaveGroupCall ¶
LeaveGroupCall Leaves a group call @param groupCallID Group call identifier
func (*Client) LoadChats ¶
LoadChats Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats has been loaded @param chatList The chat list in which to load chats @param limit The maximum number of chats to be loaded. For optimal performance, the number of loaded chats is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached
func (*Client) LoadGroupCallParticipants ¶
LoadGroupCallParticipants Loads more participants of a group call. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants has already been loaded @param groupCallID Group call identifier. The group call must be previously received through getGroupCall and must be joined or being joined @param limit The maximum number of participants to load
func (*Client) LogOut ¶
LogOut Closes the TDLib instance after a proper logout. Requires an available network connection. All local data will be destroyed. After the logout completes, updateAuthorizationState with authorizationStateClosed will be sent
func (*Client) OpenChat ¶
OpenChat Informs TDLib that the chat is opened by the user. Many useful activities depend on the chat being opened or closed (e.g., in supergroups and channels all updates are received only for opened chats) @param chatID Chat identifier
func (*Client) OpenMessageContent ¶
OpenMessageContent Informs TDLib that the message content has been opened (e.g., the user has opened a photo, video, document, location or venue, or has listened to an audio file or voice note message). An updateMessageContentOpened update will be generated if something has changed @param chatID Chat identifier of the message @param messageID Identifier of the message with the opened content
func (*Client) OptimizeStorage ¶
func (client *Client) OptimizeStorage(size int64, tTL int32, count int32, immunityDelay int32, fileTypes []tdlib.FileType, chatIDs []int64, excludeChatIDs []int64, returnDeletedFileStatistics bool, chatLimit int32) (*tdlib.StorageStatistics, error)
OptimizeStorage Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted @param size Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit @param tTL Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit @param count Limit on the total count of files after deletion. Pass -1 to use the default limit @param immunityDelay The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value @param fileTypes If not empty, only files with the given type(s) are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted @param chatIDs If not empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos) @param excludeChatIDs If not empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos) @param returnDeletedFileStatistics Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics @param chatLimit Same as in getStorageStatistics. Affects only returned statistics
func (*Client) ParseMarkdown ¶
func (client *Client) ParseMarkdown(text *tdlib.FormattedText) (*tdlib.FormattedText, error)
ParseMarkdown Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously @param text The text to parse. For example, "__italic__ ~~strikethrough~~ **bold** `code` ```pre``` __[italic__ text_url](telegram.org) __italic**bold italic__bold**"
func (*Client) ParseTextEntities ¶
func (client *Client) ParseTextEntities(text string, parseMode tdlib.TextParseMode) (*tdlib.FormattedText, error)
ParseTextEntities Parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. Can be called synchronously @param text The text to parse @param parseMode Text parse mode
func (*Client) PinChatMessage ¶
func (client *Client) PinChatMessage(chatID int64, messageID int64, disableNotification bool, onlyForSelf bool) (*tdlib.Ok, error)
PinChatMessage Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the channel @param chatID Identifier of the chat @param messageID Identifier of the new pinned message @param disableNotification True, if there should be no notification about the pinned message. Notifications are always disabled in channels and private chats @param onlyForSelf True, if the message needs to be pinned for one side only; private chats only
func (*Client) PingProxy ¶
PingProxy Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization @param proxyID Proxy identifier. Use 0 to ping a Telegram server without a proxy
func (*Client) ProcessPushNotification ¶
ProcessPushNotification Handles a push notification. Returns error with code 406 if the push notification is not supported and connection to the server is required to fetch new data. Can be called before authorization @param payload JSON-encoded push notification payload with all fields sent by the server, and "google.sent_time" and "google.notification.sound" fields added
func (*Client) ReadAllChatMentions ¶
ReadAllChatMentions Marks all mentions in a chat as read @param chatID Chat identifier
func (*Client) ReadFilePart ¶
func (client *Client) ReadFilePart(fileID int32, offset int32, count int32) (*tdlib.FilePart, error)
ReadFilePart Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file @param fileID Identifier of the file. The file must be located in the TDLib file cache @param offset The offset from which to read the file @param count Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position
func (*Client) Receive ¶
Receive Receives incoming updates and request responses from the TDLib client. You can provide string or UpdateData.
func (*Client) RecoverAuthenticationPassword ¶
func (client *Client) RecoverAuthenticationPassword(recoveryCode string, newPassword string, newHint string) (*tdlib.Ok, error)
RecoverAuthenticationPassword Recovers the password with a password recovery code sent to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword @param recoveryCode Recovery code to check @param newPassword New password of the user; may be empty to remove the password @param newHint New password hint; may be empty
func (*Client) RecoverPassword ¶
func (client *Client) RecoverPassword(recoveryCode string, newPassword string, newHint string) (*tdlib.PasswordState, error)
RecoverPassword Recovers the 2-step verification password using a recovery code sent to an email address that was previously set up @param recoveryCode Recovery code to check @param newPassword New password of the user; may be empty to remove the password @param newHint New password hint; may be empty
func (*Client) RegisterDevice ¶
func (client *Client) RegisterDevice(deviceToken tdlib.DeviceToken, otherUserIDs []int64) (*tdlib.PushReceiverID, error)
RegisterDevice Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription @param deviceToken Device token @param otherUserIDs List of user identifiers of other users currently using the application
func (*Client) RegisterUser ¶
RegisterUser Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration @param firstName The first name of the user; 1-64 characters @param lastName The last name of the user; 0-64 characters
func (*Client) RemoveBackground ¶
RemoveBackground Removes background from the list of installed backgrounds @param backgroundID The background identifier
func (*Client) RemoveChatActionBar ¶
RemoveChatActionBar Removes a chat action bar without any other action @param chatID Chat identifier
func (*Client) RemoveContacts ¶
RemoveContacts Removes users from the contact list @param userIDs Identifiers of users to be deleted
func (*Client) RemoveFavoriteSticker ¶
RemoveFavoriteSticker Removes a sticker from the list of favorite stickers @param sticker Sticker file to delete from the list
func (*Client) RemoveNotification ¶
func (client *Client) RemoveNotification(notificationGroupID int32, notificationID int32) (*tdlib.Ok, error)
RemoveNotification Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user @param notificationGroupID Identifier of notification group to which the notification belongs @param notificationID Identifier of removed notification
func (*Client) RemoveNotificationGroup ¶
func (client *Client) RemoveNotificationGroup(notificationGroupID int32, maxNotificationID int32) (*tdlib.Ok, error)
RemoveNotificationGroup Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user @param notificationGroupID Notification group identifier @param maxNotificationID The maximum identifier of removed notifications
func (*Client) RemoveProxy ¶
RemoveProxy Removes a proxy server. Can be called before authorization @param proxyID Proxy identifier
func (*Client) RemoveRecentHashtag ¶
RemoveRecentHashtag Removes a hashtag from the list of recently used hashtags @param hashtag Hashtag to delete
func (*Client) RemoveRecentSticker ¶
func (client *Client) RemoveRecentSticker(isAttached bool, sticker tdlib.InputFile) (*tdlib.Ok, error)
RemoveRecentSticker Removes a sticker from the list of recently used stickers @param isAttached Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers @param sticker Sticker file to delete
func (*Client) RemoveRecentlyFoundChat ¶
RemoveRecentlyFoundChat Removes a chat from the list of recently found chats @param chatID Identifier of the chat to be removed
func (*Client) RemoveSavedAnimation ¶
RemoveSavedAnimation Removes an animation from the list of saved animations @param animation Animation file to be removed
func (*Client) RemoveStickerFromSet ¶
RemoveStickerFromSet Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot @param sticker Sticker
func (*Client) RemoveTopChat ¶
func (client *Client) RemoveTopChat(category tdlib.TopChatCategory, chatID int64) (*tdlib.Ok, error)
RemoveTopChat Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled @param category Category of frequently used chats @param chatID Chat identifier
func (*Client) ReorderChatFilters ¶
ReorderChatFilters Changes the order of chat filters @param chatFilterIDs Identifiers of chat filters in the new correct order
func (*Client) ReorderInstalledStickerSets ¶
func (client *Client) ReorderInstalledStickerSets(isMasks bool, stickerSetIDs []tdlib.JSONInt64) (*tdlib.Ok, error)
ReorderInstalledStickerSets Changes the order of installed sticker sets @param isMasks Pass true to change the order of mask sticker sets; pass false to change the order of ordinary sticker sets @param stickerSetIDs Identifiers of installed sticker sets in the new correct order
func (*Client) ReplacePrimaryChatInviteLink ¶
func (client *Client) ReplacePrimaryChatInviteLink(chatID int64) (*tdlib.ChatInviteLink, error)
ReplacePrimaryChatInviteLink Replaces current primary invite link for a chat with a new primary invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right @param chatID Chat identifier
func (*Client) ReportChat ¶
func (client *Client) ReportChat(chatID int64, messageIDs []int64, reason tdlib.ChatReportReason, text string) (*tdlib.Ok, error)
ReportChat Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if this is a private chat with a bot, a private chat with a user sharing their location, a supergroup, or a channel, since other chats can't be checked by moderators @param chatID Chat identifier @param messageIDs Identifiers of reported messages, if any @param reason The reason for reporting the chat @param text Additional report details; 0-1024 characters
func (*Client) ReportChatPhoto ¶
func (client *Client) ReportChatPhoto(chatID int64, fileID int32, reason tdlib.ChatReportReason, text string) (*tdlib.Ok, error)
ReportChatPhoto Reports a chat photo to the Telegram moderators. A chat photo can be reported only if this is a private chat with a bot, a private chat with a user sharing their location, a supergroup, or a channel, since other chats can't be checked by moderators @param chatID Chat identifier @param fileID Identifier of the photo to report. Only full photos from chatPhoto can be reported @param reason The reason for reporting the chat photo @param text Additional report details; 0-1024 characters
func (*Client) ReportSupergroupSpam ¶
func (client *Client) ReportSupergroupSpam(supergroupID int64, userID int64, messageIDs []int64) (*tdlib.Ok, error)
ReportSupergroupSpam Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup @param supergroupID Supergroup identifier @param userID User identifier @param messageIDs Identifiers of messages sent in the supergroup by the user. This list must be non-empty
func (*Client) RequestAuthenticationPasswordRecovery ¶
RequestAuthenticationPasswordRecovery Requests to send a password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword
func (*Client) RequestPasswordRecovery ¶
func (client *Client) RequestPasswordRecovery() (*tdlib.EmailAddressAuthenticationCodeInfo, error)
RequestPasswordRecovery Requests to send a 2-step verification password recovery code to an email address that was previously set up
func (*Client) RequestQrCodeAuthentication ¶
RequestQrCodeAuthentication Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword @param otherUserIDs List of user identifiers of other users currently using the application
func (*Client) ResendAuthenticationCode ¶
ResendAuthenticationCode Re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed
func (*Client) ResendChangePhoneNumberCode ¶
func (client *Client) ResendChangePhoneNumberCode() (*tdlib.AuthenticationCodeInfo, error)
ResendChangePhoneNumberCode Re-sends the authentication code sent to confirm a new phone number for the current user. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
func (*Client) ResendEmailAddressVerificationCode ¶
func (client *Client) ResendEmailAddressVerificationCode() (*tdlib.EmailAddressAuthenticationCodeInfo, error)
ResendEmailAddressVerificationCode Re-sends the code to verify an email address to be added to a user's Telegram Passport
func (*Client) ResendMessages ¶
ResendMessages Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed. If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message @param chatID Identifier of the chat to send messages @param messageIDs Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order
func (*Client) ResendPhoneNumberConfirmationCode ¶
func (client *Client) ResendPhoneNumberConfirmationCode() (*tdlib.AuthenticationCodeInfo, error)
ResendPhoneNumberConfirmationCode Resends phone number confirmation code
func (*Client) ResendPhoneNumberVerificationCode ¶
func (client *Client) ResendPhoneNumberVerificationCode() (*tdlib.AuthenticationCodeInfo, error)
ResendPhoneNumberVerificationCode Re-sends the code to verify a phone number to be added to a user's Telegram Passport
func (*Client) ResendRecoveryEmailAddressCode ¶
func (client *Client) ResendRecoveryEmailAddressCode() (*tdlib.PasswordState, error)
ResendRecoveryEmailAddressCode Resends the 2-step verification recovery email address verification code
func (*Client) ResetAllNotificationSettings ¶
ResetAllNotificationSettings Resets all notification settings to their default values. By default, all chats are unmuted, the sound is set to "default" and message previews are shown
func (*Client) ResetBackgrounds ¶
ResetBackgrounds Resets list of installed backgrounds to its default value
func (*Client) ResetNetworkStatistics ¶
ResetNetworkStatistics Resets all network data usage statistics to zero. Can be called before authorization
func (*Client) ResetPassword ¶
func (client *Client) ResetPassword() (tdlib.ResetPasswordResult, error)
ResetPassword Removes 2-step verification password without previous password and access to recovery email address. The password can't be reset immediately and the request needs to be repeated after the specified time
func (*Client) RevokeChatInviteLink ¶
func (client *Client) RevokeChatInviteLink(chatID int64, inviteLink string) (*tdlib.ChatInviteLinks, error)
RevokeChatInviteLink Revokes invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links. If a primary link is revoked, then additionally to the revoked link returns new primary link @param chatID Chat identifier @param inviteLink Invite link to be revoked
func (*Client) RevokeGroupCallInviteLink ¶
RevokeGroupCallInviteLink Revokes invite link for a group call. Requires groupCall.can_be_managed group call flag @param groupCallID Group call identifier
func (*Client) SaveApplicationLogEvent ¶
func (client *Client) SaveApplicationLogEvent(typeParam string, chatID int64, data tdlib.JsonValue) (*tdlib.Ok, error)
SaveApplicationLogEvent Saves application log event on the server. Can be called before authorization @param typeParam Event type @param chatID Optional chat identifier, associated with the event @param data The log event data
func (*Client) SearchBackground ¶
func (client *Client) SearchBackground(name string) (*tdlib.Background, error)
SearchBackground Searches for a background by its name @param name The name of the background
func (*Client) SearchCallMessages ¶
func (client *Client) SearchCallMessages(fromMessageID int64, limit int32, onlyMissed bool) (*tdlib.Messages, error)
SearchCallMessages Searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib @param fromMessageID Identifier of the message from which to search; use 0 to get results from the last message @param limit The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit @param onlyMissed If true, returns only messages with missed calls
func (*Client) SearchChatMembers ¶
func (client *Client) SearchChatMembers(chatID int64, query string, limit int32, filter tdlib.ChatMembersFilter) (*tdlib.ChatMembers, error)
SearchChatMembers Searches for a specified query in the first name, last name and username of the members of a specified chat. Requires administrator rights in channels @param chatID Chat identifier @param query Query to search for @param limit The maximum number of users to be returned @param filter The type of users to return. By default, chatMembersFilterMembers
func (*Client) SearchChatMessages ¶
func (client *Client) SearchChatMessages(chatID int64, query string, sender tdlib.MessageSender, fromMessageID int64, offset int32, limit int32, filter tdlib.SearchMessagesFilter, messageThreadID int64) (*tdlib.Messages, error)
SearchChatMessages Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query (searchSecretMessages should be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit @param chatID Identifier of the chat in which to search messages @param query Query to search for @param sender If not null, only messages sent by the specified sender will be returned. Not supported in secret chats @param fromMessageID Identifier of the message starting from which history must be fetched; use 0 to get results from the last message @param offset Specify 0 to get results from exactly the from_message_id or a negative offset to get the specified message and some newer messages @param limit The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit @param filter Filter for message content in the search results @param messageThreadID If not 0, only messages in the specified thread will be returned; supergroups only
func (*Client) SearchChatRecentLocationMessages ¶
func (client *Client) SearchChatRecentLocationMessages(chatID int64, limit int32) (*tdlib.Messages, error)
SearchChatRecentLocationMessages Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user @param chatID Chat identifier @param limit The maximum number of messages to be returned
func (*Client) SearchChats ¶
SearchChats Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list @param query Query to search for. If the query is empty, returns up to 50 recently found chats @param limit The maximum number of chats to be returned
func (*Client) SearchChatsNearby ¶
SearchChatsNearby Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request should be sent again every 25 seconds with adjusted location to not miss new chats @param location Current user location
func (*Client) SearchChatsOnServer ¶
SearchChatsOnServer Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list @param query Query to search for @param limit The maximum number of chats to be returned
func (*Client) SearchContacts ¶
SearchContacts Searches for the specified query in the first names, last names and usernames of the known user contacts @param query Query to search for; may be empty to return all contacts @param limit The maximum number of users to be returned
func (*Client) SearchEmojis ¶
func (client *Client) SearchEmojis(text string, exactMatch bool, inputLanguageCodes []string) (*tdlib.Emojis, error)
SearchEmojis Searches for emojis by keywords. Supported only if the file database is enabled @param text Text to search for @param exactMatch True, if only emojis, which exactly match text needs to be returned @param inputLanguageCodes List of possible IETF language tags of the user's input language; may be empty if unknown
func (*Client) SearchHashtags ¶
SearchHashtags Searches for recently used hashtags by their prefix @param prefix Hashtag prefix to search for @param limit The maximum number of hashtags to be returned
func (*Client) SearchInstalledStickerSets ¶
func (client *Client) SearchInstalledStickerSets(isMasks bool, query string, limit int32) (*tdlib.StickerSets, error)
SearchInstalledStickerSets Searches for installed sticker sets by looking for specified query in their title and name @param isMasks Pass true to return mask sticker sets; pass false to return ordinary sticker sets @param query Query to search for @param limit The maximum number of sticker sets to return
func (*Client) SearchMessages ¶
func (client *Client) SearchMessages(chatList tdlib.ChatList, query string, offsetDate int32, offsetChatID int64, offsetMessageID int64, limit int32, filter tdlib.SearchMessagesFilter, minDate int32, maxDate int32) (*tdlib.Messages, error)
SearchMessages Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)). For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit @param chatList Chat list in which to search messages; pass null to search in all chats regardless of their chat list. Only Main and Archive chat lists are supported @param query Query to search for @param offsetDate The date of the message starting from which the results should be fetched. Use 0 or any date in the future to get results from the last message @param offsetChatID The chat identifier of the last found message, or 0 for the first request @param offsetMessageID The message identifier of the last found message, or 0 for the first request @param limit The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit @param filter Filter for message content in the search results; searchMessagesFilterCall, searchMessagesFilterMissedCall, searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterFailedToSend and searchMessagesFilterPinned are unsupported in this function @param minDate If not 0, the minimum date of the messages to return @param maxDate If not 0, the maximum date of the messages to return
func (*Client) SearchPublicChat ¶
SearchPublicChat Searches a public chat by its username. Currently only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned @param username Username to be resolved
func (*Client) SearchPublicChats ¶
SearchPublicChats Searches public chats by looking for specified query in their username and title. Currently only private chats, supergroups and channels can be public. Returns a meaningful number of results. Returns nothing if the length of the searched username prefix is less than 5. Excludes private chats with contacts and chats from the chat list from the results @param query Query to search for
func (*Client) SearchSecretMessages ¶
func (client *Client) SearchSecretMessages(chatID int64, query string, offset string, limit int32, filter tdlib.SearchMessagesFilter) (*tdlib.FoundMessages, error)
SearchSecretMessages Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance, the number of returned messages is chosen by TDLib @param chatID Identifier of the chat in which to search. Specify 0 to search in all secret chats @param query Query to search for. If empty, searchChatMessages should be used instead @param offset Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results @param limit The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit @param filter A filter for message content in the search results
func (*Client) SearchStickerSet ¶
func (client *Client) SearchStickerSet(name string) (*tdlib.StickerSet, error)
SearchStickerSet Searches for a sticker set by its name @param name Name of the sticker set
func (*Client) SearchStickerSets ¶
func (client *Client) SearchStickerSets(query string) (*tdlib.StickerSets, error)
SearchStickerSets Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results @param query Query to search for
func (*Client) SearchStickers ¶
SearchStickers Searches for stickers from public sticker sets that correspond to a given emoji @param emoji String representation of emoji; must be non-empty @param limit The maximum number of stickers to be returned
func (*Client) Send ¶
func (client *Client) Send(jsonQuery interface{})
Send Sends request to the TDLib client. You can provide string or UpdateData.
func (*Client) SendAndCatch ¶
SendAndCatch Sends request to the TDLib client and catches the result in updates channel. You can provide string or UpdateData.
func (*Client) SendAuthCode ¶
func (client *Client) SendAuthCode(code string) (tdlib.AuthorizationState, error)
SendAuthCode sends auth code to tdlib
func (*Client) SendAuthPassword ¶
func (client *Client) SendAuthPassword(password string) (tdlib.AuthorizationState, error)
SendAuthPassword sends two-step verification password (user defined)to tdlib
func (*Client) SendBotStartMessage ¶
func (client *Client) SendBotStartMessage(botUserID int64, chatID int64, parameter string) (*tdlib.Message, error)
SendBotStartMessage Invites a bot to a chat (if it is not yet a member) and sends it the /start command. Bots can't be invited to a private chat other than the chat with the bot. Bots can't be invited to channels (although they can be added as admins) and secret chats. Returns the sent message @param botUserID Identifier of the bot @param chatID Identifier of the target chat @param parameter A hidden parameter sent to the bot for deep linking purposes (https://core.telegram.org/bots#deep-linking)
func (*Client) SendCallDebugInformation ¶
func (client *Client) SendCallDebugInformation(callID int32, debugInformation string) (*tdlib.Ok, error)
SendCallDebugInformation Sends debug information for a call @param callID Call identifier @param debugInformation Debug information in application-specific format
func (*Client) SendCallRating ¶
func (client *Client) SendCallRating(callID int32, rating int32, comment string, problems []tdlib.CallProblem) (*tdlib.Ok, error)
SendCallRating Sends a call rating @param callID Call identifier @param rating Call rating; 1-5 @param comment An optional user comment if the rating is less than 5 @param problems List of the exact types of problems with the call, specified by the user
func (*Client) SendCallSignalingData ¶
SendCallSignalingData Sends call signaling data @param callID Call identifier @param data The data
func (*Client) SendChatAction ¶
func (client *Client) SendChatAction(chatID int64, messageThreadID int64, action tdlib.ChatAction) (*tdlib.Ok, error)
SendChatAction Sends a notification about user activity in a chat @param chatID Chat identifier @param messageThreadID If not 0, a message thread identifier in which the action was performed @param action The action description
func (*Client) SendChatScreenshotTakenNotification ¶
SendChatScreenshotTakenNotification Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats @param chatID Chat identifier
func (*Client) SendCustomRequest ¶
func (client *Client) SendCustomRequest(method string, parameters string) (*tdlib.CustomRequestResult, error)
SendCustomRequest Sends a custom request; for bots only @param method The method name @param parameters JSON-serialized method parameters
func (*Client) SendEmailAddressVerificationCode ¶
func (client *Client) SendEmailAddressVerificationCode(emailAddress string) (*tdlib.EmailAddressAuthenticationCodeInfo, error)
SendEmailAddressVerificationCode Sends a code to verify an email address to be added to a user's Telegram Passport @param emailAddress Email address
func (*Client) SendInlineQueryResultMessage ¶
func (client *Client) SendInlineQueryResultMessage(chatID int64, messageThreadID int64, replyToMessageID int64, options *tdlib.MessageSendOptions, queryID *tdlib.JSONInt64, resultID string, hideViaBot bool) (*tdlib.Message, error)
SendInlineQueryResultMessage Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message @param chatID Target chat @param messageThreadID If not 0, a message thread identifier in which the message will be sent @param replyToMessageID Identifier of a message to reply to or 0 @param options Options to be used to send the message @param queryID Identifier of the inline query @param resultID Identifier of the inline result @param hideViaBot If true, there will be no mention of a bot, via which the message is sent. Can be used only for bots GetOption("animation_search_bot_username"), GetOption("photo_search_bot_username") and GetOption("venue_search_bot_username")
func (*Client) SendMessage ¶
func (client *Client) SendMessage(chatID int64, messageThreadID int64, replyToMessageID int64, options *tdlib.MessageSendOptions, replyMarkup tdlib.ReplyMarkup, inputMessageContent tdlib.InputMessageContent) (*tdlib.Message, error)
SendMessage Sends a message. Returns the sent message @param chatID Target chat @param messageThreadID If not 0, a message thread identifier in which the message will be sent @param replyToMessageID Identifier of the message to reply to or 0 @param options Options to be used to send the message @param replyMarkup Markup for replying to the message; for bots only @param inputMessageContent The content of the message to be sent
func (*Client) SendMessageAlbum ¶
func (client *Client) SendMessageAlbum(chatID int64, messageThreadID int64, replyToMessageID int64, options *tdlib.MessageSendOptions, inputMessageContents []tdlib.InputMessageContent) (*tdlib.Messages, error)
SendMessageAlbum Sends 2-10 messages grouped together into an album. Currently only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages @param chatID Target chat @param messageThreadID If not 0, a message thread identifier in which the messages will be sent @param replyToMessageID Identifier of a message to reply to or 0 @param options Options to be used to send the messages @param inputMessageContents Contents of messages to be sent. At most 10 messages can be added to an album
func (*Client) SendPassportAuthorizationForm ¶
func (client *Client) SendPassportAuthorizationForm(autorizationFormID int32, typeParams []tdlib.PassportElementType) (*tdlib.Ok, error)
SendPassportAuthorizationForm Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements are going to be reused @param autorizationFormID Authorization form identifier @param typeParams Types of Telegram Passport elements chosen by user to complete the authorization form
func (*Client) SendPaymentForm ¶
func (client *Client) SendPaymentForm(chatID int64, messageID int64, paymentFormID *tdlib.JSONInt64, orderInfoID string, shippingOptionID string, credentials tdlib.InputCredentials, tipAmount int64) (*tdlib.PaymentResult, error)
SendPaymentForm Sends a filled-out payment form to the bot for final verification @param chatID Chat identifier of the Invoice message @param messageID Message identifier @param paymentFormID Payment form identifier returned by getPaymentForm @param orderInfoID Identifier returned by validateOrderInfo, or an empty string @param shippingOptionID Identifier of a chosen shipping option, if applicable @param credentials The credentials chosen by user for payment @param tipAmount Chosen by the user amount of tip in the smallest units of the currency
func (*Client) SendPhoneNumber ¶
func (client *Client) SendPhoneNumber(phoneNumber string) (tdlib.AuthorizationState, error)
SendPhoneNumber sends phone number to tdlib
func (*Client) SendPhoneNumberConfirmationCode ¶
func (client *Client) SendPhoneNumberConfirmationCode(hash string, phoneNumber string, settings *tdlib.PhoneNumberAuthenticationSettings) (*tdlib.AuthenticationCodeInfo, error)
SendPhoneNumberConfirmationCode Sends phone number confirmation code to handle links of the type internalLinkTypePhoneNumberConfirmation @param hash Hash value from the link @param phoneNumber Phone number value from the link @param settings Settings for the authentication of the user's phone number
func (*Client) SendPhoneNumberVerificationCode ¶
func (client *Client) SendPhoneNumberVerificationCode(phoneNumber string, settings *tdlib.PhoneNumberAuthenticationSettings) (*tdlib.AuthenticationCodeInfo, error)
SendPhoneNumberVerificationCode Sends a code to verify a phone number to be added to a user's Telegram Passport @param phoneNumber The phone number of the user, in international format @param settings Settings for the authentication of the user's phone number
func (*Client) SetAccountTTL ¶
SetAccountTTL Changes the period of inactivity after which the account of the current user will automatically be deleted @param tTL New account TTL
func (*Client) SetAlarm ¶
SetAlarm Succeeds after a specified amount of time has passed. Can be called before initialization @param seconds Number of seconds before the function returns
func (*Client) SetAuthenticationPhoneNumber ¶
func (client *Client) SetAuthenticationPhoneNumber(phoneNumber string, settings *tdlib.PhoneNumberAuthenticationSettings) (*tdlib.Ok, error)
SetAuthenticationPhoneNumber Sets the phone number of the user and sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitPhoneNumber, or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword @param phoneNumber The phone number of the user, in international format @param settings Settings for the authentication of the user's phone number
func (*Client) SetAutoDownloadSettings ¶
func (client *Client) SetAutoDownloadSettings(settings *tdlib.AutoDownloadSettings, typeParam tdlib.NetworkType) (*tdlib.Ok, error)
SetAutoDownloadSettings Sets auto-download settings @param settings New user auto-download settings @param typeParam Type of the network for which the new settings are relevant
func (*Client) SetBackground ¶
func (client *Client) SetBackground(background tdlib.InputBackground, typeParam tdlib.BackgroundType, forDarkTheme bool) (*tdlib.Background, error)
SetBackground Changes the background selected by the user; adds background to the list of installed backgrounds @param background The input background to use. Pass null to create a new filled backgrounds. Pass null to remove the current background @param typeParam Background type. Pass null to use default type of the remote background. Pass null to remove the current background @param forDarkTheme True, if the background is chosen for dark theme
func (*Client) SetBio ¶
SetBio Changes the bio of the current user @param bio The new value of the user bio; 0-70 characters without line feeds
func (*Client) SetBotUpdatesStatus ¶
func (client *Client) SetBotUpdatesStatus(pendingUpdateCount int32, errorMessage string) (*tdlib.Ok, error)
SetBotUpdatesStatus Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only @param pendingUpdateCount The number of pending updates @param errorMessage The last error message
func (*Client) SetChatClientData ¶
SetChatClientData Changes application-specific data associated with a chat @param chatID Chat identifier @param clientData New value of client_data
func (*Client) SetChatDescription ¶
SetChatDescription Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right @param chatID Identifier of the chat @param description New chat description; 0-255 characters
func (*Client) SetChatDiscussionGroup ¶
func (client *Client) SetChatDiscussionGroup(chatID int64, discussionChatID int64) (*tdlib.Ok, error)
SetChatDiscussionGroup Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified @param chatID Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages rights in the supergroup) @param discussionChatID Identifier of a new channel's discussion group. Use 0 to remove the discussion group. Use the method getSuitableDiscussionChats to find all suitable groups. Basic group chats must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that
func (*Client) SetChatDraftMessage ¶
func (client *Client) SetChatDraftMessage(chatID int64, messageThreadID int64, draftMessage *tdlib.DraftMessage) (*tdlib.Ok, error)
SetChatDraftMessage Changes the draft message in a chat @param chatID Chat identifier @param messageThreadID If not 0, a message thread identifier in which the draft was changed @param draftMessage New draft message; may be null
func (*Client) SetChatLocation ¶
func (client *Client) SetChatLocation(chatID int64, location *tdlib.ChatLocation) (*tdlib.Ok, error)
SetChatLocation Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use @param chatID Chat identifier @param location New location for the chat; must be valid and not null
func (*Client) SetChatMemberStatus ¶
func (client *Client) SetChatMemberStatus(chatID int64, memberID tdlib.MessageSender, status tdlib.ChatMemberStatus) (*tdlib.Ok, error)
SetChatMemberStatus Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for adding new members to the chat and transferring chat ownership; instead, use addChatMember or transferChatOwnership @param chatID Chat identifier @param memberID Member identifier. Chats can be only banned and unbanned in supergroups and channels @param status The new status of the member in the chat
func (*Client) SetChatMessageTTLSetting ¶
SetChatMessageTTLSetting Changes the message TTL setting (sets a new self-destruct timer) in a chat. Requires can_delete_messages administrator right in basic groups, supergroups and channels Message TTL setting of a chat with the current user (Saved Messages) and the chat 777000 (Telegram) can't be changed @param chatID Chat identifier @param tTL New TTL value, in seconds; must be one of 0, 86400, 7 * 86400, or 31 * 86400 unless the chat is secret
func (*Client) SetChatNotificationSettings ¶
func (client *Client) SetChatNotificationSettings(chatID int64, notificationSettings *tdlib.ChatNotificationSettings) (*tdlib.Ok, error)
SetChatNotificationSettings Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed @param chatID Chat identifier @param notificationSettings New notification settings for the chat. If the chat is muted for more than 1 week, it is considered to be muted forever
func (*Client) SetChatPermissions ¶
func (client *Client) SetChatPermissions(chatID int64, permissions *tdlib.ChatPermissions) (*tdlib.Ok, error)
SetChatPermissions Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right @param chatID Chat identifier @param permissions New non-administrator members permissions in the chat
func (*Client) SetChatPhoto ¶
SetChatPhoto Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right @param chatID Chat identifier @param photo New chat photo. Pass null to delete the chat photo
func (*Client) SetChatSlowModeDelay ¶
SetChatSlowModeDelay Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights @param chatID Chat identifier @param slowModeDelay New slow mode delay for the chat; must be one of 0, 10, 30, 60, 300, 900, 3600
func (*Client) SetChatTheme ¶
SetChatTheme Changes the chat theme. Supported only in private and secret chats @param chatID Chat identifier @param themeName Name of the new chat theme; may be empty to return the default theme
func (*Client) SetChatTitle ¶
SetChatTitle Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right @param chatID Chat identifier @param title New title of the chat; 1-128 characters
func (*Client) SetCommands ¶
func (client *Client) SetCommands(scope tdlib.BotCommandScope, languageCode string, commands []tdlib.BotCommand) (*tdlib.Ok, error)
SetCommands Sets the list of commands supported by the bot for the given user scope and language; for bots only @param scope The scope to which the commands are relevant @param languageCode A two-letter ISO 639-1 country code. If empty, the commands will be applied to all users from the given scope, for which language there are no dedicated commands @param commands List of the bot's commands
func (*Client) SetCustomLanguagePack ¶
func (client *Client) SetCustomLanguagePack(info *tdlib.LanguagePackInfo, strings []tdlib.LanguagePackString) (*tdlib.Ok, error)
SetCustomLanguagePack Adds or changes a custom local language pack to the current localization target @param info Information about the language pack. Language pack ID must start with 'X', consist only of English letters, digits and hyphens, and must not exceed 64 characters. Can be called before authorization @param strings Strings of the new language pack
func (*Client) SetCustomLanguagePackString ¶
func (client *Client) SetCustomLanguagePackString(languagePackID string, newString *tdlib.LanguagePackString) (*tdlib.Ok, error)
SetCustomLanguagePackString Adds, edits or deletes a string in a custom local language pack. Can be called before authorization @param languagePackID Identifier of a previously added custom local language pack in the current localization target @param newString New language pack string
func (*Client) SetDatabaseEncryptionKey ¶
SetDatabaseEncryptionKey Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain @param newEncryptionKey New encryption key
func (*Client) SetFileGenerationProgress ¶
func (client *Client) SetFileGenerationProgress(generationID *tdlib.JSONInt64, expectedSize int32, localPrefixSize int32) (*tdlib.Ok, error)
SetFileGenerationProgress Informs TDLib on a file generation progress @param generationID The identifier of the generation process @param expectedSize Expected size of the generated file, in bytes; 0 if unknown @param localPrefixSize The number of bytes already generated
func (*Client) SetGameScore ¶
func (client *Client) SetGameScore(chatID int64, messageID int64, editMessage bool, userID int64, score int32, force bool) (*tdlib.Message, error)
SetGameScore Updates the game score of the specified user in the game; for bots only @param chatID The chat to which the message with the game belongs @param messageID Identifier of the message @param editMessage True, if the message should be edited @param userID User identifier @param score The new score @param force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table
func (*Client) SetGroupCallParticipantIsSpeaking ¶
func (client *Client) SetGroupCallParticipantIsSpeaking(groupCallID int32, audioSource int32, isSpeaking bool) (*tdlib.Ok, error)
SetGroupCallParticipantIsSpeaking Informs TDLib that speaking state of a participant of an active group has changed @param groupCallID Group call identifier @param audioSource Group call participant's synchronization audio source identifier, or 0 for the current user @param isSpeaking True, if the user is speaking
func (*Client) SetGroupCallParticipantVolumeLevel ¶
func (client *Client) SetGroupCallParticipantVolumeLevel(groupCallID int32, participantID tdlib.MessageSender, volumeLevel int32) (*tdlib.Ok, error)
SetGroupCallParticipantVolumeLevel Changes volume level of a participant of an active group call. If the current user can manage the group call, then the participant's volume level will be changed for all users with default volume level @param groupCallID Group call identifier @param participantID Participant identifier @param volumeLevel New participant's volume level; 1-20000 in hundreds of percents
func (*Client) SetGroupCallTitle ¶
SetGroupCallTitle Sets group call title. Requires groupCall.can_be_managed group call flag @param groupCallID Group call identifier @param title New group call title; 1-64 characters
func (*Client) SetInlineGameScore ¶
func (client *Client) SetInlineGameScore(inlineMessageID string, editMessage bool, userID int64, score int32, force bool) (*tdlib.Ok, error)
SetInlineGameScore Updates the game score of the specified user in a game; for bots only @param inlineMessageID Inline message identifier @param editMessage True, if the message should be edited @param userID User identifier @param score The new score @param force Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table
func (*Client) SetLocation ¶
SetLocation Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer @param location The new location of the user
func (*Client) SetLogStream ¶
SetLogStream Sets new log stream for internal logging of TDLib. Can be called synchronously @param logStream New log stream
func (*Client) SetLogTagVerbosityLevel ¶
func (client *Client) SetLogTagVerbosityLevel(tag string, newVerbosityLevel int32) (*tdlib.Ok, error)
SetLogTagVerbosityLevel Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously @param tag Logging tag to change verbosity level @param newVerbosityLevel New verbosity level; 1-1024
func (*Client) SetLogVerbosityLevel ¶
SetLogVerbosityLevel Sets the verbosity level of the internal logging of TDLib. Can be called synchronously @param newVerbosityLevel New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging
func (*Client) SetName ¶
SetName Changes the first and last name of the current user @param firstName The new value of the first name for the current user; 1-64 characters @param lastName The new value of the optional last name for the current user; 0-64 characters
func (*Client) SetNetworkType ¶
SetNetworkType Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it should be called whenever the network is changed, even if the network type remains the same. Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics @param typeParam The new network type. By default, networkTypeOther
func (*Client) SetOption ¶
SetOption Sets the value of an option. (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization @param name The name of the option @param value The new value of the option
func (*Client) SetPassportElement ¶
func (client *Client) SetPassportElement(element tdlib.InputPassportElement, password string) (tdlib.PassportElement, error)
SetPassportElement Adds an element to the user's Telegram Passport. May return an error with a message "PHONE_VERIFICATION_NEEDED" or "EMAIL_VERIFICATION_NEEDED" if the chosen phone number or the chosen email address must be verified first @param element Input Telegram Passport element @param password Password of the current user
func (*Client) SetPassportElementErrors ¶
func (client *Client) SetPassportElementErrors(userID int64, errors []tdlib.InputPassportElementError) (*tdlib.Ok, error)
SetPassportElementErrors Informs the user that some of the elements in their Telegram Passport contain errors; for bots only. The user will not be able to resend the elements, until the errors are fixed @param userID User identifier @param errors The errors
func (*Client) SetPassword ¶
func (client *Client) SetPassword(oldPassword string, newPassword string, newHint string, setRecoveryEmailAddress bool, newRecoveryEmailAddress string) (*tdlib.PasswordState, error)
SetPassword Changes the password for the current user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed @param oldPassword Previous password of the user @param newPassword New password of the user; may be empty to remove the password @param newHint New password hint; may be empty @param setRecoveryEmailAddress Pass true if the recovery email address should be changed @param newRecoveryEmailAddress New recovery email address; may be empty
func (*Client) SetPinnedChats ¶
SetPinnedChats Changes the order of pinned chats @param chatList Chat list in which to change the order of pinned chats @param chatIDs The new list of pinned chats
func (*Client) SetPollAnswer ¶
func (client *Client) SetPollAnswer(chatID int64, messageID int64, optionIDs []int32) (*tdlib.Ok, error)
SetPollAnswer Changes the user answer to a poll. A poll in quiz mode can be answered only once @param chatID Identifier of the chat to which the poll belongs @param messageID Identifier of the message containing the poll @param optionIDs 0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers
func (*Client) SetProfilePhoto ¶
SetProfilePhoto Changes a profile photo for the current user @param photo Profile photo to set
func (*Client) SetRecoveryEmailAddress ¶
func (client *Client) SetRecoveryEmailAddress(password string, newRecoveryEmailAddress string) (*tdlib.PasswordState, error)
SetRecoveryEmailAddress Changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed. If new_recovery_email_address is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation @param password Password of the current user @param newRecoveryEmailAddress New recovery email address
func (*Client) SetScopeNotificationSettings ¶
func (client *Client) SetScopeNotificationSettings(scope tdlib.NotificationSettingsScope, notificationSettings *tdlib.ScopeNotificationSettings) (*tdlib.Ok, error)
SetScopeNotificationSettings Changes notification settings for chats of a given type @param scope Types of chats for which to change the notification settings @param notificationSettings The new notification settings for the given scope
func (*Client) SetStickerPositionInSet ¶
func (client *Client) SetStickerPositionInSet(sticker tdlib.InputFile, position int32) (*tdlib.Ok, error)
SetStickerPositionInSet Changes the position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot @param sticker Sticker @param position New position of the sticker in the set, zero-based
func (*Client) SetStickerSetThumbnail ¶
func (client *Client) SetStickerSetThumbnail(userID int64, name string, thumbnail tdlib.InputFile) (*tdlib.StickerSet, error)
SetStickerSetThumbnail Sets a sticker set thumbnail; for bots only. Returns the sticker set @param userID Sticker set owner @param name Sticker set name @param thumbnail Thumbnail to set in PNG or TGS format. Animated thumbnail must be set for animated sticker sets and only for them. Pass a zero InputFileId to delete the thumbnail
func (*Client) SetSupergroupStickerSet ¶
func (client *Client) SetSupergroupStickerSet(supergroupID int64, stickerSetID *tdlib.JSONInt64) (*tdlib.Ok, error)
SetSupergroupStickerSet Changes the sticker set of a supergroup; requires can_change_info administrator right @param supergroupID Identifier of the supergroup @param stickerSetID New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set
func (*Client) SetSupergroupUsername ¶
SetSupergroupUsername Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel @param supergroupID Identifier of the supergroup or channel @param username New value of the username. Use an empty string to remove the username
func (*Client) SetTdlibParameters ¶
SetTdlibParameters Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters @param parameters Parameters
func (*Client) SetUserPrivacySettingRules ¶
func (client *Client) SetUserPrivacySettingRules(setting tdlib.UserPrivacySetting, rules *tdlib.UserPrivacySettingRules) (*tdlib.Ok, error)
SetUserPrivacySettingRules Changes user privacy settings @param setting The privacy setting @param rules The new privacy rules
func (*Client) SetUsername ¶
SetUsername Changes the username of the current user @param username The new value of the username. Use an empty string to remove the username
func (*Client) SetVoiceChatDefaultParticipant ¶
func (client *Client) SetVoiceChatDefaultParticipant(chatID int64, defaultParticipantID tdlib.MessageSender) (*tdlib.Ok, error)
SetVoiceChatDefaultParticipant Changes default participant identifier, which can be used to join voice chats in a chat @param chatID Chat identifier @param defaultParticipantID Default group call participant identifier to join the voice chats
func (*Client) SharePhoneNumber ¶
SharePhoneNumber Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber @param userID Identifier of the user with whom to share the phone number. The user must be a mutual contact
func (*Client) StartGroupCallRecording ¶
func (client *Client) StartGroupCallRecording(groupCallID int32, title string, recordVideo bool, usePortraitOrientation bool) (*tdlib.Ok, error)
StartGroupCallRecording Starts recording of an active group call. Requires groupCall.can_be_managed group call flag @param groupCallID Group call identifier @param title Group call recording title; 0-64 characters @param recordVideo Pass true to record a video file instead of an audio file @param usePortraitOrientation Pass true to use portrait orientation for video instead of landscape one
func (*Client) StartGroupCallScreenSharing ¶
func (client *Client) StartGroupCallScreenSharing(groupCallID int32, audioSourceID int32, payload string) (*tdlib.Text, error)
StartGroupCallScreenSharing Starts screen sharing in a joined group call. Returns join response payload for tgcalls @param groupCallID Group call identifier @param audioSourceID Screen sharing audio channel synchronization source identifier; received from tgcalls @param payload Group call join payload; received from tgcalls
func (*Client) StartScheduledGroupCall ¶
StartScheduledGroupCall Starts a scheduled group call @param groupCallID Group call identifier
func (*Client) StopPoll ¶
func (client *Client) StopPoll(chatID int64, messageID int64, replyMarkup tdlib.ReplyMarkup) (*tdlib.Ok, error)
StopPoll Stops a poll. A poll in a message can be stopped when the message has can_be_edited flag set @param chatID Identifier of the chat to which the poll belongs @param messageID Identifier of the message containing the poll @param replyMarkup The new message reply markup; for bots only
func (*Client) SynchronizeLanguagePack ¶
SynchronizeLanguagePack Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method shouldn't be called explicitly for the current used/base language packs. Can be called before authorization @param languagePackID Language pack identifier
func (*Client) TerminateAllOtherSessions ¶
TerminateAllOtherSessions Terminates all other sessions of the current user
func (*Client) TerminateSession ¶
TerminateSession Terminates a session of the current user @param sessionID Session identifier
func (*Client) TestCallBytes ¶
TestCallBytes Returns the received bytes; for testing only. This is an offline method. Can be called before authorization @param x Bytes to return
func (*Client) TestCallEmpty ¶
TestCallEmpty Does nothing; for testing only. This is an offline method. Can be called before authorization
func (*Client) TestCallString ¶
func (client *Client) TestCallString(x string) (*tdlib.TestString, error)
TestCallString Returns the received string; for testing only. This is an offline method. Can be called before authorization @param x String to return
func (*Client) TestCallVectorInt ¶
func (client *Client) TestCallVectorInt(x []int32) (*tdlib.TestVectorInt, error)
TestCallVectorInt Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization @param x Vector of numbers to return
func (*Client) TestCallVectorIntObject ¶
func (client *Client) TestCallVectorIntObject(x []tdlib.TestInt) (*tdlib.TestVectorIntObject, error)
TestCallVectorIntObject Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization @param x Vector of objects to return
func (*Client) TestCallVectorString ¶
func (client *Client) TestCallVectorString(x []string) (*tdlib.TestVectorString, error)
TestCallVectorString Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization @param x Vector of strings to return
func (*Client) TestCallVectorStringObject ¶
func (client *Client) TestCallVectorStringObject(x []tdlib.TestString) (*tdlib.TestVectorStringObject, error)
TestCallVectorStringObject Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization @param x Vector of objects to return
func (*Client) TestGetDifference ¶
TestGetDifference Forces an updates.getDifference call to the Telegram servers; for testing only
func (*Client) TestNetwork ¶
TestNetwork Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization
func (*Client) TestProxy ¶
func (client *Client) TestProxy(server string, port int32, typeParam tdlib.ProxyType, dcID int32, timeout float64) (*tdlib.Ok, error)
TestProxy Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization @param server Proxy server IP address @param port Proxy server port @param typeParam Proxy type @param dcID Identifier of a datacenter, with which to test connection @param timeout The maximum overall timeout for the request
func (*Client) TestReturnError ¶
TestReturnError Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously @param error The error to be returned
func (*Client) TestSquareInt ¶
TestSquareInt Returns the squared received number; for testing only. This is an offline method. Can be called before authorization @param x Number to square
func (*Client) TestUseUpdate ¶
TestUseUpdate Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization
func (*Client) ToggleChatDefaultDisableNotification ¶
func (client *Client) ToggleChatDefaultDisableNotification(chatID int64, defaultDisableNotification bool) (*tdlib.Ok, error)
ToggleChatDefaultDisableNotification Changes the value of the default disable_notification parameter, used when a message is sent to a chat @param chatID Chat identifier @param defaultDisableNotification New value of default_disable_notification
func (*Client) ToggleChatIsMarkedAsUnread ¶
func (client *Client) ToggleChatIsMarkedAsUnread(chatID int64, isMarkedAsUnread bool) (*tdlib.Ok, error)
ToggleChatIsMarkedAsUnread Changes the marked as unread state of a chat @param chatID Chat identifier @param isMarkedAsUnread New value of is_marked_as_unread
func (*Client) ToggleChatIsPinned ¶
func (client *Client) ToggleChatIsPinned(chatList tdlib.ChatList, chatID int64, isPinned bool) (*tdlib.Ok, error)
ToggleChatIsPinned Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") pinned non-secret chats and the same number of secret chats in the main/arhive chat list @param chatList Chat list in which to change the pinned state of the chat @param chatID Chat identifier @param isPinned True, if the chat is pinned
func (*Client) ToggleGroupCallEnabledStartNotification ¶
func (client *Client) ToggleGroupCallEnabledStartNotification(groupCallID int32, enabledStartNotification bool) (*tdlib.Ok, error)
ToggleGroupCallEnabledStartNotification Toggles whether the current user will receive a notification when the group call will start; scheduled group calls only @param groupCallID Group call identifier @param enabledStartNotification New value of the enabled_start_notification setting
func (*Client) ToggleGroupCallIsMyVideoEnabled ¶
func (client *Client) ToggleGroupCallIsMyVideoEnabled(groupCallID int32, isMyVideoEnabled bool) (*tdlib.Ok, error)
ToggleGroupCallIsMyVideoEnabled Toggles whether current user's video is enabled @param groupCallID Group call identifier @param isMyVideoEnabled Pass true if the current user's video is enabled
func (*Client) ToggleGroupCallIsMyVideoPaused ¶
func (client *Client) ToggleGroupCallIsMyVideoPaused(groupCallID int32, isMyVideoPaused bool) (*tdlib.Ok, error)
ToggleGroupCallIsMyVideoPaused Toggles whether current user's video is paused @param groupCallID Group call identifier @param isMyVideoPaused Pass true if the current user's video is paused
func (*Client) ToggleGroupCallMuteNewParticipants ¶
func (client *Client) ToggleGroupCallMuteNewParticipants(groupCallID int32, muteNewParticipants bool) (*tdlib.Ok, error)
ToggleGroupCallMuteNewParticipants Toggles whether new participants of a group call can be unmuted only by administrators of the group call. Requires groupCall.can_change_mute_new_participants group call flag @param groupCallID Group call identifier @param muteNewParticipants New value of the mute_new_participants setting
func (*Client) ToggleGroupCallParticipantIsHandRaised ¶
func (client *Client) ToggleGroupCallParticipantIsHandRaised(groupCallID int32, participantID tdlib.MessageSender, isHandRaised bool) (*tdlib.Ok, error)
ToggleGroupCallParticipantIsHandRaised Toggles whether a group call participant hand is rased @param groupCallID Group call identifier @param participantID Participant identifier @param isHandRaised Pass true if the user's hand should be raised. Only self hand can be raised. Requires groupCall.can_be_managed group call flag to lower other's hand
func (*Client) ToggleGroupCallParticipantIsMuted ¶
func (client *Client) ToggleGroupCallParticipantIsMuted(groupCallID int32, participantID tdlib.MessageSender, isMuted bool) (*tdlib.Ok, error)
ToggleGroupCallParticipantIsMuted Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves @param groupCallID Group call identifier @param participantID Participant identifier @param isMuted Pass true if the user must be muted and false otherwise
func (*Client) ToggleGroupCallScreenSharingIsPaused ¶
func (client *Client) ToggleGroupCallScreenSharingIsPaused(groupCallID int32, isPaused bool) (*tdlib.Ok, error)
ToggleGroupCallScreenSharingIsPaused Pauses or unpauses screen sharing in a joined group call @param groupCallID Group call identifier @param isPaused True if screen sharing is paused
func (*Client) ToggleMessageSenderIsBlocked ¶
func (client *Client) ToggleMessageSenderIsBlocked(sender tdlib.MessageSender, isBlocked bool) (*tdlib.Ok, error)
ToggleMessageSenderIsBlocked Changes the block state of a message sender. Currently, only users and supergroup chats can be blocked @param sender Message Sender @param isBlocked New value of is_blocked
func (*Client) ToggleSupergroupIsAllHistoryAvailable ¶
func (client *Client) ToggleSupergroupIsAllHistoryAvailable(supergroupID int64, isAllHistoryAvailable bool) (*tdlib.Ok, error)
ToggleSupergroupIsAllHistoryAvailable Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right @param supergroupID The identifier of the supergroup @param isAllHistoryAvailable The new value of is_all_history_available
func (*Client) ToggleSupergroupIsBroadcastGroup ¶
ToggleSupergroupIsBroadcastGroup Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup @param supergroupID Identifier of the supergroup
func (*Client) ToggleSupergroupSignMessages ¶
func (client *Client) ToggleSupergroupSignMessages(supergroupID int64, signMessages bool) (*tdlib.Ok, error)
ToggleSupergroupSignMessages Toggles sender signatures messages sent in a channel; requires can_change_info administrator right @param supergroupID Identifier of the channel @param signMessages New value of sign_messages
func (*Client) TransferChatOwnership ¶
func (client *Client) TransferChatOwnership(chatID int64, userID int64, password string) (*tdlib.Ok, error)
TransferChatOwnership Changes the owner of a chat. The current user must be a current owner of the chat. Use the method canTransferOwnership to check whether the ownership can be transferred from the current session. Available only for supergroups and channel chats @param chatID Chat identifier @param userID Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user @param password The password of the current user
func (*Client) UnpinAllChatMessages ¶
UnpinAllChatMessages Removes all pinned messages from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @param chatID Identifier of the chat
func (*Client) UnpinChatMessage ¶
UnpinChatMessage Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @param chatID Identifier of the chat @param messageID Identifier of the removed pinned message
func (*Client) UpgradeBasicGroupChatToSupergroupChat ¶
UpgradeBasicGroupChatToSupergroupChat Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group @param chatID Identifier of the chat to upgrade
func (*Client) UploadFile ¶
func (client *Client) UploadFile(file tdlib.InputFile, fileType tdlib.FileType, priority int32) (*tdlib.File, error)
UploadFile Asynchronously uploads a file to the cloud without sending it in a message. updateFile will be used to notify about upload progress and successful completion of the upload. The file will not have a persistent remote identifier until it will be sent in a message @param file File to upload @param fileType File type @param priority Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which uploadFile was called will be uploaded first
func (*Client) UploadStickerFile ¶
func (client *Client) UploadStickerFile(userID int64, sticker tdlib.InputSticker) (*tdlib.File, error)
UploadStickerFile Uploads a PNG image with a sticker; returns the uploaded file @param userID Sticker file owner; ignored for regular users @param sticker Sticker file to upload
func (*Client) ValidateOrderInfo ¶
func (client *Client) ValidateOrderInfo(chatID int64, messageID int64, orderInfo *tdlib.OrderInfo, allowSave bool) (*tdlib.ValidatedOrderInfo, error)
ValidateOrderInfo Validates the order information provided by a user and returns the available shipping options for a flexible invoice @param chatID Chat identifier of the Invoice message @param messageID Message identifier @param orderInfo The order information, provided by the user @param allowSave True, if the order information can be saved
func (*Client) ViewMessages ¶
func (client *Client) ViewMessages(chatID int64, messageThreadID int64, messageIDs []int64, forceRead bool) (*tdlib.Ok, error)
ViewMessages Informs TDLib that messages are being viewed by the user. Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels) @param chatID Chat identifier @param messageThreadID If not 0, a message thread identifier in which the messages are being viewed @param messageIDs The identifiers of the messages being viewed @param forceRead True, if messages in closed chats should be marked as read by the request
func (*Client) ViewSponsoredMessage ¶
func (client *Client) ViewSponsoredMessage(chatID int64, sponsoredMessageID int32) (*tdlib.Ok, error)
ViewSponsoredMessage Informs TDLib that a sponsored message was viewed by the user @param chatID Identifier of the chat with the sponsored message @param sponsoredMessageID The identifier of the sponsored message being viewed
func (*Client) ViewTrendingStickerSets ¶
ViewTrendingStickerSets Informs the server that some trending sticker sets have been viewed by the user @param stickerSetIDs Identifiers of viewed trending sticker sets
func (*Client) WriteGeneratedFilePart ¶
func (client *Client) WriteGeneratedFilePart(generationID *tdlib.JSONInt64, offset int32, data []byte) (*tdlib.Ok, error)
WriteGeneratedFilePart Writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file @param generationID The identifier of the generation process @param offset The offset from which to write the data to the file @param data The data to write
type Config ¶
type Config struct { APIID string // Application identifier for Telegram API access, which can be obtained at https://my.telegram.org --- must be non-empty.. APIHash string // Application identifier hash for Telegram API access, which can be obtained at https://my.telegram.org --- must be non-empty.. SystemLanguageCode string // IETF language tag of the user's operating system language; must be non-empty. DeviceModel string // Model of the device the application is being run on; must be non-empty. SystemVersion string // Version of the operating system the application is being run on; must be non-empty. ApplicationVersion string // Application version; must be non-empty. // Optional fields UseTestDataCenter bool // if set to true, the Telegram test environment will be used instead of the production environment. DatabaseDirectory string // The path to the directory for the persistent database; if empty, the current working directory will be used. FileDirectory string // The path to the directory for storing files; if empty, database_directory will be used. UseFileDatabase bool // If set to true, information about downloaded and uploaded files will be saved between application restarts. UseChatInfoDatabase bool // If set to true, the library will maintain a cache of users, basic groups, supergroups, channels and secret chats. Implies use_file_database. UseMessageDatabase bool // If set to true, the library will maintain a cache of chats and messages. Implies use_chat_info_database. UseSecretChats bool // If set to true, support for secret chats will be enabled. EnableStorageOptimizer bool // If set to true, old files will automatically be deleted. IgnoreFileNames bool // If set to true, original file names will be ignored. Otherwise, downloaded files will be saved under names as close as possible to the original name. }
Config holds tdlibParameters
type EventFilterFunc ¶
EventFilterFunc used to filter out unwanted messages in receiver channels
type EventReceiver ¶
type EventReceiver struct { Instance tdlib.TdMessage Chan chan tdlib.TdMessage FilterFunc EventFilterFunc }
EventReceiver used to retreive updates from tdlib to user
Source Files
¶
- accountTTL.go
- animations.go
- authenticationCodeInfo.go
- authorizationState.go
- autoDownloadSettingsPresets.go
- background.go
- backgrounds.go
- bankCardInfo.go
- basicGroup.go
- basicGroupFullInfo.go
- botCommands.go
- callID.go
- callbackQueryAnswer.go
- canTransferOwnershipResult.go
- chat.go
- chatAdministrators.go
- chatEvents.go
- chatFilter.go
- chatFilterInfo.go
- chatInviteLink.go
- chatInviteLinkCounts.go
- chatInviteLinkInfo.go
- chatInviteLinkMembers.go
- chatInviteLinks.go
- chatLists.go
- chatMember.go
- chatMembers.go
- chatPhotos.go
- chatStatistics.go
- chats.go
- chatsNearby.go
- checkChatUsernameResult.go
- checkStickerSetNameResult.go
- client.go
- connectedWebsites.go
- count.go
- countries.go
- customRequestResult.go
- databaseStatistics.go
- deepLinkInfo.go
- emailAddressAuthenticationCodeInfo.go
- emojis.go
- error.go
- file.go
- filePart.go
- formattedText.go
- foundMessages.go
- gameHighScores.go
- groupCall.go
- groupCallID.go
- hashtags.go
- httpURL.go
- importedContacts.go
- inlineQueryResults.go
- internalLinkType.go
- jsonValue.go
- languagePackInfo.go
- languagePackStringValue.go
- languagePackStrings.go
- localizationTargetInfo.go
- logStream.go
- logTags.go
- logVerbosityLevel.go
- loginURLInfo.go
- message.go
- messageFileType.go
- messageLink.go
- messageLinkInfo.go
- messageSenders.go
- messageStatistics.go
- messageThreadInfo.go
- messages.go
- networkStatistics.go
- ok.go
- optionValue.go
- orderInfo.go
- passportAuthorizationForm.go
- passportElement.go
- passportElements.go
- passportElementsWithErrors.go
- passwordState.go
- paymentForm.go
- paymentReceipt.go
- paymentResult.go
- phoneNumberInfo.go
- proxies.go
- proxy.go
- pushReceiverID.go
- recommendedChatFilters.go
- recoveryEmailAddress.go
- resetPasswordResult.go
- scopeNotificationSettings.go
- seconds.go
- secretChat.go
- session.go
- sessions.go
- sponsoredMessages.go
- statisticalGraph.go
- stickerSet.go
- stickerSets.go
- stickers.go
- storageStatistics.go
- storageStatisticsFast.go
- supergroup.go
- supergroupFullInfo.go
- tMeURLs.go
- temporaryPasswordState.go
- testBytes.go
- testInt.go
- testString.go
- testVectorInt.go
- testVectorIntObject.go
- testVectorString.go
- testVectorStringObject.go
- text.go
- textEntities.go
- update.go
- updates.go
- user.go
- userFullInfo.go
- userPrivacySettingRules.go
- users.go
- validatedOrderInfo.go
- webPage.go
- webPageInstantView.go