tdlib-ruby 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/README.md +2 -1
- data/bin/parser +2 -3
- data/lib/tdlib/client_methods.rb +341 -108
- data/lib/tdlib/types.rb +69 -9
- data/lib/tdlib/types/audio.rb +1 -1
- data/lib/tdlib/types/authorization_state.rb +1 -0
- data/lib/tdlib/types/authorization_state/wait_other_device_confirmation.rb +9 -0
- data/lib/tdlib/types/authorization_state/wait_phone_number.rb +2 -0
- data/lib/tdlib/types/auto_download_settings.rb +5 -3
- data/lib/tdlib/types/background.rb +1 -1
- data/lib/tdlib/types/background_fill.rb +11 -0
- data/lib/tdlib/types/background_fill/gradient.rb +13 -0
- data/lib/tdlib/types/background_fill/solid.rb +8 -0
- data/lib/tdlib/types/background_type.rb +1 -1
- data/lib/tdlib/types/background_type/fill.rb +8 -0
- data/lib/tdlib/types/background_type/pattern.rb +7 -6
- data/lib/tdlib/types/background_type/wallpaper.rb +1 -1
- data/lib/tdlib/types/base.rb +1 -1
- data/lib/tdlib/types/basic_group_full_info.rb +2 -2
- data/lib/tdlib/types/call_protocol.rb +2 -2
- data/lib/tdlib/types/can_transfer_ownership_result.rb +13 -0
- data/lib/tdlib/types/can_transfer_ownership_result/ok.rb +5 -0
- data/lib/tdlib/types/can_transfer_ownership_result/password_needed.rb +5 -0
- data/lib/tdlib/types/can_transfer_ownership_result/password_too_fresh.rb +8 -0
- data/lib/tdlib/types/can_transfer_ownership_result/session_too_fresh.rb +8 -0
- data/lib/tdlib/types/chat.rb +9 -2
- data/lib/tdlib/types/chat_action_bar.rb +14 -0
- data/lib/tdlib/types/chat_action_bar/add_contact.rb +6 -0
- data/lib/tdlib/types/chat_action_bar/report_add_block.rb +6 -0
- data/lib/tdlib/types/chat_action_bar/report_spam.rb +5 -0
- data/lib/tdlib/types/chat_action_bar/report_unrelated_location.rb +6 -0
- data/lib/tdlib/types/chat_action_bar/share_phone_number.rb +6 -0
- data/lib/tdlib/types/chat_administrator.rb +12 -0
- data/lib/tdlib/types/chat_administrators.rb +8 -0
- data/lib/tdlib/types/chat_event_action.rb +3 -0
- data/lib/tdlib/types/chat_event_action/linked_chat_changed.rb +10 -0
- data/lib/tdlib/types/chat_event_action/location_changed.rb +10 -0
- data/lib/tdlib/types/chat_event_action/slow_mode_delay_changed.rb +10 -0
- data/lib/tdlib/types/chat_invite_link_info.rb +2 -1
- data/lib/tdlib/types/chat_list.rb +11 -0
- data/lib/tdlib/types/chat_list/archive.rb +6 -0
- data/lib/tdlib/types/chat_list/main.rb +5 -0
- data/lib/tdlib/types/chat_location.rb +10 -0
- data/lib/tdlib/types/chat_member_status/administrator.rb +4 -1
- data/lib/tdlib/types/chat_member_status/creator.rb +4 -1
- data/lib/tdlib/types/chat_members_filter/administrators.rb +1 -1
- data/lib/tdlib/types/chat_nearby.rb +10 -0
- data/lib/tdlib/types/chat_report_reason.rb +1 -0
- data/lib/tdlib/types/chat_report_reason/unrelated_location.rb +5 -0
- data/lib/tdlib/types/chats_nearby.rb +10 -0
- data/lib/tdlib/types/formatted_text.rb +4 -0
- data/lib/tdlib/types/inline_keyboard_button_type/login_url.rb +1 -1
- data/lib/tdlib/types/input_file/remote.rb +4 -0
- data/lib/tdlib/types/input_inline_query_result/sticker.rb +2 -2
- data/lib/tdlib/types/input_message_content/text.rb +2 -1
- data/lib/tdlib/types/log_stream/file.rb +2 -2
- data/lib/tdlib/types/login_url_info.rb +11 -0
- data/lib/tdlib/types/login_url_info/open.rb +10 -0
- data/lib/tdlib/types/login_url_info/request_confirmation.rb +15 -0
- data/lib/tdlib/types/message.rb +7 -1
- data/lib/tdlib/types/message_forward_info.rb +5 -5
- data/lib/tdlib/types/message_scheduling_state.rb +11 -0
- data/lib/tdlib/types/message_scheduling_state/send_at_date.rb +9 -0
- data/lib/tdlib/types/message_scheduling_state/send_when_online.rb +6 -0
- data/lib/tdlib/types/notification.rb +2 -0
- data/lib/tdlib/types/page_block.rb +1 -0
- data/lib/tdlib/types/page_block/voice_note.rb +10 -0
- data/lib/tdlib/types/page_block_table_cell.rb +3 -2
- data/lib/tdlib/types/public_chat_type.rb +11 -0
- data/lib/tdlib/types/public_chat_type/has_username.rb +5 -0
- data/lib/tdlib/types/public_chat_type/is_location_based.rb +5 -0
- data/lib/tdlib/types/public_message_link.rb +1 -1
- data/lib/tdlib/types/push_message_content/chat_add_members.rb +1 -1
- data/lib/tdlib/types/push_message_content/chat_delete_member.rb +1 -1
- data/lib/tdlib/types/remote_file.rb +5 -0
- data/lib/tdlib/types/rich_text/strikethrough.rb +1 -1
- data/lib/tdlib/types/rich_text/url.rb +2 -0
- data/lib/tdlib/types/secret_chat.rb +5 -4
- data/lib/tdlib/types/send_message_options.rb +14 -0
- data/lib/tdlib/types/supergroup.rb +12 -8
- data/lib/tdlib/types/supergroup_full_info.rb +17 -3
- data/lib/tdlib/types/supergroup_members_filter/administrators.rb +1 -1
- data/lib/tdlib/types/terms_of_service.rb +1 -1
- data/lib/tdlib/types/text_entity_type.rb +3 -1
- data/lib/tdlib/types/text_entity_type/strikethrough.rb +5 -0
- data/lib/tdlib/types/text_entity_type/underline.rb +5 -0
- data/lib/tdlib/types/text_parse_mode/markdown.rb +4 -0
- data/lib/tdlib/types/ton_lite_server_response.rb +8 -0
- data/lib/tdlib/types/ton_wallet_password_salt.rb +8 -0
- data/lib/tdlib/types/top_chat_category.rb +1 -0
- data/lib/tdlib/types/top_chat_category/forward_chats.rb +5 -0
- data/lib/tdlib/types/update.rb +5 -0
- data/lib/tdlib/types/update/active_notifications.rb +1 -1
- data/lib/tdlib/types/update/chat_action_bar.rb +10 -0
- data/lib/tdlib/types/update/chat_chat_list.rb +11 -0
- data/lib/tdlib/types/update/chat_has_scheduled_messages.rb +10 -0
- data/lib/tdlib/types/update/chat_last_message.rb +1 -1
- data/lib/tdlib/types/update/chat_order.rb +2 -1
- data/lib/tdlib/types/update/have_pending_notifications.rb +1 -1
- data/lib/tdlib/types/update/message_live_location_viewed.rb +11 -0
- data/lib/tdlib/types/update/new_callback_query.rb +1 -1
- data/lib/tdlib/types/update/unread_chat_count.rb +5 -1
- data/lib/tdlib/types/update/unread_message_count.rb +4 -2
- data/lib/tdlib/types/update/users_nearby.rb +9 -0
- data/lib/tdlib/types/user.rb +7 -10
- data/lib/tdlib/types/user_full_info.rb +3 -0
- data/lib/tdlib/types/user_privacy_setting.rb +2 -0
- data/lib/tdlib/types/user_privacy_setting/allow_finding_by_phone_number.rb +7 -0
- data/lib/tdlib/types/user_privacy_setting/show_phone_number.rb +5 -0
- data/lib/tdlib/types/user_privacy_setting_rule.rb +2 -0
- data/lib/tdlib/types/user_privacy_setting_rule/allow_chat_members.rb +8 -0
- data/lib/tdlib/types/user_privacy_setting_rule/allow_users.rb +1 -1
- data/lib/tdlib/types/user_privacy_setting_rule/restrict_chat_members.rb +8 -0
- data/lib/tdlib/types/user_privacy_setting_rule/restrict_users.rb +1 -1
- data/lib/tdlib/types/user_type/deleted.rb +1 -1
- data/lib/tdlib/types/user_type/unknown.rb +1 -1
- data/lib/tdlib/types/video.rb +1 -1
- data/lib/tdlib/version.rb +1 -1
- data/tdlib-ruby.gemspec +6 -6
- metadata +68 -21
- data/lib/tdlib/types/background_type/solid.rb +0 -8
- data/lib/tdlib/types/chat_report_spam_state.rb +0 -8
- data/lib/tdlib/types/link_state.rb +0 -13
- data/lib/tdlib/types/link_state/is_contact.rb +0 -5
- data/lib/tdlib/types/link_state/knows_phone_number.rb +0 -5
- data/lib/tdlib/types/link_state/none.rb +0 -5
@@ -3,7 +3,7 @@ module TD::Types
|
|
3
3
|
#
|
4
4
|
# @attr is_blurred [Boolean] True, if the wallpaper must be downscaled to fit in 450x450 square and then box-blurred
|
5
5
|
# with radius 12.
|
6
|
-
# @attr is_moving [Boolean] True, if the background needs to be slightly moved when device is
|
6
|
+
# @attr is_moving [Boolean] True, if the background needs to be slightly moved when device is tilted.
|
7
7
|
class BackgroundType::Wallpaper < BackgroundType
|
8
8
|
attribute :is_blurred, TD::Types::Bool
|
9
9
|
attribute :is_moving, TD::Types::Bool
|
data/lib/tdlib/types/base.rb
CHANGED
@@ -4,8 +4,8 @@ module TD::Types
|
|
4
4
|
# @attr description [String] Group description.
|
5
5
|
# @attr creator_user_id [Integer] User identifier of the creator of the group; 0 if unknown.
|
6
6
|
# @attr members [Array<TD::Types::ChatMember>] Group members.
|
7
|
-
# @attr invite_link [String] Invite link for this group; available only
|
8
|
-
#
|
7
|
+
# @attr invite_link [String] Invite link for this group; available only after it has been generated at least once and
|
8
|
+
# only for the group creator.
|
9
9
|
class BasicGroupFullInfo < Base
|
10
10
|
attribute :description, TD::Types::String
|
11
11
|
attribute :creator_user_id, TD::Types::Integer
|
@@ -3,8 +3,8 @@ module TD::Types
|
|
3
3
|
#
|
4
4
|
# @attr udp_p2p [Boolean] True, if UDP peer-to-peer connections are supported.
|
5
5
|
# @attr udp_reflector [Boolean] True, if connection through UDP reflectors is supported.
|
6
|
-
# @attr min_layer [Integer]
|
7
|
-
# @attr max_layer [Integer]
|
6
|
+
# @attr min_layer [Integer] The minimum supported API layer; use 65.
|
7
|
+
# @attr max_layer [Integer] The maximum supported API layer; use 65.
|
8
8
|
class CallProtocol < Base
|
9
9
|
attribute :udp_p2p, TD::Types::Bool
|
10
10
|
attribute :udp_reflector, TD::Types::Bool
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Represents result of checking whether the current session can be used to transfer a chat ownership to another user.
|
3
|
+
class CanTransferOwnershipResult < Base
|
4
|
+
%w[
|
5
|
+
ok
|
6
|
+
password_needed
|
7
|
+
password_too_fresh
|
8
|
+
session_too_fresh
|
9
|
+
].each do |type|
|
10
|
+
autoload TD::Types.camelize(type), "tdlib/types/can_transfer_ownership_result/#{type}"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The 2-step verification was enabled recently, user needs to wait.
|
3
|
+
#
|
4
|
+
# @attr retry_after [Integer] Time left before the session can be used to transfer ownership of a chat, in seconds.
|
5
|
+
class CanTransferOwnershipResult::PasswordTooFresh < CanTransferOwnershipResult
|
6
|
+
attribute :retry_after, TD::Types::Integer
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The session was created recently, user needs to wait.
|
3
|
+
#
|
4
|
+
# @attr retry_after [Integer] Time left before the session can be used to transfer ownership of a chat, in seconds.
|
5
|
+
class CanTransferOwnershipResult::SessionTooFresh < CanTransferOwnershipResult
|
6
|
+
attribute :retry_after, TD::Types::Integer
|
7
|
+
end
|
8
|
+
end
|
data/lib/tdlib/types/chat.rb
CHANGED
@@ -4,6 +4,7 @@ module TD::Types
|
|
4
4
|
#
|
5
5
|
# @attr id [Integer] Chat unique identifier.
|
6
6
|
# @attr type [TD::Types::ChatType] Type of the chat.
|
7
|
+
# @attr chat_list [TD::Types::ChatList, nil] A chat list to which the chat belongs; may be null.
|
7
8
|
# @attr title [String] Chat title.
|
8
9
|
# @attr photo [TD::Types::ChatPhoto, nil] Chat photo; may be null.
|
9
10
|
# @attr permissions [TD::Types::ChatPermissions] Actions that non-administrator chat members are allowed to take in
|
@@ -15,6 +16,7 @@ module TD::Types
|
|
15
16
|
# @attr is_pinned [Boolean] True, if the chat is pinned.
|
16
17
|
# @attr is_marked_as_unread [Boolean] True, if the chat is marked as unread.
|
17
18
|
# @attr is_sponsored [Boolean] True, if the chat is sponsored by the user's MTProxy server.
|
19
|
+
# @attr has_scheduled_messages [Boolean] True, if the chat has scheduled messages.
|
18
20
|
# @attr can_be_deleted_only_for_self [Boolean] True, if the chat messages can be deleted only for the current user
|
19
21
|
# while other users will continue to see the messages.
|
20
22
|
# @attr can_be_deleted_for_all_users [Boolean] True, if the chat messages can be deleted for all users.
|
@@ -26,16 +28,19 @@ module TD::Types
|
|
26
28
|
# @attr last_read_outbox_message_id [Integer] Identifier of the last read outgoing message.
|
27
29
|
# @attr unread_mention_count [Integer] Number of unread messages with a mention/reply in the chat.
|
28
30
|
# @attr notification_settings [TD::Types::ChatNotificationSettings] Notification settings for this chat.
|
31
|
+
# @attr action_bar [TD::Types::ChatActionBar, nil] Describes actions which should be possible to do through a chat
|
32
|
+
# action bar; may be null.
|
29
33
|
# @attr pinned_message_id [Integer] Identifier of the pinned message in the chat; 0 if none.
|
30
34
|
# @attr reply_markup_message_id [Integer] Identifier of the message from which reply markup needs to be used; 0 if
|
31
35
|
# there is no default custom reply markup in the chat.
|
32
36
|
# @attr draft_message [TD::Types::DraftMessage, nil] A draft of a message in the chat; may be null.
|
33
37
|
# @attr client_data [String] Contains client-specific data associated with the chat.
|
34
|
-
# (For example, the chat position or local chat notification settings can be stored here.) Persistent if
|
35
|
-
# database is used.
|
38
|
+
# (For example, the chat position or local chat notification settings can be stored here.) Persistent if the
|
39
|
+
# message database is used.
|
36
40
|
class Chat < Base
|
37
41
|
attribute :id, TD::Types::Integer
|
38
42
|
attribute :type, TD::Types::ChatType
|
43
|
+
attribute :chat_list, TD::Types::ChatList.optional.default(nil)
|
39
44
|
attribute :title, TD::Types::String
|
40
45
|
attribute :photo, TD::Types::ChatPhoto.optional.default(nil)
|
41
46
|
attribute :permissions, TD::Types::ChatPermissions
|
@@ -44,6 +49,7 @@ module TD::Types
|
|
44
49
|
attribute :is_pinned, TD::Types::Bool
|
45
50
|
attribute :is_marked_as_unread, TD::Types::Bool
|
46
51
|
attribute :is_sponsored, TD::Types::Bool
|
52
|
+
attribute :has_scheduled_messages, TD::Types::Bool
|
47
53
|
attribute :can_be_deleted_only_for_self, TD::Types::Bool
|
48
54
|
attribute :can_be_deleted_for_all_users, TD::Types::Bool
|
49
55
|
attribute :can_be_reported, TD::Types::Bool
|
@@ -53,6 +59,7 @@ module TD::Types
|
|
53
59
|
attribute :last_read_outbox_message_id, TD::Types::Integer
|
54
60
|
attribute :unread_mention_count, TD::Types::Integer
|
55
61
|
attribute :notification_settings, TD::Types::ChatNotificationSettings
|
62
|
+
attribute :action_bar, TD::Types::ChatActionBar.optional.default(nil)
|
56
63
|
attribute :pinned_message_id, TD::Types::Integer
|
57
64
|
attribute :reply_markup_message_id, TD::Types::Integer
|
58
65
|
attribute :draft_message, TD::Types::DraftMessage.optional.default(nil)
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Describes actions which should be possible to do through a chat action bar.
|
3
|
+
class ChatActionBar < Base
|
4
|
+
%w[
|
5
|
+
report_spam
|
6
|
+
report_unrelated_location
|
7
|
+
report_add_block
|
8
|
+
add_contact
|
9
|
+
share_phone_number
|
10
|
+
].each do |type|
|
11
|
+
autoload TD::Types.camelize(type), "tdlib/types/chat_action_bar/#{type}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The chat is a private or secret chat, which can be reported using the method reportChat, or the other user can be
|
3
|
+
# added to the contact list using the method addContact, or the other user can be blocked using the method blockUser.
|
4
|
+
class ChatActionBar::ReportAddBlock < ChatActionBar
|
5
|
+
end
|
6
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The chat is a location-based supergroup, which can be reported as having unrelated location using the method
|
3
|
+
# reportChat with the reason chatReportReasonUnrelatedLocation.
|
4
|
+
class ChatActionBar::ReportUnrelatedLocation < ChatActionBar
|
5
|
+
end
|
6
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Contains information about a chat administrator.
|
3
|
+
#
|
4
|
+
# @attr user_id [Integer] User identifier of the administrator.
|
5
|
+
# @attr custom_title [String] Custom title of the administrator.
|
6
|
+
# @attr is_owner [Boolean] True, if the user is the owner of the chat.
|
7
|
+
class ChatAdministrator < Base
|
8
|
+
attribute :user_id, TD::Types::Integer
|
9
|
+
attribute :custom_title, TD::Types::String
|
10
|
+
attribute :is_owner, TD::Types::Bool
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Represents a list of chat administrators.
|
3
|
+
#
|
4
|
+
# @attr administrators [Array<TD::Types::ChatAdministrator>] A list of chat administrators.
|
5
|
+
class ChatAdministrators < Base
|
6
|
+
attribute :administrators, TD::Types::Array.of(TD::Types::ChatAdministrator)
|
7
|
+
end
|
8
|
+
end
|
@@ -18,8 +18,11 @@ module TD::Types
|
|
18
18
|
username_changed
|
19
19
|
photo_changed
|
20
20
|
invites_toggled
|
21
|
+
linked_chat_changed
|
22
|
+
slow_mode_delay_changed
|
21
23
|
sign_messages_toggled
|
22
24
|
sticker_set_changed
|
25
|
+
location_changed
|
23
26
|
is_all_history_available_toggled
|
24
27
|
].each do |type|
|
25
28
|
autoload TD::Types.camelize(type), "tdlib/types/chat_event_action/#{type}"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The linked chat of a supergroup was changed.
|
3
|
+
#
|
4
|
+
# @attr old_linked_chat_id [Integer] Previous supergroup linked chat identifier.
|
5
|
+
# @attr new_linked_chat_id [Integer] New supergroup linked chat identifier.
|
6
|
+
class ChatEventAction::LinkedChatChanged < ChatEventAction
|
7
|
+
attribute :old_linked_chat_id, TD::Types::Integer
|
8
|
+
attribute :new_linked_chat_id, TD::Types::Integer
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The supergroup location was changed.
|
3
|
+
#
|
4
|
+
# @attr old_location [TD::Types::ChatLocation, nil] Previous location; may be null.
|
5
|
+
# @attr new_location [TD::Types::ChatLocation, nil] New location; may be null.
|
6
|
+
class ChatEventAction::LocationChanged < ChatEventAction
|
7
|
+
attribute :old_location, TD::Types::ChatLocation.optional.default(nil)
|
8
|
+
attribute :new_location, TD::Types::ChatLocation.optional.default(nil)
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# The slow_mode_delay setting of a supergroup was changed.
|
3
|
+
#
|
4
|
+
# @attr old_slow_mode_delay [Integer] Previous value of slow_mode_delay.
|
5
|
+
# @attr new_slow_mode_delay [Integer] New value of slow_mode_delay.
|
6
|
+
class ChatEventAction::SlowModeDelayChanged < ChatEventAction
|
7
|
+
attribute :old_slow_mode_delay, TD::Types::Integer
|
8
|
+
attribute :new_slow_mode_delay, TD::Types::Integer
|
9
|
+
end
|
10
|
+
end
|
@@ -7,7 +7,8 @@ module TD::Types
|
|
7
7
|
# @attr photo [TD::Types::ChatPhoto, nil] Chat photo; may be null.
|
8
8
|
# @attr member_count [Integer] Number of members.
|
9
9
|
# @attr member_user_ids [Array<Integer>] User identifiers of some chat members that may be known to the current user.
|
10
|
-
# @attr is_public [Boolean] True, if the chat is a public supergroup or
|
10
|
+
# @attr is_public [Boolean] True, if the chat is a public supergroup or channel, i.e.
|
11
|
+
# it has a username or it is a location-based supergroup.
|
11
12
|
class ChatInviteLinkInfo < Base
|
12
13
|
attribute :chat_id, TD::Types::Integer
|
13
14
|
attribute :type, TD::Types::ChatType
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Represents a location to which a chat is connected.
|
3
|
+
#
|
4
|
+
# @attr location [TD::Types::Location] The location.
|
5
|
+
# @attr address [String] Location address; 1-64 characters, as defined by the chat owner.
|
6
|
+
class ChatLocation < Base
|
7
|
+
attribute :location, TD::Types::Location
|
8
|
+
attribute :address, TD::Types::String
|
9
|
+
end
|
10
|
+
end
|
@@ -4,6 +4,8 @@ module TD::Types
|
|
4
4
|
# members.
|
5
5
|
# In supergroups and channels, there are more detailed options for administrator privileges.
|
6
6
|
#
|
7
|
+
# @attr custom_title [String] A custom title of the administrator; 0-16 characters without emojis; applicable to
|
8
|
+
# supergroups only.
|
7
9
|
# @attr can_be_edited [Boolean] True, if the current user can edit the administrator privileges for the called user.
|
8
10
|
# @attr can_change_info [Boolean] True, if the administrator can change the chat title, photo, and other settings.
|
9
11
|
# @attr can_post_messages [Boolean] True, if the administrator can create channel posts; applicable to channels only.
|
@@ -14,8 +16,9 @@ module TD::Types
|
|
14
16
|
# @attr can_restrict_members [Boolean] True, if the administrator can restrict, ban, or unban chat members.
|
15
17
|
# @attr can_pin_messages [Boolean] True, if the administrator can pin messages; applicable to groups only.
|
16
18
|
# @attr can_promote_members [Boolean] True, if the administrator can add new administrators with a subset of their
|
17
|
-
# own privileges or demote administrators that were directly or indirectly promoted by
|
19
|
+
# own privileges or demote administrators that were directly or indirectly promoted by them.
|
18
20
|
class ChatMemberStatus::Administrator < ChatMemberStatus
|
21
|
+
attribute :custom_title, TD::Types::String
|
19
22
|
attribute :can_be_edited, TD::Types::Bool
|
20
23
|
attribute :can_change_info, TD::Types::Bool
|
21
24
|
attribute :can_post_messages, TD::Types::Bool
|
@@ -1,8 +1,11 @@
|
|
1
1
|
module TD::Types
|
2
|
-
# The user is the
|
2
|
+
# The user is the owner of a chat and has all the administrator privileges.
|
3
3
|
#
|
4
|
+
# @attr custom_title [String] A custom title of the owner; 0-16 characters without emojis; applicable to supergroups
|
5
|
+
# only.
|
4
6
|
# @attr is_member [Boolean] True, if the user is a member of the chat.
|
5
7
|
class ChatMemberStatus::Creator < ChatMemberStatus
|
8
|
+
attribute :custom_title, TD::Types::String
|
6
9
|
attribute :is_member, TD::Types::Bool
|
7
10
|
end
|
8
11
|
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Describes a chat located nearby.
|
3
|
+
#
|
4
|
+
# @attr chat_id [Integer] Chat identifier.
|
5
|
+
# @attr distance [Integer] Distance to the chat location in meters.
|
6
|
+
class ChatNearby < Base
|
7
|
+
attribute :chat_id, TD::Types::Integer
|
8
|
+
attribute :distance, TD::Types::Integer
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module TD::Types
|
2
|
+
# Represents a list of chats located nearby.
|
3
|
+
#
|
4
|
+
# @attr users_nearby [Array<TD::Types::ChatNearby>] List of users nearby.
|
5
|
+
# @attr supergroups_nearby [Array<TD::Types::ChatNearby>] List of location-based supergroups nearby.
|
6
|
+
class ChatsNearby < Base
|
7
|
+
attribute :users_nearby, TD::Types::Array.of(TD::Types::ChatNearby)
|
8
|
+
attribute :supergroups_nearby, TD::Types::Array.of(TD::Types::ChatNearby)
|
9
|
+
end
|
10
|
+
end
|
@@ -3,6 +3,10 @@ module TD::Types
|
|
3
3
|
#
|
4
4
|
# @attr text [String] The text.
|
5
5
|
# @attr entities [Array<TD::Types::TextEntity>] Entities contained in the text.
|
6
|
+
# Entities can be nested, but must not mutually intersect with each other.
|
7
|
+
# Pre, Code and PreCode entities can't contain other entities.
|
8
|
+
# Bold, Italic, Underline and Strikethrough entities can contain and to be contained in all other entities.
|
9
|
+
# All other entities can't contain each other.
|
6
10
|
class FormattedText < Base
|
7
11
|
attribute :text, TD::Types::String
|
8
12
|
attribute :entities, TD::Types::Array.of(TD::Types::TextEntity)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module TD::Types
|
2
2
|
# A button that opens a specified URL and automatically logs in in current user if they allowed to do that.
|
3
3
|
#
|
4
|
-
# @attr url [String] HTTP URL to open.
|
4
|
+
# @attr url [String] An HTTP URL to open.
|
5
5
|
# @attr id [Integer] Unique button identifier.
|
6
6
|
# @attr forward_text [String] If non-empty, new text of the button in forwarded messages.
|
7
7
|
class InlineKeyboardButtonType::LoginUrl < InlineKeyboardButtonType
|
@@ -1,5 +1,9 @@
|
|
1
1
|
module TD::Types
|
2
2
|
# A file defined by its remote ID.
|
3
|
+
# The remote ID is guaranteed to be usable only if the corresponding file is still accessible to the user and known
|
4
|
+
# to TDLib.
|
5
|
+
# For example, if the file is from a message, then the message must be not deleted and accessible to the user.
|
6
|
+
# If the file database is disabled, then the corresponding object with the file must be preloaded by the client.
|
3
7
|
#
|
4
8
|
# @attr id [String] Remote file identifier.
|
5
9
|
class InputFile::Remote < InputFile
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module TD::Types
|
2
|
-
# Represents a link to a WEBP or
|
2
|
+
# Represents a link to a WEBP or TGS sticker.
|
3
3
|
#
|
4
4
|
# @attr id [String] Unique identifier of the query result.
|
5
5
|
# @attr thumbnail_url [String] URL of the sticker thumbnail, if it exists.
|
6
|
-
# @attr sticker_url [String] The URL of the WEBP or
|
6
|
+
# @attr sticker_url [String] The URL of the WEBP or TGS sticker (sticker file size must not exceed 5MB).
|
7
7
|
# @attr sticker_width [Integer] Width of the sticker.
|
8
8
|
# @attr sticker_height [Integer] Height of the sticker.
|
9
9
|
# @attr reply_markup [TD::Types::ReplyMarkup] The message reply markup.
|