module
TD::Functions
Direct including types
Defined in:
telegram/functions.crInstance Method Summary
-
#accept_call(call_id : Int32 | Nil = nil, protocol : TD::CallProtocol | Nil = nil) : Ok
Accepts an incoming call @call_id : Int32 (Call identifier) @protocol : TD::CallProtocol (The call protocols supported by the application)
-
#accept_terms_of_service(terms_of_service_id : String | Nil = nil) : Ok
Accepts Telegram terms of services @terms_of_service_id : String (Terms of service identifier)
-
#add_chat_member(chat_id : Int64 | Nil = nil, user_id : Int64 | Nil = nil, forward_limit : Int32 | Nil = nil) : Ok
Adds a new member to a chat.
-
#add_chat_members(chat_id : Int64 | Nil = nil, user_ids : Array(Int64) | Nil = nil) : Ok
Adds multiple new members to a chat.
-
#add_chat_to_list(chat_id : Int64 | Nil = nil, chat_list : TD::ChatList | Nil = nil) : Ok
Adds a chat to a chat list.
-
#add_contact(contact : TD::Contact | Nil = nil, share_phone_number : Bool | Nil = nil) : Ok
Adds a user to the contact list or edits an existing contact by their user identifier @contact : TD::Contact (The contact to add or edit; phone number can be empty and needs to be specified only if known, vCard is ignored) @share_phone_number : Bool (True, if the new contact needs to be allowed to see current user's phone number.
-
#add_custom_server_language_pack(language_pack_id : String | Nil = nil) : Ok
Adds a custom server language pack to the list of installed language packs in current localization target.
-
#add_favorite_sticker(sticker : TD::InputFile | Nil = nil) : Ok
Adds a new sticker to the list of favorite stickers.
-
#add_local_message(chat_id : Int64 | Nil = nil, sender_id : TD::MessageSender | Nil = nil, reply_to_message_id : Int64 | Nil = nil, disable_notification : Bool | Nil = nil, input_message_content : TD::InputMessageContent | Nil = nil) : Message
Adds a local message to a chat.
-
#add_log_message(verbosity_level : Int32 | Nil = nil, text : String | Nil = nil) : Ok
Adds a message to TDLib internal log.
-
#add_network_statistics(entry : TD::NetworkStatisticsEntry | Nil = nil) : Ok
Adds the specified data to data usage statistics.
-
#add_proxy(server : String | Nil = nil, port : Int32 | Nil = nil, enable : Bool | Nil = nil, type : TD::ProxyType | Nil = nil) : Proxy
Adds a proxy server for network requests.
-
#add_recent_sticker(is_attached : Bool | Nil = nil, sticker : TD::InputFile | Nil = nil) : Stickers
Manually adds a new sticker to the list of recently used stickers.
-
#add_recently_found_chat(chat_id : Int64 | Nil = nil) : Ok
Adds a chat to the list of recently found chats.
-
#add_saved_animation(animation : TD::InputFile | Nil = nil) : Ok
Manually adds a new animation to the list of saved animations.
-
#add_sticker_to_set(user_id : Int64 | Nil = nil, name : String | Nil = nil, sticker : TD::InputSticker | Nil = nil) : StickerSet
Adds a new sticker to a set; for bots only.
-
#answer_callback_query(callback_query_id : String | Nil = nil, text : String | Nil = nil, show_alert : Bool | Nil = nil, url : String | Nil = nil, cache_time : Int32 | Nil = nil) : Ok
Sets the result of a callback query; for bots only @callback_query_id : String (Identifier of the callback query) @text : String (Text of the answer) @show_alert : Bool (If true, an alert must be shown to the user instead of a toast notification) @url : String (URL to be opened) @cache_time : Int32 (Time during which the result of the query can be cached, in seconds)
-
#answer_custom_query(custom_query_id : String | Nil = nil, data : String | Nil = nil) : Ok
Answers a custom query; for bots only @custom_query_id : String (Identifier of a custom query) @data : String (JSON-serialized answer to the query)
-
#answer_inline_query(inline_query_id : String | Nil = nil, is_personal : Bool | Nil = nil, results : Array(TD::InputInlineQueryResult) | Nil = nil, cache_time : Int32 | Nil = nil, next_offset : String | Nil = nil, switch_pm_text : String | Nil = nil, switch_pm_parameter : String | Nil = nil) : Ok
Sets the result of an inline query; for bots only @inline_query_id : String (Identifier of the inline query) @is_personal : Bool (True, if the result of the query can be cached for the specified user) @results : Array(TD::InputInlineQueryResult) (The results of the query) @cache_time : Int32 (Allowed time to cache the results of the query, in seconds) @next_offset : String (Offset for the next inline query; pass an empty string if there are no more results) @switch_pm_text : String (If non-empty, this text must be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter) @switch_pm_parameter : String (The parameter for the bot start message)
-
#answer_pre_checkout_query(pre_checkout_query_id : String | Nil = nil, error_message : String | Nil = nil) : Ok
Sets the result of a pre-checkout query; for bots only @pre_checkout_query_id : String (Identifier of the pre-checkout query) @error_message : String (An error message, empty on success)
-
#answer_shipping_query(shipping_query_id : String | Nil = nil, shipping_options : Array(TD::ShippingOption) | Nil = nil, error_message : String | Nil = nil) : Ok
Sets the result of a shipping query; for bots only @shipping_query_id : String (Identifier of the shipping query) @shipping_options : Array(TD::ShippingOption) (Available shipping options) @error_message : String (An error message, empty on success)
-
#ban_chat_member(chat_id : Int64 | Nil = nil, member_id : TD::MessageSender | Nil = nil, banned_until_date : Int32 | Nil = nil, revoke_messages : Bool | Nil = nil) : Ok
Bans a member in a chat.
-
#block_message_sender_from_replies(message_id : Int64 | Nil = nil, delete_message : Bool | Nil = nil, delete_all_messages : Bool | Nil = nil, report_spam : Bool | Nil = nil) : Ok
Blocks an original sender of a message in the Replies chat @message_id : Int64 (The identifier of an incoming message in the Replies chat) @delete_message : Bool (Pass true if the message must be deleted) @delete_all_messages : Bool (Pass true if all messages from the same sender must be deleted) @report_spam : Bool (Pass true if the sender must be reported to the Telegram moderators)
-
#can_transfer_ownership : CanTransferOwnershipResult
Checks whether the current session can be used to transfer a chat ownership to another user
-
#cancel_download_file(file_id : Int32 | Nil = nil, only_if_pending : Bool | Nil = nil) : Ok
Stops the downloading of a file.
-
#cancel_password_reset : Ok
Cancels reset of 2-step verification password.
-
#cancel_upload_file(file_id : Int32 | Nil = nil) : Ok
Stops the uploading of a file.
-
#change_imported_contacts(contacts : Array(TD::Contact) | Nil = nil) : ImportedContacts
Changes imported contacts using the list of contacts saved on the device.
-
#change_phone_number(phone_number : String | Nil = nil, settings : TD::PhoneNumberAuthenticationSettings | Nil = nil) : AuthenticationCodeInfo
Changes the phone number of the user and sends an authentication code to the user's new phone number.
-
#change_sticker_set(set_id : String | Nil = nil, is_installed : Bool | Nil = nil, is_archived : Bool | Nil = nil) : Ok
Installs @set_id : String (Identifier of the sticker set) @is_installed : Bool (The new value of is_installed) @is_archived : Bool (The new value of is_archived.
-
#check_authentication_bot_token(token : String | Nil = nil) : Ok
Checks the authentication token of a bot; to log in as a bot.
-
#check_authentication_code(code : String | Nil = nil) : Ok
Checks the authentication code.
-
#check_authentication_password(password : String | Nil = nil) : Ok
Checks the authentication password for correctness.
-
#check_authentication_password_recovery_code(recovery_code : String | Nil = nil) : Ok
Checks whether a password recovery code sent to an email address is valid.
-
#check_change_phone_number_code(code : String | Nil = nil) : Ok
Checks the authentication code sent to confirm a new phone number of the user @code : String (Authentication code to check)
-
#check_chat_invite_link(invite_link : String | Nil = nil) : ChatInviteLinkInfo
Checks the validity of an invite link for a chat and returns information about the corresponding chat @invite_link : String (Invite link to be checked)
-
#check_chat_username(chat_id : Int64 | Nil = nil, username : String | Nil = nil) : CheckChatUsernameResult
Checks whether a username can be set for a chat @chat_id : Int64 (Chat identifier; must be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if the chat is being created) @username : String (Username to be checked)
-
#check_created_public_chats_limit(type : TD::PublicChatType | Nil = nil) : Ok
Checks whether the maximum number of owned public chats has been reached.
-
#check_database_encryption_key(encryption_key : String | Nil = nil) : Ok
Checks the database encryption key for correctness.
-
#check_email_address_verification_code(code : String | Nil = nil) : Ok
Checks the email address verification code for Telegram Passport @code : String (Verification code to check)
-
#check_password_recovery_code(recovery_code : String | Nil = nil) : Ok
Checks whether a 2-step verification password recovery code sent to an email address is valid @recovery_code : String (Recovery code to check)
-
#check_phone_number_confirmation_code(code : String | Nil = nil) : Ok
Checks phone number confirmation code @code : String (Confirmation code to check)
-
#check_phone_number_verification_code(code : String | Nil = nil) : Ok
Checks the phone number verification code for Telegram Passport @code : String (Verification code to check)
-
#check_recovery_email_address_code(code : String | Nil = nil) : PasswordState
Checks the 2-step verification recovery email address verification code @code : String (Verification code to check)
-
#check_sticker_set_name(name : String | Nil = nil) : CheckStickerSetNameResult
Checks whether a name can be used for a new sticker set @name : String (Name to be checked)
-
#clean_file_name(file_name : String | Nil = nil) : Text
Removes potentially dangerous characters from the name of a file.
-
#clear_all_draft_messages(exclude_secret_chats : Bool | Nil = nil) : Ok
Clears draft messages in all chats @exclude_secret_chats : Bool (If true, local draft messages in secret chats will not be cleared)
-
#clear_imported_contacts : Ok
Clears all imported contacts, contact list remains unchanged
-
#clear_recent_stickers(is_attached : Bool | Nil = nil) : Ok
Clears the list of recently used stickers @is_attached : Bool (Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers)
-
#clear_recently_found_chats : Ok
Clears the list of recently found chats
-
#click_animated_emoji_message(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil) : Sticker
Informs TDLib that a message with an animated emoji was clicked by the user.
-
#close : Ok
Closes the TDLib instance.
-
#close_chat(chat_id : Int64 | Nil = nil) : Ok
Informs TDLib that the chat is closed by the user.
-
#close_secret_chat(secret_chat_id : Int32 | Nil = nil) : Ok
Closes a secret chat, effectively transferring its state to secretChatStateClosed @secret_chat_id : Int32 (Secret chat identifier)
-
#confirm_qr_code_authentication(link : String | Nil = nil) : Session
Confirms QR code authentication on another device.
-
#create_basic_group_chat(basic_group_id : Int64 | Nil = nil, force : Bool | Nil = nil) : Chat
Returns an existing chat corresponding to a known basic group @basic_group_id : Int64 (Basic group identifier) @force : Bool (If true, the chat will be created without network request.
-
#create_call(user_id : Int64 | Nil = nil, protocol : TD::CallProtocol | Nil = nil, is_video : Bool | Nil = nil) : CallId
Creates a new call @user_id : Int64 (Identifier of the user to be called) @protocol : TD::CallProtocol (The call protocols supported by the application) @is_video : Bool (True, if a video call needs to be created)
-
#create_chat_filter(filter : TD::ChatFilter | Nil = nil) : ChatFilterInfo
Creates new chat filter.
-
#create_chat_invite_link(chat_id : Int64 | Nil = nil, name : String | Nil = nil, expiration_date : Int32 | Nil = nil, member_limit : Int32 | Nil = nil, creates_join_request : Bool | Nil = nil) : ChatInviteLink
Creates a new invite link for a chat.
-
#create_new_basic_group_chat(user_ids : Array(Int64) | Nil = nil, title : String | Nil = nil) : Chat
Creates a new basic group and sends a corresponding messageBasicGroupChatCreate.
-
#create_new_secret_chat(user_id : Int64 | Nil = nil) : Chat
Creates a new secret chat.
-
#create_new_sticker_set(user_id : Int64 | Nil = nil, title : String | Nil = nil, name : String | Nil = nil, is_masks : Bool | Nil = nil, stickers : Array(TD::InputSticker) | Nil = nil, source : String | Nil = nil) : StickerSet
Creates a new sticker set.
-
#create_new_supergroup_chat(title : String | Nil = nil, is_channel : Bool | Nil = nil, description : String | Nil = nil, location : TD::ChatLocation | Nil = nil, for_import : Bool | Nil = nil) : Chat
Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate.
-
#create_private_chat(user_id : Int64 | Nil = nil, force : Bool | Nil = nil) : Chat
Returns an existing chat corresponding to a given user @user_id : Int64 (User identifier) @force : Bool (If true, the chat will be created without network request.
-
#create_secret_chat(secret_chat_id : Int32 | Nil = nil) : Chat
Returns an existing chat corresponding to a known secret chat @secret_chat_id : Int32 (Secret chat identifier)
-
#create_supergroup_chat(supergroup_id : Int64 | Nil = nil, force : Bool | Nil = nil) : Chat
Returns an existing chat corresponding to a known supergroup or channel @supergroup_id : Int64 (Supergroup or channel identifier) @force : Bool (If true, the chat will be created without network request.
-
#create_temporary_password(password : String | Nil = nil, valid_for : Int32 | Nil = nil) : TemporaryPasswordState
Creates a new temporary password for processing payments @password : String (Persistent user password) @valid_for : Int32 (Time during which the temporary password will be valid, in seconds; must be between 60 and 86400)
-
#create_video_chat(chat_id : Int64 | Nil = nil, title : String | Nil = nil, start_date : Int32 | Nil = nil) : GroupCallId
Creates a video chat (a group call bound to a chat).
-
#delete_account(reason : String | Nil = nil) : Ok
Deletes the account of the current user, deleting all information associated with the user from the server.
-
#delete_all_call_messages(revoke : Bool | Nil = nil) : Ok
Deletes all call messages @revoke : Bool (Pass true to delete the messages for all users)
-
#delete_all_revoked_chat_invite_links(chat_id : Int64 | Nil = nil, creator_user_id : Int64 | Nil = nil) : Ok
Deletes all revoked chat invite links created by a given chat administrator.
-
#delete_chat(chat_id : Int64 | Nil = nil) : Ok
Deletes a chat along with all messages in the corresponding chat for all chat members; requires owner privileges.
-
#delete_chat_filter(chat_filter_id : Int32 | Nil = nil) : Ok
Deletes existing chat filter @chat_filter_id : Int32 (Chat filter identifier)
-
#delete_chat_history(chat_id : Int64 | Nil = nil, remove_from_chat_list : Bool | Nil = nil, revoke : Bool | Nil = nil) : Ok
Deletes all messages in the chat.
-
#delete_chat_messages_by_date(chat_id : Int64 | Nil = nil, min_date : Int32 | Nil = nil, max_date : Int32 | Nil = nil, revoke : Bool | Nil = nil) : Ok
Deletes all messages between the specified dates in a chat.
-
#delete_chat_messages_by_sender(chat_id : Int64 | Nil = nil, sender_id : TD::MessageSender | Nil = nil) : Ok
Deletes all messages sent by the specified message sender in a chat.
-
#delete_chat_reply_markup(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil) : Ok
Deletes the default reply markup from a chat.
-
#delete_commands(scope : TD::BotCommandScope | Nil = nil, language_code : String | Nil = nil) : Ok
Deletes commands supported by the bot for the given user scope and language; for bots only @scope : TD::BotCommandScope (The scope to which the commands are relevant; pass null to delete commands in the default bot command scope) @language_code : String (A two-letter ISO 639-1 country code or an empty string)
-
#delete_file(file_id : Int32 | Nil = nil) : Ok
Deletes a file from the TDLib file cache @file_id : Int32 (Identifier of the file to delete)
-
#delete_language_pack(language_pack_id : String | Nil = nil) : Ok
Deletes all information about a language pack in the current localization target.
-
#delete_messages(chat_id : Int64 | Nil = nil, message_ids : Array(Int64) | Nil = nil, revoke : Bool | Nil = nil) : Ok
Deletes messages @chat_id : Int64 (Chat identifier) @message_ids : Array(Int64) (Identifiers of the messages to be deleted) @revoke : Bool (Pass true to delete messages for all chat members.
-
#delete_passport_element(type : TD::PassportElementType | Nil = nil) : Ok
Deletes a Telegram Passport element @type : TD::PassportElementType (Element type)
-
#delete_profile_photo(profile_photo_id : String | Nil = nil) : Ok
Deletes a profile photo @profile_photo_id : String (Identifier of the profile photo to delete)
-
#delete_revoked_chat_invite_link(chat_id : Int64 | Nil = nil, invite_link : String | Nil = nil) : Ok
Deletes revoked chat invite links.
-
#delete_saved_credentials : Ok
Deletes saved credentials for all payment provider bots
-
#delete_saved_order_info : Ok
Deletes saved order info
-
#destroy : Ok
Closes the TDLib instance, destroying all local data without a proper logout.
-
#disable_proxy : Ok
Disables the currently enabled proxy.
-
#discard_call(call_id : Int32 | Nil = nil, is_disconnected : Bool | Nil = nil, duration : Int32 | Nil = nil, is_video : Bool | Nil = nil, connection_id : String | Nil = nil) : Ok
Discards a call @call_id : Int32 (Call identifier) @is_disconnected : Bool (True, if the user was disconnected) @duration : Int32 (The call duration, in seconds) @is_video : Bool (True, if the call was a video call) @connection_id : String (Identifier of the connection used during the call)
-
#disconnect_all_websites : Ok
Disconnects all websites from the current user's Telegram account
-
#disconnect_website(website_id : String | Nil = nil) : Ok
Disconnects website from the current user's Telegram account @website_id : String (Website identifier)
-
#download_file(file_id : Int32 | Nil = nil, priority : Int32 | Nil = nil, offset : Int32 | Nil = nil, limit : Int32 | Nil = nil, synchronous : Bool | Nil = nil) : File
Downloads a file from the cloud.
-
#edit_chat_filter(chat_filter_id : Int32 | Nil = nil, filter : TD::ChatFilter | Nil = nil) : ChatFilterInfo
Edits existing chat filter.
-
#edit_chat_invite_link(chat_id : Int64 | Nil = nil, invite_link : String | Nil = nil, name : String | Nil = nil, expiration_date : Int32 | Nil = nil, member_limit : Int32 | Nil = nil, creates_join_request : Bool | Nil = nil) : ChatInviteLink
Edits a non-primary invite link for a chat.
-
#edit_custom_language_pack_info(info : TD::LanguagePackInfo | Nil = nil) : Ok
Edits information about a custom local language pack in the current localization target.
-
#edit_inline_message_caption(inline_message_id : String | Nil = nil, reply_markup : TD::ReplyMarkup | Nil = nil, caption : TD::FormattedText | Nil = nil) : Ok
Edits the caption of an inline message sent via a bot; for bots only @inline_message_id : String (Inline message identifier) @reply_markup : TD::ReplyMarkup (The new message reply markup; pass null if none) @caption : TD::FormattedText (New message content caption; pass null to remove caption; 0-GetOption("message_caption_length_max") characters)
-
#edit_inline_message_live_location(inline_message_id : String | Nil = nil, reply_markup : TD::ReplyMarkup | Nil = nil, location : TD::Location | Nil = nil, heading : Int32 | Nil = nil, proximity_alert_radius : Int32 | Nil = nil) : Ok
Edits the content of a live location in an inline message sent via a bot; for bots only @inline_message_id : String (Inline message identifier) @reply_markup : TD::ReplyMarkup (The new message reply markup; pass null if none) @location : TD::Location (New location content of the message; pass null to stop sharing the live location) @heading : Int32 (The new direction in which the location moves, in degrees; 1-360.
-
#edit_inline_message_media(inline_message_id : String | Nil = nil, reply_markup : TD::ReplyMarkup | Nil | Nil = nil, input_message_content : TD::InputMessageContent | Nil = nil) : Ok
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 @inline_message_id : String (Inline message identifier) @reply_markup : TD::ReplyMarkup? (The new message reply markup; pass null if none; for bots only) @input_message_content : TD::InputMessageContent (New content of the message.
-
#edit_inline_message_reply_markup(inline_message_id : String | Nil = nil, reply_markup : TD::ReplyMarkup | Nil = nil) : Ok
Edits the reply markup of an inline message sent via a bot; for bots only @inline_message_id : String (Inline message identifier) @reply_markup : TD::ReplyMarkup (The new message reply markup; pass null if none)
-
#edit_inline_message_text(inline_message_id : String | Nil = nil, reply_markup : TD::ReplyMarkup | Nil = nil, input_message_content : TD::InputMessageContent | Nil = nil) : Ok
Edits the text of an inline text or game message sent via a bot; for bots only @inline_message_id : String (Inline message identifier) @reply_markup : TD::ReplyMarkup (The new message reply markup; pass null if none) @input_message_content : TD::InputMessageContent (New text content of the message.
-
#edit_message_caption(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, reply_markup : TD::ReplyMarkup | Nil | Nil = nil, caption : TD::FormattedText | Nil = nil) : Message
Edits the message content caption.
-
#edit_message_live_location(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, reply_markup : TD::ReplyMarkup | Nil | Nil = nil, location : TD::Location | Nil = nil, heading : Int32 | Nil = nil, proximity_alert_radius : Int32 | Nil = nil) : Message
Edits the message content of a live location.
-
#edit_message_media(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, reply_markup : TD::ReplyMarkup | Nil | Nil = nil, input_message_content : TD::InputMessageContent | Nil = nil) : Message
Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption.
-
#edit_message_reply_markup(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, reply_markup : TD::ReplyMarkup | Nil = nil) : Message
Edits the message reply markup; for bots only.
-
#edit_message_scheduling_state(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, scheduling_state : TD::MessageSchedulingState | Nil = nil) : Ok
Edits the time when a scheduled message will be sent.
-
#edit_message_text(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, reply_markup : TD::ReplyMarkup | Nil | Nil = nil, input_message_content : TD::InputMessageContent | Nil = nil) : Message
Edits the text of a message (or a text of a game message).
-
#edit_proxy(proxy_id : Int32 | Nil = nil, server : String | Nil = nil, port : Int32 | Nil = nil, enable : Bool | Nil = nil, type : TD::ProxyType | Nil = nil) : Proxy
Edits an existing proxy server for network requests.
-
#enable_proxy(proxy_id : Int32 | Nil = nil) : Ok
Enables a proxy.
-
#end_group_call(group_call_id : Int32 | Nil = nil) : Ok
Ends a group call.
-
#end_group_call_recording(group_call_id : Int32 | Nil = nil) : Ok
Ends recording of an active group call.
-
#end_group_call_screen_sharing(group_call_id : Int32 | Nil = nil) : Ok
Ends screen sharing in a joined group call @group_call_id : Int32 (Group call identifier)
-
#finish_file_generation(generation_id : String | Nil = nil, error : TD::Error | Nil = nil) : Ok
Finishes the file generation @generation_id : String (The identifier of the generation process) @error : TD::Error (If passed, the file generation has failed and must be terminated; pass null if the file generation succeeded)
-
#forward_messages(chat_id : Int64 | Nil = nil, from_chat_id : Int64 | Nil = nil, message_ids : Array(Int64) | Nil = nil, options : TD::MessageSendOptions | Nil = nil, send_copy : Bool | Nil = nil, remove_caption : Bool | Nil = nil, only_preview : Bool | Nil = nil) : Messages
Forwards previously sent messages.
-
#get_account_ttl : AccountTtl
Returns the period of inactivity after which the account of the current user will automatically be deleted
-
#get_active_live_location_messages : Messages
Returns all active live locations that need to be updated by the application.
-
#get_active_sessions : Sessions
Returns all active sessions of the current user
-
#get_all_passport_elements(password : String | Nil = nil) : PassportElements
Returns all available Telegram Passport elements @password : String (Password of the current user)
-
#get_animated_emoji(emoji : String | Nil = nil) : AnimatedEmoji
Returns an animated emoji corresponding to a given emoji.
-
#get_application_config : JsonValue
Returns application config, provided by the server.
-
#get_application_download_link : HttpUrl
Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram
-
#get_archived_sticker_sets(is_masks : Bool | Nil = nil, offset_sticker_set_id : String | Nil = nil, limit : Int32 | Nil = nil) : StickerSets
Returns a list of archived sticker sets @is_masks : Bool (Pass true to return mask stickers sets; pass false to return ordinary sticker sets) @offset_sticker_set_id : String (Identifier of the sticker set from which to return the result) @limit : Int32 (The maximum number of sticker sets to return; up to 100)
-
#get_attached_sticker_sets(file_id : Int32 | Nil = nil) : StickerSets
Returns a list of sticker sets attached to a file.
-
#get_authorization_state : AuthorizationState
Returns the current authorization state; this is an offline request.
-
#get_auto_download_settings_presets : AutoDownloadSettingsPresets
Returns auto-download settings presets for the current user
-
#get_background_url(name : String | Nil = nil, type : TD::BackgroundType | Nil = nil) : HttpUrl
Constructs a persistent HTTP URL for a background @name : String (Background name) @type : TD::BackgroundType (Background type)
-
#get_backgrounds(for_dark_theme : Bool | Nil = nil) : Backgrounds
Returns backgrounds installed by the user @for_dark_theme : Bool (True, if the backgrounds must be ordered for dark theme)
-
#get_bank_card_info(bank_card_number : String | Nil = nil) : BankCardInfo
Returns information about a bank card @bank_card_number : String (The bank card number)
-
#get_basic_group(basic_group_id : Int64 | Nil = nil) : BasicGroup
Returns information about a basic group by its identifier.
-
#get_basic_group_full_info(basic_group_id : Int64 | Nil = nil) : BasicGroupFullInfo
Returns full information about a basic group by its identifier @basic_group_id : Int64 (Basic group identifier)
-
#get_blocked_message_senders(offset : Int32 | Nil = nil, limit : Int32 | Nil = nil) : MessageSenders
Returns users and chats that were blocked by the current user @offset : Int32 (Number of users and chats to skip in the result; must be non-negative) @limit : Int32 (The maximum number of users and chats to return; up to 100)
-
#get_callback_query_answer(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, payload : TD::CallbackQueryPayload | Nil = nil) : CallbackQueryAnswer
Sends a callback query to a bot and returns an answer.
-
#get_callback_query_message(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, callback_query_id : String | Nil = nil) : Message
Returns information about a message with the callback button that originated a callback query; for bots only @chat_id : Int64 (Identifier of the chat the message belongs to) @message_id : Int64 (Message identifier) @callback_query_id : String (Identifier of the callback query)
-
#get_chat(chat_id : Int64 | Nil = nil) : Chat
Returns information about a chat by its identifier, this is an offline request if the current user is not a bot @chat_id : Int64 (Chat identifier)
-
#get_chat_administrators(chat_id : Int64 | Nil = nil) : ChatAdministrators
Returns a list of administrators of the chat with their custom titles @chat_id : Int64 (Chat identifier)
-
#get_chat_available_message_senders(chat_id : Int64 | Nil = nil) : MessageSenders
Returns list of message sender identifiers, which can be used to send messages in a chat @chat_id : Int64 (Chat identifier)
-
#get_chat_event_log(chat_id : Int64 | Nil = nil, query : String | Nil = nil, from_event_id : String | Nil = nil, limit : Int32 | Nil = nil, filters : TD::ChatEventLogFilters | Nil = nil, user_ids : Array(Int64) | Nil = nil) : ChatEvents
Returns a list of service actions taken by chat members and administrators in the last 48 hours.
-
#get_chat_filter(chat_filter_id : Int32 | Nil = nil) : ChatFilter
Returns information about a chat filter by its identifier @chat_filter_id : Int32 (Chat filter identifier)
-
#get_chat_filter_default_icon_name(filter : TD::ChatFilter | Nil = nil) : Text
Returns default icon name for a filter.
-
#get_chat_history(chat_id : Int64 | Nil = nil, from_message_id : Int64 | Nil = nil, offset : Int32 | Nil = nil, limit : Int32 | Nil = nil, only_local : Bool | Nil = nil) : Messages
Returns messages in a chat.
-
#get_chat_invite_link(chat_id : Int64 | Nil = nil, invite_link : String | Nil = nil) : ChatInviteLink
Returns information about an invite link.
-
#get_chat_invite_link_counts(chat_id : Int64 | Nil = nil) : ChatInviteLinkCounts
Returns list of chat administrators with number of their invite links.
-
#get_chat_invite_link_members(chat_id : Int64 | Nil = nil, invite_link : String | Nil = nil, offset_member : TD::ChatInviteLinkMember | Nil = nil, limit : Int32 | Nil = nil) : ChatInviteLinkMembers
Returns chat members joined a chat via an invite link.
-
#get_chat_invite_links(chat_id : Int64 | Nil = nil, creator_user_id : Int64 | Nil = nil, is_revoked : Bool | Nil = nil, offset_date : Int32 | Nil = nil, offset_invite_link : String | Nil = nil, limit : Int32 | Nil = nil) : ChatInviteLinks
Returns invite links for a chat created by specified administrator.
-
#get_chat_join_requests(chat_id : Int64 | Nil = nil, invite_link : String | Nil = nil, query : String | Nil = nil, offset_request : TD::ChatJoinRequest | Nil = nil, limit : Int32 | Nil = nil) : ChatJoinRequests
Returns pending join requests in a chat @chat_id : Int64 (Chat identifier) @invite_link : String (Invite link for which to return join requests.
-
#get_chat_lists_to_add_chat(chat_id : Int64 | Nil = nil) : ChatLists
Returns chat lists to which the chat can be added.
-
#get_chat_member(chat_id : Int64 | Nil = nil, member_id : TD::MessageSender | Nil = nil) : ChatMember
Returns information about a single member of a chat @chat_id : Int64 (Chat identifier) @member_id : TD::MessageSender (Member identifier)
-
#get_chat_message_by_date(chat_id : Int64 | Nil = nil, date : Int32 | Nil = nil) : Message
Returns the last message sent in a chat no later than the specified date @chat_id : Int64 (Chat identifier) @date : Int32 (Point in time (Unix timestamp) relative to which to search for messages)
-
#get_chat_message_calendar(chat_id : Int64 | Nil = nil, filter : TD::SearchMessagesFilter | Nil = nil, from_message_id : Int64 | Nil = nil) : MessageCalendar
Returns information about the next messages of the specified type in the chat split by days.
-
#get_chat_message_count(chat_id : Int64 | Nil = nil, filter : TD::SearchMessagesFilter | Nil = nil, return_local : Bool | Nil = nil) : Count
Returns approximate number of messages of the specified type in the chat @chat_id : Int64 (Identifier of the chat in which to count messages) @filter : TD::SearchMessagesFilter (Filter for message content; searchMessagesFilterEmpty is unsupported in this function) @return_local : Bool (If true, returns count that is available locally without sending network requests, returning -1 if the number of messages is unknown)
-
#get_chat_notification_settings_exceptions(scope : TD::NotificationSettingsScope | Nil = nil, compare_sound : Bool | Nil = nil) : Chats
Returns list of chats with non-default notification settings @scope : TD::NotificationSettingsScope (If specified, only chats from the scope will be returned; pass null to return chats from all scopes) @compare_sound : Bool (If true, also chats with non-default sound will be returned)
-
#get_chat_pinned_message(chat_id : Int64 | Nil = nil) : Message
Returns information about a newest pinned message in the chat @chat_id : Int64 (Identifier of the chat the message belongs to)
-
#get_chat_scheduled_messages(chat_id : Int64 | Nil = nil) : Messages
Returns all scheduled messages in a chat.
-
#get_chat_sparse_message_positions(chat_id : Int64 | Nil = nil, filter : TD::SearchMessagesFilter | Nil = nil, from_message_id : Int64 | Nil = nil, limit : Int32 | Nil = nil) : MessagePositions
Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.
-
#get_chat_sponsored_message(chat_id : Int64 | Nil = nil) : SponsoredMessage
Returns sponsored message to be shown in a chat; for channel chats only.
-
#get_chat_statistics(chat_id : Int64 | Nil = nil, is_dark : Bool | Nil = nil) : ChatStatistics
Returns detailed statistics about a chat.
-
#get_chats(chat_list : TD::ChatList | Nil = nil, limit : Int32 | Nil = nil) : Chats
Returns an ordered list of chats from the beginning of a chat list.
-
#get_commands(scope : TD::BotCommandScope | Nil = nil, language_code : String | Nil = nil) : BotCommands
Returns the list of commands supported by the bot for the given user scope and language; for bots only @scope : TD::BotCommandScope (The scope to which the commands are relevant; pass null to get commands in the default bot command scope) @language_code : String (A two-letter ISO 639-1 country code or an empty string)
-
#get_connected_websites : ConnectedWebsites
Returns all website where the current user used Telegram to log in
-
#get_contacts : Users
Returns all user contacts
-
#get_countries : Countries
Returns information about existing countries.
-
#get_country_code : Text
Uses the current IP address to find the current country.
-
#get_created_public_chats(type : TD::PublicChatType | Nil = nil) : Chats
Returns a list of public chats of the specified type, owned by the user @type : TD::PublicChatType (Type of the public chats to return)
-
#get_current_state : Updates
Returns all updates needed to restore current TDLib state, i.e.
-
#get_database_statistics : DatabaseStatistics
Returns database statistics
-
#get_deep_link_info(link : String | Nil = nil) : DeepLinkInfo
Returns information about a tg: @link : String (The link)
-
#get_emoji_suggestions_url(language_code : String | Nil = nil) : HttpUrl
Returns an HTTP URL which can be used to automatically log in to the translation platform and suggest new emoji replacements.
-
#get_external_link(link : String | Nil = nil, allow_write_access : Bool | Nil = nil) : HttpUrl
Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link.
-
#get_external_link_info(link : String | Nil = nil) : LoginUrlInfo
Returns information about an action to be done when the current user clicks an external link.
-
#get_favorite_stickers : Stickers
Returns favorite stickers
-
#get_file(file_id : Int32 | Nil = nil) : File
Returns information about a file; this is an offline request @file_id : Int32 (Identifier of the file to get)
-
#get_file_downloaded_prefix_size(file_id : Int32 | Nil = nil, offset : Int32 | Nil = nil) : Count
Returns file downloaded prefix size from a given offset, in bytes @file_id : Int32 (Identifier of the file) @offset : Int32 (Offset from which downloaded prefix size needs to be calculated)
-
#get_file_extension(mime_type : String | Nil = nil) : Text
Returns the extension of a file, guessed by its MIME type.
-
#get_file_mime_type(file_name : String | Nil = nil) : Text
Returns the MIME type of a file, guessed by its extension.
-
#get_game_high_scores(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, user_id : Int64 | Nil = nil) : GameHighScores
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 @chat_id : Int64 (The chat that contains the message with the game) @message_id : Int64 (Identifier of the message) @user_id : Int64 (User identifier)
-
#get_group_call(group_call_id : Int32 | Nil = nil) : GroupCall
Returns information about a group call @group_call_id : Int32 (Group call identifier)
-
#get_group_call_invite_link(group_call_id : Int32 | Nil = nil, can_self_unmute : Bool | Nil = nil) : HttpUrl
Returns invite link to a video chat in a public chat @group_call_id : Int32 (Group call identifier) @can_self_unmute : Bool (Pass true if the invite link needs to contain an invite hash, passing which to joinGroupCall would allow the invited user to unmute themselves.
-
#get_group_call_stream_segment(group_call_id : Int32 | Nil = nil, time_offset : Int64 | Nil = nil, scale : Int32 | Nil = nil, channel_id : Int32 | Nil = nil, video_quality : TD::GroupCallVideoQuality | Nil = nil) : FilePart
Returns a file with a segment of a group call stream in a modified OGG format for audio or MPEG-4 format for video @group_call_id : Int32 (Group call identifier) @time_offset : Int64 (Point in time when the stream segment begins; Unix timestamp in milliseconds) @scale : Int32 (Segment duration scale; 0-1.
-
#get_groups_in_common(user_id : Int64 | Nil = nil, offset_chat_id : Int64 | Nil = nil, limit : Int32 | Nil = nil) : Chats
Returns a list of common group chats with a given user.
-
#get_imported_contact_count : Count
Returns the total number of imported contacts
-
#get_inactive_supergroup_chats : Chats
Returns a list of recently inactive supergroups and channels.
-
#get_inline_game_high_scores(inline_message_id : String | Nil = nil, user_id : Int64 | Nil = nil) : GameHighScores
Returns game high scores and some part of the high score table in the range of the specified user; for bots only @inline_message_id : String (Inline message identifier) @user_id : Int64 (User identifier)
-
#get_inline_query_results(bot_user_id : Int64 | Nil = nil, chat_id : Int64 | Nil = nil, user_location : TD::Location | Nil = nil, query : String | Nil = nil, offset : String | Nil = nil) : InlineQueryResults
Sends an inline query to a bot and returns its results.
-
#get_installed_sticker_sets(is_masks : Bool | Nil = nil) : StickerSets
Returns a list of installed sticker sets @is_masks : Bool (Pass true to return mask sticker sets; pass false to return ordinary sticker sets)
-
#get_internal_link_type(link : String | Nil = nil) : InternalLinkType
Returns information about the type of an internal link.
-
#get_json_string(json_value : TD::JsonValue | Nil = nil) : Text
Converts a JsonValue object to corresponding JSON-serialized string.
-
#get_json_value(json : String | Nil = nil) : JsonValue
Converts a JSON-serialized string to corresponding JsonValue object.
-
#get_language_pack_info(language_pack_id : String | Nil = nil) : LanguagePackInfo
Returns information about a language pack.
-
#get_language_pack_string(language_pack_database_path : String | Nil = nil, localization_target : String | Nil = nil, language_pack_id : String | Nil = nil, key : String | Nil = nil) : LanguagePackStringValue
Returns a string stored in the local database from the specified localization target and language pack by its key.
-
#get_language_pack_strings(language_pack_id : String | Nil = nil, keys : Array(String) | Nil = nil) : LanguagePackStrings
Returns strings from a language pack in the current localization target by their keys.
-
#get_localization_target_info(only_local : Bool | Nil = nil) : LocalizationTargetInfo
Returns information about the current localization target.
-
#get_log_stream : LogStream
Returns information about currently used log stream for internal logging of TDLib.
-
#get_log_tag_verbosity_level(tag : String | Nil = nil) : LogVerbosityLevel
Returns current verbosity level for a specified TDLib internal log tag.
-
#get_log_tags : LogTags
Returns list of available TDLib internal log tags, for example,
-
#get_log_verbosity_level : LogVerbosityLevel
Returns current verbosity level of the internal logging of TDLib.
-
#get_login_url(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, button_id : Int64 | Nil = nil, allow_write_access : Bool | Nil = nil) : HttpUrl
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.
-
#get_login_url_info(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, button_id : Int64 | Nil = nil) : LoginUrlInfo
Returns information about a button of type inlineKeyboardButtonTypeLoginUrl.
-
#get_map_thumbnail_file(location : TD::Location | Nil = nil, zoom : Int32 | Nil = nil, width : Int32 | Nil = nil, height : Int32 | Nil = nil, scale : Int32 | Nil = nil, chat_id : Int64 | Nil = nil) : File
Returns information about a file with a map thumbnail in PNG format.
-
#get_markdown_text(text : TD::FormattedText | Nil = nil) : FormattedText
Replaces text entities with Markdown formatting in a human-friendly format.
-
#get_me : User
Returns the current user
-
#get_message(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil) : Message
Returns information about a message @chat_id : Int64 (Identifier of the chat the message belongs to) @message_id : Int64 (Identifier of the message to get)
-
#get_message_embedding_code(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, for_album : Bool | Nil = nil) : Text
Returns an HTML code for embedding the message.
-
#get_message_file_type(message_file_head : String | Nil = nil) : MessageFileType
Returns information about a file with messages exported from another app @message_file_head : String (Beginning of the message file; up to 100 first lines)
-
#get_message_import_confirmation_text(chat_id : Int64 | Nil = nil) : Text
Returns a confirmation text to be shown to the user before starting message import @chat_id : Int64 (Identifier of a chat to which the messages will be imported.
-
#get_message_link(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, media_timestamp : Int32 | Nil = nil, for_album : Bool | Nil = nil, for_comment : Bool | Nil = nil) : MessageLink
Returns an HTTPS link to a message in a chat.
-
#get_message_link_info(url : String | Nil = nil) : MessageLinkInfo
Returns information about a public or private message link.
-
#get_message_locally(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil) : Message
Returns information about a message, if it is available locally without sending network request.
-
#get_message_public_forwards(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, offset : String | Nil = nil, limit : Int32 | Nil = nil) : FoundMessages
Returns forwarded copies of a channel message to different public channels.
-
#get_message_statistics(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, is_dark : Bool | Nil = nil) : MessageStatistics
Returns detailed statistics about a message.
-
#get_message_thread(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil) : MessageThreadInfo
Returns information about a message thread.
-
#get_message_thread_history(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, from_message_id : Int64 | Nil = nil, offset : Int32 | Nil = nil, limit : Int32 | Nil = nil) : Messages
Returns messages in a message thread of a message.
-
#get_message_viewers(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil) : Users
Returns viewers of a recent outgoing message in a basic group or a supergroup chat.
-
#get_messages(chat_id : Int64 | Nil = nil, message_ids : Array(Int64) | Nil = nil) : Messages
Returns information about messages.
-
#get_network_statistics(only_current : Bool | Nil = nil) : NetworkStatistics
Returns network data usage statistics.
-
#get_option(name : String | Nil = nil) : OptionValue
Returns the value of an option by its name.
-
#get_passport_authorization_form(bot_user_id : Int64 | Nil = nil, scope : String | Nil = nil, public_key : String | Nil = nil, nonce : String | Nil = nil) : PassportAuthorizationForm
Returns a Telegram Passport authorization form for sharing data with a service @bot_user_id : Int64 (User identifier of the service's bot) @scope : String (Telegram Passport element types requested by the service) @public_key : String (Service's public key) @nonce : String (Unique request identifier provided by the service)
-
#get_passport_authorization_form_available_elements(autorization_form_id : Int32 | Nil = nil, password : String | Nil = nil) : PassportElementsWithErrors
Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form.
-
#get_passport_element(type : TD::PassportElementType | Nil = nil, password : String | Nil = nil) : PassportElement
Returns one of the available Telegram Passport elements @type : TD::PassportElementType (Telegram Passport element type) @password : String (Password of the current user)
-
#get_password_state : PasswordState
Returns the current state of 2-step verification
-
#get_payment_form(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, theme : TD::PaymentFormTheme | Nil = nil) : PaymentForm
Returns an invoice payment form.
-
#get_payment_receipt(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil) : PaymentReceipt
Returns information about a successful payment @chat_id : Int64 (Chat identifier of the PaymentSuccessful message) @message_id : Int64 (Message identifier)
-
#get_phone_number_info(phone_number_prefix : String | Nil = nil) : PhoneNumberInfo
Returns information about a phone number by its prefix.
-
#get_phone_number_info_sync(language_code : String | Nil = nil, phone_number_prefix : String | Nil = nil) : PhoneNumberInfo
Returns information about a phone number by its prefix synchronously.
-
#get_poll_voters(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, option_id : Int32 | Nil = nil, offset : Int32 | Nil = nil, limit : Int32 | Nil = nil) : Users
Returns users voted for the specified option in a non-anonymous polls.
-
#get_preferred_country_language(country_code : String | Nil = nil) : Text
Returns an IETF language tag of the language preferred in the country, which must be used to fill native fields in Telegram Passport personal details.
-
#get_proxies : Proxies
Returns list of proxies that are currently set up.
-
#get_proxy_link(proxy_id : Int32 | Nil = nil) : HttpUrl
Returns an HTTPS link, which can be used to add a proxy.
-
#get_push_receiver_id(payload : String | Nil = nil) : PushReceiverId
Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification.
-
#get_recent_inline_bots : Users
Returns up to 20 recently used inline bots in the order of their last usage
-
#get_recent_stickers(is_attached : Bool | Nil = nil) : Stickers
Returns a list of recently used stickers @is_attached : Bool (Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers)
-
#get_recently_opened_chats(limit : Int32 | Nil = nil) : Chats
Returns recently opened chats, this is an offline request.
-
#get_recently_visited_t_me_urls(referrer : String | Nil = nil) : TMeUrls
Returns t.me URLs recently visited by a newly registered user @referrer : String (Google Play referrer to identify the user)
-
#get_recommended_chat_filters : RecommendedChatFilters
Returns recommended chat filters for the current user
-
#get_recovery_email_address(password : String | Nil = nil) : RecoveryEmailAddress
Returns a 2-step verification recovery email address that was previously set up.
-
#get_remote_file(remote_file_id : String | Nil = nil, file_type : TD::FileType | Nil = nil) : File
Returns information about a file by its remote ID; this is an offline request.
-
#get_replied_message(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil) : Message
Returns information about a message that is replied by a given message.
-
#get_saved_animations : Animations
Returns saved animations
-
#get_saved_order_info : OrderInfo
Returns saved order info, if any
-
#get_scope_notification_settings(scope : TD::NotificationSettingsScope | Nil = nil) : ScopeNotificationSettings
Returns the notification settings for chats of a given type @scope : TD::NotificationSettingsScope (Types of chats for which to return the notification settings information)
-
#get_secret_chat(secret_chat_id : Int32 | Nil = nil) : SecretChat
Returns information about a secret chat by its identifier.
-
#get_statistical_graph(chat_id : Int64 | Nil = nil, token : String | Nil = nil, x : Int64 | Nil = nil) : StatisticalGraph
Loads an asynchronous or a zoomed in statistical graph @chat_id : Int64 (Chat identifier) @token : String (The token for graph loading) @x : Int64 (X-value for zoomed in graph or 0 otherwise)
-
#get_sticker_emojis(sticker : TD::InputFile | Nil = nil) : Emojis
Returns emoji corresponding to a sticker.
-
#get_sticker_set(set_id : String | Nil = nil) : StickerSet
Returns information about a sticker set by its identifier @set_id : String (Identifier of the sticker set)
-
#get_stickers(emoji : String | Nil = nil, limit : Int32 | Nil = nil) : Stickers
Returns stickers from the installed sticker sets that correspond to a given emoji.
-
#get_storage_statistics(chat_limit : Int32 | Nil = nil) : StorageStatistics
Returns storage usage statistics.
-
#get_storage_statistics_fast : StorageStatisticsFast
Quickly returns approximate storage usage statistics.
-
#get_suggested_file_name(file_id : Int32 | Nil = nil, directory : String | Nil = nil) : Text
Returns suggested name for saving a file in a given directory @file_id : Int32 (Identifier of the file) @directory : String (Directory in which the file is supposed to be saved)
-
#get_suggested_sticker_set_name(title : String | Nil = nil) : Text
Returns a suggested name for a new sticker set with a given title @title : String (Sticker set title; 1-64 characters)
-
#get_suitable_discussion_chats : Chats
Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel.
-
#get_supergroup(supergroup_id : Int64 | Nil = nil) : Supergroup
Returns information about a supergroup or a channel by its identifier.
-
#get_supergroup_full_info(supergroup_id : Int64 | Nil = nil) : SupergroupFullInfo
Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute @supergroup_id : Int64 (Supergroup or channel identifier)
-
#get_supergroup_members(supergroup_id : Int64 | Nil = nil, filter : TD::SupergroupMembersFilter | Nil = nil, offset : Int32 | Nil = nil, limit : Int32 | Nil = nil) : ChatMembers
Returns information about members or banned users in a supergroup or channel.
-
#get_support_user : User
Returns a user that can be contacted to get support
-
#get_temporary_password_state : TemporaryPasswordState
Returns information about the current temporary password
-
#get_text_entities(text : String | Nil = nil) : TextEntities
Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text.
-
#get_top_chats(category : TD::TopChatCategory | Nil = nil, limit : Int32 | Nil = nil) : Chats
Returns a list of frequently used chats.
-
#get_trending_sticker_sets(offset : Int32 | Nil = nil, limit : Int32 | Nil = nil) : StickerSets
Returns a list of trending sticker sets.
-
#get_user(user_id : Int64 | Nil = nil) : User
Returns information about a user by their identifier.
-
#get_user_full_info(user_id : Int64 | Nil = nil) : UserFullInfo
Returns full information about a user by their identifier @user_id : Int64 (User identifier)
-
#get_user_privacy_setting_rules(setting : TD::UserPrivacySetting | Nil = nil) : UserPrivacySettingRules
Returns the current privacy settings @setting : TD::UserPrivacySetting (The privacy setting)
-
#get_user_profile_photos(user_id : Int64 | Nil = nil, offset : Int32 | Nil = nil, limit : Int32 | Nil = nil) : ChatPhotos
Returns the profile photos of a user.
-
#get_video_chat_available_participants(chat_id : Int64 | Nil = nil) : MessageSenders
Returns list of participant identifiers, on whose behalf a video chat in the chat can be joined @chat_id : Int64 (Chat identifier)
-
#get_web_page_instant_view(url : String | Nil = nil, force_full : Bool | Nil = nil) : WebPageInstantView
Returns an instant view version of a web page if available.
-
#get_web_page_preview(text : TD::FormattedText | Nil = nil) : WebPage
Returns a web page preview by the text of the message.
-
#hide_suggested_action(action : TD::SuggestedAction | Nil = nil) : Ok
Hides a suggested action @action : TD::SuggestedAction (Suggested action to hide)
-
#import_contacts(contacts : Array(TD::Contact) | Nil = nil) : ImportedContacts
Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored @contacts : Array(TD::Contact) (The list of contacts to import or edit; contacts' vCard are ignored and are not imported)
-
#import_messages(chat_id : Int64 | Nil = nil, message_file : TD::InputFile | Nil = nil, attached_files : Array(TD::InputFile) | Nil = nil) : Ok
Imports messages exported from another app @chat_id : Int64 (Identifier of a chat to which the messages will be imported.
-
#invite_group_call_participants(group_call_id : Int32 | Nil = nil, user_ids : Array(Int64) | Nil = nil) : Ok
Invites users to an active group call.
-
#join_chat(chat_id : Int64 | Nil = nil) : Ok
Adds the current user as a new member to a chat.
-
#join_chat_by_invite_link(invite_link : String | Nil = nil) : Chat
Uses an invite link to add the current user to the chat if possible @invite_link : String (Invite link to use)
-
#join_group_call(group_call_id : Int32 | Nil = nil, participant_id : TD::MessageSender | Nil = nil, audio_source_id : Int32 | Nil = nil, payload : String | Nil = nil, is_muted : Bool | Nil = nil, is_my_video_enabled : Bool | Nil = nil, invite_hash : String | Nil = nil) : Text
Joins an active group call.
-
#leave_chat(chat_id : Int64 | Nil = nil) : Ok
Removes the current user from chat members.
-
#leave_group_call(group_call_id : Int32 | Nil = nil) : Ok
Leaves a group call @group_call_id : Int32 (Group call identifier)
-
#load_chats(chat_list : TD::ChatList | Nil = nil, limit : Int32 | Nil = nil) : Ok
Loads more chats from a chat list.
-
#load_group_call_participants(group_call_id : Int32 | Nil = nil, limit : Int32 | Nil = nil) : Ok
Loads more participants of a group call.
-
#log_out : Ok
Closes the TDLib instance after a proper logout.
-
#open_chat(chat_id : Int64 | Nil = nil) : Ok
Informs TDLib that the chat is opened by the user.
-
#open_message_content(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil) : Ok
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).
-
#optimize_storage(size : Int64 | Nil = nil, ttl : Int32 | Nil = nil, count : Int32 | Nil = nil, immunity_delay : Int32 | Nil = nil, file_types : Array(TD::FileType) | Nil = nil, chat_ids : Array(Int64) | Nil = nil, exclude_chat_ids : Array(Int64) | Nil = nil, return_deleted_file_statistics : Bool | Nil = nil, chat_limit : Int32 | Nil = nil) : StorageStatistics
Optimizes storage usage, i.e.
-
#parse_markdown(text : TD::FormattedText | Nil = nil) : FormattedText
Parses Markdown entities in a human-friendly format, ignoring markup errors.
-
#parse_text_entities(text : String | Nil = nil, parse_mode : TD::TextParseMode | Nil = nil) : FormattedText
Parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text.
-
#pin_chat_message(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, disable_notification : Bool | Nil = nil, only_for_self : Bool | Nil = nil) : Ok
Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the channel @chat_id : Int64 (Identifier of the chat) @message_id : Int64 (Identifier of the new pinned message) @disable_notification : Bool (True, if there must be no notification about the pinned message.
-
#ping_proxy(proxy_id : Int32 | Nil = nil) : Seconds
Computes time needed to receive a response from a Telegram server through a proxy.
-
#process_chat_join_request(chat_id : Int64 | Nil = nil, user_id : Int64 | Nil = nil, approve : Bool | Nil = nil) : Ok
Handles a pending join request in a chat @chat_id : Int64 (Chat identifier) @user_id : Int64 (Identifier of the user that sent the request) @approve : Bool (True, if the request is approved.
-
#process_chat_join_requests(chat_id : Int64 | Nil = nil, invite_link : String | Nil = nil, approve : Bool | Nil = nil) : Ok
Handles all pending join requests for a given link in a chat @chat_id : Int64 (Chat identifier) @invite_link : String (Invite link for which to process join requests.
-
#process_push_notification(payload : String | Nil = nil) : Ok
Handles a push notification.
-
#read_all_chat_mentions(chat_id : Int64 | Nil = nil) : Ok
Marks all mentions in a chat as read @chat_id : Int64 (Chat identifier)
-
#read_file_part(file_id : Int32 | Nil = nil, offset : Int32 | Nil = nil, count : Int32 | Nil = nil) : FilePart
Reads a part of a file from the TDLib file cache and returns read bytes.
-
#recover_authentication_password(recovery_code : String | Nil = nil, new_password : String | Nil = nil, new_hint : String | Nil = nil) : Ok
Recovers the password with a password recovery code sent to an email address that was previously set up.
-
#recover_password(recovery_code : String | Nil = nil, new_password : String | Nil = nil, new_hint : String | Nil = nil) : PasswordState
Recovers the 2-step verification password using a recovery code sent to an email address that was previously set up @recovery_code : String (Recovery code to check) @new_password : String (New password of the user; may be empty to remove the password) @new_hint : String (New password hint; may be empty)
-
#register_device(device_token : TD::DeviceToken | Nil = nil, other_user_ids : Array(Int64) | Nil = nil) : PushReceiverId
Registers the currently used device for receiving push notifications.
-
#register_user(first_name : String | Nil = nil, last_name : String | Nil = nil) : Ok
Finishes user registration.
-
#remove_background(background_id : String | Nil = nil) : Ok
Removes background from the list of installed backgrounds @background_id : String (The background identifier)
-
#remove_chat_action_bar(chat_id : Int64 | Nil = nil) : Ok
Removes a chat action bar without any other action @chat_id : Int64 (Chat identifier)
-
#remove_contacts(user_ids : Array(Int64) | Nil = nil) : Ok
Removes users from the contact list @user_ids : Array(Int64) (Identifiers of users to be deleted)
-
#remove_favorite_sticker(sticker : TD::InputFile | Nil = nil) : Ok
Removes a sticker from the list of favorite stickers @sticker : TD::InputFile (Sticker file to delete from the list)
-
#remove_notification(notification_group_id : Int32 | Nil = nil, notification_id : Int32 | Nil = nil) : Ok
Removes an active notification from notification list.
-
#remove_notification_group(notification_group_id : Int32 | Nil = nil, max_notification_id : Int32 | Nil = nil) : Ok
Removes a group of active notifications.
-
#remove_proxy(proxy_id : Int32 | Nil = nil) : Ok
Removes a proxy server.
-
#remove_recent_hashtag(hashtag : String | Nil = nil) : Ok
Removes a hashtag from the list of recently used hashtags @hashtag : String (Hashtag to delete)
-
#remove_recent_sticker(is_attached : Bool | Nil = nil, sticker : TD::InputFile | Nil = nil) : Ok
Removes a sticker from the list of recently used stickers @is_attached : Bool (Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers) @sticker : TD::InputFile (Sticker file to delete)
-
#remove_recently_found_chat(chat_id : Int64 | Nil = nil) : Ok
Removes a chat from the list of recently found chats @chat_id : Int64 (Identifier of the chat to be removed)
-
#remove_saved_animation(animation : TD::InputFile | Nil = nil) : Ok
Removes an animation from the list of saved animations @animation : TD::InputFile (Animation file to be removed)
-
#remove_sticker_from_set(sticker : TD::InputFile | Nil = nil) : Ok
Removes a sticker from the set to which it belongs; for bots only.
-
#remove_top_chat(category : TD::TopChatCategory | Nil = nil, chat_id : Int64 | Nil = nil) : Ok
Removes a chat from the list of frequently used chats.
-
#reorder_chat_filters(chat_filter_ids : Array(Int32) | Nil = nil) : Ok
Changes the order of chat filters @chat_filter_ids : Array(Int32) (Identifiers of chat filters in the new correct order)
-
#reorder_installed_sticker_sets(is_masks : Bool | Nil = nil, sticker_set_ids : Array(String) | Nil = nil) : Ok
Changes the order of installed sticker sets @is_masks : Bool (Pass true to change the order of mask sticker sets; pass false to change the order of ordinary sticker sets) @sticker_set_ids : Array(String) (Identifiers of installed sticker sets in the new correct order)
-
#replace_primary_chat_invite_link(chat_id : Int64 | Nil = nil) : ChatInviteLink
Replaces current primary invite link for a chat with a new primary invite link.
-
#report_chat(chat_id : Int64 | Nil = nil, message_ids : Array(Int64) | Nil = nil, reason : TD::ChatReportReason | Nil = nil, text : String | Nil = nil) : Ok
Reports a chat to the Telegram moderators.
-
#report_chat_photo(chat_id : Int64 | Nil = nil, file_id : Int32 | Nil = nil, reason : TD::ChatReportReason | Nil = nil, text : String | Nil = nil) : Ok
Reports a chat photo to the Telegram moderators.
-
#report_supergroup_spam(supergroup_id : Int64 | Nil = nil, message_ids : Array(Int64) | Nil = nil) : Ok
Reports messages in a supergroup as spam; requires administrator rights in the supergroup @supergroup_id : Int64 (Supergroup identifier) @message_ids : Array(Int64) (Identifiers of messages to report)
-
#request_authentication_password_recovery : Ok
Requests to send a password recovery code to an email address that was previously set up.
-
#request_password_recovery : EmailAddressAuthenticationCodeInfo
Requests to send a 2-step verification password recovery code to an email address that was previously set up
-
#request_qr_code_authentication(other_user_ids : Array(Int64) | Nil = nil) : Ok
Requests QR code authentication by scanning a QR code on another logged in device.
-
#resend_authentication_code : Ok
Re-sends an authentication code to the user.
-
#resend_change_phone_number_code : AuthenticationCodeInfo
Re-sends the authentication code sent to confirm a new phone number for the current user.
-
#resend_email_address_verification_code : EmailAddressAuthenticationCodeInfo
Re-sends the code to verify an email address to be added to a user's Telegram Passport
-
#resend_messages(chat_id : Int64 | Nil = nil, message_ids : Array(Int64) | Nil = nil) : Messages
Resends messages which failed to send.
-
#resend_phone_number_confirmation_code : AuthenticationCodeInfo
Resends phone number confirmation code
-
#resend_phone_number_verification_code : AuthenticationCodeInfo
Re-sends the code to verify a phone number to be added to a user's Telegram Passport
-
#resend_recovery_email_address_code : PasswordState
Resends the 2-step verification recovery email address verification code
-
#reset_all_notification_settings : Ok
Resets all notification settings to their default values.
-
#reset_backgrounds : Ok
Resets list of installed backgrounds to its default value
-
#reset_network_statistics : Ok
Resets all network data usage statistics to zero.
-
#reset_password : ResetPasswordResult
Removes 2-step verification password without previous password and access to recovery email address.
-
#revoke_chat_invite_link(chat_id : Int64 | Nil = nil, invite_link : String | Nil = nil) : ChatInviteLinks
Revokes invite link for a chat.
-
#revoke_group_call_invite_link(group_call_id : Int32 | Nil = nil) : Ok
Revokes invite link for a group call.
-
#save_application_log_event(type : String | Nil = nil, chat_id : Int64 | Nil = nil, data : TD::JsonValue | Nil = nil) : Ok
Saves application log event on the server.
-
#search_background(name : String | Nil = nil) : Background
Searches for a background by its name @name : String (The name of the background)
-
#search_call_messages(from_message_id : Int64 | Nil = nil, limit : Int32 | Nil = nil, only_missed : Bool | Nil = nil) : Messages
Searches for call messages.
-
#search_chat_members(chat_id : Int64 | Nil = nil, query : String | Nil = nil, limit : Int32 | Nil = nil, filter : TD::ChatMembersFilter | Nil = nil) : ChatMembers
Searches for a specified query in the first name, last name and username of the members of a specified chat.
-
#search_chat_messages(chat_id : Int64 | Nil = nil, query : String | Nil = nil, sender_id : TD::MessageSender | Nil = nil, from_message_id : Int64 | Nil = nil, offset : Int32 | Nil = nil, limit : Int32 | Nil = nil, filter : TD::SearchMessagesFilter | Nil = nil, message_thread_id : Int64 | Nil = nil) : Messages
Searches for messages with given words in the chat.
-
#search_chat_recent_location_messages(chat_id : Int64 | Nil = nil, limit : Int32 | Nil = nil) : Messages
Returns information about the recent locations of chat members that were sent to the chat.
-
#search_chats(query : String | Nil = nil, limit : Int32 | Nil = nil) : Chats
Searches for the specified query in the title and username of already known chats, this is an offline request.
-
#search_chats_nearby(location : TD::Location | Nil = nil) : ChatsNearby
Returns a list of users and location-based supergroups nearby.
-
#search_chats_on_server(query : String | Nil = nil, limit : Int32 | Nil = nil) : Chats
Searches for the specified query in the title and username of already known chats via request to the server.
-
#search_contacts(query : String | Nil = nil, limit : Int32 | Nil = nil) : Users
Searches for the specified query in the first names, last names and usernames of the known user contacts @query : String (Query to search for; may be empty to return all contacts) @limit : Int32 (The maximum number of users to be returned)
-
#search_emojis(text : String | Nil = nil, exact_match : Bool | Nil = nil, input_language_codes : Array(String) | Nil = nil) : Emojis
Searches for emojis by keywords.
-
#search_hashtags(prefix : String | Nil = nil, limit : Int32 | Nil = nil) : Hashtags
Searches for recently used hashtags by their prefix @prefix : String (Hashtag prefix to search for) @limit : Int32 (The maximum number of hashtags to be returned)
-
#search_installed_sticker_sets(is_masks : Bool | Nil = nil, query : String | Nil = nil, limit : Int32 | Nil = nil) : StickerSets
Searches for installed sticker sets by looking for specified query in their title and name @is_masks : Bool (Pass true to return mask sticker sets; pass false to return ordinary sticker sets) @query : String (Query to search for) @limit : Int32 (The maximum number of sticker sets to return)
-
#search_messages(chat_list : TD::ChatList | Nil = nil, query : String | Nil = nil, offset_date : Int32 | Nil = nil, offset_chat_id : Int64 | Nil = nil, offset_message_id : Int64 | Nil = nil, limit : Int32 | Nil = nil, filter : TD::SearchMessagesFilter | Nil = nil, min_date : Int32 | Nil = nil, max_date : Int32 | Nil = nil) : Messages
Searches for messages in all chats except secret chats.
-
#search_public_chat(username : String | Nil = nil) : Chat
Searches a public chat by its username.
-
#search_public_chats(query : String | Nil = nil) : Chats
Searches public chats by looking for specified query in their username and title.
-
#search_secret_messages(chat_id : Int64 | Nil = nil, query : String | Nil = nil, offset : String | Nil = nil, limit : Int32 | Nil = nil, filter : TD::SearchMessagesFilter | Nil = nil) : FoundMessages
Searches for messages in secret chats.
-
#search_sticker_set(name : String | Nil = nil) : StickerSet
Searches for a sticker set by its name @name : String (Name of the sticker set)
-
#search_sticker_sets(query : String | Nil = nil) : StickerSets
Searches for ordinary sticker sets by looking for specified query in their title and name.
-
#search_stickers(emoji : String | Nil = nil, limit : Int32 | Nil = nil) : Stickers
Searches for stickers from public sticker sets that correspond to a given emoji @emoji : String (String representation of emoji; must be non-empty) @limit : Int32 (The maximum number of stickers to be returned)
-
#send_bot_start_message(bot_user_id : Int64 | Nil = nil, chat_id : Int64 | Nil = nil, parameter : String | Nil = nil) : Message
Invites a bot to a chat (if it is not yet a member) and sends it the @bot_user_id : Int64 (Identifier of the bot) @chat_id : Int64 (Identifier of the target chat) @parameter : String (A hidden parameter sent to the bot for deep linking purposes (https:)
-
#send_call_debug_information(call_id : Int32 | Nil = nil, debug_information : String | Nil = nil) : Ok
Sends debug information for a call @call_id : Int32 (Call identifier) @debug_information : String (Debug information in application-specific format)
-
#send_call_rating(call_id : Int32 | Nil = nil, rating : Int32 | Nil = nil, comment : String | Nil = nil, problems : Array(TD::CallProblem) | Nil = nil) : Ok
Sends a call rating @call_id : Int32 (Call identifier) @rating : Int32 (Call rating; 1-5) @comment : String (An optional user comment if the rating is less than 5) @problems : Array(TD::CallProblem) (List of the exact types of problems with the call, specified by the user)
-
#send_call_signaling_data(call_id : Int32 | Nil = nil, data : String | Nil = nil) : Ok
Sends call signaling data @call_id : Int32 (Call identifier) @data : String (The data)
-
#send_chat_action(chat_id : Int64 | Nil = nil, message_thread_id : Int64 | Nil = nil, action : TD::ChatAction | Nil = nil) : Ok
Sends a notification about user activity in a chat @chat_id : Int64 (Chat identifier) @message_thread_id : Int64 (If not 0, a message thread identifier in which the action was performed) @action : TD::ChatAction (The action description; pass null to cancel the currently active action)
-
#send_chat_screenshot_taken_notification(chat_id : Int64 | Nil = nil) : Ok
Sends a notification about a screenshot taken in a chat.
-
#send_custom_request(method : String | Nil = nil, parameters : String | Nil = nil) : CustomRequestResult
Sends a custom request; for bots only @method : String (The method name) @parameters : String (JSON-serialized method parameters)
-
#send_email_address_verification_code(email_address : String | Nil = nil) : EmailAddressAuthenticationCodeInfo
Sends a code to verify an email address to be added to a user's Telegram Passport @email_address : String (Email address)
-
#send_inline_query_result_message(chat_id : Int64 | Nil = nil, message_thread_id : Int64 | Nil = nil, reply_to_message_id : Int64 | Nil = nil, options : TD::MessageSendOptions | Nil = nil, query_id : String | Nil = nil, result_id : String | Nil = nil, hide_via_bot : Bool | Nil = nil) : Message
Sends the result of an inline query as a message.
-
#send_message(chat_id : Int64 | Nil = nil, message_thread_id : Int64 | Nil = nil, reply_to_message_id : Int64 | Nil = nil, options : TD::MessageSendOptions | Nil = nil, reply_markup : TD::ReplyMarkup | Nil | Nil = nil, input_message_content : TD::InputMessageContent | Nil = nil) : Message
Sends a message.
-
#send_message_album(chat_id : Int64 | Nil = nil, message_thread_id : Int64 | Nil = nil, reply_to_message_id : Int64 | Nil = nil, options : TD::MessageSendOptions | Nil = nil, input_message_contents : Array(TD::InputMessageContent) | Nil = nil) : Messages
Sends 2-10 messages grouped together into an album.
-
#send_passport_authorization_form(autorization_form_id : Int32 | Nil = nil, types : Array(TD::PassportElementType) | Nil = nil) : Ok
Sends a Telegram Passport authorization form, effectively sharing data with the service.
-
#send_payment_form(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, payment_form_id : String | Nil = nil, order_info_id : String | Nil = nil, shipping_option_id : String | Nil | Nil = nil, credentials : TD::InputCredentials | Nil = nil, tip_amount : Int64 | Nil = nil) : PaymentResult
Sends a filled-out payment form to the bot for final verification @chat_id : Int64 (Chat identifier of the Invoice message) @message_id : Int64 (Message identifier) @payment_form_id : String (Payment form identifier returned by getPaymentForm) @order_info_id : String (Identifier returned by validateOrderInfo, or an empty string) @shipping_option_id : String? (Identifier of a chosen shipping option, if applicable) @credentials : TD::InputCredentials (The credentials chosen by user for payment) @tip_amount : Int64 (Chosen by the user amount of tip in the smallest units of the currency)
-
#send_phone_number_confirmation_code(hash : String | Nil = nil, phone_number : String | Nil = nil, settings : TD::PhoneNumberAuthenticationSettings | Nil = nil) : AuthenticationCodeInfo
Sends phone number confirmation code to handle links of the type internalLinkTypePhoneNumberConfirmation @hash : String (Hash value from the link) @phone_number : String (Phone number value from the link) @settings : TD::PhoneNumberAuthenticationSettings (Settings for the authentication of the user's phone number; pass null to use default settings)
-
#send_phone_number_verification_code(phone_number : String | Nil = nil, settings : TD::PhoneNumberAuthenticationSettings | Nil = nil) : AuthenticationCodeInfo
Sends a code to verify a phone number to be added to a user's Telegram Passport @phone_number : String (The phone number of the user, in international format) @settings : TD::PhoneNumberAuthenticationSettings (Settings for the authentication of the user's phone number; pass null to use default settings)
-
#set_account_ttl(ttl : TD::AccountTtl | Nil = nil) : Ok
Changes the period of inactivity after which the account of the current user will automatically be deleted @ttl : TD::AccountTtl (New account TTL)
-
#set_alarm(seconds : Float64 | Nil = nil) : Ok
Succeeds after a specified amount of time has passed.
-
#set_authentication_phone_number(phone_number : String | Nil = nil, settings : TD::PhoneNumberAuthenticationSettings | Nil = nil) : Ok
Sets the phone number of the user and sends an authentication code to the user.
-
#set_auto_download_settings(settings : TD::AutoDownloadSettings | Nil = nil, type : TD::NetworkType | Nil = nil) : Ok
Sets auto-download settings @settings : TD::AutoDownloadSettings (New user auto-download settings) @type : TD::NetworkType (Type of the network for which the new settings are relevant)
-
#set_background(background : TD::InputBackground | Nil = nil, type : TD::BackgroundType | Nil = nil, for_dark_theme : Bool | Nil = nil) : Background
Changes the background selected by the user; adds background to the list of installed backgrounds @background : TD::InputBackground (The input background to use; pass null to create a new filled backgrounds or to remove the current background) @type : TD::BackgroundType (Background type; pass null to use the default type of the remote background or to remove the current background) @for_dark_theme : Bool (True, if the background is chosen for dark theme)
-
#set_bio(bio : String | Nil = nil) : Ok
Changes the bio of the current user @bio : String (The new value of the user bio; 0-70 characters without line feeds)
-
#set_bot_updates_status(pending_update_count : Int32 | Nil = nil, error_message : String | Nil = nil) : Ok
Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only @pending_update_count : Int32 (The number of pending updates) @error_message : String (The last error message)
-
#set_chat_client_data(chat_id : Int64 | Nil = nil, client_data : String | Nil = nil) : Ok
Changes application-specific data associated with a chat @chat_id : Int64 (Chat identifier) @client_data : String (New value of client_data)
-
#set_chat_description(chat_id : Int64 | Nil = nil, description : String | Nil = nil) : Ok
Changes information about a chat.
-
#set_chat_discussion_group(chat_id : Int64 | Nil = nil, discussion_chat_id : Int64 | Nil = nil) : Ok
Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified @chat_id : Int64 (Identifier of the channel chat.
-
#set_chat_draft_message(chat_id : Int64 | Nil = nil, message_thread_id : Int64 | Nil = nil, draft_message : TD::DraftMessage | Nil = nil) : Ok
Changes the draft message in a chat @chat_id : Int64 (Chat identifier) @message_thread_id : Int64 (If not 0, a message thread identifier in which the draft was changed) @draft_message : TD::DraftMessage (New draft message; pass null to remove the draft)
-
#set_chat_location(chat_id : Int64 | Nil = nil, location : TD::ChatLocation | Nil = nil) : Ok
Changes the location of a chat.
-
#set_chat_member_status(chat_id : Int64 | Nil = nil, member_id : TD::MessageSender | Nil = nil, status : TD::ChatMemberStatus | Nil = nil) : Ok
Changes the status of a chat member, needs appropriate privileges.
-
#set_chat_message_sender(chat_id : Int64 | Nil = nil, message_sender_id : TD::MessageSender | Nil = nil) : Ok
Selects a message sender to send messages in a chat @chat_id : Int64 (Chat identifier) @message_sender_id : TD::MessageSender (New message sender for the chat)
-
#set_chat_message_ttl(chat_id : Int64 | Nil = nil, ttl : Int32 | Nil = nil) : Ok
Changes the message TTL in a chat.
-
#set_chat_notification_settings(chat_id : Int64 | Nil = nil, notification_settings : TD::ChatNotificationSettings | Nil = nil) : Ok
Changes the notification settings of a chat.
-
#set_chat_permissions(chat_id : Int64 | Nil = nil, permissions : TD::ChatPermissions | Nil = nil) : Ok
Changes the chat members permissions.
-
#set_chat_photo(chat_id : Int64 | Nil = nil, photo : TD::InputChatPhoto | Nil = nil) : Ok
Changes the photo of a chat.
-
#set_chat_slow_mode_delay(chat_id : Int64 | Nil = nil, slow_mode_delay : Int32 | Nil = nil) : Ok
Changes the slow mode delay of a chat.
-
#set_chat_theme(chat_id : Int64 | Nil = nil, theme_name : String | Nil = nil) : Ok
Changes the chat theme.
-
#set_chat_title(chat_id : Int64 | Nil = nil, title : String | Nil = nil) : Ok
Changes the chat title.
-
#set_commands(scope : TD::BotCommandScope | Nil = nil, language_code : String | Nil = nil, commands : Array(TD::BotCommand) | Nil = nil) : Ok
Sets the list of commands supported by the bot for the given user scope and language; for bots only @scope : TD::BotCommandScope (The scope to which the commands are relevant; pass null to change commands in the default bot command scope) @language_code : String (A two-letter ISO 639-1 country code.
-
#set_custom_language_pack(info : TD::LanguagePackInfo | Nil = nil, strings : Array(TD::LanguagePackString) | Nil = nil) : Ok
Adds or changes a custom local language pack to the current localization target @info : TD::LanguagePackInfo (Information about the language pack.
-
#set_custom_language_pack_string(language_pack_id : String | Nil = nil, new_string : TD::LanguagePackString | Nil = nil) : Ok
Adds, edits or deletes a string in a custom local language pack.
-
#set_database_encryption_key(new_encryption_key : String | Nil = nil) : Ok
Changes the database encryption key.
-
#set_file_generation_progress(generation_id : String | Nil = nil, expected_size : Int32 | Nil = nil, local_prefix_size : Int32 | Nil = nil) : Ok
Informs TDLib on a file generation progress @generation_id : String (The identifier of the generation process) @expected_size : Int32 (Expected size of the generated file, in bytes; 0 if unknown) @local_prefix_size : Int32 (The number of bytes already generated)
-
#set_game_score(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, edit_message : Bool | Nil = nil, user_id : Int64 | Nil = nil, score : Int32 | Nil = nil, force : Bool | Nil = nil) : Message
Updates the game score of the specified user in the game; for bots only @chat_id : Int64 (The chat to which the message with the game belongs) @message_id : Int64 (Identifier of the message) @edit_message : Bool (True, if the message needs to be edited) @user_id : Int64 (User identifier) @score : Int32 (The new score) @force : Bool (Pass true to update the score even if it decreases.
-
#set_group_call_participant_is_speaking(group_call_id : Int32 | Nil = nil, audio_source : Int32 | Nil = nil, is_speaking : Bool | Nil = nil) : Ok
Informs TDLib that speaking state of a participant of an active group has changed @group_call_id : Int32 (Group call identifier) @audio_source : Int32 (Group call participant's synchronization audio source identifier, or 0 for the current user) @is_speaking : Bool (True, if the user is speaking)
-
#set_group_call_participant_volume_level(group_call_id : Int32 | Nil = nil, participant_id : TD::MessageSender | Nil = nil, volume_level : Int32 | Nil = nil) : Ok
Changes volume level of a participant of an active group call.
-
#set_group_call_title(group_call_id : Int32 | Nil = nil, title : String | Nil = nil) : Ok
Sets group call title.
-
#set_inactive_session_ttl(inactive_session_ttl_days : Int32 | Nil = nil) : Ok
Changes the period of inactivity after which sessions will automatically be terminated @inactive_session_ttl_days : Int32 (New number of days of inactivity before sessions will be automatically terminated; 1-366 days)
-
#set_inline_game_score(inline_message_id : String | Nil = nil, edit_message : Bool | Nil = nil, user_id : Int64 | Nil = nil, score : Int32 | Nil = nil, force : Bool | Nil = nil) : Ok
Updates the game score of the specified user in a game; for bots only @inline_message_id : String (Inline message identifier) @edit_message : Bool (True, if the message needs to be edited) @user_id : Int64 (User identifier) @score : Int32 (The new score) @force : Bool (Pass true to update the score even if it decreases.
-
#set_location(location : TD::Location | Nil = nil) : Ok
Changes the location of the current user.
-
#set_log_stream(log_stream : TD::LogStream | Nil = nil) : Ok
Sets new log stream for internal logging of TDLib.
-
#set_log_tag_verbosity_level(tag : String | Nil = nil, new_verbosity_level : Int32 | Nil = nil) : Ok
Sets the verbosity level for a specified TDLib internal log tag.
-
#set_log_verbosity_level(new_verbosity_level : Int32 | Nil = nil) : Ok
Sets the verbosity level of the internal logging of TDLib.
-
#set_name(first_name : String | Nil = nil, last_name : String | Nil = nil) : Ok
Changes the first and last name of the current user @first_name : String (The new value of the first name for the current user; 1-64 characters) @last_name : String (The new value of the optional last name for the current user; 0-64 characters)
-
#set_network_type(type : TD::NetworkType | Nil = nil) : Ok
Sets the current network type.
-
#set_option(name : String | Nil = nil, value : TD::OptionValue | Nil = nil) : Ok
Sets the value of an option.
-
#set_passport_element(element : TD::InputPassportElement | Nil = nil, password : String | Nil = nil) : PassportElement
Adds an element to the user's Telegram Passport.
-
#set_passport_element_errors(user_id : Int64 | Nil = nil, errors : Array(TD::InputPassportElementError) | Nil = nil) : Ok
Informs the user that some of the elements in their Telegram Passport contain errors; for bots only.
-
#set_password(old_password : String | Nil = nil, new_password : String | Nil = nil, new_hint : String | Nil = nil, set_recovery_email_address : Bool | Nil = nil, new_recovery_email_address : String | Nil = nil) : PasswordState
Changes the password for the current user.
-
#set_pinned_chats(chat_list : TD::ChatList | Nil = nil, chat_ids : Array(Int64) | Nil = nil) : Ok
Changes the order of pinned chats @chat_list : TD::ChatList (Chat list in which to change the order of pinned chats) @chat_ids : Array(Int64) (The new list of pinned chats)
-
#set_poll_answer(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, option_ids : Array(Int32) | Nil = nil) : Ok
Changes the user answer to a poll.
-
#set_profile_photo(photo : TD::InputChatPhoto | Nil = nil) : Ok
Changes a profile photo for the current user @photo : TD::InputChatPhoto (Profile photo to set)
-
#set_recovery_email_address(password : String | Nil = nil, new_recovery_email_address : String | Nil = nil) : PasswordState
Changes the 2-step verification recovery email address of the user.
-
#set_scope_notification_settings(scope : TD::NotificationSettingsScope | Nil = nil, notification_settings : TD::ScopeNotificationSettings | Nil = nil) : Ok
Changes notification settings for chats of a given type @scope : TD::NotificationSettingsScope (Types of chats for which to change the notification settings) @notification_settings : TD::ScopeNotificationSettings (The new notification settings for the given scope)
-
#set_sticker_position_in_set(sticker : TD::InputFile | Nil = nil, position : Int32 | Nil = nil) : Ok
Changes the position of a sticker in the set to which it belongs; for bots only.
-
#set_sticker_set_thumbnail(user_id : Int64 | Nil = nil, name : String | Nil = nil, thumbnail : TD::InputFile | Nil = nil) : StickerSet
Sets a sticker set thumbnail; for bots only.
-
#set_supergroup_sticker_set(supergroup_id : Int64 | Nil = nil, sticker_set_id : String | Nil = nil) : Ok
Changes the sticker set of a supergroup; requires can_change_info administrator right @supergroup_id : Int64 (Identifier of the supergroup) @sticker_set_id : String (New value of the supergroup sticker set identifier.
-
#set_supergroup_username(supergroup_id : Int64 | Nil = nil, username : String | Nil = nil) : Ok
Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel @supergroup_id : Int64 (Identifier of the supergroup or channel) @username : String (New value of the username.
-
#set_tdlib_parameters(parameters : TD::TdlibParameters | Nil = nil) : Ok
Sets the parameters for TDLib initialization.
-
#set_user_privacy_setting_rules(setting : TD::UserPrivacySetting | Nil = nil, rules : TD::UserPrivacySettingRules | Nil = nil) : Ok
Changes user privacy settings @setting : TD::UserPrivacySetting (The privacy setting) @rules : TD::UserPrivacySettingRules (The new privacy rules)
-
#set_username(username : String | Nil = nil) : Ok
Changes the username of the current user @username : String (The new value of the username.
-
#set_video_chat_default_participant(chat_id : Int64 | Nil = nil, default_participant_id : TD::MessageSender | Nil = nil) : Ok
Changes default participant identifier, on whose behalf a video chat in the chat will be joined @chat_id : Int64 (Chat identifier) @default_participant_id : TD::MessageSender (Default group call participant identifier to join the video chats)
-
#share_phone_number(user_id : Int64 | Nil = nil) : Ok
Shares the phone number of the current user with a mutual contact.
-
#start_group_call_recording(group_call_id : Int32 | Nil = nil, title : String | Nil = nil, record_video : Bool | Nil = nil, use_portrait_orientation : Bool | Nil = nil) : Ok
Starts recording of an active group call.
-
#start_group_call_screen_sharing(group_call_id : Int32 | Nil = nil, audio_source_id : Int32 | Nil = nil, payload : String | Nil = nil) : Text
Starts screen sharing in a joined group call.
-
#start_scheduled_group_call(group_call_id : Int32 | Nil = nil) : Ok
Starts a scheduled group call @group_call_id : Int32 (Group call identifier)
-
#stop_poll(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, reply_markup : TD::ReplyMarkup | Nil | Nil = nil) : Ok
Stops a poll.
-
#synchronize_language_pack(language_pack_id : String | Nil = nil) : Ok
Fetches the latest versions of all strings from a language pack in the current localization target from the server.
-
#terminate_all_other_sessions : Ok
Terminates all other sessions of the current user
-
#terminate_session(session_id : String | Nil = nil) : Ok
Terminates a session of the current user @session_id : String (Session identifier)
-
#test_call_bytes(x : String | Nil = nil) : TestBytes
Returns the received bytes; for testing only.
-
#test_call_empty : Ok
Does nothing; for testing only.
-
#test_call_string(x : String | Nil = nil) : TestString
Returns the received string; for testing only.
-
#test_call_vector_int(x : Array(Int32) | Nil = nil) : TestVectorInt
Returns the received vector of numbers; for testing only.
-
#test_call_vector_int_object(x : Array(TD::TestInt) | Nil = nil) : TestVectorIntObject
Returns the received vector of objects containing a number; for testing only.
-
#test_call_vector_string(x : Array(String) | Nil = nil) : TestVectorString
Returns the received vector of strings; for testing only.
-
#test_call_vector_string_object(x : Array(TD::TestString) | Nil = nil) : TestVectorStringObject
Returns the received vector of objects containing a string; for testing only.
-
#test_get_difference : Ok
Forces an updates.getDifference call to the Telegram servers; for testing only
-
#test_network : Ok
Sends a simple network request to the Telegram servers; for testing only.
-
#test_proxy(server : String | Nil = nil, port : Int32 | Nil = nil, type : TD::ProxyType | Nil = nil, dc_id : Int32 | Nil = nil, timeout : Float64 | Nil = nil) : Ok
Sends a simple network request to the Telegram servers via proxy; for testing only.
-
#test_return_error(error : TD::Error | Nil = nil) : Error
Returns the specified error and ensures that the Error object is used; for testing only.
-
#test_square_int(x : Int32 | Nil = nil) : TestInt
Returns the squared received number; for testing only.
-
#test_use_update : Update
Does nothing and ensures that the Update object is used; for testing only.
-
#toggle_chat_default_disable_notification(chat_id : Int64 | Nil = nil, default_disable_notification : Bool | Nil = nil) : Ok
Changes the value of the default disable_notification parameter, used when a message is sent to a chat @chat_id : Int64 (Chat identifier) @default_disable_notification : Bool (New value of default_disable_notification)
-
#toggle_chat_has_protected_content(chat_id : Int64 | Nil = nil, has_protected_content : Bool | Nil = nil) : Ok
Changes the ability of users to save, forward, or copy chat content.
-
#toggle_chat_is_marked_as_unread(chat_id : Int64 | Nil = nil, is_marked_as_unread : Bool | Nil = nil) : Ok
Changes the marked as unread state of a chat @chat_id : Int64 (Chat identifier) @is_marked_as_unread : Bool (New value of is_marked_as_unread)
-
#toggle_chat_is_pinned(chat_list : TD::ChatList | Nil = nil, chat_id : Int64 | Nil = nil, is_pinned : Bool | Nil = nil) : Ok
Changes the pinned state of a chat.
-
#toggle_group_call_enabled_start_notification(group_call_id : Int32 | Nil = nil, enabled_start_notification : Bool | Nil = nil) : Ok
Toggles whether the current user will receive a notification when the group call will start; scheduled group calls only @group_call_id : Int32 (Group call identifier) @enabled_start_notification : Bool (New value of the enabled_start_notification setting)
-
#toggle_group_call_is_my_video_enabled(group_call_id : Int32 | Nil = nil, is_my_video_enabled : Bool | Nil = nil) : Ok
Toggles whether current user's video is enabled @group_call_id : Int32 (Group call identifier) @is_my_video_enabled : Bool (Pass true if the current user's video is enabled)
-
#toggle_group_call_is_my_video_paused(group_call_id : Int32 | Nil = nil, is_my_video_paused : Bool | Nil = nil) : Ok
Toggles whether current user's video is paused @group_call_id : Int32 (Group call identifier) @is_my_video_paused : Bool (Pass true if the current user's video is paused)
-
#toggle_group_call_mute_new_participants(group_call_id : Int32 | Nil = nil, mute_new_participants : Bool | Nil = nil) : Ok
Toggles whether new participants of a group call can be unmuted only by administrators of the group call.
-
#toggle_group_call_participant_is_hand_raised(group_call_id : Int32 | Nil = nil, participant_id : TD::MessageSender | Nil = nil, is_hand_raised : Bool | Nil = nil) : Ok
Toggles whether a group call participant hand is rased @group_call_id : Int32 (Group call identifier) @participant_id : TD::MessageSender (Participant identifier) @is_hand_raised : Bool (Pass true if the user's hand needs to be raised.
-
#toggle_group_call_participant_is_muted(group_call_id : Int32 | Nil = nil, participant_id : TD::MessageSender | Nil = nil, is_muted : Bool | Nil = nil) : Ok
Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves @group_call_id : Int32 (Group call identifier) @participant_id : TD::MessageSender (Participant identifier) @is_muted : Bool (Pass true if the user must be muted and false otherwise)
-
#toggle_group_call_screen_sharing_is_paused(group_call_id : Int32 | Nil = nil, is_paused : Bool | Nil = nil) : Ok
Pauses or unpauses screen sharing in a joined group call @group_call_id : Int32 (Group call identifier) @is_paused : Bool (True if screen sharing is paused)
-
#toggle_message_sender_is_blocked(sender_id : TD::MessageSender | Nil = nil, is_blocked : Bool | Nil = nil) : Ok
Changes the block state of a message sender.
-
#toggle_session_can_accept_calls(session_id : String | Nil = nil, can_accept_calls : Bool | Nil = nil) : Ok
Toggles whether a session can accept incoming calls @session_id : String (Session identifier) @can_accept_calls : Bool (True, if incoming calls can be accepted by the session)
-
#toggle_session_can_accept_secret_chats(session_id : String | Nil = nil, can_accept_secret_chats : Bool | Nil = nil) : Ok
Toggles whether a session can accept incoming secret chats @session_id : String (Session identifier) @can_accept_secret_chats : Bool (True, if incoming secret chats can be accepted by the session)
-
#toggle_supergroup_is_all_history_available(supergroup_id : Int64 | Nil = nil, is_all_history_available : Bool | Nil = nil) : Ok
Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right @supergroup_id : Int64 (The identifier of the supergroup) @is_all_history_available : Bool (The new value of is_all_history_available)
-
#toggle_supergroup_is_broadcast_group(supergroup_id : Int64 | Nil = nil) : Ok
Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup @supergroup_id : Int64 (Identifier of the supergroup)
-
#toggle_supergroup_sign_messages(supergroup_id : Int64 | Nil = nil, sign_messages : Bool | Nil = nil) : Ok
Toggles whether sender signature is added to sent messages in a channel; requires can_change_info administrator right @supergroup_id : Int64 (Identifier of the channel) @sign_messages : Bool (New value of sign_messages)
-
#transfer_chat_ownership(chat_id : Int64 | Nil = nil, user_id : Int64 | Nil = nil, password : String | Nil = nil) : Ok
Changes the owner of a chat.
-
#unpin_all_chat_messages(chat_id : Int64 | Nil = nil) : Ok
Removes all pinned messages from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @chat_id : Int64 (Identifier of the chat)
-
#unpin_chat_message(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil) : Ok
Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @chat_id : Int64 (Identifier of the chat) @message_id : Int64 (Identifier of the removed pinned message)
-
#upgrade_basic_group_chat_to_supergroup_chat(chat_id : Int64 | Nil = nil) : Chat
Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges.
-
#upload_file(file : TD::InputFile | Nil = nil, file_type : TD::FileType | Nil = nil, priority : Int32 | Nil = nil) : File
Asynchronously uploads a file to the cloud without sending it in a message.
-
#upload_sticker_file(user_id : Int64 | Nil = nil, sticker : TD::InputSticker | Nil = nil) : File
Uploads a file with a sticker; returns the uploaded file @user_id : Int64 (Sticker file owner; ignored for regular users) @sticker : TD::InputSticker (Sticker file to upload)
-
#validate_order_info(chat_id : Int64 | Nil = nil, message_id : Int64 | Nil = nil, order_info : TD::OrderInfo | Nil = nil, allow_save : Bool | Nil = nil) : ValidatedOrderInfo
Validates the order information provided by a user and returns the available shipping options for a flexible invoice @chat_id : Int64 (Chat identifier of the Invoice message) @message_id : Int64 (Message identifier) @order_info : TD::OrderInfo (The order information, provided by the user; pass null if empty) @allow_save : Bool (True, if the order information can be saved)
-
#view_messages(chat_id : Int64 | Nil = nil, message_thread_id : Int64 | Nil = nil, message_ids : Array(Int64) | Nil = nil, force_read : Bool | Nil = nil) : Ok
Informs TDLib that messages are being viewed by the user.
-
#view_trending_sticker_sets(sticker_set_ids : Array(String) | Nil = nil) : Ok
Informs the server that some trending sticker sets have been viewed by the user @sticker_set_ids : Array(String) (Identifiers of viewed trending sticker sets)
-
#write_generated_file_part(generation_id : String | Nil = nil, offset : Int32 | Nil = nil, data : String | Nil = nil) : Ok
Writes a part of a generated file.
Instance Method Detail
Accepts an incoming call @call_id : Int32 (Call identifier) @protocol : TD::CallProtocol (The call protocols supported by the application)
Accepts Telegram terms of services @terms_of_service_id : String (Terms of service identifier)
Adds a new member to a chat. Members can't be added to private or secret chats @chat_id : Int64 (Chat identifier) @user_id : Int64 (Identifier of the user) @forward_limit : Int32 (The number of earlier messages from the chat to be forwarded to the new member; up to 100. Ignored for supergroups and channels, or if the added user is a bot)
Adds multiple new members to a chat. Currently, this method is only available for supergroups and channels. This method can't be used to join a chat. Members can't be added to a channel if it has more than 200 members @chat_id : Int64 (Chat identifier) @user_ids : Array(Int64) (Identifiers of the users to be added to the chat. The maximum number of added users is 20 for supergroups and 100 for channels)
Adds a chat to a chat list. A chat can't be simultaneously in Main and Archive chat lists, so it is automatically removed from another one if needed @chat_id : Int64 (Chat identifier) @chat_list : TD::ChatList (The chat list. Use getChatListsToAddChat to get suitable chat lists)
Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization @language_pack_id : String (Identifier of a language pack to be added; may be different from a name that is used in an "https:)
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 @sticker : TD::InputFile (Sticker file to add)
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 @chat_id : Int64 (Target chat) @sender_id : TD::MessageSender (Identifier of the sender of the message) @reply_to_message_id : Int64 (Identifier of the message to reply to or 0) @disable_notification : Bool (Pass true to disable notification for the message) @input_message_content : TD::InputMessageContent (The content of the message to be added)
Adds a message to TDLib internal log. Can be called synchronously @verbosity_level : Int32 (The minimum verbosity level needed for the message to be logged; 0-1023) @text : String (Text of a message to log)
Adds the specified data to data usage statistics. Can be called before authorization @entry : TD::NetworkStatisticsEntry (The network statistics entry with the data to be added to statistics)
Adds a proxy server for network requests. Can be called before authorization @server : String (Proxy server IP address) @port : Int32 (Proxy server port) @enable : Bool (True, if the proxy needs to be enabled) @type : TD::ProxyType (Proxy type)
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 @is_attached : Bool (Pass true to add the sticker to the list of stickers recently attached to photo or video files; pass false to add the sticker to the list of recently sent stickers) @sticker : TD::InputFile (Sticker file to add)
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 @chat_id : Int64 (Identifier of the chat to add)
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 @animation : TD::InputFile (The animation file to be added. Only animations known to the server (i.e., successfully sent via a message) can be added to the list)
Adds a new sticker to a set; for bots only. Returns the sticker set @user_id : Int64 (Sticker set owner) @name : String (Sticker set name) @sticker : TD::InputSticker (Sticker to add to the set)
Sets the result of a callback query; for bots only @callback_query_id : String (Identifier of the callback query) @text : String (Text of the answer) @show_alert : Bool (If true, an alert must be shown to the user instead of a toast notification) @url : String (URL to be opened) @cache_time : Int32 (Time during which the result of the query can be cached, in seconds)
Answers a custom query; for bots only @custom_query_id : String (Identifier of a custom query) @data : String (JSON-serialized answer to the query)
Sets the result of an inline query; for bots only @inline_query_id : String (Identifier of the inline query) @is_personal : Bool (True, if the result of the query can be cached for the specified user) @results : Array(TD::InputInlineQueryResult) (The results of the query) @cache_time : Int32 (Allowed time to cache the results of the query, in seconds) @next_offset : String (Offset for the next inline query; pass an empty string if there are no more results) @switch_pm_text : String (If non-empty, this text must be shown on the button that opens a private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter) @switch_pm_parameter : String (The parameter for the bot start message)
Sets the result of a pre-checkout query; for bots only @pre_checkout_query_id : String (Identifier of the pre-checkout query) @error_message : String (An error message, empty on success)
Sets the result of a shipping query; for bots only @shipping_query_id : String (Identifier of the shipping query) @shipping_options : Array(TD::ShippingOption) (Available shipping options) @error_message : String (An error message, empty on success)
Bans a member in a chat. Members can't be banned in private or secret chats. In supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first @chat_id : Int64 (Chat identifier) @member_id : TD::MessageSender (Member identifier) @banned_until_date : Int32 (Point in time (Unix timestamp) when the user will be unbanned; 0 if never. If the user is banned for more than 366 days or for less than 30 seconds from the current time, the user is considered to be banned forever. Ignored in basic groups and if a chat is banned) @revoke_messages : Bool (Pass true to delete all messages in the chat for the user that is being removed. Always true for supergroups and channels)
Blocks an original sender of a message in the Replies chat @message_id : Int64 (The identifier of an incoming message in the Replies chat) @delete_message : Bool (Pass true if the message must be deleted) @delete_all_messages : Bool (Pass true if all messages from the same sender must be deleted) @report_spam : Bool (Pass true if the sender must be reported to the Telegram moderators)
Checks whether the current session can be used to transfer a chat ownership to another user
Stops the downloading of a file. If a file has already been downloaded, does nothing @file_id : Int32 (Identifier of a file to stop downloading) @only_if_pending : Bool (Pass true to stop downloading only if it hasn't been started, i.e. request hasn't been sent to server)
Cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date
Stops the uploading of a file. Supported only for files uploaded by using uploadFile. For other files the behavior is undefined @file_id : Int32 (Identifier of the file to stop uploading)
Changes imported contacts using the list of contacts saved on the device. Imports newly added contacts and, if at least the file database is enabled, deletes recently deleted contacts.Query result depends on the result of the previous query, so only one query is possible at the same time @contacts : Array(TD::Contact) (The new list of contacts, contact's vCard are ignored and are not imported)
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 @phone_number : String (The new phone number of the user in international format) @settings : TD::PhoneNumberAuthenticationSettings (Settings for the authentication of the user's phone number; pass null to use default settings)
Installs @set_id : String (Identifier of the sticker set) @is_installed : Bool (The new value of is_installed) @is_archived : Bool (The new value of is_archived. A sticker set can't be installed and archived simultaneously)
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 @token : String (The bot token)
Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode @code : String (Authentication code to check)
Checks the authentication password for correctness. Works only when the current authorization state is authorizationStateWaitPassword @password : String (The password to check)
Checks whether a password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword @recovery_code : String (Recovery code to check)
Checks the authentication code sent to confirm a new phone number of the user @code : String (Authentication code to check)
Checks the validity of an invite link for a chat and returns information about the corresponding chat @invite_link : String (Invite link to be checked)
Checks whether a username can be set for a chat @chat_id : Int64 (Chat identifier; must be identifier of a supergroup chat, or a channel chat, or a private chat with self, or zero if the chat is being created) @username : String (Username to be checked)
Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached @type : TD::PublicChatType (Type of the public chats, for which to check the limit)
Checks the database encryption key for correctness. Works only when the current authorization state is authorizationStateWaitEncryptionKey @encryption_key : String (Encryption key to check or set up)
Checks the email address verification code for Telegram Passport @code : String (Verification code to check)
Checks whether a 2-step verification password recovery code sent to an email address is valid @recovery_code : String (Recovery code to check)
Checks phone number confirmation code @code : String (Confirmation code to check)
Checks the phone number verification code for Telegram Passport @code : String (Verification code to check)
Checks the 2-step verification recovery email address verification code @code : String (Verification code to check)
Checks whether a name can be used for a new sticker set @name : String (Name to be checked)
Removes potentially dangerous characters from the name of a file. The encoding of the file name is supposed to be UTF-8. Returns an empty string on failure. Can be called synchronously @file_name : String (File name or path to the file)
Clears draft messages in all chats @exclude_secret_chats : Bool (If true, local draft messages in secret chats will not be cleared)
Clears all imported contacts, contact list remains unchanged
Clears the list of recently used stickers @is_attached : Bool (Pass true to clear the list of stickers recently attached to photo or video files; pass false to clear the list of recently sent stickers)
Informs TDLib that a message with an animated emoji was clicked by the user. Returns a big animated sticker to be played or a 404 error if usual animation needs to be played @chat_id : Int64 (Chat identifier of the message) @message_id : Int64 (Identifier of the clicked message)
Closes the TDLib instance. All databases will be flushed to disk and properly closed. After the close completes, updateAuthorizationState with authorizationStateClosed will be sent. Can be called before initialization
Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed @chat_id : Int64 (Chat identifier)
Closes a secret chat, effectively transferring its state to secretChatStateClosed @secret_chat_id : Int32 (Secret chat identifier)
Confirms QR code authentication on another device. Returns created session on success @link : String (A link from a QR code. The link must be scanned by the in-app camera)
Returns an existing chat corresponding to a known basic group @basic_group_id : Int64 (Basic group identifier) @force : Bool (If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect)
Creates a new call @user_id : Int64 (Identifier of the user to be called) @protocol : TD::CallProtocol (The call protocols supported by the application) @is_video : Bool (True, if a video call needs to be created)
Creates new chat filter. Returns information about the created chat filter @filter : TD::ChatFilter (Chat filter)
Creates a new invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat @chat_id : Int64 (Chat identifier) @name : String (Invite link name; 0-32 characters) @expiration_date : Int32 (Point in time (Unix timestamp) when the link will expire; pass 0 if never) @member_limit : Int32 (The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited) @creates_join_request : Bool (True, if the link only creates join request. If true, member_limit must not be specified)
Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns the newly created chat @user_ids : Array(Int64) (Identifiers of users to be added to the basic group) @title : String (Title of the new basic group; 1-128 characters)
Creates a new secret chat. Returns the newly created chat @user_id : Int64 (Identifier of the target user)
Creates a new sticker set. Returns the newly created sticker set @user_id : Int64 (Sticker set owner; ignored for regular users) @title : String (Sticker set title; 1-64 characters) @name : String (Sticker set name. Can contain only English letters, digits and underscores. Must end with) @is_masks : Bool (True, if stickers are masks. Animated stickers can't be masks) @stickers : Array(TD::InputSticker) (List of stickers to be added to the set; must be non-empty. All stickers must be of the same type. For animated stickers, uploadStickerFile must be used before the sticker is shown) @source : String (Source of the sticker set; may be empty if unknown)
Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat @title : String (Title of the new chat; 1-128 characters) @is_channel : Bool (True, if a channel chat needs to be created) @description : String (Chat description; 0-255 characters) @location : TD::ChatLocation (Chat location if a location-based supergroup is being created; pass null to create an ordinary supergroup chat) @for_import : Bool (True, if the supergroup is created for importing messages using importMessage)
Returns an existing chat corresponding to a given user @user_id : Int64 (User identifier) @force : Bool (If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect)
Returns an existing chat corresponding to a known secret chat @secret_chat_id : Int32 (Secret chat identifier)
Returns an existing chat corresponding to a known supergroup or channel @supergroup_id : Int64 (Supergroup or channel identifier) @force : Bool (If true, the chat will be created without network request. In this case all information about the chat except its type, title and photo can be incorrect)
Creates a new temporary password for processing payments @password : String (Persistent user password) @valid_for : Int32 (Time during which the temporary password will be valid, in seconds; must be between 60 and 86400)
Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats rights @chat_id : Int64 (Chat identifier, in which the video chat will be created) @title : String (Group call title; if empty, chat title will be used) @start_date : Int32 (Point in time (Unix timestamp) when the group call is supposed to be started by an administrator; 0 to start the video chat immediately. The date must be at least 10 seconds and at most 8 days in the future)
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 @reason : String (The reason why the account was deleted; optional)
Deletes all call messages @revoke : Bool (Pass true to delete the messages for all users)
Deletes all revoked chat invite links created by a given chat administrator. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id : Int64 (Chat identifier) @creator_user_id : Int64 (User identifier of a chat administrator, which links will be deleted. Must be an identifier of the current user for non-owner)
Deletes a chat along with all messages in the corresponding chat for all chat members; requires owner privileges. For group chats this will release the username and remove all members. Chats with more than 1000 members can't be deleted using this method @chat_id : Int64 (Chat identifier)
Deletes existing chat filter @chat_filter_id : Int32 (Chat filter identifier)
Deletes all messages in the chat. Use chat.can_be_deleted_only_for_self and chat.can_be_deleted_for_all_users fields to find whether and how the method can be applied to the chat @chat_id : Int64 (Chat identifier) @remove_from_chat_list : Bool (Pass true if the chat needs to be removed from the chat list) @revoke : Bool (Pass true to delete chat history for all users)
Deletes all messages between the specified dates in a chat. Supported only for private chats and basic groups. Messages sent in the last 30 seconds will not be deleted @chat_id : Int64 (Chat identifier) @min_date : Int32 (The minimum date of the messages to delete) @max_date : Int32 (The maximum date of the messages to delete) @revoke : Bool (Pass true to delete chat messages for all users; private chats only)
Deletes all messages sent by the specified message sender in a chat. Supported only for supergroups; requires can_delete_messages administrator privileges @chat_id : Int64 (Chat identifier) @sender_id : TD::MessageSender (Identifier of the sender of messages to delete)
Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a ForceReply reply markup has been used. UpdateChatReplyMarkup will be sent if the reply markup is changed @chat_id : Int64 (Chat identifier) @message_id : Int64 (The message identifier of the used keyboard)
Deletes commands supported by the bot for the given user scope and language; for bots only @scope : TD::BotCommandScope (The scope to which the commands are relevant; pass null to delete commands in the default bot command scope) @language_code : String (A two-letter ISO 639-1 country code or an empty string)
Deletes a file from the TDLib file cache @file_id : Int32 (Identifier of the file to delete)
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 @language_pack_id : String (Identifier of the language pack to delete)
Deletes messages @chat_id : Int64 (Chat identifier) @message_ids : Array(Int64) (Identifiers of the messages to be deleted) @revoke : Bool (Pass true to delete messages for all chat members. Always true for supergroups, channels and secret chats)
Deletes a Telegram Passport element @type : TD::PassportElementType (Element type)
Deletes a profile photo @profile_photo_id : String (Identifier of the profile photo to delete)
Deletes revoked chat invite links. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id : Int64 (Chat identifier) @invite_link : String (Invite link to revoke)
Deletes saved credentials for all payment provider bots
Closes the TDLib instance, destroying all local data without a proper logout. The current user session will remain in the list of all active sessions. All local data will be destroyed. After the destruction completes updateAuthorizationState with authorizationStateClosed will be sent. Can be called before authorization
Disables the currently enabled proxy. Can be called before authorization
Discards a call @call_id : Int32 (Call identifier) @is_disconnected : Bool (True, if the user was disconnected) @duration : Int32 (The call duration, in seconds) @is_video : Bool (True, if the call was a video call) @connection_id : String (Identifier of the connection used during the call)
Disconnects all websites from the current user's Telegram account
Disconnects website from the current user's Telegram account @website_id : String (Website identifier)
Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates @file_id : Int32 (Identifier of the file to download) @priority : Int32 (Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile was called will be downloaded first) @offset : Int32 (The starting position from which the file needs to be downloaded) @limit : Int32 (Number of bytes which need to be downloaded starting from the "offset" position before the download will automatically be canceled; use 0 to download without a limit) @synchronous : Bool (If false, this request returns file state just after the download has been started. If true, this request returns file state only afterthe download has succeeded, has failed, has been canceled or a new downloadFile request with different offset)
Edits existing chat filter. Returns information about the edited chat filter @chat_filter_id : Int32 (Chat filter identifier) @filter : TD::ChatFilter (The edited chat filter)
Edits a non-primary invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id : Int64 (Chat identifier) @invite_link : String (Invite link to be edited) @name : String (Invite link name; 0-32 characters) @expiration_date : Int32 (Point in time (Unix timestamp) when the link will expire; pass 0 if never) @member_limit : Int32 (The maximum number of chat members that can join the chat via the link simultaneously; 0-99999; pass 0 if not limited) @creates_join_request : Bool (True, if the link only creates join request. If true, member_limit must not be specified)
Edits information about a custom local language pack in the current localization target. Can be called before authorization @info : TD::LanguagePackInfo (New information about the custom local language pack)
Edits the caption of an inline message sent via a bot; for bots only @inline_message_id : String (Inline message identifier) @reply_markup : TD::ReplyMarkup (The new message reply markup; pass null if none) @caption : TD::FormattedText (New message content caption; pass null to remove caption; 0-GetOption("message_caption_length_max") characters)
Edits the content of a live location in an inline message sent via a bot; for bots only @inline_message_id : String (Inline message identifier) @reply_markup : TD::ReplyMarkup (The new message reply markup; pass null if none) @location : TD::Location (New location content of the message; pass null to stop sharing the live location) @heading : Int32 (The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown) @proximity_alert_radius : Int32 (The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled)
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 @inline_message_id : String (Inline message identifier) @reply_markup : TD::ReplyMarkup? (The new message reply markup; pass null if none; for bots only) @input_message_content : TD::InputMessageContent (New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo)
Edits the reply markup of an inline message sent via a bot; for bots only @inline_message_id : String (Inline message identifier) @reply_markup : TD::ReplyMarkup (The new message reply markup; pass null if none)
Edits the text of an inline text or game message sent via a bot; for bots only @inline_message_id : String (Inline message identifier) @reply_markup : TD::ReplyMarkup (The new message reply markup; pass null if none) @input_message_content : TD::InputMessageContent (New text content of the message. Must be of type inputMessageText)
Edits the message content caption. Returns the edited message after the edit is completed on the server side @chat_id : Int64 (The chat the message belongs to) @message_id : Int64 (Identifier of the message) @reply_markup : TD::ReplyMarkup? (The new message reply markup; pass null if none; for bots only) @caption : TD::FormattedText (New message content caption; 0-GetOption("message_caption_length_max") characters; pass null to remove caption)
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 @chat_id : Int64 (The chat the message belongs to) @message_id : Int64 (Identifier of the message) @reply_markup : TD::ReplyMarkup? (The new message reply markup; pass null if none; for bots only) @location : TD::Location (New location content of the message; pass null to stop sharing the live location) @heading : Int32 (The new direction in which the location moves, in degrees; 1-360. Pass 0 if unknown) @proximity_alert_radius : Int32 (The new maximum distance for proximity alerts, in meters (0-100000). Pass 0 if the notification is disabled)
Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead.The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side @chat_id : Int64 (The chat the message belongs to) @message_id : Int64 (Identifier of the message) @reply_markup : TD::ReplyMarkup? (The new message reply markup; pass null if none; for bots only) @input_message_content : TD::InputMessageContent (New content of the message. Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument, inputMessagePhoto or inputMessageVideo)
Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side @chat_id : Int64 (The chat the message belongs to) @message_id : Int64 (Identifier of the message) @reply_markup : TD::ReplyMarkup (The new message reply markup; pass null if none)
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 @chat_id : Int64 (The chat the message belongs to) @message_id : Int64 (Identifier of the message) @scheduling_state : TD::MessageSchedulingState (The new message scheduling state; pass null to send the message immediately)
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 @chat_id : Int64 (The chat the message belongs to) @message_id : Int64 (Identifier of the message) @reply_markup : TD::ReplyMarkup? (The new message reply markup; pass null if none; for bots only) @input_message_content : TD::InputMessageContent (New text content of the message. Must be of type inputMessageText)
Edits an existing proxy server for network requests. Can be called before authorization @proxy_id : Int32 (Proxy identifier) @server : String (Proxy server IP address) @port : Int32 (Proxy server port) @enable : Bool (True, if the proxy needs to be enabled) @type : TD::ProxyType (Proxy type)
Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization @proxy_id : Int32 (Proxy identifier)
Ends a group call. Requires groupCall.can_be_managed @group_call_id : Int32 (Group call identifier)
Ends recording of an active group call. Requires groupCall.can_be_managed group call flag @group_call_id : Int32 (Group call identifier)
Ends screen sharing in a joined group call @group_call_id : Int32 (Group call identifier)
Finishes the file generation @generation_id : String (The identifier of the generation process) @error : TD::Error (If passed, the file generation has failed and must be terminated; pass null if the file generation succeeded)
Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message @chat_id : Int64 (Identifier of the chat to which to forward messages) @from_chat_id : Int64 (Identifier of the chat from which to forward messages) @message_ids : Array(Int64) (Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously) @options : TD::MessageSendOptions (Options to be used to send the messages; pass null to use default options) @send_copy : Bool (If true, content of the messages will be copied without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local) @remove_caption : Bool (If true, media caption of message copies will be removed. Ignored if send_copy is false) @only_preview : Bool (If true, messages will not be forwarded and instead fake messages will be returned)
Returns the period of inactivity after which the account of the current user will automatically be deleted
Returns all active live locations that need to be updated by the application. The list is persistent across application restarts only if the message database is used
Returns all available Telegram Passport elements @password : String (Password of the current user)
Returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji @emoji : String (The emoji)
Returns application config, provided by the server. Can be called before authorization
Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram
Returns a list of archived sticker sets @is_masks : Bool (Pass true to return mask stickers sets; pass false to return ordinary sticker sets) @offset_sticker_set_id : String (Identifier of the sticker set from which to return the result) @limit : Int32 (The maximum number of sticker sets to return; up to 100)
Returns a list of sticker sets attached to a file. Currently, only photos and videos can have attached sticker sets @file_id : Int32 (File identifier)
Returns the current authorization state; this is an offline request. For informational purposes only. Use updateAuthorizationState instead to maintain the current authorization state. Can be called before initialization
Returns auto-download settings presets for the current user
Constructs a persistent HTTP URL for a background @name : String (Background name) @type : TD::BackgroundType (Background type)
Returns backgrounds installed by the user @for_dark_theme : Bool (True, if the backgrounds must be ordered for dark theme)
Returns information about a bank card @bank_card_number : String (The bank card number)
Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot @basic_group_id : Int64 (Basic group identifier)
Returns full information about a basic group by its identifier @basic_group_id : Int64 (Basic group identifier)
Returns users and chats that were blocked by the current user @offset : Int32 (Number of users and chats to skip in the result; must be non-negative) @limit : Int32 (The maximum number of users and chats to return; up to 100)
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 @chat_id : Int64 (Identifier of the chat with the message) @message_id : Int64 (Identifier of the message from which the query originated) @payload : TD::CallbackQueryPayload (Query payload)
Returns information about a message with the callback button that originated a callback query; for bots only @chat_id : Int64 (Identifier of the chat the message belongs to) @message_id : Int64 (Message identifier) @callback_query_id : String (Identifier of the callback query)
Returns information about a chat by its identifier, this is an offline request if the current user is not a bot @chat_id : Int64 (Chat identifier)
Returns a list of administrators of the chat with their custom titles @chat_id : Int64 (Chat identifier)
Returns list of message sender identifiers, which can be used to send messages in a chat @chat_id : Int64 (Chat identifier)
Returns a list of service actions taken by chat members and administrators in the last 48 hours. Available only for supergroups and channels. Requires administrator rights. Returns results in reverse chronological order (i. e., in order of decreasing event_id) @chat_id : Int64 (Chat identifier) @query : String (Search query by which to filter events) @from_event_id : String (Identifier of an event from which to return results. Use 0 to get results from the latest events) @limit : Int32 (The maximum number of events to return; up to 100) @filters : TD::ChatEventLogFilters (The types of events to return; pass null to get chat events of all types) @user_ids : Array(Int64) (User identifiers by which to filter events. By default, events relating to all users will be returned)
Returns information about a chat filter by its identifier @chat_filter_id : Int32 (Chat filter identifier)
Returns default icon name for a filter. Can be called synchronously @filter : TD::ChatFilter (Chat filter)
Returns messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id).For optimal performance, the number of returned messages is chosen by TDLib. This is an offline request if only_local is true @chat_id : Int64 (Chat identifier) @from_message_id : Int64 (Identifier of the message starting from which history must be fetched; use 0 to get results from the last message) @offset : Int32 (Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally some newer messages) @limit : Int32 (The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit) @only_local : Bool (If true, returns only messages that are available locally without sending network requests)
Returns information about an invite link. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links @chat_id : Int64 (Chat identifier) @invite_link : String (Invite link to get)
Returns list of chat administrators with number of their invite links. Requires owner privileges in the chat @chat_id : Int64 (Chat identifier)
Returns chat members joined a chat via an invite link. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links @chat_id : Int64 (Chat identifier) @invite_link : String (Invite link for which to return chat members) @offset_member : TD::ChatInviteLinkMember (A chat member from which to return next chat members; pass null to get results from the beginning) @limit : Int32 (The maximum number of chat members to return; up to 100)
Returns invite links for a chat created by specified administrator. Requires administrator privileges and can_invite_users right in the chat to get own links and owner privileges to get other links @chat_id : Int64 (Chat identifier) @creator_user_id : Int64 (User identifier of a chat administrator. Must be an identifier of the current user for non-owner) @is_revoked : Bool (Pass true if revoked links needs to be returned instead of active or expired) @offset_date : Int32 (Creation date of an invite link starting after which to return invite links; use 0 to get results from the beginning) @offset_invite_link : String (Invite link starting after which to return invite links; use empty string to get results from the beginning) @limit : Int32 (The maximum number of invite links to return; up to 100)
Returns pending join requests in a chat @chat_id : Int64 (Chat identifier) @invite_link : String (Invite link for which to return join requests. If empty, all join requests will be returned. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links) @query : String (A query to search for in the first names, last names and usernames of the users to return) @offset_request : TD::ChatJoinRequest (A chat join request from which to return next requests; pass null to get results from the beginning) @limit : Int32 (The maximum number of requests to join the chat to return)
Returns chat lists to which the chat can be added. This is an offline request @chat_id : Int64 (Chat identifier)
Returns information about a single member of a chat @chat_id : Int64 (Chat identifier) @member_id : TD::MessageSender (Member identifier)
Returns the last message sent in a chat no later than the specified date @chat_id : Int64 (Chat identifier) @date : Int32 (Point in time (Unix timestamp) relative to which to search for messages)
Returns information about the next messages of the specified type in the chat split by days. Returns the results in reverse chronological order. Can return partial result for the last returned day. Behavior of this method depends on the value of the option "utc_time_offset" @chat_id : Int64 (Identifier of the chat in which to return information about messages) @filter : TD::SearchMessagesFilter (Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention and searchMessagesFilterUnreadMention are unsupported in this function) @from_message_id : Int64 (The message identifier from which to return information about messages; use 0 to get results from the last message)
Returns approximate number of messages of the specified type in the chat @chat_id : Int64 (Identifier of the chat in which to count messages) @filter : TD::SearchMessagesFilter (Filter for message content; searchMessagesFilterEmpty is unsupported in this function) @return_local : Bool (If true, returns count that is available locally without sending network requests, returning -1 if the number of messages is unknown)
Returns list of chats with non-default notification settings @scope : TD::NotificationSettingsScope (If specified, only chats from the scope will be returned; pass null to return chats from all scopes) @compare_sound : Bool (If true, also chats with non-default sound will be returned)
Returns information about a newest pinned message in the chat @chat_id : Int64 (Identifier of the chat the message belongs to)
Returns all scheduled messages in a chat. The messages are returned in a reverse chronological order (i.e., in order of decreasing message_id) @chat_id : Int64 (Chat identifier)
Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing message_id).Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database @chat_id : Int64 (Identifier of the chat in which to return information about message positions) @filter : TD::SearchMessagesFilter (Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterMention and searchMessagesFilterUnreadMention are unsupported in this function) @from_message_id : Int64 (The message identifier from which to return information about message positions) @limit : Int32 (The expected number of message positions to be returned; 50-2000. A smaller number of positions can be returned, if there are not enough appropriate messages)
Returns sponsored message to be shown in a chat; for channel chats only. Returns a 404 error if there is no sponsored message in the chat @chat_id : Int64 (Identifier of the chat)
Returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics @chat_id : Int64 (Chat identifier) @is_dark : Bool (Pass true if a dark theme is used by the application)
Returns an ordered list of chats from the beginning of a chat list. For informational purposes only. Use loadChats and updates processing instead to maintain chat lists in a consistent state @chat_list : TD::ChatList (The chat list in which to return chats; pass null to get chats from the main chat list) @limit : Int32 (The maximum number of chats to be returned)
Returns the list of commands supported by the bot for the given user scope and language; for bots only @scope : TD::BotCommandScope (The scope to which the commands are relevant; pass null to get commands in the default bot command scope) @language_code : String (A two-letter ISO 639-1 country code or an empty string)
Returns all website where the current user used Telegram to log in
Returns information about existing countries. Can be called before authorization
Uses the current IP address to find the current country. Returns two-letter ISO 3166-1 alpha-2 country code. Can be called before authorization
Returns a list of public chats of the specified type, owned by the user @type : TD::PublicChatType (Type of the public chats to return)
Returns all updates needed to restore current TDLib state, i.e. all actual UpdateAuthorizationState
Returns information about a tg: @link : String (The link)
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 @language_code : String (Language code for which the emoji replacements will be suggested)
Returns an HTTP URL which can be used to automatically authorize the current user on a website after clicking an HTTP link. Use the method getExternalLinkInfo to find whether a prior user confirmation is needed @link : String (The HTTP link) @allow_write_access : Bool (True, if the current user allowed the bot, returned in getExternalLinkInfo, to send them messages)
Returns information about an action to be done when the current user clicks an external link. Don't use this method for links from secret chats if web page preview is disabled in secret chats @link : String (The link)
Returns information about a file; this is an offline request @file_id : Int32 (Identifier of the file to get)
Returns file downloaded prefix size from a given offset, in bytes @file_id : Int32 (Identifier of the file) @offset : Int32 (Offset from which downloaded prefix size needs to be calculated)
Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously @mime_type : String (The MIME type of the file)
Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously @file_name : String (The name of the file or path to the file)
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 @chat_id : Int64 (The chat that contains the message with the game) @message_id : Int64 (Identifier of the message) @user_id : Int64 (User identifier)
Returns information about a group call @group_call_id : Int32 (Group call identifier)
Returns invite link to a video chat in a public chat @group_call_id : Int32 (Group call identifier) @can_self_unmute : Bool (Pass true if the invite link needs to contain an invite hash, passing which to joinGroupCall would allow the invited user to unmute themselves. Requires groupCall.can_be_managed group call flag)
Returns a file with a segment of a group call stream in a modified OGG format for audio or MPEG-4 format for video @group_call_id : Int32 (Group call identifier) @time_offset : Int64 (Point in time when the stream segment begins; Unix timestamp in milliseconds) @scale : Int32 (Segment duration scale; 0-1. Segment's duration is 1000) @channel_id : Int32 (Identifier of an audio) @video_quality : TD::GroupCallVideoQuality (Video quality as received from tgcalls; pass null to get the worst available quality)
Returns a list of common group chats with a given user. Chats are sorted by their type and creation date @user_id : Int64 (User identifier) @offset_chat_id : Int64 (Chat identifier starting from which to return chats; use 0 for the first request) @limit : Int32 (The maximum number of chats to be returned; up to 100)
Returns the total number of imported contacts
Returns a list of recently inactive supergroups and channels. Can be used when user reaches limit on the number of joined supergroups and channels and receives CHANNELS_TOO_MUCH error
Returns game high scores and some part of the high score table in the range of the specified user; for bots only @inline_message_id : String (Inline message identifier) @user_id : Int64 (User identifier)
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 @bot_user_id : Int64 (The identifier of the target bot) @chat_id : Int64 (Identifier of the chat where the query was sent) @user_location : TD::Location (Location of the user; pass null if unknown or the bot doesn't need user's location) @query : String (Text of the query) @offset : String (Offset of the first entry to return)
Returns a list of installed sticker sets @is_masks : Bool (Pass true to return mask sticker sets; pass false to return ordinary sticker sets)
Returns information about the type of an internal link. Returns a 404 error if the link is not internal. Can be called before authorization @link : String (The link)
Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously @json_value : TD::JsonValue (The JsonValue object)
Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously @json : String (The JSON-serialized string)
Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization @language_pack_id : String (Language pack identifier)
Returns a string stored in the local database from the specified localization target and language pack by its key. Returns a 404 error if the string is not found. Can be called synchronously @language_pack_database_path : String (Path to the language pack database in which strings are stored) @localization_target : String (Localization target to which the language pack belongs) @language_pack_id : String (Language pack identifier) @key : String (Language pack key of the string to be returned)
Returns strings from a language pack in the current localization target by their keys. Can be called before authorization @language_pack_id : String (Language pack identifier of the strings to be returned) @keys : Array(String) (Language pack keys of the strings to be returned; leave empty to request all available strings)
Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization @only_local : Bool (If true, returns only locally available information without sending network requests)
Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously
Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously @tag : String (Logging tag to change verbosity level)
Returns list of available TDLib internal log tags, for example,
Returns current verbosity level of the internal logging of TDLib. Can be called synchronously
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 @chat_id : Int64 (Chat identifier of the message with the button) @message_id : Int64 (Message identifier of the message with the button) @button_id : Int64 (Button identifier) @allow_write_access : Bool (True, if the user allowed the bot to send them messages)
Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button @chat_id : Int64 (Chat identifier of the message with the button) @message_id : Int64 (Message identifier of the message with the button) @button_id : Int64 (Button identifier)
Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded @location : TD::Location (Location of the map center) @zoom : Int32 (Map zoom level; 13-20) @width : Int32 (Map width in pixels before applying scale; 16-1024) @height : Int32 (Map height in pixels before applying scale; 16-1024) @scale : Int32 (Map scale; 1-3) @chat_id : Int64 (Identifier of a chat, in which the thumbnail will be shown. Use 0 if unknown)
Replaces text entities with Markdown formatting in a human-friendly format. Entities that can't be represented in Markdown unambiguously are kept as is. Can be called synchronously @text : TD::FormattedText (The text)
Returns information about a message @chat_id : Int64 (Identifier of the chat the message belongs to) @message_id : Int64 (Identifier of the message to get)
Returns an HTML code for embedding the message. Available only for messages in supergroups and channels with a username @chat_id : Int64 (Identifier of the chat to which the message belongs) @message_id : Int64 (Identifier of the message) @for_album : Bool (Pass true to return an HTML code for embedding of the whole media album)
Returns information about a file with messages exported from another app @message_file_head : String (Beginning of the message file; up to 100 first lines)
Returns a confirmation text to be shown to the user before starting message import @chat_id : Int64 (Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right)
Returns an HTTPS link to a message in a chat. Available only for already sent messages in supergroups and channels, or if message.can_get_media_timestamp_links and a media timestamp link is generated. This is an offline request @chat_id : Int64 (Identifier of the chat to which the message belongs) @message_id : Int64 (Identifier of the message) @media_timestamp : Int32 (If not 0, timestamp from which the video) @for_album : Bool (Pass true to create a link for the whole media album) @for_comment : Bool (Pass true to create a link to the message as a channel post comment, or from a message thread)
Returns information about a public or private message link. Can be called for any internal link of the type internalLinkTypeMessage @url : String (The message link)
Returns information about a message, if it is available locally without sending network request. This is an offline request @chat_id : Int64 (Identifier of the chat the message belongs to) @message_id : Int64 (Identifier of the message to get)
Returns forwarded copies of a channel message to different public channels. For optimal performance, the number of returned messages is chosen by TDLib @chat_id : Int64 (Chat identifier of the message) @message_id : Int64 (Message identifier) @offset : String (Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results) @limit : Int32 (The maximum number of messages to be returned; must be positive and can't be greater than 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit)
Returns detailed statistics about a message. Can be used only if message.can_get_statistics @chat_id : Int64 (Chat identifier) @message_id : Int64 (Message identifier) @is_dark : Bool (Pass true if a dark theme is used by the application)
Returns information about a message thread. Can be used only if message.can_get_message_thread @chat_id : Int64 (Chat identifier) @message_id : Int64 (Identifier of the message)
Returns messages in a message thread of a message. Can be used only if message.can_get_message_thread @chat_id : Int64 (Chat identifier) @message_id : Int64 (Message identifier, which thread history needs to be returned) @from_message_id : Int64 (Identifier of the message starting from which history must be fetched; use 0 to get results from the last message) @offset : Int32 (Specify 0 to get results from exactly the from_message_id or a negative offset up to 99 to get additionally some newer messages) @limit : Int32 (The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than or equal to -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit)
Returns viewers of a recent outgoing message in a basic group or a supergroup chat. For video notes and voice notes only users, opened content of the message, are returned. The method can be called if message.can_get_viewers @chat_id : Int64 (Chat identifier) @message_id : Int64 (Identifier of the message)
Returns information about messages. If a message is not found, returns null on the corresponding position of the result @chat_id : Int64 (Identifier of the chat the messages belong to) @message_ids : Array(Int64) (Identifiers of the messages to get)
Returns network data usage statistics. Can be called before authorization @only_current : Bool (If true, returns only data for the current library launch)
Returns the value of an option by its name. (Check the list of available options on https: @name : String (The name of the option)
Returns a Telegram Passport authorization form for sharing data with a service @bot_user_id : Int64 (User identifier of the service's bot) @scope : String (Telegram Passport element types requested by the service) @public_key : String (Service's public key) @nonce : String (Unique request identifier provided by the service)
Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form. Result can be received only once for each authorization form @autorization_form_id : Int32 (Authorization form identifier) @password : String (Password of the current user)
Returns one of the available Telegram Passport elements @type : TD::PassportElementType (Telegram Passport element type) @password : String (Password of the current user)
Returns an invoice payment form. This method must be called when the user presses inlineKeyboardButtonBuy @chat_id : Int64 (Chat identifier of the Invoice message) @message_id : Int64 (Message identifier) @theme : TD::PaymentFormTheme (Preferred payment form theme; pass null to use the default theme)
Returns information about a successful payment @chat_id : Int64 (Chat identifier of the PaymentSuccessful message) @message_id : Int64 (Message identifier)
Returns information about a phone number by its prefix. Can be called before authorization @phone_number_prefix : String (The phone number prefix)
Returns information about a phone number by its prefix synchronously. getCountries must be called at least once after changing localization to the specified language if properly localized country information is expected. Can be called synchronously @language_code : String (A two-letter ISO 639-1 country code for country information localization) @phone_number_prefix : String (The phone number prefix)
Returns users voted for the specified option in a non-anonymous polls. For optimal performance, the number of returned users is chosen by TDLib @chat_id : Int64 (Identifier of the chat to which the poll belongs) @message_id : Int64 (Identifier of the message containing the poll) @option_id : Int32 (0-based identifier of the answer option) @offset : Int32 (Number of users to skip in the result; must be non-negative) @limit : Int32 (The maximum number of users to be returned; must be positive and can't be greater than 50. For optimal performance, the number of returned users is chosen by TDLib and can be smaller than the specified limit, even if the end of the voter list has not been reached)
Returns an IETF language tag of the language preferred in the country, which must be used to fill native fields in Telegram Passport personal details. Returns a 404 error if unknown @country_code : String (A two-letter ISO 3166-1 alpha-2 country code)
Returns list of proxies that are currently set up. Can be called before authorization
Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization @proxy_id : Int32 (Proxy identifier)
Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification. Can be called synchronously @payload : String (JSON-encoded push notification payload)
Returns up to 20 recently used inline bots in the order of their last usage
Returns a list of recently used stickers @is_attached : Bool (Pass true to return stickers and masks that were recently attached to photos or video files; pass false to return recently sent stickers)
Returns recently opened chats, this is an offline request. Returns chats in the order of last opening @limit : Int32 (The maximum number of chats to be returned)
Returns t.me URLs recently visited by a newly registered user @referrer : String (Google Play referrer to identify the user)
Returns recommended chat filters for the current user
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 @password : String (The password for the current user)
Returns information about a file by its remote ID; this is an offline request. Can be used to register a URL as a file for further uploading, or sending as a message. Even the request succeeds, the file can be used only if it is still accessible to the user.For example, if the file is from a message, then the message must be not deleted and accessible to the user. If the file database is disabled, then the corresponding object with the file must be preloaded by the application @remote_file_id : String (Remote identifier of the file to get) @file_type : TD::FileType (File type; pass null if unknown)
Returns information about a message that is replied by a given message. Also returns the pinned message, the game message, and the invoice message for messages of the types messagePinMessage, messageGameScore, and messagePaymentSuccessful respectively @chat_id : Int64 (Identifier of the chat the message belongs to) @message_id : Int64 (Identifier of the reply message)
Returns the notification settings for chats of a given type @scope : TD::NotificationSettingsScope (Types of chats for which to return the notification settings information)
Returns information about a secret chat by its identifier. This is an offline request @secret_chat_id : Int32 (Secret chat identifier)
Loads an asynchronous or a zoomed in statistical graph @chat_id : Int64 (Chat identifier) @token : String (The token for graph loading) @x : Int64 (X-value for zoomed in graph or 0 otherwise)
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 @sticker : TD::InputFile (Sticker file identifier)
Returns information about a sticker set by its identifier @set_id : String (Identifier of the sticker set)
Returns stickers from the installed sticker sets that correspond to a given emoji. If the emoji is non-empty, favorite and recently used stickers may also be returned @emoji : String (String representation of emoji. If empty, returns all known installed stickers) @limit : Int32 (The maximum number of stickers to be returned)
Returns storage usage statistics. Can be called before authorization @chat_limit : Int32 (The maximum number of chats with the largest storage usage for which separate statistics need to be returned. All other chats will be grouped in entries with chat_id)
Quickly returns approximate storage usage statistics. Can be called before authorization
Returns suggested name for saving a file in a given directory @file_id : Int32 (Identifier of the file) @directory : String (Directory in which the file is supposed to be saved)
Returns a suggested name for a new sticker set with a given title @title : String (Sticker set title; 1-64 characters)
Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel. Returned basic group chats must be first upgraded to supergroups before they can be set as a discussion group. To set a returned supergroup as a discussion group, access to its old messages must be enabled using toggleSupergroupIsAllHistoryAvailable first
Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot @supergroup_id : Int64 (Supergroup or channel identifier)
Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute @supergroup_id : Int64 (Supergroup or channel identifier)
Returns information about members or banned users in a supergroup or channel. Can be used only if supergroupFullInfo.can_get_members @supergroup_id : Int64 (Identifier of the supergroup or channel) @filter : TD::SupergroupMembersFilter (The type of users to return; pass null to use supergroupMembersFilterRecent) @offset : Int32 (Number of users to skip) @limit : Int32 (The maximum number of users be returned; up to 200)
Returns information about the current temporary password
Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) contained in the text. Can be called synchronously @text : String (The text in which to look for entites)
Returns a list of frequently used chats. Supported only if the chat info database is enabled @category : TD::TopChatCategory (Category of chats to be returned) @limit : Int32 (The maximum number of chats to be returned; up to 30)
Returns a list of trending sticker sets. For optimal performance, the number of returned sticker sets is chosen by TDLib @offset : Int32 (The offset from which to return the sticker sets; must be non-negative) @limit : Int32 (The maximum number of sticker sets to be returned; up to 100. For optimal performance, the number of returned sticker sets is chosen by TDLib and can be smaller than the specified limit, even if the end of the list has not been reached)
Returns information about a user by their identifier. This is an offline request if the current user is not a bot @user_id : Int64 (User identifier)
Returns full information about a user by their identifier @user_id : Int64 (User identifier)
Returns the current privacy settings @setting : TD::UserPrivacySetting (The privacy setting)
Returns the profile photos of a user. The result of this query may be outdated: some photos might have been deleted already @user_id : Int64 (User identifier) @offset : Int32 (The number of photos to skip; must be non-negative) @limit : Int32 (The maximum number of photos to be returned; up to 100)
Returns list of participant identifiers, on whose behalf a video chat in the chat can be joined @chat_id : Int64 (Chat identifier)
Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page @url : String (The web page URL) @force_full : Bool (If true, the full instant view for the web page will be returned)
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 @text : TD::FormattedText (Message text with formatting)
Hides a suggested action @action : TD::SuggestedAction (Suggested action to hide)
Adds new contacts or edits existing contacts by their phone numbers; contacts' user identifiers are ignored @contacts : Array(TD::Contact) (The list of contacts to import or edit; contacts' vCard are ignored and are not imported)
Imports messages exported from another app @chat_id : Int64 (Identifier of a chat to which the messages will be imported. It must be an identifier of a private chat with a mutual contact or an identifier of a supergroup chat with can_change_info administrator right) @message_file : TD::InputFile (File with messages to import. Only inputFileLocal and inputFileGenerated are supported. The file must not be previously uploaded) @attached_files : Array(TD::InputFile) (Files used in the imported messages. Only inputFileLocal and inputFileGenerated are supported. The files must not be previously uploaded)
Invites users to an active group call. Sends a service message of type messageInviteToGroupCall for video chats @group_call_id : Int32 (Group call identifier) @user_ids : Array(Int64) (User identifiers. At most 10 users can be invited simultaneously)
Adds the current user as a new member to a chat. Private and secret chats can't be joined using this method @chat_id : Int64 (Chat identifier)
Uses an invite link to add the current user to the chat if possible @invite_link : String (Invite link to use)
Joins an active group call. Returns join response payload for tgcalls @group_call_id : Int32 (Group call identifier) @participant_id : TD::MessageSender (Identifier of a group call participant, which will be used to join the call; pass null to join as self; video chats only) @audio_source_id : Int32 (Caller audio channel synchronization source identifier; received from tgcalls) @payload : String (Group call join payload; received from tgcalls) @is_muted : Bool (True, if the user's microphone is muted) @is_my_video_enabled : Bool (True, if the user's video is enabled) @invite_hash : String (If non-empty, invite hash to be used to join the group call without being muted by administrators)
Removes the current user from chat members. Private and secret chats can't be left using this method @chat_id : Int64 (Chat identifier)
Leaves a group call @group_call_id : Int32 (Group call identifier)
Loads more chats from a chat list. The loaded chats and their positions in the chat list will be sent through updates. Chats are sorted by the pair (chat.position.order, chat.id) in descending order. Returns a 404 error if all chats have been loaded @chat_list : TD::ChatList (The chat list in which to load chats; pass null to load chats from the main chat list) @limit : Int32 (The maximum number of chats to be loaded. For optimal performance, the number of loaded chats is chosen by TDLib and can be smaller than the specified limit, even if the end of the list is not reached)
Loads more participants of a group call. The loaded participants will be received through updates. Use the field groupCall.loaded_all_participants to check whether all participants have already been loaded @group_call_id : Int32 (Group call identifier. The group call must be previously received through getGroupCall and must be joined or being joined) @limit : Int32 (The maximum number of participants to load; up to 100)
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
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) @chat_id : Int64 (Chat identifier)
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 @chat_id : Int64 (Chat identifier of the message) @message_id : Int64 (Identifier of the message with the opened content)
Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can't be deleted @size : Int64 (Limit on the total size of files after deletion, in bytes. Pass -1 to use the default limit) @ttl : Int32 (Limit on the time that has passed since the last time a file was accessed (or creation time for some filesystems). Pass -1 to use the default limit) @count : Int32 (Limit on the total count of files after deletion. Pass -1 to use the default limit) @immunity_delay : Int32 (The amount of time after the creation of a file during which it can't be deleted, in seconds. Pass -1 to use the default value) @file_types : Array(TD::FileType) (If non-empty, only files with the given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted) @chat_ids : Array(Int64) (If non-empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat (e.g., profile photos)) @exclude_chat_ids : Array(Int64) (If non-empty, files from the given chats are excluded. Use 0 as chat identifier to exclude all files not belonging to any chat (e.g., profile photos)) @return_deleted_file_statistics : Bool (Pass true if statistics about the files that were deleted must be returned instead of the whole storage usage statistics. Affects only returned statistics) @chat_limit : Int32 (Same as in getStorageStatistics. Affects only returned statistics)
Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously @text : TD::FormattedText (The text to parse. For example, "italic)
Parses Bold, Italic, Underline, Strikethrough, Code, Pre, PreCode, TextUrl and MentionName entities contained in the text. Can be called synchronously @text : String (The text to parse) @parse_mode : TD::TextParseMode (Text parse mode)
Pins a message in a chat; requires can_pin_messages rights or can_edit_messages rights in the channel @chat_id : Int64 (Identifier of the chat) @message_id : Int64 (Identifier of the new pinned message) @disable_notification : Bool (True, if there must be no notification about the pinned message. Notifications are always disabled in channels and private chats) @only_for_self : Bool (True, if the message needs to be pinned for one side only; private chats only)
Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization @proxy_id : Int32 (Proxy identifier. Use 0 to ping a Telegram server without a proxy)
Handles a pending join request in a chat @chat_id : Int64 (Chat identifier) @user_id : Int64 (Identifier of the user that sent the request) @approve : Bool (True, if the request is approved. Otherwise the request is declived)
Handles all pending join requests for a given link in a chat @chat_id : Int64 (Chat identifier) @invite_link : String (Invite link for which to process join requests. If empty, all join requests will be processed. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links) @approve : Bool (True, if the requests are approved. Otherwise the requests are declived)
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 @payload : String (JSON-encoded push notification payload with all fields sent by the server, and "google.sent_time" and "google.notification.sound" fields added)
Marks all mentions in a chat as read @chat_id : Int64 (Chat identifier)
Reads a part of a file from the TDLib file cache and returns read bytes. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct read from the file @file_id : Int32 (Identifier of the file. The file must be located in the TDLib file cache) @offset : Int32 (The offset from which to read the file) @count : Int32 (Number of bytes to read. An error will be returned if there are not enough bytes available in the file from the specified position. Pass 0 to read all available data from the specified position)
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 @recovery_code : String (Recovery code to check) @new_password : String (New password of the user; may be empty to remove the password) @new_hint : String (New password hint; may be empty)
Recovers the 2-step verification password using a recovery code sent to an email address that was previously set up @recovery_code : String (Recovery code to check) @new_password : String (New password of the user; may be empty to remove the password) @new_hint : String (New password hint; may be empty)
Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription @device_token : TD::DeviceToken (Device token) @other_user_ids : Array(Int64) (List of user identifiers of other users currently using the application)
Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration @first_name : String (The first name of the user; 1-64 characters) @last_name : String (The last name of the user; 0-64 characters)
Removes background from the list of installed backgrounds @background_id : String (The background identifier)
Removes a chat action bar without any other action @chat_id : Int64 (Chat identifier)
Removes users from the contact list @user_ids : Array(Int64) (Identifiers of users to be deleted)
Removes a sticker from the list of favorite stickers @sticker : TD::InputFile (Sticker file to delete from the list)
Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user @notification_group_id : Int32 (Identifier of notification group to which the notification belongs) @notification_id : Int32 (Identifier of removed notification)
Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user @notification_group_id : Int32 (Notification group identifier) @max_notification_id : Int32 (The maximum identifier of removed notifications)
Removes a proxy server. Can be called before authorization @proxy_id : Int32 (Proxy identifier)
Removes a hashtag from the list of recently used hashtags @hashtag : String (Hashtag to delete)
Removes a sticker from the list of recently used stickers @is_attached : Bool (Pass true to remove the sticker from the list of stickers recently attached to photo or video files; pass false to remove the sticker from the list of recently sent stickers) @sticker : TD::InputFile (Sticker file to delete)
Removes a chat from the list of recently found chats @chat_id : Int64 (Identifier of the chat to be removed)
Removes an animation from the list of saved animations @animation : TD::InputFile (Animation file to be removed)
Removes a sticker from the set to which it belongs; for bots only. The sticker set must have been created by the bot @sticker : TD::InputFile (Sticker)
Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled @category : TD::TopChatCategory (Category of frequently used chats) @chat_id : Int64 (Chat identifier)
Changes the order of chat filters @chat_filter_ids : Array(Int32) (Identifiers of chat filters in the new correct order)
Changes the order of installed sticker sets @is_masks : Bool (Pass true to change the order of mask sticker sets; pass false to change the order of ordinary sticker sets) @sticker_set_ids : Array(String) (Identifiers of installed sticker sets in the new correct order)
Replaces current primary invite link for a chat with a new primary invite link. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right @chat_id : Int64 (Chat identifier)
Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported @chat_id : Int64 (Chat identifier) @message_ids : Array(Int64) (Identifiers of reported messages, if any) @reason : TD::ChatReportReason (The reason for reporting the chat) @text : String (Additional report details; 0-1024 characters)
Reports a chat photo to the Telegram moderators. A chat photo can be reported only if chat.can_be_reported @chat_id : Int64 (Chat identifier) @file_id : Int32 (Identifier of the photo to report. Only full photos from chatPhoto can be reported) @reason : TD::ChatReportReason (The reason for reporting the chat photo) @text : String (Additional report details; 0-1024 characters)
Reports messages in a supergroup as spam; requires administrator rights in the supergroup @supergroup_id : Int64 (Supergroup identifier) @message_ids : Array(Int64) (Identifiers of messages to report)
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
Requests to send a 2-step verification password recovery code to an email address that was previously set up
Requests QR code authentication by scanning a QR code on another logged in device. Works only when the current authorization state is authorizationStateWaitPhoneNumber,or if there is no pending authentication query and the current authorization state is authorizationStateWaitCode, authorizationStateWaitRegistration, or authorizationStateWaitPassword @other_user_ids : Array(Int64) (List of user identifiers of other users currently using the application)
Re-sends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed
Re-sends the authentication code sent to confirm a new phone number for the current user. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
Re-sends the code to verify an email address to be added to a user's Telegram Passport
Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in messageSendingStateFailed.retry_after time passed.If a message is re-sent, the corresponding failed to send message is deleted. Returns the sent messages in the same order as the message identifiers passed in message_ids. If a message can't be re-sent, null will be returned instead of the message @chat_id : Int64 (Identifier of the chat to send messages) @message_ids : Array(Int64) (Identifiers of the messages to resend. Message identifiers must be in a strictly increasing order)
Resends phone number confirmation code
Re-sends the code to verify a phone number to be added to a user's Telegram Passport
Resends the 2-step verification recovery email address verification code
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
Resets list of installed backgrounds to its default value
Resets all network data usage statistics to zero. Can be called before authorization
Removes 2-step verification password without previous password and access to recovery email address. The password can't be reset immediately and the request needs to be repeated after the specified time
Revokes invite link for a chat. Available for basic groups, supergroups, and channels. Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other links.If a primary link is revoked, then additionally to the revoked link returns new primary link @chat_id : Int64 (Chat identifier) @invite_link : String (Invite link to be revoked)
Revokes invite link for a group call. Requires groupCall.can_be_managed group call flag @group_call_id : Int32 (Group call identifier)
Saves application log event on the server. Can be called before authorization @type : String (Event type) @chat_id : Int64 (Optional chat identifier, associated with the event) @data : TD::JsonValue (The log event data)
Searches for a background by its name @name : String (The name of the background)
Searches for call messages. Returns the results in reverse chronological order (i. e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib @from_message_id : Int64 (Identifier of the message from which to search; use 0 to get results from the last message) @limit : Int32 (The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit) @only_missed : Bool (If true, returns only messages with missed)
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 @chat_id : Int64 (Chat identifier) @query : String (Query to search for) @limit : Int32 (The maximum number of users to be returned; up to 200) @filter : TD::ChatMembersFilter (The type of users to search for; pass null to search among all chat members)
Searches for messages with given words in the chat. Returns the results in reverse chronological order, i.e. in order of decreasing message_id. Cannot be used in secret chats with a non-empty query(searchSecretMessages must be used instead), or without an enabled message database. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit @chat_id : Int64 (Identifier of the chat in which to search messages) @query : String (Query to search for) @sender_id : TD::MessageSender (Identifier of the sender of messages to search for; pass null to search for messages from any sender. Not supported in secret chats) @from_message_id : Int64 (Identifier of the message starting from which history must be fetched; use 0 to get results from the last message) @offset : Int32 (Specify 0 to get results from exactly the from_message_id or a negative offset to get the specified message and some newer messages) @limit : Int32 (The maximum number of messages to be returned; must be positive and can't be greater than 100. If the offset is negative, the limit must be greater than -offset. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit) @filter : TD::SearchMessagesFilter (Additional filter for messages to search; pass null to search for all messages) @message_thread_id : Int64 (If not 0, only messages in the specified thread will be returned; supergroups only)
Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user @chat_id : Int64 (Chat identifier) @limit : Int32 (The maximum number of messages to be returned)
Searches for the specified query in the title and username of already known chats, this is an offline request. Returns chats in the order seen in the main chat list @query : String (Query to search for. If the query is empty, returns up to 50 recently found chats) @limit : Int32 (The maximum number of chats to be returned)
Returns a list of users and location-based supergroups nearby. The list of users nearby will be updated for 60 seconds after the request by the updates updateUsersNearby. The request must be sent again every 25 seconds with adjusted location to not miss new chats @location : TD::Location (Current user location)
Searches for the specified query in the title and username of already known chats via request to the server. Returns chats in the order seen in the main chat list @query : String (Query to search for) @limit : Int32 (The maximum number of chats to be returned)
Searches for the specified query in the first names, last names and usernames of the known user contacts @query : String (Query to search for; may be empty to return all contacts) @limit : Int32 (The maximum number of users to be returned)
Searches for emojis by keywords. Supported only if the file database is enabled @text : String (Text to search for) @exact_match : Bool (True, if only emojis, which exactly match text needs to be returned) @input_language_codes : Array(String) (List of possible IETF language tags of the user's input language; may be empty if unknown)
Searches for recently used hashtags by their prefix @prefix : String (Hashtag prefix to search for) @limit : Int32 (The maximum number of hashtags to be returned)
Searches for installed sticker sets by looking for specified query in their title and name @is_masks : Bool (Pass true to return mask sticker sets; pass false to return ordinary sticker sets) @query : String (Query to search for) @limit : Int32 (The maximum number of sticker sets to return)
Searches for messages in all chats except secret chats. Returns the results in reverse chronological order (i.e., in order of decreasing (date, chat_id, message_id)).For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit @chat_list : TD::ChatList (Chat list in which to search messages; pass null to search in all chats regardless of their chat list. Only Main and Archive chat lists are supported) @query : String (Query to search for) @offset_date : Int32 (The date of the message starting from which the results need to be fetched. Use 0 or any date in the future to get results from the last message) @offset_chat_id : Int64 (The chat identifier of the last found message, or 0 for the first request) @offset_message_id : Int64 (The message identifier of the last found message, or 0 for the first request) @limit : Int32 (The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit) @filter : TD::SearchMessagesFilter (Additional filter for messages to search; pass null to search for all messages. Filters searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterFailedToSend and searchMessagesFilterPinned are unsupported in this function) @min_date : Int32 (If not 0, the minimum date of the messages to return) @max_date : Int32 (If not 0, the maximum date of the messages to return)
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 @username : String (Username to be resolved)
Searches public chats by looking for specified query in their username and title. Currently, only private chats, supergroups and channels can be public. Returns a meaningful number of results.Excludes private chats with contacts and chats from the chat list from the results @query : String (Query to search for)
Searches for messages in secret chats. Returns the results in reverse chronological order. For optimal performance, the number of returned messages is chosen by TDLib @chat_id : Int64 (Identifier of the chat in which to search. Specify 0 to search in all secret chats) @query : String (Query to search for. If empty, searchChatMessages must be used instead) @offset : String (Offset of the first entry to return as received from the previous request; use empty string to get first chunk of results) @limit : Int32 (The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit) @filter : TD::SearchMessagesFilter (Additional filter for messages to search; pass null to search for all messages)
Searches for a sticker set by its name @name : String (Name of the sticker set)
Searches for ordinary sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results @query : String (Query to search for)
Searches for stickers from public sticker sets that correspond to a given emoji @emoji : String (String representation of emoji; must be non-empty) @limit : Int32 (The maximum number of stickers to be returned)
Invites a bot to a chat (if it is not yet a member) and sends it the @bot_user_id : Int64 (Identifier of the bot) @chat_id : Int64 (Identifier of the target chat) @parameter : String (A hidden parameter sent to the bot for deep linking purposes (https:)
Sends debug information for a call @call_id : Int32 (Call identifier) @debug_information : String (Debug information in application-specific format)
Sends a call rating @call_id : Int32 (Call identifier) @rating : Int32 (Call rating; 1-5) @comment : String (An optional user comment if the rating is less than 5) @problems : Array(TD::CallProblem) (List of the exact types of problems with the call, specified by the user)
Sends call signaling data @call_id : Int32 (Call identifier) @data : String (The data)
Sends a notification about user activity in a chat @chat_id : Int64 (Chat identifier) @message_thread_id : Int64 (If not 0, a message thread identifier in which the action was performed) @action : TD::ChatAction (The action description; pass null to cancel the currently active action)
Sends a notification about a screenshot taken in a chat. Supported only in private and secret chats @chat_id : Int64 (Chat identifier)
Sends a custom request; for bots only @method : String (The method name) @parameters : String (JSON-serialized method parameters)
Sends a code to verify an email address to be added to a user's Telegram Passport @email_address : String (Email address)
Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message @chat_id : Int64 (Target chat) @message_thread_id : Int64 (If not 0, a message thread identifier in which the message will be sent) @reply_to_message_id : Int64 (Identifier of a message to reply to or 0) @options : TD::MessageSendOptions (Options to be used to send the message; pass null to use default options) @query_id : String (Identifier of the inline query) @result_id : String (Identifier of the inline result) @hide_via_bot : Bool (If true, there will be no mention of a bot, via which the message is sent. Can be used only for bots GetOption("animation_search_bot_username"), GetOption("photo_search_bot_username") and GetOption("venue_search_bot_username"))
Sends a message. Returns the sent message @chat_id : Int64 (Target chat) @message_thread_id : Int64 (If not 0, a message thread identifier in which the message will be sent) @reply_to_message_id : Int64 (Identifier of the message to reply to or 0) @options : TD::MessageSendOptions (Options to be used to send the message; pass null to use default options) @reply_markup : TD::ReplyMarkup? (Markup for replying to the message; pass null if none; for bots only) @input_message_content : TD::InputMessageContent (The content of the message to be sent)
Sends 2-10 messages grouped together into an album. Currently, only audio, document, photo and video messages can be grouped into an album. Documents and audio files can be only grouped in an album with messages of the same type. Returns sent messages @chat_id : Int64 (Target chat) @message_thread_id : Int64 (If not 0, a message thread identifier in which the messages will be sent) @reply_to_message_id : Int64 (Identifier of a message to reply to or 0) @options : TD::MessageSendOptions (Options to be used to send the messages; pass null to use default options) @input_message_contents : Array(TD::InputMessageContent) (Contents of messages to be sent. At most 10 messages can be added to an album)
Sends a Telegram Passport authorization form, effectively sharing data with the service. This method must be called after getPassportAuthorizationFormAvailableElements if some previously available elements are going to be reused @autorization_form_id : Int32 (Authorization form identifier) @types : Array(TD::PassportElementType) (Types of Telegram Passport elements chosen by user to complete the authorization form)
Sends a filled-out payment form to the bot for final verification @chat_id : Int64 (Chat identifier of the Invoice message) @message_id : Int64 (Message identifier) @payment_form_id : String (Payment form identifier returned by getPaymentForm) @order_info_id : String (Identifier returned by validateOrderInfo, or an empty string) @shipping_option_id : String? (Identifier of a chosen shipping option, if applicable) @credentials : TD::InputCredentials (The credentials chosen by user for payment) @tip_amount : Int64 (Chosen by the user amount of tip in the smallest units of the currency)
Sends phone number confirmation code to handle links of the type internalLinkTypePhoneNumberConfirmation @hash : String (Hash value from the link) @phone_number : String (Phone number value from the link) @settings : TD::PhoneNumberAuthenticationSettings (Settings for the authentication of the user's phone number; pass null to use default settings)
Sends a code to verify a phone number to be added to a user's Telegram Passport @phone_number : String (The phone number of the user, in international format) @settings : TD::PhoneNumberAuthenticationSettings (Settings for the authentication of the user's phone number; pass null to use default settings)
Changes the period of inactivity after which the account of the current user will automatically be deleted @ttl : TD::AccountTtl (New account TTL)
Succeeds after a specified amount of time has passed. Can be called before initialization @seconds : Float64 (Number of seconds before the function returns)
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 @phone_number : String (The phone number of the user, in international format) @settings : TD::PhoneNumberAuthenticationSettings (Settings for the authentication of the user's phone number; pass null to use default settings)
Sets auto-download settings @settings : TD::AutoDownloadSettings (New user auto-download settings) @type : TD::NetworkType (Type of the network for which the new settings are relevant)
Changes the background selected by the user; adds background to the list of installed backgrounds @background : TD::InputBackground (The input background to use; pass null to create a new filled backgrounds or to remove the current background) @type : TD::BackgroundType (Background type; pass null to use the default type of the remote background or to remove the current background) @for_dark_theme : Bool (True, if the background is chosen for dark theme)
Changes the bio of the current user @bio : String (The new value of the user bio; 0-70 characters without line feeds)
Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only @pending_update_count : Int32 (The number of pending updates) @error_message : String (The last error message)
Changes application-specific data associated with a chat @chat_id : Int64 (Chat identifier) @client_data : String (New value of client_data)
Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info administrator right @chat_id : Int64 (Identifier of the chat) @description : String (New chat description; 0-255 characters)
Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified @chat_id : Int64 (Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires can_pin_messages rights in the supergroup)) @discussion_chat_id : Int64 (Identifier of a new channel's discussion group. Use 0 to remove the discussion group.Use the method getSuitableDiscussionChats to find all suitable groups. Basic group chats must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that)
Changes the draft message in a chat @chat_id : Int64 (Chat identifier) @message_thread_id : Int64 (If not 0, a message thread identifier in which the draft was changed) @draft_message : TD::DraftMessage (New draft message; pass null to remove the draft)
Changes the location of a chat. Available only for some location-based supergroups, use supergroupFullInfo.can_set_location to check whether the method is allowed to use @chat_id : Int64 (Chat identifier) @location : TD::ChatLocation (New location for the chat; must be valid and not null)
Changes the status of a chat member, needs appropriate privileges. This function is currently not suitable for transferring chat ownership; use transferChatOwnership instead. Use addChatMember or banChatMember if some additional parameters needs to be passed @chat_id : Int64 (Chat identifier) @member_id : TD::MessageSender (Member identifier. Chats can be only banned and unbanned in supergroups and channels) @status : TD::ChatMemberStatus (The new status of the member in the chat)
Selects a message sender to send messages in a chat @chat_id : Int64 (Chat identifier) @message_sender_id : TD::MessageSender (New message sender for the chat)
Changes the message TTL in a chat. Requires can_delete_messages administrator right in basic groups, supergroups and channelsMessage TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram) @chat_id : Int64 (Chat identifier) @ttl : Int32 (New TTL value, in seconds; must be one of 0, 86400, 7)
Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can't be changed @chat_id : Int64 (Chat identifier) @notification_settings : TD::ChatNotificationSettings (New notification settings for the chat. If the chat is muted for more than 1 week, it is considered to be muted forever)
Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right @chat_id : Int64 (Chat identifier) @permissions : TD::ChatPermissions (New non-administrator members permissions in the chat)
Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right @chat_id : Int64 (Chat identifier) @photo : TD::InputChatPhoto (New chat photo; pass null to delete the chat photo)
Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members rights @chat_id : Int64 (Chat identifier) @slow_mode_delay : Int32 (New slow mode delay for the chat, in seconds; must be one of 0, 10, 30, 60, 300, 900, 3600)
Changes the chat theme. Supported only in private and secret chats @chat_id : Int64 (Chat identifier) @theme_name : String (Name of the new chat theme; pass an empty string to return the default theme)
Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info administrator right @chat_id : Int64 (Chat identifier) @title : String (New title of the chat; 1-128 characters)
Sets the list of commands supported by the bot for the given user scope and language; for bots only @scope : TD::BotCommandScope (The scope to which the commands are relevant; pass null to change commands in the default bot command scope) @language_code : String (A two-letter ISO 639-1 country code. If empty, the commands will be applied to all users from the given scope, for which language there are no dedicated commands) @commands : Array(TD::BotCommand) (List of the bot's commands)
Adds or changes a custom local language pack to the current localization target @info : TD::LanguagePackInfo (Information about the language pack. Language pack ID must start with 'X', consist only of English letters, digits and hyphens, and must not exceed 64 characters. Can be called before authorization) @strings : Array(TD::LanguagePackString) (Strings of the new language pack)
Adds, edits or deletes a string in a custom local language pack. Can be called before authorization @language_pack_id : String (Identifier of a previously added custom local language pack in the current localization target) @new_string : TD::LanguagePackString (New language pack string)
Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain @new_encryption_key : String (New encryption key)
Informs TDLib on a file generation progress @generation_id : String (The identifier of the generation process) @expected_size : Int32 (Expected size of the generated file, in bytes; 0 if unknown) @local_prefix_size : Int32 (The number of bytes already generated)
Updates the game score of the specified user in the game; for bots only @chat_id : Int64 (The chat to which the message with the game belongs) @message_id : Int64 (Identifier of the message) @edit_message : Bool (True, if the message needs to be edited) @user_id : Int64 (User identifier) @score : Int32 (The new score) @force : Bool (Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table)
Informs TDLib that speaking state of a participant of an active group has changed @group_call_id : Int32 (Group call identifier) @audio_source : Int32 (Group call participant's synchronization audio source identifier, or 0 for the current user) @is_speaking : Bool (True, if the user is speaking)
Changes volume level of a participant of an active group call. If the current user can manage the group call, then the participant's volume level will be changed for all users with the default volume level @group_call_id : Int32 (Group call identifier) @participant_id : TD::MessageSender (Participant identifier) @volume_level : Int32 (New participant's volume level; 1-20000 in hundreds of percents)
Sets group call title. Requires groupCall.can_be_managed group call flag @group_call_id : Int32 (Group call identifier) @title : String (New group call title; 1-64 characters)
Changes the period of inactivity after which sessions will automatically be terminated @inactive_session_ttl_days : Int32 (New number of days of inactivity before sessions will be automatically terminated; 1-366 days)
Updates the game score of the specified user in a game; for bots only @inline_message_id : String (Inline message identifier) @edit_message : Bool (True, if the message needs to be edited) @user_id : Int64 (User identifier) @score : Int32 (The new score) @force : Bool (Pass true to update the score even if it decreases. If the score is 0, the user will be deleted from the high score table)
Changes the location of the current user. Needs to be called if GetOption("is_location_visible") is true and location changes for more than 1 kilometer @location : TD::Location (The new location of the user)
Sets new log stream for internal logging of TDLib. Can be called synchronously @log_stream : TD::LogStream (New log stream)
Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously @tag : String (Logging tag to change verbosity level) @new_verbosity_level : Int32 (New verbosity level; 1-1024)
Sets the verbosity level of the internal logging of TDLib. Can be called synchronously @new_verbosity_level : Int32 (New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging)
Changes the first and last name of the current user @first_name : String (The new value of the first name for the current user; 1-64 characters) @last_name : String (The new value of the optional last name for the current user; 0-64 characters)
Sets the current network type. Can be called before authorization. Calling this method forces all network connections to reopen, mitigating the delay in switching between different networks, so it must be called whenever the network is changed, even if the network type remains the same.Network type is used to check whether the library can use the network at all and also for collecting detailed network data usage statistics @type : TD::NetworkType (The new network type; pass null to set network type to networkTypeOther)
Sets the value of an option. (Check the list of available options on https: @name : String (The name of the option) @value : TD::OptionValue (The new value of the option; pass null to reset option value to a default value)
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 @element : TD::InputPassportElement (Input Telegram Passport element) @password : String (Password of the current user)
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 @user_id : Int64 (User identifier) @errors : Array(TD::InputPassportElementError) (The errors)
Changes the password for the current user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed @old_password : String (Previous password of the user) @new_password : String (New password of the user; may be empty to remove the password) @new_hint : String (New password hint; may be empty) @set_recovery_email_address : Bool (Pass true if the recovery email address must be changed) @new_recovery_email_address : String (New recovery email address; may be empty)
Changes the order of pinned chats @chat_list : TD::ChatList (Chat list in which to change the order of pinned chats) @chat_ids : Array(Int64) (The new list of pinned chats)
Changes the user answer to a poll. A poll in quiz mode can be answered only once @chat_id : Int64 (Identifier of the chat to which the poll belongs) @message_id : Int64 (Identifier of the message containing the poll) @option_ids : Array(Int32) (0-based identifiers of answer options, chosen by the user. User can choose more than 1 answer option only is the poll allows multiple answers)
Changes a profile photo for the current user @photo : TD::InputChatPhoto (Profile photo to set)
Changes the 2-step verification recovery email address of the user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed.If new_recovery_email_address is the same as the email address that is currently set up, this call succeeds immediately and aborts all other requests waiting for an email confirmation @password : String (Password of the current user) @new_recovery_email_address : String (New recovery email address)
Changes notification settings for chats of a given type @scope : TD::NotificationSettingsScope (Types of chats for which to change the notification settings) @notification_settings : TD::ScopeNotificationSettings (The new notification settings for the given scope)
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 @sticker : TD::InputFile (Sticker) @position : Int32 (New position of the sticker in the set, zero-based)
Sets a sticker set thumbnail; for bots only. Returns the sticker set @user_id : Int64 (Sticker set owner) @name : String (Sticker set name) @thumbnail : TD::InputFile (Thumbnail to set in PNG or TGS format; pass null to remove the sticker set thumbnail. Animated thumbnail must be set for animated sticker sets and only for them)
Changes the sticker set of a supergroup; requires can_change_info administrator right @supergroup_id : Int64 (Identifier of the supergroup) @sticker_set_id : String (New value of the supergroup sticker set identifier. Use 0 to remove the supergroup sticker set)
Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel @supergroup_id : Int64 (Identifier of the supergroup or channel) @username : String (New value of the username. Use an empty string to remove the username)
Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters @parameters : TD::TdlibParameters (Parameters for TDLib initialization)
Changes user privacy settings @setting : TD::UserPrivacySetting (The privacy setting) @rules : TD::UserPrivacySettingRules (The new privacy rules)
Changes the username of the current user @username : String (The new value of the username. Use an empty string to remove the username)
Changes default participant identifier, on whose behalf a video chat in the chat will be joined @chat_id : Int64 (Chat identifier) @default_participant_id : TD::MessageSender (Default group call participant identifier to join the video chats)
Starts recording of an active group call. Requires groupCall.can_be_managed group call flag @group_call_id : Int32 (Group call identifier) @title : String (Group call recording title; 0-64 characters) @record_video : Bool (Pass true to record a video file instead of an audio file) @use_portrait_orientation : Bool (Pass true to use portrait orientation for video instead of landscape one)
Starts screen sharing in a joined group call. Returns join response payload for tgcalls @group_call_id : Int32 (Group call identifier) @audio_source_id : Int32 (Screen sharing audio channel synchronization source identifier; received from tgcalls) @payload : String (Group call join payload; received from tgcalls)
Starts a scheduled group call @group_call_id : Int32 (Group call identifier)
Stops a poll. A poll in a message can be stopped when the message has can_be_edited flag set @chat_id : Int64 (Identifier of the chat to which the poll belongs) @message_id : Int64 (Identifier of the message containing the poll) @reply_markup : TD::ReplyMarkup? (The new message reply markup; pass null if none; for bots only)
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 @language_pack_id : String (Language pack identifier)
Terminates all other sessions of the current user
Terminates a session of the current user @session_id : String (Session identifier)
Returns the received bytes; for testing only. This is an offline method. Can be called before authorization @x : String (Bytes to return)
Does nothing; for testing only. This is an offline method. Can be called before authorization
Returns the received string; for testing only. This is an offline method. Can be called before authorization @x : String (String to return)
Returns the received vector of numbers; for testing only. This is an offline method. Can be called before authorization @x : Array(Int32) (Vector of numbers to return)
Returns the received vector of objects containing a number; for testing only. This is an offline method. Can be called before authorization @x : Array(TD::TestInt) (Vector of objects to return)
Returns the received vector of strings; for testing only. This is an offline method. Can be called before authorization @x : Array(String) (Vector of strings to return)
Returns the received vector of objects containing a string; for testing only. This is an offline method. Can be called before authorization @x : Array(TD::TestString) (Vector of objects to return)
Forces an updates.getDifference call to the Telegram servers; for testing only
Sends a simple network request to the Telegram servers; for testing only. Can be called before authorization
Sends a simple network request to the Telegram servers via proxy; for testing only. Can be called before authorization @server : String (Proxy server IP address) @port : Int32 (Proxy server port) @type : TD::ProxyType (Proxy type) @dc_id : Int32 (Identifier of a datacenter, with which to test connection) @timeout : Float64 (The maximum overall timeout for the request)
Returns the specified error and ensures that the Error object is used; for testing only. Can be called synchronously @error : TD::Error (The error to be returned)
Returns the squared received number; for testing only. This is an offline method. Can be called before authorization @x : Int32 (Number to square)
Does nothing and ensures that the Update object is used; for testing only. This is an offline method. Can be called before authorization
Changes the value of the default disable_notification parameter, used when a message is sent to a chat @chat_id : Int64 (Chat identifier) @default_disable_notification : Bool (New value of default_disable_notification)
Changes the ability of users to save, forward, or copy chat content. Supported only for basic groups, supergroups and channels. Requires owner privileges @chat_id : Int64 (Chat identifier) @has_protected_content : Bool (True, if chat content can't be saved locally, forwarded, or copied)
Changes the marked as unread state of a chat @chat_id : Int64 (Chat identifier) @is_marked_as_unread : Bool (New value of is_marked_as_unread)
Changes the pinned state of a chat. There can be up to GetOption("pinned_chat_count_max") @chat_list : TD::ChatList (Chat list in which to change the pinned state of the chat) @chat_id : Int64 (Chat identifier) @is_pinned : Bool (True, if the chat is pinned)
Toggles whether the current user will receive a notification when the group call will start; scheduled group calls only @group_call_id : Int32 (Group call identifier) @enabled_start_notification : Bool (New value of the enabled_start_notification setting)
Toggles whether current user's video is enabled @group_call_id : Int32 (Group call identifier) @is_my_video_enabled : Bool (Pass true if the current user's video is enabled)
Toggles whether current user's video is paused @group_call_id : Int32 (Group call identifier) @is_my_video_paused : Bool (Pass true if the current user's video is paused)
Toggles whether new participants of a group call can be unmuted only by administrators of the group call. Requires groupCall.can_toggle_mute_new_participants group call flag @group_call_id : Int32 (Group call identifier) @mute_new_participants : Bool (New value of the mute_new_participants setting)
Toggles whether a group call participant hand is rased @group_call_id : Int32 (Group call identifier) @participant_id : TD::MessageSender (Participant identifier) @is_hand_raised : Bool (Pass true if the user's hand needs to be raised. Only self hand can be raised. Requires groupCall.can_be_managed group call flag to lower other's hand)
Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves @group_call_id : Int32 (Group call identifier) @participant_id : TD::MessageSender (Participant identifier) @is_muted : Bool (Pass true if the user must be muted and false otherwise)
Pauses or unpauses screen sharing in a joined group call @group_call_id : Int32 (Group call identifier) @is_paused : Bool (True if screen sharing is paused)
Changes the block state of a message sender. Currently, only users and supergroup chats can be blocked @sender_id : TD::MessageSender (Identifier of a message sender to block) @is_blocked : Bool (New value of is_blocked)
Toggles whether a session can accept incoming calls @session_id : String (Session identifier) @can_accept_calls : Bool (True, if incoming calls can be accepted by the session)
Toggles whether a session can accept incoming secret chats @session_id : String (Session identifier) @can_accept_secret_chats : Bool (True, if incoming secret chats can be accepted by the session)
Toggles whether the message history of a supergroup is available to new members; requires can_change_info administrator right @supergroup_id : Int64 (The identifier of the supergroup) @is_all_history_available : Bool (The new value of is_all_history_available)
Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup @supergroup_id : Int64 (Identifier of the supergroup)
Toggles whether sender signature is added to sent messages in a channel; requires can_change_info administrator right @supergroup_id : Int64 (Identifier of the channel) @sign_messages : Bool (New value of sign_messages)
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 @chat_id : Int64 (Chat identifier) @user_id : Int64 (Identifier of the user to which transfer the ownership. The ownership can't be transferred to a bot or to a deleted user) @password : String (The password of the current user)
Removes all pinned messages from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @chat_id : Int64 (Identifier of the chat)
Removes a pinned message from a chat; requires can_pin_messages rights in the group or can_edit_messages rights in the channel @chat_id : Int64 (Identifier of the chat) @message_id : Int64 (Identifier of the removed pinned message)
Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires creator privileges. Deactivates the original basic group @chat_id : Int64 (Identifier of the chat to upgrade)
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 @file : TD::InputFile (File to upload) @file_type : TD::FileType (File type; pass null if unknown) @priority : Int32 (Priority of the upload (1-32). The higher the priority, the earlier the file will be uploaded. If the priorities of two files are equal, then the first one for which uploadFile was called will be uploaded first)
Uploads a file with a sticker; returns the uploaded file @user_id : Int64 (Sticker file owner; ignored for regular users) @sticker : TD::InputSticker (Sticker file to upload)
Validates the order information provided by a user and returns the available shipping options for a flexible invoice @chat_id : Int64 (Chat identifier of the Invoice message) @message_id : Int64 (Message identifier) @order_info : TD::OrderInfo (The order information, provided by the user; pass null if empty) @allow_save : Bool (True, if the order information can be saved)
Informs TDLib that messages are being viewed by the user. Sponsored messages must be marked as viewed only when the entire text of the message is shown on the screen (excluding the button). Many useful activities depend on whether the messages are currently being viewed or not (e.g., marking messages as read, incrementing a view counter, updating a view counter, removing deleted messages in supergroups and channels) @chat_id : Int64 (Chat identifier) @message_thread_id : Int64 (If not 0, a message thread identifier in which the messages are being viewed) @message_ids : Array(Int64) (The identifiers of the messages being viewed) @force_read : Bool (True, if messages in closed chats must be marked as read by the request)
Informs the server that some trending sticker sets have been viewed by the user @sticker_set_ids : Array(String) (Identifiers of viewed trending sticker sets)
Writes a part of a generated file. This method is intended to be used only if the application has no direct access to TDLib's file system, because it is usually slower than a direct write to the destination file @generation_id : String (The identifier of the generation process) @offset : Int32 (The offset from which to write the data to the file) @data : String (The data to write)