Module: TD::ClientMethods
- Defined in:
- lib/tdlib/client_methods.rb
Overview
This is a generated module from current TDLib scheme It contains all available TDLib methods
Instance Method Summary collapse
-
#accept_call(call_id:, protocol:) ⇒ TD::Types::Ok
Accepts an incoming call.
-
#accept_terms_of_service(terms_of_service_id:) ⇒ TD::Types::Ok
Accepts Telegram terms of services.
-
#activate_story_stealth_mode ⇒ TD::Types::Ok
Activates stealth mode for stories, which hides all views of stories from the current user in the last “story_stealth_mode_past_period” seconds and for the next “story_stealth_mode_future_period” seconds; for Telegram Premium users only.
-
#add_bot_media_preview(bot_user_id:, language_code:, content:) ⇒ TD::Types::BotMediaPreview
Adds a new media preview to the beginning of the list of media previews of a bot.
-
#add_chat_folder_by_invite_link(invite_link:, chat_ids:) ⇒ TD::Types::Ok
Adds a chat folder by an invite link.
-
#add_chat_member(chat_id:, user_id:, forward_limit:) ⇒ TD::Types::FailedToAddMembers
Adds a new member to a chat; requires can_invite_users member right.
-
#add_chat_members(chat_id:, user_ids:) ⇒ TD::Types::FailedToAddMembers
Adds multiple new members to a chat; requires can_invite_users member right.
-
#add_chat_to_list(chat_id:, chat_list:) ⇒ TD::Types::Ok
Adds a chat to a chat list.
-
#add_contact(contact: nil, share_phone_number:) ⇒ TD::Types::Ok
Adds a user to the contact list or edits an existing contact by their user identifier.
-
#add_custom_server_language_pack(language_pack_id:) ⇒ TD::Types::Ok
Adds a custom server language pack to the list of installed language packs in current localization target.
-
#add_favorite_sticker(sticker:) ⇒ TD::Types::Ok
Adds a new sticker to the list of favorite stickers.
-
#add_file_to_downloads(file_id:, chat_id:, message_id:, priority:) ⇒ TD::Types::File
Adds a file from a message to the list of file downloads.
-
#add_local_message(chat_id:, sender_id:, reply_to:, disable_notification:, input_message_content:) ⇒ TD::Types::Message
Adds a local message to a chat.
-
#add_log_message(verbosity_level:, text:) ⇒ TD::Types::Ok
Adds a message to TDLib internal log.
-
#add_message_reaction(chat_id:, message_id:, reaction_type:, is_big:, update_recent_reactions:) ⇒ TD::Types::Ok
Adds a reaction or a tag to a message.
-
#add_network_statistics(entry:) ⇒ TD::Types::Ok
Adds the specified data to data usage statistics.
-
#add_paid_message_reaction(chat_id:, message_id:, star_count:, is_anonymous:) ⇒ TD::Types::Ok
Adds the paid message reaction to a message.
-
#add_proxy(server:, port:, enable:, type:) ⇒ TD::Types::Proxy
Adds a proxy server for network requests.
-
#add_quick_reply_shortcut_inline_query_result_message(shortcut_name:, reply_to_message_id:, query_id:, result_id:, hide_via_bot:) ⇒ TD::Types::QuickReplyMessage
Adds a message to a quick reply shortcut via inline bot.
-
#add_quick_reply_shortcut_message(shortcut_name:, reply_to_message_id:, input_message_content:) ⇒ TD::Types::QuickReplyMessage
Adds a message to a quick reply shortcut.
-
#add_quick_reply_shortcut_message_album(shortcut_name:, reply_to_message_id:, input_message_contents:) ⇒ TD::Types::QuickReplyMessages
Adds 2-10 messages grouped together into an album to a quick reply shortcut.
-
#add_recent_sticker(is_attached:, sticker:) ⇒ TD::Types::Stickers
Manually adds a new sticker to the list of recently used stickers.
-
#add_recently_found_chat(chat_id:) ⇒ TD::Types::Ok
Adds a chat to the list of recently found chats.
-
#add_saved_animation(animation:) ⇒ TD::Types::Ok
Manually adds a new animation to the list of saved animations.
-
#add_saved_notification_sound(sound:) ⇒ TD::Types::NotificationSound
Adds a new notification sound to the list of saved notification sounds.
-
#add_sticker_to_set(user_id:, name:, sticker:) ⇒ TD::Types::Ok
Adds a new sticker to a set.
-
#allow_bot_to_send_messages(bot_user_id:) ⇒ TD::Types::Ok
Allows the specified bot to send messages to the user.
-
#answer_callback_query(callback_query_id:, text:, show_alert:, url:, cache_time:) ⇒ TD::Types::Ok
Sets the result of a callback query; for bots only.
-
#answer_custom_query(custom_query_id:, data:) ⇒ TD::Types::Ok
Answers a custom query; for bots only.
-
#answer_inline_query(inline_query_id:, is_personal:, button:, results:, cache_time:, next_offset:) ⇒ TD::Types::Ok
Sets the result of an inline query; for bots only.
-
#answer_pre_checkout_query(pre_checkout_query_id:, error_message:) ⇒ TD::Types::Ok
Sets the result of a pre-checkout query; for bots only.
-
#answer_shipping_query(shipping_query_id:, shipping_options:, error_message:) ⇒ TD::Types::Ok
Sets the result of a shipping query; for bots only.
-
#answer_web_app_query(web_app_query_id:, result:) ⇒ TD::Types::SentWebAppMessage
Sets the result of interaction with a Web App and sends corresponding message on behalf of the user to the chat from which the query originated; for bots only.
-
#apply_premium_gift_code(code:) ⇒ TD::Types::Ok
Applies a Telegram Premium gift code.
-
#assign_app_store_transaction(receipt:, purpose:) ⇒ TD::Types::Ok
Informs server about a purchase through App Store.
-
#assign_google_play_transaction(package_name:, store_product_id:, purchase_token:, purpose:) ⇒ TD::Types::Ok
Informs server about a purchase through Google Play.
-
#ban_chat_member(chat_id:, member_id:, banned_until_date:, revoke_messages:) ⇒ TD::Types::Ok
Bans a member in a chat; requires can_restrict_members administrator right.
-
#block_message_sender_from_replies(message_id:, delete_message:, delete_all_messages:, report_spam:) ⇒ TD::Types::Ok
Blocks an original sender of a message in the Replies chat.
-
#boost_chat(chat_id:, slot_ids:) ⇒ TD::Types::ChatBoostSlots
Boosts a chat and returns the list of available chat boost slots for the current user after the boost.
-
#can_bot_send_messages(bot_user_id:) ⇒ TD::Types::Ok
Checks whether the specified bot can send messages to the user.
-
#can_purchase_from_store(purpose:) ⇒ TD::Types::Ok
Checks whether an in-store purchase is possible.
-
#can_send_message_to_user(user_id:, only_local:) ⇒ TD::Types::CanSendMessageToUserResult
Check whether the current user can message another user or try to create a chat with them.
-
#can_send_story(chat_id:) ⇒ TD::Types::CanSendStoryResult
Checks whether the current user can send a story on behalf of a chat; requires can_post_stories right for supergroup and channel chats.
-
#can_transfer_ownership ⇒ TD::Types::CanTransferOwnershipResult
Checks whether the current session can be used to transfer a chat ownership to another user.
-
#cancel_download_file(file_id:, only_if_pending:) ⇒ TD::Types::Ok
Stops the downloading of a file.
-
#cancel_password_reset ⇒ TD::Types::Ok
Cancels reset of 2-step verification password.
-
#cancel_preliminary_upload_file(file_id:) ⇒ TD::Types::Ok
Stops the preliminary uploading of a file.
-
#cancel_recovery_email_address_verification ⇒ TD::Types::PasswordState
Cancels verification of the 2-step verification recovery email address.
-
#change_imported_contacts(contacts:) ⇒ TD::Types::ImportedContacts
Changes imported contacts using the list of contacts saved on the device.
-
#change_sticker_set(set_id:, is_installed:, is_archived:) ⇒ TD::Types::Ok
Installs/uninstalls or activates/archives a sticker set.
-
#check_authentication_bot_token(token:) ⇒ TD::Types::Ok
Checks the authentication token of a bot; to log in as a bot.
-
#check_authentication_code(code:) ⇒ TD::Types::Ok
Checks the authentication code.
-
#check_authentication_email_code(code:) ⇒ TD::Types::Ok
Checks the authentication of an email address.
-
#check_authentication_password(password:) ⇒ TD::Types::Ok
Checks the 2-step verification password for correctness.
-
#check_authentication_password_recovery_code(recovery_code:) ⇒ TD::Types::Ok
Checks whether a 2-step verification password recovery code sent to an email address is valid.
-
#check_chat_folder_invite_link(invite_link:) ⇒ TD::Types::ChatFolderInviteLinkInfo
Checks the validity of an invite link for a chat folder and returns information about the corresponding chat folder.
-
#check_chat_invite_link(invite_link:) ⇒ TD::Types::ChatInviteLinkInfo
Checks the validity of an invite link for a chat and returns information about the corresponding chat.
-
#check_chat_username(chat_id:, username:) ⇒ TD::Types::CheckChatUsernameResult
Checks whether a username can be set for a chat.
-
#check_created_public_chats_limit(type:) ⇒ TD::Types::Ok
Checks whether the maximum number of owned public chats has been reached.
-
#check_email_address_verification_code(code:) ⇒ TD::Types::Ok
Checks the email address verification code for Telegram Passport.
-
#check_login_email_address_code(code:) ⇒ TD::Types::Ok
Checks the login email address authentication.
-
#check_password_recovery_code(recovery_code:) ⇒ TD::Types::Ok
Checks whether a 2-step verification password recovery code sent to an email address is valid.
-
#check_phone_number_code(code:) ⇒ TD::Types::Ok
Check the authentication code and completes the request for which the code was sent if appropriate.
-
#check_premium_gift_code(code:) ⇒ TD::Types::PremiumGiftCodeInfo
Return information about a Telegram Premium gift code.
-
#check_quick_reply_shortcut_name(name:) ⇒ TD::Types::Ok
Checks validness of a name for a quick reply shortcut.
-
#check_recovery_email_address_code(code:) ⇒ TD::Types::PasswordState
Checks the 2-step verification recovery email address verification code.
-
#check_sticker_set_name(name:) ⇒ TD::Types::CheckStickerSetNameResult
Checks whether a name can be used for a new sticker set.
-
#clean_file_name(file_name:) ⇒ TD::Types::Text
Removes potentially dangerous characters from the name of a file.
-
#clear_all_draft_messages(exclude_secret_chats:) ⇒ TD::Types::Ok
Clears message drafts in all chats.
-
#clear_autosave_settings_exceptions ⇒ TD::Types::Ok
Clears the list of all autosave settings exceptions.
-
#clear_imported_contacts ⇒ TD::Types::Ok
Clears all imported contacts, contact list remains unchanged.
-
#clear_recent_emoji_statuses ⇒ TD::Types::Ok
Clears the list of recently used emoji statuses for self status.
-
#clear_recent_reactions ⇒ TD::Types::Ok
Clears the list of recently used reactions.
-
#clear_recent_stickers(is_attached:) ⇒ TD::Types::Ok
Clears the list of recently used stickers.
-
#clear_recently_found_chats ⇒ TD::Types::Ok
Clears the list of recently found chats.
-
#clear_searched_for_tags(clear_cashtags:) ⇒ TD::Types::Ok
Clears the list of recently searched for hashtags or cashtags.
-
#click_animated_emoji_message(chat_id:, message_id:) ⇒ TD::Types::Sticker
Informs TDLib that a message with an animated emoji was clicked by the user.
-
#click_chat_sponsored_message(chat_id:, message_id:) ⇒ TD::Types::Ok
Informs TDLib that the user opened the sponsored chat via the button, the name, the photo, or a mention in the sponsored message.
-
#click_premium_subscription_button ⇒ TD::Types::Ok
Informs TDLib that the user clicked Premium subscription button on the Premium features screen.
-
#close ⇒ TD::Types::Ok
Closes the TDLib instance.
-
#close_chat(chat_id:) ⇒ TD::Types::Ok
Informs TDLib that the chat is closed by the user.
-
#close_secret_chat(secret_chat_id:) ⇒ TD::Types::Ok
Closes a secret chat, effectively transferring its state to secretChatStateClosed.
-
#close_story(story_sender_chat_id:, story_id:) ⇒ TD::Types::Ok
Informs TDLib that a story is closed by the user.
-
#close_web_app(web_app_launch_id:) ⇒ TD::Types::Ok
Informs TDLib that a previously opened Web App was closed.
-
#confirm_qr_code_authentication(link:) ⇒ TD::Types::Session
Confirms QR code authentication on another device.
-
#confirm_session(session_id:) ⇒ TD::Types::Ok
Confirms an unconfirmed session of the current user from another device.
-
#create_basic_group_chat(basic_group_id:, force:) ⇒ TD::Types::Chat
Returns an existing chat corresponding to a known basic group.
-
#create_business_chat_link(link_info:) ⇒ TD::Types::BusinessChatLink
Creates a business chat link for the current account.
-
#create_call(user_id:, protocol:, is_video:) ⇒ TD::Types::CallId
Creates a new call.
-
#create_chat_folder(folder:) ⇒ TD::Types::ChatFolderInfo
Creates new chat folder.
-
#create_chat_folder_invite_link(chat_folder_id:, name:, chat_ids:) ⇒ TD::Types::ChatFolderInviteLink
Creates a new invite link for a chat folder.
-
#create_chat_invite_link(chat_id:, name:, expiration_date:, member_limit:, creates_join_request:) ⇒ TD::Types::ChatInviteLink
Creates a new invite link for a chat.
-
#create_chat_subscription_invite_link(chat_id:, name:, subscription_pricing:) ⇒ TD::Types::ChatInviteLink
Creates a new subscription invite link for a channel chat.
-
#create_forum_topic(chat_id:, name:, icon:) ⇒ TD::Types::ForumTopicInfo
Creates a topic in a forum supergroup chat; requires can_manage_topics administrator or can_create_topics member right in the supergroup.
-
#create_invoice_link(invoice:) ⇒ TD::Types::HttpUrl
Creates a link for the given invoice; for bots only.
-
#create_new_basic_group_chat(user_ids: nil, title:, message_auto_delete_time:) ⇒ TD::Types::CreatedBasicGroupChat
Creates a new basic group and sends a corresponding messageBasicGroupChatCreate.
-
#create_new_secret_chat(user_id:) ⇒ TD::Types::Chat
Creates a new secret chat.
-
#create_new_sticker_set(user_id:, title:, name: nil, sticker_type:, needs_repainting:, stickers:, source: nil) ⇒ TD::Types::StickerSet
Creates a new sticker set.
-
#create_new_supergroup_chat(title:, is_forum:, is_channel:, description:, location:, message_auto_delete_time:, for_import:) ⇒ TD::Types::Chat
Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate.
-
#create_private_chat(user_id:, force:) ⇒ TD::Types::Chat
Returns an existing chat corresponding to a given user.
-
#create_secret_chat(secret_chat_id:) ⇒ TD::Types::Chat
Returns an existing chat corresponding to a known secret chat.
-
#create_supergroup_chat(supergroup_id:, force:) ⇒ TD::Types::Chat
Returns an existing chat corresponding to a known supergroup or channel.
-
#create_temporary_password(password:, valid_for:) ⇒ TD::Types::TemporaryPasswordState
Creates a new temporary password for processing payments.
-
#create_video_chat(chat_id:, title: nil, start_date:, is_rtmp_stream:) ⇒ TD::Types::GroupCallId
Creates a video chat (a group call bound to a chat).
-
#delete_account(reason: nil, password:) ⇒ TD::Types::Ok
Deletes the account of the current user, deleting all information associated with the user from the server.
-
#delete_all_call_messages(revoke:) ⇒ TD::Types::Ok
Deletes all call messages.
-
#delete_all_revoked_chat_invite_links(chat_id:, creator_user_id:) ⇒ TD::Types::Ok
Deletes all revoked chat invite links created by a given chat administrator.
-
#delete_bot_media_previews(bot_user_id:, language_code:, file_ids:) ⇒ TD::Types::Ok
Delete media previews from the list of media previews of a bot.
-
#delete_business_chat_link(link:) ⇒ TD::Types::Ok
Deletes a business chat link of the current account.
-
#delete_business_connected_bot(bot_user_id:) ⇒ TD::Types::Ok
Deletes the business bot that is connected to the current user account.
-
#delete_chat(chat_id:) ⇒ TD::Types::Ok
Deletes a chat along with all messages in the corresponding chat for all chat members.
-
#delete_chat_background(chat_id:, restore_previous:) ⇒ TD::Types::Ok
Deletes background in a specific chat.
-
#delete_chat_folder(chat_folder_id:, leave_chat_ids:) ⇒ TD::Types::Ok
Deletes existing chat folder.
-
#delete_chat_folder_invite_link(chat_folder_id:, invite_link:) ⇒ TD::Types::Ok
Deletes an invite link for a chat folder.
-
#delete_chat_history(chat_id:, remove_from_chat_list:, revoke:) ⇒ TD::Types::Ok
Deletes all messages in the chat.
-
#delete_chat_messages_by_date(chat_id:, min_date:, max_date:, revoke:) ⇒ TD::Types::Ok
Deletes all messages between the specified dates in a chat.
-
#delete_chat_messages_by_sender(chat_id:, sender_id:) ⇒ TD::Types::Ok
Deletes all messages sent by the specified message sender in a chat.
-
#delete_chat_reply_markup(chat_id:, message_id:) ⇒ TD::Types::Ok
Deletes the default reply markup from a chat.
-
#delete_commands(scope:, language_code:) ⇒ TD::Types::Ok
Deletes commands supported by the bot for the given user scope and language; for bots only.
-
#delete_default_background(for_dark_theme:) ⇒ TD::Types::Ok
Deletes default background for chats.
-
#delete_file(file_id:) ⇒ TD::Types::Ok
Deletes a file from the TDLib file cache.
-
#delete_forum_topic(chat_id:, message_thread_id:) ⇒ TD::Types::Ok
Deletes all messages in a forum topic; requires can_delete_messages administrator right in the supergroup unless the user is creator of the topic, the topic has no messages from other users and has at most 11 messages.
-
#delete_language_pack(language_pack_id:) ⇒ TD::Types::Ok
Deletes all information about a language pack in the current localization target.
-
#delete_messages(chat_id:, message_ids:, revoke:) ⇒ TD::Types::Ok
Deletes messages.
-
#delete_passport_element(type:) ⇒ TD::Types::Ok
Deletes a Telegram Passport element.
-
#delete_profile_photo(profile_photo_id:) ⇒ TD::Types::Ok
Deletes a profile photo.
-
#delete_quick_reply_shortcut(shortcut_id:) ⇒ TD::Types::Ok
Deletes a quick reply shortcut.
-
#delete_quick_reply_shortcut_messages(shortcut_id:, message_ids:) ⇒ TD::Types::Ok
Deletes specified quick reply messages.
-
#delete_revoked_chat_invite_link(chat_id:, invite_link:) ⇒ TD::Types::Ok
Deletes revoked chat invite links.
-
#delete_saved_credentials ⇒ TD::Types::Ok
Deletes saved credentials for all payment provider bots.
-
#delete_saved_messages_topic_history(saved_messages_topic_id:) ⇒ TD::Types::Ok
Deletes all messages in a Saved Messages topic.
-
#delete_saved_messages_topic_messages_by_date(saved_messages_topic_id:, min_date:, max_date:) ⇒ TD::Types::Ok
Deletes all messages between the specified dates in a Saved Messages topic.
-
#delete_saved_order_info ⇒ TD::Types::Ok
Deletes saved order information.
-
#delete_sticker_set(name:) ⇒ TD::Types::Ok
Completely deletes a sticker set.
-
#delete_story(story_sender_chat_id:, story_id:) ⇒ TD::Types::Ok
Deletes a previously sent story.
-
#destroy ⇒ TD::Types::Ok
Closes the TDLib instance, destroying all local data without a proper logout.
-
#disable_all_supergroup_usernames(supergroup_id:) ⇒ TD::Types::Ok
Disables all active non-editable usernames of a supergroup or channel, requires owner privileges in the supergroup or channel.
-
#disable_proxy ⇒ TD::Types::Ok
Disables the currently enabled proxy.
-
#discard_call(call_id:, is_disconnected:, duration:, is_video:, connection_id:) ⇒ TD::Types::Ok
Discards a call.
-
#disconnect_all_websites ⇒ TD::Types::Ok
Disconnects all websites from the current user’s Telegram account.
-
#disconnect_website(website_id:) ⇒ TD::Types::Ok
Disconnects website from the current user’s Telegram account.
-
#download_file(file_id:, priority:, offset:, limit:, synchronous:) ⇒ TD::Types::File
Downloads a file from the cloud.
-
#edit_bot_media_preview(bot_user_id:, language_code:, file_id:, content:) ⇒ TD::Types::BotMediaPreview
Replaces media preview in the list of media previews of a bot.
-
#edit_business_chat_link(link:, link_info:) ⇒ TD::Types::BusinessChatLink
Edits a business chat link of the current account.
-
#edit_business_message_caption(business_connection_id:, chat_id:, message_id:, reply_markup:, caption:, show_caption_above_media:) ⇒ TD::Types::BusinessMessage
Edits the caption of a message sent on behalf of a business account; for bots only.
-
#edit_business_message_live_location(business_connection_id:, chat_id:, message_id:, reply_markup:, location:, live_period:, heading:, proximity_alert_radius:) ⇒ TD::Types::BusinessMessage
Edits the content of a live location in a message sent on behalf of a business account; for bots only.
-
#edit_business_message_media(business_connection_id:, chat_id:, message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::BusinessMessage
Edits the content of a message with an animation, an audio, a document, a photo or a video in a message sent on behalf of a business account; for bots only.
-
#edit_business_message_reply_markup(business_connection_id:, chat_id:, message_id:, reply_markup:) ⇒ TD::Types::BusinessMessage
Edits the reply markup of a message sent on behalf of a business account; for bots only.
-
#edit_business_message_text(business_connection_id:, chat_id:, message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::BusinessMessage
Edits the text of a text or game message sent on behalf of a business account; for bots only.
-
#edit_chat_folder(chat_folder_id:, folder:) ⇒ TD::Types::ChatFolderInfo
Edits existing chat folder.
-
#edit_chat_folder_invite_link(chat_folder_id:, invite_link:, name:, chat_ids:) ⇒ TD::Types::ChatFolderInviteLink
Edits an invite link for a chat folder.
-
#edit_chat_invite_link(chat_id:, invite_link:, name:, expiration_date:, member_limit:, creates_join_request:) ⇒ TD::Types::ChatInviteLink
Edits a non-primary invite link for a chat.
-
#edit_chat_subscription_invite_link(chat_id:, invite_link:, name:) ⇒ TD::Types::ChatInviteLink
Edits a subscription invite link for a channel chat.
-
#edit_custom_language_pack_info(info:) ⇒ TD::Types::Ok
Edits information about a custom local language pack in the current localization target.
-
#edit_forum_topic(chat_id:, message_thread_id:, name: nil, edit_icon_custom_emoji:, icon_custom_emoji_id:) ⇒ TD::Types::Ok
Edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics right in the supergroup unless the user is creator of the topic.
-
#edit_inline_message_caption(inline_message_id:, reply_markup:, caption:, show_caption_above_media:) ⇒ TD::Types::Ok
Edits the caption of an inline message sent via a bot; for bots only.
-
#edit_inline_message_live_location(inline_message_id:, reply_markup:, location:, live_period:, heading:, proximity_alert_radius:) ⇒ TD::Types::Ok
Edits the content of a live location in an inline message sent via a bot; for bots only.
-
#edit_inline_message_media(inline_message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::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.
-
#edit_inline_message_reply_markup(inline_message_id:, reply_markup:) ⇒ TD::Types::Ok
Edits the reply markup of an inline message sent via a bot; for bots only.
-
#edit_inline_message_text(inline_message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::Ok
Edits the text of an inline text or game message sent via a bot; for bots only.
-
#edit_message_caption(chat_id:, message_id:, reply_markup:, caption:, show_caption_above_media:) ⇒ TD::Types::Message
Edits the message content caption.
-
#edit_message_live_location(chat_id:, message_id:, reply_markup:, location:, live_period:, heading:, proximity_alert_radius:) ⇒ TD::Types::Message
Edits the message content of a live location.
-
#edit_message_media(chat_id:, message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::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:, message_id:, reply_markup:) ⇒ TD::Types::Message
Edits the message reply markup; for bots only.
-
#edit_message_scheduling_state(chat_id:, message_id:, scheduling_state:) ⇒ TD::Types::Ok
Edits the time when a scheduled message will be sent.
-
#edit_message_text(chat_id:, message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::Message
Edits the text of a message (or a text of a game message).
-
#edit_proxy(proxy_id:, server:, port:, enable:, type:) ⇒ TD::Types::Proxy
Edits an existing proxy server for network requests.
-
#edit_quick_reply_message(shortcut_id:, message_id:, input_message_content:) ⇒ TD::Types::Ok
Asynchronously edits the text, media or caption of a quick reply message.
-
#edit_star_subscription(subscription_id:, is_canceled:) ⇒ TD::Types::Ok
Cancels or reenables Telegram Star subscription to a channel.
-
#edit_story(story_sender_chat_id:, story_id:, content:, areas:, caption:) ⇒ TD::Types::Ok
Changes content and caption of a story.
-
#edit_story_cover(story_sender_chat_id:, story_id:, cover_frame_timestamp:) ⇒ TD::Types::Ok
Changes cover of a video story.
-
#enable_proxy(proxy_id:) ⇒ TD::Types::Ok
Enables a proxy.
-
#end_group_call(group_call_id:) ⇒ TD::Types::Ok
Ends a group call.
-
#end_group_call_recording(group_call_id:) ⇒ TD::Types::Ok
Ends recording of an active group call.
-
#end_group_call_screen_sharing(group_call_id:) ⇒ TD::Types::Ok
Ends screen sharing in a joined group call.
-
#finish_file_generation(generation_id:, error:) ⇒ TD::Types::Ok
Finishes the file generation.
-
#forward_messages(chat_id:, message_thread_id:, from_chat_id:, message_ids:, options:, send_copy:, remove_caption:) ⇒ TD::Types::Messages
Forwards previously sent messages.
-
#get_account_ttl ⇒ TD::Types::AccountTtl
Returns the period of inactivity after which the account of the current user will automatically be deleted.
-
#get_active_sessions ⇒ TD::Types::Sessions
Returns all active sessions of the current user.
-
#get_all_passport_elements(password:) ⇒ TD::Types::PassportElements
Returns all available Telegram Passport elements.
-
#get_all_sticker_emojis(sticker_type:, query:, chat_id:, return_only_main_emoji:) ⇒ TD::Types::Emojis
Returns unique emoji that correspond to stickers to be found by the getStickers(sticker_type, query, 1000000, chat_id).
-
#get_animated_emoji(emoji:) ⇒ TD::Types::AnimatedEmoji
Returns an animated emoji corresponding to a given emoji.
-
#get_application_config ⇒ TD::Types::JsonValue
Returns application config, provided by the server.
-
#get_application_download_link ⇒ TD::Types::HttpUrl
Returns the link for downloading official Telegram application to be used when the current user invites friends to Telegram.
-
#get_archive_chat_list_settings ⇒ TD::Types::ArchiveChatListSettings
Returns settings for automatic moving of chats to and from the Archive chat lists.
-
#get_archived_sticker_sets(sticker_type:, offset_sticker_set_id:, limit:) ⇒ TD::Types::StickerSets
Returns a list of archived sticker sets.
-
#get_attached_sticker_sets(file_id:) ⇒ TD::Types::StickerSets
Returns a list of sticker sets attached to a file, including regular, mask, and emoji sticker sets.
-
#get_attachment_menu_bot(bot_user_id:) ⇒ TD::Types::AttachmentMenuBot
Returns information about a bot that can be added to attachment or side menu.
-
#get_authorization_state ⇒ TD::Types::AuthorizationState
Returns the current authorization state; this is an offline request.
-
#get_auto_download_settings_presets ⇒ TD::Types::AutoDownloadSettingsPresets
Returns auto-download settings presets for the current user.
-
#get_autosave_settings ⇒ TD::Types::AutosaveSettings
Returns autosave settings for the current user.
-
#get_available_chat_boost_slots ⇒ TD::Types::ChatBoostSlots
Returns the list of available chat boost slots for the current user.
-
#get_background_url(name:, type:) ⇒ TD::Types::HttpUrl
Constructs a persistent HTTP URL for a background.
-
#get_bank_card_info(bank_card_number:) ⇒ TD::Types::BankCardInfo
Returns information about a bank card.
-
#get_basic_group(basic_group_id:) ⇒ TD::Types::BasicGroup
Returns information about a basic group by its identifier.
-
#get_basic_group_full_info(basic_group_id:) ⇒ TD::Types::BasicGroupFullInfo
Returns full information about a basic group by its identifier.
-
#get_blocked_message_senders(block_list:, offset:, limit:) ⇒ TD::Types::MessageSenders
Returns users and chats that were blocked by the current user.
-
#get_bot_info_description(bot_user_id:, language_code:) ⇒ TD::Types::Text
Returns the text shown in the chat with a bot if the chat is empty in the given language.
-
#get_bot_info_short_description(bot_user_id:, language_code:) ⇒ TD::Types::Text
Returns the text shown on a bot’s profile page and sent together with the link when users share the bot in the given language.
-
#get_bot_media_preview_info(bot_user_id:, language_code:) ⇒ TD::Types::BotMediaPreviewInfo
Returns the list of media previews for the given language and the list of languages for which the bot has dedicated previews.
-
#get_bot_media_previews(bot_user_id:) ⇒ TD::Types::BotMediaPreviews
Returns the list of media previews of a bot.
-
#get_bot_name(bot_user_id:, language_code:) ⇒ TD::Types::Text
Returns the name of a bot in the given language.
-
#get_business_chat_link_info(link_name:) ⇒ TD::Types::BusinessChatLinkInfo
Returns information about a business chat link.
-
#get_business_chat_links ⇒ TD::Types::BusinessChatLinks
Returns business chat links created for the current account.
-
#get_business_connected_bot ⇒ TD::Types::BusinessConnectedBot
Returns the business bot that is connected to the current user account.
-
#get_business_connection(connection_id:) ⇒ TD::Types::BusinessConnection
Returns information about a business connection by its identifier; for bots only.
-
#get_business_features(source:) ⇒ TD::Types::BusinessFeatures
Returns information about features, available to Business users.
-
#get_callback_query_answer(chat_id:, message_id:, payload:) ⇒ TD::Types::CallbackQueryAnswer
Sends a callback query to a bot and returns an answer.
-
#get_callback_query_message(chat_id:, message_id:, callback_query_id:) ⇒ TD::Types::Message
Returns information about a message with the callback button that originated a callback query; for bots only.
-
#get_chat(chat_id:) ⇒ TD::Types::Chat
Returns information about a chat by its identifier; this is an offline request if the current user is not a bot.
-
#get_chat_active_stories(chat_id:) ⇒ TD::Types::ChatActiveStories
Returns the list of active stories posted by the given chat.
-
#get_chat_administrators(chat_id:) ⇒ TD::Types::ChatAdministrators
Returns a list of administrators of the chat with their custom titles.
-
#get_chat_archived_stories(chat_id:, from_story_id:, limit:) ⇒ TD::Types::Stories
Returns the list of all stories posted by the given chat; requires can_edit_stories right in the chat.
-
#get_chat_available_message_senders(chat_id:) ⇒ TD::Types::ChatMessageSenders
Returns the list of message sender identifiers, which can be used to send messages in a chat.
-
#get_chat_boost_features(is_channel:) ⇒ TD::Types::ChatBoostFeatures
Returns the list of features available for different chat boost levels; this is an offline request.
-
#get_chat_boost_level_features(is_channel:, level:) ⇒ TD::Types::ChatBoostLevelFeatures
Returns the list of features available on the specific chat boost level; this is an offline request.
-
#get_chat_boost_link(chat_id:) ⇒ TD::Types::ChatBoostLink
Returns an HTTPS link to boost the specified supergroup or channel chat.
-
#get_chat_boost_link_info(url:) ⇒ TD::Types::ChatBoostLinkInfo
Returns information about a link to boost a chat.
-
#get_chat_boost_status(chat_id:) ⇒ TD::Types::ChatBoostStatus
Returns the current boost status for a supergroup or a channel chat.
-
#get_chat_boosts(chat_id:, only_gift_codes:, offset:, limit:) ⇒ TD::Types::FoundChatBoosts
Returns the list of boosts applied to a chat; requires administrator rights in the chat.
-
#get_chat_event_log(chat_id:, query:, from_event_id:, limit:, filters:, user_ids:) ⇒ TD::Types::ChatEvents
Returns a list of service actions taken by chat members and administrators in the last 48 hours.
-
#get_chat_folder(chat_folder_id:) ⇒ TD::Types::ChatFolder
Returns information about a chat folder by its identifier.
-
#get_chat_folder_chat_count(folder:) ⇒ TD::Types::Count
Returns approximate number of chats in a being created chat folder.
-
#get_chat_folder_chats_to_leave(chat_folder_id:) ⇒ TD::Types::Chats
Returns identifiers of pinned or always included chats from a chat folder, which are suggested to be left when the chat folder is deleted.
-
#get_chat_folder_default_icon_name(folder:) ⇒ TD::Types::ChatFolderIcon
Returns default icon name for a folder.
-
#get_chat_folder_invite_links(chat_folder_id:) ⇒ TD::Types::ChatFolderInviteLinks
Returns invite links created by the current user for a shareable chat folder.
-
#get_chat_folder_new_chats(chat_folder_id:) ⇒ TD::Types::Chats
Returns new chats added to a shareable chat folder by its owner.
-
#get_chat_history(chat_id:, from_message_id:, offset:, limit:, only_local:) ⇒ TD::Types::Messages
Returns messages in a chat.
-
#get_chat_invite_link(chat_id:, invite_link:) ⇒ TD::Types::ChatInviteLink
Returns information about an invite link.
-
#get_chat_invite_link_counts(chat_id:) ⇒ TD::Types::ChatInviteLinkCounts
Returns the list of chat administrators with number of their invite links.
-
#get_chat_invite_link_members(chat_id:, invite_link:, only_with_expired_subscription:, offset_member:, limit:) ⇒ TD::Types::ChatInviteLinkMembers
Returns chat members joined a chat via an invite link.
-
#get_chat_invite_links(chat_id:, creator_user_id:, is_revoked:, offset_date:, offset_invite_link:, limit:) ⇒ TD::Types::ChatInviteLinks
Returns invite links for a chat created by specified administrator.
-
#get_chat_join_requests(chat_id:, invite_link:, query:, offset_request:, limit:) ⇒ TD::Types::ChatJoinRequests
Returns pending join requests in a chat.
-
#get_chat_lists_to_add_chat(chat_id:) ⇒ TD::Types::ChatLists
Returns chat lists to which the chat can be added.
-
#get_chat_member(chat_id:, member_id:) ⇒ TD::Types::ChatMember
Returns information about a single member of a chat.
-
#get_chat_message_by_date(chat_id:, date:) ⇒ TD::Types::Message
Returns the last message sent in a chat no later than the specified date.
-
#get_chat_message_calendar(chat_id:, filter:, from_message_id:, saved_messages_topic_id:) ⇒ TD::Types::MessageCalendar
Returns information about the next messages of the specified type in the chat split by days.
-
#get_chat_message_count(chat_id:, filter:, saved_messages_topic_id:, return_local:) ⇒ TD::Types::Count
Returns approximate number of messages of the specified type in the chat.
-
#get_chat_message_position(chat_id:, message_id:, filter:, message_thread_id:, saved_messages_topic_id:) ⇒ TD::Types::Count
Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat.
-
#get_chat_notification_settings_exceptions(scope:, compare_sound:) ⇒ TD::Types::Chats
Returns the list of chats with non-default notification settings for new messages.
-
#get_chat_pinned_message(chat_id:) ⇒ TD::Types::Message
Returns information about a newest pinned message in the chat.
-
#get_chat_posted_to_chat_page_stories(chat_id:, from_story_id:, limit:) ⇒ TD::Types::Stories
Returns the list of stories that posted by the given chat to its chat page.
-
#get_chat_revenue_statistics(chat_id:, is_dark:) ⇒ TD::Types::ChatRevenueStatistics
Returns detailed revenue statistics about a chat.
-
#get_chat_revenue_transactions(chat_id:, offset:, limit:) ⇒ TD::Types::ChatRevenueTransactions
Returns the list of revenue transactions for a chat.
-
#get_chat_revenue_withdrawal_url(chat_id:, password:) ⇒ TD::Types::HttpUrl
Returns a URL for chat revenue withdrawal; requires owner privileges in the chat.
-
#get_chat_scheduled_messages(chat_id:) ⇒ TD::Types::Messages
Returns all scheduled messages in a chat.
-
#get_chat_similar_chat_count(chat_id:, return_local:) ⇒ TD::Types::Count
Returns approximate number of chats similar to the given chat.
-
#get_chat_similar_chats(chat_id:) ⇒ TD::Types::Chats
Returns a list of chats similar to the given chat.
-
#get_chat_sparse_message_positions(chat_id:, filter:, from_message_id:, limit:, saved_messages_topic_id:) ⇒ TD::Types::MessagePositions
Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.
-
#get_chat_sponsored_messages(chat_id:) ⇒ TD::Types::SponsoredMessages
Returns sponsored messages to be shown in a chat; for channel chats only.
-
#get_chat_statistics(chat_id:, is_dark:) ⇒ TD::Types::ChatStatistics
Returns detailed statistics about a chat.
-
#get_chat_story_interactions(story_sender_chat_id:, story_id:, reaction_type:, prefer_forwards:, offset:, limit:) ⇒ TD::Types::StoryInteractions
Returns interactions with a story posted in a chat.
-
#get_chats(chat_list:, limit:) ⇒ TD::Types::Chats
Returns an ordered list of chats from the beginning of a chat list.
-
#get_chats_for_chat_folder_invite_link(chat_folder_id:) ⇒ TD::Types::Chats
Returns identifiers of chats from a chat folder, suitable for adding to a chat folder invite link.
-
#get_chats_to_send_stories ⇒ TD::Types::Chats
Returns supergroup and channel chats in which the current user has the right to post stories.
-
#get_close_friends ⇒ TD::Types::Users
Returns all close friends of the current user.
-
#get_collectible_item_info(type:) ⇒ TD::Types::CollectibleItemInfo
Returns information about a given collectible item that was purchased at fragment.com.
-
#get_commands(scope:, language_code:) ⇒ TD::Types::BotCommands
Returns the list of commands supported by the bot for the given user scope and language; for bots only.
-
#get_connected_websites ⇒ TD::Types::ConnectedWebsites
Returns all website where the current user used Telegram to log in.
-
#get_contacts ⇒ TD::Types::Users
Returns all contacts of the user.
-
#get_countries ⇒ TD::Types::Countries
Returns information about existing countries.
-
#get_country_code ⇒ TD::Types::Text
Uses the current IP address to find the current country.
-
#get_country_flag_emoji(country_code:) ⇒ TD::Types::Text
Returns an emoji for the given country.
-
#get_created_public_chats(type:) ⇒ TD::Types::Chats
Returns a list of public chats of the specified type, owned by the user.
-
#get_current_state ⇒ TD::Types::Updates
Returns all updates needed to restore current TDLib state, i.e.
-
#get_current_weather(location:) ⇒ TD::Types::CurrentWeather
Returns the current weather in the given location.
-
#get_custom_emoji_reaction_animations ⇒ TD::Types::Stickers
Returns TGS stickers with generic animations for custom emoji reactions.
-
#get_custom_emoji_stickers(custom_emoji_ids:) ⇒ TD::Types::Stickers
Returns the list of custom emoji stickers by their identifiers.
-
#get_database_statistics ⇒ TD::Types::DatabaseStatistics
Returns database statistics.
-
#get_deep_link_info(link:) ⇒ TD::Types::DeepLinkInfo
Returns information about a tg:// deep link.
-
#get_default_background_custom_emoji_stickers ⇒ TD::Types::Stickers
Returns default list of custom emoji stickers for reply background.
-
#get_default_chat_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns default emoji statuses for chats.
-
#get_default_chat_photo_custom_emoji_stickers ⇒ TD::Types::Stickers
Returns default list of custom emoji stickers for placing on a chat photo.
-
#get_default_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns default emoji statuses for self status.
-
#get_default_message_auto_delete_time ⇒ TD::Types::MessageAutoDeleteTime
Returns default message auto-delete time setting for new chats.
-
#get_default_profile_photo_custom_emoji_stickers ⇒ TD::Types::Stickers
Returns default list of custom emoji stickers for placing on a profile photo.
-
#get_disallowed_chat_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns the list of emoji statuses, which can’t be used as chat emoji status, even they are from a sticker set with is_allowed_as_chat_emoji_status == true.
-
#get_emoji_categories(type:) ⇒ TD::Types::EmojiCategories
Returns available emoji categories.
-
#get_emoji_reaction(emoji:) ⇒ TD::Types::EmojiReaction
Returns information about an emoji reaction.
-
#get_emoji_suggestions_url(language_code:) ⇒ TD::Types::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:, allow_write_access:) ⇒ TD::Types::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:) ⇒ TD::Types::LoginUrlInfo
Returns information about an action to be done when the current user clicks an external link.
-
#get_favorite_stickers ⇒ TD::Types::Stickers
Returns favorite stickers.
-
#get_file(file_id:) ⇒ TD::Types::File
Returns information about a file; this is an offline request.
-
#get_file_downloaded_prefix_size(file_id:, offset:) ⇒ TD::Types::FileDownloadedPrefixSize
Returns file downloaded prefix size from a given offset, in bytes.
-
#get_file_extension(mime_type:) ⇒ TD::Types::Text
Returns the extension of a file, guessed by its MIME type.
-
#get_file_mime_type(file_name:) ⇒ TD::Types::Text
Returns the MIME type of a file, guessed by its extension.
-
#get_forum_topic(chat_id:, message_thread_id:) ⇒ TD::Types::ForumTopic
Returns information about a forum topic.
-
#get_forum_topic_default_icons ⇒ TD::Types::Stickers
Returns the list of custom emoji, which can be used as forum topic icon by all users.
-
#get_forum_topic_link(chat_id:, message_thread_id:) ⇒ TD::Types::MessageLink
Returns an HTTPS link to a topic in a forum chat.
-
#get_forum_topics(chat_id:, query:, offset_date:, offset_message_id:, offset_message_thread_id:, limit:) ⇒ TD::Types::ForumTopics
Returns found forum topics in a forum chat.
-
#get_game_high_scores(chat_id:, message_id:, user_id:) ⇒ TD::Types::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.
-
#get_greeting_stickers ⇒ TD::Types::Stickers
Returns greeting stickers from regular sticker sets that can be used for the start page of other users.
-
#get_group_call(group_call_id:) ⇒ TD::Types::GroupCall
Returns information about a group call.
-
#get_group_call_invite_link(group_call_id:, can_self_unmute:) ⇒ TD::Types::HttpUrl
Returns invite link to a video chat in a public chat.
-
#get_group_call_stream_segment(group_call_id:, time_offset:, scale:, channel_id:, video_quality:) ⇒ TD::Types::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.
-
#get_group_call_streams(group_call_id:) ⇒ TD::Types::GroupCallStreams
Returns information about available group call streams.
-
#get_groups_in_common(user_id:, offset_chat_id:, limit:) ⇒ TD::Types::Chats
Returns a list of common group chats with a given user.
-
#get_imported_contact_count ⇒ TD::Types::Count
Returns the total number of imported contacts.
-
#get_inactive_supergroup_chats ⇒ TD::Types::Chats
Returns a list of recently inactive supergroups and channels.
-
#get_inline_game_high_scores(inline_message_id:, user_id:) ⇒ TD::Types::GameHighScores
Returns game high scores and some part of the high score table in the range of the specified user; for bots only.
-
#get_inline_query_results(bot_user_id:, chat_id:, user_location:, query:, offset:) ⇒ TD::Types::InlineQueryResults
Sends an inline query to a bot and returns its results.
-
#get_installed_backgrounds(for_dark_theme:) ⇒ TD::Types::Backgrounds
Returns backgrounds installed by the user.
-
#get_installed_sticker_sets(sticker_type:) ⇒ TD::Types::StickerSets
Returns a list of installed sticker sets.
-
#get_internal_link(type:, is_http:) ⇒ TD::Types::HttpUrl
Returns an HTTPS or a tg: link with the given type.
-
#get_internal_link_type(link:) ⇒ TD::Types::InternalLinkType
Returns information about the type of internal link.
-
#get_json_string(json_value:) ⇒ TD::Types::Text
Converts a JsonValue object to corresponding JSON-serialized string.
-
#get_json_value(json:) ⇒ TD::Types::JsonValue
Converts a JSON-serialized string to corresponding JsonValue object.
-
#get_keyword_emojis(text:, input_language_codes: nil) ⇒ TD::Types::Emojis
Return emojis matching the keyword.
-
#get_language_pack_info(language_pack_id:) ⇒ TD::Types::LanguagePackInfo
Returns information about a language pack.
-
#get_language_pack_string(language_pack_database_path:, localization_target:, language_pack_id:, key:) ⇒ TD::Types::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:, keys:) ⇒ TD::Types::LanguagePackStrings
Returns strings from a language pack in the current localization target by their keys.
-
#get_link_preview(text:, link_preview_options:) ⇒ TD::Types::LinkPreview
Returns a link preview by the text of a message.
-
#get_localization_target_info(only_local:) ⇒ TD::Types::LocalizationTargetInfo
Returns information about the current localization target.
-
#get_log_stream ⇒ TD::Types::LogStream
Returns information about currently used log stream for internal logging of TDLib.
-
#get_log_tag_verbosity_level(tag:) ⇒ TD::Types::LogVerbosityLevel
Returns current verbosity level for a specified TDLib internal log tag.
-
#get_log_tags ⇒ TD::Types::LogTags
Returns the list of available TDLib internal log tags, for example, [“actor”, “binlog”, “connections”, “notifications”, “proxy”].
-
#get_log_verbosity_level ⇒ TD::Types::LogVerbosityLevel
Returns current verbosity level of the internal logging of TDLib.
-
#get_login_url(chat_id:, message_id:, button_id:, allow_write_access:) ⇒ TD::Types::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.
-
#get_login_url_info(chat_id:, message_id:, button_id:) ⇒ TD::Types::LoginUrlInfo
Returns information about a button of type inlineKeyboardButtonTypeLoginUrl.
-
#get_main_web_app(chat_id:, bot_user_id:, start_parameter:, theme:, application_name:) ⇒ TD::Types::MainWebApp
Returns information needed to open the main Web App of a bot.
-
#get_map_thumbnail_file(location:, zoom:, width:, height:, scale:, chat_id:) ⇒ TD::Types::File
Returns information about a file with a map thumbnail in PNG format.
-
#get_markdown_text(text:) ⇒ TD::Types::FormattedText
Replaces text entities with Markdown formatting in a human-friendly format.
-
#get_me ⇒ TD::Types::User
Returns the current user.
-
#get_menu_button(user_id:) ⇒ TD::Types::BotMenuButton
Returns menu button set by the bot for the given user; for bots only.
-
#get_message(chat_id:, message_id:) ⇒ TD::Types::Message
Returns information about a message.
-
#get_message_added_reactions(chat_id:, message_id:, reaction_type:, offset:, limit:) ⇒ TD::Types::AddedReactions
Returns reactions added for a message, along with their sender.
-
#get_message_available_reactions(chat_id:, message_id:, row_size:) ⇒ TD::Types::AvailableReactions
Returns reactions, which can be added to a message.
-
#get_message_effect(effect_id:) ⇒ TD::Types::MessageEffect
Returns information about a message effect.
-
#get_message_embedding_code(chat_id:, message_id:, for_album:) ⇒ TD::Types::Text
Returns an HTML code for embedding the message.
-
#get_message_file_type(message_file_head:) ⇒ TD::Types::MessageFileType
Returns information about a file with messages exported from another application.
-
#get_message_import_confirmation_text(chat_id:) ⇒ TD::Types::Text
Returns a confirmation text to be shown to the user before starting message import.
-
#get_message_link(chat_id:, message_id:, media_timestamp:, for_album:, in_message_thread:) ⇒ TD::Types::MessageLink
Returns an HTTPS link to a message in a chat.
-
#get_message_link_info(url:) ⇒ TD::Types::MessageLinkInfo
Returns information about a public or private message link.
-
#get_message_locally(chat_id:, message_id:) ⇒ TD::Types::Message
Returns information about a message, if it is available without sending network request.
-
#get_message_properties(chat_id:, message_id:) ⇒ TD::Types::MessageProperties
Returns properties of a message; this is an offline request.
-
#get_message_public_forwards(chat_id:, message_id:, offset:, limit:) ⇒ TD::Types::PublicForwards
Returns forwarded copies of a channel message to different public channels and public reposts as a story.
-
#get_message_read_date(chat_id:, message_id:) ⇒ TD::Types::MessageReadDate
Returns read date of a recent outgoing message in a private chat.
-
#get_message_statistics(chat_id:, message_id:, is_dark:) ⇒ TD::Types::MessageStatistics
Returns detailed statistics about a message.
-
#get_message_thread(chat_id:, message_id:) ⇒ TD::Types::MessageThreadInfo
Returns information about a message thread.
-
#get_message_thread_history(chat_id:, message_id:, from_message_id:, offset:, limit:) ⇒ TD::Types::Messages
Returns messages in a message thread of a message.
-
#get_message_viewers(chat_id:, message_id:) ⇒ TD::Types::MessageViewers
Returns viewers of a recent outgoing message in a basic group or a supergroup chat.
-
#get_messages(chat_id:, message_ids:) ⇒ TD::Types::Messages
Returns information about messages.
-
#get_network_statistics(only_current:) ⇒ TD::Types::NetworkStatistics
Returns network data usage statistics.
-
#get_new_chat_privacy_settings ⇒ TD::Types::NewChatPrivacySettings
Returns privacy settings for new chat creation.
-
#get_option(name:) ⇒ TD::Types::OptionValue
Returns the value of an option by its name.
-
#get_owned_sticker_sets(offset_sticker_set_id:, limit:) ⇒ TD::Types::StickerSets
Returns sticker sets owned by the current user.
-
#get_passport_authorization_form(bot_user_id:, scope:, public_key:, nonce:) ⇒ TD::Types::PassportAuthorizationForm
Returns a Telegram Passport authorization form for sharing data with a service.
-
#get_passport_authorization_form_available_elements(authorization_form_id:, password:) ⇒ TD::Types::PassportElementsWithErrors
Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization form.
-
#get_passport_element(type:, password:) ⇒ TD::Types::PassportElement
Returns one of the available Telegram Passport elements.
-
#get_password_state ⇒ TD::Types::PasswordState
Returns the current state of 2-step verification.
-
#get_payment_form(input_invoice:, theme:) ⇒ TD::Types::PaymentForm
Returns an invoice payment form.
-
#get_payment_receipt(chat_id:, message_id:) ⇒ TD::Types::PaymentReceipt
Returns information about a successful payment.
-
#get_phone_number_info(phone_number_prefix:) ⇒ TD::Types::PhoneNumberInfo
Returns information about a phone number by its prefix.
-
#get_phone_number_info_sync(language_code:, phone_number_prefix:) ⇒ TD::Types::PhoneNumberInfo
Returns information about a phone number by its prefix synchronously.
-
#get_poll_voters(chat_id:, message_id:, option_id:, offset:, limit:) ⇒ TD::Types::MessageSenders
Returns message senders voted for the specified option in a non-anonymous polls.
-
#get_popular_web_app_bots(offset:, limit:) ⇒ TD::Types::FoundUsers
Returns popular Web App bots.
-
#get_preferred_country_language(country_code:) ⇒ TD::Types::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_premium_features(source:) ⇒ TD::Types::PremiumFeatures
Returns information about features, available to Premium users.
-
#get_premium_gift_code_payment_options(boosted_chat_id:) ⇒ TD::Types::PremiumGiftCodePaymentOptions
Returns available options for Telegram Premium gift code or giveaway creation.
-
#get_premium_giveaway_info(chat_id:, message_id:) ⇒ TD::Types::PremiumGiveawayInfo
Returns information about a Telegram Premium giveaway.
-
#get_premium_limit(limit_type:) ⇒ TD::Types::PremiumLimit
Returns information about a limit, increased for Premium users.
-
#get_premium_state ⇒ TD::Types::PremiumState
Returns state of Telegram Premium subscription and promotion videos for Premium features.
-
#get_premium_sticker_examples ⇒ TD::Types::Stickers
Returns examples of premium stickers for demonstration purposes.
-
#get_premium_stickers(limit:) ⇒ TD::Types::Stickers
Returns premium stickers from regular sticker sets.
-
#get_proxies ⇒ TD::Types::Proxies
Returns the list of proxies that are currently set up.
-
#get_proxy_link(proxy_id:) ⇒ TD::Types::HttpUrl
Returns an HTTPS link, which can be used to add a proxy.
-
#get_push_receiver_id(payload:) ⇒ TD::Types::PushReceiverId
Returns a globally unique push notification subscription identifier for identification of an account, which has received a push notification.
-
#get_read_date_privacy_settings ⇒ TD::Types::ReadDatePrivacySettings
Returns privacy settings for message read date.
-
#get_recent_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns recent emoji statuses for self status.
-
#get_recent_inline_bots ⇒ TD::Types::Users
Returns up to 20 recently used inline bots in the order of their last usage.
-
#get_recent_stickers(is_attached:) ⇒ TD::Types::Stickers
Returns a list of recently used stickers.
-
#get_recently_opened_chats(limit:) ⇒ TD::Types::Chats
Returns recently opened chats; this is an offline request.
-
#get_recently_visited_t_me_urls(referrer:) ⇒ TD::Types::TMeUrls
Returns t.me URLs recently visited by a newly registered user.
-
#get_recommended_chat_folders ⇒ TD::Types::RecommendedChatFolders
Returns recommended chat folders for the current user.
-
#get_recommended_chats ⇒ TD::Types::Chats
Returns a list of channel chats recommended to the current user.
-
#get_recovery_email_address(password:) ⇒ TD::Types::RecoveryEmailAddress
Returns a 2-step verification recovery email address that was previously set up.
-
#get_remote_file(remote_file_id:, file_type:) ⇒ TD::Types::File
Returns information about a file by its remote identifier; this is an offline request.
-
#get_replied_message(chat_id:, message_id:) ⇒ TD::Types::Message
Returns information about a non-bundled message that is replied by a given message.
-
#get_saved_animations ⇒ TD::Types::Animations
Returns saved animations.
-
#get_saved_messages_tags(saved_messages_topic_id:) ⇒ TD::Types::SavedMessagesTags
Returns tags used in Saved Messages or a Saved Messages topic.
-
#get_saved_messages_topic_history(saved_messages_topic_id:, from_message_id:, offset:, limit:) ⇒ TD::Types::Messages
Returns messages in a Saved Messages topic.
-
#get_saved_messages_topic_message_by_date(saved_messages_topic_id:, date:) ⇒ TD::Types::Message
Returns the last message sent in a Saved Messages topic no later than the specified date.
-
#get_saved_notification_sound(notification_sound_id:) ⇒ TD::Types::NotificationSounds
Returns saved notification sound by its identifier.
-
#get_saved_notification_sounds ⇒ TD::Types::NotificationSounds
Returns the list of saved notification sounds.
-
#get_saved_order_info ⇒ TD::Types::OrderInfo
Returns saved order information.
-
#get_scope_notification_settings(scope:) ⇒ TD::Types::ScopeNotificationSettings
Returns the notification settings for chats of a given type.
-
#get_searched_for_tags(tag_prefix:, limit:) ⇒ TD::Types::Hashtags
Returns recently searched for hashtags or cashtags by their prefix.
-
#get_secret_chat(secret_chat_id:) ⇒ TD::Types::SecretChat
Returns information about a secret chat by its identifier.
-
#get_star_ad_account_url(owner_id:) ⇒ TD::Types::HttpUrl
Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for the chat paid in the owned Telegram Stars.
-
#get_star_gift_payment_options(user_id:) ⇒ TD::Types::StarPaymentOptions
Returns available options for Telegram Stars gifting.
-
#get_star_payment_options ⇒ TD::Types::StarPaymentOptions
Returns available options for Telegram Stars purchase.
-
#get_star_revenue_statistics(owner_id:, is_dark:) ⇒ TD::Types::StarRevenueStatistics
Returns detailed Telegram Star revenue statistics.
-
#get_star_subscriptions(only_expiring:, offset:) ⇒ TD::Types::StarSubscriptions
Returns the list of Telegram Star subscriptions for the current user.
-
#get_star_transactions(owner_id:, subscription_id:, direction:, offset:, limit:) ⇒ TD::Types::StarTransactions
Returns the list of Telegram Star transactions for the specified owner.
-
#get_star_withdrawal_url(owner_id:, star_count:, password:) ⇒ TD::Types::HttpUrl
Returns a URL for Telegram Star withdrawal.
-
#get_statistical_graph(chat_id:, token:, x:) ⇒ TD::Types::StatisticalGraph
Loads an asynchronous or a zoomed in statistical graph.
-
#get_sticker_emojis(sticker:) ⇒ TD::Types::Emojis
Returns emoji corresponding to a sticker.
-
#get_sticker_set(set_id:) ⇒ TD::Types::StickerSet
Returns information about a sticker set by its identifier.
-
#get_stickers(sticker_type:, query: nil, limit:, chat_id:) ⇒ TD::Types::Stickers
Returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by sticker-specific keywords.
-
#get_storage_statistics(chat_limit:) ⇒ TD::Types::StorageStatistics
Returns storage usage statistics.
-
#get_storage_statistics_fast ⇒ TD::Types::StorageStatisticsFast
Quickly returns approximate storage usage statistics.
-
#get_story(story_sender_chat_id:, story_id:, only_local:) ⇒ TD::Types::Story
Returns a story.
-
#get_story_available_reactions(row_size:) ⇒ TD::Types::AvailableReactions
Returns reactions, which can be chosen for a story.
-
#get_story_interactions(story_id:, query: nil, only_contacts:, prefer_forwards:, prefer_with_reaction:, offset:, limit:) ⇒ TD::Types::StoryInteractions
Returns interactions with a story.
-
#get_story_notification_settings_exceptions ⇒ TD::Types::Chats
Returns the list of chats with non-default notification settings for stories.
-
#get_story_public_forwards(story_sender_chat_id:, story_id:, offset:, limit:) ⇒ TD::Types::PublicForwards
Returns forwards of a story as a message to public chats and reposts by public channels.
-
#get_story_statistics(chat_id:, story_id:, is_dark:) ⇒ TD::Types::StoryStatistics
Returns detailed statistics about a story.
-
#get_suggested_file_name(file_id:, directory:) ⇒ TD::Types::Text
Returns suggested name for saving a file in a given directory.
-
#get_suggested_sticker_set_name(title:) ⇒ TD::Types::Text
Returns a suggested name for a new sticker set with a given title.
-
#get_suitable_discussion_chats ⇒ TD::Types::Chats
Returns a list of basic group and supergroup chats, which can be used as a discussion group for a channel.
-
#get_suitable_personal_chats ⇒ TD::Types::Chats
Returns a list of channel chats, which can be used as a personal chat.
-
#get_supergroup(supergroup_id:) ⇒ TD::Types::Supergroup
Returns information about a supergroup or a channel by its identifier.
-
#get_supergroup_full_info(supergroup_id:) ⇒ TD::Types::SupergroupFullInfo
Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute.
-
#get_supergroup_members(supergroup_id:, filter:, offset:, limit:) ⇒ TD::Types::ChatMembers
Returns information about members or banned users in a supergroup or channel.
-
#get_support_name ⇒ TD::Types::Text
Returns localized name of the Telegram support user; for Telegram support only.
-
#get_support_user ⇒ TD::Types::User
Returns a user that can be contacted to get support.
-
#get_temporary_password_state ⇒ TD::Types::TemporaryPasswordState
Returns information about the current temporary password.
-
#get_text_entities(text:) ⇒ TD::Types::TextEntities
Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses) found in the text.
-
#get_theme_parameters_json_string(theme:) ⇒ TD::Types::Text
Converts a themeParameters object to corresponding JSON-serialized string.
-
#get_themed_chat_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns up to 8 emoji statuses, which must be shown in the emoji status list for chats.
-
#get_themed_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns up to 8 emoji statuses, which must be shown right after the default Premium Badge in the emoji status list for self status.
-
#get_time_zones ⇒ TD::Types::TimeZones
Returns the list of supported time zones.
-
#get_top_chats(category:, limit:) ⇒ TD::Types::Chats
Returns a list of frequently used chats.
-
#get_trending_sticker_sets(sticker_type:, offset:, limit:) ⇒ TD::Types::TrendingStickerSets
Returns a list of trending sticker sets.
-
#get_user(user_id:) ⇒ TD::Types::User
Returns information about a user by their identifier.
-
#get_user_chat_boosts(chat_id:, user_id:) ⇒ TD::Types::FoundChatBoosts
Returns the list of boosts applied to a chat by a given user; requires administrator rights in the chat; for bots only.
-
#get_user_full_info(user_id:) ⇒ TD::Types::UserFullInfo
Returns full information about a user by their identifier.
-
#get_user_link ⇒ TD::Types::UserLink
Returns an HTTPS link, which can be used to get information about the current user.
-
#get_user_privacy_setting_rules(setting:) ⇒ TD::Types::UserPrivacySettingRules
Returns the current privacy settings.
-
#get_user_profile_photos(user_id:, offset:, limit:) ⇒ TD::Types::ChatPhotos
Returns the profile photos of a user.
-
#get_user_support_info(user_id:) ⇒ TD::Types::UserSupportInfo
Returns support information for the given user; for Telegram support only.
-
#get_video_chat_available_participants(chat_id:) ⇒ TD::Types::MessageSenders
Returns the list of participant identifiers, on whose behalf a video chat in the chat can be joined.
-
#get_video_chat_rtmp_url(chat_id:) ⇒ TD::Types::RtmpUrl
Returns RTMP URL for streaming to the chat; requires owner privileges.
-
#get_web_app_link_url(chat_id:, bot_user_id:, web_app_short_name:, start_parameter:, theme:, application_name:, allow_write_access:) ⇒ TD::Types::HttpUrl
Returns an HTTPS URL of a Web App to open after a link of the type internalLinkTypeWebApp is clicked.
-
#get_web_app_url(bot_user_id:, url:, theme:, application_name:) ⇒ TD::Types::HttpUrl
Returns an HTTPS URL of a Web App to open from the side menu, a keyboardButtonTypeWebApp button, or an inlineQueryResultsButtonTypeWebApp button.
-
#get_web_page_instant_view(url:, force_full:) ⇒ TD::Types::WebPageInstantView
Returns an instant view version of a web page if available.
-
#hide_contact_close_birthdays ⇒ TD::Types::Ok
Hides the list of contacts that have close birthdays for 24 hours.
-
#hide_suggested_action(action:) ⇒ TD::Types::Ok
Hides a suggested action.
-
#import_contacts(contacts:) ⇒ TD::Types::ImportedContacts
Adds new contacts or edits existing contacts by their phone numbers; contacts’ user identifiers are ignored.
-
#import_messages(chat_id:, message_file:, attached_files:) ⇒ TD::Types::Ok
Imports messages exported from another app.
-
#invite_group_call_participants(group_call_id:, user_ids:) ⇒ TD::Types::Ok
Invites users to an active group call.
-
#join_chat(chat_id:) ⇒ TD::Types::Ok
Adds the current user as a new member to a chat.
-
#join_chat_by_invite_link(invite_link:) ⇒ TD::Types::Chat
Uses an invite link to add the current user to the chat if possible.
-
#join_group_call(group_call_id:, participant_id:, audio_source_id:, payload:, is_muted:, is_my_video_enabled:, invite_hash:) ⇒ TD::Types::Text
Joins an active group call.
-
#launch_prepaid_premium_giveaway(giveaway_id:, parameters:) ⇒ TD::Types::Ok
Launches a prepaid Telegram Premium giveaway.
-
#leave_chat(chat_id:) ⇒ TD::Types::Ok
Removes the current user from chat members.
-
#leave_group_call(group_call_id:) ⇒ TD::Types::Ok
Leaves a group call.
-
#load_active_stories(story_list:) ⇒ TD::Types::Ok
Loads more active stories from a story list.
-
#load_chats(chat_list:, limit:) ⇒ TD::Types::Ok
Loads more chats from a chat list.
-
#load_group_call_participants(group_call_id:, limit:) ⇒ TD::Types::Ok
Loads more participants of a group call.
-
#load_quick_reply_shortcut_messages(shortcut_id:) ⇒ TD::Types::Ok
Loads quick reply messages that can be sent by a given quick reply shortcut.
-
#load_quick_reply_shortcuts ⇒ TD::Types::Ok
Loads quick reply shortcuts created by the current user.
-
#load_saved_messages_topics(limit:) ⇒ TD::Types::Ok
Loads more Saved Messages topics.
-
#log_out ⇒ TD::Types::Ok
Closes the TDLib instance after a proper logout.
-
#open_chat(chat_id:) ⇒ TD::Types::Ok
Informs TDLib that the chat is opened by the user.
-
#open_chat_similar_chat(chat_id:, opened_chat_id:) ⇒ TD::Types::Ok
Informs TDLib that a chat was opened from the list of similar chats.
-
#open_message_content(chat_id:, message_id:) ⇒ TD::Types::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).
-
#open_story(story_sender_chat_id:, story_id:) ⇒ TD::Types::Ok
Informs TDLib that a story is opened and is being viewed by the user.
-
#open_web_app(chat_id:, bot_user_id:, url:, theme:, application_name:, message_thread_id:, reply_to:) ⇒ TD::Types::WebAppInfo
Informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp button.
-
#optimize_storage(size:, ttl:, count:, immunity_delay:, file_types:, chat_ids:, exclude_chat_ids:, return_deleted_file_statistics:, chat_limit:) ⇒ TD::Types::StorageStatistics
Optimizes storage usage, i.e.
-
#parse_markdown(text:) ⇒ TD::Types::FormattedText
Parses Markdown entities in a human-friendly format, ignoring markup errors.
-
#parse_text_entities(text:, parse_mode:) ⇒ TD::Types::FormattedText
Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text.
-
#pin_chat_message(chat_id:, message_id:, disable_notification:, only_for_self:) ⇒ TD::Types::Ok
Pins a message in a chat.
-
#ping_proxy(proxy_id:) ⇒ TD::Types::Seconds
Computes time needed to receive a response from a Telegram server through a proxy.
-
#preliminary_upload_file(file:, file_type:, priority:) ⇒ TD::Types::File
Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being recorded voice and video notes.
-
#process_chat_folder_new_chats(chat_folder_id:, added_chat_ids:) ⇒ TD::Types::Ok
Process new chats added to a shareable chat folder by its owner.
-
#process_chat_join_request(chat_id:, user_id:, approve:) ⇒ TD::Types::Ok
Handles a pending join request in a chat.
-
#process_chat_join_requests(chat_id:, invite_link:, approve:) ⇒ TD::Types::Ok
Handles all pending join requests for a given link in a chat.
-
#process_push_notification(payload:) ⇒ TD::Types::Ok
Handles a push notification.
-
#rate_speech_recognition(chat_id:, message_id:, is_good:) ⇒ TD::Types::Ok
Rates recognized speech in a video note or a voice note message.
-
#read_all_chat_mentions(chat_id:) ⇒ TD::Types::Ok
Marks all mentions in a chat as read.
-
#read_all_chat_reactions(chat_id:) ⇒ TD::Types::Ok
Marks all reactions in a chat or a forum topic as read.
-
#read_all_message_thread_mentions(chat_id:, message_thread_id:) ⇒ TD::Types::Ok
Marks all mentions in a forum topic as read.
-
#read_all_message_thread_reactions(chat_id:, message_thread_id:) ⇒ TD::Types::Ok
Marks all reactions in a forum topic as read.
-
#read_chat_list(chat_list:) ⇒ TD::Types::Ok
Traverse all chats in a chat list and marks all messages in the chats as read.
-
#read_file_part(file_id:, offset:, count:) ⇒ TD::Types::FilePart
Reads a part of a file from the TDLib file cache and returns read bytes.
-
#readd_quick_reply_shortcut_messages(shortcut_name:, message_ids:) ⇒ TD::Types::QuickReplyMessages
Readds quick reply messages which failed to add.
-
#recognize_speech(chat_id:, message_id:) ⇒ TD::Types::Ok
Recognizes speech in a video note or a voice note message.
-
#recover_authentication_password(recovery_code:, new_password: nil, new_hint: nil) ⇒ TD::Types::Ok
Recovers the 2-step verification password with a password recovery code sent to an email address that was previously set up.
-
#recover_password(recovery_code:, new_password: nil, new_hint: nil) ⇒ TD::Types::PasswordState
Recovers the 2-step verification password using a recovery code sent to an email address that was previously set up.
-
#refund_star_payment(user_id:, telegram_payment_charge_id:) ⇒ TD::Types::Ok
Refunds a previously done payment in Telegram Stars.
-
#register_device(device_token:, other_user_ids:) ⇒ TD::Types::PushReceiverId
Registers the currently used device for receiving push notifications.
-
#register_user(first_name:, last_name:, disable_notification:) ⇒ TD::Types::Ok
Finishes user registration.
-
#remove_all_files_from_downloads(only_active:, only_completed:, delete_from_cache:) ⇒ TD::Types::Ok
Removes all files from the file download list.
-
#remove_business_connected_bot_from_chat(chat_id:) ⇒ TD::Types::Ok
Removes the connected business bot from a specific chat by adding the chat to businessRecipients.excluded_chat_ids.
-
#remove_chat_action_bar(chat_id:) ⇒ TD::Types::Ok
Removes a chat action bar without any other action.
-
#remove_contacts(user_ids:) ⇒ TD::Types::Ok
Removes users from the contact list.
-
#remove_favorite_sticker(sticker:) ⇒ TD::Types::Ok
Removes a sticker from the list of favorite stickers.
-
#remove_file_from_downloads(file_id:, delete_from_cache:) ⇒ TD::Types::Ok
Removes a file from the file download list.
-
#remove_installed_background(background_id:) ⇒ TD::Types::Ok
Removes background from the list of installed backgrounds.
-
#remove_message_reaction(chat_id:, message_id:, reaction_type:) ⇒ TD::Types::Ok
Removes a reaction from a message.
-
#remove_notification(notification_group_id:, notification_id:) ⇒ TD::Types::Ok
Removes an active notification from notification list.
-
#remove_notification_group(notification_group_id:, max_notification_id:) ⇒ TD::Types::Ok
Removes a group of active notifications.
-
#remove_pending_paid_message_reactions(chat_id:, message_id:) ⇒ TD::Types::Ok
Removes all pending paid reactions on a message.
-
#remove_proxy(proxy_id:) ⇒ TD::Types::Ok
Removes a proxy server.
-
#remove_recent_hashtag(hashtag:) ⇒ TD::Types::Ok
Removes a hashtag from the list of recently used hashtags.
-
#remove_recent_sticker(is_attached:, sticker:) ⇒ TD::Types::Ok
Removes a sticker from the list of recently used stickers.
-
#remove_recently_found_chat(chat_id:) ⇒ TD::Types::Ok
Removes a chat from the list of recently found chats.
-
#remove_saved_animation(animation:) ⇒ TD::Types::Ok
Removes an animation from the list of saved animations.
-
#remove_saved_notification_sound(notification_sound_id:) ⇒ TD::Types::Ok
Removes a notification sound from the list of saved notification sounds.
-
#remove_searched_for_tag(tag:) ⇒ TD::Types::Ok
Removes a hashtag or a cashtag from the list of recently searched for hashtags or cashtags.
-
#remove_sticker_from_set(sticker:) ⇒ TD::Types::Ok
Removes a sticker from the set to which it belongs.
-
#remove_top_chat(category:, chat_id:) ⇒ TD::Types::Ok
Removes a chat from the list of frequently used chats.
-
#reorder_active_usernames(usernames:) ⇒ TD::Types::Ok
Changes order of active usernames of the current user.
-
#reorder_bot_active_usernames(bot_user_id:, usernames:) ⇒ TD::Types::Ok
Changes order of active usernames of a bot.
-
#reorder_bot_media_previews(bot_user_id:, language_code:, file_ids:) ⇒ TD::Types::Ok
Changes order of media previews in the list of media previews of a bot.
-
#reorder_chat_folders(chat_folder_ids:, main_chat_list_position:) ⇒ TD::Types::Ok
Changes the order of chat folders.
-
#reorder_installed_sticker_sets(sticker_type:, sticker_set_ids:) ⇒ TD::Types::Ok
Changes the order of installed sticker sets.
-
#reorder_quick_reply_shortcuts(shortcut_ids:) ⇒ TD::Types::Ok
Changes the order of quick reply shortcuts.
-
#reorder_supergroup_active_usernames(supergroup_id:, usernames:) ⇒ TD::Types::Ok
Changes order of active usernames of a supergroup or channel, requires owner privileges in the supergroup or channel.
-
#replace_primary_chat_invite_link(chat_id:) ⇒ TD::Types::ChatInviteLink
Replaces current primary invite link for a chat with a new primary invite link.
-
#replace_sticker_in_set(user_id:, name:, old_sticker:, new_sticker:) ⇒ TD::Types::Ok
Replaces existing sticker in a set.
-
#replace_video_chat_rtmp_url(chat_id:) ⇒ TD::Types::RtmpUrl
Replaces the current RTMP URL for streaming to the chat; requires owner privileges.
-
#report_authentication_code_missing(mobile_network_code:) ⇒ TD::Types::Ok
Reports that authentication code wasn’t delivered via SMS; for official mobile applications only.
-
#report_chat(chat_id:, message_ids: nil, reason:, text:) ⇒ TD::Types::Ok
Reports a chat to the Telegram moderators.
-
#report_chat_photo(chat_id:, file_id:, reason:, text:) ⇒ TD::Types::Ok
Reports a chat photo to the Telegram moderators.
-
#report_chat_sponsored_message(chat_id:, message_id:, option_id: nil) ⇒ TD::Types::ReportChatSponsoredMessageResult
Reports a sponsored message to Telegram moderators.
-
#report_message_reactions(chat_id:, message_id:, sender_id:) ⇒ TD::Types::Ok
Reports reactions set on a message to the Telegram moderators.
-
#report_phone_number_code_missing(mobile_network_code:) ⇒ TD::Types::Ok
Reports that authentication code wasn’t delivered via SMS to the specified phone number; for official mobile applications only.
-
#report_story(story_sender_chat_id:, story_id:, reason:, text:) ⇒ TD::Types::Ok
Reports a story to the Telegram moderators.
-
#report_supergroup_anti_spam_false_positive(supergroup_id:, message_id:) ⇒ TD::Types::Ok
Reports a false deletion of a message by aggressive anti-spam checks; requires administrator rights in the supergroup.
-
#report_supergroup_spam(supergroup_id:, message_ids:) ⇒ TD::Types::Ok
Reports messages in a supergroup as spam; requires administrator rights in the supergroup.
-
#request_authentication_password_recovery ⇒ TD::Types::Ok
Requests to send a 2-step verification password recovery code to an email address that was previously set up.
-
#request_password_recovery ⇒ TD::Types::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:) ⇒ TD::Types::Ok
Requests QR code authentication by scanning a QR code on another logged in device.
-
#resend_authentication_code(reason:) ⇒ TD::Types::Ok
Resends an authentication code to the user.
-
#resend_email_address_verification_code ⇒ TD::Types::EmailAddressAuthenticationCodeInfo
Resends the code to verify an email address to be added to a user’s Telegram Passport.
-
#resend_login_email_address_code ⇒ TD::Types::EmailAddressAuthenticationCodeInfo
Resends the login email address verification code.
-
#resend_messages(chat_id:, message_ids:, quote:) ⇒ TD::Types::Messages
Resends messages which failed to send.
-
#resend_phone_number_code(reason:) ⇒ TD::Types::AuthenticationCodeInfo
Resends the authentication code sent to a phone number.
-
#resend_recovery_email_address_code ⇒ TD::Types::PasswordState
Resends the 2-step verification recovery email address verification code.
-
#reset_all_notification_settings ⇒ TD::Types::Ok
Resets all chat and scope notification settings to their default values.
-
#reset_authentication_email_address ⇒ TD::Types::Ok
Resets the login email address.
-
#reset_installed_backgrounds ⇒ TD::Types::Ok
Resets list of installed backgrounds to its default value.
-
#reset_network_statistics ⇒ TD::Types::Ok
Resets all network data usage statistics to zero.
-
#reset_password ⇒ TD::Types::ResetPasswordResult
Removes 2-step verification password without previous password and access to recovery email address.
-
#reuse_star_subscription(subscription_id:) ⇒ TD::Types::Ok
Reuses an active subscription and joins the subscribed chat again.
-
#revoke_chat_invite_link(chat_id:, invite_link:) ⇒ TD::Types::ChatInviteLinks
Revokes invite link for a chat.
-
#revoke_group_call_invite_link(group_call_id:) ⇒ TD::Types::Ok
Revokes invite link for a group call.
-
#save_application_log_event(type:, chat_id:, data:) ⇒ TD::Types::Ok
Saves application log event on the server.
-
#search_background(name:) ⇒ TD::Types::Background
Searches for a background by its name.
-
#search_call_messages(offset:, limit:, only_missed:) ⇒ TD::Types::FoundMessages
Searches for call messages.
-
#search_chat_members(chat_id:, query:, limit:, filter:) ⇒ TD::Types::ChatMembers
Searches for a specified query in the first name, last name and usernames of the members of a specified chat.
-
#search_chat_messages(chat_id:, query:, sender_id:, from_message_id:, offset:, limit:, filter:, message_thread_id:, saved_messages_topic_id:) ⇒ TD::Types::FoundChatMessages
Searches for messages with given words in the chat.
-
#search_chat_recent_location_messages(chat_id:, limit:) ⇒ TD::Types::Messages
Returns information about the recent locations of chat members that were sent to the chat.
-
#search_chats(query:, limit:) ⇒ TD::Types::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::Types::ChatsNearby
Returns a list of users and location-based supergroups nearby.
-
#search_chats_on_server(query:, limit:) ⇒ TD::Types::Chats
Searches for the specified query in the title and username of already known chats via request to the server.
-
#search_contacts(query: nil, limit:) ⇒ TD::Types::Users
Searches for the specified query in the first names, last names and usernames of the known user contacts.
-
#search_emojis(text:, input_language_codes: nil) ⇒ TD::Types::EmojiKeywords
Searches for emojis by keywords.
-
#search_file_downloads(query: nil, only_active:, only_completed:, offset:, limit:) ⇒ TD::Types::FoundFileDownloads
Searches for files in the file download list or recently downloaded files from the list.
-
#search_hashtags(prefix:, limit:) ⇒ TD::Types::Hashtags
Searches for recently used hashtags by their prefix.
-
#search_installed_sticker_sets(sticker_type:, query:, limit:) ⇒ TD::Types::StickerSets
Searches for installed sticker sets by looking for specified query in their title and name.
-
#search_messages(chat_list:, only_in_channels:, query:, offset:, limit:, filter:, min_date:, max_date:) ⇒ TD::Types::FoundMessages
Searches for messages in all chats except secret chats.
-
#search_outgoing_document_messages(query:, limit:) ⇒ TD::Types::FoundMessages
Searches for outgoing messages with content of the type messageDocument in all chats except secret chats.
-
#search_public_chat(username:) ⇒ TD::Types::Chat
Searches a public chat by its username.
-
#search_public_chats(query:) ⇒ TD::Types::Chats
Searches public chats by looking for specified query in their username and title.
-
#search_public_messages_by_tag(tag:, offset:, limit:) ⇒ TD::Types::FoundMessages
Searches for public channel posts containing the given hashtag or cashtag.
-
#search_public_stories_by_location(address:, offset:, limit:) ⇒ TD::Types::FoundStories
Searches for public stories by the given address location.
-
#search_public_stories_by_tag(tag:, offset:, limit:) ⇒ TD::Types::FoundStories
Searches for public stories containing the given hashtag or cashtag.
-
#search_public_stories_by_venue(venue_provider:, venue_id:, offset:, limit:) ⇒ TD::Types::FoundStories
Searches for public stories from the given venue.
-
#search_quote(text:, quote:, quote_position:) ⇒ TD::Types::FoundPosition
Searches for a given quote in a text.
-
#search_recently_found_chats(query:, limit:) ⇒ TD::Types::Chats
Searches for the specified query in the title and username of up to 50 recently found chats; this is an offline request.
-
#search_saved_messages(saved_messages_topic_id:, tag:, query:, from_message_id:, offset:, limit:) ⇒ TD::Types::FoundChatMessages
Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for Telegram Premium users only.
-
#search_secret_messages(chat_id:, query:, offset:, limit:, filter:) ⇒ TD::Types::FoundMessages
Searches for messages in secret chats.
-
#search_sticker_set(name:) ⇒ TD::Types::StickerSet
Searches for a sticker set by its name.
-
#search_sticker_sets(sticker_type:, query:) ⇒ TD::Types::StickerSets
Searches for sticker sets by looking for specified query in their title and name.
-
#search_stickers(sticker_type: nil, emojis:, limit: nil) ⇒ TD::Types::Stickers
Searches for stickers from public sticker sets that correspond to any of the given emoji.
-
#search_strings_by_prefix(strings:, query:, limit:, return_none_for_empty_query:) ⇒ TD::Types::FoundPositions
Searches specified query by word prefixes in the provided strings.
-
#search_user_by_phone_number(phone_number:, only_local:) ⇒ TD::Types::User
Searches a user by their phone number.
-
#search_user_by_token(token:) ⇒ TD::Types::User
Searches a user by a token from the user’s link.
-
#search_web_app(bot_user_id:, web_app_short_name:) ⇒ TD::Types::FoundWebApp
Returns information about a Web App by its short name.
-
#send_authentication_firebase_sms(token:) ⇒ TD::Types::Ok
Sends Firebase Authentication SMS to the phone number of the user.
-
#send_bot_start_message(bot_user_id:, chat_id:, parameter:) ⇒ TD::Types::Message
Invites a bot to a chat (if it is not yet a member) and sends it the /start command; requires can_invite_users member right.
-
#send_business_message(business_connection_id:, chat_id:, reply_to:, disable_notification:, protect_content:, effect_id:, reply_markup:, input_message_content:) ⇒ TD::Types::BusinessMessage
Sends a message on behalf of a business account; for bots only.
-
#send_business_message_album(business_connection_id:, chat_id:, reply_to:, disable_notification:, protect_content:, effect_id:, input_message_contents:) ⇒ TD::Types::BusinessMessages
Sends 2-10 messages grouped together into an album on behalf of a business account; for bots only.
-
#send_call_debug_information(call_id:, debug_information:) ⇒ TD::Types::Ok
Sends debug information for a call to Telegram servers.
-
#send_call_log(call_id:, log_file:) ⇒ TD::Types::Ok
Sends log file for a call to Telegram servers.
-
#send_call_rating(call_id:, rating:, comment:, problems:) ⇒ TD::Types::Ok
Sends a call rating.
-
#send_call_signaling_data(call_id:, data:) ⇒ TD::Types::Ok
Sends call signaling data.
-
#send_chat_action(chat_id:, message_thread_id:, business_connection_id:, action:) ⇒ TD::Types::Ok
Sends a notification about user activity in a chat.
-
#send_custom_request(method:, parameters:) ⇒ TD::Types::CustomRequestResult
Sends a custom request; for bots only.
-
#send_email_address_verification_code(email_address:) ⇒ TD::Types::EmailAddressAuthenticationCodeInfo
Sends a code to verify an email address to be added to a user’s Telegram Passport.
-
#send_inline_query_result_message(chat_id:, message_thread_id:, reply_to:, options:, query_id:, result_id:, hide_via_bot:) ⇒ TD::Types::Message
Sends the result of an inline query as a message.
-
#send_message(chat_id:, message_thread_id:, reply_to:, options:, reply_markup:, input_message_content:) ⇒ TD::Types::Message
Sends a message.
-
#send_message_album(chat_id:, message_thread_id:, reply_to:, options:, input_message_contents:) ⇒ TD::Types::Messages
Sends 2-10 messages grouped together into an album.
-
#send_passport_authorization_form(authorization_form_id:, types:) ⇒ TD::Types::Ok
Sends a Telegram Passport authorization form, effectively sharing data with the service.
-
#send_payment_form(input_invoice:, payment_form_id:, order_info_id:, shipping_option_id:, credentials:, tip_amount:) ⇒ TD::Types::PaymentResult
Sends a filled-out payment form to the bot for final verification.
-
#send_phone_number_code(phone_number:, settings:, type:) ⇒ TD::Types::AuthenticationCodeInfo
Sends a code to the specified phone number.
-
#send_phone_number_firebase_sms(token:) ⇒ TD::Types::Ok
Sends Firebase Authentication SMS to the specified phone number.
-
#send_quick_reply_shortcut_messages(chat_id:, shortcut_id:, sending_id:) ⇒ TD::Types::Messages
Sends messages from a quick reply shortcut.
-
#send_story(chat_id:, content:, areas:, caption:, privacy_settings:, active_period:, from_story_full_id:, is_posted_to_chat_page:, protect_content:) ⇒ TD::Types::Story
Sends a new story to a chat; requires can_post_stories right for supergroup and channel chats.
-
#send_web_app_custom_request(bot_user_id:, method:, parameters:) ⇒ TD::Types::CustomRequestResult
Sends a custom request from a Web App.
-
#send_web_app_data(bot_user_id:, button_text:, data:) ⇒ TD::Types::Ok
Sends data received from a keyboardButtonTypeWebApp Web App to a bot.
-
#set_accent_color(accent_color_id:, background_custom_emoji_id:) ⇒ TD::Types::Ok
Changes accent color and background custom emoji for the current user; for Telegram Premium users only.
-
#set_account_ttl(ttl:) ⇒ TD::Types::Ok
Changes the period of inactivity after which the account of the current user will automatically be deleted.
-
#set_alarm(seconds:) ⇒ TD::Types::Ok
Succeeds after a specified amount of time has passed.
-
#set_application_verification_token(verification_id:, token:) ⇒ TD::Types::Ok
Application verification has been completed.
-
#set_archive_chat_list_settings(settings:) ⇒ TD::Types::Ok
Changes settings for automatic moving of chats to and from the Archive chat lists.
-
#set_authentication_email_address(email_address:) ⇒ TD::Types::Ok
Sets the email address of the user and sends an authentication code to the email address.
-
#set_authentication_phone_number(phone_number:, settings:) ⇒ TD::Types::Ok
Sets the phone number of the user and sends an authentication code to the user.
-
#set_auto_download_settings(settings:, type:) ⇒ TD::Types::Ok
Sets auto-download settings.
-
#set_autosave_settings(scope:, settings:) ⇒ TD::Types::Ok
Sets autosave settings for the given scope.
-
#set_bio(bio:) ⇒ TD::Types::Ok
Changes the bio of the current user.
-
#set_birthdate(birthdate:) ⇒ TD::Types::Ok
Changes the birthdate of the current user.
-
#set_bot_info_description(bot_user_id:, language_code:, description:) ⇒ TD::Types::Ok
Sets the text shown in the chat with a bot if the chat is empty.
-
#set_bot_info_short_description(bot_user_id:, language_code:, short_description:) ⇒ TD::Types::Ok
Sets the text shown on a bot’s profile page and sent together with the link when users share the bot.
-
#set_bot_name(bot_user_id: nil, language_code: nil, name:) ⇒ TD::Types::Ok
Sets the name of a bot.
-
#set_bot_profile_photo(bot_user_id:, photo:) ⇒ TD::Types::Ok
Changes a profile photo for a bot.
-
#set_bot_updates_status(pending_update_count:, error_message:) ⇒ TD::Types::Ok
Informs the server about the number of pending bot updates if they haven’t been processed for a long time; for bots only.
-
#set_business_away_message_settings(away_message_settings:) ⇒ TD::Types::Ok
Changes the business away message settings of the current user.
-
#set_business_connected_bot(bot:) ⇒ TD::Types::Ok
Adds or changes business bot that is connected to the current user account.
-
#set_business_greeting_message_settings(greeting_message_settings:) ⇒ TD::Types::Ok
Changes the business greeting message settings of the current user.
-
#set_business_location(location:) ⇒ TD::Types::Ok
Changes the business location of the current user.
-
#set_business_message_is_pinned(business_connection_id:, chat_id:, message_id:, is_pinned:) ⇒ TD::Types::Ok
Pins or unpins a message sent on behalf of a business account; for bots only.
-
#set_business_opening_hours(opening_hours:) ⇒ TD::Types::Ok
Changes the business opening hours of the current user.
-
#set_business_start_page(start_page:) ⇒ TD::Types::Ok
Changes the business start page of the current user.
-
#set_chat_accent_color(chat_id:, accent_color_id:, background_custom_emoji_id:) ⇒ TD::Types::Ok
Changes accent color and background custom emoji of a channel chat.
-
#set_chat_active_stories_list(chat_id:, story_list:) ⇒ TD::Types::Ok
Changes story list in which stories from the chat are shown.
-
#set_chat_available_reactions(chat_id:, available_reactions:) ⇒ TD::Types::Ok
Changes reactions, available in a chat.
-
#set_chat_background(chat_id:, background:, type:, dark_theme_dimming:, only_for_self:) ⇒ TD::Types::Ok
Sets the background in a specific chat.
-
#set_chat_client_data(chat_id:, client_data:) ⇒ TD::Types::Ok
Changes application-specific data associated with a chat.
-
#set_chat_description(chat_id:, description:) ⇒ TD::Types::Ok
Changes information about a chat.
-
#set_chat_discussion_group(chat_id:, discussion_chat_id:) ⇒ TD::Types::Ok
Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified.
-
#set_chat_draft_message(chat_id:, message_thread_id:, draft_message:) ⇒ TD::Types::Ok
Changes the draft message in a chat.
-
#set_chat_emoji_status(chat_id:, emoji_status:) ⇒ TD::Types::Ok
Changes the emoji status of a chat.
-
#set_chat_location(chat_id:, location:) ⇒ TD::Types::Ok
Changes the location of a chat.
-
#set_chat_member_status(chat_id:, member_id:, status:) ⇒ TD::Types::Ok
Changes the status of a chat member; requires can_invite_users member right to add a chat member, can_promote_members administrator right to change administrator rights of the member, and can_restrict_members administrator right to change restrictions of a user.
-
#set_chat_message_auto_delete_time(chat_id:, message_auto_delete_time:) ⇒ TD::Types::Ok
Changes the message auto-delete or self-destruct (for secret chats) time in a chat.
-
#set_chat_message_sender(chat_id:, message_sender_id:) ⇒ TD::Types::Ok
Selects a message sender to send messages in a chat.
-
#set_chat_notification_settings(chat_id:, notification_settings:) ⇒ TD::Types::Ok
Changes the notification settings of a chat.
-
#set_chat_permissions(chat_id:, permissions:) ⇒ TD::Types::Ok
Changes the chat members permissions.
-
#set_chat_photo(chat_id:, photo:) ⇒ TD::Types::Ok
Changes the photo of a chat.
-
#set_chat_pinned_stories(chat_id:, story_ids:) ⇒ TD::Types::Ok
Changes the list of pinned stories on a chat page; requires can_edit_stories right in the chat.
-
#set_chat_profile_accent_color(chat_id:, profile_accent_color_id:, profile_background_custom_emoji_id:) ⇒ TD::Types::Ok
Changes accent color and background custom emoji for profile of a supergroup or channel chat.
-
#set_chat_slow_mode_delay(chat_id:, slow_mode_delay:) ⇒ TD::Types::Ok
Changes the slow mode delay of a chat.
-
#set_chat_theme(chat_id:, theme_name:) ⇒ TD::Types::Ok
Changes the chat theme.
-
#set_chat_title(chat_id:, title:) ⇒ TD::Types::Ok
Changes the chat title.
-
#set_close_friends(user_ids:) ⇒ TD::Types::Ok
Changes the list of close friends of the current user.
-
#set_commands(scope:, language_code:, commands:) ⇒ TD::Types::Ok
Sets the list of commands supported by the bot for the given user scope and language; for bots only.
-
#set_custom_emoji_sticker_set_thumbnail(name:, custom_emoji_id:) ⇒ TD::Types::Ok
Sets a custom emoji sticker set thumbnail.
-
#set_custom_language_pack(info:, strings:) ⇒ TD::Types::Ok
Adds or changes a custom local language pack to the current localization target.
-
#set_custom_language_pack_string(language_pack_id:, new_string:) ⇒ TD::Types::Ok
Adds, edits or deletes a string in a custom local language pack.
-
#set_database_encryption_key(new_encryption_key:) ⇒ TD::Types::Ok
Changes the database encryption key.
-
#set_default_background(background:, type:, for_dark_theme:) ⇒ TD::Types::Background
Sets default background for chats; adds the background to the list of installed backgrounds.
-
#set_default_channel_administrator_rights(default_channel_administrator_rights:) ⇒ TD::Types::Ok
Sets default administrator rights for adding the bot to channel chats; for bots only.
-
#set_default_group_administrator_rights(default_group_administrator_rights:) ⇒ TD::Types::Ok
Sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only.
-
#set_default_message_auto_delete_time(message_auto_delete_time:) ⇒ TD::Types::Ok
Changes the default message auto-delete time for new chats.
-
#set_default_reaction_type(reaction_type:) ⇒ TD::Types::Ok
Changes type of default reaction for the current user.
-
#set_emoji_status(emoji_status:) ⇒ TD::Types::Ok
Changes the emoji status of the current user; for Telegram Premium users only.
-
#set_file_generation_progress(generation_id:, expected_size:, local_prefix_size:) ⇒ TD::Types::Ok
Informs TDLib on a file generation progress.
-
#set_forum_topic_notification_settings(chat_id:, message_thread_id:, notification_settings:) ⇒ TD::Types::Ok
Changes the notification settings of a forum topic.
-
#set_game_score(chat_id:, message_id:, edit_message:, user_id:, score:, force:) ⇒ TD::Types::Message
Updates the game score of the specified user in the game; for bots only.
-
#set_group_call_participant_is_speaking(group_call_id:, audio_source:, is_speaking:) ⇒ TD::Types::Ok
Informs TDLib that speaking state of a participant of an active group has changed.
-
#set_group_call_participant_volume_level(group_call_id:, participant_id:, volume_level:) ⇒ TD::Types::Ok
Changes volume level of a participant of an active group call.
-
#set_group_call_title(group_call_id:, title:) ⇒ TD::Types::Ok
Sets group call title.
-
#set_inactive_session_ttl(inactive_session_ttl_days:) ⇒ TD::Types::Ok
Changes the period of inactivity after which sessions will automatically be terminated.
-
#set_inline_game_score(inline_message_id:, edit_message:, user_id:, score:, force:) ⇒ TD::Types::Ok
Updates the game score of the specified user in a game; for bots only.
-
#set_location(location:) ⇒ TD::Types::Ok
Changes the location of the current user.
-
#set_log_stream(log_stream:) ⇒ TD::Types::Ok
Sets new log stream for internal logging of TDLib.
-
#set_log_tag_verbosity_level(tag:, new_verbosity_level:) ⇒ TD::Types::Ok
Sets the verbosity level for a specified TDLib internal log tag.
-
#set_log_verbosity_level(new_verbosity_level:) ⇒ TD::Types::Ok
Sets the verbosity level of the internal logging of TDLib.
-
#set_login_email_address(new_login_email_address:) ⇒ TD::Types::EmailAddressAuthenticationCodeInfo
Changes the login email address of the user.
-
#set_menu_button(user_id:, menu_button:) ⇒ TD::Types::Ok
Sets menu button for the given user or for all users; for bots only.
-
#set_message_fact_check(chat_id:, message_id:, text:) ⇒ TD::Types::Ok
Changes the fact-check of a message.
-
#set_message_reactions(chat_id:, message_id:, reaction_types:, is_big:) ⇒ TD::Types::Ok
Sets reactions on a message; for bots only.
-
#set_message_sender_block_list(sender_id:, block_list:) ⇒ TD::Types::Ok
Changes the block list of a message sender.
-
#set_name(first_name:, last_name:) ⇒ TD::Types::Ok
Changes the first and last name of the current user.
-
#set_network_type(type:) ⇒ TD::Types::Ok
Sets the current network type.
-
#set_new_chat_privacy_settings(settings:) ⇒ TD::Types::Ok
Changes privacy settings for new chat creation; can be used only if getOption(“can_set_new_chat_privacy_settings”).
-
#set_option(name:, value:) ⇒ TD::Types::Ok
Sets the value of an option.
-
#set_passport_element(element:, password:) ⇒ TD::Types::PassportElement
Adds an element to the user’s Telegram Passport.
-
#set_passport_element_errors(user_id:, errors:) ⇒ TD::Types::Ok
Informs the user that some of the elements in their Telegram Passport contain errors; for bots only.
-
#set_password(old_password:, new_password: nil, new_hint: nil, set_recovery_email_address: false, new_recovery_email_address: nil) ⇒ TD::Types::PasswordState
Changes the 2-step verification password for the current user.
-
#set_personal_chat(chat_id:) ⇒ TD::Types::Ok
Changes the personal chat of the current user.
-
#set_pinned_chats(chat_list:, chat_ids:) ⇒ TD::Types::Ok
Changes the order of pinned chats.
-
#set_pinned_forum_topics(chat_id:, message_thread_ids:) ⇒ TD::Types::Ok
Changes the order of pinned forum topics; requires can_manage_topics right in the supergroup.
-
#set_pinned_saved_messages_topics(saved_messages_topic_ids:) ⇒ TD::Types::Ok
Changes the order of pinned Saved Messages topics.
-
#set_poll_answer(chat_id:, message_id:, option_ids:) ⇒ TD::Types::Ok
Changes the user answer to a poll.
-
#set_profile_accent_color(profile_accent_color_id:, profile_background_custom_emoji_id:) ⇒ TD::Types::Ok
Changes accent color and background custom emoji for profile of the current user; for Telegram Premium users only.
-
#set_profile_photo(photo:, is_public:) ⇒ TD::Types::Ok
Changes a profile photo for the current user.
-
#set_quick_reply_shortcut_name(shortcut_id:, name:) ⇒ TD::Types::Ok
Changes name of a quick reply shortcut.
-
#set_reaction_notification_settings(notification_settings:) ⇒ TD::Types::Ok
Changes notification settings for reactions.
-
#set_read_date_privacy_settings(settings:) ⇒ TD::Types::Ok
Changes privacy settings for message read date.
-
#set_recovery_email_address(password:, new_recovery_email_address:) ⇒ TD::Types::PasswordState
Changes the 2-step verification recovery email address of the user.
-
#set_saved_messages_tag_label(tag:, label:) ⇒ TD::Types::Ok
Changes label of a Saved Messages tag; for Telegram Premium users only.
-
#set_scope_notification_settings(scope:, notification_settings:) ⇒ TD::Types::Ok
Changes notification settings for chats of a given type.
-
#set_sticker_emojis(sticker:, emojis:) ⇒ TD::Types::Ok
Changes the list of emojis corresponding to a sticker.
-
#set_sticker_keywords(sticker:, keywords:) ⇒ TD::Types::Ok
Changes the list of keywords of a sticker.
-
#set_sticker_mask_position(sticker:, mask_position:) ⇒ TD::Types::Ok
Changes the mask position of a mask sticker.
-
#set_sticker_position_in_set(sticker:, position:) ⇒ TD::Types::Ok
Changes the position of a sticker in the set to which it belongs.
-
#set_sticker_set_thumbnail(user_id:, name:, thumbnail:, format:) ⇒ TD::Types::Ok
Sets a sticker set thumbnail.
-
#set_sticker_set_title(name:, title:) ⇒ TD::Types::Ok
Sets a sticker set title.
-
#set_story_privacy_settings(story_id:, privacy_settings:) ⇒ TD::Types::Ok
Changes privacy settings of a story.
-
#set_story_reaction(story_sender_chat_id:, story_id:, reaction_type:, update_recent_reactions:) ⇒ TD::Types::Ok
Changes chosen reaction on a story that has already been sent.
-
#set_supergroup_custom_emoji_sticker_set(supergroup_id:, custom_emoji_sticker_set_id:) ⇒ TD::Types::Ok
Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right.
-
#set_supergroup_sticker_set(supergroup_id:, sticker_set_id:) ⇒ TD::Types::Ok
Changes the sticker set of a supergroup; requires can_change_info administrator right.
-
#set_supergroup_unrestrict_boost_count(supergroup_id:, unrestrict_boost_count:) ⇒ TD::Types::Ok
Changes the number of times the supergroup must be boosted by a user to ignore slow mode and chat permission restrictions; requires can_restrict_members administrator right.
-
#set_supergroup_username(supergroup_id:, username:) ⇒ TD::Types::Ok
Changes the editable username of a supergroup or channel, requires owner privileges in the supergroup or channel.
-
#set_tdlib_parameters(use_test_dc: nil, database_directory: nil, files_directory: nil, database_encryption_key: nil, use_file_database: nil, use_chat_info_database: nil, use_message_database: nil, use_secret_chats: nil, api_id: nil, api_hash: nil, system_language_code:, device_model:, system_version: nil, application_version:) ⇒ TD::Types::Ok
Sets the parameters for TDLib initialization.
-
#set_user_personal_profile_photo(user_id:, photo:) ⇒ TD::Types::Ok
Changes a personal profile photo of a contact user.
-
#set_user_privacy_setting_rules(setting:, rules:) ⇒ TD::Types::Ok
Changes user privacy settings.
-
#set_user_support_info(user_id:, message:) ⇒ TD::Types::UserSupportInfo
Sets support information for the given user; for Telegram support only.
-
#set_username(username:) ⇒ TD::Types::Ok
Changes the editable username of the current user.
-
#set_video_chat_default_participant(chat_id:, default_participant_id:) ⇒ TD::Types::Ok
Changes default participant identifier, on whose behalf a video chat in the chat will be joined.
-
#share_chat_with_bot(chat_id:, message_id:, button_id:, shared_chat_id:, only_check:) ⇒ TD::Types::Ok
Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot.
-
#share_phone_number(user_id:) ⇒ TD::Types::Ok
Shares the phone number of the current user with a mutual contact.
-
#share_users_with_bot(chat_id:, message_id:, button_id:, shared_user_ids:, only_check:) ⇒ TD::Types::Ok
Shares users after pressing a keyboardButtonTypeRequestUsers button with the bot.
-
#start_group_call_recording(group_call_id:, title:, record_video:, use_portrait_orientation:) ⇒ TD::Types::Ok
Starts recording of an active group call.
-
#start_group_call_screen_sharing(group_call_id:, audio_source_id:, payload:) ⇒ TD::Types::Text
Starts screen sharing in a joined group call.
-
#start_scheduled_group_call(group_call_id:) ⇒ TD::Types::Ok
Starts a scheduled group call.
-
#stop_business_poll(business_connection_id:, chat_id:, message_id:, reply_markup:) ⇒ TD::Types::BusinessMessage
Stops a poll sent on behalf of a business account; for bots only.
-
#stop_poll(chat_id:, message_id:, reply_markup:) ⇒ TD::Types::Ok
Stops a poll.
-
#suggest_user_profile_photo(user_id:, photo:) ⇒ TD::Types::Ok
Suggests a profile photo to another regular user with common messages.
-
#synchronize_language_pack(language_pack_id:) ⇒ TD::Types::Ok
Fetches the latest versions of all strings from a language pack in the current localization target from the server.
-
#terminate_all_other_sessions ⇒ TD::Types::Ok
Terminates all other sessions of the current user.
-
#terminate_session(session_id:) ⇒ TD::Types::Ok
Terminates a session of the current user.
-
#toggle_all_downloads_are_paused(are_paused:) ⇒ TD::Types::Ok
Changes pause state of all files in the file download list.
-
#toggle_bot_is_added_to_attachment_menu(bot_user_id:, is_added:, allow_write_access:) ⇒ TD::Types::Ok
Adds or removes a bot to attachment and side menu.
-
#toggle_bot_username_is_active(bot_user_id:, username:, is_active:) ⇒ TD::Types::Ok
Changes active state for a username of a bot.
-
#toggle_business_connected_bot_chat_is_paused(chat_id:, is_paused:) ⇒ TD::Types::Ok
Pauses or resumes the connected business bot in a specific chat.
-
#toggle_chat_default_disable_notification(chat_id:, default_disable_notification:) ⇒ TD::Types::Ok
Changes the value of the default disable_notification parameter, used when a message is sent to a chat.
-
#toggle_chat_folder_tags(are_tags_enabled:) ⇒ TD::Types::Ok
Toggles whether chat folder tags are enabled.
-
#toggle_chat_has_protected_content(chat_id:, has_protected_content:) ⇒ TD::Types::Ok
Changes the ability of users to save, forward, or copy chat content.
-
#toggle_chat_is_marked_as_unread(chat_id:, is_marked_as_unread:) ⇒ TD::Types::Ok
Changes the marked as unread state of a chat.
-
#toggle_chat_is_pinned(chat_list:, chat_id:, is_pinned:) ⇒ TD::Types::Ok
Changes the pinned state of a chat.
-
#toggle_chat_is_translatable(chat_id:, is_translatable:) ⇒ TD::Types::Ok
Changes the translatable state of a chat.
-
#toggle_chat_view_as_topics(chat_id:, view_as_topics:) ⇒ TD::Types::Ok
Changes the view_as_topics setting of a forum chat or Saved Messages.
-
#toggle_download_is_paused(file_id:, is_paused:) ⇒ TD::Types::Ok
Changes pause state of a file in the file download list.
-
#toggle_forum_topic_is_closed(chat_id:, message_thread_id:, is_closed:) ⇒ TD::Types::Ok
Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics right in the supergroup unless the user is creator of the topic.
-
#toggle_forum_topic_is_pinned(chat_id:, message_thread_id:, is_pinned:) ⇒ TD::Types::Ok
Changes the pinned state of a forum topic; requires can_manage_topics right in the supergroup.
-
#toggle_general_forum_topic_is_hidden(chat_id:, is_hidden:) ⇒ TD::Types::Ok
Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics right in the supergroup.
-
#toggle_group_call_enabled_start_notification(group_call_id:, enabled_start_notification:) ⇒ TD::Types::Ok
Toggles whether the current user will receive a notification when the group call starts; scheduled group calls only.
-
#toggle_group_call_is_my_video_enabled(group_call_id:, is_my_video_enabled:) ⇒ TD::Types::Ok
Toggles whether current user’s video is enabled.
-
#toggle_group_call_is_my_video_paused(group_call_id:, is_my_video_paused:) ⇒ TD::Types::Ok
Toggles whether current user’s video is paused.
-
#toggle_group_call_mute_new_participants(group_call_id:, mute_new_participants:) ⇒ TD::Types::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:, participant_id:, is_hand_raised:) ⇒ TD::Types::Ok
Toggles whether a group call participant hand is rased.
-
#toggle_group_call_participant_is_muted(group_call_id:, participant_id:, is_muted:) ⇒ TD::Types::Ok
Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves.
-
#toggle_group_call_screen_sharing_is_paused(group_call_id:, is_paused:) ⇒ TD::Types::Ok
Pauses or unpauses screen sharing in a joined group call.
-
#toggle_has_sponsored_messages_enabled(has_sponsored_messages_enabled:) ⇒ TD::Types::Ok
Toggles whether the current user has sponsored messages enabled.
-
#toggle_paid_message_reaction_is_anonymous(chat_id:, message_id:, is_anonymous:) ⇒ TD::Types::Ok
Changes whether the paid message reaction of the user to a message is anonymous.
-
#toggle_saved_messages_topic_is_pinned(saved_messages_topic_id:, is_pinned:) ⇒ TD::Types::Ok
Changes the pinned state of a Saved Messages topic.
-
#toggle_session_can_accept_calls(session_id:, can_accept_calls:) ⇒ TD::Types::Ok
Toggles whether a session can accept incoming calls.
-
#toggle_session_can_accept_secret_chats(session_id:, can_accept_secret_chats:) ⇒ TD::Types::Ok
Toggles whether a session can accept incoming secret chats.
-
#toggle_story_is_posted_to_chat_page(story_sender_chat_id:, story_id:, is_posted_to_chat_page:) ⇒ TD::Types::Ok
Toggles whether a story is accessible after expiration.
-
#toggle_supergroup_can_have_sponsored_messages(supergroup_id:, can_have_sponsored_messages:) ⇒ TD::Types::Ok
Toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel.
-
#toggle_supergroup_has_aggressive_anti_spam_enabled(supergroup_id:, has_aggressive_anti_spam_enabled:) ⇒ TD::Types::Ok
Toggles whether aggressive anti-spam checks are enabled in the supergroup.
-
#toggle_supergroup_has_hidden_members(supergroup_id:, has_hidden_members:) ⇒ TD::Types::Ok
Toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or searchChatMembers.
-
#toggle_supergroup_is_all_history_available(supergroup_id:, is_all_history_available:) ⇒ TD::Types::Ok
Toggles whether the message history of a supergroup is available to new members; requires can_change_info member right.
-
#toggle_supergroup_is_broadcast_group(supergroup_id:) ⇒ TD::Types::Ok
Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup.
-
#toggle_supergroup_is_forum(supergroup_id:, is_forum:) ⇒ TD::Types::Ok
Toggles whether the supergroup is a forum; requires owner privileges in the supergroup.
-
#toggle_supergroup_join_by_request(supergroup_id:, join_by_request:) ⇒ TD::Types::Ok
Toggles whether all users directly joining the supergroup need to be approved by supergroup administrators; requires can_restrict_members administrator right.
-
#toggle_supergroup_join_to_send_messages(supergroup_id:, join_to_send_messages:) ⇒ TD::Types::Ok
Toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members administrator right.
-
#toggle_supergroup_sign_messages(supergroup_id:, sign_messages:, show_message_sender:) ⇒ TD::Types::Ok
Toggles whether sender signature or link to the account is added to sent messages in a channel; requires can_change_info member right.
-
#toggle_supergroup_username_is_active(supergroup_id:, username:, is_active:) ⇒ TD::Types::Ok
Changes active state for a username of a supergroup or channel, requires owner privileges in the supergroup or channel.
-
#toggle_username_is_active(username:, is_active:) ⇒ TD::Types::Ok
Changes active state for a username of the current user.
-
#transfer_chat_ownership(chat_id:, user_id:, password:) ⇒ TD::Types::Ok
Changes the owner of a chat; requires owner privileges in the chat.
-
#translate_message_text(chat_id:, message_id:, to_language_code:) ⇒ TD::Types::FormattedText
Extracts text or caption of the given message and translates it to the given language.
-
#translate_text(text:, to_language_code:) ⇒ TD::Types::FormattedText
Translates a text to the given language.
-
#unpin_all_chat_messages(chat_id:) ⇒ TD::Types::Ok
Removes all pinned messages from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel.
-
#unpin_all_message_thread_messages(chat_id:, message_thread_id:) ⇒ TD::Types::Ok
Removes all pinned messages from a forum topic; requires can_pin_messages member right in the supergroup.
-
#unpin_chat_message(chat_id:, message_id:) ⇒ TD::Types::Ok
Removes a pinned message from a chat; requires can_pin_messages member right if the chat is a basic group or supergroup, or can_edit_messages administrator right if the chat is a channel.
-
#upgrade_basic_group_chat_to_supergroup_chat(chat_id:) ⇒ TD::Types::Chat
Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and messageChatUpgradeFrom; requires owner privileges.
-
#upload_sticker_file(user_id:, sticker_format:, sticker:) ⇒ TD::Types::File
Uploads a file with a sticker; returns the uploaded file.
-
#validate_order_info(input_invoice:, order_info: nil, allow_save:) ⇒ TD::Types::ValidatedOrderInfo
Validates the order information provided by a user and returns the available shipping options for a flexible invoice.
-
#view_messages(chat_id:, message_ids:, source:, force_read:) ⇒ TD::Types::Ok
Informs TDLib that messages are being viewed by the user.
-
#view_premium_feature(feature:) ⇒ TD::Types::Ok
Informs TDLib that the user viewed detailed information about a Premium feature on the Premium features screen.
-
#view_trending_sticker_sets(sticker_set_ids:) ⇒ TD::Types::Ok
Informs the server that some trending sticker sets have been viewed by the user.
-
#write_generated_file_part(generation_id:, offset:, data:) ⇒ TD::Types::Ok
Writes a part of a generated file.
Instance Method Details
#accept_call(call_id:, protocol:) ⇒ TD::Types::Ok
Accepts an incoming call.
9 10 11 12 13 |
# File 'lib/tdlib/client_methods.rb', line 9 def accept_call(call_id:, protocol:) broadcast('@type' => 'acceptCall', 'call_id' => call_id, 'protocol' => protocol) end |
#accept_terms_of_service(terms_of_service_id:) ⇒ TD::Types::Ok
Accepts Telegram terms of services.
19 20 21 22 |
# File 'lib/tdlib/client_methods.rb', line 19 def accept_terms_of_service(terms_of_service_id:) broadcast('@type' => 'acceptTermsOfService', 'terms_of_service_id' => terms_of_service_id) end |
#activate_story_stealth_mode ⇒ TD::Types::Ok
Activates stealth mode for stories, which hides all views of stories from the current user in the last
"story_stealth_mode_past_period" seconds and for the next "story_stealth_mode_future_period" seconds; for Telegram
Premium users only.
29 30 31 |
# File 'lib/tdlib/client_methods.rb', line 29 def activate_story_stealth_mode broadcast('@type' => 'activateStoryStealthMode') end |
#add_bot_media_preview(bot_user_id:, language_code:, content:) ⇒ TD::Types::BotMediaPreview
Adds a new media preview to the beginning of the list of media previews of a bot. Returns the added preview after addition is completed server-side. The total number of previews must not exceed getOption(“bot_media_preview_count_max”) for the given language.
45 46 47 48 49 50 |
# File 'lib/tdlib/client_methods.rb', line 45 def add_bot_media_preview(bot_user_id:, language_code:, content:) broadcast('@type' => 'addBotMediaPreview', 'bot_user_id' => bot_user_id, 'language_code' => language_code, 'content' => content) end |
#add_chat_folder_by_invite_link(invite_link:, chat_ids:) ⇒ TD::Types::Ok
Adds a chat folder by an invite link.
58 59 60 61 62 |
# File 'lib/tdlib/client_methods.rb', line 58 def add_chat_folder_by_invite_link(invite_link:, chat_ids:) broadcast('@type' => 'addChatFolderByInviteLink', 'invite_link' => invite_link, 'chat_ids' => chat_ids) end |
#add_chat_member(chat_id:, user_id:, forward_limit:) ⇒ TD::Types::FailedToAddMembers
Adds a new member to a chat; requires can_invite_users member right. Members can’t be added to private or secret chats. Returns information about members that weren’t added.
74 75 76 77 78 79 |
# File 'lib/tdlib/client_methods.rb', line 74 def add_chat_member(chat_id:, user_id:, forward_limit:) broadcast('@type' => 'addChatMember', 'chat_id' => chat_id, 'user_id' => user_id, 'forward_limit' => forward_limit) end |
#add_chat_members(chat_id:, user_ids:) ⇒ TD::Types::FailedToAddMembers
Adds multiple new members to a chat; requires can_invite_users member right. 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. Returns information about members that weren’t added.
91 92 93 94 95 |
# File 'lib/tdlib/client_methods.rb', line 91 def add_chat_members(chat_id:, user_ids:) broadcast('@type' => 'addChatMembers', 'chat_id' => chat_id, 'user_ids' => user_ids) end |
#add_chat_to_list(chat_id:, chat_list:) ⇒ TD::Types::Ok
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.
105 106 107 108 109 |
# File 'lib/tdlib/client_methods.rb', line 105 def add_chat_to_list(chat_id:, chat_list:) broadcast('@type' => 'addChatToList', 'chat_id' => chat_id, 'chat_list' => chat_list) end |
#add_contact(contact: nil, share_phone_number:) ⇒ TD::Types::Ok
Adds a user to the contact list or edits an existing contact by their user identifier.
120 121 122 123 124 |
# File 'lib/tdlib/client_methods.rb', line 120 def add_contact(contact: nil, share_phone_number:) broadcast('@type' => 'addContact', 'contact' => contact, 'share_phone_number' => share_phone_number) end |
#add_custom_server_language_pack(language_pack_id:) ⇒ TD::Types::Ok
Adds a custom server language pack to the list of installed language packs in current localization target. Can be called before authorization.
131 132 133 134 |
# File 'lib/tdlib/client_methods.rb', line 131 def add_custom_server_language_pack(language_pack_id:) broadcast('@type' => 'addCustomServerLanguagePack', 'language_pack_id' => language_pack_id) end |
#add_favorite_sticker(sticker:) ⇒ TD::Types::Ok
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 or in WEBP or WEBM format can be added to this list. Emoji stickers can’t be added to favorite stickers.
144 145 146 147 |
# File 'lib/tdlib/client_methods.rb', line 144 def add_favorite_sticker(sticker:) broadcast('@type' => 'addFavoriteSticker', 'sticker' => sticker) end |
#add_file_to_downloads(file_id:, chat_id:, message_id:, priority:) ⇒ TD::Types::File
Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file.
163 164 165 166 167 168 169 |
# File 'lib/tdlib/client_methods.rb', line 163 def add_file_to_downloads(file_id:, chat_id:, message_id:, priority:) broadcast('@type' => 'addFileToDownloads', 'file_id' => file_id, 'chat_id' => chat_id, 'message_id' => , 'priority' => priority) end |
#add_local_message(chat_id:, sender_id:, reply_to:, disable_notification:, input_message_content:) ⇒ TD::Types::Message
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.
182 183 184 185 186 187 188 189 |
# File 'lib/tdlib/client_methods.rb', line 182 def (chat_id:, sender_id:, reply_to:, disable_notification:, input_message_content:) broadcast('@type' => 'addLocalMessage', 'chat_id' => chat_id, 'sender_id' => sender_id, 'reply_to' => reply_to, 'disable_notification' => disable_notification, 'input_message_content' => ) end |
#add_log_message(verbosity_level:, text:) ⇒ TD::Types::Ok
Adds a message to TDLib internal log. Can be called synchronously.
197 198 199 200 201 |
# File 'lib/tdlib/client_methods.rb', line 197 def (verbosity_level:, text:) broadcast('@type' => 'addLogMessage', 'verbosity_level' => verbosity_level, 'text' => text) end |
#add_message_reaction(chat_id:, message_id:, reaction_type:, is_big:, update_recent_reactions:) ⇒ TD::Types::Ok
Adds a reaction or a tag to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message.
214 215 216 217 218 219 220 221 |
# File 'lib/tdlib/client_methods.rb', line 214 def (chat_id:, message_id:, reaction_type:, is_big:, update_recent_reactions:) broadcast('@type' => 'addMessageReaction', 'chat_id' => chat_id, 'message_id' => , 'reaction_type' => reaction_type, 'is_big' => is_big, 'update_recent_reactions' => update_recent_reactions) end |
#add_network_statistics(entry:) ⇒ TD::Types::Ok
Adds the specified data to data usage statistics. Can be called before authorization.
229 230 231 232 |
# File 'lib/tdlib/client_methods.rb', line 229 def add_network_statistics(entry:) broadcast('@type' => 'addNetworkStatistics', 'entry' => entry) end |
#add_paid_message_reaction(chat_id:, message_id:, star_count:, is_anonymous:) ⇒ TD::Types::Ok
Adds the paid message reaction to a message. Use getMessageAvailableReactions to receive the list of available reactions for the message.
244 245 246 247 248 249 250 |
# File 'lib/tdlib/client_methods.rb', line 244 def (chat_id:, message_id:, star_count:, is_anonymous:) broadcast('@type' => 'addPaidMessageReaction', 'chat_id' => chat_id, 'message_id' => , 'star_count' => star_count, 'is_anonymous' => is_anonymous) end |
#add_proxy(server:, port:, enable:, type:) ⇒ TD::Types::Proxy
Adds a proxy server for network requests. Can be called before authorization.
260 261 262 263 264 265 266 |
# File 'lib/tdlib/client_methods.rb', line 260 def add_proxy(server:, port:, enable:, type:) broadcast('@type' => 'addProxy', 'server' => server, 'port' => port, 'enable' => enable, 'type' => type) end |
#add_quick_reply_shortcut_inline_query_result_message(shortcut_name:, reply_to_message_id:, query_id:, result_id:, hide_via_bot:) ⇒ TD::Types::QuickReplyMessage
Adds a message to a quick reply shortcut via inline bot. If shortcut doesn’t exist and there are less than getOption(“quick_reply_shortcut_count_max”) shortcuts, then a new
shortcut is created.
The shortcut must not contain more than getOption(“quick_reply_shortcut_message_count_max”) messages after adding
the new .
Returns the added message.
284 285 286 287 288 289 290 291 292 |
# File 'lib/tdlib/client_methods.rb', line 284 def (shortcut_name:, reply_to_message_id:, query_id:, result_id:, hide_via_bot:) broadcast('@type' => 'addQuickReplyShortcutInlineQueryResultMessage', 'shortcut_name' => shortcut_name, 'reply_to_message_id' => , 'query_id' => query_id, 'result_id' => result_id, 'hide_via_bot' => hide_via_bot) end |
#add_quick_reply_shortcut_message(shortcut_name:, reply_to_message_id:, input_message_content:) ⇒ TD::Types::QuickReplyMessage
Adds a message to a quick reply shortcut. If shortcut doesn’t exist and there are less than getOption(“quick_reply_shortcut_count_max”) shortcuts, then a new
shortcut is created.
The shortcut must not contain more than getOption(“quick_reply_shortcut_message_count_max”) messages after adding
the new .
Returns the added message.
308 309 310 311 312 313 |
# File 'lib/tdlib/client_methods.rb', line 308 def (shortcut_name:, reply_to_message_id:, input_message_content:) broadcast('@type' => 'addQuickReplyShortcutMessage', 'shortcut_name' => shortcut_name, 'reply_to_message_id' => , 'input_message_content' => ) end |
#add_quick_reply_shortcut_message_album(shortcut_name:, reply_to_message_id:, input_message_contents:) ⇒ TD::Types::QuickReplyMessages
Adds 2-10 messages grouped together into an album to a quick reply shortcut. 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.
327 328 329 330 331 332 |
# File 'lib/tdlib/client_methods.rb', line 327 def (shortcut_name:, reply_to_message_id:, input_message_contents:) broadcast('@type' => 'addQuickReplyShortcutMessageAlbum', 'shortcut_name' => shortcut_name, 'reply_to_message_id' => , 'input_message_contents' => ) end |
#add_recent_sticker(is_attached:, sticker:) ⇒ TD::Types::Stickers
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 or in WEBP or WEBM format can be added to this list. Emoji stickers can’t be added to recent stickers.
344 345 346 347 348 |
# File 'lib/tdlib/client_methods.rb', line 344 def add_recent_sticker(is_attached:, sticker:) broadcast('@type' => 'addRecentSticker', 'is_attached' => is_attached, 'sticker' => sticker) end |
#add_recently_found_chat(chat_id:) ⇒ TD::Types::Ok
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.
356 357 358 359 |
# File 'lib/tdlib/client_methods.rb', line 356 def add_recently_found_chat(chat_id:) broadcast('@type' => 'addRecentlyFoundChat', 'chat_id' => chat_id) end |
#add_saved_animation(animation:) ⇒ TD::Types::Ok
Manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type “video/mp4” can be added to the list.
369 370 371 372 |
# File 'lib/tdlib/client_methods.rb', line 369 def add_saved_animation(animation:) broadcast('@type' => 'addSavedAnimation', 'animation' => animation) end |
#add_saved_notification_sound(sound:) ⇒ TD::Types::NotificationSound
Adds a new notification sound to the list of saved notification sounds. The new notification sound is added to the top of the list. If it is already in the list, its position isn’t changed.
380 381 382 383 |
# File 'lib/tdlib/client_methods.rb', line 380 def add_saved_notification_sound(sound:) broadcast('@type' => 'addSavedNotificationSound', 'sound' => sound) end |
#add_sticker_to_set(user_id:, name:, sticker:) ⇒ TD::Types::Ok
Adds a new sticker to a set.
393 394 395 396 397 398 |
# File 'lib/tdlib/client_methods.rb', line 393 def add_sticker_to_set(user_id:, name:, sticker:) broadcast('@type' => 'addStickerToSet', 'user_id' => user_id, 'name' => name, 'sticker' => sticker) end |
#allow_bot_to_send_messages(bot_user_id:) ⇒ TD::Types::Ok
Allows the specified bot to send messages to the user.
404 405 406 407 |
# File 'lib/tdlib/client_methods.rb', line 404 def (bot_user_id:) broadcast('@type' => 'allowBotToSendMessages', 'bot_user_id' => bot_user_id) end |
#answer_callback_query(callback_query_id:, text:, show_alert:, url:, cache_time:) ⇒ TD::Types::Ok
Sets the result of a callback query; for bots only.
417 418 419 420 421 422 423 424 |
# File 'lib/tdlib/client_methods.rb', line 417 def answer_callback_query(callback_query_id:, text:, show_alert:, url:, cache_time:) broadcast('@type' => 'answerCallbackQuery', 'callback_query_id' => callback_query_id, 'text' => text, 'show_alert' => show_alert, 'url' => url, 'cache_time' => cache_time) end |
#answer_custom_query(custom_query_id:, data:) ⇒ TD::Types::Ok
Answers a custom query; for bots only.
431 432 433 434 435 |
# File 'lib/tdlib/client_methods.rb', line 431 def answer_custom_query(custom_query_id:, data:) broadcast('@type' => 'answerCustomQuery', 'custom_query_id' => custom_query_id, 'data' => data) end |
#answer_inline_query(inline_query_id:, is_personal:, button:, results:, cache_time:, next_offset:) ⇒ TD::Types::Ok
Sets the result of an inline query; for bots only.
449 450 451 452 453 454 455 456 457 |
# File 'lib/tdlib/client_methods.rb', line 449 def answer_inline_query(inline_query_id:, is_personal:, button:, results:, cache_time:, next_offset:) broadcast('@type' => 'answerInlineQuery', 'inline_query_id' => inline_query_id, 'is_personal' => is_personal, 'button' => , 'results' => results, 'cache_time' => cache_time, 'next_offset' => next_offset) end |
#answer_pre_checkout_query(pre_checkout_query_id:, error_message:) ⇒ TD::Types::Ok
Sets the result of a pre-checkout query; for bots only.
464 465 466 467 468 |
# File 'lib/tdlib/client_methods.rb', line 464 def answer_pre_checkout_query(pre_checkout_query_id:, error_message:) broadcast('@type' => 'answerPreCheckoutQuery', 'pre_checkout_query_id' => pre_checkout_query_id, 'error_message' => ) end |
#answer_shipping_query(shipping_query_id:, shipping_options:, error_message:) ⇒ TD::Types::Ok
Sets the result of a shipping query; for bots only.
476 477 478 479 480 481 |
# File 'lib/tdlib/client_methods.rb', line 476 def answer_shipping_query(shipping_query_id:, shipping_options:, error_message:) broadcast('@type' => 'answerShippingQuery', 'shipping_query_id' => shipping_query_id, 'shipping_options' => , 'error_message' => ) end |
#answer_web_app_query(web_app_query_id:, result:) ⇒ TD::Types::SentWebAppMessage
Sets the result of interaction with a Web App and sends corresponding message on behalf of the user to the chat
from which the query originated; for bots only.
489 490 491 492 493 |
# File 'lib/tdlib/client_methods.rb', line 489 def answer_web_app_query(web_app_query_id:, result:) broadcast('@type' => 'answerWebAppQuery', 'web_app_query_id' => web_app_query_id, 'result' => result) end |
#apply_premium_gift_code(code:) ⇒ TD::Types::Ok
Applies a Telegram Premium gift code.
499 500 501 502 |
# File 'lib/tdlib/client_methods.rb', line 499 def apply_premium_gift_code(code:) broadcast('@type' => 'applyPremiumGiftCode', 'code' => code) end |
#assign_app_store_transaction(receipt:, purpose:) ⇒ TD::Types::Ok
Informs server about a purchase through App Store. For official applications only.
510 511 512 513 514 |
# File 'lib/tdlib/client_methods.rb', line 510 def assign_app_store_transaction(receipt:, purpose:) broadcast('@type' => 'assignAppStoreTransaction', 'receipt' => receipt, 'purpose' => purpose) end |
#assign_google_play_transaction(package_name:, store_product_id:, purchase_token:, purpose:) ⇒ TD::Types::Ok
Informs server about a purchase through Google Play. For official applications only.
524 525 526 527 528 529 530 |
# File 'lib/tdlib/client_methods.rb', line 524 def assign_google_play_transaction(package_name:, store_product_id:, purchase_token:, purpose:) broadcast('@type' => 'assignGooglePlayTransaction', 'package_name' => package_name, 'store_product_id' => store_product_id, 'purchase_token' => purchase_token, 'purpose' => purpose) end |
#ban_chat_member(chat_id:, member_id:, banned_until_date:, revoke_messages:) ⇒ TD::Types::Ok
Bans a member in a chat; requires can_restrict_members administrator right. 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.
546 547 548 549 550 551 552 |
# File 'lib/tdlib/client_methods.rb', line 546 def ban_chat_member(chat_id:, member_id:, banned_until_date:, revoke_messages:) broadcast('@type' => 'banChatMember', 'chat_id' => chat_id, 'member_id' => member_id, 'banned_until_date' => banned_until_date, 'revoke_messages' => ) end |
#block_message_sender_from_replies(message_id:, delete_message:, delete_all_messages:, report_spam:) ⇒ TD::Types::Ok
Blocks an original sender of a message in the Replies chat.
561 562 563 564 565 566 567 |
# File 'lib/tdlib/client_methods.rb', line 561 def (message_id:, delete_message:, delete_all_messages:, report_spam:) broadcast('@type' => 'blockMessageSenderFromReplies', 'message_id' => , 'delete_message' => , 'delete_all_messages' => , 'report_spam' => report_spam) end |
#boost_chat(chat_id:, slot_ids:) ⇒ TD::Types::ChatBoostSlots
Boosts a chat and returns the list of available chat boost slots for the current user after the boost.
575 576 577 578 579 |
# File 'lib/tdlib/client_methods.rb', line 575 def boost_chat(chat_id:, slot_ids:) broadcast('@type' => 'boostChat', 'chat_id' => chat_id, 'slot_ids' => slot_ids) end |
#can_bot_send_messages(bot_user_id:) ⇒ TD::Types::Ok
Checks whether the specified bot can send messages to the user. Returns a 404 error if can’t and the access can be granted by call to allowBotToSendMessages.
586 587 588 589 |
# File 'lib/tdlib/client_methods.rb', line 586 def (bot_user_id:) broadcast('@type' => 'canBotSendMessages', 'bot_user_id' => bot_user_id) end |
#can_purchase_from_store(purpose:) ⇒ TD::Types::Ok
Checks whether an in-store purchase is possible. Must be called before any in-store purchase.
596 597 598 599 |
# File 'lib/tdlib/client_methods.rb', line 596 def can_purchase_from_store(purpose:) broadcast('@type' => 'canPurchaseFromStore', 'purpose' => purpose) end |
#can_send_message_to_user(user_id:, only_local:) ⇒ TD::Types::CanSendMessageToUserResult
Check whether the current user can message another user or try to create a chat with them.
606 607 608 609 610 |
# File 'lib/tdlib/client_methods.rb', line 606 def (user_id:, only_local:) broadcast('@type' => 'canSendMessageToUser', 'user_id' => user_id, 'only_local' => only_local) end |
#can_send_story(chat_id:) ⇒ TD::Types::CanSendStoryResult
Checks whether the current user can send a story on behalf of a chat; requires can_post_stories right for
supergroup and channel chats.
618 619 620 621 |
# File 'lib/tdlib/client_methods.rb', line 618 def can_send_story(chat_id:) broadcast('@type' => 'canSendStory', 'chat_id' => chat_id) end |
#can_transfer_ownership ⇒ TD::Types::CanTransferOwnershipResult
Checks whether the current session can be used to transfer a chat ownership to another user.
626 627 628 |
# File 'lib/tdlib/client_methods.rb', line 626 def can_transfer_ownership broadcast('@type' => 'canTransferOwnership') end |
#cancel_download_file(file_id:, only_if_pending:) ⇒ TD::Types::Ok
Stops the downloading of a file. If a file has already been downloaded, does nothing.
637 638 639 640 641 |
# File 'lib/tdlib/client_methods.rb', line 637 def cancel_download_file(file_id:, only_if_pending:) broadcast('@type' => 'cancelDownloadFile', 'file_id' => file_id, 'only_if_pending' => only_if_pending) end |
#cancel_password_reset ⇒ TD::Types::Ok
Cancels reset of 2-step verification password. The method can be called if passwordState.pending_reset_date > 0.
647 648 649 |
# File 'lib/tdlib/client_methods.rb', line 647 def cancel_password_reset broadcast('@type' => 'cancelPasswordReset') end |
#cancel_preliminary_upload_file(file_id:) ⇒ TD::Types::Ok
Stops the preliminary uploading of a file. Supported only for files uploaded by using preliminaryUploadFile. For other files the behavior is undefined.
657 658 659 660 |
# File 'lib/tdlib/client_methods.rb', line 657 def cancel_preliminary_upload_file(file_id:) broadcast('@type' => 'cancelPreliminaryUploadFile', 'file_id' => file_id) end |
#cancel_recovery_email_address_verification ⇒ TD::Types::PasswordState
Cancels verification of the 2-step verification recovery email address.
665 666 667 |
# File 'lib/tdlib/client_methods.rb', line 665 def cancel_recovery_email_address_verification broadcast('@type' => 'cancelRecoveryEmailAddressVerification') end |
#change_imported_contacts(contacts:) ⇒ TD::Types::ImportedContacts
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.
676 677 678 679 |
# File 'lib/tdlib/client_methods.rb', line 676 def change_imported_contacts(contacts:) broadcast('@type' => 'changeImportedContacts', 'contacts' => contacts) end |
#change_sticker_set(set_id:, is_installed:, is_archived:) ⇒ TD::Types::Ok
Installs/uninstalls or activates/archives a sticker set.
688 689 690 691 692 693 |
# File 'lib/tdlib/client_methods.rb', line 688 def change_sticker_set(set_id:, is_installed:, is_archived:) broadcast('@type' => 'changeStickerSet', 'set_id' => set_id, 'is_installed' => is_installed, 'is_archived' => is_archived) end |
#check_authentication_bot_token(token:) ⇒ TD::Types::Ok
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.
701 702 703 704 |
# File 'lib/tdlib/client_methods.rb', line 701 def check_authentication_bot_token(token:) broadcast('@type' => 'checkAuthenticationBotToken', 'token' => token) end |
#check_authentication_code(code:) ⇒ TD::Types::Ok
Checks the authentication code. Works only when the current authorization state is authorizationStateWaitCode.
711 712 713 714 |
# File 'lib/tdlib/client_methods.rb', line 711 def check_authentication_code(code:) broadcast('@type' => 'checkAuthenticationCode', 'code' => code) end |
#check_authentication_email_code(code:) ⇒ TD::Types::Ok
Checks the authentication of an email address. Works only when the current authorization state is authorizationStateWaitEmailCode.
721 722 723 724 |
# File 'lib/tdlib/client_methods.rb', line 721 def check_authentication_email_code(code:) broadcast('@type' => 'checkAuthenticationEmailCode', 'code' => code) end |
#check_authentication_password(password:) ⇒ TD::Types::Ok
Checks the 2-step verification password for correctness. Works only when the current authorization state is authorizationStateWaitPassword.
731 732 733 734 |
# File 'lib/tdlib/client_methods.rb', line 731 def check_authentication_password(password:) broadcast('@type' => 'checkAuthenticationPassword', 'password' => password) end |
#check_authentication_password_recovery_code(recovery_code:) ⇒ TD::Types::Ok
Checks whether a 2-step verification password recovery code sent to an email address is valid. Works only when the current authorization state is authorizationStateWaitPassword.
741 742 743 744 |
# File 'lib/tdlib/client_methods.rb', line 741 def check_authentication_password_recovery_code(recovery_code:) broadcast('@type' => 'checkAuthenticationPasswordRecoveryCode', 'recovery_code' => recovery_code) end |
#check_chat_folder_invite_link(invite_link:) ⇒ TD::Types::ChatFolderInviteLinkInfo
Checks the validity of an invite link for a chat folder and returns information about the corresponding chat
folder.
751 752 753 754 |
# File 'lib/tdlib/client_methods.rb', line 751 def check_chat_folder_invite_link(invite_link:) broadcast('@type' => 'checkChatFolderInviteLink', 'invite_link' => invite_link) end |
#check_chat_invite_link(invite_link:) ⇒ TD::Types::ChatInviteLinkInfo
Checks the validity of an invite link for a chat and returns information about the corresponding chat.
760 761 762 763 |
# File 'lib/tdlib/client_methods.rb', line 760 def check_chat_invite_link(invite_link:) broadcast('@type' => 'checkChatInviteLink', 'invite_link' => invite_link) end |
#check_chat_username(chat_id:, username:) ⇒ TD::Types::CheckChatUsernameResult
Checks whether a username can be set for a chat.
771 772 773 774 775 |
# File 'lib/tdlib/client_methods.rb', line 771 def check_chat_username(chat_id:, username:) broadcast('@type' => 'checkChatUsername', 'chat_id' => chat_id, 'username' => username) end |
#check_created_public_chats_limit(type:) ⇒ TD::Types::Ok
Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached. The limit can be increased with Telegram Premium.
783 784 785 786 |
# File 'lib/tdlib/client_methods.rb', line 783 def check_created_public_chats_limit(type:) broadcast('@type' => 'checkCreatedPublicChatsLimit', 'type' => type) end |
#check_email_address_verification_code(code:) ⇒ TD::Types::Ok
Checks the email address verification code for Telegram Passport.
792 793 794 795 |
# File 'lib/tdlib/client_methods.rb', line 792 def check_email_address_verification_code(code:) broadcast('@type' => 'checkEmailAddressVerificationCode', 'code' => code) end |
#check_login_email_address_code(code:) ⇒ TD::Types::Ok
Checks the login email address authentication.
801 802 803 804 |
# File 'lib/tdlib/client_methods.rb', line 801 def check_login_email_address_code(code:) broadcast('@type' => 'checkLoginEmailAddressCode', 'code' => code) end |
#check_password_recovery_code(recovery_code:) ⇒ TD::Types::Ok
Checks whether a 2-step verification password recovery code sent to an email address is valid.
810 811 812 813 |
# File 'lib/tdlib/client_methods.rb', line 810 def check_password_recovery_code(recovery_code:) broadcast('@type' => 'checkPasswordRecoveryCode', 'recovery_code' => recovery_code) end |
#check_phone_number_code(code:) ⇒ TD::Types::Ok
Check the authentication code and completes the request for which the code was sent if appropriate.
819 820 821 822 |
# File 'lib/tdlib/client_methods.rb', line 819 def check_phone_number_code(code:) broadcast('@type' => 'checkPhoneNumberCode', 'code' => code) end |
#check_premium_gift_code(code:) ⇒ TD::Types::PremiumGiftCodeInfo
Return information about a Telegram Premium gift code.
828 829 830 831 |
# File 'lib/tdlib/client_methods.rb', line 828 def check_premium_gift_code(code:) broadcast('@type' => 'checkPremiumGiftCode', 'code' => code) end |
#check_quick_reply_shortcut_name(name:) ⇒ TD::Types::Ok
Checks validness of a name for a quick reply shortcut. Can be called synchronously.
838 839 840 841 |
# File 'lib/tdlib/client_methods.rb', line 838 def check_quick_reply_shortcut_name(name:) broadcast('@type' => 'checkQuickReplyShortcutName', 'name' => name) end |
#check_recovery_email_address_code(code:) ⇒ TD::Types::PasswordState
Checks the 2-step verification recovery email address verification code.
847 848 849 850 |
# File 'lib/tdlib/client_methods.rb', line 847 def check_recovery_email_address_code(code:) broadcast('@type' => 'checkRecoveryEmailAddressCode', 'code' => code) end |
#check_sticker_set_name(name:) ⇒ TD::Types::CheckStickerSetNameResult
Checks whether a name can be used for a new sticker set.
856 857 858 859 |
# File 'lib/tdlib/client_methods.rb', line 856 def check_sticker_set_name(name:) broadcast('@type' => 'checkStickerSetName', 'name' => name) end |
#clean_file_name(file_name:) ⇒ TD::Types::Text
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.
868 869 870 871 |
# File 'lib/tdlib/client_methods.rb', line 868 def clean_file_name(file_name:) broadcast('@type' => 'cleanFileName', 'file_name' => file_name) end |
#clear_all_draft_messages(exclude_secret_chats:) ⇒ TD::Types::Ok
Clears message drafts in all chats.
877 878 879 880 |
# File 'lib/tdlib/client_methods.rb', line 877 def (exclude_secret_chats:) broadcast('@type' => 'clearAllDraftMessages', 'exclude_secret_chats' => exclude_secret_chats) end |
#clear_autosave_settings_exceptions ⇒ TD::Types::Ok
Clears the list of all autosave settings exceptions. The method is guaranteed to work only after at least one call to getAutosaveSettings.
886 887 888 |
# File 'lib/tdlib/client_methods.rb', line 886 def clear_autosave_settings_exceptions broadcast('@type' => 'clearAutosaveSettingsExceptions') end |
#clear_imported_contacts ⇒ TD::Types::Ok
Clears all imported contacts, contact list remains unchanged.
893 894 895 |
# File 'lib/tdlib/client_methods.rb', line 893 def clear_imported_contacts broadcast('@type' => 'clearImportedContacts') end |
#clear_recent_emoji_statuses ⇒ TD::Types::Ok
Clears the list of recently used emoji statuses for self status.
900 901 902 |
# File 'lib/tdlib/client_methods.rb', line 900 def clear_recent_emoji_statuses broadcast('@type' => 'clearRecentEmojiStatuses') end |
#clear_recent_reactions ⇒ TD::Types::Ok
Clears the list of recently used reactions.
907 908 909 |
# File 'lib/tdlib/client_methods.rb', line 907 def clear_recent_reactions broadcast('@type' => 'clearRecentReactions') end |
#clear_recent_stickers(is_attached:) ⇒ TD::Types::Ok
Clears the list of recently used stickers.
916 917 918 919 |
# File 'lib/tdlib/client_methods.rb', line 916 def clear_recent_stickers(is_attached:) broadcast('@type' => 'clearRecentStickers', 'is_attached' => is_attached) end |
#clear_recently_found_chats ⇒ TD::Types::Ok
Clears the list of recently found chats.
924 925 926 |
# File 'lib/tdlib/client_methods.rb', line 924 def clear_recently_found_chats broadcast('@type' => 'clearRecentlyFoundChats') end |
#clear_searched_for_tags(clear_cashtags:) ⇒ TD::Types::Ok
Clears the list of recently searched for hashtags or cashtags.
933 934 935 936 |
# File 'lib/tdlib/client_methods.rb', line 933 def (clear_cashtags:) broadcast('@type' => 'clearSearchedForTags', 'clear_cashtags' => ) end |
#click_animated_emoji_message(chat_id:, message_id:) ⇒ TD::Types::Sticker
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.
944 945 946 947 948 |
# File 'lib/tdlib/client_methods.rb', line 944 def (chat_id:, message_id:) broadcast('@type' => 'clickAnimatedEmojiMessage', 'chat_id' => chat_id, 'message_id' => ) end |
#click_chat_sponsored_message(chat_id:, message_id:) ⇒ TD::Types::Ok
Informs TDLib that the user opened the sponsored chat via the button, the name, the photo, or a mention in the
sponsored .
956 957 958 959 960 |
# File 'lib/tdlib/client_methods.rb', line 956 def (chat_id:, message_id:) broadcast('@type' => 'clickChatSponsoredMessage', 'chat_id' => chat_id, 'message_id' => ) end |
#click_premium_subscription_button ⇒ TD::Types::Ok
Informs TDLib that the user clicked Premium subscription button on the Premium features screen.
965 966 967 |
# File 'lib/tdlib/client_methods.rb', line 965 def broadcast('@type' => 'clickPremiumSubscriptionButton') end |
#close ⇒ TD::Types::Ok
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.
975 976 977 |
# File 'lib/tdlib/client_methods.rb', line 975 def close broadcast('@type' => 'close') end |
#close_chat(chat_id:) ⇒ TD::Types::Ok
Informs TDLib that the chat is closed by the user. Many useful activities depend on the chat being opened or closed.
984 985 986 987 |
# File 'lib/tdlib/client_methods.rb', line 984 def close_chat(chat_id:) broadcast('@type' => 'closeChat', 'chat_id' => chat_id) end |
#close_secret_chat(secret_chat_id:) ⇒ TD::Types::Ok
Closes a secret chat, effectively transferring its state to secretChatStateClosed.
993 994 995 996 |
# File 'lib/tdlib/client_methods.rb', line 993 def close_secret_chat(secret_chat_id:) broadcast('@type' => 'closeSecretChat', 'secret_chat_id' => secret_chat_id) end |
#close_story(story_sender_chat_id:, story_id:) ⇒ TD::Types::Ok
Informs TDLib that a story is closed by the user.
1003 1004 1005 1006 1007 |
# File 'lib/tdlib/client_methods.rb', line 1003 def close_story(story_sender_chat_id:, story_id:) broadcast('@type' => 'closeStory', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id) end |
#close_web_app(web_app_launch_id:) ⇒ TD::Types::Ok
Informs TDLib that a previously opened Web App was closed.
1013 1014 1015 1016 |
# File 'lib/tdlib/client_methods.rb', line 1013 def close_web_app(web_app_launch_id:) broadcast('@type' => 'closeWebApp', 'web_app_launch_id' => web_app_launch_id) end |
#confirm_qr_code_authentication(link:) ⇒ TD::Types::Session
Confirms QR code authentication on another device. Returns created session on success.
1024 1025 1026 1027 |
# File 'lib/tdlib/client_methods.rb', line 1024 def confirm_qr_code_authentication(link:) broadcast('@type' => 'confirmQrCodeAuthentication', 'link' => link) end |
#confirm_session(session_id:) ⇒ TD::Types::Ok
Confirms an unconfirmed session of the current user from another device.
1033 1034 1035 1036 |
# File 'lib/tdlib/client_methods.rb', line 1033 def confirm_session(session_id:) broadcast('@type' => 'confirmSession', 'session_id' => session_id) end |
#create_basic_group_chat(basic_group_id:, force:) ⇒ TD::Types::Chat
Returns an existing chat corresponding to a known basic group.
1044 1045 1046 1047 1048 |
# File 'lib/tdlib/client_methods.rb', line 1044 def create_basic_group_chat(basic_group_id:, force:) broadcast('@type' => 'createBasicGroupChat', 'basic_group_id' => basic_group_id, 'force' => force) end |
#create_business_chat_link(link_info:) ⇒ TD::Types::BusinessChatLink
Creates a business chat link for the current account. Requires Telegram Business subscription. There can be up to getOption(“business_chat_link_count_max”) links created. Returns the created link.
1057 1058 1059 1060 |
# File 'lib/tdlib/client_methods.rb', line 1057 def create_business_chat_link(link_info:) broadcast('@type' => 'createBusinessChatLink', 'link_info' => link_info) end |
#create_call(user_id:, protocol:, is_video:) ⇒ TD::Types::CallId
Creates a new call.
1068 1069 1070 1071 1072 1073 |
# File 'lib/tdlib/client_methods.rb', line 1068 def create_call(user_id:, protocol:, is_video:) broadcast('@type' => 'createCall', 'user_id' => user_id, 'protocol' => protocol, 'is_video' => is_video) end |
#create_chat_folder(folder:) ⇒ TD::Types::ChatFolderInfo
Creates new chat folder. Returns information about the created chat folder. There can be up to getOption(“chat_folder_count_max”) chat folders, but the limit can be increased with Telegram
Premium.
1082 1083 1084 1085 |
# File 'lib/tdlib/client_methods.rb', line 1082 def create_chat_folder(folder:) broadcast('@type' => 'createChatFolder', 'folder' => folder) end |
#create_chat_folder_invite_link(chat_folder_id:, name:, chat_ids:) ⇒ TD::Types::ChatFolderInviteLink
Creates a new invite link for a chat folder. A link can be created for a chat folder if it has only pinned and included chats.
1096 1097 1098 1099 1100 1101 |
# File 'lib/tdlib/client_methods.rb', line 1096 def create_chat_folder_invite_link(chat_folder_id:, name:, chat_ids:) broadcast('@type' => 'createChatFolderInviteLink', 'chat_folder_id' => chat_folder_id, 'name' => name, 'chat_ids' => chat_ids) end |
#create_chat_invite_link(chat_id:, name:, expiration_date:, member_limit:, creates_join_request:) ⇒ TD::Types::ChatInviteLink
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.
1116 1117 1118 1119 1120 1121 1122 1123 |
# File 'lib/tdlib/client_methods.rb', line 1116 def create_chat_invite_link(chat_id:, name:, expiration_date:, member_limit:, creates_join_request:) broadcast('@type' => 'createChatInviteLink', 'chat_id' => chat_id, 'name' => name, 'expiration_date' => expiration_date, 'member_limit' => member_limit, 'creates_join_request' => creates_join_request) end |
#create_chat_subscription_invite_link(chat_id:, name:, subscription_pricing:) ⇒ TD::Types::ChatInviteLink
Creates a new subscription invite link for a channel chat. Requires can_invite_users right in the chat.
1135 1136 1137 1138 1139 1140 |
# File 'lib/tdlib/client_methods.rb', line 1135 def create_chat_subscription_invite_link(chat_id:, name:, subscription_pricing:) broadcast('@type' => 'createChatSubscriptionInviteLink', 'chat_id' => chat_id, 'name' => name, 'subscription_pricing' => subscription_pricing) end |
#create_forum_topic(chat_id:, name:, icon:) ⇒ TD::Types::ForumTopicInfo
Creates a topic in a forum supergroup chat; requires can_manage_topics administrator or can_create_topics member
right in the supergroup.
1152 1153 1154 1155 1156 1157 |
# File 'lib/tdlib/client_methods.rb', line 1152 def create_forum_topic(chat_id:, name:, icon:) broadcast('@type' => 'createForumTopic', 'chat_id' => chat_id, 'name' => name, 'icon' => icon) end |
#create_invoice_link(invoice:) ⇒ TD::Types::HttpUrl
Creates a link for the given invoice; for bots only.
1163 1164 1165 1166 |
# File 'lib/tdlib/client_methods.rb', line 1163 def create_invoice_link(invoice:) broadcast('@type' => 'createInvoiceLink', 'invoice' => invoice) end |
#create_new_basic_group_chat(user_ids: nil, title:, message_auto_delete_time:) ⇒ TD::Types::CreatedBasicGroupChat
Creates a new basic group and sends a corresponding messageBasicGroupChatCreate. Returns information about the newly created chat.
1178 1179 1180 1181 1182 1183 |
# File 'lib/tdlib/client_methods.rb', line 1178 def create_new_basic_group_chat(user_ids: nil, title:, message_auto_delete_time:) broadcast('@type' => 'createNewBasicGroupChat', 'user_ids' => user_ids, 'title' => title, 'message_auto_delete_time' => ) end |
#create_new_secret_chat(user_id:) ⇒ TD::Types::Chat
Creates a new secret chat. Returns the newly created chat.
1190 1191 1192 1193 |
# File 'lib/tdlib/client_methods.rb', line 1190 def create_new_secret_chat(user_id:) broadcast('@type' => 'createNewSecretChat', 'user_id' => user_id) end |
#create_new_sticker_set(user_id:, title:, name: nil, sticker_type:, needs_repainting:, stickers:, source: nil) ⇒ TD::Types::StickerSet
Creates a new sticker set. Returns the newly created sticker set.
1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 |
# File 'lib/tdlib/client_methods.rb', line 1212 def create_new_sticker_set(user_id:, title:, name: nil, sticker_type:, needs_repainting:, stickers:, source: nil) broadcast('@type' => 'createNewStickerSet', 'user_id' => user_id, 'title' => title, 'name' => name, 'sticker_type' => sticker_type, 'needs_repainting' => needs_repainting, 'stickers' => stickers, 'source' => source) end |
#create_new_supergroup_chat(title:, is_forum:, is_channel:, description:, location:, message_auto_delete_time:, for_import:) ⇒ TD::Types::Chat
Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat.
1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 |
# File 'lib/tdlib/client_methods.rb', line 1237 def create_new_supergroup_chat(title:, is_forum:, is_channel:, description:, location:, message_auto_delete_time:, for_import:) broadcast('@type' => 'createNewSupergroupChat', 'title' => title, 'is_forum' => is_forum, 'is_channel' => is_channel, 'description' => description, 'location' => location, 'message_auto_delete_time' => , 'for_import' => for_import) end |
#create_private_chat(user_id:, force:) ⇒ TD::Types::Chat
Returns an existing chat corresponding to a given user.
1255 1256 1257 1258 1259 |
# File 'lib/tdlib/client_methods.rb', line 1255 def create_private_chat(user_id:, force:) broadcast('@type' => 'createPrivateChat', 'user_id' => user_id, 'force' => force) end |
#create_secret_chat(secret_chat_id:) ⇒ TD::Types::Chat
Returns an existing chat corresponding to a known secret chat.
1265 1266 1267 1268 |
# File 'lib/tdlib/client_methods.rb', line 1265 def create_secret_chat(secret_chat_id:) broadcast('@type' => 'createSecretChat', 'secret_chat_id' => secret_chat_id) end |
#create_supergroup_chat(supergroup_id:, force:) ⇒ TD::Types::Chat
Returns an existing chat corresponding to a known supergroup or channel.
1276 1277 1278 1279 1280 |
# File 'lib/tdlib/client_methods.rb', line 1276 def create_supergroup_chat(supergroup_id:, force:) broadcast('@type' => 'createSupergroupChat', 'supergroup_id' => supergroup_id, 'force' => force) end |
#create_temporary_password(password:, valid_for:) ⇒ TD::Types::TemporaryPasswordState
Creates a new temporary password for processing payments.
1288 1289 1290 1291 1292 |
# File 'lib/tdlib/client_methods.rb', line 1288 def create_temporary_password(password:, valid_for:) broadcast('@type' => 'createTemporaryPassword', 'password' => password, 'valid_for' => valid_for) end |
#create_video_chat(chat_id:, title: nil, start_date:, is_rtmp_stream:) ⇒ TD::Types::GroupCallId
Creates a video chat (a group call bound to a chat). Available only for basic groups, supergroups and channels; requires can_manage_video_chats administrator right.
1305 1306 1307 1308 1309 1310 1311 |
# File 'lib/tdlib/client_methods.rb', line 1305 def create_video_chat(chat_id:, title: nil, start_date:, is_rtmp_stream:) broadcast('@type' => 'createVideoChat', 'chat_id' => chat_id, 'title' => title, 'start_date' => start_date, 'is_rtmp_stream' => is_rtmp_stream) end |
#delete_account(reason: nil, password:) ⇒ TD::Types::Ok
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.
1322 1323 1324 1325 1326 |
# File 'lib/tdlib/client_methods.rb', line 1322 def delete_account(reason: nil, password:) broadcast('@type' => 'deleteAccount', 'reason' => reason, 'password' => password) end |
#delete_all_call_messages(revoke:) ⇒ TD::Types::Ok
Deletes all call messages.
1332 1333 1334 1335 |
# File 'lib/tdlib/client_methods.rb', line 1332 def (revoke:) broadcast('@type' => 'deleteAllCallMessages', 'revoke' => revoke) end |
#delete_all_revoked_chat_invite_links(chat_id:, creator_user_id:) ⇒ TD::Types::Ok
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.
1345 1346 1347 1348 1349 |
# File 'lib/tdlib/client_methods.rb', line 1345 def delete_all_revoked_chat_invite_links(chat_id:, creator_user_id:) broadcast('@type' => 'deleteAllRevokedChatInviteLinks', 'chat_id' => chat_id, 'creator_user_id' => creator_user_id) end |
#delete_bot_media_previews(bot_user_id:, language_code:, file_ids:) ⇒ TD::Types::Ok
Delete media previews from the list of media previews of a bot.
1358 1359 1360 1361 1362 1363 |
# File 'lib/tdlib/client_methods.rb', line 1358 def delete_bot_media_previews(bot_user_id:, language_code:, file_ids:) broadcast('@type' => 'deleteBotMediaPreviews', 'bot_user_id' => bot_user_id, 'language_code' => language_code, 'file_ids' => file_ids) end |
#delete_business_chat_link(link:) ⇒ TD::Types::Ok
Deletes a business chat link of the current account.
1369 1370 1371 1372 |
# File 'lib/tdlib/client_methods.rb', line 1369 def delete_business_chat_link(link:) broadcast('@type' => 'deleteBusinessChatLink', 'link' => link) end |
#delete_business_connected_bot(bot_user_id:) ⇒ TD::Types::Ok
Deletes the business bot that is connected to the current user account.
1378 1379 1380 1381 |
# File 'lib/tdlib/client_methods.rb', line 1378 def delete_business_connected_bot(bot_user_id:) broadcast('@type' => 'deleteBusinessConnectedBot', 'bot_user_id' => bot_user_id) end |
#delete_chat(chat_id:) ⇒ TD::Types::Ok
Deletes a chat along with all messages in the corresponding chat for all chat members. For group chats this will release the usernames and remove all members. Use the field chat.can_be_deleted_for_all_users to find whether the method can be applied to the chat.
1389 1390 1391 1392 |
# File 'lib/tdlib/client_methods.rb', line 1389 def delete_chat(chat_id:) broadcast('@type' => 'deleteChat', 'chat_id' => chat_id) end |
#delete_chat_background(chat_id:, restore_previous:) ⇒ TD::Types::Ok
Deletes background in a specific chat.
1402 1403 1404 1405 1406 |
# File 'lib/tdlib/client_methods.rb', line 1402 def delete_chat_background(chat_id:, restore_previous:) broadcast('@type' => 'deleteChatBackground', 'chat_id' => chat_id, 'restore_previous' => restore_previous) end |
#delete_chat_folder(chat_folder_id:, leave_chat_ids:) ⇒ TD::Types::Ok
Deletes existing chat folder.
1414 1415 1416 1417 1418 |
# File 'lib/tdlib/client_methods.rb', line 1414 def delete_chat_folder(chat_folder_id:, leave_chat_ids:) broadcast('@type' => 'deleteChatFolder', 'chat_folder_id' => chat_folder_id, 'leave_chat_ids' => leave_chat_ids) end |
#delete_chat_folder_invite_link(chat_folder_id:, invite_link:) ⇒ TD::Types::Ok
Deletes an invite link for a chat folder.
1425 1426 1427 1428 1429 |
# File 'lib/tdlib/client_methods.rb', line 1425 def delete_chat_folder_invite_link(chat_folder_id:, invite_link:) broadcast('@type' => 'deleteChatFolderInviteLink', 'chat_folder_id' => chat_folder_id, 'invite_link' => invite_link) end |
#delete_chat_history(chat_id:, remove_from_chat_list:, revoke:) ⇒ TD::Types::Ok
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.
1439 1440 1441 1442 1443 1444 |
# File 'lib/tdlib/client_methods.rb', line 1439 def delete_chat_history(chat_id:, remove_from_chat_list:, revoke:) broadcast('@type' => 'deleteChatHistory', 'chat_id' => chat_id, 'remove_from_chat_list' => remove_from_chat_list, 'revoke' => revoke) end |
#delete_chat_messages_by_date(chat_id:, min_date:, max_date:, revoke:) ⇒ TD::Types::Ok
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.
1455 1456 1457 1458 1459 1460 1461 |
# File 'lib/tdlib/client_methods.rb', line 1455 def (chat_id:, min_date:, max_date:, revoke:) broadcast('@type' => 'deleteChatMessagesByDate', 'chat_id' => chat_id, 'min_date' => min_date, 'max_date' => max_date, 'revoke' => revoke) end |
#delete_chat_messages_by_sender(chat_id:, sender_id:) ⇒ TD::Types::Ok
Deletes all messages sent by the specified message sender in a chat. Supported only for supergroups; requires can_delete_messages administrator privileges.
1469 1470 1471 1472 1473 |
# File 'lib/tdlib/client_methods.rb', line 1469 def (chat_id:, sender_id:) broadcast('@type' => 'deleteChatMessagesBySender', 'chat_id' => chat_id, 'sender_id' => sender_id) end |
#delete_chat_reply_markup(chat_id:, message_id:) ⇒ TD::Types::Ok
Deletes the default reply markup from a chat. Must be called after a one-time keyboard or a replyMarkupForceReply reply markup has been used. An updateChatReplyMarkup update will be sent if the reply markup is changed.
1482 1483 1484 1485 1486 |
# File 'lib/tdlib/client_methods.rb', line 1482 def delete_chat_reply_markup(chat_id:, message_id:) broadcast('@type' => 'deleteChatReplyMarkup', 'chat_id' => chat_id, 'message_id' => ) end |
#delete_commands(scope:, language_code:) ⇒ TD::Types::Ok
Deletes commands supported by the bot for the given user scope and language; for bots only.
1494 1495 1496 1497 1498 |
# File 'lib/tdlib/client_methods.rb', line 1494 def delete_commands(scope:, language_code:) broadcast('@type' => 'deleteCommands', 'scope' => scope, 'language_code' => language_code) end |
#delete_default_background(for_dark_theme:) ⇒ TD::Types::Ok
Deletes default background for chats.
1504 1505 1506 1507 |
# File 'lib/tdlib/client_methods.rb', line 1504 def delete_default_background(for_dark_theme:) broadcast('@type' => 'deleteDefaultBackground', 'for_dark_theme' => for_dark_theme) end |
#delete_file(file_id:) ⇒ TD::Types::Ok
Deletes a file from the TDLib file cache.
1513 1514 1515 1516 |
# File 'lib/tdlib/client_methods.rb', line 1513 def delete_file(file_id:) broadcast('@type' => 'deleteFile', 'file_id' => file_id) end |
#delete_forum_topic(chat_id:, message_thread_id:) ⇒ TD::Types::Ok
Deletes all messages in a forum topic; requires can_delete_messages administrator right in the supergroup unless
the user is creator of the topic, the topic has no from other users and has at most 11 .
1524 1525 1526 1527 1528 |
# File 'lib/tdlib/client_methods.rb', line 1524 def delete_forum_topic(chat_id:, message_thread_id:) broadcast('@type' => 'deleteForumTopic', 'chat_id' => chat_id, 'message_thread_id' => ) end |
#delete_language_pack(language_pack_id:) ⇒ TD::Types::Ok
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.
1537 1538 1539 1540 |
# File 'lib/tdlib/client_methods.rb', line 1537 def delete_language_pack(language_pack_id:) broadcast('@type' => 'deleteLanguagePack', 'language_pack_id' => language_pack_id) end |
#delete_messages(chat_id:, message_ids:, revoke:) ⇒ TD::Types::Ok
Deletes messages.
1551 1552 1553 1554 1555 1556 |
# File 'lib/tdlib/client_methods.rb', line 1551 def (chat_id:, message_ids:, revoke:) broadcast('@type' => 'deleteMessages', 'chat_id' => chat_id, 'message_ids' => , 'revoke' => revoke) end |
#delete_passport_element(type:) ⇒ TD::Types::Ok
Deletes a Telegram Passport element.
1562 1563 1564 1565 |
# File 'lib/tdlib/client_methods.rb', line 1562 def delete_passport_element(type:) broadcast('@type' => 'deletePassportElement', 'type' => type) end |
#delete_profile_photo(profile_photo_id:) ⇒ TD::Types::Ok
Deletes a profile photo.
1571 1572 1573 1574 |
# File 'lib/tdlib/client_methods.rb', line 1571 def delete_profile_photo(profile_photo_id:) broadcast('@type' => 'deleteProfilePhoto', 'profile_photo_id' => profile_photo_id) end |
#delete_quick_reply_shortcut(shortcut_id:) ⇒ TD::Types::Ok
Deletes a quick reply shortcut.
1580 1581 1582 1583 |
# File 'lib/tdlib/client_methods.rb', line 1580 def delete_quick_reply_shortcut(shortcut_id:) broadcast('@type' => 'deleteQuickReplyShortcut', 'shortcut_id' => shortcut_id) end |
#delete_quick_reply_shortcut_messages(shortcut_id:, message_ids:) ⇒ TD::Types::Ok
Deletes specified quick reply messages.
1590 1591 1592 1593 1594 |
# File 'lib/tdlib/client_methods.rb', line 1590 def (shortcut_id:, message_ids:) broadcast('@type' => 'deleteQuickReplyShortcutMessages', 'shortcut_id' => shortcut_id, 'message_ids' => ) end |
#delete_revoked_chat_invite_link(chat_id:, invite_link:) ⇒ TD::Types::Ok
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.
1603 1604 1605 1606 1607 |
# File 'lib/tdlib/client_methods.rb', line 1603 def delete_revoked_chat_invite_link(chat_id:, invite_link:) broadcast('@type' => 'deleteRevokedChatInviteLink', 'chat_id' => chat_id, 'invite_link' => invite_link) end |
#delete_saved_credentials ⇒ TD::Types::Ok
Deletes saved credentials for all payment provider bots.
1612 1613 1614 |
# File 'lib/tdlib/client_methods.rb', line 1612 def delete_saved_credentials broadcast('@type' => 'deleteSavedCredentials') end |
#delete_saved_messages_topic_history(saved_messages_topic_id:) ⇒ TD::Types::Ok
Deletes all messages in a Saved Messages topic.
1620 1621 1622 1623 |
# File 'lib/tdlib/client_methods.rb', line 1620 def (saved_messages_topic_id:) broadcast('@type' => 'deleteSavedMessagesTopicHistory', 'saved_messages_topic_id' => ) end |
#delete_saved_messages_topic_messages_by_date(saved_messages_topic_id:, min_date:, max_date:) ⇒ TD::Types::Ok
Deletes all messages between the specified dates in a Saved Messages topic. Messages sent in the last 30 seconds will not be deleted.
1632 1633 1634 1635 1636 1637 |
# File 'lib/tdlib/client_methods.rb', line 1632 def (saved_messages_topic_id:, min_date:, max_date:) broadcast('@type' => 'deleteSavedMessagesTopicMessagesByDate', 'saved_messages_topic_id' => , 'min_date' => min_date, 'max_date' => max_date) end |
#delete_saved_order_info ⇒ TD::Types::Ok
Deletes saved order information.
1642 1643 1644 |
# File 'lib/tdlib/client_methods.rb', line 1642 def delete_saved_order_info broadcast('@type' => 'deleteSavedOrderInfo') end |
#delete_sticker_set(name:) ⇒ TD::Types::Ok
Completely deletes a sticker set.
1651 1652 1653 1654 |
# File 'lib/tdlib/client_methods.rb', line 1651 def delete_sticker_set(name:) broadcast('@type' => 'deleteStickerSet', 'name' => name) end |
#delete_story(story_sender_chat_id:, story_id:) ⇒ TD::Types::Ok
Deletes a previously sent story. Can be called only if story.can_be_deleted == true.
1662 1663 1664 1665 1666 |
# File 'lib/tdlib/client_methods.rb', line 1662 def delete_story(story_sender_chat_id:, story_id:) broadcast('@type' => 'deleteStory', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id) end |
#destroy ⇒ TD::Types::Ok
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.
1675 1676 1677 |
# File 'lib/tdlib/client_methods.rb', line 1675 def destroy broadcast('@type' => 'destroy') end |
#disable_all_supergroup_usernames(supergroup_id:) ⇒ TD::Types::Ok
Disables all active non-editable usernames of a supergroup or channel, requires owner privileges in the supergroup
or channel.
1684 1685 1686 1687 |
# File 'lib/tdlib/client_methods.rb', line 1684 def disable_all_supergroup_usernames(supergroup_id:) broadcast('@type' => 'disableAllSupergroupUsernames', 'supergroup_id' => supergroup_id) end |
#disable_proxy ⇒ TD::Types::Ok
Disables the currently enabled proxy. Can be called before authorization.
1693 1694 1695 |
# File 'lib/tdlib/client_methods.rb', line 1693 def disable_proxy broadcast('@type' => 'disableProxy') end |
#discard_call(call_id:, is_disconnected:, duration:, is_video:, connection_id:) ⇒ TD::Types::Ok
Discards a call.
1705 1706 1707 1708 1709 1710 1711 1712 |
# File 'lib/tdlib/client_methods.rb', line 1705 def discard_call(call_id:, is_disconnected:, duration:, is_video:, connection_id:) broadcast('@type' => 'discardCall', 'call_id' => call_id, 'is_disconnected' => is_disconnected, 'duration' => duration, 'is_video' => is_video, 'connection_id' => connection_id) end |
#disconnect_all_websites ⇒ TD::Types::Ok
Disconnects all websites from the current user’s Telegram account.
1717 1718 1719 |
# File 'lib/tdlib/client_methods.rb', line 1717 def disconnect_all_websites broadcast('@type' => 'disconnectAllWebsites') end |
#disconnect_website(website_id:) ⇒ TD::Types::Ok
Disconnects website from the current user’s Telegram account.
1725 1726 1727 1728 |
# File 'lib/tdlib/client_methods.rb', line 1725 def disconnect_website(website_id:) broadcast('@type' => 'disconnectWebsite', 'website_id' => website_id) end |
#download_file(file_id:, priority:, offset:, limit:, synchronous:) ⇒ TD::Types::File
Downloads a file from the cloud. Download progress and completion of the download will be notified through updateFile updates.
1745 1746 1747 1748 1749 1750 1751 1752 |
# File 'lib/tdlib/client_methods.rb', line 1745 def download_file(file_id:, priority:, offset:, limit:, synchronous:) broadcast('@type' => 'downloadFile', 'file_id' => file_id, 'priority' => priority, 'offset' => offset, 'limit' => limit, 'synchronous' => synchronous) end |
#edit_bot_media_preview(bot_user_id:, language_code:, file_id:, content:) ⇒ TD::Types::BotMediaPreview
Replaces media preview in the list of media previews of a bot. Returns the new preview after edit is completed server-side.
1763 1764 1765 1766 1767 1768 1769 |
# File 'lib/tdlib/client_methods.rb', line 1763 def edit_bot_media_preview(bot_user_id:, language_code:, file_id:, content:) broadcast('@type' => 'editBotMediaPreview', 'bot_user_id' => bot_user_id, 'language_code' => language_code, 'file_id' => file_id, 'content' => content) end |
#edit_business_chat_link(link:, link_info:) ⇒ TD::Types::BusinessChatLink
Edits a business chat link of the current account. Requires Telegram Business subscription. Returns the edited link.
1778 1779 1780 1781 1782 |
# File 'lib/tdlib/client_methods.rb', line 1778 def edit_business_chat_link(link:, link_info:) broadcast('@type' => 'editBusinessChatLink', 'link' => link, 'link_info' => link_info) end |
#edit_business_message_caption(business_connection_id:, chat_id:, message_id:, reply_markup:, caption:, show_caption_above_media:) ⇒ TD::Types::BusinessMessage
Edits the caption of a message sent on behalf of a business account; for bots only.
1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 |
# File 'lib/tdlib/client_methods.rb', line 1797 def (business_connection_id:, chat_id:, message_id:, reply_markup:, caption:, show_caption_above_media:) broadcast('@type' => 'editBusinessMessageCaption', 'business_connection_id' => business_connection_id, 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup, 'caption' => caption, 'show_caption_above_media' => show_caption_above_media) end |
#edit_business_message_live_location(business_connection_id:, chat_id:, message_id:, reply_markup:, location:, live_period:, heading:, proximity_alert_radius:) ⇒ TD::Types::BusinessMessage
Edits the content of a live location in a message sent on behalf of a business account; for bots only.
1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 |
# File 'lib/tdlib/client_methods.rb', line 1828 def (business_connection_id:, chat_id:, message_id:, reply_markup:, location:, live_period:, heading:, proximity_alert_radius:) broadcast('@type' => 'editBusinessMessageLiveLocation', 'business_connection_id' => business_connection_id, 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup, 'location' => location, 'live_period' => live_period, 'heading' => heading, 'proximity_alert_radius' => proximity_alert_radius) end |
#edit_business_message_media(business_connection_id:, chat_id:, message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::BusinessMessage
Edits the content of a message with an animation, an audio, a document, a photo or a video in a message sent on
behalf of a business account; for bots only.
1853 1854 1855 1856 1857 1858 1859 1860 |
# File 'lib/tdlib/client_methods.rb', line 1853 def (business_connection_id:, chat_id:, message_id:, reply_markup:, input_message_content:) broadcast('@type' => 'editBusinessMessageMedia', 'business_connection_id' => business_connection_id, 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup, 'input_message_content' => ) end |
#edit_business_message_reply_markup(business_connection_id:, chat_id:, message_id:, reply_markup:) ⇒ TD::Types::BusinessMessage
Edits the reply markup of a message sent on behalf of a business account; for bots only.
1870 1871 1872 1873 1874 1875 1876 |
# File 'lib/tdlib/client_methods.rb', line 1870 def (business_connection_id:, chat_id:, message_id:, reply_markup:) broadcast('@type' => 'editBusinessMessageReplyMarkup', 'business_connection_id' => business_connection_id, 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup) end |
#edit_business_message_text(business_connection_id:, chat_id:, message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::BusinessMessage
Edits the text of a text or game message sent on behalf of a business account; for bots only.
1888 1889 1890 1891 1892 1893 1894 1895 |
# File 'lib/tdlib/client_methods.rb', line 1888 def (business_connection_id:, chat_id:, message_id:, reply_markup:, input_message_content:) broadcast('@type' => 'editBusinessMessageText', 'business_connection_id' => business_connection_id, 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup, 'input_message_content' => ) end |
#edit_chat_folder(chat_folder_id:, folder:) ⇒ TD::Types::ChatFolderInfo
Edits existing chat folder. Returns information about the edited chat folder.
1903 1904 1905 1906 1907 |
# File 'lib/tdlib/client_methods.rb', line 1903 def edit_chat_folder(chat_folder_id:, folder:) broadcast('@type' => 'editChatFolder', 'chat_folder_id' => chat_folder_id, 'folder' => folder) end |
#edit_chat_folder_invite_link(chat_folder_id:, invite_link:, name:, chat_ids:) ⇒ TD::Types::ChatFolderInviteLink
Edits an invite link for a chat folder.
1918 1919 1920 1921 1922 1923 1924 |
# File 'lib/tdlib/client_methods.rb', line 1918 def edit_chat_folder_invite_link(chat_folder_id:, invite_link:, name:, chat_ids:) broadcast('@type' => 'editChatFolderInviteLink', 'chat_folder_id' => chat_folder_id, 'invite_link' => invite_link, 'name' => name, 'chat_ids' => chat_ids) end |
#edit_chat_invite_link(chat_id:, invite_link:, name:, expiration_date:, member_limit:, creates_join_request:) ⇒ TD::Types::ChatInviteLink
Edits a non-primary invite link for a chat. Available for basic groups, supergroups, and channels. If the link creates a subscription, then expiration_date, member_limit and creates_join_request must not be used
Requires administrator privileges and can_invite_users right in the chat for own links and owner privileges for other
links.
1942 1943 1944 1945 1946 1947 1948 1949 1950 |
# File 'lib/tdlib/client_methods.rb', line 1942 def edit_chat_invite_link(chat_id:, invite_link:, name:, expiration_date:, member_limit:, creates_join_request:) broadcast('@type' => 'editChatInviteLink', 'chat_id' => chat_id, 'invite_link' => invite_link, 'name' => name, 'expiration_date' => expiration_date, 'member_limit' => member_limit, 'creates_join_request' => creates_join_request) end |
#edit_chat_subscription_invite_link(chat_id:, invite_link:, name:) ⇒ TD::Types::ChatInviteLink
Edits a subscription invite link for a channel chat. Requires can_invite_users right in the chat for own links and owner privileges for other links.
1959 1960 1961 1962 1963 1964 |
# File 'lib/tdlib/client_methods.rb', line 1959 def edit_chat_subscription_invite_link(chat_id:, invite_link:, name:) broadcast('@type' => 'editChatSubscriptionInviteLink', 'chat_id' => chat_id, 'invite_link' => invite_link, 'name' => name) end |
#edit_custom_language_pack_info(info:) ⇒ TD::Types::Ok
Edits information about a custom local language pack in the current localization target. Can be called before authorization.
1971 1972 1973 1974 |
# File 'lib/tdlib/client_methods.rb', line 1971 def edit_custom_language_pack_info(info:) broadcast('@type' => 'editCustomLanguagePackInfo', 'info' => info) end |
#edit_forum_topic(chat_id:, message_thread_id:, name: nil, edit_icon_custom_emoji:, icon_custom_emoji_id:) ⇒ TD::Types::Ok
Edits title and icon of a topic in a forum supergroup chat; requires can_manage_topics right in the supergroup
unless the user is creator of the topic.
1991 1992 1993 1994 1995 1996 1997 1998 |
# File 'lib/tdlib/client_methods.rb', line 1991 def edit_forum_topic(chat_id:, message_thread_id:, name: nil, edit_icon_custom_emoji:, icon_custom_emoji_id:) broadcast('@type' => 'editForumTopic', 'chat_id' => chat_id, 'message_thread_id' => , 'name' => name, 'edit_icon_custom_emoji' => edit_icon_custom_emoji, 'icon_custom_emoji_id' => icon_custom_emoji_id) end |
#edit_inline_message_caption(inline_message_id:, reply_markup:, caption:, show_caption_above_media:) ⇒ TD::Types::Ok
Edits the caption of an inline message sent via a bot; for bots only.
2010 2011 2012 2013 2014 2015 2016 |
# File 'lib/tdlib/client_methods.rb', line 2010 def (inline_message_id:, reply_markup:, caption:, show_caption_above_media:) broadcast('@type' => 'editInlineMessageCaption', 'inline_message_id' => , 'reply_markup' => reply_markup, 'caption' => caption, 'show_caption_above_media' => show_caption_above_media) end |
#edit_inline_message_live_location(inline_message_id:, reply_markup:, location:, live_period:, heading:, proximity_alert_radius:) ⇒ TD::Types::Ok
Edits the content of a live location in an inline message sent via a bot; for bots only.
2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 |
# File 'lib/tdlib/client_methods.rb', line 2035 def (inline_message_id:, reply_markup:, location:, live_period:, heading:, proximity_alert_radius:) broadcast('@type' => 'editInlineMessageLiveLocation', 'inline_message_id' => , 'reply_markup' => reply_markup, 'location' => location, 'live_period' => live_period, 'heading' => heading, 'proximity_alert_radius' => proximity_alert_radius) end |
#edit_inline_message_media(inline_message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::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.
2055 2056 2057 2058 2059 2060 |
# File 'lib/tdlib/client_methods.rb', line 2055 def (inline_message_id:, reply_markup:, input_message_content:) broadcast('@type' => 'editInlineMessageMedia', 'inline_message_id' => , 'reply_markup' => reply_markup, 'input_message_content' => ) end |
#edit_inline_message_reply_markup(inline_message_id:, reply_markup:) ⇒ TD::Types::Ok
Edits the reply markup of an inline message sent via a bot; for bots only.
2067 2068 2069 2070 2071 |
# File 'lib/tdlib/client_methods.rb', line 2067 def (inline_message_id:, reply_markup:) broadcast('@type' => 'editInlineMessageReplyMarkup', 'inline_message_id' => , 'reply_markup' => reply_markup) end |
#edit_inline_message_text(inline_message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::Ok
Edits the text of an inline text or game message sent via a bot; for bots only.
2080 2081 2082 2083 2084 2085 |
# File 'lib/tdlib/client_methods.rb', line 2080 def (inline_message_id:, reply_markup:, input_message_content:) broadcast('@type' => 'editInlineMessageText', 'inline_message_id' => , 'reply_markup' => reply_markup, 'input_message_content' => ) end |
#edit_message_caption(chat_id:, message_id:, reply_markup:, caption:, show_caption_above_media:) ⇒ TD::Types::Message
Edits the message content caption. Returns the edited message after the edit is completed on the server side.
2100 2101 2102 2103 2104 2105 2106 2107 |
# File 'lib/tdlib/client_methods.rb', line 2100 def (chat_id:, message_id:, reply_markup:, caption:, show_caption_above_media:) broadcast('@type' => 'editMessageCaption', 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup, 'caption' => caption, 'show_caption_above_media' => show_caption_above_media) end |
#edit_message_live_location(chat_id:, message_id:, reply_markup:, location:, live_period:, heading:, proximity_alert_radius:) ⇒ TD::Types::Message
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.
2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 |
# File 'lib/tdlib/client_methods.rb', line 2130 def (chat_id:, message_id:, reply_markup:, location:, live_period:, heading:, proximity_alert_radius:) broadcast('@type' => 'editMessageLiveLocation', 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup, 'location' => location, 'live_period' => live_period, 'heading' => heading, 'proximity_alert_radius' => proximity_alert_radius) end |
#edit_message_media(chat_id:, message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::Message
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.
2158 2159 2160 2161 2162 2163 2164 |
# File 'lib/tdlib/client_methods.rb', line 2158 def (chat_id:, message_id:, reply_markup:, input_message_content:) broadcast('@type' => 'editMessageMedia', 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup, 'input_message_content' => ) end |
#edit_message_reply_markup(chat_id:, message_id:, reply_markup:) ⇒ TD::Types::Message
Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side.
2174 2175 2176 2177 2178 2179 |
# File 'lib/tdlib/client_methods.rb', line 2174 def (chat_id:, message_id:, reply_markup:) broadcast('@type' => 'editMessageReplyMarkup', 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup) end |
#edit_message_scheduling_state(chat_id:, message_id:, scheduling_state:) ⇒ TD::Types::Ok
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.
2190 2191 2192 2193 2194 2195 |
# File 'lib/tdlib/client_methods.rb', line 2190 def (chat_id:, message_id:, scheduling_state:) broadcast('@type' => 'editMessageSchedulingState', 'chat_id' => chat_id, 'message_id' => , 'scheduling_state' => scheduling_state) end |
#edit_message_text(chat_id:, message_id:, reply_markup:, input_message_content:) ⇒ TD::Types::Message
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.
2207 2208 2209 2210 2211 2212 2213 |
# File 'lib/tdlib/client_methods.rb', line 2207 def (chat_id:, message_id:, reply_markup:, input_message_content:) broadcast('@type' => 'editMessageText', 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup, 'input_message_content' => ) end |
#edit_proxy(proxy_id:, server:, port:, enable:, type:) ⇒ TD::Types::Proxy
Edits an existing proxy server for network requests. Can be called before authorization.
2224 2225 2226 2227 2228 2229 2230 2231 |
# File 'lib/tdlib/client_methods.rb', line 2224 def edit_proxy(proxy_id:, server:, port:, enable:, type:) broadcast('@type' => 'editProxy', 'proxy_id' => proxy_id, 'server' => server, 'port' => port, 'enable' => enable, 'type' => type) end |
#edit_quick_reply_message(shortcut_id:, message_id:, input_message_content:) ⇒ TD::Types::Ok
Asynchronously edits the text, media or caption of a quick reply message. Use quickReplyMessage.can_be_edited to check whether a message can be edited. Text message can be edited only to a text message. The type of message content in an album can’t be changed with exception of replacing a photo with a video or vice
versa.
2245 2246 2247 2248 2249 2250 |
# File 'lib/tdlib/client_methods.rb', line 2245 def (shortcut_id:, message_id:, input_message_content:) broadcast('@type' => 'editQuickReplyMessage', 'shortcut_id' => shortcut_id, 'message_id' => , 'input_message_content' => ) end |
#edit_star_subscription(subscription_id:, is_canceled:) ⇒ TD::Types::Ok
Cancels or reenables Telegram Star subscription to a channel.
2257 2258 2259 2260 2261 |
# File 'lib/tdlib/client_methods.rb', line 2257 def edit_star_subscription(subscription_id:, is_canceled:) broadcast('@type' => 'editStarSubscription', 'subscription_id' => subscription_id, 'is_canceled' => is_canceled) end |
#edit_story(story_sender_chat_id:, story_id:, content:, areas:, caption:) ⇒ TD::Types::Ok
Changes content and caption of a story. Can be called only if story.can_be_edited == true.
2274 2275 2276 2277 2278 2279 2280 2281 |
# File 'lib/tdlib/client_methods.rb', line 2274 def edit_story(story_sender_chat_id:, story_id:, content:, areas:, caption:) broadcast('@type' => 'editStory', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id, 'content' => content, 'areas' => areas, 'caption' => caption) end |
#edit_story_cover(story_sender_chat_id:, story_id:, cover_frame_timestamp:) ⇒ TD::Types::Ok
Changes cover of a video story. Can be called only if story.can_be_edited == true and the story isn’t being edited now.
2290 2291 2292 2293 2294 2295 |
# File 'lib/tdlib/client_methods.rb', line 2290 def edit_story_cover(story_sender_chat_id:, story_id:, cover_frame_timestamp:) broadcast('@type' => 'editStoryCover', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id, 'cover_frame_timestamp' => ) end |
#enable_proxy(proxy_id:) ⇒ TD::Types::Ok
Enables a proxy. Only one proxy can be enabled at a time. Can be called before authorization.
2303 2304 2305 2306 |
# File 'lib/tdlib/client_methods.rb', line 2303 def enable_proxy(proxy_id:) broadcast('@type' => 'enableProxy', 'proxy_id' => proxy_id) end |
#end_group_call(group_call_id:) ⇒ TD::Types::Ok
Ends a group call. Requires groupCall.can_be_managed.
2313 2314 2315 2316 |
# File 'lib/tdlib/client_methods.rb', line 2313 def end_group_call(group_call_id:) broadcast('@type' => 'endGroupCall', 'group_call_id' => group_call_id) end |
#end_group_call_recording(group_call_id:) ⇒ TD::Types::Ok
Ends recording of an active group call. Requires groupCall.can_be_managed group call flag.
2323 2324 2325 2326 |
# File 'lib/tdlib/client_methods.rb', line 2323 def end_group_call_recording(group_call_id:) broadcast('@type' => 'endGroupCallRecording', 'group_call_id' => group_call_id) end |
#end_group_call_screen_sharing(group_call_id:) ⇒ TD::Types::Ok
Ends screen sharing in a joined group call.
2332 2333 2334 2335 |
# File 'lib/tdlib/client_methods.rb', line 2332 def end_group_call_screen_sharing(group_call_id:) broadcast('@type' => 'endGroupCallScreenSharing', 'group_call_id' => group_call_id) end |
#finish_file_generation(generation_id:, error:) ⇒ TD::Types::Ok
Finishes the file generation.
2343 2344 2345 2346 2347 |
# File 'lib/tdlib/client_methods.rb', line 2343 def finish_file_generation(generation_id:, error:) broadcast('@type' => 'finishFileGeneration', 'generation_id' => generation_id, 'error' => error) end |
#forward_messages(chat_id:, message_thread_id:, from_chat_id:, message_ids:, options:, send_copy:, remove_caption:) ⇒ TD::Types::Messages
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.
2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 |
# File 'lib/tdlib/client_methods.rb', line 2368 def (chat_id:, message_thread_id:, from_chat_id:, message_ids:, options:, send_copy:, remove_caption:) broadcast('@type' => 'forwardMessages', 'chat_id' => chat_id, 'message_thread_id' => , 'from_chat_id' => from_chat_id, 'message_ids' => , 'options' => , 'send_copy' => send_copy, 'remove_caption' => remove_caption) end |
#get_account_ttl ⇒ TD::Types::AccountTtl
Returns the period of inactivity after which the account of the current user will automatically be deleted.
2382 2383 2384 |
# File 'lib/tdlib/client_methods.rb', line 2382 def get_account_ttl broadcast('@type' => 'getAccountTtl') end |
#get_active_sessions ⇒ TD::Types::Sessions
Returns all active sessions of the current user.
2389 2390 2391 |
# File 'lib/tdlib/client_methods.rb', line 2389 def get_active_sessions broadcast('@type' => 'getActiveSessions') end |
#get_all_passport_elements(password:) ⇒ TD::Types::PassportElements
Returns all available Telegram Passport elements.
2397 2398 2399 2400 |
# File 'lib/tdlib/client_methods.rb', line 2397 def get_all_passport_elements(password:) broadcast('@type' => 'getAllPassportElements', 'password' => password) end |
#get_all_sticker_emojis(sticker_type:, query:, chat_id:, return_only_main_emoji:) ⇒ TD::Types::Emojis
Returns unique emoji that correspond to stickers to be found by the getStickers(sticker_type, query, 1000000,
chat_id).
2411 2412 2413 2414 2415 2416 2417 |
# File 'lib/tdlib/client_methods.rb', line 2411 def get_all_sticker_emojis(sticker_type:, query:, chat_id:, return_only_main_emoji:) broadcast('@type' => 'getAllStickerEmojis', 'sticker_type' => sticker_type, 'query' => query, 'chat_id' => chat_id, 'return_only_main_emoji' => return_only_main_emoji) end |
#get_animated_emoji(emoji:) ⇒ TD::Types::AnimatedEmoji
Returns an animated emoji corresponding to a given emoji. Returns a 404 error if the emoji has no animated emoji.
2424 2425 2426 2427 |
# File 'lib/tdlib/client_methods.rb', line 2424 def get_animated_emoji(emoji:) broadcast('@type' => 'getAnimatedEmoji', 'emoji' => emoji) end |
#get_application_config ⇒ TD::Types::JsonValue
Returns application config, provided by the server. Can be called before authorization.
2433 2434 2435 |
# File 'lib/tdlib/client_methods.rb', line 2433 def get_application_config broadcast('@type' => 'getApplicationConfig') end |
#get_application_download_link ⇒ TD::Types::HttpUrl
Returns the link for downloading official Telegram application to be used when the current user invites friends to
Telegram.
2441 2442 2443 |
# File 'lib/tdlib/client_methods.rb', line 2441 def get_application_download_link broadcast('@type' => 'getApplicationDownloadLink') end |
#get_archive_chat_list_settings ⇒ TD::Types::ArchiveChatListSettings
Returns settings for automatic moving of chats to and from the Archive chat lists.
2448 2449 2450 |
# File 'lib/tdlib/client_methods.rb', line 2448 def get_archive_chat_list_settings broadcast('@type' => 'getArchiveChatListSettings') end |
#get_archived_sticker_sets(sticker_type:, offset_sticker_set_id:, limit:) ⇒ TD::Types::StickerSets
Returns a list of archived sticker sets.
2459 2460 2461 2462 2463 2464 |
# File 'lib/tdlib/client_methods.rb', line 2459 def get_archived_sticker_sets(sticker_type:, offset_sticker_set_id:, limit:) broadcast('@type' => 'getArchivedStickerSets', 'sticker_type' => sticker_type, 'offset_sticker_set_id' => offset_sticker_set_id, 'limit' => limit) end |
#get_attached_sticker_sets(file_id:) ⇒ TD::Types::StickerSets
Returns a list of sticker sets attached to a file, including regular, mask, and emoji sticker sets. Currently, only animations, photos, and videos can have attached sticker sets.
2471 2472 2473 2474 |
# File 'lib/tdlib/client_methods.rb', line 2471 def get_attached_sticker_sets(file_id:) broadcast('@type' => 'getAttachedStickerSets', 'file_id' => file_id) end |
#get_attachment_menu_bot(bot_user_id:) ⇒ TD::Types::AttachmentMenuBot
Returns information about a bot that can be added to attachment or side menu.
2480 2481 2482 2483 |
# File 'lib/tdlib/client_methods.rb', line 2480 def (bot_user_id:) broadcast('@type' => 'getAttachmentMenuBot', 'bot_user_id' => bot_user_id) end |
#get_authorization_state ⇒ TD::Types::AuthorizationState
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.
2491 2492 2493 |
# File 'lib/tdlib/client_methods.rb', line 2491 def broadcast('@type' => 'getAuthorizationState') end |
#get_auto_download_settings_presets ⇒ TD::Types::AutoDownloadSettingsPresets
Returns auto-download settings presets for the current user.
2498 2499 2500 |
# File 'lib/tdlib/client_methods.rb', line 2498 def get_auto_download_settings_presets broadcast('@type' => 'getAutoDownloadSettingsPresets') end |
#get_autosave_settings ⇒ TD::Types::AutosaveSettings
Returns autosave settings for the current user.
2505 2506 2507 |
# File 'lib/tdlib/client_methods.rb', line 2505 def get_autosave_settings broadcast('@type' => 'getAutosaveSettings') end |
#get_available_chat_boost_slots ⇒ TD::Types::ChatBoostSlots
Returns the list of available chat boost slots for the current user.
2512 2513 2514 |
# File 'lib/tdlib/client_methods.rb', line 2512 def get_available_chat_boost_slots broadcast('@type' => 'getAvailableChatBoostSlots') end |
#get_background_url(name:, type:) ⇒ TD::Types::HttpUrl
Constructs a persistent HTTP URL for a background.
2521 2522 2523 2524 2525 |
# File 'lib/tdlib/client_methods.rb', line 2521 def get_background_url(name:, type:) broadcast('@type' => 'getBackgroundUrl', 'name' => name, 'type' => type) end |
#get_bank_card_info(bank_card_number:) ⇒ TD::Types::BankCardInfo
Returns information about a bank card.
2531 2532 2533 2534 |
# File 'lib/tdlib/client_methods.rb', line 2531 def get_bank_card_info(bank_card_number:) broadcast('@type' => 'getBankCardInfo', 'bank_card_number' => bank_card_number) end |
#get_basic_group(basic_group_id:) ⇒ TD::Types::BasicGroup
Returns information about a basic group by its identifier. This is an offline request if the current user is not a bot.
2541 2542 2543 2544 |
# File 'lib/tdlib/client_methods.rb', line 2541 def get_basic_group(basic_group_id:) broadcast('@type' => 'getBasicGroup', 'basic_group_id' => basic_group_id) end |
#get_basic_group_full_info(basic_group_id:) ⇒ TD::Types::BasicGroupFullInfo
Returns full information about a basic group by its identifier.
2550 2551 2552 2553 |
# File 'lib/tdlib/client_methods.rb', line 2550 def get_basic_group_full_info(basic_group_id:) broadcast('@type' => 'getBasicGroupFullInfo', 'basic_group_id' => basic_group_id) end |
#get_blocked_message_senders(block_list:, offset:, limit:) ⇒ TD::Types::MessageSenders
Returns users and chats that were blocked by the current user.
2561 2562 2563 2564 2565 2566 |
# File 'lib/tdlib/client_methods.rb', line 2561 def (block_list:, offset:, limit:) broadcast('@type' => 'getBlockedMessageSenders', 'block_list' => block_list, 'offset' => offset, 'limit' => limit) end |
#get_bot_info_description(bot_user_id:, language_code:) ⇒ TD::Types::Text
Returns the text shown in the chat with a bot if the chat is empty in the given language. Can be called only if userTypeBot.can_be_edited == true.
2574 2575 2576 2577 2578 |
# File 'lib/tdlib/client_methods.rb', line 2574 def get_bot_info_description(bot_user_id:, language_code:) broadcast('@type' => 'getBotInfoDescription', 'bot_user_id' => bot_user_id, 'language_code' => language_code) end |
#get_bot_info_short_description(bot_user_id:, language_code:) ⇒ TD::Types::Text
Returns the text shown on a bot’s profile page and sent together with the link when users share the bot in the
given language.
Can be called only if userTypeBot.can_be_edited == true.
2587 2588 2589 2590 2591 |
# File 'lib/tdlib/client_methods.rb', line 2587 def get_bot_info_short_description(bot_user_id:, language_code:) broadcast('@type' => 'getBotInfoShortDescription', 'bot_user_id' => bot_user_id, 'language_code' => language_code) end |
#get_bot_media_preview_info(bot_user_id:, language_code:) ⇒ TD::Types::BotMediaPreviewInfo
Returns the list of media previews for the given language and the list of languages for which the bot has dedicated
previews.
2601 2602 2603 2604 2605 |
# File 'lib/tdlib/client_methods.rb', line 2601 def get_bot_media_preview_info(bot_user_id:, language_code:) broadcast('@type' => 'getBotMediaPreviewInfo', 'bot_user_id' => bot_user_id, 'language_code' => language_code) end |
#get_bot_media_previews(bot_user_id:) ⇒ TD::Types::BotMediaPreviews
Returns the list of media previews of a bot.
2612 2613 2614 2615 |
# File 'lib/tdlib/client_methods.rb', line 2612 def get_bot_media_previews(bot_user_id:) broadcast('@type' => 'getBotMediaPreviews', 'bot_user_id' => bot_user_id) end |
#get_bot_name(bot_user_id:, language_code:) ⇒ TD::Types::Text
Returns the name of a bot in the given language. Can be called only if userTypeBot.can_be_edited == true.
2623 2624 2625 2626 2627 |
# File 'lib/tdlib/client_methods.rb', line 2623 def get_bot_name(bot_user_id:, language_code:) broadcast('@type' => 'getBotName', 'bot_user_id' => bot_user_id, 'language_code' => language_code) end |
#get_business_chat_link_info(link_name:) ⇒ TD::Types::BusinessChatLinkInfo
Returns information about a business chat link.
2633 2634 2635 2636 |
# File 'lib/tdlib/client_methods.rb', line 2633 def get_business_chat_link_info(link_name:) broadcast('@type' => 'getBusinessChatLinkInfo', 'link_name' => link_name) end |
#get_business_chat_links ⇒ TD::Types::BusinessChatLinks
Returns business chat links created for the current account.
2641 2642 2643 |
# File 'lib/tdlib/client_methods.rb', line 2641 def get_business_chat_links broadcast('@type' => 'getBusinessChatLinks') end |
#get_business_connected_bot ⇒ TD::Types::BusinessConnectedBot
Returns the business bot that is connected to the current user account. Returns a 404 error if there is no connected bot.
2649 2650 2651 |
# File 'lib/tdlib/client_methods.rb', line 2649 def get_business_connected_bot broadcast('@type' => 'getBusinessConnectedBot') end |
#get_business_connection(connection_id:) ⇒ TD::Types::BusinessConnection
Returns information about a business connection by its identifier; for bots only.
2657 2658 2659 2660 |
# File 'lib/tdlib/client_methods.rb', line 2657 def get_business_connection(connection_id:) broadcast('@type' => 'getBusinessConnection', 'connection_id' => connection_id) end |
#get_business_features(source:) ⇒ TD::Types::BusinessFeatures
Returns information about features, available to Business users.
2667 2668 2669 2670 |
# File 'lib/tdlib/client_methods.rb', line 2667 def get_business_features(source:) broadcast('@type' => 'getBusinessFeatures', 'source' => source) end |
#get_callback_query_answer(chat_id:, message_id:, payload:) ⇒ TD::Types::CallbackQueryAnswer
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.
2680 2681 2682 2683 2684 2685 |
# File 'lib/tdlib/client_methods.rb', line 2680 def get_callback_query_answer(chat_id:, message_id:, payload:) broadcast('@type' => 'getCallbackQueryAnswer', 'chat_id' => chat_id, 'message_id' => , 'payload' => payload) end |
#get_callback_query_message(chat_id:, message_id:, callback_query_id:) ⇒ TD::Types::Message
Returns information about a message with the callback button that originated a callback query; for bots only.
2693 2694 2695 2696 2697 2698 |
# File 'lib/tdlib/client_methods.rb', line 2693 def (chat_id:, message_id:, callback_query_id:) broadcast('@type' => 'getCallbackQueryMessage', 'chat_id' => chat_id, 'message_id' => , 'callback_query_id' => callback_query_id) end |
#get_chat(chat_id:) ⇒ TD::Types::Chat
Returns information about a chat by its identifier; this is an offline request if the current user is not a bot.
2704 2705 2706 2707 |
# File 'lib/tdlib/client_methods.rb', line 2704 def get_chat(chat_id:) broadcast('@type' => 'getChat', 'chat_id' => chat_id) end |
#get_chat_active_stories(chat_id:) ⇒ TD::Types::ChatActiveStories
Returns the list of active stories posted by the given chat.
2713 2714 2715 2716 |
# File 'lib/tdlib/client_methods.rb', line 2713 def get_chat_active_stories(chat_id:) broadcast('@type' => 'getChatActiveStories', 'chat_id' => chat_id) end |
#get_chat_administrators(chat_id:) ⇒ TD::Types::ChatAdministrators
Returns a list of administrators of the chat with their custom titles.
2722 2723 2724 2725 |
# File 'lib/tdlib/client_methods.rb', line 2722 def get_chat_administrators(chat_id:) broadcast('@type' => 'getChatAdministrators', 'chat_id' => chat_id) end |
#get_chat_archived_stories(chat_id:, from_story_id:, limit:) ⇒ TD::Types::Stories
Returns the list of all stories posted by the given chat; requires can_edit_stories right in the chat. The stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib.
2737 2738 2739 2740 2741 2742 |
# File 'lib/tdlib/client_methods.rb', line 2737 def get_chat_archived_stories(chat_id:, from_story_id:, limit:) broadcast('@type' => 'getChatArchivedStories', 'chat_id' => chat_id, 'from_story_id' => from_story_id, 'limit' => limit) end |
#get_chat_available_message_senders(chat_id:) ⇒ TD::Types::ChatMessageSenders
Returns the list of message sender identifiers, which can be used to send messages in a chat.
2748 2749 2750 2751 |
# File 'lib/tdlib/client_methods.rb', line 2748 def (chat_id:) broadcast('@type' => 'getChatAvailableMessageSenders', 'chat_id' => chat_id) end |
#get_chat_boost_features(is_channel:) ⇒ TD::Types::ChatBoostFeatures
Returns the list of features available for different chat boost levels; this is an offline request.
2758 2759 2760 2761 |
# File 'lib/tdlib/client_methods.rb', line 2758 def get_chat_boost_features(is_channel:) broadcast('@type' => 'getChatBoostFeatures', 'is_channel' => is_channel) end |
#get_chat_boost_level_features(is_channel:, level:) ⇒ TD::Types::ChatBoostLevelFeatures
Returns the list of features available on the specific chat boost level; this is an offline request.
2769 2770 2771 2772 2773 |
# File 'lib/tdlib/client_methods.rb', line 2769 def get_chat_boost_level_features(is_channel:, level:) broadcast('@type' => 'getChatBoostLevelFeatures', 'is_channel' => is_channel, 'level' => level) end |
#get_chat_boost_link(chat_id:) ⇒ TD::Types::ChatBoostLink
Returns an HTTPS link to boost the specified supergroup or channel chat.
2779 2780 2781 2782 |
# File 'lib/tdlib/client_methods.rb', line 2779 def get_chat_boost_link(chat_id:) broadcast('@type' => 'getChatBoostLink', 'chat_id' => chat_id) end |
#get_chat_boost_link_info(url:) ⇒ TD::Types::ChatBoostLinkInfo
Returns information about a link to boost a chat. Can be called for any internal link of the type internalLinkTypeChatBoost.
2789 2790 2791 2792 |
# File 'lib/tdlib/client_methods.rb', line 2789 def get_chat_boost_link_info(url:) broadcast('@type' => 'getChatBoostLinkInfo', 'url' => url) end |
#get_chat_boost_status(chat_id:) ⇒ TD::Types::ChatBoostStatus
Returns the current boost status for a supergroup or a channel chat.
2798 2799 2800 2801 |
# File 'lib/tdlib/client_methods.rb', line 2798 def get_chat_boost_status(chat_id:) broadcast('@type' => 'getChatBoostStatus', 'chat_id' => chat_id) end |
#get_chat_boosts(chat_id:, only_gift_codes:, offset:, limit:) ⇒ TD::Types::FoundChatBoosts
Returns the list of boosts applied to a chat; requires administrator rights in the chat.
2813 2814 2815 2816 2817 2818 2819 |
# File 'lib/tdlib/client_methods.rb', line 2813 def get_chat_boosts(chat_id:, only_gift_codes:, offset:, limit:) broadcast('@type' => 'getChatBoosts', 'chat_id' => chat_id, 'only_gift_codes' => only_gift_codes, 'offset' => offset, 'limit' => limit) end |
#get_chat_event_log(chat_id:, query:, from_event_id:, limit:, filters:, user_ids:) ⇒ TD::Types::ChatEvents
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).
2836 2837 2838 2839 2840 2841 2842 2843 2844 |
# File 'lib/tdlib/client_methods.rb', line 2836 def get_chat_event_log(chat_id:, query:, from_event_id:, limit:, filters:, user_ids:) broadcast('@type' => 'getChatEventLog', 'chat_id' => chat_id, 'query' => query, 'from_event_id' => from_event_id, 'limit' => limit, 'filters' => filters, 'user_ids' => user_ids) end |
#get_chat_folder(chat_folder_id:) ⇒ TD::Types::ChatFolder
Returns information about a chat folder by its identifier.
2850 2851 2852 2853 |
# File 'lib/tdlib/client_methods.rb', line 2850 def get_chat_folder(chat_folder_id:) broadcast('@type' => 'getChatFolder', 'chat_folder_id' => chat_folder_id) end |
#get_chat_folder_chat_count(folder:) ⇒ TD::Types::Count
Returns approximate number of chats in a being created chat folder. Main and archive chat lists must be fully preloaded for this function to work correctly.
2860 2861 2862 2863 |
# File 'lib/tdlib/client_methods.rb', line 2860 def get_chat_folder_chat_count(folder:) broadcast('@type' => 'getChatFolderChatCount', 'folder' => folder) end |
#get_chat_folder_chats_to_leave(chat_folder_id:) ⇒ TD::Types::Chats
Returns identifiers of pinned or always included chats from a chat folder, which are suggested to be left when the
chat folder is deleted.
2870 2871 2872 2873 |
# File 'lib/tdlib/client_methods.rb', line 2870 def get_chat_folder_chats_to_leave(chat_folder_id:) broadcast('@type' => 'getChatFolderChatsToLeave', 'chat_folder_id' => chat_folder_id) end |
#get_chat_folder_default_icon_name(folder:) ⇒ TD::Types::ChatFolderIcon
Returns default icon name for a folder. Can be called synchronously.
2880 2881 2882 2883 |
# File 'lib/tdlib/client_methods.rb', line 2880 def get_chat_folder_default_icon_name(folder:) broadcast('@type' => 'getChatFolderDefaultIconName', 'folder' => folder) end |
#get_chat_folder_invite_links(chat_folder_id:) ⇒ TD::Types::ChatFolderInviteLinks
Returns invite links created by the current user for a shareable chat folder.
2889 2890 2891 2892 |
# File 'lib/tdlib/client_methods.rb', line 2889 def get_chat_folder_invite_links(chat_folder_id:) broadcast('@type' => 'getChatFolderInviteLinks', 'chat_folder_id' => chat_folder_id) end |
#get_chat_folder_new_chats(chat_folder_id:) ⇒ TD::Types::Chats
Returns new chats added to a shareable chat folder by its owner. The method must be called at most once in getOption(“chat_folder_new_chats_update_period”) for the given chat
folder.
2900 2901 2902 2903 |
# File 'lib/tdlib/client_methods.rb', line 2900 def get_chat_folder_new_chats(chat_folder_id:) broadcast('@type' => 'getChatFolderNewChats', 'chat_folder_id' => chat_folder_id) end |
#get_chat_history(chat_id:, from_message_id:, offset:, limit:, only_local:) ⇒ TD::Types::Messages
Returns messages in a chat. The messages are returned in 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.
2922 2923 2924 2925 2926 2927 2928 2929 |
# File 'lib/tdlib/client_methods.rb', line 2922 def get_chat_history(chat_id:, from_message_id:, offset:, limit:, only_local:) broadcast('@type' => 'getChatHistory', 'chat_id' => chat_id, 'from_message_id' => , 'offset' => offset, 'limit' => limit, 'only_local' => only_local) end |
#get_chat_invite_link(chat_id:, invite_link:) ⇒ TD::Types::ChatInviteLink
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.
2938 2939 2940 2941 2942 |
# File 'lib/tdlib/client_methods.rb', line 2938 def get_chat_invite_link(chat_id:, invite_link:) broadcast('@type' => 'getChatInviteLink', 'chat_id' => chat_id, 'invite_link' => invite_link) end |
#get_chat_invite_link_counts(chat_id:) ⇒ TD::Types::ChatInviteLinkCounts
Returns the list of chat administrators with number of their invite links. Requires owner privileges in the chat.
2949 2950 2951 2952 |
# File 'lib/tdlib/client_methods.rb', line 2949 def get_chat_invite_link_counts(chat_id:) broadcast('@type' => 'getChatInviteLinkCounts', 'chat_id' => chat_id) end |
#get_chat_invite_link_members(chat_id:, invite_link:, only_with_expired_subscription:, offset_member:, limit:) ⇒ TD::Types::ChatInviteLinkMembers
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.
2966 2967 2968 2969 2970 2971 2972 2973 |
# File 'lib/tdlib/client_methods.rb', line 2966 def get_chat_invite_link_members(chat_id:, invite_link:, only_with_expired_subscription:, offset_member:, limit:) broadcast('@type' => 'getChatInviteLinkMembers', 'chat_id' => chat_id, 'invite_link' => invite_link, 'only_with_expired_subscription' => only_with_expired_subscription, 'offset_member' => offset_member, 'limit' => limit) end |
#get_chat_invite_links(chat_id:, creator_user_id:, is_revoked:, offset_date:, offset_invite_link:, limit:) ⇒ TD::Types::ChatInviteLinks
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.
2989 2990 2991 2992 2993 2994 2995 2996 2997 |
# File 'lib/tdlib/client_methods.rb', line 2989 def get_chat_invite_links(chat_id:, creator_user_id:, is_revoked:, offset_date:, offset_invite_link:, limit:) broadcast('@type' => 'getChatInviteLinks', 'chat_id' => chat_id, 'creator_user_id' => creator_user_id, 'is_revoked' => is_revoked, 'offset_date' => offset_date, 'offset_invite_link' => offset_invite_link, 'limit' => limit) end |
#get_chat_join_requests(chat_id:, invite_link:, query:, offset_request:, limit:) ⇒ TD::Types::ChatJoinRequests
Returns pending join requests in a chat.
3012 3013 3014 3015 3016 3017 3018 3019 |
# File 'lib/tdlib/client_methods.rb', line 3012 def get_chat_join_requests(chat_id:, invite_link:, query:, offset_request:, limit:) broadcast('@type' => 'getChatJoinRequests', 'chat_id' => chat_id, 'invite_link' => invite_link, 'query' => query, 'offset_request' => offset_request, 'limit' => limit) end |
#get_chat_lists_to_add_chat(chat_id:) ⇒ TD::Types::ChatLists
Returns chat lists to which the chat can be added. This is an offline request.
3026 3027 3028 3029 |
# File 'lib/tdlib/client_methods.rb', line 3026 def get_chat_lists_to_add_chat(chat_id:) broadcast('@type' => 'getChatListsToAddChat', 'chat_id' => chat_id) end |
#get_chat_member(chat_id:, member_id:) ⇒ TD::Types::ChatMember
Returns information about a single member of a chat.
3036 3037 3038 3039 3040 |
# File 'lib/tdlib/client_methods.rb', line 3036 def get_chat_member(chat_id:, member_id:) broadcast('@type' => 'getChatMember', 'chat_id' => chat_id, 'member_id' => member_id) end |
#get_chat_message_by_date(chat_id:, date:) ⇒ TD::Types::Message
Returns the last message sent in a chat no later than the specified date.
3047 3048 3049 3050 3051 |
# File 'lib/tdlib/client_methods.rb', line 3047 def (chat_id:, date:) broadcast('@type' => 'getChatMessageByDate', 'chat_id' => chat_id, 'date' => date) end |
#get_chat_message_calendar(chat_id:, filter:, from_message_id:, saved_messages_topic_id:) ⇒ TD::Types::MessageCalendar
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”.
3067 3068 3069 3070 3071 3072 3073 |
# File 'lib/tdlib/client_methods.rb', line 3067 def (chat_id:, filter:, from_message_id:, saved_messages_topic_id:) broadcast('@type' => 'getChatMessageCalendar', 'chat_id' => chat_id, 'filter' => filter, 'from_message_id' => , 'saved_messages_topic_id' => ) end |
#get_chat_message_count(chat_id:, filter:, saved_messages_topic_id:, return_local:) ⇒ TD::Types::Count
Returns approximate number of messages of the specified type in the chat.
3085 3086 3087 3088 3089 3090 3091 |
# File 'lib/tdlib/client_methods.rb', line 3085 def (chat_id:, filter:, saved_messages_topic_id:, return_local:) broadcast('@type' => 'getChatMessageCount', 'chat_id' => chat_id, 'filter' => filter, 'saved_messages_topic_id' => , 'return_local' => return_local) end |
#get_chat_message_position(chat_id:, message_id:, filter:, message_thread_id:, saved_messages_topic_id:) ⇒ TD::Types::Count
Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the
chat.
Cannot be used in secret chats.
3107 3108 3109 3110 3111 3112 3113 3114 |
# File 'lib/tdlib/client_methods.rb', line 3107 def (chat_id:, message_id:, filter:, message_thread_id:, saved_messages_topic_id:) broadcast('@type' => 'getChatMessagePosition', 'chat_id' => chat_id, 'message_id' => , 'filter' => filter, 'message_thread_id' => , 'saved_messages_topic_id' => ) end |
#get_chat_notification_settings_exceptions(scope:, compare_sound:) ⇒ TD::Types::Chats
Returns the list of chats with non-default notification settings for new messages.
3122 3123 3124 3125 3126 |
# File 'lib/tdlib/client_methods.rb', line 3122 def get_chat_notification_settings_exceptions(scope:, compare_sound:) broadcast('@type' => 'getChatNotificationSettingsExceptions', 'scope' => scope, 'compare_sound' => compare_sound) end |
#get_chat_pinned_message(chat_id:) ⇒ TD::Types::Message
Returns information about a newest pinned message in the chat.
3132 3133 3134 3135 |
# File 'lib/tdlib/client_methods.rb', line 3132 def (chat_id:) broadcast('@type' => 'getChatPinnedMessage', 'chat_id' => chat_id) end |
#get_chat_posted_to_chat_page_stories(chat_id:, from_story_id:, limit:) ⇒ TD::Types::Stories
Returns the list of stories that posted by the given chat to its chat page. If from_story_id == 0, then pinned stories are returned first. Then, stories are returned in reverse chronological order (i.e., in order of decreasing story_id). For optimal performance, the number of returned stories is chosen by TDLib.
3148 3149 3150 3151 3152 3153 |
# File 'lib/tdlib/client_methods.rb', line 3148 def get_chat_posted_to_chat_page_stories(chat_id:, from_story_id:, limit:) broadcast('@type' => 'getChatPostedToChatPageStories', 'chat_id' => chat_id, 'from_story_id' => from_story_id, 'limit' => limit) end |
#get_chat_revenue_statistics(chat_id:, is_dark:) ⇒ TD::Types::ChatRevenueStatistics
Returns detailed revenue statistics about a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true.
3161 3162 3163 3164 3165 |
# File 'lib/tdlib/client_methods.rb', line 3161 def get_chat_revenue_statistics(chat_id:, is_dark:) broadcast('@type' => 'getChatRevenueStatistics', 'chat_id' => chat_id, 'is_dark' => is_dark) end |
#get_chat_revenue_transactions(chat_id:, offset:, limit:) ⇒ TD::Types::ChatRevenueTransactions
Returns the list of revenue transactions for a chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true.
3174 3175 3176 3177 3178 3179 |
# File 'lib/tdlib/client_methods.rb', line 3174 def get_chat_revenue_transactions(chat_id:, offset:, limit:) broadcast('@type' => 'getChatRevenueTransactions', 'chat_id' => chat_id, 'offset' => offset, 'limit' => limit) end |
#get_chat_revenue_withdrawal_url(chat_id:, password:) ⇒ TD::Types::HttpUrl
Returns a URL for chat revenue withdrawal; requires owner privileges in the chat. Currently, this method can be used only for channels if supergroupFullInfo.can_get_revenue_statistics == true and
getOption("can_withdraw_chat_revenue").
3188 3189 3190 3191 3192 |
# File 'lib/tdlib/client_methods.rb', line 3188 def get_chat_revenue_withdrawal_url(chat_id:, password:) broadcast('@type' => 'getChatRevenueWithdrawalUrl', 'chat_id' => chat_id, 'password' => password) end |
#get_chat_scheduled_messages(chat_id:) ⇒ TD::Types::Messages
Returns all scheduled messages in a chat. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
3199 3200 3201 3202 |
# File 'lib/tdlib/client_methods.rb', line 3199 def (chat_id:) broadcast('@type' => 'getChatScheduledMessages', 'chat_id' => chat_id) end |
#get_chat_similar_chat_count(chat_id:, return_local:) ⇒ TD::Types::Count
Returns approximate number of chats similar to the given chat.
3210 3211 3212 3213 3214 |
# File 'lib/tdlib/client_methods.rb', line 3210 def get_chat_similar_chat_count(chat_id:, return_local:) broadcast('@type' => 'getChatSimilarChatCount', 'chat_id' => chat_id, 'return_local' => return_local) end |
#get_chat_similar_chats(chat_id:) ⇒ TD::Types::Chats
Returns a list of chats similar to the given chat.
3220 3221 3222 3223 |
# File 'lib/tdlib/client_methods.rb', line 3220 def get_chat_similar_chats(chat_id:) broadcast('@type' => 'getChatSimilarChats', 'chat_id' => chat_id) end |
#get_chat_sparse_message_positions(chat_id:, filter:, from_message_id:, limit:, saved_messages_topic_id:) ⇒ TD::Types::MessagePositions
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.
3240 3241 3242 3243 3244 3245 3246 3247 |
# File 'lib/tdlib/client_methods.rb', line 3240 def (chat_id:, filter:, from_message_id:, limit:, saved_messages_topic_id:) broadcast('@type' => 'getChatSparseMessagePositions', 'chat_id' => chat_id, 'filter' => filter, 'from_message_id' => , 'limit' => limit, 'saved_messages_topic_id' => ) end |
#get_chat_sponsored_messages(chat_id:) ⇒ TD::Types::SponsoredMessages
Returns sponsored messages to be shown in a chat; for channel chats only.
3253 3254 3255 3256 |
# File 'lib/tdlib/client_methods.rb', line 3253 def (chat_id:) broadcast('@type' => 'getChatSponsoredMessages', 'chat_id' => chat_id) end |
#get_chat_statistics(chat_id:, is_dark:) ⇒ TD::Types::ChatStatistics
Returns detailed statistics about a chat. Currently, this method can be used only for supergroups and channels. Can be used only if supergroupFullInfo.can_get_statistics == true.
3265 3266 3267 3268 3269 |
# File 'lib/tdlib/client_methods.rb', line 3265 def get_chat_statistics(chat_id:, is_dark:) broadcast('@type' => 'getChatStatistics', 'chat_id' => chat_id, 'is_dark' => is_dark) end |
#get_chat_story_interactions(story_sender_chat_id:, story_id:, reaction_type:, prefer_forwards:, offset:, limit:) ⇒ TD::Types::StoryInteractions
Returns interactions with a story posted in a chat. Can be used only if story is posted on behalf of a chat and the user is an administrator in the chat.
3285 3286 3287 3288 3289 3290 3291 3292 3293 |
# File 'lib/tdlib/client_methods.rb', line 3285 def get_chat_story_interactions(story_sender_chat_id:, story_id:, reaction_type:, prefer_forwards:, offset:, limit:) broadcast('@type' => 'getChatStoryInteractions', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id, 'reaction_type' => reaction_type, 'prefer_forwards' => prefer_forwards, 'offset' => offset, 'limit' => limit) end |
#get_chats(chat_list:, limit:) ⇒ TD::Types::Chats
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.
3303 3304 3305 3306 3307 |
# File 'lib/tdlib/client_methods.rb', line 3303 def get_chats(chat_list:, limit:) broadcast('@type' => 'getChats', 'chat_list' => chat_list, 'limit' => limit) end |
#get_chats_for_chat_folder_invite_link(chat_folder_id:) ⇒ TD::Types::Chats
Returns identifiers of chats from a chat folder, suitable for adding to a chat folder invite link.
3313 3314 3315 3316 |
# File 'lib/tdlib/client_methods.rb', line 3313 def get_chats_for_chat_folder_invite_link(chat_folder_id:) broadcast('@type' => 'getChatsForChatFolderInviteLink', 'chat_folder_id' => chat_folder_id) end |
#get_chats_to_send_stories ⇒ TD::Types::Chats
Returns supergroup and channel chats in which the current user has the right to post stories. The chats must be rechecked with canSendStory before actually trying to post a story there.
3322 3323 3324 |
# File 'lib/tdlib/client_methods.rb', line 3322 def get_chats_to_send_stories broadcast('@type' => 'getChatsToSendStories') end |
#get_close_friends ⇒ TD::Types::Users
Returns all close friends of the current user.
3329 3330 3331 |
# File 'lib/tdlib/client_methods.rb', line 3329 def get_close_friends broadcast('@type' => 'getCloseFriends') end |
#get_collectible_item_info(type:) ⇒ TD::Types::CollectibleItemInfo
Returns information about a given collectible item that was purchased at fragment.com.
3338 3339 3340 3341 |
# File 'lib/tdlib/client_methods.rb', line 3338 def get_collectible_item_info(type:) broadcast('@type' => 'getCollectibleItemInfo', 'type' => type) end |
#get_commands(scope:, language_code:) ⇒ TD::Types::BotCommands
Returns the list of commands supported by the bot for the given user scope and language; for bots only.
3349 3350 3351 3352 3353 |
# File 'lib/tdlib/client_methods.rb', line 3349 def get_commands(scope:, language_code:) broadcast('@type' => 'getCommands', 'scope' => scope, 'language_code' => language_code) end |
#get_connected_websites ⇒ TD::Types::ConnectedWebsites
Returns all website where the current user used Telegram to log in.
3358 3359 3360 |
# File 'lib/tdlib/client_methods.rb', line 3358 def get_connected_websites broadcast('@type' => 'getConnectedWebsites') end |
#get_contacts ⇒ TD::Types::Users
Returns all contacts of the user.
3365 3366 3367 |
# File 'lib/tdlib/client_methods.rb', line 3365 def get_contacts broadcast('@type' => 'getContacts') end |
#get_countries ⇒ TD::Types::Countries
Returns information about existing countries. Can be called before authorization.
3373 3374 3375 |
# File 'lib/tdlib/client_methods.rb', line 3373 def get_countries broadcast('@type' => 'getCountries') end |
#get_country_code ⇒ TD::Types::Text
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.
3382 3383 3384 |
# File 'lib/tdlib/client_methods.rb', line 3382 def get_country_code broadcast('@type' => 'getCountryCode') end |
#get_country_flag_emoji(country_code:) ⇒ TD::Types::Text
Returns an emoji for the given country. Returns an empty string on failure. Can be called synchronously.
3392 3393 3394 3395 |
# File 'lib/tdlib/client_methods.rb', line 3392 def get_country_flag_emoji(country_code:) broadcast('@type' => 'getCountryFlagEmoji', 'country_code' => country_code) end |
#get_created_public_chats(type:) ⇒ TD::Types::Chats
Returns a list of public chats of the specified type, owned by the user.
3401 3402 3403 3404 |
# File 'lib/tdlib/client_methods.rb', line 3401 def get_created_public_chats(type:) broadcast('@type' => 'getCreatedPublicChats', 'type' => type) end |
#get_current_state ⇒ TD::Types::Updates
Returns all updates needed to restore current TDLib state, i.e. all actual updateAuthorizationState/updateUser/updateNewChat and others. This is especially useful if TDLib is run in a separate process. Can be called before initialization.
3412 3413 3414 |
# File 'lib/tdlib/client_methods.rb', line 3412 def get_current_state broadcast('@type' => 'getCurrentState') end |
#get_current_weather(location:) ⇒ TD::Types::CurrentWeather
Returns the current weather in the given location.
3420 3421 3422 3423 |
# File 'lib/tdlib/client_methods.rb', line 3420 def get_current_weather(location:) broadcast('@type' => 'getCurrentWeather', 'location' => location) end |
#get_custom_emoji_reaction_animations ⇒ TD::Types::Stickers
Returns TGS stickers with generic animations for custom emoji reactions.
3428 3429 3430 |
# File 'lib/tdlib/client_methods.rb', line 3428 def get_custom_emoji_reaction_animations broadcast('@type' => 'getCustomEmojiReactionAnimations') end |
#get_custom_emoji_stickers(custom_emoji_ids:) ⇒ TD::Types::Stickers
Returns the list of custom emoji stickers by their identifiers. Stickers are returned in arbitrary order. Only found stickers are returned.
3439 3440 3441 3442 |
# File 'lib/tdlib/client_methods.rb', line 3439 def get_custom_emoji_stickers(custom_emoji_ids:) broadcast('@type' => 'getCustomEmojiStickers', 'custom_emoji_ids' => custom_emoji_ids) end |
#get_database_statistics ⇒ TD::Types::DatabaseStatistics
Returns database statistics.
3447 3448 3449 |
# File 'lib/tdlib/client_methods.rb', line 3447 def get_database_statistics broadcast('@type' => 'getDatabaseStatistics') end |
#get_deep_link_info(link:) ⇒ TD::Types::DeepLinkInfo
Returns information about a tg:// deep link. Use “tg://need_update_for_some_feature” or “tg:some_unsupported_feature” for testing. Returns a 404 error for unknown links. Can be called before authorization.
3458 3459 3460 3461 |
# File 'lib/tdlib/client_methods.rb', line 3458 def get_deep_link_info(link:) broadcast('@type' => 'getDeepLinkInfo', 'link' => link) end |
#get_default_background_custom_emoji_stickers ⇒ TD::Types::Stickers
Returns default list of custom emoji stickers for reply background.
3466 3467 3468 |
# File 'lib/tdlib/client_methods.rb', line 3466 def get_default_background_custom_emoji_stickers broadcast('@type' => 'getDefaultBackgroundCustomEmojiStickers') end |
#get_default_chat_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns default emoji statuses for chats.
3473 3474 3475 |
# File 'lib/tdlib/client_methods.rb', line 3473 def get_default_chat_emoji_statuses broadcast('@type' => 'getDefaultChatEmojiStatuses') end |
#get_default_chat_photo_custom_emoji_stickers ⇒ TD::Types::Stickers
Returns default list of custom emoji stickers for placing on a chat photo.
3480 3481 3482 |
# File 'lib/tdlib/client_methods.rb', line 3480 def get_default_chat_photo_custom_emoji_stickers broadcast('@type' => 'getDefaultChatPhotoCustomEmojiStickers') end |
#get_default_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns default emoji statuses for self status.
3487 3488 3489 |
# File 'lib/tdlib/client_methods.rb', line 3487 def get_default_emoji_statuses broadcast('@type' => 'getDefaultEmojiStatuses') end |
#get_default_message_auto_delete_time ⇒ TD::Types::MessageAutoDeleteTime
Returns default message auto-delete time setting for new chats.
3494 3495 3496 |
# File 'lib/tdlib/client_methods.rb', line 3494 def broadcast('@type' => 'getDefaultMessageAutoDeleteTime') end |
#get_default_profile_photo_custom_emoji_stickers ⇒ TD::Types::Stickers
Returns default list of custom emoji stickers for placing on a profile photo.
3501 3502 3503 |
# File 'lib/tdlib/client_methods.rb', line 3501 def get_default_profile_photo_custom_emoji_stickers broadcast('@type' => 'getDefaultProfilePhotoCustomEmojiStickers') end |
#get_disallowed_chat_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns the list of emoji statuses, which can’t be used as chat emoji status, even they are from a sticker set with
is_allowed_as_chat_emoji_status == true.
3509 3510 3511 |
# File 'lib/tdlib/client_methods.rb', line 3509 def get_disallowed_chat_emoji_statuses broadcast('@type' => 'getDisallowedChatEmojiStatuses') end |
#get_emoji_categories(type:) ⇒ TD::Types::EmojiCategories
Returns available emoji categories.
3518 3519 3520 3521 |
# File 'lib/tdlib/client_methods.rb', line 3518 def get_emoji_categories(type:) broadcast('@type' => 'getEmojiCategories', 'type' => type) end |
#get_emoji_reaction(emoji:) ⇒ TD::Types::EmojiReaction
Returns information about an emoji reaction. Returns a 404 error if the reaction is not found.
3528 3529 3530 3531 |
# File 'lib/tdlib/client_methods.rb', line 3528 def get_emoji_reaction(emoji:) broadcast('@type' => 'getEmojiReaction', 'emoji' => emoji) end |
#get_emoji_suggestions_url(language_code:) ⇒ TD::Types::HttpUrl
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.
3539 3540 3541 3542 |
# File 'lib/tdlib/client_methods.rb', line 3539 def get_emoji_suggestions_url(language_code:) broadcast('@type' => 'getEmojiSuggestionsUrl', 'language_code' => language_code) end |
#get_external_link(link:, allow_write_access:) ⇒ TD::Types::HttpUrl
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.
3552 3553 3554 3555 3556 |
# File 'lib/tdlib/client_methods.rb', line 3552 def get_external_link(link:, allow_write_access:) broadcast('@type' => 'getExternalLink', 'link' => link, 'allow_write_access' => allow_write_access) end |
#get_external_link_info(link:) ⇒ TD::Types::LoginUrlInfo
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 link preview is disabled in secret chats.
3563 3564 3565 3566 |
# File 'lib/tdlib/client_methods.rb', line 3563 def get_external_link_info(link:) broadcast('@type' => 'getExternalLinkInfo', 'link' => link) end |
#get_favorite_stickers ⇒ TD::Types::Stickers
Returns favorite stickers.
3571 3572 3573 |
# File 'lib/tdlib/client_methods.rb', line 3571 def get_favorite_stickers broadcast('@type' => 'getFavoriteStickers') end |
#get_file(file_id:) ⇒ TD::Types::File
Returns information about a file; this is an offline request.
3579 3580 3581 3582 |
# File 'lib/tdlib/client_methods.rb', line 3579 def get_file(file_id:) broadcast('@type' => 'getFile', 'file_id' => file_id) end |
#get_file_downloaded_prefix_size(file_id:, offset:) ⇒ TD::Types::FileDownloadedPrefixSize
Returns file downloaded prefix size from a given offset, in bytes.
3589 3590 3591 3592 3593 |
# File 'lib/tdlib/client_methods.rb', line 3589 def get_file_downloaded_prefix_size(file_id:, offset:) broadcast('@type' => 'getFileDownloadedPrefixSize', 'file_id' => file_id, 'offset' => offset) end |
#get_file_extension(mime_type:) ⇒ TD::Types::Text
Returns the extension of a file, guessed by its MIME type. Returns an empty string on failure. Can be called synchronously.
3601 3602 3603 3604 |
# File 'lib/tdlib/client_methods.rb', line 3601 def get_file_extension(mime_type:) broadcast('@type' => 'getFileExtension', 'mime_type' => mime_type) end |
#get_file_mime_type(file_name:) ⇒ TD::Types::Text
Returns the MIME type of a file, guessed by its extension. Returns an empty string on failure. Can be called synchronously.
3612 3613 3614 3615 |
# File 'lib/tdlib/client_methods.rb', line 3612 def get_file_mime_type(file_name:) broadcast('@type' => 'getFileMimeType', 'file_name' => file_name) end |
#get_forum_topic(chat_id:, message_thread_id:) ⇒ TD::Types::ForumTopic
Returns information about a forum topic.
3622 3623 3624 3625 3626 |
# File 'lib/tdlib/client_methods.rb', line 3622 def get_forum_topic(chat_id:, message_thread_id:) broadcast('@type' => 'getForumTopic', 'chat_id' => chat_id, 'message_thread_id' => ) end |
#get_forum_topic_default_icons ⇒ TD::Types::Stickers
Returns the list of custom emoji, which can be used as forum topic icon by all users.
3631 3632 3633 |
# File 'lib/tdlib/client_methods.rb', line 3631 def get_forum_topic_default_icons broadcast('@type' => 'getForumTopicDefaultIcons') end |
#get_forum_topic_link(chat_id:, message_thread_id:) ⇒ TD::Types::MessageLink
Returns an HTTPS link to a topic in a forum chat. This is an offline request.
3641 3642 3643 3644 3645 |
# File 'lib/tdlib/client_methods.rb', line 3641 def get_forum_topic_link(chat_id:, message_thread_id:) broadcast('@type' => 'getForumTopicLink', 'chat_id' => chat_id, 'message_thread_id' => ) end |
#get_forum_topics(chat_id:, query:, offset_date:, offset_message_id:, offset_message_thread_id:, limit:) ⇒ TD::Types::ForumTopics
Returns found forum topics in a forum chat. This is a temporary method for getting information about topic list from the server.
3662 3663 3664 3665 3666 3667 3668 3669 3670 |
# File 'lib/tdlib/client_methods.rb', line 3662 def get_forum_topics(chat_id:, query:, offset_date:, offset_message_id:, offset_message_thread_id:, limit:) broadcast('@type' => 'getForumTopics', 'chat_id' => chat_id, 'query' => query, 'offset_date' => offset_date, 'offset_message_id' => , 'offset_message_thread_id' => , 'limit' => limit) end |
#get_game_high_scores(chat_id:, message_id:, user_id:) ⇒ TD::Types::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.
3679 3680 3681 3682 3683 3684 |
# File 'lib/tdlib/client_methods.rb', line 3679 def get_game_high_scores(chat_id:, message_id:, user_id:) broadcast('@type' => 'getGameHighScores', 'chat_id' => chat_id, 'message_id' => , 'user_id' => user_id) end |
#get_greeting_stickers ⇒ TD::Types::Stickers
Returns greeting stickers from regular sticker sets that can be used for the start page of other users.
3689 3690 3691 |
# File 'lib/tdlib/client_methods.rb', line 3689 def get_greeting_stickers broadcast('@type' => 'getGreetingStickers') end |
#get_group_call(group_call_id:) ⇒ TD::Types::GroupCall
Returns information about a group call.
3697 3698 3699 3700 |
# File 'lib/tdlib/client_methods.rb', line 3697 def get_group_call(group_call_id:) broadcast('@type' => 'getGroupCall', 'group_call_id' => group_call_id) end |
#get_group_call_invite_link(group_call_id:, can_self_unmute:) ⇒ TD::Types::HttpUrl
Returns invite link to a video chat in a public chat.
3709 3710 3711 3712 3713 |
# File 'lib/tdlib/client_methods.rb', line 3709 def get_group_call_invite_link(group_call_id:, can_self_unmute:) broadcast('@type' => 'getGroupCallInviteLink', 'group_call_id' => group_call_id, 'can_self_unmute' => can_self_unmute) end |
#get_group_call_stream_segment(group_call_id:, time_offset:, scale:, channel_id:, video_quality:) ⇒ TD::Types::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.
3725 3726 3727 3728 3729 3730 3731 3732 |
# File 'lib/tdlib/client_methods.rb', line 3725 def get_group_call_stream_segment(group_call_id:, time_offset:, scale:, channel_id:, video_quality:) broadcast('@type' => 'getGroupCallStreamSegment', 'group_call_id' => group_call_id, 'time_offset' => time_offset, 'scale' => scale, 'channel_id' => channel_id, 'video_quality' => video_quality) end |
#get_group_call_streams(group_call_id:) ⇒ TD::Types::GroupCallStreams
Returns information about available group call streams.
3738 3739 3740 3741 |
# File 'lib/tdlib/client_methods.rb', line 3738 def get_group_call_streams(group_call_id:) broadcast('@type' => 'getGroupCallStreams', 'group_call_id' => group_call_id) end |
#get_groups_in_common(user_id:, offset_chat_id:, limit:) ⇒ TD::Types::Chats
Returns a list of common group chats with a given user. Chats are sorted by their type and creation date.
3750 3751 3752 3753 3754 3755 |
# File 'lib/tdlib/client_methods.rb', line 3750 def get_groups_in_common(user_id:, offset_chat_id:, limit:) broadcast('@type' => 'getGroupsInCommon', 'user_id' => user_id, 'offset_chat_id' => offset_chat_id, 'limit' => limit) end |
#get_imported_contact_count ⇒ TD::Types::Count
Returns the total number of imported contacts.
3760 3761 3762 |
# File 'lib/tdlib/client_methods.rb', line 3760 def get_imported_contact_count broadcast('@type' => 'getImportedContactCount') end |
#get_inactive_supergroup_chats ⇒ TD::Types::Chats
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.
Also, the limit can be increased with Telegram Premium.
3770 3771 3772 |
# File 'lib/tdlib/client_methods.rb', line 3770 def get_inactive_supergroup_chats broadcast('@type' => 'getInactiveSupergroupChats') end |
#get_inline_game_high_scores(inline_message_id:, user_id:) ⇒ TD::Types::GameHighScores
Returns game high scores and some part of the high score table in the range of the specified user; for bots only.
3779 3780 3781 3782 3783 |
# File 'lib/tdlib/client_methods.rb', line 3779 def get_inline_game_high_scores(inline_message_id:, user_id:) broadcast('@type' => 'getInlineGameHighScores', 'inline_message_id' => , 'user_id' => user_id) end |
#get_inline_query_results(bot_user_id:, chat_id:, user_location:, query:, offset:) ⇒ TD::Types::InlineQueryResults
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.
3796 3797 3798 3799 3800 3801 3802 3803 |
# File 'lib/tdlib/client_methods.rb', line 3796 def get_inline_query_results(bot_user_id:, chat_id:, user_location:, query:, offset:) broadcast('@type' => 'getInlineQueryResults', 'bot_user_id' => bot_user_id, 'chat_id' => chat_id, 'user_location' => user_location, 'query' => query, 'offset' => offset) end |
#get_installed_backgrounds(for_dark_theme:) ⇒ TD::Types::Backgrounds
Returns backgrounds installed by the user.
3809 3810 3811 3812 |
# File 'lib/tdlib/client_methods.rb', line 3809 def get_installed_backgrounds(for_dark_theme:) broadcast('@type' => 'getInstalledBackgrounds', 'for_dark_theme' => for_dark_theme) end |
#get_installed_sticker_sets(sticker_type:) ⇒ TD::Types::StickerSets
Returns a list of installed sticker sets.
3818 3819 3820 3821 |
# File 'lib/tdlib/client_methods.rb', line 3818 def get_installed_sticker_sets(sticker_type:) broadcast('@type' => 'getInstalledStickerSets', 'sticker_type' => sticker_type) end |
#get_internal_link(type:, is_http:) ⇒ TD::Types::HttpUrl
Returns an HTTPS or a tg: link with the given type. Can be called before authorization.
3830 3831 3832 3833 3834 |
# File 'lib/tdlib/client_methods.rb', line 3830 def get_internal_link(type:, is_http:) broadcast('@type' => 'getInternalLink', 'type' => type, 'is_http' => is_http) end |
#get_internal_link_type(link:) ⇒ TD::Types::InternalLinkType
Returns information about the type of internal link. Returns a 404 error if the link is not internal. Can be called before authorization.
3842 3843 3844 3845 |
# File 'lib/tdlib/client_methods.rb', line 3842 def get_internal_link_type(link:) broadcast('@type' => 'getInternalLinkType', 'link' => link) end |
#get_json_string(json_value:) ⇒ TD::Types::Text
Converts a JsonValue object to corresponding JSON-serialized string. Can be called synchronously.
3852 3853 3854 3855 |
# File 'lib/tdlib/client_methods.rb', line 3852 def get_json_string(json_value:) broadcast('@type' => 'getJsonString', 'json_value' => json_value) end |
#get_json_value(json:) ⇒ TD::Types::JsonValue
Converts a JSON-serialized string to corresponding JsonValue object. Can be called synchronously.
3862 3863 3864 3865 |
# File 'lib/tdlib/client_methods.rb', line 3862 def get_json_value(json:) broadcast('@type' => 'getJsonValue', 'json' => json) end |
#get_keyword_emojis(text:, input_language_codes: nil) ⇒ TD::Types::Emojis
Return emojis matching the keyword. Supported only if the file database is enabled. Order of results is unspecified.
3875 3876 3877 3878 3879 |
# File 'lib/tdlib/client_methods.rb', line 3875 def get_keyword_emojis(text:, input_language_codes: nil) broadcast('@type' => 'getKeywordEmojis', 'text' => text, 'input_language_codes' => input_language_codes) end |
#get_language_pack_info(language_pack_id:) ⇒ TD::Types::LanguagePackInfo
Returns information about a language pack. Returned language pack identifier may be different from a provided one. Can be called before authorization.
3887 3888 3889 3890 |
# File 'lib/tdlib/client_methods.rb', line 3887 def get_language_pack_info(language_pack_id:) broadcast('@type' => 'getLanguagePackInfo', 'language_pack_id' => language_pack_id) end |
#get_language_pack_string(language_pack_database_path:, localization_target:, language_pack_id:, key:) ⇒ TD::Types::LanguagePackStringValue
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.
3902 3903 3904 3905 3906 3907 3908 |
# File 'lib/tdlib/client_methods.rb', line 3902 def get_language_pack_string(language_pack_database_path:, localization_target:, language_pack_id:, key:) broadcast('@type' => 'getLanguagePackString', 'language_pack_database_path' => language_pack_database_path, 'localization_target' => localization_target, 'language_pack_id' => language_pack_id, 'key' => key) end |
#get_language_pack_strings(language_pack_id:, keys:) ⇒ TD::Types::LanguagePackStrings
Returns strings from a language pack in the current localization target by their keys. Can be called before authorization.
3917 3918 3919 3920 3921 |
# File 'lib/tdlib/client_methods.rb', line 3917 def get_language_pack_strings(language_pack_id:, keys:) broadcast('@type' => 'getLanguagePackStrings', 'language_pack_id' => language_pack_id, 'keys' => keys) end |
#get_link_preview(text:, link_preview_options:) ⇒ TD::Types::LinkPreview
Returns a link preview by the text of a message. Do not call this function too often. Returns a 404 error if the text has no link preview.
3931 3932 3933 3934 3935 |
# File 'lib/tdlib/client_methods.rb', line 3931 def get_link_preview(text:, link_preview_options:) broadcast('@type' => 'getLinkPreview', 'text' => text, 'link_preview_options' => ) end |
#get_localization_target_info(only_local:) ⇒ TD::Types::LocalizationTargetInfo
Returns information about the current localization target. This is an offline request if only_local is true. Can be called before authorization.
3943 3944 3945 3946 |
# File 'lib/tdlib/client_methods.rb', line 3943 def get_localization_target_info(only_local:) broadcast('@type' => 'getLocalizationTargetInfo', 'only_local' => only_local) end |
#get_log_stream ⇒ TD::Types::LogStream
Returns information about currently used log stream for internal logging of TDLib. Can be called synchronously.
3952 3953 3954 |
# File 'lib/tdlib/client_methods.rb', line 3952 def get_log_stream broadcast('@type' => 'getLogStream') end |
#get_log_tag_verbosity_level(tag:) ⇒ TD::Types::LogVerbosityLevel
Returns current verbosity level for a specified TDLib internal log tag. Can be called synchronously.
3961 3962 3963 3964 |
# File 'lib/tdlib/client_methods.rb', line 3961 def get_log_tag_verbosity_level(tag:) broadcast('@type' => 'getLogTagVerbosityLevel', 'tag' => tag) end |
#get_log_tags ⇒ TD::Types::LogTags
Returns the list of available TDLib internal log tags, for example, [“actor”, “binlog”, “connections”,
"notifications", "proxy"].
Can be called synchronously.
3971 3972 3973 |
# File 'lib/tdlib/client_methods.rb', line 3971 def broadcast('@type' => 'getLogTags') end |
#get_log_verbosity_level ⇒ TD::Types::LogVerbosityLevel
Returns current verbosity level of the internal logging of TDLib. Can be called synchronously.
3979 3980 3981 |
# File 'lib/tdlib/client_methods.rb', line 3979 def get_log_verbosity_level broadcast('@type' => 'getLogVerbosityLevel') end |
#get_login_url(chat_id:, message_id:, button_id:, allow_write_access:) ⇒ TD::Types::HttpUrl
Returns an HTTP URL which can be used to automatically authorize the user on a website after clicking an inline
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.
3993 3994 3995 3996 3997 3998 3999 |
# File 'lib/tdlib/client_methods.rb', line 3993 def get_login_url(chat_id:, message_id:, button_id:, allow_write_access:) broadcast('@type' => 'getLoginUrl', 'chat_id' => chat_id, 'message_id' => , 'button_id' => , 'allow_write_access' => allow_write_access) end |
#get_login_url_info(chat_id:, message_id:, button_id:) ⇒ TD::Types::LoginUrlInfo
Returns information about a button of type inlineKeyboardButtonTypeLoginUrl. The method needs to be called when the user presses the button.
4009 4010 4011 4012 4013 4014 |
# File 'lib/tdlib/client_methods.rb', line 4009 def get_login_url_info(chat_id:, message_id:, button_id:) broadcast('@type' => 'getLoginUrlInfo', 'chat_id' => chat_id, 'message_id' => , 'button_id' => ) end |
#get_main_web_app(chat_id:, bot_user_id:, start_parameter:, theme:, application_name:) ⇒ TD::Types::MainWebApp
Returns information needed to open the main Web App of a bot.
4025 4026 4027 4028 4029 4030 4031 4032 |
# File 'lib/tdlib/client_methods.rb', line 4025 def get_main_web_app(chat_id:, bot_user_id:, start_parameter:, theme:, application_name:) broadcast('@type' => 'getMainWebApp', 'chat_id' => chat_id, 'bot_user_id' => bot_user_id, 'start_parameter' => start_parameter, 'theme' => theme, 'application_name' => application_name) end |
#get_map_thumbnail_file(location:, zoom:, width:, height:, scale:, chat_id:) ⇒ TD::Types::File
Returns information about a file with a map thumbnail in PNG format. Only map thumbnail files with size less than 1MB can be downloaded.
4045 4046 4047 4048 4049 4050 4051 4052 4053 |
# File 'lib/tdlib/client_methods.rb', line 4045 def get_map_thumbnail_file(location:, zoom:, width:, height:, scale:, chat_id:) broadcast('@type' => 'getMapThumbnailFile', 'location' => location, 'zoom' => zoom, 'width' => width, 'height' => height, 'scale' => scale, 'chat_id' => chat_id) end |
#get_markdown_text(text:) ⇒ TD::Types::FormattedText
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.
4061 4062 4063 4064 |
# File 'lib/tdlib/client_methods.rb', line 4061 def get_markdown_text(text:) broadcast('@type' => 'getMarkdownText', 'text' => text) end |
#get_me ⇒ TD::Types::User
Returns the current user.
4069 4070 4071 |
# File 'lib/tdlib/client_methods.rb', line 4069 def get_me broadcast('@type' => 'getMe') end |
#get_menu_button(user_id:) ⇒ TD::Types::BotMenuButton
Returns menu button set by the bot for the given user; for bots only.
4077 4078 4079 4080 |
# File 'lib/tdlib/client_methods.rb', line 4077 def (user_id:) broadcast('@type' => 'getMenuButton', 'user_id' => user_id) end |
#get_message(chat_id:, message_id:) ⇒ TD::Types::Message
Returns information about a message.
4087 4088 4089 4090 4091 |
# File 'lib/tdlib/client_methods.rb', line 4087 def (chat_id:, message_id:) broadcast('@type' => 'getMessage', 'chat_id' => chat_id, 'message_id' => ) end |
#get_message_added_reactions(chat_id:, message_id:, reaction_type:, offset:, limit:) ⇒ TD::Types::AddedReactions
Returns reactions added for a message, along with their sender.
4106 4107 4108 4109 4110 4111 4112 4113 |
# File 'lib/tdlib/client_methods.rb', line 4106 def (chat_id:, message_id:, reaction_type:, offset:, limit:) broadcast('@type' => 'getMessageAddedReactions', 'chat_id' => chat_id, 'message_id' => , 'reaction_type' => reaction_type, 'offset' => offset, 'limit' => limit) end |
#get_message_available_reactions(chat_id:, message_id:, row_size:) ⇒ TD::Types::AvailableReactions
Returns reactions, which can be added to a message. The list can change after updateActiveEmojiReactions, updateChatAvailableReactions for the chat, or
updateMessageInteractionInfo for the .
4123 4124 4125 4126 4127 4128 |
# File 'lib/tdlib/client_methods.rb', line 4123 def (chat_id:, message_id:, row_size:) broadcast('@type' => 'getMessageAvailableReactions', 'chat_id' => chat_id, 'message_id' => , 'row_size' => row_size) end |
#get_message_effect(effect_id:) ⇒ TD::Types::MessageEffect
Returns information about a message effect. Returns a 404 error if the effect is not found.
4135 4136 4137 4138 |
# File 'lib/tdlib/client_methods.rb', line 4135 def (effect_id:) broadcast('@type' => 'getMessageEffect', 'effect_id' => effect_id) end |
#get_message_embedding_code(chat_id:, message_id:, for_album:) ⇒ TD::Types::Text
Returns an HTML code for embedding the message. Available only if messageProperties.can_get_embedding_code.
4147 4148 4149 4150 4151 4152 |
# File 'lib/tdlib/client_methods.rb', line 4147 def (chat_id:, message_id:, for_album:) broadcast('@type' => 'getMessageEmbeddingCode', 'chat_id' => chat_id, 'message_id' => , 'for_album' => for_album) end |
#get_message_file_type(message_file_head:) ⇒ TD::Types::MessageFileType
Returns information about a file with messages exported from another application.
4158 4159 4160 4161 |
# File 'lib/tdlib/client_methods.rb', line 4158 def (message_file_head:) broadcast('@type' => 'getMessageFileType', 'message_file_head' => ) end |
#get_message_import_confirmation_text(chat_id:) ⇒ TD::Types::Text
Returns a confirmation text to be shown to the user before starting message import.
4169 4170 4171 4172 |
# File 'lib/tdlib/client_methods.rb', line 4169 def (chat_id:) broadcast('@type' => 'getMessageImportConfirmationText', 'chat_id' => chat_id) end |
#get_message_link(chat_id:, message_id:, media_timestamp:, for_album:, in_message_thread:) ⇒ TD::Types::MessageLink
Returns an HTTPS link to a message in a chat. Available only if messageProperties.can_get_link, or if messageProperties.can_get_media_timestamp_links and a media
link is generated.
This is an offline request.
4188 4189 4190 4191 4192 4193 4194 4195 |
# File 'lib/tdlib/client_methods.rb', line 4188 def (chat_id:, message_id:, media_timestamp:, for_album:, in_message_thread:) broadcast('@type' => 'getMessageLink', 'chat_id' => chat_id, 'message_id' => , 'media_timestamp' => , 'for_album' => for_album, 'in_message_thread' => ) end |
#get_message_link_info(url:) ⇒ TD::Types::MessageLinkInfo
Returns information about a public or private message link. Can be called for any internal link of the type internalLinkTypeMessage.
4202 4203 4204 4205 |
# File 'lib/tdlib/client_methods.rb', line 4202 def (url:) broadcast('@type' => 'getMessageLinkInfo', 'url' => url) end |
#get_message_locally(chat_id:, message_id:) ⇒ TD::Types::Message
Returns information about a message, if it is available without sending network request. This is an offline request.
4213 4214 4215 4216 4217 |
# File 'lib/tdlib/client_methods.rb', line 4213 def (chat_id:, message_id:) broadcast('@type' => 'getMessageLocally', 'chat_id' => chat_id, 'message_id' => ) end |
#get_message_properties(chat_id:, message_id:) ⇒ TD::Types::MessageProperties
Returns properties of a message; this is an offline request.
4224 4225 4226 4227 4228 |
# File 'lib/tdlib/client_methods.rb', line 4224 def (chat_id:, message_id:) broadcast('@type' => 'getMessageProperties', 'chat_id' => chat_id, 'message_id' => ) end |
#get_message_public_forwards(chat_id:, message_id:, offset:, limit:) ⇒ TD::Types::PublicForwards
Returns forwarded copies of a channel message to different public channels and public reposts as a story. Can be used only if messageProperties.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib.
4243 4244 4245 4246 4247 4248 4249 |
# File 'lib/tdlib/client_methods.rb', line 4243 def (chat_id:, message_id:, offset:, limit:) broadcast('@type' => 'getMessagePublicForwards', 'chat_id' => chat_id, 'message_id' => , 'offset' => offset, 'limit' => limit) end |
#get_message_read_date(chat_id:, message_id:) ⇒ TD::Types::MessageReadDate
Returns read date of a recent outgoing message in a private chat. The method can be called if messageProperties.can_get_read_date == true.
4257 4258 4259 4260 4261 |
# File 'lib/tdlib/client_methods.rb', line 4257 def (chat_id:, message_id:) broadcast('@type' => 'getMessageReadDate', 'chat_id' => chat_id, 'message_id' => ) end |
#get_message_statistics(chat_id:, message_id:, is_dark:) ⇒ TD::Types::MessageStatistics
Returns detailed statistics about a message. Can be used only if messageProperties.can_get_statistics == true.
4270 4271 4272 4273 4274 4275 |
# File 'lib/tdlib/client_methods.rb', line 4270 def (chat_id:, message_id:, is_dark:) broadcast('@type' => 'getMessageStatistics', 'chat_id' => chat_id, 'message_id' => , 'is_dark' => is_dark) end |
#get_message_thread(chat_id:, message_id:) ⇒ TD::Types::MessageThreadInfo
Returns information about a message thread. Can be used only if messageProperties.can_get_message_thread == true.
4283 4284 4285 4286 4287 |
# File 'lib/tdlib/client_methods.rb', line 4283 def (chat_id:, message_id:) broadcast('@type' => 'getMessageThread', 'chat_id' => chat_id, 'message_id' => ) end |
#get_message_thread_history(chat_id:, message_id:, from_message_id:, offset:, limit:) ⇒ TD::Types::Messages
Returns messages in a message thread of a message. Can be used only if messageProperties.can_get_message_thread == true. Message thread of a channel message is in the channel’s linked supergroup. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id). For optimal performance, the number of returned messages is chosen by TDLib.
4307 4308 4309 4310 4311 4312 4313 4314 |
# File 'lib/tdlib/client_methods.rb', line 4307 def (chat_id:, message_id:, from_message_id:, offset:, limit:) broadcast('@type' => 'getMessageThreadHistory', 'chat_id' => chat_id, 'message_id' => , 'from_message_id' => , 'offset' => offset, 'limit' => limit) end |
#get_message_viewers(chat_id:, message_id:) ⇒ TD::Types::MessageViewers
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 messageProperties.can_get_viewers == true.
4323 4324 4325 4326 4327 |
# File 'lib/tdlib/client_methods.rb', line 4323 def (chat_id:, message_id:) broadcast('@type' => 'getMessageViewers', 'chat_id' => chat_id, 'message_id' => ) end |
#get_messages(chat_id:, message_ids:) ⇒ TD::Types::Messages
Returns information about messages. If a message is not found, returns null on the corresponding position of the result.
4335 4336 4337 4338 4339 |
# File 'lib/tdlib/client_methods.rb', line 4335 def (chat_id:, message_ids:) broadcast('@type' => 'getMessages', 'chat_id' => chat_id, 'message_ids' => ) end |
#get_network_statistics(only_current:) ⇒ TD::Types::NetworkStatistics
Returns network data usage statistics. Can be called before authorization.
4346 4347 4348 4349 |
# File 'lib/tdlib/client_methods.rb', line 4346 def get_network_statistics(only_current:) broadcast('@type' => 'getNetworkStatistics', 'only_current' => only_current) end |
#get_new_chat_privacy_settings ⇒ TD::Types::NewChatPrivacySettings
Returns privacy settings for new chat creation.
4354 4355 4356 |
# File 'lib/tdlib/client_methods.rb', line 4354 def get_new_chat_privacy_settings broadcast('@type' => 'getNewChatPrivacySettings') end |
#get_option(name:) ⇒ TD::Types::OptionValue
Returns the value of an option by its name. (Check the list of available options on core.telegram.org/tdlib/options.) Can be called before
.
Can be called synchronously for options “version” and “commit_hash”.
4365 4366 4367 4368 |
# File 'lib/tdlib/client_methods.rb', line 4365 def get_option(name:) broadcast('@type' => 'getOption', 'name' => name) end |
#get_owned_sticker_sets(offset_sticker_set_id:, limit:) ⇒ TD::Types::StickerSets
Returns sticker sets owned by the current user.
4379 4380 4381 4382 4383 |
# File 'lib/tdlib/client_methods.rb', line 4379 def get_owned_sticker_sets(offset_sticker_set_id:, limit:) broadcast('@type' => 'getOwnedStickerSets', 'offset_sticker_set_id' => offset_sticker_set_id, 'limit' => limit) end |
#get_passport_authorization_form(bot_user_id:, scope:, public_key:, nonce:) ⇒ TD::Types::PassportAuthorizationForm
Returns a Telegram Passport authorization form for sharing data with a service.
4392 4393 4394 4395 4396 4397 4398 |
# File 'lib/tdlib/client_methods.rb', line 4392 def (bot_user_id:, scope:, public_key:, nonce:) broadcast('@type' => 'getPassportAuthorizationForm', 'bot_user_id' => bot_user_id, 'scope' => scope, 'public_key' => public_key, 'nonce' => nonce) end |
#get_passport_authorization_form_available_elements(authorization_form_id:, password:) ⇒ TD::Types::PassportElementsWithErrors
Returns already available Telegram Passport elements suitable for completing a Telegram Passport authorization
form.
Result can be received only once for each authorization form.
4407 4408 4409 4410 4411 |
# File 'lib/tdlib/client_methods.rb', line 4407 def (authorization_form_id:, password:) broadcast('@type' => 'getPassportAuthorizationFormAvailableElements', 'authorization_form_id' => , 'password' => password) end |
#get_passport_element(type:, password:) ⇒ TD::Types::PassportElement
Returns one of the available Telegram Passport elements.
4418 4419 4420 4421 4422 |
# File 'lib/tdlib/client_methods.rb', line 4418 def get_passport_element(type:, password:) broadcast('@type' => 'getPassportElement', 'type' => type, 'password' => password) end |
#get_password_state ⇒ TD::Types::PasswordState
Returns the current state of 2-step verification.
4427 4428 4429 |
# File 'lib/tdlib/client_methods.rb', line 4427 def get_password_state broadcast('@type' => 'getPasswordState') end |
#get_payment_form(input_invoice:, theme:) ⇒ TD::Types::PaymentForm
Returns an invoice payment form. This method must be called when the user presses inline button of the type inlineKeyboardButtonTypeBuy, or wants to
buy access to media in a .
4438 4439 4440 4441 4442 |
# File 'lib/tdlib/client_methods.rb', line 4438 def get_payment_form(input_invoice:, theme:) broadcast('@type' => 'getPaymentForm', 'input_invoice' => input_invoice, 'theme' => theme) end |
#get_payment_receipt(chat_id:, message_id:) ⇒ TD::Types::PaymentReceipt
Returns information about a successful payment.
4449 4450 4451 4452 4453 |
# File 'lib/tdlib/client_methods.rb', line 4449 def get_payment_receipt(chat_id:, message_id:) broadcast('@type' => 'getPaymentReceipt', 'chat_id' => chat_id, 'message_id' => ) end |
#get_phone_number_info(phone_number_prefix:) ⇒ TD::Types::PhoneNumberInfo
Returns information about a phone number by its prefix. Can be called before authorization.
4460 4461 4462 4463 |
# File 'lib/tdlib/client_methods.rb', line 4460 def get_phone_number_info(phone_number_prefix:) broadcast('@type' => 'getPhoneNumberInfo', 'phone_number_prefix' => phone_number_prefix) end |
#get_phone_number_info_sync(language_code:, phone_number_prefix:) ⇒ TD::Types::PhoneNumberInfo
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.
4473 4474 4475 4476 4477 |
# File 'lib/tdlib/client_methods.rb', line 4473 def get_phone_number_info_sync(language_code:, phone_number_prefix:) broadcast('@type' => 'getPhoneNumberInfoSync', 'language_code' => language_code, 'phone_number_prefix' => phone_number_prefix) end |
#get_poll_voters(chat_id:, message_id:, option_id:, offset:, limit:) ⇒ TD::Types::MessageSenders
Returns message senders voted for the specified option in a non-anonymous polls. For optimal performance, the number of returned users is chosen by TDLib.
4490 4491 4492 4493 4494 4495 4496 4497 |
# File 'lib/tdlib/client_methods.rb', line 4490 def get_poll_voters(chat_id:, message_id:, option_id:, offset:, limit:) broadcast('@type' => 'getPollVoters', 'chat_id' => chat_id, 'message_id' => , 'option_id' => option_id, 'offset' => offset, 'limit' => limit) end |
#get_popular_web_app_bots(offset:, limit:) ⇒ TD::Types::FoundUsers
Returns popular Web App bots.
4505 4506 4507 4508 4509 |
# File 'lib/tdlib/client_methods.rb', line 4505 def get_popular_web_app_bots(offset:, limit:) broadcast('@type' => 'getPopularWebAppBots', 'offset' => offset, 'limit' => limit) end |
#get_preferred_country_language(country_code:) ⇒ TD::Types::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.
Returns a 404 error if unknown.
4517 4518 4519 4520 |
# File 'lib/tdlib/client_methods.rb', line 4517 def get_preferred_country_language(country_code:) broadcast('@type' => 'getPreferredCountryLanguage', 'country_code' => country_code) end |
#get_premium_features(source:) ⇒ TD::Types::PremiumFeatures
Returns information about features, available to Premium users.
4527 4528 4529 4530 |
# File 'lib/tdlib/client_methods.rb', line 4527 def get_premium_features(source:) broadcast('@type' => 'getPremiumFeatures', 'source' => source) end |
#get_premium_gift_code_payment_options(boosted_chat_id:) ⇒ TD::Types::PremiumGiftCodePaymentOptions
Returns available options for Telegram Premium gift code or giveaway creation.
4537 4538 4539 4540 |
# File 'lib/tdlib/client_methods.rb', line 4537 def (boosted_chat_id:) broadcast('@type' => 'getPremiumGiftCodePaymentOptions', 'boosted_chat_id' => boosted_chat_id) end |
#get_premium_giveaway_info(chat_id:, message_id:) ⇒ TD::Types::PremiumGiveawayInfo
Returns information about a Telegram Premium giveaway.
4547 4548 4549 4550 4551 |
# File 'lib/tdlib/client_methods.rb', line 4547 def get_premium_giveaway_info(chat_id:, message_id:) broadcast('@type' => 'getPremiumGiveawayInfo', 'chat_id' => chat_id, 'message_id' => ) end |
#get_premium_limit(limit_type:) ⇒ TD::Types::PremiumLimit
Returns information about a limit, increased for Premium users. Returns a 404 error if the limit is unknown.
4558 4559 4560 4561 |
# File 'lib/tdlib/client_methods.rb', line 4558 def get_premium_limit(limit_type:) broadcast('@type' => 'getPremiumLimit', 'limit_type' => limit_type) end |
#get_premium_state ⇒ TD::Types::PremiumState
Returns state of Telegram Premium subscription and promotion videos for Premium features.
4566 4567 4568 |
# File 'lib/tdlib/client_methods.rb', line 4566 def get_premium_state broadcast('@type' => 'getPremiumState') end |
#get_premium_sticker_examples ⇒ TD::Types::Stickers
Returns examples of premium stickers for demonstration purposes.
4573 4574 4575 |
# File 'lib/tdlib/client_methods.rb', line 4573 def get_premium_sticker_examples broadcast('@type' => 'getPremiumStickerExamples') end |
#get_premium_stickers(limit:) ⇒ TD::Types::Stickers
Returns premium stickers from regular sticker sets.
4581 4582 4583 4584 |
# File 'lib/tdlib/client_methods.rb', line 4581 def get_premium_stickers(limit:) broadcast('@type' => 'getPremiumStickers', 'limit' => limit) end |
#get_proxies ⇒ TD::Types::Proxies
Returns the list of proxies that are currently set up. Can be called before authorization.
4590 4591 4592 |
# File 'lib/tdlib/client_methods.rb', line 4590 def get_proxies broadcast('@type' => 'getProxies') end |
#get_proxy_link(proxy_id:) ⇒ TD::Types::HttpUrl
Returns an HTTPS link, which can be used to add a proxy. Available only for SOCKS5 and MTProto proxies. Can be called before authorization.
4600 4601 4602 4603 |
# File 'lib/tdlib/client_methods.rb', line 4600 def get_proxy_link(proxy_id:) broadcast('@type' => 'getProxyLink', 'proxy_id' => proxy_id) end |
#get_push_receiver_id(payload:) ⇒ TD::Types::PushReceiverId
Returns a globally unique push notification subscription identifier for identification of an account, which has
received a push notification.
Can be called synchronously.
4611 4612 4613 4614 |
# File 'lib/tdlib/client_methods.rb', line 4611 def get_push_receiver_id(payload:) broadcast('@type' => 'getPushReceiverId', 'payload' => payload) end |
#get_read_date_privacy_settings ⇒ TD::Types::ReadDatePrivacySettings
Returns privacy settings for message read date.
4619 4620 4621 |
# File 'lib/tdlib/client_methods.rb', line 4619 def get_read_date_privacy_settings broadcast('@type' => 'getReadDatePrivacySettings') end |
#get_recent_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns recent emoji statuses for self status.
4626 4627 4628 |
# File 'lib/tdlib/client_methods.rb', line 4626 def get_recent_emoji_statuses broadcast('@type' => 'getRecentEmojiStatuses') end |
#get_recent_inline_bots ⇒ TD::Types::Users
Returns up to 20 recently used inline bots in the order of their last usage.
4633 4634 4635 |
# File 'lib/tdlib/client_methods.rb', line 4633 def get_recent_inline_bots broadcast('@type' => 'getRecentInlineBots') end |
#get_recent_stickers(is_attached:) ⇒ TD::Types::Stickers
Returns a list of recently used stickers.
4642 4643 4644 4645 |
# File 'lib/tdlib/client_methods.rb', line 4642 def get_recent_stickers(is_attached:) broadcast('@type' => 'getRecentStickers', 'is_attached' => is_attached) end |
#get_recently_opened_chats(limit:) ⇒ TD::Types::Chats
Returns recently opened chats; this is an offline request. Returns chats in the order of last opening.
4652 4653 4654 4655 |
# File 'lib/tdlib/client_methods.rb', line 4652 def get_recently_opened_chats(limit:) broadcast('@type' => 'getRecentlyOpenedChats', 'limit' => limit) end |
#get_recently_visited_t_me_urls(referrer:) ⇒ TD::Types::TMeUrls
Returns t.me URLs recently visited by a newly registered user.
4661 4662 4663 4664 |
# File 'lib/tdlib/client_methods.rb', line 4661 def get_recently_visited_t_me_urls(referrer:) broadcast('@type' => 'getRecentlyVisitedTMeUrls', 'referrer' => referrer) end |
#get_recommended_chat_folders ⇒ TD::Types::RecommendedChatFolders
Returns recommended chat folders for the current user.
4669 4670 4671 |
# File 'lib/tdlib/client_methods.rb', line 4669 def get_recommended_chat_folders broadcast('@type' => 'getRecommendedChatFolders') end |
#get_recommended_chats ⇒ TD::Types::Chats
Returns a list of channel chats recommended to the current user.
4676 4677 4678 |
# File 'lib/tdlib/client_methods.rb', line 4676 def get_recommended_chats broadcast('@type' => 'getRecommendedChats') end |
#get_recovery_email_address(password:) ⇒ TD::Types::RecoveryEmailAddress
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.
4685 4686 4687 4688 |
# File 'lib/tdlib/client_methods.rb', line 4685 def get_recovery_email_address(password:) broadcast('@type' => 'getRecoveryEmailAddress', 'password' => password) end |
#get_remote_file(remote_file_id:, file_type:) ⇒ TD::Types::File
Returns information about a file by its remote identifier; 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.
4699 4700 4701 4702 4703 |
# File 'lib/tdlib/client_methods.rb', line 4699 def get_remote_file(remote_file_id:, file_type:) broadcast('@type' => 'getRemoteFile', 'remote_file_id' => remote_file_id, 'file_type' => file_type) end |
#get_replied_message(chat_id:, message_id:) ⇒ TD::Types::Message
Returns information about a non-bundled message that is replied by a given message. Also, returns the pinned message, the game message, the invoice message, the message with a previously set same
background, the giveaway , and the topic creation for of the types ,
, , , and topic
without non-bundled replied respectively.
4714 4715 4716 4717 4718 |
# File 'lib/tdlib/client_methods.rb', line 4714 def (chat_id:, message_id:) broadcast('@type' => 'getRepliedMessage', 'chat_id' => chat_id, 'message_id' => ) end |
#get_saved_animations ⇒ TD::Types::Animations
Returns saved animations.
4723 4724 4725 |
# File 'lib/tdlib/client_methods.rb', line 4723 def get_saved_animations broadcast('@type' => 'getSavedAnimations') end |
#get_saved_messages_tags(saved_messages_topic_id:) ⇒ TD::Types::SavedMessagesTags
Returns tags used in Saved Messages or a Saved Messages topic.
4732 4733 4734 4735 |
# File 'lib/tdlib/client_methods.rb', line 4732 def (saved_messages_topic_id:) broadcast('@type' => 'getSavedMessagesTags', 'saved_messages_topic_id' => ) end |
#get_saved_messages_topic_history(saved_messages_topic_id:, from_message_id:, offset:, limit:) ⇒ TD::Types::Messages
Returns messages in a Saved Messages topic. The messages are returned in reverse chronological order (i.e., in order of decreasing message_id).
4751 4752 4753 4754 4755 4756 4757 |
# File 'lib/tdlib/client_methods.rb', line 4751 def (saved_messages_topic_id:, from_message_id:, offset:, limit:) broadcast('@type' => 'getSavedMessagesTopicHistory', 'saved_messages_topic_id' => , 'from_message_id' => , 'offset' => offset, 'limit' => limit) end |
#get_saved_messages_topic_message_by_date(saved_messages_topic_id:, date:) ⇒ TD::Types::Message
Returns the last message sent in a Saved Messages topic no later than the specified date.
4764 4765 4766 4767 4768 |
# File 'lib/tdlib/client_methods.rb', line 4764 def (saved_messages_topic_id:, date:) broadcast('@type' => 'getSavedMessagesTopicMessageByDate', 'saved_messages_topic_id' => , 'date' => date) end |
#get_saved_notification_sound(notification_sound_id:) ⇒ TD::Types::NotificationSounds
Returns saved notification sound by its identifier. Returns a 404 error if there is no saved notification sound with the specified identifier.
4775 4776 4777 4778 |
# File 'lib/tdlib/client_methods.rb', line 4775 def get_saved_notification_sound(notification_sound_id:) broadcast('@type' => 'getSavedNotificationSound', 'notification_sound_id' => notification_sound_id) end |
#get_saved_notification_sounds ⇒ TD::Types::NotificationSounds
Returns the list of saved notification sounds. If a sound isn’t in the list, then default sound needs to be used.
4784 4785 4786 |
# File 'lib/tdlib/client_methods.rb', line 4784 def get_saved_notification_sounds broadcast('@type' => 'getSavedNotificationSounds') end |
#get_saved_order_info ⇒ TD::Types::OrderInfo
Returns saved order information. Returns a 404 error if there is no saved order information.
4792 4793 4794 |
# File 'lib/tdlib/client_methods.rb', line 4792 def get_saved_order_info broadcast('@type' => 'getSavedOrderInfo') end |
#get_scope_notification_settings(scope:) ⇒ TD::Types::ScopeNotificationSettings
Returns the notification settings for chats of a given type.
4801 4802 4803 4804 |
# File 'lib/tdlib/client_methods.rb', line 4801 def get_scope_notification_settings(scope:) broadcast('@type' => 'getScopeNotificationSettings', 'scope' => scope) end |
#get_searched_for_tags(tag_prefix:, limit:) ⇒ TD::Types::Hashtags
Returns recently searched for hashtags or cashtags by their prefix.
4811 4812 4813 4814 4815 |
# File 'lib/tdlib/client_methods.rb', line 4811 def (tag_prefix:, limit:) broadcast('@type' => 'getSearchedForTags', 'tag_prefix' => tag_prefix, 'limit' => limit) end |
#get_secret_chat(secret_chat_id:) ⇒ TD::Types::SecretChat
Returns information about a secret chat by its identifier. This is an offline request.
4822 4823 4824 4825 |
# File 'lib/tdlib/client_methods.rb', line 4822 def get_secret_chat(secret_chat_id:) broadcast('@type' => 'getSecretChat', 'secret_chat_id' => secret_chat_id) end |
#get_star_ad_account_url(owner_id:) ⇒ TD::Types::HttpUrl
Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for the chat paid in the
owned Telegram Stars.
4833 4834 4835 4836 |
# File 'lib/tdlib/client_methods.rb', line 4833 def get_star_ad_account_url(owner_id:) broadcast('@type' => 'getStarAdAccountUrl', 'owner_id' => owner_id) end |
#get_star_gift_payment_options(user_id:) ⇒ TD::Types::StarPaymentOptions
Returns available options for Telegram Stars gifting.
4843 4844 4845 4846 |
# File 'lib/tdlib/client_methods.rb', line 4843 def (user_id:) broadcast('@type' => 'getStarGiftPaymentOptions', 'user_id' => user_id) end |
#get_star_payment_options ⇒ TD::Types::StarPaymentOptions
Returns available options for Telegram Stars purchase.
4851 4852 4853 |
# File 'lib/tdlib/client_methods.rb', line 4851 def broadcast('@type' => 'getStarPaymentOptions') end |
#get_star_revenue_statistics(owner_id:, is_dark:) ⇒ TD::Types::StarRevenueStatistics
Returns detailed Telegram Star revenue statistics.
4861 4862 4863 4864 4865 |
# File 'lib/tdlib/client_methods.rb', line 4861 def get_star_revenue_statistics(owner_id:, is_dark:) broadcast('@type' => 'getStarRevenueStatistics', 'owner_id' => owner_id, 'is_dark' => is_dark) end |
#get_star_subscriptions(only_expiring:, offset:) ⇒ TD::Types::StarSubscriptions
Returns the list of Telegram Star subscriptions for the current user.
4874 4875 4876 4877 4878 |
# File 'lib/tdlib/client_methods.rb', line 4874 def get_star_subscriptions(only_expiring:, offset:) broadcast('@type' => 'getStarSubscriptions', 'only_expiring' => only_expiring, 'offset' => offset) end |
#get_star_transactions(owner_id:, subscription_id:, direction:, offset:, limit:) ⇒ TD::Types::StarTransactions
Returns the list of Telegram Star transactions for the specified owner.
4893 4894 4895 4896 4897 4898 4899 4900 |
# File 'lib/tdlib/client_methods.rb', line 4893 def get_star_transactions(owner_id:, subscription_id:, direction:, offset:, limit:) broadcast('@type' => 'getStarTransactions', 'owner_id' => owner_id, 'subscription_id' => subscription_id, 'direction' => direction, 'offset' => offset, 'limit' => limit) end |
#get_star_withdrawal_url(owner_id:, star_count:, password:) ⇒ TD::Types::HttpUrl
Returns a URL for Telegram Star withdrawal.
4910 4911 4912 4913 4914 4915 |
# File 'lib/tdlib/client_methods.rb', line 4910 def get_star_withdrawal_url(owner_id:, star_count:, password:) broadcast('@type' => 'getStarWithdrawalUrl', 'owner_id' => owner_id, 'star_count' => star_count, 'password' => password) end |
#get_statistical_graph(chat_id:, token:, x:) ⇒ TD::Types::StatisticalGraph
Loads an asynchronous or a zoomed in statistical graph.
4923 4924 4925 4926 4927 4928 |
# File 'lib/tdlib/client_methods.rb', line 4923 def get_statistical_graph(chat_id:, token:, x:) broadcast('@type' => 'getStatisticalGraph', 'chat_id' => chat_id, 'token' => token, 'x' => x) end |
#get_sticker_emojis(sticker:) ⇒ TD::Types::Emojis
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.
4936 4937 4938 4939 |
# File 'lib/tdlib/client_methods.rb', line 4936 def get_sticker_emojis(sticker:) broadcast('@type' => 'getStickerEmojis', 'sticker' => sticker) end |
#get_sticker_set(set_id:) ⇒ TD::Types::StickerSet
Returns information about a sticker set by its identifier.
4945 4946 4947 4948 |
# File 'lib/tdlib/client_methods.rb', line 4945 def get_sticker_set(set_id:) broadcast('@type' => 'getStickerSet', 'set_id' => set_id) end |
#get_stickers(sticker_type:, query: nil, limit:, chat_id:) ⇒ TD::Types::Stickers
Returns stickers from the installed sticker sets that correspond to any of the given emoji or can be found by
sticker-specific keywords.
If the query is non-empty, then favorite, recently used or trending stickers may also be returned.
4961 4962 4963 4964 4965 4966 4967 |
# File 'lib/tdlib/client_methods.rb', line 4961 def get_stickers(sticker_type:, query: nil, limit:, chat_id:) broadcast('@type' => 'getStickers', 'sticker_type' => sticker_type, 'query' => query, 'limit' => limit, 'chat_id' => chat_id) end |
#get_storage_statistics(chat_limit:) ⇒ TD::Types::StorageStatistics
Returns storage usage statistics. Can be called before authorization.
4977 4978 4979 4980 |
# File 'lib/tdlib/client_methods.rb', line 4977 def get_storage_statistics(chat_limit:) broadcast('@type' => 'getStorageStatistics', 'chat_limit' => chat_limit) end |
#get_storage_statistics_fast ⇒ TD::Types::StorageStatisticsFast
Quickly returns approximate storage usage statistics. Can be called before authorization.
4986 4987 4988 |
# File 'lib/tdlib/client_methods.rb', line 4986 def get_storage_statistics_fast broadcast('@type' => 'getStorageStatisticsFast') end |
#get_story(story_sender_chat_id:, story_id:, only_local:) ⇒ TD::Types::Story
Returns a story.
4996 4997 4998 4999 5000 5001 |
# File 'lib/tdlib/client_methods.rb', line 4996 def get_story(story_sender_chat_id:, story_id:, only_local:) broadcast('@type' => 'getStory', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id, 'only_local' => only_local) end |
#get_story_available_reactions(row_size:) ⇒ TD::Types::AvailableReactions
Returns reactions, which can be chosen for a story.
5007 5008 5009 5010 |
# File 'lib/tdlib/client_methods.rb', line 5007 def get_story_available_reactions(row_size:) broadcast('@type' => 'getStoryAvailableReactions', 'row_size' => row_size) end |
#get_story_interactions(story_id:, query: nil, only_contacts:, prefer_forwards:, prefer_with_reaction:, offset:, limit:) ⇒ TD::Types::StoryInteractions
Returns interactions with a story. The method can be called only for stories posted on behalf of the current user.
5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 |
# File 'lib/tdlib/client_methods.rb', line 5029 def get_story_interactions(story_id:, query: nil, only_contacts:, prefer_forwards:, prefer_with_reaction:, offset:, limit:) broadcast('@type' => 'getStoryInteractions', 'story_id' => story_id, 'query' => query, 'only_contacts' => only_contacts, 'prefer_forwards' => prefer_forwards, 'prefer_with_reaction' => prefer_with_reaction, 'offset' => offset, 'limit' => limit) end |
#get_story_notification_settings_exceptions ⇒ TD::Types::Chats
Returns the list of chats with non-default notification settings for stories.
5044 5045 5046 |
# File 'lib/tdlib/client_methods.rb', line 5044 def get_story_notification_settings_exceptions broadcast('@type' => 'getStoryNotificationSettingsExceptions') end |
#get_story_public_forwards(story_sender_chat_id:, story_id:, offset:, limit:) ⇒ TD::Types::PublicForwards
Returns forwards of a story as a message to public chats and reposts by public channels. Can be used only if the story is posted on behalf of the current user or story.can_get_statistics == true. For optimal performance, the number of returned messages and stories is chosen by TDLib.
5061 5062 5063 5064 5065 5066 5067 |
# File 'lib/tdlib/client_methods.rb', line 5061 def get_story_public_forwards(story_sender_chat_id:, story_id:, offset:, limit:) broadcast('@type' => 'getStoryPublicForwards', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id, 'offset' => offset, 'limit' => limit) end |
#get_story_statistics(chat_id:, story_id:, is_dark:) ⇒ TD::Types::StoryStatistics
Returns detailed statistics about a story. Can be used only if story.can_get_statistics == true.
5076 5077 5078 5079 5080 5081 |
# File 'lib/tdlib/client_methods.rb', line 5076 def get_story_statistics(chat_id:, story_id:, is_dark:) broadcast('@type' => 'getStoryStatistics', 'chat_id' => chat_id, 'story_id' => story_id, 'is_dark' => is_dark) end |
#get_suggested_file_name(file_id:, directory:) ⇒ TD::Types::Text
Returns suggested name for saving a file in a given directory.
5088 5089 5090 5091 5092 |
# File 'lib/tdlib/client_methods.rb', line 5088 def get_suggested_file_name(file_id:, directory:) broadcast('@type' => 'getSuggestedFileName', 'file_id' => file_id, 'directory' => directory) end |
#get_suggested_sticker_set_name(title:) ⇒ TD::Types::Text
Returns a suggested name for a new sticker set with a given title.
5098 5099 5100 5101 |
# File 'lib/tdlib/client_methods.rb', line 5098 def get_suggested_sticker_set_name(title:) broadcast('@type' => 'getSuggestedStickerSetName', 'title' => title) end |
#get_suitable_discussion_chats ⇒ TD::Types::Chats
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.
5109 5110 5111 |
# File 'lib/tdlib/client_methods.rb', line 5109 def get_suitable_discussion_chats broadcast('@type' => 'getSuitableDiscussionChats') end |
#get_suitable_personal_chats ⇒ TD::Types::Chats
Returns a list of channel chats, which can be used as a personal chat.
5116 5117 5118 |
# File 'lib/tdlib/client_methods.rb', line 5116 def get_suitable_personal_chats broadcast('@type' => 'getSuitablePersonalChats') end |
#get_supergroup(supergroup_id:) ⇒ TD::Types::Supergroup
Returns information about a supergroup or a channel by its identifier. This is an offline request if the current user is not a bot.
5125 5126 5127 5128 |
# File 'lib/tdlib/client_methods.rb', line 5125 def get_supergroup(supergroup_id:) broadcast('@type' => 'getSupergroup', 'supergroup_id' => supergroup_id) end |
#get_supergroup_full_info(supergroup_id:) ⇒ TD::Types::SupergroupFullInfo
Returns full information about a supergroup or a channel by its identifier, cached for up to 1 minute.
5134 5135 5136 5137 |
# File 'lib/tdlib/client_methods.rb', line 5134 def get_supergroup_full_info(supergroup_id:) broadcast('@type' => 'getSupergroupFullInfo', 'supergroup_id' => supergroup_id) end |
#get_supergroup_members(supergroup_id:, filter:, offset:, limit:) ⇒ TD::Types::ChatMembers
Returns information about members or banned users in a supergroup or channel. Can be used only if supergroupFullInfo.can_get_members == true; additionally, administrator privileges may be
required for some filters.
5149 5150 5151 5152 5153 5154 5155 |
# File 'lib/tdlib/client_methods.rb', line 5149 def get_supergroup_members(supergroup_id:, filter:, offset:, limit:) broadcast('@type' => 'getSupergroupMembers', 'supergroup_id' => supergroup_id, 'filter' => filter, 'offset' => offset, 'limit' => limit) end |
#get_support_name ⇒ TD::Types::Text
Returns localized name of the Telegram support user; for Telegram support only.
5160 5161 5162 |
# File 'lib/tdlib/client_methods.rb', line 5160 def get_support_name broadcast('@type' => 'getSupportName') end |
#get_support_user ⇒ TD::Types::User
Returns a user that can be contacted to get support.
5167 5168 5169 |
# File 'lib/tdlib/client_methods.rb', line 5167 def get_support_user broadcast('@type' => 'getSupportUser') end |
#get_temporary_password_state ⇒ TD::Types::TemporaryPasswordState
Returns information about the current temporary password.
5174 5175 5176 |
# File 'lib/tdlib/client_methods.rb', line 5174 def get_temporary_password_state broadcast('@type' => 'getTemporaryPasswordState') end |
#get_text_entities(text:) ⇒ TD::Types::TextEntities
Returns all entities (mentions, hashtags, cashtags, bot commands, bank card numbers, URLs, and email addresses)
found in the text.
Can be called synchronously.
5184 5185 5186 5187 |
# File 'lib/tdlib/client_methods.rb', line 5184 def get_text_entities(text:) broadcast('@type' => 'getTextEntities', 'text' => text) end |
#get_theme_parameters_json_string(theme:) ⇒ TD::Types::Text
Converts a themeParameters object to corresponding JSON-serialized string. Can be called synchronously.
5194 5195 5196 5197 |
# File 'lib/tdlib/client_methods.rb', line 5194 def get_theme_parameters_json_string(theme:) broadcast('@type' => 'getThemeParametersJsonString', 'theme' => theme) end |
#get_themed_chat_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns up to 8 emoji statuses, which must be shown in the emoji status list for chats.
5202 5203 5204 |
# File 'lib/tdlib/client_methods.rb', line 5202 def get_themed_chat_emoji_statuses broadcast('@type' => 'getThemedChatEmojiStatuses') end |
#get_themed_emoji_statuses ⇒ TD::Types::EmojiStatuses
Returns up to 8 emoji statuses, which must be shown right after the default Premium Badge in the emoji status list
for self status.
5210 5211 5212 |
# File 'lib/tdlib/client_methods.rb', line 5210 def get_themed_emoji_statuses broadcast('@type' => 'getThemedEmojiStatuses') end |
#get_time_zones ⇒ TD::Types::TimeZones
Returns the list of supported time zones.
5217 5218 5219 |
# File 'lib/tdlib/client_methods.rb', line 5217 def get_time_zones broadcast('@type' => 'getTimeZones') end |
#get_top_chats(category:, limit:) ⇒ TD::Types::Chats
Returns a list of frequently used chats.
5226 5227 5228 5229 5230 |
# File 'lib/tdlib/client_methods.rb', line 5226 def get_top_chats(category:, limit:) broadcast('@type' => 'getTopChats', 'category' => category, 'limit' => limit) end |
#get_trending_sticker_sets(sticker_type:, offset:, limit:) ⇒ TD::Types::TrendingStickerSets
Returns a list of trending sticker sets. For optimal performance, the number of returned sticker sets is chosen by TDLib.
5241 5242 5243 5244 5245 5246 |
# File 'lib/tdlib/client_methods.rb', line 5241 def get_trending_sticker_sets(sticker_type:, offset:, limit:) broadcast('@type' => 'getTrendingStickerSets', 'sticker_type' => sticker_type, 'offset' => offset, 'limit' => limit) end |
#get_user(user_id:) ⇒ TD::Types::User
Returns information about a user by their identifier. This is an offline request if the current user is not a bot.
5253 5254 5255 5256 |
# File 'lib/tdlib/client_methods.rb', line 5253 def get_user(user_id:) broadcast('@type' => 'getUser', 'user_id' => user_id) end |
#get_user_chat_boosts(chat_id:, user_id:) ⇒ TD::Types::FoundChatBoosts
Returns the list of boosts applied to a chat by a given user; requires administrator rights in the chat; for bots
only.
5264 5265 5266 5267 5268 |
# File 'lib/tdlib/client_methods.rb', line 5264 def get_user_chat_boosts(chat_id:, user_id:) broadcast('@type' => 'getUserChatBoosts', 'chat_id' => chat_id, 'user_id' => user_id) end |
#get_user_full_info(user_id:) ⇒ TD::Types::UserFullInfo
Returns full information about a user by their identifier.
5274 5275 5276 5277 |
# File 'lib/tdlib/client_methods.rb', line 5274 def get_user_full_info(user_id:) broadcast('@type' => 'getUserFullInfo', 'user_id' => user_id) end |
#get_user_link ⇒ TD::Types::UserLink
Returns an HTTPS link, which can be used to get information about the current user.
5282 5283 5284 |
# File 'lib/tdlib/client_methods.rb', line 5282 def get_user_link broadcast('@type' => 'getUserLink') end |
#get_user_privacy_setting_rules(setting:) ⇒ TD::Types::UserPrivacySettingRules
Returns the current privacy settings.
5290 5291 5292 5293 |
# File 'lib/tdlib/client_methods.rb', line 5290 def get_user_privacy_setting_rules(setting:) broadcast('@type' => 'getUserPrivacySettingRules', 'setting' => setting) end |
#get_user_profile_photos(user_id:, offset:, limit:) ⇒ TD::Types::ChatPhotos
Returns the profile photos of a user. Personal and public photo aren’t returned.
5302 5303 5304 5305 5306 5307 |
# File 'lib/tdlib/client_methods.rb', line 5302 def get_user_profile_photos(user_id:, offset:, limit:) broadcast('@type' => 'getUserProfilePhotos', 'user_id' => user_id, 'offset' => offset, 'limit' => limit) end |
#get_user_support_info(user_id:) ⇒ TD::Types::UserSupportInfo
Returns support information for the given user; for Telegram support only.
5313 5314 5315 5316 |
# File 'lib/tdlib/client_methods.rb', line 5313 def get_user_support_info(user_id:) broadcast('@type' => 'getUserSupportInfo', 'user_id' => user_id) end |
#get_video_chat_available_participants(chat_id:) ⇒ TD::Types::MessageSenders
Returns the list of participant identifiers, on whose behalf a video chat in the chat can be joined.
5322 5323 5324 5325 |
# File 'lib/tdlib/client_methods.rb', line 5322 def get_video_chat_available_participants(chat_id:) broadcast('@type' => 'getVideoChatAvailableParticipants', 'chat_id' => chat_id) end |
#get_video_chat_rtmp_url(chat_id:) ⇒ TD::Types::RtmpUrl
Returns RTMP URL for streaming to the chat; requires owner privileges.
5331 5332 5333 5334 |
# File 'lib/tdlib/client_methods.rb', line 5331 def get_video_chat_rtmp_url(chat_id:) broadcast('@type' => 'getVideoChatRtmpUrl', 'chat_id' => chat_id) end |
#get_web_app_link_url(chat_id:, bot_user_id:, web_app_short_name:, start_parameter:, theme:, application_name:, allow_write_access:) ⇒ TD::Types::HttpUrl
Returns an HTTPS URL of a Web App to open after a link of the type internalLinkTypeWebApp is clicked.
5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 |
# File 'lib/tdlib/client_methods.rb', line 5347 def get_web_app_link_url(chat_id:, bot_user_id:, web_app_short_name:, start_parameter:, theme:, application_name:, allow_write_access:) broadcast('@type' => 'getWebAppLinkUrl', 'chat_id' => chat_id, 'bot_user_id' => bot_user_id, 'web_app_short_name' => web_app_short_name, 'start_parameter' => start_parameter, 'theme' => theme, 'application_name' => application_name, 'allow_write_access' => allow_write_access) end |
#get_web_app_url(bot_user_id:, url:, theme:, application_name:) ⇒ TD::Types::HttpUrl
Returns an HTTPS URL of a Web App to open from the side menu, a keyboardButtonTypeWebApp button, or an
inlineQueryResultsButtonTypeWebApp .
5369 5370 5371 5372 5373 5374 5375 |
# File 'lib/tdlib/client_methods.rb', line 5369 def get_web_app_url(bot_user_id:, url:, theme:, application_name:) broadcast('@type' => 'getWebAppUrl', 'bot_user_id' => bot_user_id, 'url' => url, 'theme' => theme, 'application_name' => application_name) end |
#get_web_page_instant_view(url:, force_full:) ⇒ TD::Types::WebPageInstantView
Returns an instant view version of a web page if available. Returns a 404 error if the web page has no instant view page.
5383 5384 5385 5386 5387 |
# File 'lib/tdlib/client_methods.rb', line 5383 def get_web_page_instant_view(url:, force_full:) broadcast('@type' => 'getWebPageInstantView', 'url' => url, 'force_full' => force_full) end |
#hide_contact_close_birthdays ⇒ TD::Types::Ok
Hides the list of contacts that have close birthdays for 24 hours.
5392 5393 5394 |
# File 'lib/tdlib/client_methods.rb', line 5392 def hide_contact_close_birthdays broadcast('@type' => 'hideContactCloseBirthdays') end |
#hide_suggested_action(action:) ⇒ TD::Types::Ok
Hides a suggested action.
5400 5401 5402 5403 |
# File 'lib/tdlib/client_methods.rb', line 5400 def hide_suggested_action(action:) broadcast('@type' => 'hideSuggestedAction', 'action' => action) end |
#import_contacts(contacts:) ⇒ TD::Types::ImportedContacts
Adds new contacts or edits existing contacts by their phone numbers; contacts’ user identifiers are ignored.
5410 5411 5412 5413 |
# File 'lib/tdlib/client_methods.rb', line 5410 def import_contacts(contacts:) broadcast('@type' => 'importContacts', 'contacts' => contacts) end |
#import_messages(chat_id:, message_file:, attached_files:) ⇒ TD::Types::Ok
Imports messages exported from another app.
5427 5428 5429 5430 5431 5432 |
# File 'lib/tdlib/client_methods.rb', line 5427 def (chat_id:, message_file:, attached_files:) broadcast('@type' => 'importMessages', 'chat_id' => chat_id, 'message_file' => , 'attached_files' => attached_files) end |
#invite_group_call_participants(group_call_id:, user_ids:) ⇒ TD::Types::Ok
Invites users to an active group call. Sends a service message of type messageInviteVideoChatParticipants for video chats.
5441 5442 5443 5444 5445 |
# File 'lib/tdlib/client_methods.rb', line 5441 def invite_group_call_participants(group_call_id:, user_ids:) broadcast('@type' => 'inviteGroupCallParticipants', 'group_call_id' => group_call_id, 'user_ids' => user_ids) end |
#join_chat(chat_id:) ⇒ TD::Types::Ok
Adds the current user as a new member to a chat. Private and secret chats can’t be joined using this method. May return an error with a message “INVITE_REQUEST_SENT” if only a join request was created.
5453 5454 5455 5456 |
# File 'lib/tdlib/client_methods.rb', line 5453 def join_chat(chat_id:) broadcast('@type' => 'joinChat', 'chat_id' => chat_id) end |
#join_chat_by_invite_link(invite_link:) ⇒ TD::Types::Chat
Uses an invite link to add the current user to the chat if possible. May return an error with a message “INVITE_REQUEST_SENT” if only a join request was created.
5463 5464 5465 5466 |
# File 'lib/tdlib/client_methods.rb', line 5463 def join_chat_by_invite_link(invite_link:) broadcast('@type' => 'joinChatByInviteLink', 'invite_link' => invite_link) end |
#join_group_call(group_call_id:, participant_id:, audio_source_id:, payload:, is_muted:, is_my_video_enabled:, invite_hash:) ⇒ TD::Types::Text
Joins an active group call. Returns join response payload for tgcalls.
5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 |
# File 'lib/tdlib/client_methods.rb', line 5481 def join_group_call(group_call_id:, participant_id:, audio_source_id:, payload:, is_muted:, is_my_video_enabled:, invite_hash:) broadcast('@type' => 'joinGroupCall', 'group_call_id' => group_call_id, 'participant_id' => participant_id, 'audio_source_id' => audio_source_id, 'payload' => payload, 'is_muted' => is_muted, 'is_my_video_enabled' => is_my_video_enabled, 'invite_hash' => invite_hash) end |
#launch_prepaid_premium_giveaway(giveaway_id:, parameters:) ⇒ TD::Types::Ok
Launches a prepaid Telegram Premium giveaway.
5498 5499 5500 5501 5502 |
# File 'lib/tdlib/client_methods.rb', line 5498 def launch_prepaid_premium_giveaway(giveaway_id:, parameters:) broadcast('@type' => 'launchPrepaidPremiumGiveaway', 'giveaway_id' => giveaway_id, 'parameters' => parameters) end |
#leave_chat(chat_id:) ⇒ TD::Types::Ok
Removes the current user from chat members. Private and secret chats can’t be left using this method.
5509 5510 5511 5512 |
# File 'lib/tdlib/client_methods.rb', line 5509 def leave_chat(chat_id:) broadcast('@type' => 'leaveChat', 'chat_id' => chat_id) end |
#leave_group_call(group_call_id:) ⇒ TD::Types::Ok
Leaves a group call.
5518 5519 5520 5521 |
# File 'lib/tdlib/client_methods.rb', line 5518 def leave_group_call(group_call_id:) broadcast('@type' => 'leaveGroupCall', 'group_call_id' => group_call_id) end |
#load_active_stories(story_list:) ⇒ TD::Types::Ok
Loads more active stories from a story list. The loaded stories will be sent through updates. Active stories are sorted by the pair (active_stories.order, active_stories.story_sender_chat_id) in descending
order.
Returns a 404 error if all active stories have been loaded.
5531 5532 5533 5534 |
# File 'lib/tdlib/client_methods.rb', line 5531 def load_active_stories(story_list:) broadcast('@type' => 'loadActiveStories', 'story_list' => story_list) end |
#load_chats(chat_list:, limit:) ⇒ TD::Types::Ok
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.
5547 5548 5549 5550 5551 |
# File 'lib/tdlib/client_methods.rb', line 5547 def load_chats(chat_list:, limit:) broadcast('@type' => 'loadChats', 'chat_list' => chat_list, 'limit' => limit) end |
#load_group_call_participants(group_call_id:, limit:) ⇒ TD::Types::Ok
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.
5561 5562 5563 5564 5565 |
# File 'lib/tdlib/client_methods.rb', line 5561 def load_group_call_participants(group_call_id:, limit:) broadcast('@type' => 'loadGroupCallParticipants', 'group_call_id' => group_call_id, 'limit' => limit) end |
#load_quick_reply_shortcut_messages(shortcut_id:) ⇒ TD::Types::Ok
Loads quick reply messages that can be sent by a given quick reply shortcut. The loaded messages will be sent through updateQuickReplyShortcutMessages.
5572 5573 5574 5575 |
# File 'lib/tdlib/client_methods.rb', line 5572 def (shortcut_id:) broadcast('@type' => 'loadQuickReplyShortcutMessages', 'shortcut_id' => shortcut_id) end |
#load_quick_reply_shortcuts ⇒ TD::Types::Ok
Loads quick reply shortcuts created by the current user. The loaded topics will be sent through updateQuickReplyShortcuts.
5581 5582 5583 |
# File 'lib/tdlib/client_methods.rb', line 5581 def load_quick_reply_shortcuts broadcast('@type' => 'loadQuickReplyShortcuts') end |
#load_saved_messages_topics(limit:) ⇒ TD::Types::Ok
Loads more Saved Messages topics. The loaded topics will be sent through updateSavedMessagesTopic. Topics are sorted by their topic.order in descending order. Returns a 404 error if all topics have been loaded.
5594 5595 5596 5597 |
# File 'lib/tdlib/client_methods.rb', line 5594 def (limit:) broadcast('@type' => 'loadSavedMessagesTopics', 'limit' => limit) end |
#log_out ⇒ TD::Types::Ok
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.
5605 5606 5607 |
# File 'lib/tdlib/client_methods.rb', line 5605 def log_out broadcast('@type' => 'logOut') end |
#open_chat(chat_id:) ⇒ TD::Types::Ok
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).
5615 5616 5617 5618 |
# File 'lib/tdlib/client_methods.rb', line 5615 def open_chat(chat_id:) broadcast('@type' => 'openChat', 'chat_id' => chat_id) end |
#open_chat_similar_chat(chat_id:, opened_chat_id:) ⇒ TD::Types::Ok
Informs TDLib that a chat was opened from the list of similar chats. The method is independent of openChat and closeChat methods.
5626 5627 5628 5629 5630 |
# File 'lib/tdlib/client_methods.rb', line 5626 def open_chat_similar_chat(chat_id:, opened_chat_id:) broadcast('@type' => 'openChatSimilarChat', 'chat_id' => chat_id, 'opened_chat_id' => opened_chat_id) end |
#open_message_content(chat_id:, message_id:) ⇒ TD::Types::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 ).
An updateMessageContentOpened update will be generated if something has changed.
5639 5640 5641 5642 5643 |
# File 'lib/tdlib/client_methods.rb', line 5639 def (chat_id:, message_id:) broadcast('@type' => 'openMessageContent', 'chat_id' => chat_id, 'message_id' => ) end |
#open_story(story_sender_chat_id:, story_id:) ⇒ TD::Types::Ok
Informs TDLib that a story is opened and is being viewed by the user.
5650 5651 5652 5653 5654 |
# File 'lib/tdlib/client_methods.rb', line 5650 def open_story(story_sender_chat_id:, story_id:) broadcast('@type' => 'openStory', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id) end |
#open_web_app(chat_id:, bot_user_id:, url:, theme:, application_name:, message_thread_id:, reply_to:) ⇒ TD::Types::WebAppInfo
Informs TDLib that a Web App is being opened from the attachment menu, a botMenuButton button, an
internalLinkTypeAttachmentMenuBot link, or an inlineKeyboardButtonTypeWebApp .
For each bot, a confirmation alert about data sent to the bot must be shown once.
5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 |
# File 'lib/tdlib/client_methods.rb', line 5673 def open_web_app(chat_id:, bot_user_id:, url:, theme:, application_name:, message_thread_id:, reply_to:) broadcast('@type' => 'openWebApp', 'chat_id' => chat_id, 'bot_user_id' => bot_user_id, 'url' => url, 'theme' => theme, 'application_name' => application_name, 'message_thread_id' => , 'reply_to' => reply_to) end |
#optimize_storage(size:, ttl:, count:, immunity_delay:, file_types:, chat_ids:, exclude_chat_ids:, return_deleted_file_statistics:, chat_limit:) ⇒ TD::Types::StorageStatistics
Optimizes storage usage, i.e. deletes some files and returns new storage usage statistics. Secret thumbnails can’t be deleted.
5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 |
# File 'lib/tdlib/client_methods.rb', line 5710 def optimize_storage(size:, ttl:, count:, immunity_delay:, file_types:, chat_ids:, exclude_chat_ids:, return_deleted_file_statistics:, chat_limit:) broadcast('@type' => 'optimizeStorage', 'size' => size, 'ttl' => ttl, 'count' => count, 'immunity_delay' => immunity_delay, 'file_types' => file_types, 'chat_ids' => chat_ids, 'exclude_chat_ids' => exclude_chat_ids, 'return_deleted_file_statistics' => return_deleted_file_statistics, 'chat_limit' => chat_limit) end |
#parse_markdown(text:) ⇒ TD::Types::FormattedText
Parses Markdown entities in a human-friendly format, ignoring markup errors. Can be called synchronously.
5731 5732 5733 5734 |
# File 'lib/tdlib/client_methods.rb', line 5731 def parse_markdown(text:) broadcast('@type' => 'parseMarkdown', 'text' => text) end |
#parse_text_entities(text:, parse_mode:) ⇒ TD::Types::FormattedText
Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre,
PreCode, TextUrl and MentionName entities from a marked-up text.
Can be called synchronously.
5743 5744 5745 5746 5747 |
# File 'lib/tdlib/client_methods.rb', line 5743 def parse_text_entities(text:, parse_mode:) broadcast('@type' => 'parseTextEntities', 'text' => text, 'parse_mode' => parse_mode) end |
#pin_chat_message(chat_id:, message_id:, disable_notification:, only_for_self:) ⇒ TD::Types::Ok
Pins a message in a chat. A message can be pinned only if messageProperties.can_be_pinned.
5758 5759 5760 5761 5762 5763 5764 |
# File 'lib/tdlib/client_methods.rb', line 5758 def (chat_id:, message_id:, disable_notification:, only_for_self:) broadcast('@type' => 'pinChatMessage', 'chat_id' => chat_id, 'message_id' => , 'disable_notification' => disable_notification, 'only_for_self' => only_for_self) end |
#ping_proxy(proxy_id:) ⇒ TD::Types::Seconds
Computes time needed to receive a response from a Telegram server through a proxy. Can be called before authorization.
5772 5773 5774 5775 |
# File 'lib/tdlib/client_methods.rb', line 5772 def ping_proxy(proxy_id:) broadcast('@type' => 'pingProxy', 'proxy_id' => proxy_id) end |
#preliminary_upload_file(file:, file_type:, priority:) ⇒ TD::Types::File
Preliminary uploads a file to the cloud before sending it in a message, which can be useful for uploading of being
recorded voice and video notes.
In all other cases there is no need to preliminary upload a file. Updates updateFile will be used to notify about upload progress. The upload will not be completed until the file is sent in a message.
5790 5791 5792 5793 5794 5795 |
# File 'lib/tdlib/client_methods.rb', line 5790 def preliminary_upload_file(file:, file_type:, priority:) broadcast('@type' => 'preliminaryUploadFile', 'file' => file, 'file_type' => file_type, 'priority' => priority) end |
#process_chat_folder_new_chats(chat_folder_id:, added_chat_ids:) ⇒ TD::Types::Ok
Process new chats added to a shareable chat folder by its owner.
5803 5804 5805 5806 5807 |
# File 'lib/tdlib/client_methods.rb', line 5803 def process_chat_folder_new_chats(chat_folder_id:, added_chat_ids:) broadcast('@type' => 'processChatFolderNewChats', 'chat_folder_id' => chat_folder_id, 'added_chat_ids' => added_chat_ids) end |
#process_chat_join_request(chat_id:, user_id:, approve:) ⇒ TD::Types::Ok
Handles a pending join request in a chat.
5815 5816 5817 5818 5819 5820 |
# File 'lib/tdlib/client_methods.rb', line 5815 def process_chat_join_request(chat_id:, user_id:, approve:) broadcast('@type' => 'processChatJoinRequest', 'chat_id' => chat_id, 'user_id' => user_id, 'approve' => approve) end |
#process_chat_join_requests(chat_id:, invite_link:, approve:) ⇒ TD::Types::Ok
Handles all pending join requests for a given link in a chat.
5831 5832 5833 5834 5835 5836 |
# File 'lib/tdlib/client_methods.rb', line 5831 def process_chat_join_requests(chat_id:, invite_link:, approve:) broadcast('@type' => 'processChatJoinRequests', 'chat_id' => chat_id, 'invite_link' => invite_link, 'approve' => approve) end |
#process_push_notification(payload:) ⇒ TD::Types::Ok
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.
5846 5847 5848 5849 |
# File 'lib/tdlib/client_methods.rb', line 5846 def process_push_notification(payload:) broadcast('@type' => 'processPushNotification', 'payload' => payload) end |
#rate_speech_recognition(chat_id:, message_id:, is_good:) ⇒ TD::Types::Ok
Rates recognized speech in a video note or a voice note message.
5857 5858 5859 5860 5861 5862 |
# File 'lib/tdlib/client_methods.rb', line 5857 def rate_speech_recognition(chat_id:, message_id:, is_good:) broadcast('@type' => 'rateSpeechRecognition', 'chat_id' => chat_id, 'message_id' => , 'is_good' => is_good) end |
#read_all_chat_mentions(chat_id:) ⇒ TD::Types::Ok
Marks all mentions in a chat as read.
5868 5869 5870 5871 |
# File 'lib/tdlib/client_methods.rb', line 5868 def read_all_chat_mentions(chat_id:) broadcast('@type' => 'readAllChatMentions', 'chat_id' => chat_id) end |
#read_all_chat_reactions(chat_id:) ⇒ TD::Types::Ok
Marks all reactions in a chat or a forum topic as read.
5877 5878 5879 5880 |
# File 'lib/tdlib/client_methods.rb', line 5877 def read_all_chat_reactions(chat_id:) broadcast('@type' => 'readAllChatReactions', 'chat_id' => chat_id) end |
#read_all_message_thread_mentions(chat_id:, message_thread_id:) ⇒ TD::Types::Ok
Marks all mentions in a forum topic as read.
5887 5888 5889 5890 5891 |
# File 'lib/tdlib/client_methods.rb', line 5887 def (chat_id:, message_thread_id:) broadcast('@type' => 'readAllMessageThreadMentions', 'chat_id' => chat_id, 'message_thread_id' => ) end |
#read_all_message_thread_reactions(chat_id:, message_thread_id:) ⇒ TD::Types::Ok
Marks all reactions in a forum topic as read.
5898 5899 5900 5901 5902 |
# File 'lib/tdlib/client_methods.rb', line 5898 def (chat_id:, message_thread_id:) broadcast('@type' => 'readAllMessageThreadReactions', 'chat_id' => chat_id, 'message_thread_id' => ) end |
#read_chat_list(chat_list:) ⇒ TD::Types::Ok
Traverse all chats in a chat list and marks all messages in the chats as read.
5908 5909 5910 5911 |
# File 'lib/tdlib/client_methods.rb', line 5908 def read_chat_list(chat_list:) broadcast('@type' => 'readChatList', 'chat_list' => chat_list) end |
#read_file_part(file_id:, offset:, count:) ⇒ TD::Types::FilePart
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.
5924 5925 5926 5927 5928 5929 |
# File 'lib/tdlib/client_methods.rb', line 5924 def read_file_part(file_id:, offset:, count:) broadcast('@type' => 'readFilePart', 'file_id' => file_id, 'offset' => offset, 'count' => count) end |
#readd_quick_reply_shortcut_messages(shortcut_name:, message_ids:) ⇒ TD::Types::QuickReplyMessages
Readds quick reply messages which failed to add. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in
.retry_after time passed.
If a message is readded, 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 readded, null will be returned instead of the message.
5942 5943 5944 5945 5946 |
# File 'lib/tdlib/client_methods.rb', line 5942 def (shortcut_name:, message_ids:) broadcast('@type' => 'readdQuickReplyShortcutMessages', 'shortcut_name' => shortcut_name, 'message_ids' => ) end |
#recognize_speech(chat_id:, message_id:) ⇒ TD::Types::Ok
Recognizes speech in a video note or a voice note message.
5954 5955 5956 5957 5958 |
# File 'lib/tdlib/client_methods.rb', line 5954 def recognize_speech(chat_id:, message_id:) broadcast('@type' => 'recognizeSpeech', 'chat_id' => chat_id, 'message_id' => ) end |
#recover_authentication_password(recovery_code:, new_password: nil, new_hint: nil) ⇒ TD::Types::Ok
Recovers the 2-step verification 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.
5969 5970 5971 5972 5973 5974 |
# File 'lib/tdlib/client_methods.rb', line 5969 def recover_authentication_password(recovery_code:, new_password: nil, new_hint: nil) broadcast('@type' => 'recoverAuthenticationPassword', 'recovery_code' => recovery_code, 'new_password' => new_password, 'new_hint' => new_hint) end |
#recover_password(recovery_code:, new_password: nil, new_hint: nil) ⇒ TD::Types::PasswordState
Recovers the 2-step verification password using a recovery code sent to an email address that was previously set
up.
5984 5985 5986 5987 5988 5989 |
# File 'lib/tdlib/client_methods.rb', line 5984 def recover_password(recovery_code:, new_password: nil, new_hint: nil) broadcast('@type' => 'recoverPassword', 'recovery_code' => recovery_code, 'new_password' => new_password, 'new_hint' => new_hint) end |
#refund_star_payment(user_id:, telegram_payment_charge_id:) ⇒ TD::Types::Ok
Refunds a previously done payment in Telegram Stars.
5996 5997 5998 5999 6000 |
# File 'lib/tdlib/client_methods.rb', line 5996 def refund_star_payment(user_id:, telegram_payment_charge_id:) broadcast('@type' => 'refundStarPayment', 'user_id' => user_id, 'telegram_payment_charge_id' => telegram_payment_charge_id) end |
#register_device(device_token:, other_user_ids:) ⇒ TD::Types::PushReceiverId
Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription.
6008 6009 6010 6011 6012 |
# File 'lib/tdlib/client_methods.rb', line 6008 def register_device(device_token:, other_user_ids:) broadcast('@type' => 'registerDevice', 'device_token' => device_token, 'other_user_ids' => other_user_ids) end |
#register_user(first_name:, last_name:, disable_notification:) ⇒ TD::Types::Ok
Finishes user registration. Works only when the current authorization state is authorizationStateWaitRegistration.
6022 6023 6024 6025 6026 6027 |
# File 'lib/tdlib/client_methods.rb', line 6022 def register_user(first_name:, last_name:, disable_notification:) broadcast('@type' => 'registerUser', 'first_name' => first_name, 'last_name' => last_name, 'disable_notification' => disable_notification) end |
#remove_all_files_from_downloads(only_active:, only_completed:, delete_from_cache:) ⇒ TD::Types::Ok
Removes all files from the file download list.
6035 6036 6037 6038 6039 6040 |
# File 'lib/tdlib/client_methods.rb', line 6035 def remove_all_files_from_downloads(only_active:, only_completed:, delete_from_cache:) broadcast('@type' => 'removeAllFilesFromDownloads', 'only_active' => only_active, 'only_completed' => only_completed, 'delete_from_cache' => delete_from_cache) end |
#remove_business_connected_bot_from_chat(chat_id:) ⇒ TD::Types::Ok
Removes the connected business bot from a specific chat by adding the chat to businessRecipients.excluded_chat_ids.
6046 6047 6048 6049 |
# File 'lib/tdlib/client_methods.rb', line 6046 def remove_business_connected_bot_from_chat(chat_id:) broadcast('@type' => 'removeBusinessConnectedBotFromChat', 'chat_id' => chat_id) end |
#remove_chat_action_bar(chat_id:) ⇒ TD::Types::Ok
Removes a chat action bar without any other action.
6055 6056 6057 6058 |
# File 'lib/tdlib/client_methods.rb', line 6055 def (chat_id:) broadcast('@type' => 'removeChatActionBar', 'chat_id' => chat_id) end |
#remove_contacts(user_ids:) ⇒ TD::Types::Ok
Removes users from the contact list.
6064 6065 6066 6067 |
# File 'lib/tdlib/client_methods.rb', line 6064 def remove_contacts(user_ids:) broadcast('@type' => 'removeContacts', 'user_ids' => user_ids) end |
#remove_favorite_sticker(sticker:) ⇒ TD::Types::Ok
Removes a sticker from the list of favorite stickers.
6073 6074 6075 6076 |
# File 'lib/tdlib/client_methods.rb', line 6073 def remove_favorite_sticker(sticker:) broadcast('@type' => 'removeFavoriteSticker', 'sticker' => sticker) end |
#remove_file_from_downloads(file_id:, delete_from_cache:) ⇒ TD::Types::Ok
Removes a file from the file download list.
6083 6084 6085 6086 6087 |
# File 'lib/tdlib/client_methods.rb', line 6083 def remove_file_from_downloads(file_id:, delete_from_cache:) broadcast('@type' => 'removeFileFromDownloads', 'file_id' => file_id, 'delete_from_cache' => delete_from_cache) end |
#remove_installed_background(background_id:) ⇒ TD::Types::Ok
Removes background from the list of installed backgrounds.
6093 6094 6095 6096 |
# File 'lib/tdlib/client_methods.rb', line 6093 def remove_installed_background(background_id:) broadcast('@type' => 'removeInstalledBackground', 'background_id' => background_id) end |
#remove_message_reaction(chat_id:, message_id:, reaction_type:) ⇒ TD::Types::Ok
Removes a reaction from a message. A chosen reaction can always be removed.
6106 6107 6108 6109 6110 6111 |
# File 'lib/tdlib/client_methods.rb', line 6106 def (chat_id:, message_id:, reaction_type:) broadcast('@type' => 'removeMessageReaction', 'chat_id' => chat_id, 'message_id' => , 'reaction_type' => reaction_type) end |
#remove_notification(notification_group_id:, notification_id:) ⇒ TD::Types::Ok
Removes an active notification from notification list. Needs to be called only if the notification is removed by the current user.
6119 6120 6121 6122 6123 |
# File 'lib/tdlib/client_methods.rb', line 6119 def remove_notification(notification_group_id:, notification_id:) broadcast('@type' => 'removeNotification', 'notification_group_id' => notification_group_id, 'notification_id' => notification_id) end |
#remove_notification_group(notification_group_id:, max_notification_id:) ⇒ TD::Types::Ok
Removes a group of active notifications. Needs to be called only if the notification group is removed by the current user.
6131 6132 6133 6134 6135 |
# File 'lib/tdlib/client_methods.rb', line 6131 def remove_notification_group(notification_group_id:, max_notification_id:) broadcast('@type' => 'removeNotificationGroup', 'notification_group_id' => notification_group_id, 'max_notification_id' => max_notification_id) end |
#remove_pending_paid_message_reactions(chat_id:, message_id:) ⇒ TD::Types::Ok
Removes all pending paid reactions on a message. Can be called within 5 seconds after the last addPaidMessageReaction call.
6143 6144 6145 6146 6147 |
# File 'lib/tdlib/client_methods.rb', line 6143 def (chat_id:, message_id:) broadcast('@type' => 'removePendingPaidMessageReactions', 'chat_id' => chat_id, 'message_id' => ) end |
#remove_proxy(proxy_id:) ⇒ TD::Types::Ok
Removes a proxy server. Can be called before authorization.
6154 6155 6156 6157 |
# File 'lib/tdlib/client_methods.rb', line 6154 def remove_proxy(proxy_id:) broadcast('@type' => 'removeProxy', 'proxy_id' => proxy_id) end |
#remove_recent_hashtag(hashtag:) ⇒ TD::Types::Ok
Removes a hashtag from the list of recently used hashtags.
6163 6164 6165 6166 |
# File 'lib/tdlib/client_methods.rb', line 6163 def remove_recent_hashtag(hashtag:) broadcast('@type' => 'removeRecentHashtag', 'hashtag' => hashtag) end |
#remove_recent_sticker(is_attached:, sticker:) ⇒ TD::Types::Ok
Removes a sticker from the list of recently used stickers.
6174 6175 6176 6177 6178 |
# File 'lib/tdlib/client_methods.rb', line 6174 def remove_recent_sticker(is_attached:, sticker:) broadcast('@type' => 'removeRecentSticker', 'is_attached' => is_attached, 'sticker' => sticker) end |
#remove_recently_found_chat(chat_id:) ⇒ TD::Types::Ok
Removes a chat from the list of recently found chats.
6184 6185 6186 6187 |
# File 'lib/tdlib/client_methods.rb', line 6184 def remove_recently_found_chat(chat_id:) broadcast('@type' => 'removeRecentlyFoundChat', 'chat_id' => chat_id) end |
#remove_saved_animation(animation:) ⇒ TD::Types::Ok
Removes an animation from the list of saved animations.
6193 6194 6195 6196 |
# File 'lib/tdlib/client_methods.rb', line 6193 def remove_saved_animation(animation:) broadcast('@type' => 'removeSavedAnimation', 'animation' => animation) end |
#remove_saved_notification_sound(notification_sound_id:) ⇒ TD::Types::Ok
Removes a notification sound from the list of saved notification sounds.
6202 6203 6204 6205 |
# File 'lib/tdlib/client_methods.rb', line 6202 def remove_saved_notification_sound(notification_sound_id:) broadcast('@type' => 'removeSavedNotificationSound', 'notification_sound_id' => notification_sound_id) end |
#remove_searched_for_tag(tag:) ⇒ TD::Types::Ok
Removes a hashtag or a cashtag from the list of recently searched for hashtags or cashtags.
6211 6212 6213 6214 |
# File 'lib/tdlib/client_methods.rb', line 6211 def remove_searched_for_tag(tag:) broadcast('@type' => 'removeSearchedForTag', 'tag' => tag) end |
#remove_sticker_from_set(sticker:) ⇒ TD::Types::Ok
Removes a sticker from the set to which it belongs. The sticker set must be owned by the current user.
6221 6222 6223 6224 |
# File 'lib/tdlib/client_methods.rb', line 6221 def remove_sticker_from_set(sticker:) broadcast('@type' => 'removeStickerFromSet', 'sticker' => sticker) end |
#remove_top_chat(category:, chat_id:) ⇒ TD::Types::Ok
Removes a chat from the list of frequently used chats. Supported only if the chat info database is enabled.
6232 6233 6234 6235 6236 |
# File 'lib/tdlib/client_methods.rb', line 6232 def remove_top_chat(category:, chat_id:) broadcast('@type' => 'removeTopChat', 'category' => category, 'chat_id' => chat_id) end |
#reorder_active_usernames(usernames:) ⇒ TD::Types::Ok
Changes order of active usernames of the current user.
6243 6244 6245 6246 |
# File 'lib/tdlib/client_methods.rb', line 6243 def reorder_active_usernames(usernames:) broadcast('@type' => 'reorderActiveUsernames', 'usernames' => usernames) end |
#reorder_bot_active_usernames(bot_user_id:, usernames:) ⇒ TD::Types::Ok
Changes order of active usernames of a bot. Can be called only if userTypeBot.can_be_edited == true.
6255 6256 6257 6258 6259 |
# File 'lib/tdlib/client_methods.rb', line 6255 def reorder_bot_active_usernames(bot_user_id:, usernames:) broadcast('@type' => 'reorderBotActiveUsernames', 'bot_user_id' => bot_user_id, 'usernames' => usernames) end |
#reorder_bot_media_previews(bot_user_id:, language_code:, file_ids:) ⇒ TD::Types::Ok
Changes order of media previews in the list of media previews of a bot.
6268 6269 6270 6271 6272 6273 |
# File 'lib/tdlib/client_methods.rb', line 6268 def reorder_bot_media_previews(bot_user_id:, language_code:, file_ids:) broadcast('@type' => 'reorderBotMediaPreviews', 'bot_user_id' => bot_user_id, 'language_code' => language_code, 'file_ids' => file_ids) end |
#reorder_chat_folders(chat_folder_ids:, main_chat_list_position:) ⇒ TD::Types::Ok
Changes the order of chat folders.
6281 6282 6283 6284 6285 |
# File 'lib/tdlib/client_methods.rb', line 6281 def reorder_chat_folders(chat_folder_ids:, main_chat_list_position:) broadcast('@type' => 'reorderChatFolders', 'chat_folder_ids' => chat_folder_ids, 'main_chat_list_position' => main_chat_list_position) end |
#reorder_installed_sticker_sets(sticker_type:, sticker_set_ids:) ⇒ TD::Types::Ok
Changes the order of installed sticker sets.
6292 6293 6294 6295 6296 |
# File 'lib/tdlib/client_methods.rb', line 6292 def reorder_installed_sticker_sets(sticker_type:, sticker_set_ids:) broadcast('@type' => 'reorderInstalledStickerSets', 'sticker_type' => sticker_type, 'sticker_set_ids' => sticker_set_ids) end |
#reorder_quick_reply_shortcuts(shortcut_ids:) ⇒ TD::Types::Ok
Changes the order of quick reply shortcuts.
6302 6303 6304 6305 |
# File 'lib/tdlib/client_methods.rb', line 6302 def reorder_quick_reply_shortcuts(shortcut_ids:) broadcast('@type' => 'reorderQuickReplyShortcuts', 'shortcut_ids' => shortcut_ids) end |
#reorder_supergroup_active_usernames(supergroup_id:, usernames:) ⇒ TD::Types::Ok
Changes order of active usernames of a supergroup or channel, requires owner privileges in the supergroup or
channel.
6314 6315 6316 6317 6318 |
# File 'lib/tdlib/client_methods.rb', line 6314 def reorder_supergroup_active_usernames(supergroup_id:, usernames:) broadcast('@type' => 'reorderSupergroupActiveUsernames', 'supergroup_id' => supergroup_id, 'usernames' => usernames) end |
#replace_primary_chat_invite_link(chat_id:) ⇒ TD::Types::ChatInviteLink
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.
6326 6327 6328 6329 |
# File 'lib/tdlib/client_methods.rb', line 6326 def replace_primary_chat_invite_link(chat_id:) broadcast('@type' => 'replacePrimaryChatInviteLink', 'chat_id' => chat_id) end |
#replace_sticker_in_set(user_id:, name:, old_sticker:, new_sticker:) ⇒ TD::Types::Ok
Replaces existing sticker in a set. The function is equivalent to removeStickerFromSet, then addStickerToSet, then setStickerPositionInSet.
6340 6341 6342 6343 6344 6345 6346 |
# File 'lib/tdlib/client_methods.rb', line 6340 def replace_sticker_in_set(user_id:, name:, old_sticker:, new_sticker:) broadcast('@type' => 'replaceStickerInSet', 'user_id' => user_id, 'name' => name, 'old_sticker' => old_sticker, 'new_sticker' => new_sticker) end |
#replace_video_chat_rtmp_url(chat_id:) ⇒ TD::Types::RtmpUrl
Replaces the current RTMP URL for streaming to the chat; requires owner privileges.
6352 6353 6354 6355 |
# File 'lib/tdlib/client_methods.rb', line 6352 def replace_video_chat_rtmp_url(chat_id:) broadcast('@type' => 'replaceVideoChatRtmpUrl', 'chat_id' => chat_id) end |
#report_authentication_code_missing(mobile_network_code:) ⇒ TD::Types::Ok
Reports that authentication code wasn’t delivered via SMS; for official mobile applications only. Works only when the current authorization state is authorizationStateWaitCode.
6362 6363 6364 6365 |
# File 'lib/tdlib/client_methods.rb', line 6362 def report_authentication_code_missing(mobile_network_code:) broadcast('@type' => 'reportAuthenticationCodeMissing', 'mobile_network_code' => mobile_network_code) end |
#report_chat(chat_id:, message_ids: nil, reason:, text:) ⇒ TD::Types::Ok
Reports a chat to the Telegram moderators. A chat can be reported only from the chat action bar, or if chat.can_be_reported.
6376 6377 6378 6379 6380 6381 6382 |
# File 'lib/tdlib/client_methods.rb', line 6376 def report_chat(chat_id:, message_ids: nil, reason:, text:) broadcast('@type' => 'reportChat', 'chat_id' => chat_id, 'message_ids' => , 'reason' => reason, 'text' => text) end |
#report_chat_photo(chat_id:, file_id:, reason:, text:) ⇒ TD::Types::Ok
Reports a chat photo to the Telegram moderators. A chat photo can be reported only if chat.can_be_reported.
6393 6394 6395 6396 6397 6398 6399 |
# File 'lib/tdlib/client_methods.rb', line 6393 def report_chat_photo(chat_id:, file_id:, reason:, text:) broadcast('@type' => 'reportChatPhoto', 'chat_id' => chat_id, 'file_id' => file_id, 'reason' => reason, 'text' => text) end |
#report_chat_sponsored_message(chat_id:, message_id:, option_id: nil) ⇒ TD::Types::ReportChatSponsoredMessageResult
Reports a sponsored message to Telegram moderators.
6407 6408 6409 6410 6411 6412 |
# File 'lib/tdlib/client_methods.rb', line 6407 def (chat_id:, message_id:, option_id: nil) broadcast('@type' => 'reportChatSponsoredMessage', 'chat_id' => chat_id, 'message_id' => , 'option_id' => option_id) end |
#report_message_reactions(chat_id:, message_id:, sender_id:) ⇒ TD::Types::Ok
Reports reactions set on a message to the Telegram moderators. Reactions on a message can be reported only if messageProperties.can_report_reactions.
6421 6422 6423 6424 6425 6426 |
# File 'lib/tdlib/client_methods.rb', line 6421 def (chat_id:, message_id:, sender_id:) broadcast('@type' => 'reportMessageReactions', 'chat_id' => chat_id, 'message_id' => , 'sender_id' => sender_id) end |
#report_phone_number_code_missing(mobile_network_code:) ⇒ TD::Types::Ok
Reports that authentication code wasn’t delivered via SMS to the specified phone number; for official mobile
applications only.
6433 6434 6435 6436 |
# File 'lib/tdlib/client_methods.rb', line 6433 def report_phone_number_code_missing(mobile_network_code:) broadcast('@type' => 'reportPhoneNumberCodeMissing', 'mobile_network_code' => mobile_network_code) end |
#report_story(story_sender_chat_id:, story_id:, reason:, text:) ⇒ TD::Types::Ok
Reports a story to the Telegram moderators.
6445 6446 6447 6448 6449 6450 6451 |
# File 'lib/tdlib/client_methods.rb', line 6445 def report_story(story_sender_chat_id:, story_id:, reason:, text:) broadcast('@type' => 'reportStory', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id, 'reason' => reason, 'text' => text) end |
#report_supergroup_anti_spam_false_positive(supergroup_id:, message_id:) ⇒ TD::Types::Ok
Reports a false deletion of a message by aggressive anti-spam checks; requires administrator rights in the
supergroup.
Can be called only for messages from chatEventMessageDeleted with can_report_anti_spam_false_positive == true.
6460 6461 6462 6463 6464 |
# File 'lib/tdlib/client_methods.rb', line 6460 def report_supergroup_anti_spam_false_positive(supergroup_id:, message_id:) broadcast('@type' => 'reportSupergroupAntiSpamFalsePositive', 'supergroup_id' => supergroup_id, 'message_id' => ) end |
#report_supergroup_spam(supergroup_id:, message_ids:) ⇒ TD::Types::Ok
Reports messages in a supergroup as spam; requires administrator rights in the supergroup.
6472 6473 6474 6475 6476 |
# File 'lib/tdlib/client_methods.rb', line 6472 def report_supergroup_spam(supergroup_id:, message_ids:) broadcast('@type' => 'reportSupergroupSpam', 'supergroup_id' => supergroup_id, 'message_ids' => ) end |
#request_authentication_password_recovery ⇒ TD::Types::Ok
Requests to send a 2-step verification password recovery code to an email address that was previously set up. Works only when the current authorization state is authorizationStateWaitPassword.
6482 6483 6484 |
# File 'lib/tdlib/client_methods.rb', line 6482 def request_authentication_password_recovery broadcast('@type' => 'requestAuthenticationPasswordRecovery') end |
#request_password_recovery ⇒ TD::Types::EmailAddressAuthenticationCodeInfo
Requests to send a 2-step verification password recovery code to an email address that was previously set up.
6489 6490 6491 |
# File 'lib/tdlib/client_methods.rb', line 6489 def request_password_recovery broadcast('@type' => 'requestPasswordRecovery') end |
#request_qr_code_authentication(other_user_ids:) ⇒ TD::Types::Ok
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 state is ,
, , , or
.
6501 6502 6503 6504 |
# File 'lib/tdlib/client_methods.rb', line 6501 def request_qr_code_authentication(other_user_ids:) broadcast('@type' => 'requestQrCodeAuthentication', 'other_user_ids' => other_user_ids) end |
#resend_authentication_code(reason:) ⇒ TD::Types::Ok
Resends 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, or when the current state is
.
6513 6514 6515 6516 |
# File 'lib/tdlib/client_methods.rb', line 6513 def resend_authentication_code(reason:) broadcast('@type' => 'resendAuthenticationCode', 'reason' => reason) end |
#resend_email_address_verification_code ⇒ TD::Types::EmailAddressAuthenticationCodeInfo
Resends the code to verify an email address to be added to a user’s Telegram Passport.
6521 6522 6523 |
# File 'lib/tdlib/client_methods.rb', line 6521 def resend_email_address_verification_code broadcast('@type' => 'resendEmailAddressVerificationCode') end |
#resend_login_email_address_code ⇒ TD::Types::EmailAddressAuthenticationCodeInfo
Resends the login email address verification code.
6528 6529 6530 |
# File 'lib/tdlib/client_methods.rb', line 6528 def resend_login_email_address_code broadcast('@type' => 'resendLoginEmailAddressCode') end |
#resend_messages(chat_id:, message_ids:, quote:) ⇒ TD::Types::Messages
Resends messages which failed to send. Can be called only for messages for which messageSendingStateFailed.can_retry is true and after specified in
.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.
6546 6547 6548 6549 6550 6551 |
# File 'lib/tdlib/client_methods.rb', line 6546 def (chat_id:, message_ids:, quote:) broadcast('@type' => 'resendMessages', 'chat_id' => chat_id, 'message_ids' => , 'quote' => quote) end |
#resend_phone_number_code(reason:) ⇒ TD::Types::AuthenticationCodeInfo
Resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified
timeout has passed.
6559 6560 6561 6562 |
# File 'lib/tdlib/client_methods.rb', line 6559 def resend_phone_number_code(reason:) broadcast('@type' => 'resendPhoneNumberCode', 'reason' => reason) end |
#resend_recovery_email_address_code ⇒ TD::Types::PasswordState
Resends the 2-step verification recovery email address verification code.
6567 6568 6569 |
# File 'lib/tdlib/client_methods.rb', line 6567 def resend_recovery_email_address_code broadcast('@type' => 'resendRecoveryEmailAddressCode') end |
#reset_all_notification_settings ⇒ TD::Types::Ok
Resets all chat and scope notification settings to their default values. By default, all chats are unmuted and message previews are shown.
6575 6576 6577 |
# File 'lib/tdlib/client_methods.rb', line 6575 def reset_all_notification_settings broadcast('@type' => 'resetAllNotificationSettings') end |
#reset_authentication_email_address ⇒ TD::Types::Ok
Resets the login email address. May return an error with a message “TASK_ALREADY_EXISTS” if reset is still pending. Works only when the current authorization state is authorizationStateWaitEmailCode and
.can_reset_email_address == true.
6585 6586 6587 |
# File 'lib/tdlib/client_methods.rb', line 6585 def reset_authentication_email_address broadcast('@type' => 'resetAuthenticationEmailAddress') end |
#reset_installed_backgrounds ⇒ TD::Types::Ok
Resets list of installed backgrounds to its default value.
6592 6593 6594 |
# File 'lib/tdlib/client_methods.rb', line 6592 def reset_installed_backgrounds broadcast('@type' => 'resetInstalledBackgrounds') end |
#reset_network_statistics ⇒ TD::Types::Ok
Resets all network data usage statistics to zero. Can be called before authorization.
6600 6601 6602 |
# File 'lib/tdlib/client_methods.rb', line 6600 def reset_network_statistics broadcast('@type' => 'resetNetworkStatistics') end |
#reset_password ⇒ TD::Types::ResetPasswordResult
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.
6608 6609 6610 |
# File 'lib/tdlib/client_methods.rb', line 6608 def reset_password broadcast('@type' => 'resetPassword') end |
#reuse_star_subscription(subscription_id:) ⇒ TD::Types::Ok
Reuses an active subscription and joins the subscribed chat again.
6616 6617 6618 6619 |
# File 'lib/tdlib/client_methods.rb', line 6616 def reuse_star_subscription(subscription_id:) broadcast('@type' => 'reuseStarSubscription', 'subscription_id' => subscription_id) end |
#revoke_chat_invite_link(chat_id:, invite_link:) ⇒ TD::Types::ChatInviteLinks
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.
6630 6631 6632 6633 6634 |
# File 'lib/tdlib/client_methods.rb', line 6630 def revoke_chat_invite_link(chat_id:, invite_link:) broadcast('@type' => 'revokeChatInviteLink', 'chat_id' => chat_id, 'invite_link' => invite_link) end |
#revoke_group_call_invite_link(group_call_id:) ⇒ TD::Types::Ok
Revokes invite link for a group call. Requires groupCall.can_be_managed group call flag.
6641 6642 6643 6644 |
# File 'lib/tdlib/client_methods.rb', line 6641 def revoke_group_call_invite_link(group_call_id:) broadcast('@type' => 'revokeGroupCallInviteLink', 'group_call_id' => group_call_id) end |
#save_application_log_event(type:, chat_id:, data:) ⇒ TD::Types::Ok
Saves application log event on the server. Can be called before authorization.
6653 6654 6655 6656 6657 6658 |
# File 'lib/tdlib/client_methods.rb', line 6653 def save_application_log_event(type:, chat_id:, data:) broadcast('@type' => 'saveApplicationLogEvent', 'type' => type, 'chat_id' => chat_id, 'data' => data) end |
#search_background(name:) ⇒ TD::Types::Background
Searches for a background by its name.
6664 6665 6666 6667 |
# File 'lib/tdlib/client_methods.rb', line 6664 def search_background(name:) broadcast('@type' => 'searchBackground', 'name' => name) end |
#search_call_messages(offset:, limit:, only_missed:) ⇒ TD::Types::FoundMessages
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.
6680 6681 6682 6683 6684 6685 |
# File 'lib/tdlib/client_methods.rb', line 6680 def (offset:, limit:, only_missed:) broadcast('@type' => 'searchCallMessages', 'offset' => offset, 'limit' => limit, 'only_missed' => only_missed) end |
#search_chat_members(chat_id:, query:, limit:, filter:) ⇒ TD::Types::ChatMembers
Searches for a specified query in the first name, last name and usernames of the members of a specified chat. Requires administrator rights if the chat is a channel.
6696 6697 6698 6699 6700 6701 6702 |
# File 'lib/tdlib/client_methods.rb', line 6696 def search_chat_members(chat_id:, query:, limit:, filter:) broadcast('@type' => 'searchChatMembers', 'chat_id' => chat_id, 'query' => query, 'limit' => limit, 'filter' => filter) end |
#search_chat_messages(chat_id:, query:, sender_id:, from_message_id:, offset:, limit:, filter:, message_thread_id:, saved_messages_topic_id:) ⇒ TD::Types::FoundChatMessages
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 database.
For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified
limit.
A combination of query, sender_id, filter and message_thread_id search criteria is expected to be supported, only
if it is required for Telegram official application implementation.
6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 |
# File 'lib/tdlib/client_methods.rb', line 6735 def (chat_id:, query:, sender_id:, from_message_id:, offset:, limit:, filter:, message_thread_id:, saved_messages_topic_id:) broadcast('@type' => 'searchChatMessages', 'chat_id' => chat_id, 'query' => query, 'sender_id' => sender_id, 'from_message_id' => , 'offset' => offset, 'limit' => limit, 'filter' => filter, 'message_thread_id' => , 'saved_messages_topic_id' => ) end |
#search_chat_recent_location_messages(chat_id:, limit:) ⇒ TD::Types::Messages
Returns information about the recent locations of chat members that were sent to the chat. Returns up to 1 location message per user.
6755 6756 6757 6758 6759 |
# File 'lib/tdlib/client_methods.rb', line 6755 def (chat_id:, limit:) broadcast('@type' => 'searchChatRecentLocationMessages', 'chat_id' => chat_id, 'limit' => limit) end |
#search_chats(query:, limit:) ⇒ TD::Types::Chats
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.
6768 6769 6770 6771 6772 |
# File 'lib/tdlib/client_methods.rb', line 6768 def search_chats(query:, limit:) broadcast('@type' => 'searchChats', 'query' => query, 'limit' => limit) end |
#search_chats_nearby(location:) ⇒ TD::Types::ChatsNearby
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.
6780 6781 6782 6783 |
# File 'lib/tdlib/client_methods.rb', line 6780 def search_chats_nearby(location:) broadcast('@type' => 'searchChatsNearby', 'location' => location) end |
#search_chats_on_server(query:, limit:) ⇒ TD::Types::Chats
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.
6791 6792 6793 6794 6795 |
# File 'lib/tdlib/client_methods.rb', line 6791 def search_chats_on_server(query:, limit:) broadcast('@type' => 'searchChatsOnServer', 'query' => query, 'limit' => limit) end |
#search_contacts(query: nil, limit:) ⇒ TD::Types::Users
Searches for the specified query in the first names, last names and usernames of the known user contacts.
6802 6803 6804 6805 6806 |
# File 'lib/tdlib/client_methods.rb', line 6802 def search_contacts(query: nil, limit:) broadcast('@type' => 'searchContacts', 'query' => query, 'limit' => limit) end |
#search_emojis(text:, input_language_codes: nil) ⇒ TD::Types::EmojiKeywords
Searches for emojis by keywords. Supported only if the file database is enabled. Order of results is unspecified.
6816 6817 6818 6819 6820 |
# File 'lib/tdlib/client_methods.rb', line 6816 def search_emojis(text:, input_language_codes: nil) broadcast('@type' => 'searchEmojis', 'text' => text, 'input_language_codes' => input_language_codes) end |
#search_file_downloads(query: nil, only_active:, only_completed:, offset:, limit:) ⇒ TD::Types::FoundFileDownloads
Searches for files in the file download list or recently downloaded files from the list.
6831 6832 6833 6834 6835 6836 6837 6838 |
# File 'lib/tdlib/client_methods.rb', line 6831 def search_file_downloads(query: nil, only_active:, only_completed:, offset:, limit:) broadcast('@type' => 'searchFileDownloads', 'query' => query, 'only_active' => only_active, 'only_completed' => only_completed, 'offset' => offset, 'limit' => limit) end |
#search_hashtags(prefix:, limit:) ⇒ TD::Types::Hashtags
Searches for recently used hashtags by their prefix.
6845 6846 6847 6848 6849 |
# File 'lib/tdlib/client_methods.rb', line 6845 def (prefix:, limit:) broadcast('@type' => 'searchHashtags', 'prefix' => prefix, 'limit' => limit) end |
#search_installed_sticker_sets(sticker_type:, query:, limit:) ⇒ TD::Types::StickerSets
Searches for installed sticker sets by looking for specified query in their title and name.
6857 6858 6859 6860 6861 6862 |
# File 'lib/tdlib/client_methods.rb', line 6857 def search_installed_sticker_sets(sticker_type:, query:, limit:) broadcast('@type' => 'searchInstalledStickerSets', 'sticker_type' => sticker_type, 'query' => query, 'limit' => limit) end |
#search_messages(chat_list:, only_in_channels:, query:, offset:, limit:, filter:, min_date:, max_date:) ⇒ TD::Types::FoundMessages
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.
6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 |
# File 'lib/tdlib/client_methods.rb', line 6886 def (chat_list:, only_in_channels:, query:, offset:, limit:, filter:, min_date:, max_date:) broadcast('@type' => 'searchMessages', 'chat_list' => chat_list, 'only_in_channels' => only_in_channels, 'query' => query, 'offset' => offset, 'limit' => limit, 'filter' => filter, 'min_date' => min_date, 'max_date' => max_date) end |
#search_outgoing_document_messages(query:, limit:) ⇒ TD::Types::FoundMessages
Searches for outgoing messages with content of the type messageDocument in all chats except secret chats. Returns the results in reverse chronological order.
6904 6905 6906 6907 6908 |
# File 'lib/tdlib/client_methods.rb', line 6904 def (query:, limit:) broadcast('@type' => 'searchOutgoingDocumentMessages', 'query' => query, 'limit' => limit) end |
#search_public_chat(username:) ⇒ TD::Types::Chat
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.
6916 6917 6918 6919 |
# File 'lib/tdlib/client_methods.rb', line 6916 def search_public_chat(username:) broadcast('@type' => 'searchPublicChat', 'username' => username) end |
#search_public_chats(query:) ⇒ TD::Types::Chats
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.
6928 6929 6930 6931 |
# File 'lib/tdlib/client_methods.rb', line 6928 def search_public_chats(query:) broadcast('@type' => 'searchPublicChats', 'query' => query) end |
#search_public_messages_by_tag(tag:, offset:, limit:) ⇒ TD::Types::FoundMessages
Searches for public channel posts containing the given hashtag or cashtag. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified
limit.
6944 6945 6946 6947 6948 6949 |
# File 'lib/tdlib/client_methods.rb', line 6944 def (tag:, offset:, limit:) broadcast('@type' => 'searchPublicMessagesByTag', 'tag' => tag, 'offset' => offset, 'limit' => limit) end |
#search_public_stories_by_location(address:, offset:, limit:) ⇒ TD::Types::FoundStories
Searches for public stories by the given address location. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified
limit.
6962 6963 6964 6965 6966 6967 |
# File 'lib/tdlib/client_methods.rb', line 6962 def search_public_stories_by_location(address:, offset:, limit:) broadcast('@type' => 'searchPublicStoriesByLocation', 'address' => address, 'offset' => offset, 'limit' => limit) end |
#search_public_stories_by_tag(tag:, offset:, limit:) ⇒ TD::Types::FoundStories
Searches for public stories containing the given hashtag or cashtag. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified
limit.
6980 6981 6982 6983 6984 6985 |
# File 'lib/tdlib/client_methods.rb', line 6980 def search_public_stories_by_tag(tag:, offset:, limit:) broadcast('@type' => 'searchPublicStoriesByTag', 'tag' => tag, 'offset' => offset, 'limit' => limit) end |
#search_public_stories_by_venue(venue_provider:, venue_id:, offset:, limit:) ⇒ TD::Types::FoundStories
Searches for public stories from the given venue. For optimal performance, the number of returned stories is chosen by TDLib and can be smaller than the specified
limit.
6999 7000 7001 7002 7003 7004 7005 |
# File 'lib/tdlib/client_methods.rb', line 6999 def search_public_stories_by_venue(venue_provider:, venue_id:, offset:, limit:) broadcast('@type' => 'searchPublicStoriesByVenue', 'venue_provider' => venue_provider, 'venue_id' => venue_id, 'offset' => offset, 'limit' => limit) end |
#search_quote(text:, quote:, quote_position:) ⇒ TD::Types::FoundPosition
Searches for a given quote in a text. Returns found quote start position in UTF-16 code units. Returns a 404 error if the quote is not found. Can be called synchronously.
7016 7017 7018 7019 7020 7021 |
# File 'lib/tdlib/client_methods.rb', line 7016 def search_quote(text:, quote:, quote_position:) broadcast('@type' => 'searchQuote', 'text' => text, 'quote' => quote, 'quote_position' => quote_position) end |
#search_recently_found_chats(query:, limit:) ⇒ TD::Types::Chats
Searches for the specified query in the title and username of up to 50 recently found chats; this is an offline
request.
7029 7030 7031 7032 7033 |
# File 'lib/tdlib/client_methods.rb', line 7029 def search_recently_found_chats(query:, limit:) broadcast('@type' => 'searchRecentlyFoundChats', 'query' => query, 'limit' => limit) end |
#search_saved_messages(saved_messages_topic_id:, tag:, query:, from_message_id:, offset:, limit:) ⇒ TD::Types::FoundChatMessages
Searches for messages tagged by the given reaction and with the given words in the Saved Messages chat; for
Telegram Premium users only.
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 and
can be smaller than the specified limit.
7055 7056 7057 7058 7059 7060 7061 7062 7063 |
# File 'lib/tdlib/client_methods.rb', line 7055 def (saved_messages_topic_id:, tag:, query:, from_message_id:, offset:, limit:) broadcast('@type' => 'searchSavedMessages', 'saved_messages_topic_id' => , 'tag' => tag, 'query' => query, 'from_message_id' => , 'offset' => offset, 'limit' => limit) end |
#search_secret_messages(chat_id:, query:, offset:, limit:, filter:) ⇒ TD::Types::FoundMessages
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.
7081 7082 7083 7084 7085 7086 7087 7088 |
# File 'lib/tdlib/client_methods.rb', line 7081 def (chat_id:, query:, offset:, limit:, filter:) broadcast('@type' => 'searchSecretMessages', 'chat_id' => chat_id, 'query' => query, 'offset' => offset, 'limit' => limit, 'filter' => filter) end |
#search_sticker_set(name:) ⇒ TD::Types::StickerSet
Searches for a sticker set by its name.
7094 7095 7096 7097 |
# File 'lib/tdlib/client_methods.rb', line 7094 def search_sticker_set(name:) broadcast('@type' => 'searchStickerSet', 'name' => name) end |
#search_sticker_sets(sticker_type:, query:) ⇒ TD::Types::StickerSets
Searches for sticker sets by looking for specified query in their title and name. Excludes installed sticker sets from the results.
7105 7106 7107 7108 7109 |
# File 'lib/tdlib/client_methods.rb', line 7105 def search_sticker_sets(sticker_type:, query:) broadcast('@type' => 'searchStickerSets', 'sticker_type' => sticker_type, 'query' => query) end |
#search_stickers(sticker_type: nil, emojis:, limit: nil) ⇒ TD::Types::Stickers
Searches for stickers from public sticker sets that correspond to any of the given emoji.
7117 7118 7119 7120 7121 7122 |
# File 'lib/tdlib/client_methods.rb', line 7117 def search_stickers(sticker_type: nil, emojis:, limit: nil) broadcast('@type' => 'searchStickers', 'sticker_type' => sticker_type, 'emojis' => emojis, 'limit' => limit) end |
#search_strings_by_prefix(strings:, query:, limit:, return_none_for_empty_query:) ⇒ TD::Types::FoundPositions
Searches specified query by word prefixes in the provided strings. Returns 0-based positions of strings that matched. Can be called synchronously.
7133 7134 7135 7136 7137 7138 7139 |
# File 'lib/tdlib/client_methods.rb', line 7133 def search_strings_by_prefix(strings:, query:, limit:, return_none_for_empty_query:) broadcast('@type' => 'searchStringsByPrefix', 'strings' => strings, 'query' => query, 'limit' => limit, 'return_none_for_empty_query' => return_none_for_empty_query) end |
#search_user_by_phone_number(phone_number:, only_local:) ⇒ TD::Types::User
Searches a user by their phone number. Returns a 404 error if the user can’t be found.
7147 7148 7149 7150 7151 |
# File 'lib/tdlib/client_methods.rb', line 7147 def search_user_by_phone_number(phone_number:, only_local:) broadcast('@type' => 'searchUserByPhoneNumber', 'phone_number' => phone_number, 'only_local' => only_local) end |
#search_user_by_token(token:) ⇒ TD::Types::User
Searches a user by a token from the user’s link.
7157 7158 7159 7160 |
# File 'lib/tdlib/client_methods.rb', line 7157 def search_user_by_token(token:) broadcast('@type' => 'searchUserByToken', 'token' => token) end |
#search_web_app(bot_user_id:, web_app_short_name:) ⇒ TD::Types::FoundWebApp
Returns information about a Web App by its short name. Returns a 404 error if the Web App is not found.
7168 7169 7170 7171 7172 |
# File 'lib/tdlib/client_methods.rb', line 7168 def search_web_app(bot_user_id:, web_app_short_name:) broadcast('@type' => 'searchWebApp', 'bot_user_id' => bot_user_id, 'web_app_short_name' => web_app_short_name) end |
#send_authentication_firebase_sms(token:) ⇒ TD::Types::Ok
Sends Firebase Authentication SMS to the phone number of the user. Works only when the current authorization state is authorizationStateWaitCode and the server returned code of the
type authenticationCodeTypeFirebaseAndroid or authenticationCodeTypeFirebaseIos.
7181 7182 7183 7184 |
# File 'lib/tdlib/client_methods.rb', line 7181 def send_authentication_firebase_sms(token:) broadcast('@type' => 'sendAuthenticationFirebaseSms', 'token' => token) end |
#send_bot_start_message(bot_user_id:, chat_id:, parameter:) ⇒ TD::Types::Message
Invites a bot to a chat (if it is not yet a member) and sends it the /start command; requires can_invite_users
member right.
Bots can’t be invited to a private chat other than the chat with the bot. Bots can’t be invited to channels (although they can be added as admins) and secret chats. Returns the sent message.
7197 7198 7199 7200 7201 7202 |
# File 'lib/tdlib/client_methods.rb', line 7197 def (bot_user_id:, chat_id:, parameter:) broadcast('@type' => 'sendBotStartMessage', 'bot_user_id' => bot_user_id, 'chat_id' => chat_id, 'parameter' => parameter) end |
#send_business_message(business_connection_id:, chat_id:, reply_to:, disable_notification:, protect_content:, effect_id:, reply_markup:, input_message_content:) ⇒ TD::Types::BusinessMessage
Sends a message on behalf of a business account; for bots only. Returns the message after it was sent.
7218 7219 7220 7221 7222 7223 7224 7225 7226 7227 7228 7229 |
# File 'lib/tdlib/client_methods.rb', line 7218 def (business_connection_id:, chat_id:, reply_to:, disable_notification:, protect_content:, effect_id:, reply_markup:, input_message_content:) broadcast('@type' => 'sendBusinessMessage', 'business_connection_id' => business_connection_id, 'chat_id' => chat_id, 'reply_to' => reply_to, 'disable_notification' => disable_notification, 'protect_content' => protect_content, 'effect_id' => effect_id, 'reply_markup' => reply_markup, 'input_message_content' => ) end |
#send_business_message_album(business_connection_id:, chat_id:, reply_to:, disable_notification:, protect_content:, effect_id:, input_message_contents:) ⇒ TD::Types::BusinessMessages
Sends 2-10 messages grouped together into an album on behalf of a business account; for bots only. 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.
7248 7249 7250 7251 7252 7253 7254 7255 7256 7257 7258 |
# File 'lib/tdlib/client_methods.rb', line 7248 def (business_connection_id:, chat_id:, reply_to:, disable_notification:, protect_content:, effect_id:, input_message_contents:) broadcast('@type' => 'sendBusinessMessageAlbum', 'business_connection_id' => business_connection_id, 'chat_id' => chat_id, 'reply_to' => reply_to, 'disable_notification' => disable_notification, 'protect_content' => protect_content, 'effect_id' => effect_id, 'input_message_contents' => ) end |
#send_call_debug_information(call_id:, debug_information:) ⇒ TD::Types::Ok
Sends debug information for a call to Telegram servers.
7265 7266 7267 7268 7269 |
# File 'lib/tdlib/client_methods.rb', line 7265 def send_call_debug_information(call_id:, debug_information:) broadcast('@type' => 'sendCallDebugInformation', 'call_id' => call_id, 'debug_information' => debug_information) end |
#send_call_log(call_id:, log_file:) ⇒ TD::Types::Ok
Sends log file for a call to Telegram servers.
7277 7278 7279 7280 7281 |
# File 'lib/tdlib/client_methods.rb', line 7277 def send_call_log(call_id:, log_file:) broadcast('@type' => 'sendCallLog', 'call_id' => call_id, 'log_file' => log_file) end |
#send_call_rating(call_id:, rating:, comment:, problems:) ⇒ TD::Types::Ok
Sends a call rating.
7291 7292 7293 7294 7295 7296 7297 |
# File 'lib/tdlib/client_methods.rb', line 7291 def (call_id:, rating:, comment:, problems:) broadcast('@type' => 'sendCallRating', 'call_id' => call_id, 'rating' => , 'comment' => comment, 'problems' => problems) end |
#send_call_signaling_data(call_id:, data:) ⇒ TD::Types::Ok
Sends call signaling data.
7304 7305 7306 7307 7308 |
# File 'lib/tdlib/client_methods.rb', line 7304 def send_call_signaling_data(call_id:, data:) broadcast('@type' => 'sendCallSignalingData', 'call_id' => call_id, 'data' => data) end |
#send_chat_action(chat_id:, message_thread_id:, business_connection_id:, action:) ⇒ TD::Types::Ok
Sends a notification about user activity in a chat.
7318 7319 7320 7321 7322 7323 7324 |
# File 'lib/tdlib/client_methods.rb', line 7318 def send_chat_action(chat_id:, message_thread_id:, business_connection_id:, action:) broadcast('@type' => 'sendChatAction', 'chat_id' => chat_id, 'message_thread_id' => , 'business_connection_id' => business_connection_id, 'action' => action) end |
#send_custom_request(method:, parameters:) ⇒ TD::Types::CustomRequestResult
Sends a custom request; for bots only.
7331 7332 7333 7334 7335 |
# File 'lib/tdlib/client_methods.rb', line 7331 def send_custom_request(method:, parameters:) broadcast('@type' => 'sendCustomRequest', 'method' => method, 'parameters' => parameters) end |
#send_email_address_verification_code(email_address:) ⇒ TD::Types::EmailAddressAuthenticationCodeInfo
Sends a code to verify an email address to be added to a user’s Telegram Passport.
7341 7342 7343 7344 |
# File 'lib/tdlib/client_methods.rb', line 7341 def send_email_address_verification_code(email_address:) broadcast('@type' => 'sendEmailAddressVerificationCode', 'email_address' => email_address) end |
#send_inline_query_result_message(chat_id:, message_thread_id:, reply_to:, options:, query_id:, result_id:, hide_via_bot:) ⇒ TD::Types::Message
Sends the result of an inline query as a message. Returns the sent message. Always clears a chat draft message.
7362 7363 7364 7365 7366 7367 7368 7369 7370 7371 7372 |
# File 'lib/tdlib/client_methods.rb', line 7362 def (chat_id:, message_thread_id:, reply_to:, options:, query_id:, result_id:, hide_via_bot:) broadcast('@type' => 'sendInlineQueryResultMessage', 'chat_id' => chat_id, 'message_thread_id' => , 'reply_to' => reply_to, 'options' => , 'query_id' => query_id, 'result_id' => result_id, 'hide_via_bot' => hide_via_bot) end |
#send_message(chat_id:, message_thread_id:, reply_to:, options:, reply_markup:, input_message_content:) ⇒ TD::Types::Message
Sends a message. Returns the sent message.
7386 7387 7388 7389 7390 7391 7392 7393 7394 |
# File 'lib/tdlib/client_methods.rb', line 7386 def (chat_id:, message_thread_id:, reply_to:, options:, reply_markup:, input_message_content:) broadcast('@type' => 'sendMessage', 'chat_id' => chat_id, 'message_thread_id' => , 'reply_to' => reply_to, 'options' => , 'reply_markup' => reply_markup, 'input_message_content' => ) end |
#send_message_album(chat_id:, message_thread_id:, reply_to:, options:, input_message_contents:) ⇒ TD::Types::Messages
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.
7411 7412 7413 7414 7415 7416 7417 7418 |
# File 'lib/tdlib/client_methods.rb', line 7411 def (chat_id:, message_thread_id:, reply_to:, options:, input_message_contents:) broadcast('@type' => 'sendMessageAlbum', 'chat_id' => chat_id, 'message_thread_id' => , 'reply_to' => reply_to, 'options' => , 'input_message_contents' => ) end |
#send_passport_authorization_form(authorization_form_id:, types:) ⇒ TD::Types::Ok
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.
7428 7429 7430 7431 7432 |
# File 'lib/tdlib/client_methods.rb', line 7428 def (authorization_form_id:, types:) broadcast('@type' => 'sendPassportAuthorizationForm', 'authorization_form_id' => , 'types' => types) end |
#send_payment_form(input_invoice:, payment_form_id:, order_info_id:, shipping_option_id:, credentials:, tip_amount:) ⇒ TD::Types::PaymentResult
Sends a filled-out payment form to the bot for final verification.
7444 7445 7446 7447 7448 7449 7450 7451 7452 |
# File 'lib/tdlib/client_methods.rb', line 7444 def send_payment_form(input_invoice:, payment_form_id:, order_info_id:, shipping_option_id:, credentials:, tip_amount:) broadcast('@type' => 'sendPaymentForm', 'input_invoice' => input_invoice, 'payment_form_id' => payment_form_id, 'order_info_id' => order_info_id, 'shipping_option_id' => shipping_option_id, 'credentials' => credentials, 'tip_amount' => tip_amount) end |
#send_phone_number_code(phone_number:, settings:, type:) ⇒ TD::Types::AuthenticationCodeInfo
Sends a code to the specified phone number. Aborts previous phone number verification if there was one. On success, returns information about the sent code.
7463 7464 7465 7466 7467 7468 |
# File 'lib/tdlib/client_methods.rb', line 7463 def send_phone_number_code(phone_number:, settings:, type:) broadcast('@type' => 'sendPhoneNumberCode', 'phone_number' => phone_number, 'settings' => settings, 'type' => type) end |
#send_phone_number_firebase_sms(token:) ⇒ TD::Types::Ok
Sends Firebase Authentication SMS to the specified phone number. Works only when received a code of the type authenticationCodeTypeFirebaseAndroid or
authenticationCodeTypeFirebaseIos.
7477 7478 7479 7480 |
# File 'lib/tdlib/client_methods.rb', line 7477 def send_phone_number_firebase_sms(token:) broadcast('@type' => 'sendPhoneNumberFirebaseSms', 'token' => token) end |
#send_quick_reply_shortcut_messages(chat_id:, shortcut_id:, sending_id:) ⇒ TD::Types::Messages
Sends messages from a quick reply shortcut. Requires Telegram Business subscription.
7492 7493 7494 7495 7496 7497 |
# File 'lib/tdlib/client_methods.rb', line 7492 def (chat_id:, shortcut_id:, sending_id:) broadcast('@type' => 'sendQuickReplyShortcutMessages', 'chat_id' => chat_id, 'shortcut_id' => shortcut_id, 'sending_id' => sending_id) end |
#send_story(chat_id:, content:, areas:, caption:, privacy_settings:, active_period:, from_story_full_id:, is_posted_to_chat_page:, protect_content:) ⇒ TD::Types::Story
Sends a new story to a chat; requires can_post_stories right for supergroup and channel chats. Returns a temporary story.
7520 7521 7522 7523 7524 7525 7526 7527 7528 7529 7530 7531 7532 |
# File 'lib/tdlib/client_methods.rb', line 7520 def send_story(chat_id:, content:, areas:, caption:, privacy_settings:, active_period:, from_story_full_id:, is_posted_to_chat_page:, protect_content:) broadcast('@type' => 'sendStory', 'chat_id' => chat_id, 'content' => content, 'areas' => areas, 'caption' => caption, 'privacy_settings' => privacy_settings, 'active_period' => active_period, 'from_story_full_id' => from_story_full_id, 'is_posted_to_chat_page' => is_posted_to_chat_page, 'protect_content' => protect_content) end |
#send_web_app_custom_request(bot_user_id:, method:, parameters:) ⇒ TD::Types::CustomRequestResult
Sends a custom request from a Web App.
7540 7541 7542 7543 7544 7545 |
# File 'lib/tdlib/client_methods.rb', line 7540 def send_web_app_custom_request(bot_user_id:, method:, parameters:) broadcast('@type' => 'sendWebAppCustomRequest', 'bot_user_id' => bot_user_id, 'method' => method, 'parameters' => parameters) end |
#send_web_app_data(bot_user_id:, button_text:, data:) ⇒ TD::Types::Ok
Sends data received from a keyboardButtonTypeWebApp Web App to a bot.
7554 7555 7556 7557 7558 7559 |
# File 'lib/tdlib/client_methods.rb', line 7554 def send_web_app_data(bot_user_id:, button_text:, data:) broadcast('@type' => 'sendWebAppData', 'bot_user_id' => bot_user_id, 'button_text' => , 'data' => data) end |
#set_accent_color(accent_color_id:, background_custom_emoji_id:) ⇒ TD::Types::Ok
Changes accent color and background custom emoji for the current user; for Telegram Premium users only.
7567 7568 7569 7570 7571 |
# File 'lib/tdlib/client_methods.rb', line 7567 def set_accent_color(accent_color_id:, background_custom_emoji_id:) broadcast('@type' => 'setAccentColor', 'accent_color_id' => accent_color_id, 'background_custom_emoji_id' => background_custom_emoji_id) end |
#set_account_ttl(ttl:) ⇒ TD::Types::Ok
Changes the period of inactivity after which the account of the current user will automatically be deleted.
7577 7578 7579 7580 |
# File 'lib/tdlib/client_methods.rb', line 7577 def set_account_ttl(ttl:) broadcast('@type' => 'setAccountTtl', 'ttl' => ttl) end |
#set_alarm(seconds:) ⇒ TD::Types::Ok
Succeeds after a specified amount of time has passed. Can be called before initialization.
7587 7588 7589 7590 |
# File 'lib/tdlib/client_methods.rb', line 7587 def set_alarm(seconds:) broadcast('@type' => 'setAlarm', 'seconds' => seconds) end |
#set_application_verification_token(verification_id:, token:) ⇒ TD::Types::Ok
Application verification has been completed. Can be called before authorization.
7600 7601 7602 7603 7604 |
# File 'lib/tdlib/client_methods.rb', line 7600 def set_application_verification_token(verification_id:, token:) broadcast('@type' => 'setApplicationVerificationToken', 'verification_id' => verification_id, 'token' => token) end |
#set_archive_chat_list_settings(settings:) ⇒ TD::Types::Ok
Changes settings for automatic moving of chats to and from the Archive chat lists.
7610 7611 7612 7613 |
# File 'lib/tdlib/client_methods.rb', line 7610 def set_archive_chat_list_settings(settings:) broadcast('@type' => 'setArchiveChatListSettings', 'settings' => settings) end |
#set_authentication_email_address(email_address:) ⇒ TD::Types::Ok
Sets the email address of the user and sends an authentication code to the email address. Works only when the current authorization state is authorizationStateWaitEmailAddress.
7620 7621 7622 7623 |
# File 'lib/tdlib/client_methods.rb', line 7620 def set_authentication_email_address(email_address:) broadcast('@type' => 'setAuthenticationEmailAddress', 'email_address' => email_address) end |
#set_authentication_phone_number(phone_number:, settings:) ⇒ TD::Types::Ok
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 state is ,
, , , or
.
7635 7636 7637 7638 7639 |
# File 'lib/tdlib/client_methods.rb', line 7635 def set_authentication_phone_number(phone_number:, settings:) broadcast('@type' => 'setAuthenticationPhoneNumber', 'phone_number' => phone_number, 'settings' => settings) end |
#set_auto_download_settings(settings:, type:) ⇒ TD::Types::Ok
Sets auto-download settings.
7646 7647 7648 7649 7650 |
# File 'lib/tdlib/client_methods.rb', line 7646 def set_auto_download_settings(settings:, type:) broadcast('@type' => 'setAutoDownloadSettings', 'settings' => settings, 'type' => type) end |
#set_autosave_settings(scope:, settings:) ⇒ TD::Types::Ok
Sets autosave settings for the given scope. The method is guaranteed to work only after at least one call to getAutosaveSettings.
7659 7660 7661 7662 7663 |
# File 'lib/tdlib/client_methods.rb', line 7659 def set_autosave_settings(scope:, settings:) broadcast('@type' => 'setAutosaveSettings', 'scope' => scope, 'settings' => settings) end |
#set_bio(bio:) ⇒ TD::Types::Ok
Changes the bio of the current user.
7670 7671 7672 7673 |
# File 'lib/tdlib/client_methods.rb', line 7670 def set_bio(bio:) broadcast('@type' => 'setBio', 'bio' => bio) end |
#set_birthdate(birthdate:) ⇒ TD::Types::Ok
Changes the birthdate of the current user.
7680 7681 7682 7683 |
# File 'lib/tdlib/client_methods.rb', line 7680 def set_birthdate(birthdate:) broadcast('@type' => 'setBirthdate', 'birthdate' => birthdate) end |
#set_bot_info_description(bot_user_id:, language_code:, description:) ⇒ TD::Types::Ok
Sets the text shown in the chat with a bot if the chat is empty. Can be called only if userTypeBot.can_be_edited == true.
7693 7694 7695 7696 7697 7698 |
# File 'lib/tdlib/client_methods.rb', line 7693 def set_bot_info_description(bot_user_id:, language_code:, description:) broadcast('@type' => 'setBotInfoDescription', 'bot_user_id' => bot_user_id, 'language_code' => language_code, 'description' => description) end |
#set_bot_info_short_description(bot_user_id:, language_code:, short_description:) ⇒ TD::Types::Ok
Sets the text shown on a bot’s profile page and sent together with the link when users share the bot. Can be called only if userTypeBot.can_be_edited == true.
7708 7709 7710 7711 7712 7713 |
# File 'lib/tdlib/client_methods.rb', line 7708 def set_bot_info_short_description(bot_user_id:, language_code:, short_description:) broadcast('@type' => 'setBotInfoShortDescription', 'bot_user_id' => bot_user_id, 'language_code' => language_code, 'short_description' => short_description) end |
#set_bot_name(bot_user_id: nil, language_code: nil, name:) ⇒ TD::Types::Ok
Sets the name of a bot. Can be called only if userTypeBot.can_be_edited == true.
7724 7725 7726 7727 7728 7729 |
# File 'lib/tdlib/client_methods.rb', line 7724 def set_bot_name(bot_user_id: nil, language_code: nil, name:) broadcast('@type' => 'setBotName', 'bot_user_id' => bot_user_id, 'language_code' => language_code, 'name' => name) end |
#set_bot_profile_photo(bot_user_id:, photo:) ⇒ TD::Types::Ok
Changes a profile photo for a bot.
7736 7737 7738 7739 7740 |
# File 'lib/tdlib/client_methods.rb', line 7736 def set_bot_profile_photo(bot_user_id:, photo:) broadcast('@type' => 'setBotProfilePhoto', 'bot_user_id' => bot_user_id, 'photo' => photo) end |
#set_bot_updates_status(pending_update_count:, error_message:) ⇒ TD::Types::Ok
Informs the server about the number of pending bot updates if they haven’t been processed for a long time; for bots
only.
7748 7749 7750 7751 7752 |
# File 'lib/tdlib/client_methods.rb', line 7748 def set_bot_updates_status(pending_update_count:, error_message:) broadcast('@type' => 'setBotUpdatesStatus', 'pending_update_count' => pending_update_count, 'error_message' => ) end |
#set_business_away_message_settings(away_message_settings:) ⇒ TD::Types::Ok
Changes the business away message settings of the current user. Requires Telegram Business subscription.
7760 7761 7762 7763 |
# File 'lib/tdlib/client_methods.rb', line 7760 def (away_message_settings:) broadcast('@type' => 'setBusinessAwayMessageSettings', 'away_message_settings' => ) end |
#set_business_connected_bot(bot:) ⇒ TD::Types::Ok
Adds or changes business bot that is connected to the current user account.
7769 7770 7771 7772 |
# File 'lib/tdlib/client_methods.rb', line 7769 def set_business_connected_bot(bot:) broadcast('@type' => 'setBusinessConnectedBot', 'bot' => bot) end |
#set_business_greeting_message_settings(greeting_message_settings:) ⇒ TD::Types::Ok
Changes the business greeting message settings of the current user. Requires Telegram Business subscription.
7780 7781 7782 7783 |
# File 'lib/tdlib/client_methods.rb', line 7780 def (greeting_message_settings:) broadcast('@type' => 'setBusinessGreetingMessageSettings', 'greeting_message_settings' => ) end |
#set_business_location(location:) ⇒ TD::Types::Ok
Changes the business location of the current user. Requires Telegram Business subscription.
7790 7791 7792 7793 |
# File 'lib/tdlib/client_methods.rb', line 7790 def set_business_location(location:) broadcast('@type' => 'setBusinessLocation', 'location' => location) end |
#set_business_message_is_pinned(business_connection_id:, chat_id:, message_id:, is_pinned:) ⇒ TD::Types::Ok
Pins or unpins a message sent on behalf of a business account; for bots only.
7803 7804 7805 7806 7807 7808 7809 |
# File 'lib/tdlib/client_methods.rb', line 7803 def (business_connection_id:, chat_id:, message_id:, is_pinned:) broadcast('@type' => 'setBusinessMessageIsPinned', 'business_connection_id' => business_connection_id, 'chat_id' => chat_id, 'message_id' => , 'is_pinned' => is_pinned) end |
#set_business_opening_hours(opening_hours:) ⇒ TD::Types::Ok
Changes the business opening hours of the current user. Requires Telegram Business subscription.
7817 7818 7819 7820 |
# File 'lib/tdlib/client_methods.rb', line 7817 def set_business_opening_hours(opening_hours:) broadcast('@type' => 'setBusinessOpeningHours', 'opening_hours' => opening_hours) end |
#set_business_start_page(start_page:) ⇒ TD::Types::Ok
Changes the business start page of the current user. Requires Telegram Business subscription.
7828 7829 7830 7831 |
# File 'lib/tdlib/client_methods.rb', line 7828 def set_business_start_page(start_page:) broadcast('@type' => 'setBusinessStartPage', 'start_page' => start_page) end |
#set_chat_accent_color(chat_id:, accent_color_id:, background_custom_emoji_id:) ⇒ TD::Types::Ok
Changes accent color and background custom emoji of a channel chat. Requires can_change_info administrator right.
7843 7844 7845 7846 7847 7848 |
# File 'lib/tdlib/client_methods.rb', line 7843 def set_chat_accent_color(chat_id:, accent_color_id:, background_custom_emoji_id:) broadcast('@type' => 'setChatAccentColor', 'chat_id' => chat_id, 'accent_color_id' => accent_color_id, 'background_custom_emoji_id' => background_custom_emoji_id) end |
#set_chat_active_stories_list(chat_id:, story_list:) ⇒ TD::Types::Ok
Changes story list in which stories from the chat are shown.
7855 7856 7857 7858 7859 |
# File 'lib/tdlib/client_methods.rb', line 7855 def set_chat_active_stories_list(chat_id:, story_list:) broadcast('@type' => 'setChatActiveStoriesList', 'chat_id' => chat_id, 'story_list' => story_list) end |
#set_chat_available_reactions(chat_id:, available_reactions:) ⇒ TD::Types::Ok
Changes reactions, available in a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right.
7870 7871 7872 7873 7874 |
# File 'lib/tdlib/client_methods.rb', line 7870 def set_chat_available_reactions(chat_id:, available_reactions:) broadcast('@type' => 'setChatAvailableReactions', 'chat_id' => chat_id, 'available_reactions' => available_reactions) end |
#set_chat_background(chat_id:, background:, type:, dark_theme_dimming:, only_for_self:) ⇒ TD::Types::Ok
Sets the background in a specific chat. Supported only in private and secret chats with non-deleted users, and in chats with sufficient boost level and
can_change_info administrator right.
7895 7896 7897 7898 7899 7900 7901 7902 |
# File 'lib/tdlib/client_methods.rb', line 7895 def set_chat_background(chat_id:, background:, type:, dark_theme_dimming:, only_for_self:) broadcast('@type' => 'setChatBackground', 'chat_id' => chat_id, 'background' => background, 'type' => type, 'dark_theme_dimming' => dark_theme_dimming, 'only_for_self' => only_for_self) end |
#set_chat_client_data(chat_id:, client_data:) ⇒ TD::Types::Ok
Changes application-specific data associated with a chat.
7909 7910 7911 7912 7913 |
# File 'lib/tdlib/client_methods.rb', line 7909 def set_chat_client_data(chat_id:, client_data:) broadcast('@type' => 'setChatClientData', 'chat_id' => chat_id, 'client_data' => client_data) end |
#set_chat_description(chat_id:, description:) ⇒ TD::Types::Ok
Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info member right.
7922 7923 7924 7925 7926 |
# File 'lib/tdlib/client_methods.rb', line 7922 def set_chat_description(chat_id:, description:) broadcast('@type' => 'setChatDescription', 'chat_id' => chat_id, 'description' => description) end |
#set_chat_discussion_group(chat_id:, discussion_chat_id:) ⇒ TD::Types::Ok
Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it
is specified.
7941 7942 7943 7944 7945 |
# File 'lib/tdlib/client_methods.rb', line 7941 def set_chat_discussion_group(chat_id:, discussion_chat_id:) broadcast('@type' => 'setChatDiscussionGroup', 'chat_id' => chat_id, 'discussion_chat_id' => discussion_chat_id) end |
#set_chat_draft_message(chat_id:, message_thread_id:, draft_message:) ⇒ TD::Types::Ok
Changes the draft message in a chat.
7955 7956 7957 7958 7959 7960 |
# File 'lib/tdlib/client_methods.rb', line 7955 def (chat_id:, message_thread_id:, draft_message:) broadcast('@type' => 'setChatDraftMessage', 'chat_id' => chat_id, 'message_thread_id' => , 'draft_message' => ) end |
#set_chat_emoji_status(chat_id:, emoji_status:) ⇒ TD::Types::Ok
Changes the emoji status of a chat. Use chatBoostLevelFeatures.can_set_emoji_status to check whether an emoji status can be set. Requires can_change_info administrator right.
7969 7970 7971 7972 7973 |
# File 'lib/tdlib/client_methods.rb', line 7969 def set_chat_emoji_status(chat_id:, emoji_status:) broadcast('@type' => 'setChatEmojiStatus', 'chat_id' => chat_id, 'emoji_status' => emoji_status) end |
#set_chat_location(chat_id:, location:) ⇒ TD::Types::Ok
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.
7982 7983 7984 7985 7986 |
# File 'lib/tdlib/client_methods.rb', line 7982 def set_chat_location(chat_id:, location:) broadcast('@type' => 'setChatLocation', 'chat_id' => chat_id, 'location' => location) end |
#set_chat_member_status(chat_id:, member_id:, status:) ⇒ TD::Types::Ok
Changes the status of a chat member; requires can_invite_users member right to add a chat member,
can_promote_members administrator right to change administrator rights of the member, and can_restrict_members
administrator right to change restrictions of a user.
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.
7999 8000 8001 8002 8003 8004 |
# File 'lib/tdlib/client_methods.rb', line 7999 def set_chat_member_status(chat_id:, member_id:, status:) broadcast('@type' => 'setChatMemberStatus', 'chat_id' => chat_id, 'member_id' => member_id, 'status' => status) end |
#set_chat_message_auto_delete_time(chat_id:, message_auto_delete_time:) ⇒ TD::Types::Ok
Changes the message auto-delete or self-destruct (for secret chats) time in a chat. Requires change_info administrator right in basic groups, supergroups and channels Message auto-delete time can’t
be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram)..
8015 8016 8017 8018 8019 |
# File 'lib/tdlib/client_methods.rb', line 8015 def (chat_id:, message_auto_delete_time:) broadcast('@type' => 'setChatMessageAutoDeleteTime', 'chat_id' => chat_id, 'message_auto_delete_time' => ) end |
#set_chat_message_sender(chat_id:, message_sender_id:) ⇒ TD::Types::Ok
Selects a message sender to send messages in a chat.
8026 8027 8028 8029 8030 |
# File 'lib/tdlib/client_methods.rb', line 8026 def (chat_id:, message_sender_id:) broadcast('@type' => 'setChatMessageSender', 'chat_id' => chat_id, 'message_sender_id' => ) end |
#set_chat_notification_settings(chat_id:, notification_settings:) ⇒ TD::Types::Ok
Changes the notification settings of a chat. Notification settings of a chat with the current user (Saved Messages) can’t be changed.
8039 8040 8041 8042 8043 |
# File 'lib/tdlib/client_methods.rb', line 8039 def set_chat_notification_settings(chat_id:, notification_settings:) broadcast('@type' => 'setChatNotificationSettings', 'chat_id' => chat_id, 'notification_settings' => notification_settings) end |
#set_chat_permissions(chat_id:, permissions:) ⇒ TD::Types::Ok
Changes the chat members permissions. Supported only for basic groups and supergroups. Requires can_restrict_members administrator right.
8052 8053 8054 8055 8056 |
# File 'lib/tdlib/client_methods.rb', line 8052 def (chat_id:, permissions:) broadcast('@type' => 'setChatPermissions', 'chat_id' => chat_id, 'permissions' => ) end |
#set_chat_photo(chat_id:, photo:) ⇒ TD::Types::Ok
Changes the photo of a chat. Supported only for basic groups, supergroups and channels. Requires can_change_info member right.
8065 8066 8067 8068 8069 |
# File 'lib/tdlib/client_methods.rb', line 8065 def set_chat_photo(chat_id:, photo:) broadcast('@type' => 'setChatPhoto', 'chat_id' => chat_id, 'photo' => photo) end |
#set_chat_pinned_stories(chat_id:, story_ids:) ⇒ TD::Types::Ok
Changes the list of pinned stories on a chat page; requires can_edit_stories right in the chat.
8078 8079 8080 8081 8082 |
# File 'lib/tdlib/client_methods.rb', line 8078 def set_chat_pinned_stories(chat_id:, story_ids:) broadcast('@type' => 'setChatPinnedStories', 'chat_id' => chat_id, 'story_ids' => story_ids) end |
#set_chat_profile_accent_color(chat_id:, profile_accent_color_id:, profile_background_custom_emoji_id:) ⇒ TD::Types::Ok
Changes accent color and background custom emoji for profile of a supergroup or channel chat. Requires can_change_info administrator right.
8095 8096 8097 8098 8099 8100 |
# File 'lib/tdlib/client_methods.rb', line 8095 def set_chat_profile_accent_color(chat_id:, profile_accent_color_id:, profile_background_custom_emoji_id:) broadcast('@type' => 'setChatProfileAccentColor', 'chat_id' => chat_id, 'profile_accent_color_id' => profile_accent_color_id, 'profile_background_custom_emoji_id' => profile_background_custom_emoji_id) end |
#set_chat_slow_mode_delay(chat_id:, slow_mode_delay:) ⇒ TD::Types::Ok
Changes the slow mode delay of a chat. Available only for supergroups; requires can_restrict_members right.
8109 8110 8111 8112 8113 |
# File 'lib/tdlib/client_methods.rb', line 8109 def set_chat_slow_mode_delay(chat_id:, slow_mode_delay:) broadcast('@type' => 'setChatSlowModeDelay', 'chat_id' => chat_id, 'slow_mode_delay' => slow_mode_delay) end |
#set_chat_theme(chat_id:, theme_name:) ⇒ TD::Types::Ok
Changes the chat theme. Supported only in private and secret chats.
8121 8122 8123 8124 8125 |
# File 'lib/tdlib/client_methods.rb', line 8121 def set_chat_theme(chat_id:, theme_name:) broadcast('@type' => 'setChatTheme', 'chat_id' => chat_id, 'theme_name' => theme_name) end |
#set_chat_title(chat_id:, title:) ⇒ TD::Types::Ok
Changes the chat title. Supported only for basic groups, supergroups and channels. Requires can_change_info member right.
8134 8135 8136 8137 8138 |
# File 'lib/tdlib/client_methods.rb', line 8134 def set_chat_title(chat_id:, title:) broadcast('@type' => 'setChatTitle', 'chat_id' => chat_id, 'title' => title) end |
#set_close_friends(user_ids:) ⇒ TD::Types::Ok
Changes the list of close friends of the current user.
8144 8145 8146 8147 |
# File 'lib/tdlib/client_methods.rb', line 8144 def set_close_friends(user_ids:) broadcast('@type' => 'setCloseFriends', 'user_ids' => user_ids) end |
#set_commands(scope:, language_code:, commands:) ⇒ TD::Types::Ok
Sets the list of commands supported by the bot for the given user scope and language; for bots only.
8158 8159 8160 8161 8162 8163 |
# File 'lib/tdlib/client_methods.rb', line 8158 def set_commands(scope:, language_code:, commands:) broadcast('@type' => 'setCommands', 'scope' => scope, 'language_code' => language_code, 'commands' => commands) end |
#set_custom_emoji_sticker_set_thumbnail(name:, custom_emoji_id:) ⇒ TD::Types::Ok
Sets a custom emoji sticker set thumbnail.
8172 8173 8174 8175 8176 |
# File 'lib/tdlib/client_methods.rb', line 8172 def set_custom_emoji_sticker_set_thumbnail(name:, custom_emoji_id:) broadcast('@type' => 'setCustomEmojiStickerSetThumbnail', 'name' => name, 'custom_emoji_id' => custom_emoji_id) end |
#set_custom_language_pack(info:, strings:) ⇒ TD::Types::Ok
Adds or changes a custom local language pack to the current localization target.
8186 8187 8188 8189 8190 |
# File 'lib/tdlib/client_methods.rb', line 8186 def set_custom_language_pack(info:, strings:) broadcast('@type' => 'setCustomLanguagePack', 'info' => info, 'strings' => strings) end |
#set_custom_language_pack_string(language_pack_id:, new_string:) ⇒ TD::Types::Ok
Adds, edits or deletes a string in a custom local language pack. Can be called before authorization.
8199 8200 8201 8202 8203 |
# File 'lib/tdlib/client_methods.rb', line 8199 def set_custom_language_pack_string(language_pack_id:, new_string:) broadcast('@type' => 'setCustomLanguagePackString', 'language_pack_id' => language_pack_id, 'new_string' => new_string) end |
#set_database_encryption_key(new_encryption_key:) ⇒ TD::Types::Ok
Changes the database encryption key. Usually the encryption key is never changed and is stored in some OS keychain.
8210 8211 8212 8213 |
# File 'lib/tdlib/client_methods.rb', line 8210 def set_database_encryption_key(new_encryption_key:) broadcast('@type' => 'setDatabaseEncryptionKey', 'new_encryption_key' => new_encryption_key) end |
#set_default_background(background:, type:, for_dark_theme:) ⇒ TD::Types::Background
Sets default background for chats; adds the background to the list of installed backgrounds.
8223 8224 8225 8226 8227 8228 |
# File 'lib/tdlib/client_methods.rb', line 8223 def set_default_background(background:, type:, for_dark_theme:) broadcast('@type' => 'setDefaultBackground', 'background' => background, 'type' => type, 'for_dark_theme' => for_dark_theme) end |
#set_default_channel_administrator_rights(default_channel_administrator_rights:) ⇒ TD::Types::Ok
Sets default administrator rights for adding the bot to channel chats; for bots only.
8235 8236 8237 8238 |
# File 'lib/tdlib/client_methods.rb', line 8235 def set_default_channel_administrator_rights(default_channel_administrator_rights:) broadcast('@type' => 'setDefaultChannelAdministratorRights', 'default_channel_administrator_rights' => default_channel_administrator_rights) end |
#set_default_group_administrator_rights(default_group_administrator_rights:) ⇒ TD::Types::Ok
Sets default administrator rights for adding the bot to basic group and supergroup chats; for bots only.
8245 8246 8247 8248 |
# File 'lib/tdlib/client_methods.rb', line 8245 def set_default_group_administrator_rights(default_group_administrator_rights:) broadcast('@type' => 'setDefaultGroupAdministratorRights', 'default_group_administrator_rights' => default_group_administrator_rights) end |
#set_default_message_auto_delete_time(message_auto_delete_time:) ⇒ TD::Types::Ok
Changes the default message auto-delete time for new chats.
8256 8257 8258 8259 |
# File 'lib/tdlib/client_methods.rb', line 8256 def (message_auto_delete_time:) broadcast('@type' => 'setDefaultMessageAutoDeleteTime', 'message_auto_delete_time' => ) end |
#set_default_reaction_type(reaction_type:) ⇒ TD::Types::Ok
Changes type of default reaction for the current user.
8266 8267 8268 8269 |
# File 'lib/tdlib/client_methods.rb', line 8266 def set_default_reaction_type(reaction_type:) broadcast('@type' => 'setDefaultReactionType', 'reaction_type' => reaction_type) end |
#set_emoji_status(emoji_status:) ⇒ TD::Types::Ok
Changes the emoji status of the current user; for Telegram Premium users only.
8275 8276 8277 8278 |
# File 'lib/tdlib/client_methods.rb', line 8275 def set_emoji_status(emoji_status:) broadcast('@type' => 'setEmojiStatus', 'emoji_status' => emoji_status) end |
#set_file_generation_progress(generation_id:, expected_size:, local_prefix_size:) ⇒ TD::Types::Ok
Informs TDLib on a file generation progress.
8286 8287 8288 8289 8290 8291 |
# File 'lib/tdlib/client_methods.rb', line 8286 def set_file_generation_progress(generation_id:, expected_size:, local_prefix_size:) broadcast('@type' => 'setFileGenerationProgress', 'generation_id' => generation_id, 'expected_size' => expected_size, 'local_prefix_size' => local_prefix_size) end |
#set_forum_topic_notification_settings(chat_id:, message_thread_id:, notification_settings:) ⇒ TD::Types::Ok
Changes the notification settings of a forum topic.
8300 8301 8302 8303 8304 8305 |
# File 'lib/tdlib/client_methods.rb', line 8300 def set_forum_topic_notification_settings(chat_id:, message_thread_id:, notification_settings:) broadcast('@type' => 'setForumTopicNotificationSettings', 'chat_id' => chat_id, 'message_thread_id' => , 'notification_settings' => notification_settings) end |
#set_game_score(chat_id:, message_id:, edit_message:, user_id:, score:, force:) ⇒ TD::Types::Message
Updates the game score of the specified user in the game; for bots only.
8317 8318 8319 8320 8321 8322 8323 8324 8325 |
# File 'lib/tdlib/client_methods.rb', line 8317 def set_game_score(chat_id:, message_id:, edit_message:, user_id:, score:, force:) broadcast('@type' => 'setGameScore', 'chat_id' => chat_id, 'message_id' => , 'edit_message' => , 'user_id' => user_id, 'score' => score, 'force' => force) end |
#set_group_call_participant_is_speaking(group_call_id:, audio_source:, is_speaking:) ⇒ TD::Types::Ok
Informs TDLib that speaking state of a participant of an active group has changed.
8334 8335 8336 8337 8338 8339 |
# File 'lib/tdlib/client_methods.rb', line 8334 def set_group_call_participant_is_speaking(group_call_id:, audio_source:, is_speaking:) broadcast('@type' => 'setGroupCallParticipantIsSpeaking', 'group_call_id' => group_call_id, 'audio_source' => audio_source, 'is_speaking' => is_speaking) end |
#set_group_call_participant_volume_level(group_call_id:, participant_id:, volume_level:) ⇒ TD::Types::Ok
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.
8349 8350 8351 8352 8353 8354 |
# File 'lib/tdlib/client_methods.rb', line 8349 def set_group_call_participant_volume_level(group_call_id:, participant_id:, volume_level:) broadcast('@type' => 'setGroupCallParticipantVolumeLevel', 'group_call_id' => group_call_id, 'participant_id' => participant_id, 'volume_level' => volume_level) end |
#set_group_call_title(group_call_id:, title:) ⇒ TD::Types::Ok
Sets group call title. Requires groupCall.can_be_managed group call flag.
8362 8363 8364 8365 8366 |
# File 'lib/tdlib/client_methods.rb', line 8362 def set_group_call_title(group_call_id:, title:) broadcast('@type' => 'setGroupCallTitle', 'group_call_id' => group_call_id, 'title' => title) end |
#set_inactive_session_ttl(inactive_session_ttl_days:) ⇒ TD::Types::Ok
Changes the period of inactivity after which sessions will automatically be terminated.
8373 8374 8375 8376 |
# File 'lib/tdlib/client_methods.rb', line 8373 def set_inactive_session_ttl(inactive_session_ttl_days:) broadcast('@type' => 'setInactiveSessionTtl', 'inactive_session_ttl_days' => inactive_session_ttl_days) end |
#set_inline_game_score(inline_message_id:, edit_message:, user_id:, score:, force:) ⇒ TD::Types::Ok
Updates the game score of the specified user in a game; for bots only.
8387 8388 8389 8390 8391 8392 8393 8394 |
# File 'lib/tdlib/client_methods.rb', line 8387 def set_inline_game_score(inline_message_id:, edit_message:, user_id:, score:, force:) broadcast('@type' => 'setInlineGameScore', 'inline_message_id' => , 'edit_message' => , 'user_id' => user_id, 'score' => score, 'force' => force) end |
#set_location(location:) ⇒ TD::Types::Ok
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. Must not be called if the user has a business location.
8402 8403 8404 8405 |
# File 'lib/tdlib/client_methods.rb', line 8402 def set_location(location:) broadcast('@type' => 'setLocation', 'location' => location) end |
#set_log_stream(log_stream:) ⇒ TD::Types::Ok
Sets new log stream for internal logging of TDLib. Can be called synchronously.
8412 8413 8414 8415 |
# File 'lib/tdlib/client_methods.rb', line 8412 def set_log_stream(log_stream:) broadcast('@type' => 'setLogStream', 'log_stream' => log_stream) end |
#set_log_tag_verbosity_level(tag:, new_verbosity_level:) ⇒ TD::Types::Ok
Sets the verbosity level for a specified TDLib internal log tag. Can be called synchronously.
8423 8424 8425 8426 8427 |
# File 'lib/tdlib/client_methods.rb', line 8423 def set_log_tag_verbosity_level(tag:, new_verbosity_level:) broadcast('@type' => 'setLogTagVerbosityLevel', 'tag' => tag, 'new_verbosity_level' => new_verbosity_level) end |
#set_log_verbosity_level(new_verbosity_level:) ⇒ TD::Types::Ok
Sets the verbosity level of the internal logging of TDLib. Can be called synchronously.
8437 8438 8439 8440 |
# File 'lib/tdlib/client_methods.rb', line 8437 def set_log_verbosity_level(new_verbosity_level:) broadcast('@type' => 'setLogVerbosityLevel', 'new_verbosity_level' => new_verbosity_level) end |
#set_login_email_address(new_login_email_address:) ⇒ TD::Types::EmailAddressAuthenticationCodeInfo
Changes the login email address of the user. The email address can be changed only if the current user already has login email and
passwordState.login_email_address_pattern is non-empty.
The change will not be applied until the new login email address is confirmed with checkLoginEmailAddressCode. To use Apple ID/Google ID instead of an email address, call checkLoginEmailAddressCode directly.
8450 8451 8452 8453 |
# File 'lib/tdlib/client_methods.rb', line 8450 def set_login_email_address(new_login_email_address:) broadcast('@type' => 'setLoginEmailAddress', 'new_login_email_address' => new_login_email_address) end |
#set_menu_button(user_id:, menu_button:) ⇒ TD::Types::Ok
Sets menu button for the given user or for all users; for bots only.
8460 8461 8462 8463 8464 |
# File 'lib/tdlib/client_methods.rb', line 8460 def (user_id:, menu_button:) broadcast('@type' => 'setMenuButton', 'user_id' => user_id, 'menu_button' => ) end |
#set_message_fact_check(chat_id:, message_id:, text:) ⇒ TD::Types::Ok
Changes the fact-check of a message. Can be only used if messageProperties.can_set_fact_check == true.
8475 8476 8477 8478 8479 8480 |
# File 'lib/tdlib/client_methods.rb', line 8475 def (chat_id:, message_id:, text:) broadcast('@type' => 'setMessageFactCheck', 'chat_id' => chat_id, 'message_id' => , 'text' => text) end |
#set_message_reactions(chat_id:, message_id:, reaction_types:, is_big:) ⇒ TD::Types::Ok
Sets reactions on a message; for bots only.
8489 8490 8491 8492 8493 8494 8495 |
# File 'lib/tdlib/client_methods.rb', line 8489 def (chat_id:, message_id:, reaction_types:, is_big:) broadcast('@type' => 'setMessageReactions', 'chat_id' => chat_id, 'message_id' => , 'reaction_types' => reaction_types, 'is_big' => is_big) end |
#set_message_sender_block_list(sender_id:, block_list:) ⇒ TD::Types::Ok
Changes the block list of a message sender. Currently, only users and supergroup chats can be blocked.
8504 8505 8506 8507 8508 |
# File 'lib/tdlib/client_methods.rb', line 8504 def (sender_id:, block_list:) broadcast('@type' => 'setMessageSenderBlockList', 'sender_id' => sender_id, 'block_list' => block_list) end |
#set_name(first_name:, last_name:) ⇒ TD::Types::Ok
Changes the first and last name of the current user.
8515 8516 8517 8518 8519 |
# File 'lib/tdlib/client_methods.rb', line 8515 def set_name(first_name:, last_name:) broadcast('@type' => 'setName', 'first_name' => first_name, 'last_name' => last_name) end |
#set_network_type(type:) ⇒ TD::Types::Ok
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.
8530 8531 8532 8533 |
# File 'lib/tdlib/client_methods.rb', line 8530 def set_network_type(type:) broadcast('@type' => 'setNetworkType', 'type' => type) end |
#set_new_chat_privacy_settings(settings:) ⇒ TD::Types::Ok
Changes privacy settings for new chat creation; can be used only if getOption(“can_set_new_chat_privacy_settings”).
8539 8540 8541 8542 |
# File 'lib/tdlib/client_methods.rb', line 8539 def set_new_chat_privacy_settings(settings:) broadcast('@type' => 'setNewChatPrivacySettings', 'settings' => settings) end |
#set_option(name:, value:) ⇒ TD::Types::Ok
Sets the value of an option. (Check the list of available options on core.telegram.org/tdlib/options.) Only writable options can be set. Can be called before authorization.
8552 8553 8554 8555 8556 |
# File 'lib/tdlib/client_methods.rb', line 8552 def set_option(name:, value:) broadcast('@type' => 'setOption', 'name' => name, 'value' => value) end |
#set_passport_element(element:, password:) ⇒ TD::Types::PassportElement
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.
8565 8566 8567 8568 8569 |
# File 'lib/tdlib/client_methods.rb', line 8565 def set_passport_element(element:, password:) broadcast('@type' => 'setPassportElement', 'element' => element, 'password' => password) end |
#set_passport_element_errors(user_id:, errors:) ⇒ TD::Types::Ok
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.
8577 8578 8579 8580 8581 |
# File 'lib/tdlib/client_methods.rb', line 8577 def set_passport_element_errors(user_id:, errors:) broadcast('@type' => 'setPassportElementErrors', 'user_id' => user_id, 'errors' => errors) end |
#set_password(old_password:, new_password: nil, new_hint: nil, set_recovery_email_address: false, new_recovery_email_address: nil) ⇒ TD::Types::PasswordState
Changes the 2-step verification 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.
8594 8595 8596 8597 8598 8599 8600 8601 8602 |
# File 'lib/tdlib/client_methods.rb', line 8594 def set_password(old_password:, new_password: nil, new_hint: nil, set_recovery_email_address: false, new_recovery_email_address: nil) broadcast('@type' => 'setPassword', 'old_password' => old_password, 'new_password' => new_password, 'new_hint' => new_hint, 'set_recovery_email_address' => set_recovery_email_address, 'new_recovery_email_address' => new_recovery_email_address) end |
#set_personal_chat(chat_id:) ⇒ TD::Types::Ok
Changes the personal chat of the current user.
8609 8610 8611 8612 |
# File 'lib/tdlib/client_methods.rb', line 8609 def set_personal_chat(chat_id:) broadcast('@type' => 'setPersonalChat', 'chat_id' => chat_id) end |
#set_pinned_chats(chat_list:, chat_ids:) ⇒ TD::Types::Ok
Changes the order of pinned chats.
8619 8620 8621 8622 8623 |
# File 'lib/tdlib/client_methods.rb', line 8619 def set_pinned_chats(chat_list:, chat_ids:) broadcast('@type' => 'setPinnedChats', 'chat_list' => chat_list, 'chat_ids' => chat_ids) end |
#set_pinned_forum_topics(chat_id:, message_thread_ids:) ⇒ TD::Types::Ok
Changes the order of pinned forum topics; requires can_manage_topics right in the supergroup.
8630 8631 8632 8633 8634 |
# File 'lib/tdlib/client_methods.rb', line 8630 def set_pinned_forum_topics(chat_id:, message_thread_ids:) broadcast('@type' => 'setPinnedForumTopics', 'chat_id' => chat_id, 'message_thread_ids' => ) end |
#set_pinned_saved_messages_topics(saved_messages_topic_ids:) ⇒ TD::Types::Ok
Changes the order of pinned Saved Messages topics.
8640 8641 8642 8643 |
# File 'lib/tdlib/client_methods.rb', line 8640 def (saved_messages_topic_ids:) broadcast('@type' => 'setPinnedSavedMessagesTopics', 'saved_messages_topic_ids' => ) end |
#set_poll_answer(chat_id:, message_id:, option_ids:) ⇒ TD::Types::Ok
Changes the user answer to a poll. A poll in quiz mode can be answered only once.
8653 8654 8655 8656 8657 8658 |
# File 'lib/tdlib/client_methods.rb', line 8653 def set_poll_answer(chat_id:, message_id:, option_ids:) broadcast('@type' => 'setPollAnswer', 'chat_id' => chat_id, 'message_id' => , 'option_ids' => option_ids) end |
#set_profile_accent_color(profile_accent_color_id:, profile_background_custom_emoji_id:) ⇒ TD::Types::Ok
Changes accent color and background custom emoji for profile of the current user; for Telegram Premium users only.
8666 8667 8668 8669 8670 |
# File 'lib/tdlib/client_methods.rb', line 8666 def set_profile_accent_color(profile_accent_color_id:, profile_background_custom_emoji_id:) broadcast('@type' => 'setProfileAccentColor', 'profile_accent_color_id' => profile_accent_color_id, 'profile_background_custom_emoji_id' => profile_background_custom_emoji_id) end |
#set_profile_photo(photo:, is_public:) ⇒ TD::Types::Ok
Changes a profile photo for the current user.
8678 8679 8680 8681 8682 |
# File 'lib/tdlib/client_methods.rb', line 8678 def set_profile_photo(photo:, is_public:) broadcast('@type' => 'setProfilePhoto', 'photo' => photo, 'is_public' => is_public) end |
#set_quick_reply_shortcut_name(shortcut_id:, name:) ⇒ TD::Types::Ok
Changes name of a quick reply shortcut.
8690 8691 8692 8693 8694 |
# File 'lib/tdlib/client_methods.rb', line 8690 def set_quick_reply_shortcut_name(shortcut_id:, name:) broadcast('@type' => 'setQuickReplyShortcutName', 'shortcut_id' => shortcut_id, 'name' => name) end |
#set_reaction_notification_settings(notification_settings:) ⇒ TD::Types::Ok
Changes notification settings for reactions.
8700 8701 8702 8703 |
# File 'lib/tdlib/client_methods.rb', line 8700 def set_reaction_notification_settings(notification_settings:) broadcast('@type' => 'setReactionNotificationSettings', 'notification_settings' => notification_settings) end |
#set_read_date_privacy_settings(settings:) ⇒ TD::Types::Ok
Changes privacy settings for message read date.
8709 8710 8711 8712 |
# File 'lib/tdlib/client_methods.rb', line 8709 def set_read_date_privacy_settings(settings:) broadcast('@type' => 'setReadDatePrivacySettings', 'settings' => settings) end |
#set_recovery_email_address(password:, new_recovery_email_address:) ⇒ TD::Types::PasswordState
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.
8723 8724 8725 8726 8727 |
# File 'lib/tdlib/client_methods.rb', line 8723 def set_recovery_email_address(password:, new_recovery_email_address:) broadcast('@type' => 'setRecoveryEmailAddress', 'password' => password, 'new_recovery_email_address' => new_recovery_email_address) end |
#set_saved_messages_tag_label(tag:, label:) ⇒ TD::Types::Ok
Changes label of a Saved Messages tag; for Telegram Premium users only.
8734 8735 8736 8737 8738 |
# File 'lib/tdlib/client_methods.rb', line 8734 def (tag:, label:) broadcast('@type' => 'setSavedMessagesTagLabel', 'tag' => tag, 'label' => label) end |
#set_scope_notification_settings(scope:, notification_settings:) ⇒ TD::Types::Ok
Changes notification settings for chats of a given type.
8746 8747 8748 8749 8750 |
# File 'lib/tdlib/client_methods.rb', line 8746 def set_scope_notification_settings(scope:, notification_settings:) broadcast('@type' => 'setScopeNotificationSettings', 'scope' => scope, 'notification_settings' => notification_settings) end |
#set_sticker_emojis(sticker:, emojis:) ⇒ TD::Types::Ok
Changes the list of emojis corresponding to a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user.
8758 8759 8760 8761 8762 |
# File 'lib/tdlib/client_methods.rb', line 8758 def set_sticker_emojis(sticker:, emojis:) broadcast('@type' => 'setStickerEmojis', 'sticker' => sticker, 'emojis' => emojis) end |
#set_sticker_keywords(sticker:, keywords:) ⇒ TD::Types::Ok
Changes the list of keywords of a sticker. The sticker must belong to a regular or custom emoji sticker set that is owned by the current user.
8771 8772 8773 8774 8775 |
# File 'lib/tdlib/client_methods.rb', line 8771 def set_sticker_keywords(sticker:, keywords:) broadcast('@type' => 'setStickerKeywords', 'sticker' => sticker, 'keywords' => keywords) end |
#set_sticker_mask_position(sticker:, mask_position:) ⇒ TD::Types::Ok
Changes the mask position of a mask sticker. The sticker must belong to a mask sticker set that is owned by the current user.
8784 8785 8786 8787 8788 |
# File 'lib/tdlib/client_methods.rb', line 8784 def set_sticker_mask_position(sticker:, mask_position:) broadcast('@type' => 'setStickerMaskPosition', 'sticker' => sticker, 'mask_position' => mask_position) end |
#set_sticker_position_in_set(sticker:, position:) ⇒ TD::Types::Ok
Changes the position of a sticker in the set to which it belongs. The sticker set must be owned by the current user.
8796 8797 8798 8799 8800 |
# File 'lib/tdlib/client_methods.rb', line 8796 def set_sticker_position_in_set(sticker:, position:) broadcast('@type' => 'setStickerPositionInSet', 'sticker' => sticker, 'position' => position) end |
#set_sticker_set_thumbnail(user_id:, name:, thumbnail:, format:) ⇒ TD::Types::Ok
Sets a sticker set thumbnail.
8810 8811 8812 8813 8814 8815 8816 |
# File 'lib/tdlib/client_methods.rb', line 8810 def set_sticker_set_thumbnail(user_id:, name:, thumbnail:, format:) broadcast('@type' => 'setStickerSetThumbnail', 'user_id' => user_id, 'name' => name, 'thumbnail' => thumbnail, 'format' => format) end |
#set_sticker_set_title(name:, title:) ⇒ TD::Types::Ok
Sets a sticker set title.
8824 8825 8826 8827 8828 |
# File 'lib/tdlib/client_methods.rb', line 8824 def set_sticker_set_title(name:, title:) broadcast('@type' => 'setStickerSetTitle', 'name' => name, 'title' => title) end |
#set_story_privacy_settings(story_id:, privacy_settings:) ⇒ TD::Types::Ok
Changes privacy settings of a story. The method can be called only for stories posted on behalf of the current user and if story.can_be_edited == true.
8836 8837 8838 8839 8840 |
# File 'lib/tdlib/client_methods.rb', line 8836 def set_story_privacy_settings(story_id:, privacy_settings:) broadcast('@type' => 'setStoryPrivacySettings', 'story_id' => story_id, 'privacy_settings' => privacy_settings) end |
#set_story_reaction(story_sender_chat_id:, story_id:, reaction_type:, update_recent_reactions:) ⇒ TD::Types::Ok
Changes chosen reaction on a story that has already been sent.
8851 8852 8853 8854 8855 8856 8857 |
# File 'lib/tdlib/client_methods.rb', line 8851 def set_story_reaction(story_sender_chat_id:, story_id:, reaction_type:, update_recent_reactions:) broadcast('@type' => 'setStoryReaction', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id, 'reaction_type' => reaction_type, 'update_recent_reactions' => update_recent_reactions) end |
#set_supergroup_custom_emoji_sticker_set(supergroup_id:, custom_emoji_sticker_set_id:) ⇒ TD::Types::Ok
Changes the custom emoji sticker set of a supergroup; requires can_change_info administrator right. The chat must have at least chatBoostFeatures.min_custom_emoji_sticker_set_boost_level boost level to pass the
corresponding color.
8868 8869 8870 8871 8872 |
# File 'lib/tdlib/client_methods.rb', line 8868 def set_supergroup_custom_emoji_sticker_set(supergroup_id:, custom_emoji_sticker_set_id:) broadcast('@type' => 'setSupergroupCustomEmojiStickerSet', 'supergroup_id' => supergroup_id, 'custom_emoji_sticker_set_id' => custom_emoji_sticker_set_id) end |
#set_supergroup_sticker_set(supergroup_id:, sticker_set_id:) ⇒ TD::Types::Ok
Changes the sticker set of a supergroup; requires can_change_info administrator right.
8880 8881 8882 8883 8884 |
# File 'lib/tdlib/client_methods.rb', line 8880 def set_supergroup_sticker_set(supergroup_id:, sticker_set_id:) broadcast('@type' => 'setSupergroupStickerSet', 'supergroup_id' => supergroup_id, 'sticker_set_id' => sticker_set_id) end |
#set_supergroup_unrestrict_boost_count(supergroup_id:, unrestrict_boost_count:) ⇒ TD::Types::Ok
Changes the number of times the supergroup must be boosted by a user to ignore slow mode and chat permission
restrictions; requires can_restrict_members administrator right.
8893 8894 8895 8896 8897 |
# File 'lib/tdlib/client_methods.rb', line 8893 def set_supergroup_unrestrict_boost_count(supergroup_id:, unrestrict_boost_count:) broadcast('@type' => 'setSupergroupUnrestrictBoostCount', 'supergroup_id' => supergroup_id, 'unrestrict_boost_count' => unrestrict_boost_count) end |
#set_supergroup_username(supergroup_id:, username:) ⇒ TD::Types::Ok
Changes the editable username of a supergroup or channel, requires owner privileges in the supergroup or channel.
8906 8907 8908 8909 8910 |
# File 'lib/tdlib/client_methods.rb', line 8906 def set_supergroup_username(supergroup_id:, username:) broadcast('@type' => 'setSupergroupUsername', 'supergroup_id' => supergroup_id, 'username' => username) end |
#set_tdlib_parameters(use_test_dc: nil, database_directory: nil, files_directory: nil, database_encryption_key: nil, use_file_database: nil, use_chat_info_database: nil, use_message_database: nil, use_secret_chats: nil, api_id: nil, api_hash: nil, system_language_code:, device_model:, system_version: nil, application_version:) ⇒ TD::Types::Ok
Sets the parameters for TDLib initialization. Works only when the current authorization state is authorizationStateWaitTdlibParameters.
8941 8942 8943 8944 8945 8946 8947 8948 8949 8950 8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 |
# File 'lib/tdlib/client_methods.rb', line 8941 def set_tdlib_parameters(use_test_dc: nil, database_directory: nil, files_directory: nil, database_encryption_key: nil, use_file_database: nil, use_chat_info_database: nil, use_message_database: nil, use_secret_chats: nil, api_id: nil, api_hash: nil, system_language_code:, device_model:, system_version: nil, application_version:) broadcast('@type' => 'setTdlibParameters', 'use_test_dc' => use_test_dc, 'database_directory' => database_directory, 'files_directory' => files_directory, 'database_encryption_key' => database_encryption_key, 'use_file_database' => use_file_database, 'use_chat_info_database' => use_chat_info_database, 'use_message_database' => , 'use_secret_chats' => use_secret_chats, 'api_id' => api_id, 'api_hash' => api_hash, 'system_language_code' => system_language_code, 'device_model' => device_model, 'system_version' => system_version, 'application_version' => application_version) end |
#set_user_personal_profile_photo(user_id:, photo:) ⇒ TD::Types::Ok
Changes a personal profile photo of a contact user.
8968 8969 8970 8971 8972 |
# File 'lib/tdlib/client_methods.rb', line 8968 def set_user_personal_profile_photo(user_id:, photo:) broadcast('@type' => 'setUserPersonalProfilePhoto', 'user_id' => user_id, 'photo' => photo) end |
#set_user_privacy_setting_rules(setting:, rules:) ⇒ TD::Types::Ok
Changes user privacy settings.
8979 8980 8981 8982 8983 |
# File 'lib/tdlib/client_methods.rb', line 8979 def set_user_privacy_setting_rules(setting:, rules:) broadcast('@type' => 'setUserPrivacySettingRules', 'setting' => setting, 'rules' => rules) end |
#set_user_support_info(user_id:, message:) ⇒ TD::Types::UserSupportInfo
Sets support information for the given user; for Telegram support only.
8990 8991 8992 8993 8994 |
# File 'lib/tdlib/client_methods.rb', line 8990 def set_user_support_info(user_id:, message:) broadcast('@type' => 'setUserSupportInfo', 'user_id' => user_id, 'message' => ) end |
#set_username(username:) ⇒ TD::Types::Ok
Changes the editable username of the current user.
9002 9003 9004 9005 |
# File 'lib/tdlib/client_methods.rb', line 9002 def set_username(username:) broadcast('@type' => 'setUsername', 'username' => username) end |
#set_video_chat_default_participant(chat_id:, default_participant_id:) ⇒ TD::Types::Ok
Changes default participant identifier, on whose behalf a video chat in the chat will be joined.
9013 9014 9015 9016 9017 |
# File 'lib/tdlib/client_methods.rb', line 9013 def set_video_chat_default_participant(chat_id:, default_participant_id:) broadcast('@type' => 'setVideoChatDefaultParticipant', 'chat_id' => chat_id, 'default_participant_id' => default_participant_id) end |
#share_chat_with_bot(chat_id:, message_id:, button_id:, shared_chat_id:, only_check:) ⇒ TD::Types::Ok
Shares a chat after pressing a keyboardButtonTypeRequestChat button with the bot.
9035 9036 9037 9038 9039 9040 9041 9042 |
# File 'lib/tdlib/client_methods.rb', line 9035 def share_chat_with_bot(chat_id:, message_id:, button_id:, shared_chat_id:, only_check:) broadcast('@type' => 'shareChatWithBot', 'chat_id' => chat_id, 'message_id' => , 'button_id' => , 'shared_chat_id' => shared_chat_id, 'only_check' => only_check) end |
#share_phone_number(user_id:) ⇒ TD::Types::Ok
Shares the phone number of the current user with a mutual contact. Supposed to be called when the user clicks on chatActionBarSharePhoneNumber.
9050 9051 9052 9053 |
# File 'lib/tdlib/client_methods.rb', line 9050 def share_phone_number(user_id:) broadcast('@type' => 'sharePhoneNumber', 'user_id' => user_id) end |
#share_users_with_bot(chat_id:, message_id:, button_id:, shared_user_ids:, only_check:) ⇒ TD::Types::Ok
Shares users after pressing a keyboardButtonTypeRequestUsers button with the bot.
9064 9065 9066 9067 9068 9069 9070 9071 |
# File 'lib/tdlib/client_methods.rb', line 9064 def share_users_with_bot(chat_id:, message_id:, button_id:, shared_user_ids:, only_check:) broadcast('@type' => 'shareUsersWithBot', 'chat_id' => chat_id, 'message_id' => , 'button_id' => , 'shared_user_ids' => shared_user_ids, 'only_check' => only_check) end |
#start_group_call_recording(group_call_id:, title:, record_video:, use_portrait_orientation:) ⇒ TD::Types::Ok
Starts recording of an active group call. Requires groupCall.can_be_managed group call flag.
9081 9082 9083 9084 9085 9086 9087 |
# File 'lib/tdlib/client_methods.rb', line 9081 def start_group_call_recording(group_call_id:, title:, record_video:, use_portrait_orientation:) broadcast('@type' => 'startGroupCallRecording', 'group_call_id' => group_call_id, 'title' => title, 'record_video' => record_video, 'use_portrait_orientation' => use_portrait_orientation) end |
#start_group_call_screen_sharing(group_call_id:, audio_source_id:, payload:) ⇒ TD::Types::Text
Starts screen sharing in a joined group call. Returns join response payload for tgcalls.
9097 9098 9099 9100 9101 9102 |
# File 'lib/tdlib/client_methods.rb', line 9097 def start_group_call_screen_sharing(group_call_id:, audio_source_id:, payload:) broadcast('@type' => 'startGroupCallScreenSharing', 'group_call_id' => group_call_id, 'audio_source_id' => audio_source_id, 'payload' => payload) end |
#start_scheduled_group_call(group_call_id:) ⇒ TD::Types::Ok
Starts a scheduled group call.
9108 9109 9110 9111 |
# File 'lib/tdlib/client_methods.rb', line 9108 def start_scheduled_group_call(group_call_id:) broadcast('@type' => 'startScheduledGroupCall', 'group_call_id' => group_call_id) end |
#stop_business_poll(business_connection_id:, chat_id:, message_id:, reply_markup:) ⇒ TD::Types::BusinessMessage
Stops a poll sent on behalf of a business account; for bots only.
9121 9122 9123 9124 9125 9126 9127 |
# File 'lib/tdlib/client_methods.rb', line 9121 def stop_business_poll(business_connection_id:, chat_id:, message_id:, reply_markup:) broadcast('@type' => 'stopBusinessPoll', 'business_connection_id' => business_connection_id, 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup) end |
#stop_poll(chat_id:, message_id:, reply_markup:) ⇒ TD::Types::Ok
Stops a poll.
9136 9137 9138 9139 9140 9141 |
# File 'lib/tdlib/client_methods.rb', line 9136 def stop_poll(chat_id:, message_id:, reply_markup:) broadcast('@type' => 'stopPoll', 'chat_id' => chat_id, 'message_id' => , 'reply_markup' => reply_markup) end |
#suggest_user_profile_photo(user_id:, photo:) ⇒ TD::Types::Ok
Suggests a profile photo to another regular user with common messages.
9149 9150 9151 9152 9153 |
# File 'lib/tdlib/client_methods.rb', line 9149 def suggest_user_profile_photo(user_id:, photo:) broadcast('@type' => 'suggestUserProfilePhoto', 'user_id' => user_id, 'photo' => photo) end |
#synchronize_language_pack(language_pack_id:) ⇒ TD::Types::Ok
Fetches the latest versions of all strings from a language pack in the current localization target from the server. This method doesn’t need to be called explicitly for the current used/base language packs. Can be called before authorization.
9161 9162 9163 9164 |
# File 'lib/tdlib/client_methods.rb', line 9161 def synchronize_language_pack(language_pack_id:) broadcast('@type' => 'synchronizeLanguagePack', 'language_pack_id' => language_pack_id) end |
#terminate_all_other_sessions ⇒ TD::Types::Ok
Terminates all other sessions of the current user.
9169 9170 9171 |
# File 'lib/tdlib/client_methods.rb', line 9169 def terminate_all_other_sessions broadcast('@type' => 'terminateAllOtherSessions') end |
#terminate_session(session_id:) ⇒ TD::Types::Ok
Terminates a session of the current user.
9177 9178 9179 9180 |
# File 'lib/tdlib/client_methods.rb', line 9177 def terminate_session(session_id:) broadcast('@type' => 'terminateSession', 'session_id' => session_id) end |
#toggle_all_downloads_are_paused(are_paused:) ⇒ TD::Types::Ok
Changes pause state of all files in the file download list.
9186 9187 9188 9189 |
# File 'lib/tdlib/client_methods.rb', line 9186 def toggle_all_downloads_are_paused(are_paused:) broadcast('@type' => 'toggleAllDownloadsArePaused', 'are_paused' => are_paused) end |
#toggle_bot_is_added_to_attachment_menu(bot_user_id:, is_added:, allow_write_access:) ⇒ TD::Types::Ok
Adds or removes a bot to attachment and side menu. Bot can be added to the menu, only if userTypeBot.can_be_added_to_attachment_menu == true.
9200 9201 9202 9203 9204 9205 |
# File 'lib/tdlib/client_methods.rb', line 9200 def (bot_user_id:, is_added:, allow_write_access:) broadcast('@type' => 'toggleBotIsAddedToAttachmentMenu', 'bot_user_id' => bot_user_id, 'is_added' => is_added, 'allow_write_access' => allow_write_access) end |
#toggle_bot_username_is_active(bot_user_id:, username:, is_active:) ⇒ TD::Types::Ok
Changes active state for a username of a bot. The editable username can’t be disabled. May return an error with a message “USERNAMES_ACTIVE_TOO_MUCH” if the maximum number of active usernames has been
reached.
Can be called only if userTypeBot.can_be_edited == true.
9217 9218 9219 9220 9221 9222 |
# File 'lib/tdlib/client_methods.rb', line 9217 def toggle_bot_username_is_active(bot_user_id:, username:, is_active:) broadcast('@type' => 'toggleBotUsernameIsActive', 'bot_user_id' => bot_user_id, 'username' => username, 'is_active' => is_active) end |
#toggle_business_connected_bot_chat_is_paused(chat_id:, is_paused:) ⇒ TD::Types::Ok
Pauses or resumes the connected business bot in a specific chat.
9229 9230 9231 9232 9233 |
# File 'lib/tdlib/client_methods.rb', line 9229 def toggle_business_connected_bot_chat_is_paused(chat_id:, is_paused:) broadcast('@type' => 'toggleBusinessConnectedBotChatIsPaused', 'chat_id' => chat_id, 'is_paused' => is_paused) end |
#toggle_chat_default_disable_notification(chat_id:, default_disable_notification:) ⇒ TD::Types::Ok
Changes the value of the default disable_notification parameter, used when a message is sent to a chat.
9240 9241 9242 9243 9244 |
# File 'lib/tdlib/client_methods.rb', line 9240 def toggle_chat_default_disable_notification(chat_id:, default_disable_notification:) broadcast('@type' => 'toggleChatDefaultDisableNotification', 'chat_id' => chat_id, 'default_disable_notification' => default_disable_notification) end |
#toggle_chat_folder_tags(are_tags_enabled:) ⇒ TD::Types::Ok
Toggles whether chat folder tags are enabled.
9250 9251 9252 9253 |
# File 'lib/tdlib/client_methods.rb', line 9250 def (are_tags_enabled:) broadcast('@type' => 'toggleChatFolderTags', 'are_tags_enabled' => ) end |
#toggle_chat_has_protected_content(chat_id:, has_protected_content:) ⇒ TD::Types::Ok
Changes the ability of users to save, forward, or copy chat content. Supported only for basic groups, supergroups and channels. Requires owner privileges.
9262 9263 9264 9265 9266 |
# File 'lib/tdlib/client_methods.rb', line 9262 def toggle_chat_has_protected_content(chat_id:, has_protected_content:) broadcast('@type' => 'toggleChatHasProtectedContent', 'chat_id' => chat_id, 'has_protected_content' => has_protected_content) end |
#toggle_chat_is_marked_as_unread(chat_id:, is_marked_as_unread:) ⇒ TD::Types::Ok
Changes the marked as unread state of a chat.
9273 9274 9275 9276 9277 |
# File 'lib/tdlib/client_methods.rb', line 9273 def toggle_chat_is_marked_as_unread(chat_id:, is_marked_as_unread:) broadcast('@type' => 'toggleChatIsMarkedAsUnread', 'chat_id' => chat_id, 'is_marked_as_unread' => is_marked_as_unread) end |
#toggle_chat_is_pinned(chat_list:, chat_id:, is_pinned:) ⇒ TD::Types::Ok
Changes the pinned state of a chat. There can be up to getOption(“pinned_chat_count_max”)/getOption(“pinned_archived_chat_count_max”) pinned non-secret
chats and the same number of secret chats in the main/archive chat list.
The limit can be increased with Telegram Premium.
9288 9289 9290 9291 9292 9293 |
# File 'lib/tdlib/client_methods.rb', line 9288 def toggle_chat_is_pinned(chat_list:, chat_id:, is_pinned:) broadcast('@type' => 'toggleChatIsPinned', 'chat_list' => chat_list, 'chat_id' => chat_id, 'is_pinned' => is_pinned) end |
#toggle_chat_is_translatable(chat_id:, is_translatable:) ⇒ TD::Types::Ok
Changes the translatable state of a chat.
9300 9301 9302 9303 9304 |
# File 'lib/tdlib/client_methods.rb', line 9300 def toggle_chat_is_translatable(chat_id:, is_translatable:) broadcast('@type' => 'toggleChatIsTranslatable', 'chat_id' => chat_id, 'is_translatable' => is_translatable) end |
#toggle_chat_view_as_topics(chat_id:, view_as_topics:) ⇒ TD::Types::Ok
Changes the view_as_topics setting of a forum chat or Saved Messages.
9311 9312 9313 9314 9315 |
# File 'lib/tdlib/client_methods.rb', line 9311 def toggle_chat_view_as_topics(chat_id:, view_as_topics:) broadcast('@type' => 'toggleChatViewAsTopics', 'chat_id' => chat_id, 'view_as_topics' => view_as_topics) end |
#toggle_download_is_paused(file_id:, is_paused:) ⇒ TD::Types::Ok
Changes pause state of a file in the file download list.
9322 9323 9324 9325 9326 |
# File 'lib/tdlib/client_methods.rb', line 9322 def toggle_download_is_paused(file_id:, is_paused:) broadcast('@type' => 'toggleDownloadIsPaused', 'file_id' => file_id, 'is_paused' => is_paused) end |
#toggle_forum_topic_is_closed(chat_id:, message_thread_id:, is_closed:) ⇒ TD::Types::Ok
Toggles whether a topic is closed in a forum supergroup chat; requires can_manage_topics right in the supergroup
unless the user is creator of the topic.
9335 9336 9337 9338 9339 9340 |
# File 'lib/tdlib/client_methods.rb', line 9335 def toggle_forum_topic_is_closed(chat_id:, message_thread_id:, is_closed:) broadcast('@type' => 'toggleForumTopicIsClosed', 'chat_id' => chat_id, 'message_thread_id' => , 'is_closed' => is_closed) end |
#toggle_forum_topic_is_pinned(chat_id:, message_thread_id:, is_pinned:) ⇒ TD::Types::Ok
Changes the pinned state of a forum topic; requires can_manage_topics right in the supergroup. There can be up to getOption(“pinned_forum_topic_count_max”) pinned forum topics.
9349 9350 9351 9352 9353 9354 |
# File 'lib/tdlib/client_methods.rb', line 9349 def toggle_forum_topic_is_pinned(chat_id:, message_thread_id:, is_pinned:) broadcast('@type' => 'toggleForumTopicIsPinned', 'chat_id' => chat_id, 'message_thread_id' => , 'is_pinned' => is_pinned) end |
#toggle_general_forum_topic_is_hidden(chat_id:, is_hidden:) ⇒ TD::Types::Ok
Toggles whether a General topic is hidden in a forum supergroup chat; requires can_manage_topics right in the
supergroup.
9362 9363 9364 9365 9366 |
# File 'lib/tdlib/client_methods.rb', line 9362 def toggle_general_forum_topic_is_hidden(chat_id:, is_hidden:) broadcast('@type' => 'toggleGeneralForumTopicIsHidden', 'chat_id' => chat_id, 'is_hidden' => is_hidden) end |
#toggle_group_call_enabled_start_notification(group_call_id:, enabled_start_notification:) ⇒ TD::Types::Ok
Toggles whether the current user will receive a notification when the group call starts; scheduled group calls
only.
9374 9375 9376 9377 9378 |
# File 'lib/tdlib/client_methods.rb', line 9374 def toggle_group_call_enabled_start_notification(group_call_id:, enabled_start_notification:) broadcast('@type' => 'toggleGroupCallEnabledStartNotification', 'group_call_id' => group_call_id, 'enabled_start_notification' => enabled_start_notification) end |
#toggle_group_call_is_my_video_enabled(group_call_id:, is_my_video_enabled:) ⇒ TD::Types::Ok
Toggles whether current user’s video is enabled.
9385 9386 9387 9388 9389 |
# File 'lib/tdlib/client_methods.rb', line 9385 def toggle_group_call_is_my_video_enabled(group_call_id:, is_my_video_enabled:) broadcast('@type' => 'toggleGroupCallIsMyVideoEnabled', 'group_call_id' => group_call_id, 'is_my_video_enabled' => is_my_video_enabled) end |
#toggle_group_call_is_my_video_paused(group_call_id:, is_my_video_paused:) ⇒ TD::Types::Ok
Toggles whether current user’s video is paused.
9396 9397 9398 9399 9400 |
# File 'lib/tdlib/client_methods.rb', line 9396 def toggle_group_call_is_my_video_paused(group_call_id:, is_my_video_paused:) broadcast('@type' => 'toggleGroupCallIsMyVideoPaused', 'group_call_id' => group_call_id, 'is_my_video_paused' => is_my_video_paused) end |
#toggle_group_call_mute_new_participants(group_call_id:, mute_new_participants:) ⇒ TD::Types::Ok
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.
9408 9409 9410 9411 9412 |
# File 'lib/tdlib/client_methods.rb', line 9408 def toggle_group_call_mute_new_participants(group_call_id:, mute_new_participants:) broadcast('@type' => 'toggleGroupCallMuteNewParticipants', 'group_call_id' => group_call_id, 'mute_new_participants' => mute_new_participants) end |
#toggle_group_call_participant_is_hand_raised(group_call_id:, participant_id:, is_hand_raised:) ⇒ TD::Types::Ok
Toggles whether a group call participant hand is rased.
9422 9423 9424 9425 9426 9427 |
# File 'lib/tdlib/client_methods.rb', line 9422 def toggle_group_call_participant_is_hand_raised(group_call_id:, participant_id:, is_hand_raised:) broadcast('@type' => 'toggleGroupCallParticipantIsHandRaised', 'group_call_id' => group_call_id, 'participant_id' => participant_id, 'is_hand_raised' => is_hand_raised) end |
#toggle_group_call_participant_is_muted(group_call_id:, participant_id:, is_muted:) ⇒ TD::Types::Ok
Toggles whether a participant of an active group call is muted, unmuted, or allowed to unmute themselves.
9435 9436 9437 9438 9439 9440 |
# File 'lib/tdlib/client_methods.rb', line 9435 def toggle_group_call_participant_is_muted(group_call_id:, participant_id:, is_muted:) broadcast('@type' => 'toggleGroupCallParticipantIsMuted', 'group_call_id' => group_call_id, 'participant_id' => participant_id, 'is_muted' => is_muted) end |
#toggle_group_call_screen_sharing_is_paused(group_call_id:, is_paused:) ⇒ TD::Types::Ok
Pauses or unpauses screen sharing in a joined group call.
9447 9448 9449 9450 9451 |
# File 'lib/tdlib/client_methods.rb', line 9447 def toggle_group_call_screen_sharing_is_paused(group_call_id:, is_paused:) broadcast('@type' => 'toggleGroupCallScreenSharingIsPaused', 'group_call_id' => group_call_id, 'is_paused' => is_paused) end |
#toggle_has_sponsored_messages_enabled(has_sponsored_messages_enabled:) ⇒ TD::Types::Ok
Toggles whether the current user has sponsored messages enabled. The setting has no effect for users without Telegram Premium for which sponsored messages are always enabled.
9459 9460 9461 9462 |
# File 'lib/tdlib/client_methods.rb', line 9459 def (has_sponsored_messages_enabled:) broadcast('@type' => 'toggleHasSponsoredMessagesEnabled', 'has_sponsored_messages_enabled' => ) end |
#toggle_paid_message_reaction_is_anonymous(chat_id:, message_id:, is_anonymous:) ⇒ TD::Types::Ok
Changes whether the paid message reaction of the user to a message is anonymous. The message must have paid reaction added by the user.
9472 9473 9474 9475 9476 9477 |
# File 'lib/tdlib/client_methods.rb', line 9472 def (chat_id:, message_id:, is_anonymous:) broadcast('@type' => 'togglePaidMessageReactionIsAnonymous', 'chat_id' => chat_id, 'message_id' => , 'is_anonymous' => is_anonymous) end |
#toggle_saved_messages_topic_is_pinned(saved_messages_topic_id:, is_pinned:) ⇒ TD::Types::Ok
Changes the pinned state of a Saved Messages topic. There can be up to getOption(“pinned_saved_messages_topic_count_max”) pinned topics. The limit can be increased with Telegram Premium.
9486 9487 9488 9489 9490 |
# File 'lib/tdlib/client_methods.rb', line 9486 def (saved_messages_topic_id:, is_pinned:) broadcast('@type' => 'toggleSavedMessagesTopicIsPinned', 'saved_messages_topic_id' => , 'is_pinned' => is_pinned) end |
#toggle_session_can_accept_calls(session_id:, can_accept_calls:) ⇒ TD::Types::Ok
Toggles whether a session can accept incoming calls.
9497 9498 9499 9500 9501 |
# File 'lib/tdlib/client_methods.rb', line 9497 def toggle_session_can_accept_calls(session_id:, can_accept_calls:) broadcast('@type' => 'toggleSessionCanAcceptCalls', 'session_id' => session_id, 'can_accept_calls' => can_accept_calls) end |
#toggle_session_can_accept_secret_chats(session_id:, can_accept_secret_chats:) ⇒ TD::Types::Ok
Toggles whether a session can accept incoming secret chats.
9509 9510 9511 9512 9513 |
# File 'lib/tdlib/client_methods.rb', line 9509 def toggle_session_can_accept_secret_chats(session_id:, can_accept_secret_chats:) broadcast('@type' => 'toggleSessionCanAcceptSecretChats', 'session_id' => session_id, 'can_accept_secret_chats' => can_accept_secret_chats) end |
#toggle_story_is_posted_to_chat_page(story_sender_chat_id:, story_id:, is_posted_to_chat_page:) ⇒ TD::Types::Ok
Toggles whether a story is accessible after expiration. Can be called only if story.can_toggle_is_posted_to_chat_page == true.
9523 9524 9525 9526 9527 9528 |
# File 'lib/tdlib/client_methods.rb', line 9523 def toggle_story_is_posted_to_chat_page(story_sender_chat_id:, story_id:, is_posted_to_chat_page:) broadcast('@type' => 'toggleStoryIsPostedToChatPage', 'story_sender_chat_id' => story_sender_chat_id, 'story_id' => story_id, 'is_posted_to_chat_page' => is_posted_to_chat_page) end |
#toggle_supergroup_can_have_sponsored_messages(supergroup_id:, can_have_sponsored_messages:) ⇒ TD::Types::Ok
Toggles whether sponsored messages are shown in the channel chat; requires owner privileges in the channel. The chat must have at least chatBoostFeatures.min_sponsored_message_disable_boost_level boost level to disable
sponsored .
9537 9538 9539 9540 9541 |
# File 'lib/tdlib/client_methods.rb', line 9537 def (supergroup_id:, can_have_sponsored_messages:) broadcast('@type' => 'toggleSupergroupCanHaveSponsoredMessages', 'supergroup_id' => supergroup_id, 'can_have_sponsored_messages' => ) end |
#toggle_supergroup_has_aggressive_anti_spam_enabled(supergroup_id:, has_aggressive_anti_spam_enabled:) ⇒ TD::Types::Ok
Toggles whether aggressive anti-spam checks are enabled in the supergroup. Can be called only if supergroupFullInfo.can_toggle_aggressive_anti_spam == true.
9549 9550 9551 9552 9553 |
# File 'lib/tdlib/client_methods.rb', line 9549 def toggle_supergroup_has_aggressive_anti_spam_enabled(supergroup_id:, has_aggressive_anti_spam_enabled:) broadcast('@type' => 'toggleSupergroupHasAggressiveAntiSpamEnabled', 'supergroup_id' => supergroup_id, 'has_aggressive_anti_spam_enabled' => has_aggressive_anti_spam_enabled) end |
#toggle_supergroup_has_hidden_members(supergroup_id:, has_hidden_members:) ⇒ TD::Types::Ok
Toggles whether non-administrators can receive only administrators and bots using getSupergroupMembers or
searchChatMembers.
Can be called only if supergroupFullInfo.can_hide_members == true.
9562 9563 9564 9565 9566 |
# File 'lib/tdlib/client_methods.rb', line 9562 def toggle_supergroup_has_hidden_members(supergroup_id:, has_hidden_members:) broadcast('@type' => 'toggleSupergroupHasHiddenMembers', 'supergroup_id' => supergroup_id, 'has_hidden_members' => has_hidden_members) end |
#toggle_supergroup_is_all_history_available(supergroup_id:, is_all_history_available:) ⇒ TD::Types::Ok
Toggles whether the message history of a supergroup is available to new members; requires can_change_info member
right.
9574 9575 9576 9577 9578 |
# File 'lib/tdlib/client_methods.rb', line 9574 def toggle_supergroup_is_all_history_available(supergroup_id:, is_all_history_available:) broadcast('@type' => 'toggleSupergroupIsAllHistoryAvailable', 'supergroup_id' => supergroup_id, 'is_all_history_available' => is_all_history_available) end |
#toggle_supergroup_is_broadcast_group(supergroup_id:) ⇒ TD::Types::Ok
Upgrades supergroup to a broadcast group; requires owner privileges in the supergroup.
9584 9585 9586 9587 |
# File 'lib/tdlib/client_methods.rb', line 9584 def toggle_supergroup_is_broadcast_group(supergroup_id:) broadcast('@type' => 'toggleSupergroupIsBroadcastGroup', 'supergroup_id' => supergroup_id) end |
#toggle_supergroup_is_forum(supergroup_id:, is_forum:) ⇒ TD::Types::Ok
Toggles whether the supergroup is a forum; requires owner privileges in the supergroup. Discussion supergroups can’t be converted to forums.
9595 9596 9597 9598 9599 |
# File 'lib/tdlib/client_methods.rb', line 9595 def toggle_supergroup_is_forum(supergroup_id:, is_forum:) broadcast('@type' => 'toggleSupergroupIsForum', 'supergroup_id' => supergroup_id, 'is_forum' => is_forum) end |
#toggle_supergroup_join_by_request(supergroup_id:, join_by_request:) ⇒ TD::Types::Ok
Toggles whether all users directly joining the supergroup need to be approved by supergroup administrators;
requires can_restrict_members administrator right.
9607 9608 9609 9610 9611 |
# File 'lib/tdlib/client_methods.rb', line 9607 def toggle_supergroup_join_by_request(supergroup_id:, join_by_request:) broadcast('@type' => 'toggleSupergroupJoinByRequest', 'supergroup_id' => supergroup_id, 'join_by_request' => join_by_request) end |
#toggle_supergroup_join_to_send_messages(supergroup_id:, join_to_send_messages:) ⇒ TD::Types::Ok
Toggles whether joining is mandatory to send messages to a discussion supergroup; requires can_restrict_members
administrator right.
9619 9620 9621 9622 9623 |
# File 'lib/tdlib/client_methods.rb', line 9619 def (supergroup_id:, join_to_send_messages:) broadcast('@type' => 'toggleSupergroupJoinToSendMessages', 'supergroup_id' => supergroup_id, 'join_to_send_messages' => ) end |
#toggle_supergroup_sign_messages(supergroup_id:, sign_messages:, show_message_sender:) ⇒ TD::Types::Ok
Toggles whether sender signature or link to the account is added to sent messages in a channel; requires
can_change_info member right.
9632 9633 9634 9635 9636 9637 |
# File 'lib/tdlib/client_methods.rb', line 9632 def (supergroup_id:, sign_messages:, show_message_sender:) broadcast('@type' => 'toggleSupergroupSignMessages', 'supergroup_id' => supergroup_id, 'sign_messages' => , 'show_message_sender' => ) end |
#toggle_supergroup_username_is_active(supergroup_id:, username:, is_active:) ⇒ TD::Types::Ok
Changes active state for a username of a supergroup or channel, requires owner privileges in the supergroup or
channel.
The editable username can’t be disabled. May return an error with a message “USERNAMES_ACTIVE_TOO_MUCH” if the maximum number of active usernames has been
reached.
9649 9650 9651 9652 9653 9654 |
# File 'lib/tdlib/client_methods.rb', line 9649 def toggle_supergroup_username_is_active(supergroup_id:, username:, is_active:) broadcast('@type' => 'toggleSupergroupUsernameIsActive', 'supergroup_id' => supergroup_id, 'username' => username, 'is_active' => is_active) end |
#toggle_username_is_active(username:, is_active:) ⇒ TD::Types::Ok
Changes active state for a username of the current user. The editable username can’t be disabled. May return an error with a message “USERNAMES_ACTIVE_TOO_MUCH” if the maximum number of active usernames has been
reached.
9664 9665 9666 9667 9668 |
# File 'lib/tdlib/client_methods.rb', line 9664 def toggle_username_is_active(username:, is_active:) broadcast('@type' => 'toggleUsernameIsActive', 'username' => username, 'is_active' => is_active) end |
#transfer_chat_ownership(chat_id:, user_id:, password:) ⇒ TD::Types::Ok
Changes the owner of a chat; requires owner privileges in 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.
9679 9680 9681 9682 9683 9684 |
# File 'lib/tdlib/client_methods.rb', line 9679 def transfer_chat_ownership(chat_id:, user_id:, password:) broadcast('@type' => 'transferChatOwnership', 'chat_id' => chat_id, 'user_id' => user_id, 'password' => password) end |
#translate_message_text(chat_id:, message_id:, to_language_code:) ⇒ TD::Types::FormattedText
Extracts text or caption of the given message and translates it to the given language. If the current user is a Telegram Premium user, then text formatting is preserved.
9700 9701 9702 9703 9704 9705 |
# File 'lib/tdlib/client_methods.rb', line 9700 def (chat_id:, message_id:, to_language_code:) broadcast('@type' => 'translateMessageText', 'chat_id' => chat_id, 'message_id' => , 'to_language_code' => to_language_code) end |
#translate_text(text:, to_language_code:) ⇒ TD::Types::FormattedText
Translates a text to the given language. If the current user is a Telegram Premium user, then text formatting is preserved.
9720 9721 9722 9723 9724 |
# File 'lib/tdlib/client_methods.rb', line 9720 def translate_text(text:, to_language_code:) broadcast('@type' => 'translateText', 'text' => text, 'to_language_code' => to_language_code) end |
#unpin_all_chat_messages(chat_id:) ⇒ TD::Types::Ok
Removes all pinned messages from a chat; requires can_pin_messages member right if the chat is a basic group or
supergroup, or administrator right if the chat is a channel.
9731 9732 9733 9734 |
# File 'lib/tdlib/client_methods.rb', line 9731 def (chat_id:) broadcast('@type' => 'unpinAllChatMessages', 'chat_id' => chat_id) end |
#unpin_all_message_thread_messages(chat_id:, message_thread_id:) ⇒ TD::Types::Ok
Removes all pinned messages from a forum topic; requires can_pin_messages member right in the supergroup.
9741 9742 9743 9744 9745 |
# File 'lib/tdlib/client_methods.rb', line 9741 def (chat_id:, message_thread_id:) broadcast('@type' => 'unpinAllMessageThreadMessages', 'chat_id' => chat_id, 'message_thread_id' => ) end |
#unpin_chat_message(chat_id:, message_id:) ⇒ TD::Types::Ok
Removes a pinned message from a chat; requires can_pin_messages member right if the chat is a basic group or
supergroup, or administrator right if the chat is a channel.
9753 9754 9755 9756 9757 |
# File 'lib/tdlib/client_methods.rb', line 9753 def (chat_id:, message_id:) broadcast('@type' => 'unpinChatMessage', 'chat_id' => chat_id, 'message_id' => ) end |
#upgrade_basic_group_chat_to_supergroup_chat(chat_id:) ⇒ TD::Types::Chat
Creates a new supergroup from an existing basic group and sends a corresponding messageChatUpgradeTo and
; requires owner privileges.
Deactivates the original basic group.
9765 9766 9767 9768 |
# File 'lib/tdlib/client_methods.rb', line 9765 def upgrade_basic_group_chat_to_supergroup_chat(chat_id:) broadcast('@type' => 'upgradeBasicGroupChatToSupergroupChat', 'chat_id' => chat_id) end |
#upload_sticker_file(user_id:, sticker_format:, sticker:) ⇒ TD::Types::File
Uploads a file with a sticker; returns the uploaded file.
9778 9779 9780 9781 9782 9783 |
# File 'lib/tdlib/client_methods.rb', line 9778 def upload_sticker_file(user_id:, sticker_format:, sticker:) broadcast('@type' => 'uploadStickerFile', 'user_id' => user_id, 'sticker_format' => sticker_format, 'sticker' => sticker) end |
#validate_order_info(input_invoice:, order_info: nil, allow_save:) ⇒ TD::Types::ValidatedOrderInfo
Validates the order information provided by a user and returns the available shipping options for a flexible
invoice.
9792 9793 9794 9795 9796 9797 |
# File 'lib/tdlib/client_methods.rb', line 9792 def validate_order_info(input_invoice:, order_info: nil, allow_save:) broadcast('@type' => 'validateOrderInfo', 'input_invoice' => input_invoice, 'order_info' => order_info, 'allow_save' => allow_save) end |
#view_messages(chat_id:, message_ids:, source:, force_read:) ⇒ TD::Types::Ok
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 ).
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 in supergroups and channels).
9811 9812 9813 9814 9815 9816 9817 |
# File 'lib/tdlib/client_methods.rb', line 9811 def (chat_id:, message_ids:, source:, force_read:) broadcast('@type' => 'viewMessages', 'chat_id' => chat_id, 'message_ids' => , 'source' => source, 'force_read' => force_read) end |
#view_premium_feature(feature:) ⇒ TD::Types::Ok
Informs TDLib that the user viewed detailed information about a Premium feature on the Premium features screen.
9823 9824 9825 9826 |
# File 'lib/tdlib/client_methods.rb', line 9823 def view_premium_feature(feature:) broadcast('@type' => 'viewPremiumFeature', 'feature' => feature) end |
#view_trending_sticker_sets(sticker_set_ids:) ⇒ TD::Types::Ok
Informs the server that some trending sticker sets have been viewed by the user.
9832 9833 9834 9835 |
# File 'lib/tdlib/client_methods.rb', line 9832 def view_trending_sticker_sets(sticker_set_ids:) broadcast('@type' => 'viewTrendingStickerSets', 'sticker_set_ids' => sticker_set_ids) end |
#write_generated_file_part(generation_id:, offset:, data:) ⇒ TD::Types::Ok
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.
9845 9846 9847 9848 9849 9850 |
# File 'lib/tdlib/client_methods.rb', line 9845 def write_generated_file_part(generation_id:, offset:, data:) broadcast('@type' => 'writeGeneratedFilePart', 'generation_id' => generation_id, 'offset' => offset, 'data' => data) end |