-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
387 changed files
with
5,371 additions
and
1,881 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module TD::Types | ||
# Represents a reaction applied to a message. | ||
# | ||
# @attr type [TD::Types::ReactionType] Type of the reaction. | ||
# @attr sender_id [TD::Types::MessageSender] Identifier of the chat member, applied the reaction. | ||
class AddedReaction < Base | ||
attribute :type, TD::Types::ReactionType | ||
attribute :sender_id, TD::Types::MessageSender | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module TD::Types | ||
# Represents a list of reactions added to a message. | ||
# | ||
# @attr total_count [Integer] The total number of found reactions. | ||
# @attr reactions [Array<TD::Types::AddedReaction>] The list of added reactions. | ||
# @attr next_offset [TD::Types::String] The offset for the next request. | ||
# If empty, there are no more results. | ||
class AddedReactions < Base | ||
attribute :total_count, TD::Types::Coercible::Integer | ||
attribute :reactions, TD::Types::Array.of(TD::Types::AddedReaction) | ||
attribute :next_offset, TD::Types::String | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
module TD::Types | ||
# Describes an animated representation of an emoji. | ||
# Describes an animated or custom representation of an emoji. | ||
# | ||
# @attr sticker [TD::Types::Sticker] Animated sticker for the emoji. | ||
# @attr color_replacements [Array<TD::Types::ColorReplacement>] List of colors to be replaced while the sticker is | ||
# rendered. | ||
# @attr sound [TD::Types::File, nil] File containing the sound to be played when the animated emoji is clicked if | ||
# any; may be null. | ||
# @attr sticker [TD::Types::Sticker, nil] Sticker for the emoji; may be null if yet unknown for a custom emoji. | ||
# If the sticker is a custom emoji, it can have arbitrary format different from stickerFormatTgs. | ||
# @attr sticker_width [Integer] Expected width of the sticker, which can be used if the sticker is null. | ||
# @attr sticker_height [Integer] Expected height of the sticker, which can be used if the sticker is null. | ||
# @attr fitzpatrick_type [Integer] Emoji modifier fitzpatrick type; 0-6; 0 if none. | ||
# @attr sound [TD::Types::File, nil] File containing the sound to be played when the sticker is clicked; may be null. | ||
# The sound is encoded with the Opus codec, and stored inside an OGG container. | ||
class AnimatedEmoji < Base | ||
attribute :sticker, TD::Types::Sticker | ||
attribute :color_replacements, TD::Types::Array.of(TD::Types::ColorReplacement) | ||
attribute :sticker, TD::Types::Sticker.optional.default(nil) | ||
attribute :sticker_width, TD::Types::Coercible::Integer | ||
attribute :sticker_height, TD::Types::Coercible::Integer | ||
attribute :fitzpatrick_type, TD::Types::Coercible::Integer | ||
attribute :sound, TD::Types::File.optional.default(nil) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
module TD::Types | ||
# Represents a bot added to attachment menu. | ||
# | ||
# @attr bot_user_id [Integer] User identifier of the bot added to attachment menu. | ||
# @attr supports_self_chat [Boolean] True, if the bot supports opening from attachment menu in the chat with the bot. | ||
# @attr supports_user_chats [Boolean] True, if the bot supports opening from attachment menu in private chats with | ||
# ordinary users. | ||
# @attr supports_bot_chats [Boolean] True, if the bot supports opening from attachment menu in private chats with | ||
# other bots. | ||
# @attr supports_group_chats [Boolean] True, if the bot supports opening from attachment menu in basic group and | ||
# supergroup chats. | ||
# @attr supports_channel_chats [Boolean] True, if the bot supports opening from attachment menu in channel chats. | ||
# @attr supports_settings [Boolean] True, if the bot supports "settings_button_pressed" event. | ||
# @attr name [TD::Types::String] Name for the bot in attachment menu. | ||
# @attr name_color [TD::Types::AttachmentMenuBotColor, nil] Color to highlight selected name of the bot if | ||
# appropriate; may be null. | ||
# @attr default_icon [TD::Types::File, nil] Default attachment menu icon for the bot in SVG format; may be null. | ||
# @attr ios_static_icon [TD::Types::File, nil] Attachment menu icon for the bot in SVG format for the official iOS | ||
# app; may be null. | ||
# @attr ios_animated_icon [TD::Types::File, nil] Attachment menu icon for the bot in TGS format for the official iOS | ||
# app; may be null. | ||
# @attr android_icon [TD::Types::File, nil] Attachment menu icon for the bot in TGS format for the official Android | ||
# app; may be null. | ||
# @attr macos_icon [TD::Types::File, nil] Attachment menu icon for the bot in TGS format for the official native | ||
# macOS app; may be null. | ||
# @attr icon_color [TD::Types::AttachmentMenuBotColor, nil] Color to highlight selected icon of the bot if | ||
# appropriate; may be null. | ||
# @attr web_app_placeholder [TD::Types::File, nil] Default placeholder for opened Web Apps in SVG format; may be | ||
# null. | ||
class AttachmentMenuBot < Base | ||
attribute :bot_user_id, TD::Types::Coercible::Integer | ||
attribute :supports_self_chat, TD::Types::Bool | ||
attribute :supports_user_chats, TD::Types::Bool | ||
attribute :supports_bot_chats, TD::Types::Bool | ||
attribute :supports_group_chats, TD::Types::Bool | ||
attribute :supports_channel_chats, TD::Types::Bool | ||
attribute :supports_settings, TD::Types::Bool | ||
attribute :name, TD::Types::String | ||
attribute :name_color, TD::Types::AttachmentMenuBotColor.optional.default(nil) | ||
attribute :default_icon, TD::Types::File.optional.default(nil) | ||
attribute :ios_static_icon, TD::Types::File.optional.default(nil) | ||
attribute :ios_animated_icon, TD::Types::File.optional.default(nil) | ||
attribute :android_icon, TD::Types::File.optional.default(nil) | ||
attribute :macos_icon, TD::Types::File.optional.default(nil) | ||
attribute :icon_color, TD::Types::AttachmentMenuBotColor.optional.default(nil) | ||
attribute :web_app_placeholder, TD::Types::File.optional.default(nil) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module TD::Types | ||
# Describes a color to highlight a bot added to attachment menu. | ||
# | ||
# @attr light_color [Integer] Color in the RGB24 format for light themes. | ||
# @attr dark_color [Integer] Color in the RGB24 format for dark themes. | ||
class AttachmentMenuBotColor < Base | ||
attribute :light_color, TD::Types::Coercible::Integer | ||
attribute :dark_color, TD::Types::Coercible::Integer | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module TD::Types | ||
# An authentication code is delivered to https://fragment.com. | ||
# The user must be logged in there via a wallet owning the phone number's NFT. | ||
# | ||
# @attr url [TD::Types::String] URL to open to receive the code. | ||
# @attr length [Integer] Length of the code. | ||
class AuthenticationCodeType::Fragment < AuthenticationCodeType | ||
attribute :url, TD::Types::String | ||
attribute :length, TD::Types::Coercible::Integer | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module TD::Types | ||
# An authentication code is delivered by an immediately canceled call to the specified phone number. | ||
# The last digits of the phone number that calls are the code that must be entered manually by the user. | ||
# | ||
# @attr phone_number_prefix [TD::Types::String] Prefix of the phone number from which the call will be made. | ||
# @attr length [Integer] Number of digits in the code, excluding the prefix. | ||
class AuthenticationCodeType::MissedCall < AuthenticationCodeType | ||
attribute :phone_number_prefix, TD::Types::String | ||
attribute :length, TD::Types::Coercible::Integer | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module TD::Types | ||
# TDLib needs the user's email address to authorize. | ||
# Call `setAuthenticationEmailAddress` to provide the email address, or directly call `checkAuthenticationEmailCode` | ||
# with Apple ID/Google ID token if allowed. | ||
# | ||
# @attr allow_apple_id [Boolean] True, if authorization through Apple ID is allowed. | ||
# @attr allow_google_id [Boolean] True, if authorization through Google ID is allowed. | ||
class AuthorizationState::WaitEmailAddress < AuthorizationState | ||
attribute :allow_apple_id, TD::Types::Bool | ||
attribute :allow_google_id, TD::Types::Bool | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module TD::Types | ||
# TDLib needs the user's authentication code sent to an email address to authorize. | ||
# Call `checkAuthenticationEmailCode` to provide the code. | ||
# | ||
# @attr allow_apple_id [Boolean] True, if authorization through Apple ID is allowed. | ||
# @attr allow_google_id [Boolean] True, if authorization through Google ID is allowed. | ||
# @attr code_info [TD::Types::EmailAddressAuthenticationCodeInfo] Information about the sent authentication code. | ||
# @attr next_phone_number_authorization_date [Integer] Point in time (Unix timestamp) when the user will be able to | ||
# authorize with a code sent to the user's phone number; 0 if unknown. | ||
class AuthorizationState::WaitEmailCode < AuthorizationState | ||
attribute :allow_apple_id, TD::Types::Bool | ||
attribute :allow_google_id, TD::Types::Bool | ||
attribute :code_info, TD::Types::EmailAddressAuthenticationCodeInfo | ||
attribute :next_phone_number_authorization_date, TD::Types::Coercible::Integer | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
module TD::Types | ||
# TDLib needs TdlibParameters for initialization. | ||
# Initializetion parameters are needed. | ||
# Call `setTdlibParameters` to provide them. | ||
class AuthorizationState::WaitTdlibParameters < AuthorizationState | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module TD::Types | ||
# Represents an available reaction. | ||
# | ||
# @attr type [TD::Types::ReactionType] Type of the reaction. | ||
# @attr needs_premium [Boolean] True, if Telegram Premium is needed to send the reaction. | ||
class AvailableReaction < Base | ||
attribute :type, TD::Types::ReactionType | ||
attribute :needs_premium, TD::Types::Bool | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module TD::Types | ||
# Represents a list of reactions that can be added to a message. | ||
# | ||
# @attr top_reactions [Array<TD::Types::AvailableReaction>] List of reactions to be shown at the top. | ||
# @attr recent_reactions [Array<TD::Types::AvailableReaction>] List of recently used reactions. | ||
# @attr popular_reactions [Array<TD::Types::AvailableReaction>] List of popular reactions. | ||
# @attr allow_custom_emoji [Boolean] True, if custom emoji reactions could be added by Telegram Premium subscribers. | ||
class AvailableReactions < Base | ||
attribute :top_reactions, TD::Types::Array.of(TD::Types::AvailableReaction) | ||
attribute :recent_reactions, TD::Types::Array.of(TD::Types::AvailableReaction) | ||
attribute :popular_reactions, TD::Types::Array.of(TD::Types::AvailableReaction) | ||
attribute :allow_custom_emoji, TD::Types::Bool | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module TD::Types | ||
# Contains information about a bot. | ||
# | ||
# @attr share_text [TD::Types::String] The text that is shown on the bot's profile page and is sent together with the | ||
# link when users share the bot. | ||
# @attr description [TD::Types::String] The text shown in the chat with the bot if the chat is empty. | ||
# @attr photo [TD::Types::Photo, nil] Photo shown in the chat with the bot if the chat is empty; may be null. | ||
# @attr animation [TD::Types::Animation, nil] Animation shown in the chat with the bot if the chat is empty; may be | ||
# null. | ||
# @attr menu_button [TD::Types::BotMenuButton, nil] Information about a button to show instead of the bot commands | ||
# menu button; may be null if ordinary bot commands menu must be shown. | ||
# @attr commands [Array<TD::Types::BotCommand>] List of the bot commands. | ||
# @attr default_group_administrator_rights [TD::Types::ChatAdministratorRights, nil] Default administrator rights for | ||
# adding the bot to basic group and supergroup chats; may be null. | ||
# @attr default_channel_administrator_rights [TD::Types::ChatAdministratorRights, nil] Default administrator rights | ||
# for adding the bot to channels; may be null. | ||
class BotInfo < Base | ||
attribute :share_text, TD::Types::String | ||
attribute :description, TD::Types::String | ||
attribute :photo, TD::Types::Photo.optional.default(nil) | ||
attribute :animation, TD::Types::Animation.optional.default(nil) | ||
attribute :menu_button, TD::Types::BotMenuButton.optional.default(nil) | ||
attribute :commands, TD::Types::Array.of(TD::Types::BotCommand) | ||
attribute :default_group_administrator_rights, TD::Types::ChatAdministratorRights.optional.default(nil) | ||
attribute :default_channel_administrator_rights, TD::Types::ChatAdministratorRights.optional.default(nil) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module TD::Types | ||
# Describes a button to be shown instead of bot commands menu button. | ||
# | ||
# @attr text [TD::Types::String] Text of the button. | ||
# @attr url [TD::Types::String] URL to be passed to openWebApp. | ||
class BotMenuButton < Base | ||
attribute :text, TD::Types::String | ||
attribute :url, TD::Types::String | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.