acceptCall |
Suspend function, which accepts an incoming call.suspend fun TelegramFlow .acceptCall(callId: Int , protocol: CallProtocol ?): Unit |
acceptTermsOfService |
Suspend function, which accepts Telegram terms of services.suspend fun TelegramFlow .acceptTermsOfService(termsOfServiceId: String ?): Unit |
activeNotificationsFlow |
emits groups [NotificationGroup[]] if contains active notifications that was shown on previous application launches. This update is sent only if the message database is used. In that case it comes once before any updateNotification and updateNotificationGroup update.fun TelegramFlow .activeNotificationsFlow(): Flow< Array < NotificationGroup >> |
addChatMember |
Suspend function, which adds a new member to a chat. Members can’t be added to private or secret chats. Members will not be added until the chat state has been synchronized with the server.suspend fun TelegramFlow .addChatMember(chatId: Long , userId: Int , forwardLimit: Int ): Unit |
addChatMembers |
Suspend function, which adds multiple new members to a chat. Currently this option is only available for supergroups and channels. This option can’t be used to join a chat. Members can’t be added to a channel if it has more than 200 members. Members will not be added until the chat state has been synchronized with the server.suspend fun TelegramFlow .addChatMembers(chatId: Long , userIds: IntArray ?): Unit |
addContact |
Suspend function, which adds a user to the contact list or edits an existing contact by their user identifier.suspend fun TelegramFlow .addContact(contact: Contact ?, sharePhoneNumber: Boolean ): Unit |
addCustomServerLanguagePack |
Suspend function, which adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization.suspend fun TelegramFlow .addCustomServerLanguagePack(languagePackId: String ?): Unit |
addFavoriteSticker |
Suspend function, which 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.suspend fun TelegramFlow .addFavoriteSticker(sticker: InputFile ?): Unit |
addLocalMessage |
Suspend function, which 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.suspend fun TelegramFlow .addLocalMessage(chatId: Long , senderUserId: Int , replyToMessageId: Long , disableNotification: Boolean , inputMessageContent: InputMessageContent ?): Message |
addLogMessage |
Suspend function, which adds a message to TDLib internal log. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .addLogMessage(verbosityLevel: Int , text: String ?): Unit |
addNetworkStatistics |
Suspend function, which adds the specified data to data usage statistics. Can be called before authorization.suspend fun TelegramFlow .addNetworkStatistics(entry: NetworkStatisticsEntry ?): Unit |
addProxy |
Suspend function, which adds a proxy server for network requests. Can be called before authorization.suspend fun TelegramFlow .addProxy(server: String ?, port: Int , enable: Boolean , type: ProxyType ?): Proxy |
addRecentlyFoundChat |
Suspend function, which 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.suspend fun TelegramFlow .addRecentlyFoundChat(chatId: Long ): Unit |
addRecentSticker |
Suspend function, which 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.suspend fun TelegramFlow .addRecentSticker(isAttached: Boolean , sticker: InputFile ?): Stickers |
addSavedAnimation |
Suspend function, which 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.suspend fun TelegramFlow .addSavedAnimation(animation: InputFile ?): Unit |
addStickerToSet |
Suspend function, which adds a new sticker to a set; for bots only. Returns the sticker set.suspend fun TelegramFlow .addStickerToSet(userId: Int , name: String ?, sticker: InputSticker ?): StickerSet |
answerCallbackQuery |
Suspend function, which sets the result of a callback query; for bots only.suspend fun TelegramFlow .answerCallbackQuery(callbackQueryId: Long , text: String ?, showAlert: Boolean , url: String ?, cacheTime: Int ): Unit |
answerCustomQuery |
Suspend function, which answers a custom query; for bots only.suspend fun TelegramFlow .answerCustomQuery(customQueryId: Long , data: String ?): Unit |
answerInlineQuery |
Suspend function, which sets the result of an inline query; for bots only.suspend fun TelegramFlow .answerInlineQuery(inlineQueryId: Long , isPersonal: Boolean , results: Array < InputInlineQueryResult >?, cacheTime: Int , nextOffset: String ?, switchPmText: String ?, switchPmParameter: String ?): Unit |
answerPreCheckoutQuery |
Suspend function, which sets the result of a pre-checkout query; for bots only.suspend fun TelegramFlow .answerPreCheckoutQuery(preCheckoutQueryId: Long , errorMessage: String ?): Unit |
answerShippingQuery |
Suspend function, which sets the result of a shipping query; for bots only.suspend fun TelegramFlow .answerShippingQuery(shippingQueryId: Long , shippingOptions: Array < ShippingOption >?, errorMessage: String ?): Unit |
authorizationStateFlow |
emits AuthorizationState if the user authorization state has changed.fun TelegramFlow .authorizationStateFlow(): Flow< AuthorizationState > |
basicGroupFlow |
emits BasicGroup if some data of a basic group has changed. This update is guaranteed to come before the basic group identifier is returned to the client.fun TelegramFlow .basicGroupFlow(): Flow< BasicGroup > |
basicGroupFullInfoFlow |
emits UpdateBasicGroupFullInfo if some data from basicGroupFullInfo has been changed.fun TelegramFlow .basicGroupFullInfoFlow(): Flow< UpdateBasicGroupFullInfo > |
blockUser |
Suspend function, which adds a user to the blacklist.suspend fun TelegramFlow .blockUser(userId: Int ): Unit |
callFlow |
emits Call if new call was created or information about a call was updated.fun TelegramFlow .callFlow(): Flow< Call > |
cancelDownloadFile |
Suspend function, which stops the downloading of a file. If a file has already been downloaded, does nothing.suspend fun TelegramFlow .cancelDownloadFile(fileId: Int , onlyIfPending: Boolean ): Unit |
cancelUploadFile |
Suspend function, which stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined.suspend fun TelegramFlow .cancelUploadFile(fileId: Int ): Unit |
canTransferOwnership |
Suspend function, which checks whether the current session can be used to transfer a chat ownership to another user.suspend fun TelegramFlow .canTransferOwnership(): CanTransferOwnershipResult |
changeImportedContacts |
Suspend function, which changes imported contacts using the list of current user 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.suspend fun TelegramFlow .changeImportedContacts(contacts: Array < Contact >?): ImportedContacts |
changePhoneNumber |
Suspend function, which 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.suspend fun TelegramFlow .changePhoneNumber(phoneNumber: String ?, settings: PhoneNumberAuthenticationSettings ?): AuthenticationCodeInfo |
changeStickerSet |
Suspend function, which installs/uninstalls or activates/archives a sticker set.suspend fun TelegramFlow .changeStickerSet(setId: Long , isInstalled: Boolean , isArchived: Boolean ): Unit |
chatActionBarFlow |
emits UpdateChatActionBar if the chat action bar was changed.fun TelegramFlow .chatActionBarFlow(): Flow< UpdateChatActionBar > |
chatChatListFlow |
emits UpdateChatChatList if the list to which the chat belongs was changed. This update is guaranteed to be sent only when chat.order == 0 and the current or the new chat list is null.fun TelegramFlow .chatChatListFlow(): Flow< UpdateChatChatList > |
chatDefaultDisableNotificationFlow |
emits UpdateChatDefaultDisableNotification if the value of the default disableNotification parameter, used when a message is sent to the chat, was changed.fun TelegramFlow .chatDefaultDisableNotificationFlow(): Flow< UpdateChatDefaultDisableNotification > |
chatDraftMessageFlow |
emits UpdateChatDraftMessage if a chat draft has changed. Be aware that the update may come in the currently opened chat but with old content of the draft. If the user has changed the content of the draft, this update shouldn’t be applied.fun TelegramFlow .chatDraftMessageFlow(): Flow< UpdateChatDraftMessage > |
chatHasScheduledMessagesFlow |
emits UpdateChatHasScheduledMessages if a chat’s hasScheduledMessages field has changed.fun TelegramFlow .chatHasScheduledMessagesFlow(): Flow< UpdateChatHasScheduledMessages > |
chatIsMarkedAsUnreadFlow |
emits UpdateChatIsMarkedAsUnread if a chat was marked as unread or was read.fun TelegramFlow .chatIsMarkedAsUnreadFlow(): Flow< UpdateChatIsMarkedAsUnread > |
chatIsPinnedFlow |
emits UpdateChatIsPinned if a chat was pinned or unpinned.fun TelegramFlow .chatIsPinnedFlow(): Flow< UpdateChatIsPinned > |
chatIsSponsoredFlow |
emits UpdateChatIsSponsored if a chat’s isSponsored field has changed.fun TelegramFlow .chatIsSponsoredFlow(): Flow< UpdateChatIsSponsored > |
chatLastMessageFlow |
emits UpdateChatLastMessage if the last message of a chat was changed. If lastMessage is null, then the last message in the chat became unknown. Some new unknown messages might be added to the chat in this case.fun TelegramFlow .chatLastMessageFlow(): Flow< UpdateChatLastMessage > |
chatNotificationSettingsFlow |
emits UpdateChatNotificationSettings if notification settings for a chat were changed.fun TelegramFlow .chatNotificationSettingsFlow(): Flow< UpdateChatNotificationSettings > |
chatOnlineMemberCountFlow |
emits UpdateChatOnlineMemberCount if the number of online group members has changed. This update with non-zero count is sent only for currently opened chats. There is no guarantee that it will be sent just after the count has changed.fun TelegramFlow .chatOnlineMemberCountFlow(): Flow< UpdateChatOnlineMemberCount > |
chatOrderFlow |
emits UpdateChatOrder if the order of the chat in the chat list has changed. Instead of this update updateChatLastMessage, updateChatIsPinned, updateChatDraftMessage, or updateChatIsSponsored might be sent.fun TelegramFlow .chatOrderFlow(): Flow< UpdateChatOrder > |
chatPermissionsFlow |
emits UpdateChatPermissions if chat permissions was changed.fun TelegramFlow .chatPermissionsFlow(): Flow< UpdateChatPermissions > |
chatPhotoFlow |
emits UpdateChatPhoto if a chat photo was changed.fun TelegramFlow .chatPhotoFlow(): Flow< UpdateChatPhoto > |
chatPinnedMessageFlow |
emits UpdateChatPinnedMessage if the chat pinned message was changed.fun TelegramFlow .chatPinnedMessageFlow(): Flow< UpdateChatPinnedMessage > |
chatReadInboxFlow |
emits UpdateChatReadInbox if incoming messages were read or number of unread messages has been changed.fun TelegramFlow .chatReadInboxFlow(): Flow< UpdateChatReadInbox > |
chatReadOutboxFlow |
emits UpdateChatReadOutbox if outgoing messages were read.fun TelegramFlow .chatReadOutboxFlow(): Flow< UpdateChatReadOutbox > |
chatReplyMarkupFlow |
emits UpdateChatReplyMarkup if the default chat reply markup was changed. Can occur because new messages with reply markup were received or because an old reply markup was hidden by the user.fun TelegramFlow .chatReplyMarkupFlow(): Flow< UpdateChatReplyMarkup > |
chatTitleFlow |
emits UpdateChatTitle if the title of a chat was changed.fun TelegramFlow .chatTitleFlow(): Flow< UpdateChatTitle > |
chatUnreadMentionCountFlow |
emits UpdateChatUnreadMentionCount if the chat unreadMentionCount has changed.fun TelegramFlow .chatUnreadMentionCountFlow(): Flow< UpdateChatUnreadMentionCount > |
checkAuthenticationBotToken |
Suspend function, which 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.suspend fun TelegramFlow .checkAuthenticationBotToken(token: String ?): Unit |
checkAuthenticationCode |
Suspend function, which checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode.suspend fun TelegramFlow .checkAuthenticationCode(code: String ?): Unit |
checkAuthenticationPassword |
Suspend function, which checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword.suspend fun TelegramFlow .checkAuthenticationPassword(password: String ?): Unit |
checkChangePhoneNumberCode |
Suspend function, which checks the authentication code sent to confirm a new phone number of the user.suspend fun TelegramFlow .checkChangePhoneNumberCode(code: String ?): Unit |
checkChatInviteLink |
Suspend function, which checks the validity of an invite link for a chat and returns information about the corresponding chat.suspend fun TelegramFlow .checkChatInviteLink(inviteLink: String ?): ChatInviteLinkInfo |
checkChatUsername |
Suspend function, which checks whether a username can be set for a chat.suspend fun TelegramFlow .checkChatUsername(chatId: Long , username: String ?): CheckChatUsernameResult |
checkCreatedPublicChatsLimit |
Suspend function, which checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached.suspend fun TelegramFlow .checkCreatedPublicChatsLimit(type: PublicChatType ?): Unit |
checkDatabaseEncryptionKey |
Suspend function, which checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey.suspend fun TelegramFlow .checkDatabaseEncryptionKey(encryptionKey: ByteArray ?): Unit |
checkEmailAddressVerificationCode |
Suspend function, which checks the email address verification code for Telegram Passport.suspend fun TelegramFlow .checkEmailAddressVerificationCode(code: String ?): Unit |
checkPhoneNumberConfirmationCode |
Suspend function, which checks phone number confirmation code.suspend fun TelegramFlow .checkPhoneNumberConfirmationCode(code: String ?): Unit |
checkPhoneNumberVerificationCode |
Suspend function, which checks the phone number verification code for Telegram Passport.suspend fun TelegramFlow .checkPhoneNumberVerificationCode(code: String ?): Unit |
checkRecoveryEmailAddressCode |
Suspend function, which checks the 2-step verification recovery email address verification code.suspend fun TelegramFlow .checkRecoveryEmailAddressCode(code: String ?): PasswordState |
cleanFileName |
Suspend function, which 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. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .cleanFileName(fileName: String ?): Text |
clearAllDraftMessages |
Suspend function, which clears draft messages in all chats.suspend fun TelegramFlow .clearAllDraftMessages(excludeSecretChats: Boolean ): Unit |
clearImportedContacts |
Suspend function, which clears all imported contacts, contact list remains unchanged.suspend fun TelegramFlow .clearImportedContacts(): Unit |
clearRecentlyFoundChats |
Suspend function, which clears the list of recently found chats.suspend fun TelegramFlow .clearRecentlyFoundChats(): Unit |
clearRecentStickers |
Suspend function, which clears the list of recently used stickers.suspend fun TelegramFlow .clearRecentStickers(isAttached: Boolean ): Unit |
close |
Suspend function, which closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent.suspend fun TelegramFlow .close(): Unit |
closeChat |
Suspend function, which informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed.suspend fun TelegramFlow .closeChat(chatId: Long ): Unit |
closeSecretChat |
Suspend function, which closes a secret chat, effectively transferring its state to secretChatStateClosed.suspend fun TelegramFlow .closeSecretChat(secretChatId: Int ): Unit |
confirmQrCodeAuthentication |
Suspend function, which confirms QR code authentication on another device. Returns created session on success.suspend fun TelegramFlow .confirmQrCodeAuthentication(link: String ?): Session |
connectionStateFlow |
emits state ConnectionState if the connection state has changed.fun TelegramFlow .connectionStateFlow(): Flow< ConnectionState > |
createBasicGroupChat |
Suspend function, which returns an existing chat corresponding to a known basic group.suspend fun TelegramFlow .createBasicGroupChat(basicGroupId: Int , force: Boolean ): Chat |
createCall |
Suspend function, which creates a new call.suspend fun TelegramFlow .createCall(userId: Int , protocol: CallProtocol ?): CallId |
createNewBasicGroupChat |
Suspend function, which creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat.suspend fun TelegramFlow .createNewBasicGroupChat(userIds: IntArray ?, title: String ?): Chat |
createNewSecretChat |
Suspend function, which creates a new secret chat. Returns the newly created chat.suspend fun TelegramFlow .createNewSecretChat(userId: Int ): Chat |
createNewStickerSet |
Suspend function, which creates a new sticker set; for bots only. Returns the newly created sticker set.suspend fun TelegramFlow .createNewStickerSet(userId: Int , title: String ?, name: String ?, isMasks: Boolean , stickers: Array < InputSticker >?): StickerSet |
createNewSupergroupChat |
Suspend function, which creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat.suspend fun TelegramFlow .createNewSupergroupChat(title: String ?, isChannel: Boolean , description: String ?, location: ChatLocation ?): Chat |
createPrivateChat |
Suspend function, which returns an existing chat corresponding to a given user.suspend fun TelegramFlow .createPrivateChat(userId: Int , force: Boolean ): Chat |
createSecretChat |
Suspend function, which returns an existing chat corresponding to a known secret chat.suspend fun TelegramFlow .createSecretChat(secretChatId: Int ): Chat |
createSupergroupChat |
Suspend function, which returns an existing chat corresponding to a known supergroup or channel.suspend fun TelegramFlow .createSupergroupChat(supergroupId: Int , force: Boolean ): Chat |
createTemporaryPassword |
Suspend function, which creates a new temporary password for processing payments.suspend fun TelegramFlow .createTemporaryPassword(password: String ?, validFor: Int ): TemporaryPasswordState |
deleteAccount |
Suspend function, which 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.suspend fun TelegramFlow .deleteAccount(reason: String ?): Unit |
deleteChatHistory |
Suspend function, which deletes all messages in the chat. Use Chat.canBeDeletedOnlyForSelf and Chat.canBeDeletedForAllUsers fields to find whether and how the method can be applied to the chat.suspend fun TelegramFlow .deleteChatHistory(chatId: Long , removeFromChatList: Boolean , revoke: Boolean ): Unit |
deleteChatMessagesFromUser |
Suspend function, which deletes all messages sent by the specified user to a chat. Supported only for supergroups; requires canDeleteMessages administrator privileges.suspend fun TelegramFlow .deleteChatMessagesFromUser(chatId: Long , userId: Int ): Unit |
deleteChatReplyMarkup |
Suspend function, which 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.suspend fun TelegramFlow .deleteChatReplyMarkup(chatId: Long , messageId: Long ): Unit |
deleteFile |
Suspend function, which deletes a file from the TDLib file cache.suspend fun TelegramFlow .deleteFile(fileId: Int ): Unit |
deleteLanguagePack |
Suspend function, which 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.suspend fun TelegramFlow .deleteLanguagePack(languagePackId: String ?): Unit |
deleteMessages |
Suspend function, which deletes messages.suspend fun TelegramFlow .deleteMessages(chatId: Long , messageIds: LongArray ?, revoke: Boolean ): Unit |
deleteMessagesFlow |
emits UpdateDeleteMessages if some messages were deleted.fun TelegramFlow .deleteMessagesFlow(): Flow< UpdateDeleteMessages > |
deletePassportElement |
Suspend function, which deletes a Telegram Passport element.suspend fun TelegramFlow .deletePassportElement(type: PassportElementType ?): Unit |
deleteProfilePhoto |
Suspend function, which deletes a profile photo. If something changes, updateUser will be sent.suspend fun TelegramFlow .deleteProfilePhoto(profilePhotoId: Long ): Unit |
deleteSavedCredentials |
Suspend function, which deletes saved credentials for all payment provider bots.suspend fun TelegramFlow .deleteSavedCredentials(): Unit |
deleteSavedOrderInfo |
Suspend function, which deletes saved order info.suspend fun TelegramFlow .deleteSavedOrderInfo(): Unit |
deleteSupergroup |
Suspend function, which deletes a supergroup or channel along with all messages in the corresponding chat. This will release the supergroup or channel username and remove all members; requires owner privileges in the supergroup or channel. Chats with more than 1000 members can’t be deleted using this method.suspend fun TelegramFlow .deleteSupergroup(supergroupId: Int ): Unit |
destroy |
Suspend function, which 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.suspend fun TelegramFlow .destroy(): Unit |
disableProxy |
Suspend function, which disables the currently enabled proxy. Can be called before authorization.suspend fun TelegramFlow .disableProxy(): Unit |
discardCall |
Suspend function, which discards a call.suspend fun TelegramFlow .discardCall(callId: Int , isDisconnected: Boolean , duration: Int , connectionId: Long ): Unit |
disconnectAllWebsites |
Suspend function, which disconnects all websites from the current user’s Telegram account.suspend fun TelegramFlow .disconnectAllWebsites(): Unit |
disconnectWebsite |
Suspend function, which disconnects website from the current user’s Telegram account.suspend fun TelegramFlow .disconnectWebsite(websiteId: Long ): Unit |
downloadFile |
Suspend function, which downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.suspend fun TelegramFlow .downloadFile(fileId: Int , priority: Int , offset: Int , limit: Int , synchronous: Boolean ): File |
editCustomLanguagePackInfo |
Suspend function, which edits information about a custom local language pack in the current localization target. Can be called before authorization.suspend fun TelegramFlow .editCustomLanguagePackInfo(info: LanguagePackInfo ?): Unit |
editInlineMessageCaption |
Suspend function, which edits the caption of an inline message sent via a bot; for bots only.suspend fun TelegramFlow .editInlineMessageCaption(inlineMessageId: String ?, replyMarkup: ReplyMarkup ?, caption: FormattedText ?): Unit |
editInlineMessageLiveLocation |
Suspend function, which edits the content of a live location in an inline message sent via a bot; for bots only.suspend fun TelegramFlow .editInlineMessageLiveLocation(inlineMessageId: String ?, replyMarkup: ReplyMarkup ?, location: Location ? = null): Unit |
editInlineMessageMedia |
Suspend function, which 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.suspend fun TelegramFlow .editInlineMessageMedia(inlineMessageId: String ?, replyMarkup: ReplyMarkup ?, inputMessageContent: InputMessageContent ?): Unit |
editInlineMessageReplyMarkup |
Suspend function, which edits the reply markup of an inline message sent via a bot; for bots only.suspend fun TelegramFlow .editInlineMessageReplyMarkup(inlineMessageId: String ?, replyMarkup: ReplyMarkup ?): Unit |
editInlineMessageText |
Suspend function, which edits the text of an inline text or game message sent via a bot; for bots only.suspend fun TelegramFlow .editInlineMessageText(inlineMessageId: String ?, replyMarkup: ReplyMarkup ?, inputMessageContent: InputMessageContent ?): Unit |
editMessageCaption |
Suspend function, which edits the message content caption. Returns the edited message after the edit is completed on the server side.suspend fun TelegramFlow .editMessageCaption(chatId: Long , messageId: Long , replyMarkup: ReplyMarkup ?, caption: FormattedText ?): Message |
editMessageLiveLocation |
Suspend function, which 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.suspend fun TelegramFlow .editMessageLiveLocation(chatId: Long , messageId: Long , replyMarkup: ReplyMarkup ?, location: Location ? = null): Message |
editMessageMedia |
Suspend function, which edits the content of a message with an animation, an audio, a document, a photo or a video. The media in the message can’t be replaced if the message was set to self-destruct. Media can’t be replaced by self-destructing media. Media in an album can be edited only to contain a photo or a video. Returns the edited message after the edit is completed on the server side.suspend fun TelegramFlow .editMessageMedia(chatId: Long , messageId: Long , replyMarkup: ReplyMarkup ?, inputMessageContent: InputMessageContent ?): Message |
editMessageReplyMarkup |
Suspend function, which edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side.suspend fun TelegramFlow .editMessageReplyMarkup(chatId: Long , messageId: Long , replyMarkup: ReplyMarkup ?): Message |
editMessageSchedulingState |
Suspend function, which 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.suspend fun TelegramFlow .editMessageSchedulingState(chatId: Long , messageId: Long , schedulingState: MessageSchedulingState ?): Unit |
editMessageText |
Suspend function, which 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.suspend fun TelegramFlow .editMessageText(chatId: Long , messageId: Long , replyMarkup: ReplyMarkup ?, inputMessageContent: InputMessageContent ?): Message |
editProxy |
Suspend function, which edits an existing proxy server for network requests. Can be called before authorization.suspend fun TelegramFlow .editProxy(proxyId: Int , server: String ?, port: Int , enable: Boolean , type: ProxyType ?): Proxy |
enableProxy |
Suspend function, which enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization.suspend fun TelegramFlow .enableProxy(proxyId: Int ): Unit |
favoriteStickersFlow |
emits stickerIds [Int[]] if the list of favorite stickers was updated.fun TelegramFlow .favoriteStickersFlow(): Flow< IntArray > |
fileFlow |
emits File if information about a file was updated.fun TelegramFlow .fileFlow(): Flow< File > |
fileGenerationStartFlow |
emits UpdateFileGenerationStart if the file generation process needs to be started by the client.fun TelegramFlow .fileGenerationStartFlow(): Flow< UpdateFileGenerationStart > |
fileGenerationStopFlow |
emits generationId Long if file generation is no longer needed.fun TelegramFlow .fileGenerationStopFlow(): Flow< Long > |
finishFileGeneration |
Suspend function, which finishes the file generation.suspend fun TelegramFlow .finishFileGeneration(generationId: Long , error: Error ?): Unit |
forwardMessages |
Suspend function, which forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in messageIds. If a message can’t be forwarded, null will be returned instead of the message.suspend fun TelegramFlow .forwardMessages(chatId: Long , fromChatId: Long , messageIds: LongArray ?, options: SendMessageOptions ?, asAlbum: Boolean , sendCopy: Boolean , removeCaption: Boolean ): Messages |
generateChatInviteLink |
Suspend function, which generates a new invite link for a chat; the previously generated link is revoked. Available for basic groups, supergroups, and channels. Requires administrator privileges and canInviteUsers right.suspend fun TelegramFlow .generateChatInviteLink(chatId: Long ): ChatInviteLink |
getAccountTtl |
Suspend function, which returns the period of inactivity after which the account of the current user will automatically be deleted.suspend fun TelegramFlow .getAccountTtl(): AccountTtl |
getActiveLiveLocationMessages |
Suspend function, which returns all active live locations that should be updated by the client. The list is persistent across application restarts only if the message database is used.suspend fun TelegramFlow .getActiveLiveLocationMessages(): Messages |
getActiveSessions |
Suspend function, which returns all active sessions of the current user.suspend fun TelegramFlow .getActiveSessions(): Sessions |
getAllPassportElements |
Suspend function, which returns all available Telegram Passport elements.suspend fun TelegramFlow .getAllPassportElements(password: String ?): PassportElements |
getApplicationConfig |
Suspend function, which returns application config, provided by the server. Can be called before authorization.suspend fun TelegramFlow .getApplicationConfig(): JsonValue |
getArchivedStickerSets |
Suspend function, which returns a list of archived sticker sets.suspend fun TelegramFlow .getArchivedStickerSets(isMasks: Boolean , offsetStickerSetId: Long , limit: Int ): StickerSets |
getAttachedStickerSets |
Suspend function, which returns a list of sticker sets attached to a file. Currently only photos and videos can have attached sticker sets.suspend fun TelegramFlow .getAttachedStickerSets(fileId: Int ): StickerSets |
getAuthorizationState |
Suspend function, which returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state.suspend fun TelegramFlow .getAuthorizationState(): AuthorizationState |
getAutoDownloadSettingsPresets |
Suspend function, which returns auto-download settings presets for the currently logged in user.suspend fun TelegramFlow .getAutoDownloadSettingsPresets(): AutoDownloadSettingsPresets |
getBackgrounds |
Suspend function, which returns backgrounds installed by the user.suspend fun TelegramFlow .getBackgrounds(forDarkTheme: Boolean ): Backgrounds |
getBackgroundUrl |
Suspend function, which constructs a persistent HTTP URL for a background.suspend fun TelegramFlow .getBackgroundUrl(name: String ?, type: BackgroundType ?): HttpUrl |
getBasicGroup |
Suspend function, which returns information about a basic group by its identifier. This is an offline request if the current user is not a bot.suspend fun TelegramFlow .getBasicGroup(basicGroupId: Int ): BasicGroup |
getBasicGroupFullInfo |
Suspend function, which returns full information about a basic group by its identifier.suspend fun TelegramFlow .getBasicGroupFullInfo(basicGroupId: Int ): BasicGroupFullInfo |
getBlockedUsers |
Suspend function, which returns users that were blocked by the current user.suspend fun TelegramFlow .getBlockedUsers(offset: Int , limit: Int ): Users |
getCallbackQueryAnswer |
Suspend function, which 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.suspend fun TelegramFlow .getCallbackQueryAnswer(chatId: Long , messageId: Long , payload: CallbackQueryPayload ?): CallbackQueryAnswer |
getChat |
Suspend function, which returns information about a chat by its identifier, this is an offline request if the current user is not a bot.suspend fun TelegramFlow .getChat(chatId: Long ): Chat |
getChatAdministrators |
Suspend function, which returns a list of administrators of the chat with their custom titles.suspend fun TelegramFlow .getChatAdministrators(chatId: Long ): ChatAdministrators |
getChatEventLog |
Suspend function, which 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 eventId).suspend fun TelegramFlow .getChatEventLog(chatId: Long , query: String ?, fromEventId: Long , limit: Int , filters: ChatEventLogFilters ?, userIds: IntArray ?): ChatEvents |
getChatHistory |
Suspend function, which returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library. This is an offline request if onlyLocal is true.suspend fun TelegramFlow .getChatHistory(chatId: Long , fromMessageId: Long , offset: Int , limit: Int , onlyLocal: Boolean ): Messages |
getChatMember |
Suspend function, which returns information about a single member of a chat.suspend fun TelegramFlow .getChatMember(chatId: Long , userId: Int ): ChatMember |
getChatMessageByDate |
Suspend function, which returns the last message sent in a chat no later than the specified date.suspend fun TelegramFlow .getChatMessageByDate(chatId: Long , date: Int ): Message |
getChatMessageCount |
Suspend function, which returns approximate number of messages of the specified type in the chat.suspend fun TelegramFlow .getChatMessageCount(chatId: Long , filter: SearchMessagesFilter ?, returnLocal: Boolean ): Count |
getChatNotificationSettingsExceptions |
Suspend function, which returns list of chats with non-default notification settings.suspend fun TelegramFlow .getChatNotificationSettingsExceptions(scope: NotificationSettingsScope ?, compareSound: Boolean ): Chats |
getChatPinnedMessage |
Suspend function, which returns information about a pinned chat message.suspend fun TelegramFlow .getChatPinnedMessage(chatId: Long ): Message |
getChats |
Suspend function, which returns an ordered list of chats in a chat list. Chats are sorted by the pair (order, chatId) in decreasing order. (For example, to get a list of chats from the beginning, the offsetOrder should be equal to a biggest signed 64-bit number 9223372036854775807 == 2^63 - 1). For optimal performance the number of returned chats is chosen by the library.suspend fun TelegramFlow .getChats(chatList: ChatList ?, offsetOrder: Long , offsetChatId: Long , limit: Int ): Chats |
getChatScheduledMessages |
Suspend function, which returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing messageId).suspend fun TelegramFlow .getChatScheduledMessages(chatId: Long ): Messages |
getChatStatisticsUrl |
Suspend function, which returns an HTTP URL with the chat statistics. Currently this method can be used only for channels. Can be used only if SupergroupFullInfo.canViewStatistics == true.suspend fun TelegramFlow .getChatStatisticsUrl(chatId: Long , parameters: String ?, isDark: Boolean ): HttpUrl |
getConnectedWebsites |
Suspend function, which returns all website where the current user used Telegram to log in.suspend fun TelegramFlow .getConnectedWebsites(): ConnectedWebsites |
getContacts |
Suspend function, which returns all user contacts.suspend fun TelegramFlow .getContacts(): Users |
getCountryCode |
Suspend function, which uses current user IP to found their country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization.suspend fun TelegramFlow .getCountryCode(): Text |
getCreatedPublicChats |
Suspend function, which returns a list of public chats of the specified type, owned by the user.suspend fun TelegramFlow .getCreatedPublicChats(type: PublicChatType ?): Chats |
getCurrentState |
Suspend function, which 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. This is an offline method. Can be called before authorization.suspend fun TelegramFlow .getCurrentState(): Updates |
getDatabaseStatistics |
Suspend function, which returns database statistics.suspend fun TelegramFlow .getDatabaseStatistics(): DatabaseStatistics |
getDeepLinkInfo |
Suspend function, which returns information about a tg:// deep link. Use "tg://need_update_for_some_feature" or "tg:someUnsupportedFeature" for testing. Returns a 404 error for unknown links. Can be called before authorization.suspend fun TelegramFlow .getDeepLinkInfo(link: String ?): DeepLinkInfo |
getEmojiSuggestionsUrl |
Suspend function, which 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.suspend fun TelegramFlow .getEmojiSuggestionsUrl(languageCode: String ?): HttpUrl |
getFavoriteStickers |
Suspend function, which returns favorite stickers.suspend fun TelegramFlow .getFavoriteStickers(): Stickers |
getFile |
Suspend function, which returns information about a file; this is an offline request.suspend fun TelegramFlow .getFile(fileId: Int ): File |
getFileDownloadedPrefixSize |
Suspend function, which returns file downloaded prefix size from a given offset.suspend fun TelegramFlow .getFileDownloadedPrefixSize(fileId: Int , offset: Int ): Count |
getFileExtension |
Suspend function, which returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getFileExtension(mimeType: String ?): Text |
getFileMimeType |
Suspend function, which returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getFileMimeType(fileName: String ?): Text |
getGameHighScores |
Suspend function, which 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.suspend fun TelegramFlow .getGameHighScores(chatId: Long , messageId: Long , userId: Int ): GameHighScores |
getGroupsInCommon |
Suspend function, which returns a list of common group chats with a given user. Chats are sorted by their type and creation date.suspend fun TelegramFlow .getGroupsInCommon(userId: Int , offsetChatId: Long , limit: Int ): Chats |
getImportedContactCount |
Suspend function, which returns the total number of imported contacts.suspend fun TelegramFlow .getImportedContactCount(): Count |
getInactiveSupergroupChats |
Suspend function, which 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 CHANNELSTOOMUCH error.suspend fun TelegramFlow .getInactiveSupergroupChats(): Chats |
getInlineGameHighScores |
Suspend function, which returns game high scores and some part of the high score table in the range of the specified user; for bots only.suspend fun TelegramFlow .getInlineGameHighScores(inlineMessageId: String ?, userId: Int ): GameHighScores |
getInlineQueryResults |
Suspend function, which 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.suspend fun TelegramFlow .getInlineQueryResults(botUserId: Int , chatId: Long , userLocation: Location ?, query: String ?, offset: String ?): InlineQueryResults |
getInstalledStickerSets |
Suspend function, which returns a list of installed sticker sets.suspend fun TelegramFlow .getInstalledStickerSets(isMasks: Boolean ): StickerSets |
getInviteText |
Suspend function, which returns the default text for invitation messages to be used as a placeholder when the current user invites friends to Telegram.suspend fun TelegramFlow .getInviteText(): Text |
getJsonString |
Suspend function, which converts a JsonValue object to corresponding JSON-serialized string. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getJsonString(jsonValue: JsonValue ?): Text |
getJsonValue |
Suspend function, which converts a JSON-serialized string to corresponding JsonValue object. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getJsonValue(json: String ?): JsonValue |
getLanguagePackInfo |
Suspend function, which returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization.suspend fun TelegramFlow .getLanguagePackInfo(languagePackId: String ?): LanguagePackInfo |
getLanguagePackString |
Suspend function, which 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. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getLanguagePackString(languagePackDatabasePath: String ?, localizationTarget: String ?, languagePackId: String ?, key: String ?): LanguagePackStringValue |
getLanguagePackStrings |
Suspend function, which returns strings from a language pack in the current localization target by their keys. Can be called before authorization.suspend fun TelegramFlow .getLanguagePackStrings(languagePackId: String ?, keys: Array < String >?): LanguagePackStrings |
getLocalizationTargetInfo |
Suspend function, which returns information about the current localization target. This is an offline request if onlyLocal is true. Can be called before authorization.suspend fun TelegramFlow .getLocalizationTargetInfo(onlyLocal: Boolean ): LocalizationTargetInfo |
getLoginUrl |
Suspend function, which 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.suspend fun TelegramFlow .getLoginUrl(chatId: Long , messageId: Long , buttonId: Int , allowWriteAccess: Boolean ): HttpUrl |
getLoginUrlInfo |
Suspend function, which returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button.suspend fun TelegramFlow .getLoginUrlInfo(chatId: Long , messageId: Long , buttonId: Int ): LoginUrlInfo |
getLogStream |
Suspend function, which returns information about currently used log stream for internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getLogStream(): LogStream |
getLogTags |
Suspend function, which returns list of available TDLib internal log tags, for example, "actor","binlog","connections","notifications","proxy". This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getLogTags(): LogTags |
getLogTagVerbosityLevel |
Suspend function, which returns current verbosity level for a specified TDLib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getLogTagVerbosityLevel(tag: String ?): LogVerbosityLevel |
getLogVerbosityLevel |
Suspend function, which returns current verbosity level of the internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getLogVerbosityLevel(): LogVerbosityLevel |
getMapThumbnailFile |
Suspend function, which returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded.suspend fun TelegramFlow .getMapThumbnailFile(location: Location ?, zoom: Int , width: Int , height: Int , scale: Int , chatId: Long ): File |
getMe |
Suspend function, which returns the current user.suspend fun TelegramFlow .getMe(): User |
getMessage |
Suspend function, which returns information about a message.suspend fun TelegramFlow .getMessage(chatId: Long , messageId: Long ): Message |
getMessageLink |
Suspend function, which returns a private HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels. The link will work only for members of the chat.suspend fun TelegramFlow .getMessageLink(chatId: Long , messageId: Long ): HttpUrl |
getMessageLinkInfo |
Suspend function, which returns information about a public or private message link.suspend fun TelegramFlow .getMessageLinkInfo(url: String ?): MessageLinkInfo |
getMessageLocally |
Suspend function, which returns information about a message, if it is available locally without sending network request. This is an offline request.suspend fun TelegramFlow .getMessageLocally(chatId: Long , messageId: Long ): Message |
getMessages |
Suspend function, which returns information about messages. If a message is not found, returns null on the corresponding position of the result.suspend fun TelegramFlow .getMessages(chatId: Long , messageIds: LongArray ?): Messages |
getNetworkStatistics |
Suspend function, which returns network data usage statistics. Can be called before authorization.suspend fun TelegramFlow .getNetworkStatistics(onlyCurrent: Boolean ): NetworkStatistics |
getOption |
Suspend function, which 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.suspend fun TelegramFlow .getOption(name: String ?): OptionValue |
getPassportAuthorizationForm |
Suspend function, which returns a Telegram Passport authorization form for sharing data with a service.suspend fun TelegramFlow .getPassportAuthorizationForm(botUserId: Int , scope: String ?, publicKey: String ?, nonce: String ?): PassportAuthorizationForm |
getPassportAuthorizationFormAvailableElements |
Suspend function, which returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form.suspend fun TelegramFlow .getPassportAuthorizationFormAvailableElements(autorizationFormId: Int , password: String ?): PassportElementsWithErrors |
getPassportElement |
Suspend function, which returns one of the available Telegram Passport elements.suspend fun TelegramFlow .getPassportElement(type: PassportElementType ?, password: String ?): PassportElement |
getPasswordState |
Suspend function, which returns the current state of 2-step verification.suspend fun TelegramFlow .getPasswordState(): PasswordState |
getPaymentForm |
Suspend function, which returns an invoice payment form. This method should be called when the user presses inlineKeyboardButtonBuy.suspend fun TelegramFlow .getPaymentForm(chatId: Long , messageId: Long ): PaymentForm |
getPaymentReceipt |
Suspend function, which returns information about a successful payment.suspend fun TelegramFlow .getPaymentReceipt(chatId: Long , messageId: Long ): PaymentReceipt |
getPollVoters |
Suspend function, which returns users voted for the specified option in a non-anonymous polls. For the optimal performance the number of returned users is chosen by the library.suspend fun TelegramFlow .getPollVoters(chatId: Long , messageId: Long , optionId: Int , offset: Int , limit: Int ): Users |
getPreferredCountryLanguage |
Suspend function, which 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.suspend fun TelegramFlow .getPreferredCountryLanguage(countryCode: String ?): Text |
getProxies |
Suspend function, which returns list of proxies that are currently set up. Can be called before authorization.suspend fun TelegramFlow .getProxies(): Proxies |
getProxyLink |
Suspend function, which returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization.suspend fun TelegramFlow .getProxyLink(proxyId: Int ): Text |
getPublicMessageLink |
Suspend function, which returns a public HTTPS link to a message. Available only for messages in supergroups and channels with a username.suspend fun TelegramFlow .getPublicMessageLink(chatId: Long , messageId: Long , forAlbum: Boolean ): PublicMessageLink |
getPushReceiverId |
Suspend function, which returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getPushReceiverId(payload: String ?): PushReceiverId |
getRecentInlineBots |
Suspend function, which returns up to 20 recently used inline bots in the order of their last usage.suspend fun TelegramFlow .getRecentInlineBots(): Users |
getRecentlyVisitedTMeUrls |
Suspend function, which returns t.me URLs recently visited by a newly registered user.suspend fun TelegramFlow .getRecentlyVisitedTMeUrls(referrer: String ?): TMeUrls |
getRecentStickers |
Suspend function, which returns a list of recently used stickers.suspend fun TelegramFlow .getRecentStickers(isAttached: Boolean ): Stickers |
getRecoveryEmailAddress |
Suspend function, which 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.suspend fun TelegramFlow .getRecoveryEmailAddress(password: String ?): RecoveryEmailAddress |
getRemoteFile |
Suspend function, which 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 client.suspend fun TelegramFlow .getRemoteFile(remoteFileId: String ?, fileType: FileType ?): File |
getRepliedMessage |
Suspend function, which returns information about a message that is replied by given message.suspend fun TelegramFlow .getRepliedMessage(chatId: Long , messageId: Long ): Message |
getSavedAnimations |
Suspend function, which returns saved animations.suspend fun TelegramFlow .getSavedAnimations(): Animations |
getSavedOrderInfo |
Suspend function, which returns saved order info, if any.suspend fun TelegramFlow .getSavedOrderInfo(): OrderInfo |
getScopeNotificationSettings |
Suspend function, which returns the notification settings for chats of a given type.suspend fun TelegramFlow .getScopeNotificationSettings(scope: NotificationSettingsScope ?): ScopeNotificationSettings |
getSecretChat |
Suspend function, which returns information about a secret chat by its identifier. This is an offline request.suspend fun TelegramFlow .getSecretChat(secretChatId: Int ): SecretChat |
getStickerEmojis |
Suspend function, which 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.suspend fun TelegramFlow .getStickerEmojis(sticker: InputFile ?): Emojis |
getStickers |
Suspend function, which 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.suspend fun TelegramFlow .getStickers(emoji: String ?, limit: Int ): Stickers |
getStickerSet |
Suspend function, which returns information about a sticker set by its identifier.suspend fun TelegramFlow .getStickerSet(setId: Long ): StickerSet |
getStorageStatistics |
Suspend function, which returns storage usage statistics. Can be called before authorization.suspend fun TelegramFlow .getStorageStatistics(chatLimit: Int ): StorageStatistics |
getStorageStatisticsFast |
Suspend function, which quickly returns approximate storage usage statistics. Can be called before authorization.suspend fun TelegramFlow .getStorageStatisticsFast(): StorageStatisticsFast |
getSuitableDiscussionChats |
Suspend function, which returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Basic group chats need to be first upgraded to supergroups before they can be set as a discussion group.suspend fun TelegramFlow .getSuitableDiscussionChats(): Chats |
getSupergroup |
Suspend function, which returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot.suspend fun TelegramFlow .getSupergroup(supergroupId: Int ): Supergroup |
getSupergroupFullInfo |
Suspend function, which returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute.suspend fun TelegramFlow .getSupergroupFullInfo(supergroupId: Int ): SupergroupFullInfo |
getSupergroupMembers |
Suspend function, which returns information about members or banned users in a supergroup or channel. Can be used only if SupergroupFullInfo.canGetMembers == true; additionally, administrator privileges may be required for some filters.suspend fun TelegramFlow .getSupergroupMembers(supergroupId: Int , filter: SupergroupMembersFilter ?, offset: Int , limit: Int ): ChatMembers |
getSupportUser |
Suspend function, which returns a user that can be contacted to get support.suspend fun TelegramFlow .getSupportUser(): User |
getTemporaryPasswordState |
Suspend function, which returns information about the current temporary password.suspend fun TelegramFlow .getTemporaryPasswordState(): TemporaryPasswordState |
getTextEntities |
Suspend function, which returns all entities (mentions, hashtags, cashtags, bot commands, URLs, and email addresses) contained in the text. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .getTextEntities(text: String ?): TextEntities |
getTopChats |
Suspend function, which returns a list of frequently used chats. Supported only if the chat info database is enabled.suspend fun TelegramFlow .getTopChats(category: TopChatCategory ?, limit: Int ): Chats |
getTrendingStickerSets |
Suspend function, which returns a list of trending sticker sets.suspend fun TelegramFlow .getTrendingStickerSets(): StickerSets |
getUser |
Suspend function, which returns information about a user by their identifier. This is an offline request if the current user is not a bot.suspend fun TelegramFlow .getUser(userId: Int ): User |
getUserFullInfo |
Suspend function, which returns full information about a user by their identifier.suspend fun TelegramFlow .getUserFullInfo(userId: Int ): UserFullInfo |
getUserPrivacySettingRules |
Suspend function, which returns the current privacy settings.suspend fun TelegramFlow .getUserPrivacySettingRules(setting: UserPrivacySetting ?): UserPrivacySettingRules |
getUserProfilePhotos |
Suspend function, which returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already.suspend fun TelegramFlow .getUserProfilePhotos(userId: Int , offset: Int , limit: Int ): UserProfilePhotos |
getWebPageInstantView |
Suspend function, which returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page.suspend fun TelegramFlow .getWebPageInstantView(url: String ?, forceFull: Boolean ): WebPageInstantView |
getWebPagePreview |
Suspend function, which 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.suspend fun TelegramFlow .getWebPagePreview(text: FormattedText ?): WebPage |
havePendingNotificationsFlow |
emits UpdateHavePendingNotifications if describes whether there are some pending notification updates. Can be used to prevent application from killing, while there are some pending notifications.fun TelegramFlow .havePendingNotificationsFlow(): Flow< UpdateHavePendingNotifications > |
importContacts |
Suspend function, which adds new contacts or edits existing contacts by their phone numbers; contacts’ user identifiers are ignored.suspend fun TelegramFlow .importContacts(contacts: Array < Contact >?): ImportedContacts |
installedStickerSetsFlow |
emits UpdateInstalledStickerSets if the list of installed sticker sets was updated.fun TelegramFlow .installedStickerSetsFlow(): Flow< UpdateInstalledStickerSets > |
joinChat |
Suspend function, which adds current user as a new member to a chat. Private and secret chats can’t be joined using this method.suspend fun TelegramFlow .joinChat(chatId: Long ): Unit |
joinChatByInviteLink |
Suspend function, which uses an invite link to add the current user to the chat if possible. The new member will not be added until the chat state has been synchronized with the server.suspend fun TelegramFlow .joinChatByInviteLink(inviteLink: String ?): Chat |
languagePackStringsFlow |
emits UpdateLanguagePackStrings if some language pack strings have been updated.fun TelegramFlow .languagePackStringsFlow(): Flow< UpdateLanguagePackStrings > |
leaveChat |
Suspend function, which removes current user from chat members. Private and secret chats can’t be left using this method.suspend fun TelegramFlow .leaveChat(chatId: Long ): Unit |
logOut |
Suspend function, which 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.suspend fun TelegramFlow .logOut(): Unit |
messageContentFlow |
emits UpdateMessageContent if the message content has changed.fun TelegramFlow .messageContentFlow(): Flow< UpdateMessageContent > |
messageContentOpenedFlow |
emits UpdateMessageContentOpened if the message content was opened. Updates voice note messages to "listened", video note messages to "viewed" and starts the TTL timer for self-destructing messages.fun TelegramFlow .messageContentOpenedFlow(): Flow< UpdateMessageContentOpened > |
messageEditedFlow |
emits UpdateMessageEdited if a message was edited. Changes in the message content will come in a separate updateMessageContent.fun TelegramFlow .messageEditedFlow(): Flow< UpdateMessageEdited > |
messageLiveLocationViewedFlow |
emits UpdateMessageLiveLocationViewed if a message with a live location was viewed. When the update is received, the client is supposed to update the live location.fun TelegramFlow .messageLiveLocationViewedFlow(): Flow< UpdateMessageLiveLocationViewed > |
messageMentionReadFlow |
emits UpdateMessageMentionRead if a message with an unread mention was read.fun TelegramFlow .messageMentionReadFlow(): Flow< UpdateMessageMentionRead > |
messageSendAcknowledgedFlow |
emits UpdateMessageSendAcknowledged if a request to send a message has reached the Telegram server. This doesn’t mean that the message will be sent successfully or even that the send message request will be processed. This update will be sent only if the option "use_quick_ack" is set to true. This update may be sent multiple times for the same message.fun TelegramFlow .messageSendAcknowledgedFlow(): Flow< UpdateMessageSendAcknowledged > |
messageSendFailedFlow |
emits UpdateMessageSendFailed if a message failed to send. Be aware that some messages being sent can be irrecoverably deleted, in which case updateDeleteMessages will be received instead of this update.fun TelegramFlow .messageSendFailedFlow(): Flow< UpdateMessageSendFailed > |
messageSendSucceededFlow |
emits UpdateMessageSendSucceeded if a message has been successfully sent.fun TelegramFlow .messageSendSucceededFlow(): Flow< UpdateMessageSendSucceeded > |
messageViewsFlow |
emits UpdateMessageViews if the view count of the message has changed.fun TelegramFlow .messageViewsFlow(): Flow< UpdateMessageViews > |
newCallbackQueryFlow |
emits UpdateNewCallbackQuery if a new incoming callback query; for bots only.fun TelegramFlow .newCallbackQueryFlow(): Flow< UpdateNewCallbackQuery > |
newChatFlow |
emits Chat if a new chat has been loaded/created. This update is guaranteed to come before the chat identifier is returned to the client. The chat field changes will be reported through separate updates.fun TelegramFlow .newChatFlow(): Flow< Chat > |
newChosenInlineResultFlow |
emits UpdateNewChosenInlineResult if the user has chosen a result of an inline query; for bots only.fun TelegramFlow .newChosenInlineResultFlow(): Flow< UpdateNewChosenInlineResult > |
newCustomEventFlow |
emits event String if a new incoming event; for bots only.fun TelegramFlow .newCustomEventFlow(): Flow< String > |
newCustomQueryFlow |
emits UpdateNewCustomQuery if a new incoming query; for bots only.fun TelegramFlow .newCustomQueryFlow(): Flow< UpdateNewCustomQuery > |
newInlineCallbackQueryFlow |
emits UpdateNewInlineCallbackQuery if a new incoming callback query from a message sent via a bot; for bots only.fun TelegramFlow .newInlineCallbackQueryFlow(): Flow< UpdateNewInlineCallbackQuery > |
newInlineQueryFlow |
emits UpdateNewInlineQuery if a new incoming inline query; for bots only.fun TelegramFlow .newInlineQueryFlow(): Flow< UpdateNewInlineQuery > |
newMessageFlow |
emits Message if a new message was received; can also be an outgoing message.fun TelegramFlow .newMessageFlow(): Flow< Message > |
newPreCheckoutQueryFlow |
emits UpdateNewPreCheckoutQuery if a new incoming pre-checkout query; for bots only. Contains full information about a checkout.fun TelegramFlow .newPreCheckoutQueryFlow(): Flow< UpdateNewPreCheckoutQuery > |
newShippingQueryFlow |
emits UpdateNewShippingQuery if a new incoming shipping query; for bots only. Only for invoices with flexible price.fun TelegramFlow .newShippingQueryFlow(): Flow< UpdateNewShippingQuery > |
notificationFlow |
emits UpdateNotification if a notification was changed.fun TelegramFlow .notificationFlow(): Flow< UpdateNotification > |
notificationGroupFlow |
emits UpdateNotificationGroup if a list of active notifications in a notification group has changed.fun TelegramFlow .notificationGroupFlow(): Flow< UpdateNotificationGroup > |
openChat |
Suspend function, which 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).suspend fun TelegramFlow .openChat(chatId: Long ): Unit |
openMessageContent |
Suspend function, which 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.suspend fun TelegramFlow .openMessageContent(chatId: Long , messageId: Long ): Unit |
optimizeStorage |
Suspend function, which optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can’t be deleted.suspend fun TelegramFlow .optimizeStorage(size: Long , ttl: Int , count: Int , immunityDelay: Int , fileTypes: Array < FileType >?, chatIds: LongArray ?, excludeChatIds: LongArray ?, chatLimit: Int ): StorageStatistics |
optionFlow |
emits UpdateOption if an option changed its value.fun TelegramFlow .optionFlow(): Flow< UpdateOption > |
parseTextEntities |
Suspend function, which parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .parseTextEntities(text: String ?, parseMode: TextParseMode ?): FormattedText |
pinChatMessage |
Suspend function, which pins a message in a chat; requires canPinMessages rights.suspend fun TelegramFlow .pinChatMessage(chatId: Long , messageId: Long , disableNotification: Boolean ): Unit |
pingProxy |
Suspend function, which computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization.suspend fun TelegramFlow .pingProxy(proxyId: Int ): Seconds |
pollAnswerFlow |
emits UpdatePollAnswer if a user changed the answer to a poll; for bots only.fun TelegramFlow .pollAnswerFlow(): Flow< UpdatePollAnswer > |
pollFlow |
emits Poll if a poll was updated; for bots only.fun TelegramFlow .pollFlow(): Flow< Poll > |
processPushNotification |
Suspend function, which 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.suspend fun TelegramFlow .processPushNotification(payload: String ?): Unit |
readAllChatMentions |
Suspend function, which marks all mentions in a chat as read.suspend fun TelegramFlow .readAllChatMentions(chatId: Long ): Unit |
readFilePart |
Suspend function, which 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 client has no direct access to TDLib’s file system, because it is usually slower than a direct read from the file.suspend fun TelegramFlow .readFilePart(fileId: Int , offset: Int , count: Int ): FilePart |
recentStickersFlow |
emits UpdateRecentStickers if the list of recently used stickers was updated.fun TelegramFlow .recentStickersFlow(): Flow< UpdateRecentStickers > |
recoverAuthenticationPassword |
Suspend function, which 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.suspend fun TelegramFlow .recoverAuthenticationPassword(recoveryCode: String ?): Unit |
recoverPassword |
Suspend function, which recovers the password using a recovery code sent to an email address that was previously set up.suspend fun TelegramFlow .recoverPassword(recoveryCode: String ?): PasswordState |
registerDevice |
Suspend function, which registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription.suspend fun TelegramFlow .registerDevice(deviceToken: DeviceToken ?, otherUserIds: IntArray ?): PushReceiverId |
registerUser |
Suspend function, which finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration.suspend fun TelegramFlow .registerUser(firstName: String ?, lastName: String ?): Unit |
removeBackground |
Suspend function, which removes background from the list of installed backgrounds.suspend fun TelegramFlow .removeBackground(backgroundId: Long ): Unit |
removeChatActionBar |
Suspend function, which removes a chat action bar without any other action.suspend fun TelegramFlow .removeChatActionBar(chatId: Long ): Unit |
removeContacts |
Suspend function, which removes users from the contact list.suspend fun TelegramFlow .removeContacts(userIds: IntArray ?): Unit |
removeFavoriteSticker |
Suspend function, which removes a sticker from the list of favorite stickers.suspend fun TelegramFlow .removeFavoriteSticker(sticker: InputFile ?): Unit |
removeNotification |
Suspend function, which removes an active notification from notification list. Needs to be called only if the notification is removed by the current user.suspend fun TelegramFlow .removeNotification(notificationGroupId: Int , notificationId: Int ): Unit |
removeNotificationGroup |
Suspend function, which removes a group of active notifications. Needs to be called only if the notification group is removed by the current user.suspend fun TelegramFlow .removeNotificationGroup(notificationGroupId: Int , maxNotificationId: Int ): Unit |
removeProxy |
Suspend function, which removes a proxy server. Can be called before authorization.suspend fun TelegramFlow .removeProxy(proxyId: Int ): Unit |
removeRecentHashtag |
Suspend function, which removes a hashtag from the list of recently used hashtags.suspend fun TelegramFlow .removeRecentHashtag(hashtag: String ?): Unit |
removeRecentlyFoundChat |
Suspend function, which removes a chat from the list of recently found chats.suspend fun TelegramFlow .removeRecentlyFoundChat(chatId: Long ): Unit |
removeRecentSticker |
Suspend function, which removes a sticker from the list of recently used stickers.suspend fun TelegramFlow .removeRecentSticker(isAttached: Boolean , sticker: InputFile ?): Unit |
removeSavedAnimation |
Suspend function, which removes an animation from the list of saved animations.suspend fun TelegramFlow .removeSavedAnimation(animation: InputFile ?): Unit |
removeStickerFromSet |
Suspend function, which removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot.suspend fun TelegramFlow .removeStickerFromSet(sticker: InputFile ?): Unit |
removeTopChat |
Suspend function, which removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled.suspend fun TelegramFlow .removeTopChat(category: TopChatCategory ?, chatId: Long ): Unit |
reorderInstalledStickerSets |
Suspend function, which changes the order of installed sticker sets.suspend fun TelegramFlow .reorderInstalledStickerSets(isMasks: Boolean , stickerSetIds: LongArray ?): Unit |
reportChat |
Suspend function, which reports a chat to the Telegram moderators. Supported only for supergroups, channels, or private chats with bots, since other chats can’t be checked by moderators, or when the report is done from the chat action bar.suspend fun TelegramFlow .reportChat(chatId: Long , reason: ChatReportReason ?, messageIds: LongArray ?): Unit |
reportSupergroupSpam |
Suspend function, which reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup.suspend fun TelegramFlow .reportSupergroupSpam(supergroupId: Int , userId: Int , messageIds: LongArray ?): Unit |
requestAuthenticationPasswordRecovery |
Suspend function, which 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.suspend fun TelegramFlow .requestAuthenticationPasswordRecovery(): Unit |
requestPasswordRecovery |
Suspend function, which requests to send a password recovery code to an email address that was previously set up.suspend fun TelegramFlow .requestPasswordRecovery(): EmailAddressAuthenticationCodeInfo |
requestQrCodeAuthentication |
Suspend function, which requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber.suspend fun TelegramFlow .requestQrCodeAuthentication(otherUserIds: IntArray ?): Unit |
resendAuthenticationCode |
Suspend function, which re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode and the nextCodeType of the result is not null.suspend fun TelegramFlow .resendAuthenticationCode(): Unit |
resendChangePhoneNumberCode |
Suspend function, which re-sends the authentication code sent to confirm a new phone number for the user. Works only if the previously received authenticationCodeInfo nextCodeType was not null.suspend fun TelegramFlow .resendChangePhoneNumberCode(): AuthenticationCodeInfo |
resendEmailAddressVerificationCode |
Suspend function, which re-sends the code to verify an email address to be added to a user’s Telegram Passport.suspend fun TelegramFlow .resendEmailAddressVerificationCode(): EmailAddressAuthenticationCodeInfo |
resendMessages |
Suspend function, which resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.canRetry is true and after specified in messageSendingStateFailed.retryAfter 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 messageIds. If a message can’t be re-sent, null will be returned instead of the message.suspend fun TelegramFlow .resendMessages(chatId: Long , messageIds: LongArray ?): Messages |
resendPhoneNumberConfirmationCode |
Suspend function, which resends phone number confirmation code.suspend fun TelegramFlow .resendPhoneNumberConfirmationCode(): AuthenticationCodeInfo |
resendPhoneNumberVerificationCode |
Suspend function, which re-sends the code to verify a phone number to be added to a user’s Telegram Passport.suspend fun TelegramFlow .resendPhoneNumberVerificationCode(): AuthenticationCodeInfo |
resendRecoveryEmailAddressCode |
Suspend function, which resends the 2-step verification recovery email address verification code.suspend fun TelegramFlow .resendRecoveryEmailAddressCode(): PasswordState |
resetAllNotificationSettings |
Suspend function, which 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.suspend fun TelegramFlow .resetAllNotificationSettings(): Unit |
resetBackgrounds |
Suspend function, which resets list of installed backgrounds to its default value.suspend fun TelegramFlow .resetBackgrounds(): Unit |
resetNetworkStatistics |
Suspend function, which resets all network data usage statistics to zero. Can be called before authorization.suspend fun TelegramFlow .resetNetworkStatistics(): Unit |
saveApplicationLogEvent |
Suspend function, which saves application log event on the server. Can be called before authorization.suspend fun TelegramFlow .saveApplicationLogEvent(type: String ?, chatId: Long , data: JsonValue ?): Unit |
savedAnimationsFlow |
emits animationIds [Int[]] if the list of saved animations was updated.fun TelegramFlow .savedAnimationsFlow(): Flow< IntArray > |
scopeNotificationSettingsFlow |
emits UpdateScopeNotificationSettings if notification settings for some type of chats were updated.fun TelegramFlow .scopeNotificationSettingsFlow(): Flow< UpdateScopeNotificationSettings > |
searchBackground |
Suspend function, which searches for a background by its name.suspend fun TelegramFlow .searchBackground(name: String ?): Background |
searchCallMessages |
Suspend function, which searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing messageId). For optimal performance the number of returned messages is chosen by the library.suspend fun TelegramFlow .searchCallMessages(fromMessageId: Long , limit: Int , onlyMissed: Boolean ): Messages |
searchChatMembers |
Suspend function, which 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.suspend fun TelegramFlow .searchChatMembers(chatId: Long , query: String ?, limit: Int , filter: ChatMembersFilter ?): ChatMembers |
searchChatMessages |
Suspend function, which searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing messageId. 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 the library.suspend fun TelegramFlow .searchChatMessages(chatId: Long , query: String ?, senderUserId: Int , fromMessageId: Long , offset: Int , limit: Int , filter: SearchMessagesFilter ?): Messages |
searchChatRecentLocationMessages |
Suspend function, which returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user.suspend fun TelegramFlow .searchChatRecentLocationMessages(chatId: Long , limit: Int ): Messages |
searchChats |
Suspend function, which 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 chat list.suspend fun TelegramFlow .searchChats(query: String ?, limit: Int ): Chats |
searchChatsNearby |
Suspend function, which 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.suspend fun TelegramFlow .searchChatsNearby(location: Location ?): ChatsNearby |
searchChatsOnServer |
Suspend function, which 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 chat list.suspend fun TelegramFlow .searchChatsOnServer(query: String ?, limit: Int ): Chats |
searchContacts |
Suspend function, which searches for the specified query in the first names, last names and usernames of the known user contacts.suspend fun TelegramFlow .searchContacts(query: String ?, limit: Int ): Users |
searchEmojis |
Suspend function, which searches for emojis by keywords. Supported only if the file database is enabled.suspend fun TelegramFlow .searchEmojis(text: String ?, exactMatch: Boolean , inputLanguageCode: String ?): Emojis |
searchHashtags |
Suspend function, which searches for recently used hashtags by their prefix.suspend fun TelegramFlow .searchHashtags(prefix: String ?, limit: Int ): Hashtags |
searchInstalledStickerSets |
Suspend function, which searches for installed sticker sets by looking for specified query in their title and name.suspend fun TelegramFlow .searchInstalledStickerSets(isMasks: Boolean , query: String ?, limit: Int ): StickerSets |
searchMessages |
Suspend function, which searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chatId, messageId)). For optimal performance the number of returned messages is chosen by the library.suspend fun TelegramFlow .searchMessages(chatList: ChatList ?, query: String ?, offsetDate: Int , offsetChatId: Long , offsetMessageId: Long , limit: Int ): Messages |
searchPublicChat |
Suspend function, which 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.suspend fun TelegramFlow .searchPublicChat(username: String ?): Chat |
searchPublicChats |
Suspend function, which 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.suspend fun TelegramFlow .searchPublicChats(query: String ?): Chats |
searchSecretMessages |
Suspend function, which searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance the number of returned messages is chosen by the library.suspend fun TelegramFlow .searchSecretMessages(chatId: Long , query: String ?, fromSearchId: Long , limit: Int , filter: SearchMessagesFilter ?): FoundMessages |
searchStickers |
Suspend function, which searches for stickers from public sticker sets that correspond to a given emoji.suspend fun TelegramFlow .searchStickers(emoji: String ?, limit: Int ): Stickers |
searchStickerSet |
Suspend function, which searches for a sticker set by its name.suspend fun TelegramFlow .searchStickerSet(name: String ?): StickerSet |
searchStickerSets |
Suspend function, which searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results.suspend fun TelegramFlow .searchStickerSets(query: String ?): StickerSets |
secretChatFlow |
emits SecretChat if some data of a secret chat has changed. This update is guaranteed to come before the secret chat identifier is returned to the client.fun TelegramFlow .secretChatFlow(): Flow< SecretChat > |
selectedBackgroundFlow |
emits UpdateSelectedBackground if the selected background has changed.fun TelegramFlow .selectedBackgroundFlow(): Flow< UpdateSelectedBackground > |
sendBotStartMessage |
Suspend function, which 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.suspend fun TelegramFlow .sendBotStartMessage(botUserId: Int , chatId: Long , parameter: String ?): Message |
sendCallDebugInformation |
Suspend function, which sends debug information for a call.suspend fun TelegramFlow .sendCallDebugInformation(callId: Int , debugInformation: String ?): Unit |
sendCallRating |
Suspend function, which sends a call rating.suspend fun TelegramFlow .sendCallRating(callId: Int , rating: Int , comment: String ?, problems: Array < CallProblem >?): Unit |
sendChatAction |
Suspend function, which sends a notification about user activity in a chat.suspend fun TelegramFlow .sendChatAction(chatId: Long , action: ChatAction ?): Unit |
sendChatScreenshotTakenNotification |
Suspend function, which sends a notification about a screenshot taken in a chat. Supported only in private and secret chats.suspend fun TelegramFlow .sendChatScreenshotTakenNotification(chatId: Long ): Unit |
sendChatSetTtlMessage |
Suspend function, which changes the current TTL setting (sets a new self-destruct timer) in a secret chat and sends the corresponding message.suspend fun TelegramFlow .sendChatSetTtlMessage(chatId: Long , ttl: Int ): Message |
sendCustomRequest |
Suspend function, which sends a custom request; for bots only.suspend fun TelegramFlow .sendCustomRequest(method: String ?, parameters: String ?): CustomRequestResult |
sendEmailAddressVerificationCode |
Suspend function, which sends a code to verify an email address to be added to a user’s Telegram Passport.suspend fun TelegramFlow .sendEmailAddressVerificationCode(emailAddress: String ?): EmailAddressAuthenticationCodeInfo |
sendInlineQueryResultMessage |
Suspend function, which sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message.suspend fun TelegramFlow .sendInlineQueryResultMessage(chatId: Long , replyToMessageId: Long , options: SendMessageOptions ?, queryId: Long , resultId: String ?, hideViaBot: Boolean ): Message |
sendMessage |
Suspend function, which sends a message. Returns the sent message.suspend fun TelegramFlow .sendMessage(chatId: Long , replyToMessageId: Long , options: SendMessageOptions ?, replyMarkup: ReplyMarkup ?, inputMessageContent: InputMessageContent ?): Message |
sendMessageAlbum |
Suspend function, which sends messages grouped together into an album. Currently only photo and video messages can be grouped into an album. Returns sent messages.suspend fun TelegramFlow .sendMessageAlbum(chatId: Long , replyToMessageId: Long , options: SendMessageOptions ?, inputMessageContents: Array < InputMessageContent >?): Messages |
sendPassportAuthorizationForm |
Suspend function, which sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements need to be used.suspend fun TelegramFlow .sendPassportAuthorizationForm(autorizationFormId: Int , types: Array < PassportElementType >?): Unit |
sendPaymentForm |
Suspend function, which sends a filled-out payment form to the bot for final verification.suspend fun TelegramFlow .sendPaymentForm(chatId: Long , messageId: Long , orderInfoId: String ?, shippingOptionId: String ?, credentials: InputCredentials ?): PaymentResult |
sendPhoneNumberConfirmationCode |
Suspend function, which sends phone number confirmation code. Should be called when user presses "https://t.me/confirmphone?phone=**&hash=**" or"tg://confirmphone?phone=**&hash=****" link.suspend fun TelegramFlow .sendPhoneNumberConfirmationCode(hash: String ?, phoneNumber: String ?, settings: PhoneNumberAuthenticationSettings ?): AuthenticationCodeInfo |
sendPhoneNumberVerificationCode |
Suspend function, which sends a code to verify a phone number to be added to a user’s Telegram Passport.suspend fun TelegramFlow .sendPhoneNumberVerificationCode(phoneNumber: String ?, settings: PhoneNumberAuthenticationSettings ?): AuthenticationCodeInfo |
serviceNotificationFlow |
emits UpdateServiceNotification if service notification from the server. Upon receiving this the client must show a popup with the content of the notification.fun TelegramFlow .serviceNotificationFlow(): Flow< UpdateServiceNotification > |
setAccountTtl |
Suspend function, which changes the period of inactivity after which the account of the current user will automatically be deleted.suspend fun TelegramFlow .setAccountTtl(ttl: AccountTtl ?): Unit |
setAlarm |
Suspend function, which succeeds after a specified amount of time has passed. Can be called before authorization. Can be called before initialization.suspend fun TelegramFlow .setAlarm(seconds: Double ): Unit |
setAuthenticationPhoneNumber |
Suspend function, which 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.suspend fun TelegramFlow .setAuthenticationPhoneNumber(phoneNumber: String ?, settings: PhoneNumberAuthenticationSettings ?): Unit |
setAutoDownloadSettings |
Suspend function, which sets auto-download settings.suspend fun TelegramFlow .setAutoDownloadSettings(settings: AutoDownloadSettings ?, type: NetworkType ?): Unit |
setBackground |
Suspend function, which changes the background selected by the user; adds background to the list of installed backgrounds.suspend fun TelegramFlow .setBackground(background: InputBackground ?, type: BackgroundType ?, forDarkTheme: Boolean ): Background |
setBio |
Suspend function, which changes the bio of the current user.suspend fun TelegramFlow .setBio(bio: String ?): Unit |
setBotUpdatesStatus |
Suspend function, which informs the server about the number of pending bot updates if they haven’t been processed for a long time; for bots only.suspend fun TelegramFlow .setBotUpdatesStatus(pendingUpdateCount: Int , errorMessage: String ?): Unit |
setChatChatList |
Suspend function, which moves a chat to a different chat list. Current chat list of the chat must ne non-null.suspend fun TelegramFlow .setChatChatList(chatId: Long , chatList: ChatList ?): Unit |
setChatClientData |
Suspend function, which changes client data associated with a chat.suspend fun TelegramFlow .setChatClientData(chatId: Long , clientData: String ?): Unit |
setChatDescription |
Suspend function, which changes information about a chat. Available for basic groups, supergroups, and channels. Requires canChangeInfo rights.suspend fun TelegramFlow .setChatDescription(chatId: Long , description: String ?): Unit |
setChatDiscussionGroup |
Suspend function, which changes the discussion group of a channel chat; requires canChangeInfo rights in the channel if it is specified.suspend fun TelegramFlow .setChatDiscussionGroup(chatId: Long , discussionChatId: Long ): Unit |
setChatDraftMessage |
Suspend function, which changes the draft message in a chat.suspend fun TelegramFlow .setChatDraftMessage(chatId: Long , draftMessage: DraftMessage ? = null): Unit |
setChatLocation |
Suspend function, which changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.canSetLocation to check whether the method is allowed to use.suspend fun TelegramFlow .setChatLocation(chatId: Long , location: ChatLocation ?): Unit |
setChatMemberStatus |
Suspend function, which 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. The chat member status will not be changed until it has been synchronized with the server.suspend fun TelegramFlow .setChatMemberStatus(chatId: Long , userId: Int , status: ChatMemberStatus ?): Unit |
setChatNotificationSettings |
Suspend function, which changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can’t be changed.suspend fun TelegramFlow .setChatNotificationSettings(chatId: Long , notificationSettings: ChatNotificationSettings ?): Unit |
setChatPermissions |
Suspend function, which changes the chat members permissions. Supported only for basic groups and supergroups. Requires canRestrictMembers administrator right.suspend fun TelegramFlow .setChatPermissions(chatId: Long , permissions: ChatPermissions ?): Unit |
setChatPhoto |
Suspend function, which changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires canChangeInfo rights. The photo will not be changed before request to the server has been completed.suspend fun TelegramFlow .setChatPhoto(chatId: Long , photo: InputFile ?): Unit |
setChatSlowModeDelay |
Suspend function, which changes the slow mode delay of a chat. Available only for supergroups; requires canRestrictMembers rights.suspend fun TelegramFlow .setChatSlowModeDelay(chatId: Long , slowModeDelay: Int ): Unit |
setChatTitle |
Suspend function, which changes the chat title. Supported only for basic groups, supergroups and channels. Requires canChangeInfo rights. The title will not be changed until the request to the server has been completed.suspend fun TelegramFlow .setChatTitle(chatId: Long , title: String ?): Unit |
setCustomLanguagePack |
Suspend function, which adds or changes a custom local language pack to the current localization target.suspend fun TelegramFlow .setCustomLanguagePack(info: LanguagePackInfo ?, strings: Array < LanguagePackString >?): Unit |
setCustomLanguagePackString |
Suspend function, which adds, edits or deletes a string in a custom local language pack. Can be called before authorization.suspend fun TelegramFlow .setCustomLanguagePackString(languagePackId: String ?, newString: LanguagePackString ?): Unit |
setDatabaseEncryptionKey |
Suspend function, which changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain.suspend fun TelegramFlow .setDatabaseEncryptionKey(newEncryptionKey: ByteArray ?): Unit |
setFileGenerationProgress |
Suspend function, which informs TDLib on a file generation progress.suspend fun TelegramFlow .setFileGenerationProgress(generationId: Long , expectedSize: Int , localPrefixSize: Int ): Unit |
setGameScore |
Suspend function, which updates the game score of the specified user in the game; for bots only.suspend fun TelegramFlow .setGameScore(chatId: Long , messageId: Long , editMessage: Boolean , userId: Int , score: Int , force: Boolean ): Message |
setInlineGameScore |
Suspend function, which updates the game score of the specified user in a game; for bots only.suspend fun TelegramFlow .setInlineGameScore(inlineMessageId: String ?, editMessage: Boolean , userId: Int , score: Int , force: Boolean ): Unit |
setLogStream |
Suspend function, which sets new log stream for internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .setLogStream(logStream: LogStream ?): Unit |
setLogTagVerbosityLevel |
Suspend function, which sets the verbosity level for a specified TDLib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .setLogTagVerbosityLevel(tag: String ?, newVerbosityLevel: Int ): Unit |
setLogVerbosityLevel |
Suspend function, which sets the verbosity level of the internal logging of TDLib. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .setLogVerbosityLevel(newVerbosityLevel: Int ): Unit |
setName |
Suspend function, which changes the first and last name of the current user. If something changes, updateUser will be sent.suspend fun TelegramFlow .setName(firstName: String ?, lastName: String ?): Unit |
setNetworkType |
Suspend function, which 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.suspend fun TelegramFlow .setNetworkType(type: NetworkType ?): Unit |
setOption |
Suspend function, which 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.suspend fun TelegramFlow .setOption(name: String ?, value: OptionValue ?): Unit |
setPassportElement |
Suspend function, which 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.suspend fun TelegramFlow .setPassportElement(element: InputPassportElement ?, password: String ?): PassportElement |
setPassportElementErrors |
Suspend function, which 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.suspend fun TelegramFlow .setPassportElementErrors(userId: Int , errors: Array < InputPassportElementError >?): Unit |
setPassword |
Suspend function, which changes the password for 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.suspend fun TelegramFlow .setPassword(oldPassword: String ?, newPassword: String ?, newHint: String ?, setRecoveryEmailAddress: Boolean , newRecoveryEmailAddress: String ?): PasswordState |
setPinnedChats |
Suspend function, which changes the order of pinned chats.suspend fun TelegramFlow .setPinnedChats(chatList: ChatList ?, chatIds: LongArray ?): Unit |
setPollAnswer |
Suspend function, which changes the user answer to a poll. A poll in quiz mode can be answered only once.suspend fun TelegramFlow .setPollAnswer(chatId: Long , messageId: Long , optionIds: IntArray ?): Unit |
setProfilePhoto |
Suspend function, which uploads a new profile photo for the current user. If something changes, updateUser will be sent.suspend fun TelegramFlow .setProfilePhoto(photo: InputFile ?): Unit |
setRecoveryEmailAddress |
Suspend function, which 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 newRecoveryEmailAddress 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.suspend fun TelegramFlow .setRecoveryEmailAddress(password: String ?, newRecoveryEmailAddress: String ?): PasswordState |
setScopeNotificationSettings |
Suspend function, which changes notification settings for chats of a given type.suspend fun TelegramFlow .setScopeNotificationSettings(scope: NotificationSettingsScope ?, notificationSettings: ScopeNotificationSettings ?): Unit |
setStickerPositionInSet |
Suspend function, which 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.suspend fun TelegramFlow .setStickerPositionInSet(sticker: InputFile ?, position: Int ): Unit |
setSupergroupStickerSet |
Suspend function, which changes the sticker set of a supergroup; requires canChangeInfo rights.suspend fun TelegramFlow .setSupergroupStickerSet(supergroupId: Int , stickerSetId: Long ): Unit |
setSupergroupUsername |
Suspend function, which changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel.suspend fun TelegramFlow .setSupergroupUsername(supergroupId: Int , username: String ?): Unit |
setTdlibParameters |
Suspend function, which sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters.suspend fun TelegramFlow .setTdlibParameters(parameters: TdlibParameters ?): Unit |
setUsername |
Suspend function, which changes the username of the current user. If something changes, updateUser will be sent.suspend fun TelegramFlow .setUsername(username: String ?): Unit |
setUserPrivacySettingRules |
Suspend function, which changes user privacy settings.suspend fun TelegramFlow .setUserPrivacySettingRules(setting: UserPrivacySetting ?, rules: UserPrivacySettingRules ?): Unit |
sharePhoneNumber |
Suspend function, which shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber.suspend fun TelegramFlow .sharePhoneNumber(userId: Int ): Unit |
stopPoll |
Suspend function, which stops a poll. A poll in a message can be stopped when the message has canBeEdited flag set.suspend fun TelegramFlow .stopPoll(chatId: Long , messageId: Long , replyMarkup: ReplyMarkup ?): Unit |
supergroupFlow |
emits Supergroup if some data of a supergroup or a channel has changed. This update is guaranteed to come before the supergroup identifier is returned to the client.fun TelegramFlow .supergroupFlow(): Flow< Supergroup > |
supergroupFullInfoFlow |
emits UpdateSupergroupFullInfo if some data from supergroupFullInfo has been changed.fun TelegramFlow .supergroupFullInfoFlow(): Flow< UpdateSupergroupFullInfo > |
synchronizeLanguagePack |
Suspend function, which fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn’t need to be called explicitly for the current used/base language packs. Can be called before authorization.suspend fun TelegramFlow .synchronizeLanguagePack(languagePackId: String ?): Unit |
terminateAllOtherSessions |
Suspend function, which terminates all other sessions of the current user.suspend fun TelegramFlow .terminateAllOtherSessions(): Unit |
terminateSession |
Suspend function, which terminates a session of the current user.suspend fun TelegramFlow .terminateSession(sessionId: Long ): Unit |
termsOfServiceFlow |
emits UpdateTermsOfService if new terms of service must be accepted by the user. If the terms of service are declined, then the deleteAccount method should be called with the reason "Decline ToS update".fun TelegramFlow .termsOfServiceFlow(): Flow< UpdateTermsOfService > |
testCallBytes |
Suspend function, which returns the received bytes; for testing only. This is an offline method. Can be called before authorization.suspend fun TelegramFlow .testCallBytes(x: ByteArray ?): TestBytes |
testCallEmpty |
Suspend function, which does nothing; for testing only. This is an offline method. Can be called before authorization.suspend fun TelegramFlow .testCallEmpty(): Unit |
testCallString |
Suspend function, which returns the received string; for testing only. This is an offline method. Can be called before authorization.suspend fun TelegramFlow .testCallString(x: String ?): TestString |
testCallVectorInt |
Suspend function, which returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization.suspend fun TelegramFlow .testCallVectorInt(x: IntArray ?): TestVectorInt |
testCallVectorIntObject |
Suspend function, which returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization.suspend fun TelegramFlow .testCallVectorIntObject(x: Array < TestInt >?): TestVectorIntObject |
testCallVectorString |
Suspend function, which returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization.suspend fun TelegramFlow .testCallVectorString(x: Array < String >?): TestVectorString |
testCallVectorStringObject |
Suspend function, which returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization.suspend fun TelegramFlow .testCallVectorStringObject(x: Array < TestString >?): TestVectorStringObject |
testGetDifference |
Suspend function, which forces an updates.getDifference call to the Telegram servers; for testing only.suspend fun TelegramFlow .testGetDifference(): Unit |
testNetwork |
Suspend function, which sends a simple network request to the Telegram servers; for testing only. Can be called before authorization.suspend fun TelegramFlow .testNetwork(): Unit |
testProxy |
Suspend function, which sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization.suspend fun TelegramFlow .testProxy(server: String ?, port: Int , type: ProxyType ?, dcId: Int , timeout: Double ): Unit |
testReturnError |
Suspend function, which returns the specified error and ensures that the Error object is used; for testing only. This is an offline method. Can be called before authorization. Can be called synchronously.suspend fun TelegramFlow .testReturnError(error: Error ?): Error |
testSquareInt |
Suspend function, which returns the squared received number; for testing only. This is an offline method. Can be called before authorization.suspend fun TelegramFlow .testSquareInt(x: Int ): TestInt |
testUseUpdate |
Suspend function, which does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization.suspend fun TelegramFlow .testUseUpdate(): Update |
toggleChatDefaultDisableNotification |
Suspend function, which changes the value of the default disableNotification parameter, used when a message is sent to a chat.suspend fun TelegramFlow .toggleChatDefaultDisableNotification(chatId: Long , defaultDisableNotification: Boolean ): Unit |
toggleChatIsMarkedAsUnread |
Suspend function, which changes the marked as unread state of a chat.suspend fun TelegramFlow .toggleChatIsMarkedAsUnread(chatId: Long , isMarkedAsUnread: Boolean ): Unit |
toggleChatIsPinned |
Suspend function, which changes the pinned state of a chat. You can pin up to GetOption("pinned_chat_count_max")/GetOption("pinned_archived_chat_count_max") non-secret chats and the same number of secret chats in the main/archive chat list.suspend fun TelegramFlow .toggleChatIsPinned(chatId: Long , isPinned: Boolean ): Unit |
toggleSupergroupIsAllHistoryAvailable |
Suspend function, which toggles whether the message history of a supergroup is available to new members; requires canChangeInfo rights.suspend fun TelegramFlow .toggleSupergroupIsAllHistoryAvailable(supergroupId: Int , isAllHistoryAvailable: Boolean ): Unit |
toggleSupergroupSignMessages |
Suspend function, which toggles sender signatures messages sent in a channel; requires canChangeInfo rights.suspend fun TelegramFlow .toggleSupergroupSignMessages(supergroupId: Int , signMessages: Boolean ): Unit |
transferChatOwnership |
Suspend function, which 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.suspend fun TelegramFlow .transferChatOwnership(chatId: Long , userId: Int , password: String ?): Unit |
trendingStickerSetsFlow |
emits StickerSets if the list of trending sticker sets was updated or some of them were viewed.fun TelegramFlow .trendingStickerSetsFlow(): Flow< StickerSets > |
unblockUser |
Suspend function, which removes a user from the blacklist.suspend fun TelegramFlow .unblockUser(userId: Int ): Unit |
unpinChatMessage |
Suspend function, which removes the pinned message from a chat; requires canPinMessages rights in the group or channel.suspend fun TelegramFlow .unpinChatMessage(chatId: Long ): Unit |
unreadChatCountFlow |
emits UpdateUnreadChatCount if number of unread chats, i.e. with unread messages or marked as unread, has changed. This update is sent only if the message database is used.fun TelegramFlow .unreadChatCountFlow(): Flow< UpdateUnreadChatCount > |
unreadMessageCountFlow |
emits UpdateUnreadMessageCount if number of unread messages in a chat list has changed. This update is sent only if the message database is used.fun TelegramFlow .unreadMessageCountFlow(): Flow< UpdateUnreadMessageCount > |
upgradeBasicGroupChatToSupergroupChat |
Suspend function, which creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group.suspend fun TelegramFlow .upgradeBasicGroupChatToSupergroupChat(chatId: Long ): Chat |
uploadFile |
Suspend function, which 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.suspend fun TelegramFlow .uploadFile(file: InputFile ?, fileType: FileType ?, priority: Int ): File |
uploadStickerFile |
Suspend function, which uploads a PNG image with a sticker; for bots only; returns the uploaded file.suspend fun TelegramFlow .uploadStickerFile(userId: Int , pngSticker: InputFile ?): File |
userChatActionFlow |
emits UpdateUserChatAction if user activity in the chat has changed.fun TelegramFlow .userChatActionFlow(): Flow< UpdateUserChatAction > |
userFlow |
emits User if some data of a user has changed. This update is guaranteed to come before the user identifier is returned to the client.fun TelegramFlow .userFlow(): Flow< User > |
userFullInfoFlow |
emits UpdateUserFullInfo if some data from userFullInfo has been changed.fun TelegramFlow .userFullInfoFlow(): Flow< UpdateUserFullInfo > |
userPrivacySettingRulesFlow |
emits UpdateUserPrivacySettingRules if some privacy setting rules have been changed.fun TelegramFlow .userPrivacySettingRulesFlow(): Flow< UpdateUserPrivacySettingRules > |
usersNearbyFlow |
emits usersNearby [ChatNearby[]] if list of users nearby has changed. The update is sent only 60 seconds after a successful searchChatsNearby request.fun TelegramFlow .usersNearbyFlow(): Flow< Array < ChatNearby >> |
userStatusFlow |
emits UpdateUserStatus if the user went online or offline.fun TelegramFlow .userStatusFlow(): Flow< UpdateUserStatus > |
validateOrderInfo |
Suspend function, which validates the order information provided by a user and returns the available shipping options for a flexible invoice.suspend fun TelegramFlow .validateOrderInfo(chatId: Long , messageId: Long , orderInfo: OrderInfo ?, allowSave: Boolean ): ValidatedOrderInfo |
viewMessages |
Suspend function, which 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).suspend fun TelegramFlow .viewMessages(chatId: Long , messageIds: LongArray ?, forceRead: Boolean ): Unit |
viewTrendingStickerSets |
Suspend function, which informs the server that some trending sticker sets have been viewed by the user.suspend fun TelegramFlow .viewTrendingStickerSets(stickerSetIds: LongArray ?): Unit |
writeGeneratedFilePart |
Suspend function, which writes a part of a generated file. This method is intended to be used only if the client has no direct access to TDLib’s file system, because it is usually slower than a direct write to the destination file.suspend fun TelegramFlow .writeGeneratedFilePart(generationId: Long , offset: Int , data: ByteArray ?): Unit |