//@description Code is delivered by the immediately cancelled call to the specified phone number. Number from which the call was done is the code @pattern Pattern of the phone number from which the call will be done
//@class AuthState @description Represents current authorization state of the Client
//@description TDLib needs user's phone number to authorize
authStateWaitPhoneNumber = AuthState;
//@description TDLib needs user authentication code to finish authorization @is_registered True, if user is already registered @code_type Describes the way, code was sent to the user @next_code_type Describes the way, next code will be sent to the user, nullable @timeout Timeout in seconds before code should be resent by calling resendAuthCode
//@description User is authorized but he needs to enter its password to begin to use application @password_hint Hint on password, can be empty @has_recovery_email Is recovery email set up
//@recovery_email_pattern Pattern of email to which recovery mail was sent, empty before recovery email was sent
//@description User is successfully authorized. TDLib can answer queries
authStateOk = AuthState;
//@description User is currently logging out
authStateLoggingOut = AuthState;
//@description Represents current state of the two-step verification @has_password Is password set up @password_hint Hint on password, can be empty @has_recovery_email Is recovery email set up @unconfirmed_recovery_email_pattern Pattern of email to which confirmation mail was sent
//@description Contains information available to the user after requesting password recovery @recovery_email_pattern Pattern of email to which recovery mail was sent
//@description Returns information about availability of temporary password, which should be used for payments @has_password True, if we have temporary password @valid_for Time left before temporary password expires, seconds
//@persistent_id Persistent file identifier, if exists. Can be used across application restarts or even other devices for current logged user. If begins with "http://" or "https://", it is HTTP URL of the file. Currently, TDLib is unable to download files if only they URL is known.-If downloadFile is called on a such file or it is sended to a secret chat TDLib starts file generation process by sending to the client updateFileGenerationStart with HTTP URL in the original_path and "#url#" as conversion string. Client supposed to generate the file by downloading it to the specified location
//@description File generated by the client @original_path Local path to a file from which the file is generated, may be empty if there is no such file @conversion String specifying conversion applied to the original file, should be persistent across application restart @expected_size Expected size of the generated file, 0 if unknown
//@description Photo description @type Thumbnail type (see https://core.telegram.org/constructor/photoSize) @photo Information about photo file @width Photo width @height Photo height
//@description Position on a photo where a mask should be placed @point Part of a face relative to which the mask should be placed. 0 - forehead, 1 - eyes, 2 - mouth, 3 - chin
//@x_shift Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. For example, choosing -1.0 will place mask just to the left of the default mask position
//@y_shift Shift by Y-axis measured in heights of the mask scaled to the face size, from top to bottom. For example, 1.0 will place the mask just below the default mask position.
//@scale Mask scaling coefficient. For example, 2.0 means double size
//@description Represent part of the text which needs to be formatted in some unusual way @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points @type Type of the entity
//@description Describes animation file. Animation should be encoded in gif or mp4 format @duration Duration of the animation in seconds as defined by sender @width Width of the animation @height Height of the animation
//@file_name Original name of a file as defined by sender @mime_type MIME type of a file, usually "image/gif" or "video/mp4" @thumb Animation thumb, nullable @animation File with the animation
//@description Describes audio file. Audio is usually in mp3 format @duration Duration of the audio in seconds as defined by sender @title Title of the audio as defined by sender @performer Performer of the audio as defined by sender
//@file_name Original name of a file as defined by sender @mime_type MIME type of a file as defined by sender @album_cover_thumb Thumb of the album's cover as defined by sender. Full size thumb should be extracted from the downloaded file, nullable @audio File with the audio
//@description Describes document of any type @file_name Original name of a file as defined by sender @mime_type MIME type of file as defined by sender
//@thumb Document thumb as defined by sender, nullable @document File with document
//@description Describes photo @id Photo identifier, 0 for deleted photo @has_stickers True, if some stickers was added to the photo @sizes Available variants of photo of different sizes
//@description Describes sticker @set_id Identifier of sticker set to which the sticker belongs or 0 if none @width Sticker width as defined by sender @height Sticker height as defined by sender
//@emoji Emoji corresponding to the sticker @is_mask True, if the sticker is a mask @mask_position Position where the mask should be placed, nullable @thumb Sticker thumb in webp or jpeg format, nullable @sticker File with sticker
//@description Describes video file @duration Duration of the video in seconds as defined by sender @width Video width as defined by sender @height Video height as defined by sender
//@file_name Original name of a file as defined by sender @mime_type MIME type of a file as defined by sender @has_stickers True, if some stickers was added to the photo @thumb Video thumb as defined by sender, nullable @video File with the video
//@description Describes video note. Video must have equal width and height, cropped to circle and stored in mpeg4 format @duration Duration of the video in seconds as defined by sender @length Video width and height as defined by sender @thumb Video thumb as defined by sender, nullable @video File with the video
//@description Describes voice note. Voice must be encoded with Opus codec and must be stored inside Ogg container @duration Duration of the voice record in seconds as defined by sender
//@description Describes user contact @phone_number User's phone number @first_name User first name, 1-255 characters @last_name User last name @user_id User identifier if known, 0 otherwise
//@description Describes location on Earth @latitude Latitude of location in degrees as defined by sender @longitude Longitude of location in degrees as defined by sender
//@description Describes venue @location Venue location as defined by sender @title Venue name as defined by sender @address Venue address as defined by sender @provider Provider of venue database as defined by sender. Only "foursquare" need to be supported currently
//@id Identifier of the venue in provider database as defined by sender
//@description Describes a game @id Game id @short_name Game short name, to share a game use a URL https://t.me/{bot_username}?game={game_short_name} @title Game title @text Game text, usually containing game scoreboards
//@text_entities Entities contained in the text @param_description Game description @photo Game photo @animation Game animation, nullable
//@description Describes chat photo @small Small (160x160) chat photo @big Big (640x640) chat photo
chatPhoto small:file big:file = ChatPhoto;
//@class LinkState @description Represents ordered relationship between two users
//@description Other user's phone number doesn't known
linkStateNone = LinkState;
//@description Other user's phone number is known but user not in contacts list
linkStateKnowsPhoneNumber = LinkState;
//@description Other user is in contacts list, particularly its phone number is known
linkStateContact = LinkState;
//@class UserType @description Allows to distinguish different kinds of users: general users, deleted users and bots
//@description General user
userTypeGeneral = UserType;
//@description Deleted user or deleted bot. There is no any information about it except user_id. None of active action can be performed with deleted user
userTypeDeleted = UserType;
//@description Bot (see https://core.telegram.org/bots) @can_join_group_chats If true, bot can be invited to group and supergroup chats
//@can_read_all_group_chat_messages If true, bot can read all group or supergroup chat messages, not only addressed to him. In private chats bot always can read all messages
//@is_inline True, if bot supports inline queries @inline_query_placeholder Placeholder for inline query @need_location If true, user location should be sent with every inline query to this bot
//@description Currently there is no any information about the user except user_id. It can happens very-very rarely. None of active action can be performed with unknown user
userTypeUnknown = UserType;
//@description Represents command supported by bot @command Text of the bot command @param_description Description of the bot command
//@description Provides information about bot and command supported by him @param_description Big description shown in user info page @commands List of commands cupported by bot
//@my_link Relationships from me to other user @foreign_link Relationships from other user to me @is_verified True, if user is verified @restriction_reason If non-empty, contains the reason, why access to this user must be restricted. Format of the string is "{type}: {description}". -{type} contains type of the restriction and at least one of the suffixes "-all", "-ios", "-android", "-wp", which describes platforms on which access should be restricted. For example, "terms-ios-android". {description} contains human-readable description of the restriction, which can be showed to the user
//@have_access If false, the user is inaccessible and the only known information about it is inside this class. It can't be passed to any method except GetUser. Currently it can be false only for inaccessible authors of the channel posts @type Type of the user @language_code Bots only. IETF language tag of users language
//@description Gives full information about a user (except full list of profile photos) @is_blocked Is user blacklisted by the current user @can_be_called True, if the user can be called @has_private_calls True, if the user can't be called only because of his privacy settings
//@about Short user bio or bot share text @common_chat_count Number of common chats between the user and current user, 0 for the current user @bot_info Information about bot if user is a bot, nullable
//@description User is a chat member with some additional priviledges. In groups, administrators can edit and delete other messages, add new members and ban unpriviledged members
//@can_be_edited True, if current user has rights to edit administrator privileges of that user
//@can_change_info True, if the administrator can change chat title, photo and other settings
//@can_post_messages True, if the administrator can create channel posts, broadcast channels only
//@can_edit_messages True, if the administrator can edit messages of other users, broadcast channels only
//@can_delete_messages True, if the administrator can delete messages of other users
//@can_invite_users True, if the administrator can invite new users to the chat
//@can_restrict_members True, if the administrator can restrict, ban or unban chat members
//@can_pin_messages True, if the administrator can pin messages, supergroup channels only
//@can_promote_members True, if the administrator can add new administrators with a subset of his own privileges or demote administrators directly or indirectly promoted by him
//@description User has some additional restrictions in the chat. Unsupported in group chats and broadcast channels
//@is_member True, if user is chat member
//@restricted_until_date Date when the user will be unrestricted, 0 if never. Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time it considered to be restricted forever
//@can_send_messages True, if the user can send text messages, contacts, locations and venues
//@can_send_media_messages True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages
//@can_send_other_messages True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages
//@can_add_web_page_previews True, if user may add web page preview to his messages, implies can_send_messages
//@description User was banned (and obviously is not a chat member) and can't return to the chat or view messages
//@banned_until_date Date when the user will be unbanned, 0 if never. Unix time. If user is banned for more than 366 days or less than 30 seconds from the current time it considered to be banned forever
//@description User with information about its chat joining/leaving @user_id User identifier of the chat member @inviter_user_id Identifier of a user invited/promoted/banned this member in the chat, 0 if unknown
//@join_date Date the user has joined a chat, unix time @status Status of the member in the chat @bot_info Information about bot if user is a bot, nullable. Can be null even for bot if bot is not a chat member
//@description Gives full information about a group @creator_user_id User identifier of the group creator, 0 if unknown @members Group members @invite_link Invite link for this group, available only for group creator and only after it is generated at least once
//@description Represents a channel with zero or more subscribers. There two different kinds of channels: supergroups and broadcast channels
//@id Channel identifier
//@username Channel username, empty for private channels
//@date Date when current user has joined the channel or date when channel was created, if user is not a member. Unix time
//@status Status of the current user in the channel
//@anyone_can_invite True, if any member of the supergroup can invite other members. If the channel is not a supergroup, the field is meaningless
//@sign_messages True, if messages sent to the channel should content information about the sender. If the channel is a supergroup, the field is meaningless
//@is_supergroup True, if channel is a supergroup and is not a broadcast
//@restriction_reason If non-empty, contains the reason, why access to this channel must be restricted. Format of the string is "{type}: {description}". {type} contains type of the restriction and at least one of the suffixes "-all", "-ios", "-android", "-wp", which describes platforms on which access should be restricted. For example, "terms-ios-android". {description} contains human-readable description of the restriction, which can be showed to the user
//@key_hash Hash of the current used key for comparison with the hash of the interlocutor's key. String of 36 bytes, which should be used to make a 12x12 square image with a color depth of 4. First 16 bytes should be used to make a central 8 * 8 square, left 20 bytes should be used to construct a border of width 2 around that square. Alternatively first 32 bytes of the hash can be converted to hex and printed as 32 2-digit hex numbers
//@layer Secret chat layer, determining features supported by other client. Video notes are supported if layer >= 66
//@description Contains information about chat invite link @chat_id Chat identifier of the invite link or 0 if user is not a member of this chat @title Title of the chat @photo Chat photo, nullable @member_count Total member count @member_user_ids User identifiers of some chat members that may be known to the current user
//@is_group True, if the chat is a group chat @is_channel True, if the chat is a channel chat @is_public_channel True, if the chat is a channel chat with set up username @is_supergroup_channel True, if the chat is a supergroup channel chat
//@class MessageForwardInfo @description Contains information about initial sender of forwarded message
//@description Message is originally written by known user @sender_user_id Identifier of a user, who originally sent this message @date Date when message was originally sent
//@description Message is orifinally a channel post @chat_id Identifier of a chat from which message is forwarded @author_signature Post author signature
//@description Contains list of found by search messages @messages List of messages @next_from_search_id Value to pass as from_search_id to get more results
//@description Contains information about notification settings for chat or chats @mute_for Time left before notifications will be unmuted, seconds @sound Audio file name for notifications, iPhone apps only @show_preview Display message text/media in notification
//@description Contains information about draft of a message @reply_to_message_id Identifier of a message to reply to or 0 @input_message_text Content of a draft message, always should be of a type inputMessageText
//@description Chat with unlimited number of members @channel_id Channel identifier @is_supergroup True, if the channel is a supergroup and is not a broadcast
//@order Parameter by descending of which chats are sorted in the chat list. If order of two chats is equal, then they need to be sorted by id also in descending order. If order == 0, position of the chat in the list is undetermined
//@notification_settings Notification settings for this chat
//@reply_markup_message_id Identifier of the message from which reply markup need to be used or 0 if there is no default custom reply markup in the chat
//@draft_message Draft of a message in the chat, nullable. parse_mode in input_message_text always will be null
//@client_data Client specified data, associated with the chat. For example, chat position or local chat notification settings may be stored here. Persistent if message db is used
//@description A button with a game which sends to the bot special callback query, must be in the first column and row of the keyboard, can be attached only to a message with content of the type messageGame
//@description A button which forces inline query to the bot to be substitued in the input field @query Inline query to be sent to the bot @in_current_chat True, if the inline query should be sent from the current chat
//@description A button for buying, must be in the first column and row of the keyboard, can be attached only to a message with content of the type messageInvoice
//@class ReplyMarkup @description Contains description of custom keyboard and actions with it for fast reply to bots
//@description Instruct clients to remove keyboard after receiving this message. This kind of keyboard can't be received. Instead UpdateChatReplyMarkup with message_id == 0 will be send
//@personal Keyboard is removed only for mentioned users or replied to user
//@description Instruct clients to force reply to this message @personal Forced reply is used automatically only for mentioned users or replied to chat user, for incoming messages it is true if and only if forced reply needs to be automatically showed to the current user
//@description Contains custom keyboard layout for fast reply to bot
//@rows List of rows of bot keyboard buttons
//@resize_keyboard Do clients need to resize keyboard vertically
//@one_time Do clients need to hide keyboard after use
//@personal Keyboard is showed automatically only for mentioned users or replied to user, for incoming messages it is true if and only if keyboard needs to be automatically showed to current user
//@description A video @video The video, nullable @caption Video caption @need_autoplay True, if the video should be autoplayed @is_looped True, if the video is looped
//@description Embedded web page @url Web page URL, if available @html HTML-markup of the embedded page @poster_photo Poster photo if available, nullable @width Block width @height Block height @caption Block caption @is_full_width True, if the block should be full width @allow_scrolling True, if scrolling should be allowed
//@description Embedded post @url Web page URL @author Post author @author_photo Post author photo @date Post date, unix time. 0 if unknown @page_blocks Post content @caption Post caption
//@description A link to a chat @title Chat title @photo Chat photo, nullable @username Chat username by which all other information about the chat should be resolved
//@description Describes instant view of a web page @page_blocks Content of the web page @is_full True, if instant view contains full page. Network request may be needed to get full web page instant view
//@description Goods invoice @currency ISO 4217 currency code @prices List of objects used to calculate total price @is_test True, if payment is test @need_name True, if user's name is needed for payment @need_phone_number True, if user's phone number is needed for payment @need_email True, if user's email is needed for payment
//@need_shipping_address True, if user's shipping address is needed for payment @is_flexible True, if total price depends on shipping method
//@description Describes shipping address @country_code Two letter ISO 3166-1 alpha-2 country code @state State if applicable @city City @street_line1 First line for the address @street_line2 Second line for the address @post_code Address post code
//@class InputCredentials @description Contains information about payment method chosen by user
//@description User chooses previosly saved payment credentials. To use previously saved credentials user should have valid temporary password @saved_credentials_id Identifier of saved credentials
//@description User enters new credentials on payment provider web site @data JSON-encoded data with credentials identifier from the payment provider @allow_save True, if credentials identifier can be saved server-side
//@description Stripe payments provider @publishable_key Stripe API publishable key @need_country True, if user country should be entered @need_zip True, if user zip code should be entered @need_cardholder_name True, if cardholder name should be entered
//@description Information about invoice payment form @invoice Full information about the invoice @url Payment form URL @payments_provider Information about payment provider if available, to support it natively without opening the URL, nullable
//@saved_order_info Saved server-side order information, nullable @saved_credentials Information about saved card credentials, nullable @can_save_credentials True, if the user can choose to save credentials @need_password True, if the user will be able to save credentials if he set up a password
//@description Contains temporary identifier of validated order information stored for an hour and available shipping options @order_info_id Temporary identifier of order information @shipping_options Available shipping options
//@description Contains result of a payment query @success True, if payment request was successful. If false, verification_url will be not empty @verification_url Url for additional payments credentials verification
//@description Contains information about successful payment @date Payment date, unix time @payments_provider_user_id User identifier of payments provider bot @invoice Information about the invoice
//@order_info Order information, nullable @shipping_option Chosen shipping option, nullable @credentials_title Title of the saved credentials
//@class MessageContent @description Content of a message
//@description Text message @text Text of the message @entities Entities contained in the text @web_page Preview of a web page mentioned in the text, nullable
//@description Message with an invoice from a bot @title Goods title @param_description Goods description @photo Goods photo, nullable @currency Currency for goods price @total_amount Goods total price in minimal quantity of the currency
//@start_parameter Unique invoice bot start_parameter. To share an invoice use a URL https://t.me/{bot_username}?start={start_parameter} @is_test True, if invoice is test
//@need_shipping_address True, if shipping address should be specified @receipt_message_id Identifier of message with receipt after the goods are paid
//@description Supergroup channel is created from group chat @title Title of created channel chat @group_id Identifier of the group it is migrated from
//@description Messages ttl setting in secret chat has changed @ttl New ttl
messageChatSetTtl ttl:int = MessageContent;
//@description New high score was achieved in a game @game_message_id Identifier of the message with the game, can be identifier of the deleted message @game_id Identifier of the game, may be different from the games presented in the message with the game @score New score
//@description Bots only. Payment completed @currency Currency for goods price @total_amount Goods total price in minimal quantity of the currency @invoice_payload Invoice payload @shipping_option_id Identifier of a choosed by user shipping option, may be empty if not applicable @order_info Information about the order, nullable
//@description Thumb to send along with a file, should be in jpeg format or webp format for stickers and less than 200KB in size @thumb Thumb file to send, sending thumbs by file_id is currently not supported
//@class InputMessageContent @description Content of a message to send
//@description Text message @text Text to send @disable_web_page_preview Pass true to disable rich preview for link in the message text @clear_draft Pass true if chat draft message should be deleted
//@entities Bold, Italic, Code, Pre, PreCode and TextUrl entities contained in the text. Non-bot users can't use TextUrl entities. Can't be used with non-null parse_mode @parse_mode Text parse mode, nullable. Can't be used along with enitities
//@description Animation message @animation Animation file to send @thumb Animation thumb, if available @duration Duration of the animation in seconds @width Width of the animation, may be replaced by the server @height Height of the animation, may be replaced by the server @caption Animation caption, 0-200 characters
//@description Audio message @audio Audio file to send @album_cover_thumb Thumb of the album's cover, if available @duration Duration of the audio in seconds, may be replaced by the server @title Title of the audio, 0-64 characters, may be replaced by the server
//@description Photo message @photo Photo to send @thumb Photo thumb to send, is sent to the other party in secret chats only @added_sticker_file_ids File identifiers of stickers added onto the photo @width Photo width @height Photo height @caption Photo caption, 0-200 characters
//@description Video message @video Video to send @thumb Video thumb, if available @added_sticker_file_ids File identifiers of stickers added onto the video @duration Duration of the video in seconds @width Video width @height Video height @caption Video caption, 0-200 characters
//@ttl Video TTL in seconds, 0-60. Non-zero TTL can be only specified in private chats
//@description Video note message @video_note Video note to send @thumb Video thumb, if available @duration Duration of the video in seconds @length Video width and height, should be positive and not greater than 640
//@description Voice message @voice Voice file to send @duration Duration of the voice in seconds @waveform Waveform representation of the voice in 5-bit format @caption Voice caption, 0-200 characters
//@description Message with a game, can't be used in broadcast channels and secret chats @bot_user_id User identifier of a bot owned the game @game_short_name Game short name
//@description Message with an invoice, can be used only by bots and in private chats only @invoice The invoice @title Product title, 1-32 characters @param_description Product description, 0-255 characters @photo_url Goods photo URL, optional @photo_size Goods photo size @photo_width Goods photo width @photo_height Goods photo height
//@payload Invoice payload @provider_token Payments provider token @start_parameter Unique invoice bot start_parameter for generation of this invoice
//@description Forwarded message @from_chat_id Chat identifier of the message to forward @message_id Identifier of the message to forward @in_game_share Pass true to share a game message within a launched game, for Game messages only
//@description Return only messages with unread mentions of current logged in user or which are replies to his messages. When this filter is used result can't be additionally filtered by a query or a sender user
//@class UserStatus @description Describes last time user was online
//@description User status was newer changed
userStatusEmpty = UserStatus;
//@description User is online @expires Unix time when user's online status will expire
userStatusOnline expires:int = UserStatus;
//@description User is offline @was_online Unix time user was online last time
userStatusOffline was_online:int = UserStatus;
//@description User was online recently
userStatusRecently = UserStatus;
//@description User is offline, but was online last week
userStatusLastWeek = UserStatus;
//@description User is offline, but was online last month
userStatusLastMonth = UserStatus;
//@description Represents list of stickers @stickers Stickers
stickers stickers:vector<sticker> = Stickers;
//@description Represents list of all emojis corresponding to a sticker in a sticker set. The list is only for informational purposes because sticker is always sent with a fixed emoji from the corresponding Sticker object @emojis List of emojis
//@description Represents sticker set @id Sticker set identifier @title Title of the sticker set @name Name of the sticker set @is_installed True if sticker set is installed by logged in user
//@is_archived True if sticker set is archived. A sticker set can't be installed and archived simultaneously @is_official True if sticker set is official @is_masks True if stickers in the set are masks
//@is_viewed True for viewed trending sticker set @stickers List of stickers in this set @emojis Lists of emojis corresponding to the stickers in the same order
//@description Represents short information about sticker set @id Sticker set identifier @title Title of the sticker set @name Name of the sticker set @is_installed True if sticker set is installed by logged in user
//@is_archived True if sticker set is archived. A sticker set can't be installed and archived simultaneously @is_official True if sticker set is official @is_masks True if stickers in the set are masks
//@is_viewed True for viewed trending sticker set @size Total number of stickers in the set @covers Up to 5 first stickers from the set depending on the context. If client needs more stickers it should request full sticker set
//@description Call was hung up by the caller or by the callee
callDiscardReasonHungUp = CallDiscardReason;
//@description Specifies supported call protocols @udp_p2p True, if UDP peer to peer connections are supported @udp_reflector True, if connection through UDP reflectors are supported @min_layer Minimum supported layer, use 65 @max_layer Maximum supported layer, use 65
//@class CallState @description Describes current call state
//@description Call is pending for acception by a user @is_created True, if the call is already created by the server @is_received True, if the call is already received by the other party
//@description Call is answered and encryption keys are exchanged
callStateExchangingKeys = CallState;
//@description Call is ready to use @protocol Call protocols supported by the peer @connections Available UDP reflectors @config JSON-encoded call config @encryption_key Call encryption key @emojis Encryption key emojis fingerprint
//@description Call is hanging up after discardCall is called
callStateHangingUp = CallState;
//@description Call has ended successfully @reason A reason, why call has ended @need_rating If true, call rating should be sent to the server @need_debug If true, call debug should be sent to the server
//@description Call has ended with an error @error The error. Error with the code 4005000 returned if an outgoing call is missed because of expired timeout
callStateError error:error = CallState;
//@description Describes a call @id Call identifier, not persistent @user_id Peer user identifier @is_outgoing True, if the call is outgoing @state Call state
//@description Represent result for ImportContacts request @user_ids User identifiers of imported contacts in the same order as they was specified in the request. 0 if contact is not yet registered
//@importer_count Number of users which imported corresponding contact. 0 for already registered users or if unavailable
//@class InputInlineQueryResult @description Represents one result of the inline query received from the bot
//@description Represents link to an animated gif @id Unique identifier of this result @title Title of the result @thumb_url Url of the static result thumb (jpeg or gif), if exists
//@gif_url Url of the gif-file (file size must not exceed 1MB) @gif_duration Duration of the gif in seconds @gif_width Width of the gif @gif_height Height of the gif
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or inputMessageAnimation or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents link to an animated (i.e. without sound) H.264/MPEG-4 AVC video @id Unique identifier of this result @title Title of the result @thumb_url Url of the static result thumb (jpeg or gif), if exists
//@mpeg4_url Url of the mp4-file (file size must not exceed 1MB) @mpeg4_duration Duration of the video in seconds @mpeg4_width Width of the video @mpeg4_height Height of the video
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or inputMessageAnimation or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents link to an article or web page @id Unique identifier of this result @url Url of the result, if exists @hide_url True, if url must be not shown @title Title of the result
//@param_description Short description of the result @thumb_url Url of the result thumb, if exists @thumb_width Thumb width, if known @thumb_height Thumb height, if known
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents link to a mp3 audio file @id Unique identifier of this result @title Title of the audio @performer Performer of the audio
//@audio_url Url of the audio file @audio_duration Audio duration in seconds
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or inputMessageAudio or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents user contact @id Unique identifier of this result @contact User contact @thumb_url Url of the result thumb, if exists @thumb_width Thumb width, if known @thumb_height Thumb height, if known
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents link to a file @id Unique identifier of this result @title Title of the result @param_description Short description of the result, if known @document_url Url of the file @mime_type MIME type of the file content, only “application/pdf” and “application/zip” are allowed now
//@thumb_url Url of the file thumb, if exists @thumb_width Width of the thumb @thumb_height Height of the thumb
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or inputMessageDocument or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents a game @id Unique identifier of this result @game_short_name Game short name @reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@description Represents a point on the map @id Unique identifier of this result @location Result @title Title of the result @thumb_url Url of the result thumb, if exists @thumb_width Thumb width, if known @thumb_height Thumb height, if known
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents link to a jpeg photo @id Unique identifier of this result @title Title of the result, if known @param_description Short description of the result, if known @thumb_url Url of the photo thumb, if exists
//@photo_url Url of the jpeg photo (photo must not exceed 5MB) @photo_width Width of the photo @photo_height Height of the photo
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or inputMessagePhoto or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents link to a webp sticker @id Unique identifier of this result @thumb_url Url of the sticker thumb, if exists
//@sticker_url Url of the webp sticker (file with a sticker must not exceed 5MB) @sticker_width Width of the sticker @sticker_height Height of the sticker
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or inputMessageSticker or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents information about a venue @id Unique identifier of this result @venue Result @thumb_url Url of the result thumb, if exists @thumb_width Thumb width, if known @thumb_height Thumb height, if known
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents link to a page containing an embedded video player or a video file @id Unique identifier of this result @title Title of the result @param_description Short description of the result, if known
//@thumb_url Url of the video thumb (jpeg), if exists @video_url Url of the embedded video player or video file @mime_type MIME type of the content of video url, only "text/html" or "video/mp4" are allowed now
//@video_width Video width @video_height Video height @video_duration Video duration in seconds
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or inputMessageVideo or InputMessageLocation or InputMessageVenue or InputMessageContact
//@description Represents link to a opus encoded audio file in ogg container @id Unique identifier of this result @title Title of the voice file
//@voice_url Url of the voice file @voice_duration Voice duration in seconds
//@reply_markup Message reply markup, should be of type replyMarkupInlineKeyboard or null
//@input_message_content Content of the message to be sent, should be of type inputMessageText or inputMessageVoice or InputMessageLocation or InputMessageVenue or InputMessageContact
//@class InlineQueryResult @description Represents one result of the inline query
//@description Represents link to an article or web page @id Unique identifier of this result @url Url of the result, if exists @hide_url True, if url must be not shown @title Title of the result
//@description Represents a point on the map @id Unique identifier of this result @location The result @title Title of the result @thumb Result thumb, nullable
//@description Represents an animation cached on the telegram server @id Unique identifier of this result @animation The animation @title Animation title
//@description Represents a document cached on the telegram server @id Unique identifier of this result @document The document @title Document title @param_description Document description
//@description Represents a photo cached on the telegram server @id Unique identifier of this result @photo The photo @title Title of the result, if known @param_description Short description of the result, if known
//@description Represents a video cached on the telegram server @id Unique identifier of this result @video The video @title Title of the video @param_description Description of the video
//@description Represents results of the inline query. Use sendInlineQueryResultMessage to send the result of the query @inline_query_id Unique identifier of the inline query @next_offset Offset for the next request. If it is empty, there is no more results @results Results of the query
//@switch_pm_text If non-empty, this text should be shown on the button, which opens private chat with the bot and sends bot start message with parameter switch_pm_parameter @switch_pm_parameter Parameter for the bot start message
//@description Contains answer of a bot to a callback query @text Text of the answer @show_alert If true, an alert should be shown to the user instead of a toast @url URL to be open
//@description A chat member promoted to/demoted from administrators @user_id Chat member user identifier @old_status Old chat member status @new_status New chat member status
//@description A chat member restricted/unrestircted or banned/unbanned @user_id Chat member user identifier @old_status Old chat member status @new_status New chat member status
//@description Supergroup sticker set was changed @old_sticker_set_id Old identifier of chat sticker set, 0 if none @new_sticker_set_id New identifier of chat sticker set, 0 if none
//@description Represents a chat event @id Chat event identifier @date Date of the event, unix time @user_id Identifier of a user who made the action @action Action done by the user
//@description Token for Blackberry Push Service @token The token, may be empty to unregister device
deviceTokenBlackberry token:string = DeviceToken;
//@description Contains information about one wallpaper @id Unique persistent wallpaper identifier @sizes Available variants of wallpaper of different sizes. These photos can be only downloaded and can't be sent in a message @color Main color of wallpaper in RGB24, should be treated as background color if no photos are specified
//@description List of privacy rules. Rules are matched in the specified order. First matched rule defines privacy setting for a given user. If no rule matches action is not allowed @rules List of rules
//@description Contains information about period of inactivity, after which the account of currently logged in user will be automatically deleted @days Number of days of inactivity before account deletion, should be from 30 and up to 366
//@description Contains information about one session in some application used by the user @id Session identifier @is_current True, if it is current session @app_id Application identifier, provided by the application @app_name Name of the application, provided by the application
//@app_version Version of the application, provided by the application @is_official_app True, if the application is an official application or uses the app_id of some official application @device_model Model of a device application is runned on, provided by the application @platform Operating system application is runned on, provided by the application
//@system_version Version of operating system application is runned on, provided by the application @log_in_date Date the user has logged in, unix time @last_active_date Date the session was used last time, unix time @ip An ip address from which session was created in a human-readable format
//@description Contains list of sessions @sessions List of sessions
sessions sessions:vector<session> = Sessions;
//@description Contains information about chat report spam state @can_report_spam If true, prompt with "Report spam" action should be shown to the user
//@description Contains public HTTPS link to a message in a public channel @url The link
publicMessageLink url:string = PublicMessageLink;
//@class FileType @description Represents type of a file
//@description Data is not a file
fileTypeNone = FileType;
//@description File is an animation
fileTypeAnimation = FileType;
//@description File is an audio
fileTypeAudio = FileType;
//@description File is a document
fileTypeDocument = FileType;
//@description File is a photo
fileTypePhoto = FileType;
//@description File is a profile photo
fileTypeProfilePhoto = FileType;
//@description File sent to a secret chat
fileTypeSecret = FileType;
//@description File is a sticker
fileTypeSticker = FileType;
//@description File is a thumbnail of another file
fileTypeThumb = FileType;
//@description File type is yet unknown
fileTypeUnknown = FileType;
//@description File is a video
fileTypeVideo = FileType;
//@description File is a video note
fileTypeVideoNote = FileType;
//@description File is a voice audio
fileTypeVoice = FileType;
//@description File is a wallpaper
fileTypeWallpaper = FileType;
//@description File is a thumbnail of a file from a secret chat
fileTypeSecretThumb = FileType;
//@description Contains storage usage statistics for the specific file type @file_type The file type @size Total size of files @count Total number of files
//@description Contains storage usage statistics for the specific chat @chat_id Chat identifier, 0 if none @size Total size of files @count Total number of files @by_file_type Statistics splitted by file types
//@description Contains exact storage usage statistics splitted by chats and file types @size Total size of files @count Total number of files @by_chat Statistics splitted by chats
//@description Contains approximate storage usage statistics, not containing files of Unknown type @files_size Approximate total size of files @files_count Approximate number of files @database_size Size of database
//@class NetworkType @description Represents type of a network
//@description Network is not available
networkTypeNone = NetworkType;
//@description Mobile network
networkTypeMobile = NetworkType;
//@description Mobile roaming network
networkTypeMobileRoaming = NetworkType;
//@description Wi-Fi network
networkTypeWiFi = NetworkType;
//@description Other network type, for example, Ethernet network
networkTypeOther = NetworkType;
//@class NetworkStatisticsEntry @description Contains statistics about network usage
//@description Contains information about total received and sent files data @file_type Type of a file the data is part of @network_type Type of a network the data was sent through. Call setNetworkType to maintain actual network type
//@sent_bytes Total number of sent bytes @received_bytes Total number of received bytes
//@description Contains information about total received and sent calls data @network_type Type of a network the data was sent through. Call setNetworkType to maintain actual network type
//@sent_bytes Total number of sent bytes @received_bytes Total number of received bytes @duration Total calls duration in seconds
//@description Full list of available network statistics entries @since_date Date since which statistics are collected, unix time @entries Network statistics entries
//@description Description of a sticker which should be added to a sticker set @png_sticker Png image with the sticker, must be up to 512 kilobytes in size and fit in 512x512 square @emojis Emojis corresponding to the sticker @mask_position Position where the mask should be placed, nullable
//@description New message received, maybe outcoming message sent from other device @message New message @disable_notification If true, notification about the message should be disabled @contains_mention True, if the message contains mention of the current user
//@description Message send request has reached Telegram server. It doesn't mean that message send will be successful or even that message send request will be processed. Update will not come, unless option "use_quick_ack" is set to true. The update may come many times for the same message
//@chat_id Chat identifier of sent message @message_id Temporary message identifier
//@description Message is successfully sent @message Information about sent message. Usually only message identifier, date and content are changed, but almost any other fields can also change @old_message_id Previous temporary message identifier
//@description Message fails to send. Be aware that some being sent messages can be irrecoverably deleted and updateDeleteMessages will come instead of this update
//@message Information about failed to send message @old_message_id Previous temporary message identifier @error_code Error code @error_message Error message
//@description Message was edited. Changes in the message content will come in a separate updateMessageContent @chat_id Chat identifier @message_id Message identifier @edit_date Date the message was edited, unix time @reply_markup New message reply markup, nullable
//@description Message content was opened. It makes voice messages listened, video note messages viewed and runs ttl timer @chat_id Chat identifier @message_id Message identifier
//@description Message with an unread mention was read @chat_id Chat identifier @message_id Message identifier @unread_mention_count New number of unread mention messages left in the chat
//@description New chat has been loaded/created. This update is guaranteed to come before chat identifier is returned to the client. Chat field changes will be reported through separate updates @chat The chat
//@description Top message of the chat has changed. If top_message is null then top message in the chat became unknown. Some new unknown messages might be added to the chat in that case @chat_id Chat identifier @top_message New top message of the chat, nullable @order New value of the chat order
//@description Order of the chat in the chat list has changed. Instead of that update updateChatTopMessage, updateChatIsPinned or updateChatDraftMessage may be sent @chat_id Chat identifier @order New value of the order
//@description Some incoming messages was read @chat_id Chat identifier @last_read_inbox_message_id Identifier of last read incoming message @unread_count Number of unread messages left in the chat
//@description Notification settings for some chats was updated @scope Kinds of chats for which notification settings was updated @notification_settings New notification settings
//@description Default chat reply markup has changed. It can happen because new message with reply markup has come or old reply markup was hidden by user
//@chat_id Chat identifier @reply_markup_message_id Identifier of the message from which reply markup need to be used or 0 if there is no default custom reply markup in the chat
//@description Chat draft has changed. Be aware that the update may come in the currently open chat with the old content of the draft. If the user has changed the content of the draft, the update shouldn't be applied @chat_id Chat identifier @draft_message New chat draft_message, nullable @order New value of the chat order
//@description Some data about a user has been changed. This update is guaranteed to come before user identifier is returned to the client, if library knows anything about the user @user New data about the user
//@description Some data about a group has been changed. This update is guaranteed to come before group identifier is returned to the client, if library knows anything about the group @group New data about the group
//@description Some data about a channel has been changed. This update is guaranteed to come before channel identifier is returned to the client, if library knows anything about the channel @channel New data about the channel
//@description Some data about a secret chat has been changed. This update is guaranteed to come before secret chat identifier is returned to the client, if library knows anything about the secret chat @secret_chat New data about the secret chat
//@description Service notification from the server. Upon receiving client should show popup with content of the notification @type Type of the notification @content Notification content
//@description DEPRECATED. Use updateFile instead. File is partly downloaded/uploaded @file_id File identifier @size Total file size (0 means unknown) @ready Number of bytes already downloaded/uploaded. Negative number means that download/upload has failed and was terminated
//@description File generation process need to be started by the client @generation_id Unique identifier for the generation process @original_path Path to a file from which new file is generated, may be empty
//@destination_path Path to a file which should be created and to which new file should be generated @conversion String specifying conversion applied to the original file
//@description Informs that a file is being generated @file_id File identifier @size Expected size of the generated file @ready Number of bytes already generated. Negative number means that generation has failed and was terminated
//@description List of installed sticker sets was updated @is_masks True, if list of installed mask sticker sets was updated @sticker_set_ids New list of installed ordinary sticker sets
//@description List of recently used stickers was updated @is_attached True, if the list of stickers attached to photo or video files was updated, otherwise the list of sent stickers is updated @sticker_ids New list of file identifiers of recently used stickers
//@description Bots only. New incoming inline query @id Unique query identifier @sender_user_id Identifier of the user who sent the query @user_location User location, provided by the client, nullable @query Text of the query @offset Offset of the first entry to return
//@description Bots only. User has chosen a result of the inline query @sender_user_id Identifier of the user who sent the query @user_location User location, provided by the client, nullable @query Text of the query @result_id Identifier of the chosen result @inline_message_id Identifier of the sent inline message, if known
//@description Bots only. New incoming callback query @id Unique query identifier @sender_user_id Identifier of the user who sent the query @chat_id Identifier of the chat, in which the query was sent
//@message_id Identifier of the message, from which the query is originated @chat_instance Identifier, uniquely corresponding to the chat a message was sent to @payload Query payload
//@description Bots only. New incoming callback query from message sent via bot @id Unique query identifier @sender_user_id Identifier of the user who sent the query @inline_message_id Identifier of the inline message, from which the query is originated
//@chat_instance Identifier, uniquely corresponding to the chat a message was sent to @payload Query payload
//@description Bots only. New incoming shipping query. Only for invoices with flexible price @id Unique query identifier @sender_user_id Identifier of the user who sent the query @invoice_payload Invoice payload @shipping_address User shipping address
//@description Bots only. New incoming pre-checkout query. Contains full information about checkout @id Unique query identifier @sender_user_id Identifier of the user who sent the query @currency Currency for goods price @total_amount Goods total price in minimal quantity of the currency
//@invoice_payload Invoice payload @shipping_option_id Identifier of a choosed by user shipping option, may be empty if not applicable @order_info Information about the order, nullable
//@description Sets user's phone number and sends authentication code to the user. Works only when getAuthState returns authStateWaitPhoneNumber. If phone number is not recognized or another error has happened, returns an error. Otherwise returns authStateWaitCode
//@phone_number User's phone number in any reasonable format @allow_flash_call Pass True, if code can be sent via flash call to the specified phone number @is_current_phone_number Pass true, if the phone number is used on the current device. Ignored if allow_flash_call is False
//@description Resends authentication code to the user. Works only when getAuthState returns authStateWaitCode and next_code_type of result is not null. Returns authStateWaitCode on success
//@description Checks authentication code. Works only when getAuthState returns authStateWaitCode. Returns authStateWaitPassword or authStateOk on success @code Verification code from SMS, Telegram message, phone call or flash call
//@first_name User first name, if user is yet not registered, 1-255 characters @last_name Optional user last name, if user is yet not registered, 0-255 characters
//@description Checks password for correctness. Works only when getAuthState returns authStateWaitPassword. Returns authStateOk on success @password Password to check
//@description Requests to send password recovery code to email. Works only when getAuthState returns authStateWaitPassword. Returns authStateWaitPassword on success
//@description Recovers password with recovery code sent to email. Works only when getAuthState returns authStateWaitPassword. Returns authStateOk on success @recovery_code Recovery code to check
//@description Logs out user. If force == false, begins to perform soft log out, returns authStateLoggingOut after completion. If force == true then succeeds almost immediately without cleaning anything at the server, but returns error with code 401 and description "Unauthorized"
//@force If true, just delete all local data. Session will remain in list of active sessions
//@description Check bot's authentication token to log in as a bot. Works only when getAuthState returns authStateWaitPhoneNumber. Can be used instead of setAuthPhoneNumber and checkAuthCode to log in. Returns authStateOk on success @token Bot token
//@description Returns current state of two-step verification
getPasswordState = PasswordState;
//@description Changes user password. If new recovery email is specified, then error EMAIL_UNCONFIRMED is returned and password change will not be applied until email confirmation. Application should call getPasswordState from time to time to check if email is already confirmed
//@old_password Old user password @new_password New user password, may be empty to remove the password @new_hint New password hint, can be empty @set_recovery_email Pass True, if recovery email should be changed @new_recovery_email New recovery email, may be empty
//@description Returns set up recovery email. This method can be used to verify a password provided by the user @password Current user password
getRecoveryEmail password:string = RecoveryEmail;
//@description Changes user recovery email. If new recovery email is specified, then error EMAIL_UNCONFIRMED is returned and email will not be changed until email confirmation. Application should call getPasswordState from time to time to check if email is already confirmed. -If new_recovery_email coincides with the current set up email succeeds immediately and aborts all other requests waiting for email confirmation @password Current user password @new_recovery_email New recovery email
//@description Creates new temporary password for payments processing @password Persistent user password @valid_for Time before temporary password will expire, seconds. Should be between 60 and 86400
//@description Handles DC_UPDATE push service notification. Can be called before authorization @dc Value of 'dc' paramater of the notification @addr Value of 'addr' parameter of the notification
//@description Returns information about messages. If message is not found, returns null on the corresponding position of the result @chat_id Identifier of the chat, messages belongs to @message_ids Identifiers of the messages to get
//@description Returns information about a file by its persistent id, offline request. May be used to register a URL as a file for further uploading or sending as message @persistent_file_id Persistent identifier of the file to get @file_type File type, if known
//@description Returns list of chats in the right order, chats are sorted by (order, chat_id) in decreasing order. For example, to get list of chats from the beginning, the offset_order should be equal 2^63 - 1 @offset_order Chat order to return chats from @offset_chat_id Chat identifier to return chats from
//@limit Maximum number of chats to be returned. There may be less than limit chats returned even the end of the list is not reached
//@description Searches public chat by its username. Currently only private and channel chats can be public. Returns chat if found, otherwise some error is returned @username Username to be resolved
searchPublicChat username:string = Chat;
//@description Searches public chats by prefix of their username. Currently only private and channel (including supergroup) chats can be public. Returns meaningful number of results. Returns nothing if length of the searched username prefix is less than 5. Excludes private chats with contacts from the results @username_prefix Prefix of the username to search
searchPublicChats username_prefix:string = Chats;
//@description Searches for specified query in the title and username of known chats, offline request. Returns chats in the order of them in the chat list @query Query to search for, if query is empty, returns up to 20 recently found chats @limit Maximum number of chats to be returned
//@description Returns a list of frequently used chats. Supported only if chat info database is enabled @category Category of chats to return @limit Maximum number of chats to be returned, at most 30
//@description Delete a chat from a list of frequently used chats. Supported only if chat info database is enabled @category Category of frequently used chats @chat_id Chat identifier
//@description Adds 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, at first it is removed from the list @chat_id Identifier of the chat to add
//@description Clears list of recently found chats
deleteRecentlyFoundChats = Ok;
//@description Returns list of common chats with an other given user. Chats are sorted by their type and creation date @user_id User identifier @offset_chat_id Chat identifier to return chats from, use 0 for the first request @limit Maximum number of chats to be returned, up to 100
//@description Returns messages in a chat. Returns result in reverse chronological order, i.e. in order of decreasing message.message_id. Offline request if only_local is true @chat_id Chat identifier
//@from_message_id Identifier of the message near which we need a history, you can use 0 to get results from the beginning, i.e. from oldest to newest
//@offset Specify 0 to get results exactly from from_message_id or negative offset to get specified message and some newer messages
//@limit Maximum number of messages to be returned, should be positive and can't be greater than 100. If offset is negative, limit must be greater than -offset. There may be less than limit messages returned even the end of the history is not reached
//@description Deletes all messages in the chat. Can't be used for channel chats @chat_id Chat identifier @remove_from_chat_list Pass true, if chat should be removed from the chat list
//@description Searches for messages with given words in the chat. Returns result in reverse chronological order, i. e. in order of decreasing message_id. Doesn't work in secret chats with non-empty query (searchSecretMessages should be used instead) or without enabled message database @chat_id Chat identifier to search messages in
//@query Query to search for
//@sender_user_id If not 0, only messages sent by the specified user will be returned. Doesn't supported in secret chats
//@from_message_id Identifier of the message from which we need a history, you can use 0 to get results from the beginning
//@offset Specify 0 to get results exactly from from_message_id or negative offset to get specified message and some newer messages
//@limit Maximum number of messages to be returned, should be positive and can't be greater than 100. If offset is negative, limit must be greater than -offset. There may be less than limit messages returned even the end of the history is not reached
//@filter Filter for content of the searched messages
//@description Searches for messages in all chats except secret chats. Returns result in reverse chronological order, i. e. in order of decreasing (date, chat_id, message_id)
//@description Searches for messages in secret chats. Returns result in reverse chronological order @chat_id Identifier of a chat to search in. Specify 0 to search in all secret chats @query Query to search for. If empty, searchChatMessages should be used instead
//@from_search_id Identifier from the result of previous request, use 0 to get results from the beginning @limit Maximum number of messages to be returned, can't be greater than 100 @filter Filter for content of searched messages
//@description Searches for call messages. Returns result in reverse chronological order, i. e. in order of decreasing message_id @from_message_id Identifier of the message from which to search, you can use 0 to get results from beginning
//@limit Maximum number of messages to be returned, can't be greater than 100. There may be less than limit messages returned even the end of the history is not reached filter @only_missed If true, return only messages with missed calls
//@description Returns public HTTPS link to a message. Available only for messages in public channels @chat_id Identifier of the chat, message belongs to @message_id Identifier of the message
//@disable_notification Pass true, to disable notification about the message, doesn't works in secret chats @from_background Pass true, if the message is sent from background
//@reply_markup Bots only. Markup for replying to message @input_message_content Content of a message to send
//@description Invites bot to a chat (if it is not in the chat) and send /start to it. Bot can't be invited to a private chat other than chat with the bot. Bots can't be invited to broadcast channel chats and secret chats. Returns sent message
//@bot_user_id Identifier of the bot @chat_id Identifier of the chat @parameter Hidden parameter sent to bot for deep linking (https://api.telegram.org/bots#deep-linking)
//@description Sends result of the inline query as a message. Returns sent message. Always clears chat draft message @chat_id Chat to send message @reply_to_message_id Identifier of a message to reply to or 0
//@disable_notification Pass true, to disable notification about the message, doesn't works in secret chats @from_background Pass true, if the message is sent from background
//@query_id Identifier of the inline query @result_id Identifier of the inline result
//@description Forwards previously sent messages. Returns forwarded messages in the same order as message identifiers passed in message_ids. If message can't be forwarded, null will be returned instead of the message
//@chat_id Identifier of a chat to forward messages @from_chat_id Identifier of a chat to forward from @message_ids Identifiers of messages to forward
//@disable_notification Pass true, to disable notification about the message, doesn't works if messages are forwarded to secret chat @from_background Pass true, if the message is sent from background
//@description Deletes messages @chat_id Chat identifier @message_ids Identifiers of messages to delete @revoke Pass true to try to delete sent messages for all chat members (may fail if messages are too old). Is always true for Channels and SecretChats
//@description Deletes all messages in the chat sent by the specified user. Works only in supergroup channel chats, needs can_delete_messages administrator privileges @chat_id Chat identifier @user_id User identifier
//@description Edits text of text or game message. Non-bots can edit message in a limited period of time. Returns edited message after edit is complete server side
//@chat_id Chat the message belongs to @message_id Identifier of the message @reply_markup Bots only. New message reply markup @input_message_content New text content of the message. Should be of type InputMessageText
//@description Edits message content caption. Non-bots can edit message in a limited period of time. Returns edited message after edit is complete server side
//@chat_id Chat the message belongs to @message_id Identifier of the message @reply_markup Bots only. New message reply markup @caption New message content caption, 0-200 characters
//@description Bots only. Edits text of an inline text or game message sent via bot @inline_message_id Inline message identifier @reply_markup New message reply markup @input_message_content New text content of the message. Should be of type InputMessageText
//@description Bots only. Edits caption of an inline message content sent via bot @inline_message_id Inline message identifier @reply_markup New message reply markup @caption New message content caption, 0-200 characters
//@description Bots only. Edits reply markup of an inline message sent via bot @inline_message_id Inline message identifier @reply_markup New message reply markup
//@description Returns all mentions, hashtags, bot commands, URLs and emails contained in the text. Offline method. Can be called before authorization. Can be called synchronously @text Text to find entites in
getTextEntities text:string = TextEntities;
//@description Returns file's mime type guessing only by its extension. Returns empty string on failure. Offline method. Can be called before authorization. Can be called synchronously @file_name Name of the file or path to the file
getFileMimeType file_name:string = Text;
//@description Returns file's extension guessing only by its mime type. Returns empty string on failure. Offline method. Can be called before authorization. Can be called synchronously @mime_type Mime type of the file
//@description Sends inline query to a bot and returns its results. Returns error with code 502 if bot fails to answer the query before query timeout expires. Unavailable for bots @bot_user_id Identifier of the bot send query to
//@chat_id Identifier of the chat, where the query is sent @user_location User location, only if needed @query Text of the query @offset Offset of the first entry to return
//@description Bots only. Sets result of an inline query @inline_query_id Identifier of the inline query @is_personal Does result of the query can be cached only for specified user
//@results Results of the query @cache_time Allowed time to cache results of the query in seconds @next_offset Offset for the next inline query, pass empty string if there is no more results
//@switch_pm_text If non-empty, this text should be shown on the button, which opens private chat with the bot and sends bot start message with parameter switch_pm_parameter @switch_pm_parameter Parameter for the bot start message
//@description Sends callback query to a bot and returns answer to it. Returns error with code 502 if bot fails to answer the query before query timeout expires. Unavailable for bots @chat_id Identifier of the chat with a message @message_id Identifier of the message, from which the query is originated @payload Query payload
//@description Bots only. Sets result of a callback query @callback_query_id Identifier of the callback query @text Text of the answer @show_alert If true, an alert should be shown to the user instead of a toast @url Url to be opened @cache_time Allowed time to cache result of the query in seconds
//@description Bots only. Sets result of a shipping query @shipping_query_id Identifier of the shipping query @shipping_options Available shipping options @error_message Error message, empty on success
//@description Bots only. Sets result of a pre checkout query @pre_checkout_query_id Identifier of the pre-checkout query @error_message Error message, empty on success
//@description Bots only. Updates game score of the specified user in the game @chat_id Chat a message with the game belongs to @message_id Identifier of the message @edit_message True, if message should be edited @user_id User identifier @score New score
//@force Pass True to update the score even if it decreases. If score is 0, user will be deleted from the high scores table
//@description Bots only. Updates game score of the specified user in the game @inline_message_id Inline message identifier @edit_message True, if message should be edited @user_id User identifier @score New score
//@force Pass True to update the score even if it decreases. If score is 0, user will be deleted from the high scores table
//@description Bots only. Returns game high scores and some part of the score table around of the specified user in the game @chat_id Chat a message with the game belongs to @message_id Identifier of the message @user_id User identifie
//@description Bots only. Returns game high scores and some part of the score table around of the specified user in the game @inline_message_id Inline message identifier @user_id User identifier
//@description Deletes default reply markup from chat. This method needs to be called after one-time keyboard or ForceReply reply markup has been used. UpdateChatReplyMarkup will be send if reply markup will be changed @chat_id Chat identifier
//@description Chat is opened by the user. Many useful activities depends on chat being opened or closed. For example, in channels all updates are received only for opened chats @chat_id Chat identifier
//@description Messages are viewed by the user. Many useful activities depends on message being viewed. For example, marking messages as read, incrementing of view counter, updating of view counter, removing of deleted messages in channels @chat_id Chat identifier @message_ids Identifiers of viewed messages
//@description Message content is opened, for example the user has opened a photo, a video, a document, a location or a venue or have listened to an audio or a voice message. You will receive updateOpenMessageContent if something has changed @chat_id Chat identifier of the message @message_id Identifier of the message with opened content
//@description Creates new group chat and send corresponding messageGroupChatCreate, returns created chat @user_ids Identifiers of users to add to the group @title Title of new group chat, 1-255 characters
//@description Creates new channel chat and send corresponding messageChannelChatCreate, returns created chat @title Title of new channel chat, 1-255 characters @is_supergroup True, if supergroup chat should be created @param_description Channel description, 0-255 characters
//@description Creates new secret chat, returns created chat @user_id Identifier of a user to create secret chat with
createNewSecretChat user_id:int = Chat;
//@description Creates new channel supergroup chat from existing group chat and send corresponding messageChatMigrateTo and messageChatMigrateFrom. Deactivates group @chat_id Group chat identifier
//@description Changes chat title. Works only for group and channel chats. Requires administrator rights in groups and appropriate administrator right in channels. Title will not change before request to the server completes
//@chat_id Chat identifier @title New title of the chat, 1-255 characters
//@description Changes chat photo. Works only for group and channel chats. Requires administrator rights in groups and appropriate administrator right in channels. Photo will not change before request to the server completes
//@chat_id Chat identifier @photo New chat photo. You can use zero InputFileId to delete chat photo. Files accessible only by HTTP URL are not acceptable
//@description Changes chat pinned state. You can pin up to getOption("pinned_chat_count_max") non-secret chats and the same number of secret chats @chat_id Chat identifier @is_pinned New value of is_pinned
//@description Adds new member to chat. Members can't be added to private or secret chats. Member will not be added until chat state will be synchronized with the server
//@chat_id Chat identifier @user_id Identifier of the user to add @forward_limit Number of previous messages from chat to forward to new member, ignored for channel chats. Can't be greater than 300
//@description Adds many new members to the chat. Currently, available only for channels. Can't be used to join the channel. Members can't be added to broadcast channel if it has more than 200 members. Members will not be added until chat state will be synchronized with the server
//@description Changes status of the chat member, need appropriate privileges. This function is currently not suitable for adding new members to the chat, use addChatMember instead. Status will not be changed until chat state will be synchronized with the server
//@description Searches for the specified query in the first name, last name and username among members of the specified chat. Requires administrator rights in broadcast channels @chat_id Chat identifier @query Query to search for @limit Maximum number of users to be returned
//@description Asynchronously downloads file from cloud. Updates updateFile will notify about download progress and successful download @file_id Identifier of file to download
//@priority Priority of download, 1-32. The higher priority, the earlier file will be downloaded. If priorities of two files are equal then the last one for which downloadFile is called will be downloaded first
downloadFile file_id:int priority:int = Ok;
//@description Stops file downloading. If file is already downloaded, does nothing @file_id Identifier of file to cancel download
//@description Asynchronously uploads file to the cloud without sending it in a message. Updates updateFile will notify about upload progress and successful upload. The file will not have persistent identifier until it will be sent in a message @file File to upload @file_type File type
//@priority Priority of upload, 1-32. The higher priority, the earlier file will be uploaded. If priorities of two files are equal then the first one for which uploadFile is called will be uploaded first
//@description Stops file uploading. Works only for files uploaded using uploadFile. For other files the behavior is undefined @file_id Identifier of file to cancel upload
cancelUploadFile file_id:int = Ok;
//@description Next part of a file was generated
//@generation_id Identifier of the generation process
//@size Full size of file in bytes, 0 if unknown.
//@local_size Number of bytes already generated. Negative number means that generation has failed and should be terminated
//@description Generates new chat invite link, previously generated link is revoked. Available for group and channel chats. In groups can be called only by creator, in channels requires appropriate rights @chat_id Chat identifier
//@description Checks chat invite link for validness and returns information about the corresponding chat @invite_link Invite link to check. Should begin with "https://t.me/joinchat/", "https://telegram.me/joinchat/" or "https://telegram.dog/joinchat/"
//@description Imports chat invite link, adds current user to a chat if possible. Member will not be added until chat state will be synchronized with the server
//@description Discards a call @call_id Call identifier @is_disconnected True, if users was disconnected @duration Call duration in seconds @connection_id Identifier of a connection used during the call
//@description Adds user to black list @user_id User identifier
blockUser user_id:int = Ok;
//@description Removes user from black list @user_id User identifier
unblockUser user_id:int = Ok;
//@description Returns users blocked by the current user @offset Number of users to skip in result, must be non-negative @limit Maximum number of users to return, can't be greater than 100
//@description Searches for specified query in the first name, last name and username of the known user contacts @query Query to search for, can be empty to return all contacts @limit Maximum number of users to be returned
searchContacts query:string limit:int = Users;
//@description Deletes users from contacts list @user_ids Identifiers of users to be deleted
//@description Returns profile photos of the user. Result of this query may be outdated: some photos may be already deleted @user_id User identifier @offset Photos to skip, must be non-negative @limit Maximum number of photos to be returned, can't be greater than 100
//@description Returns stickers from installed ordinary sticker sets corresponding to the given emoji. If emoji is not empty, elso favorite and recently used stickers may be returned @emoji String representation of emoji. If empty, returns all known stickers @limit Maximum number of stickers to return
//@description Returns list of archived sticker sets @is_masks Pass true to return mask stickers sets, pass false to return ordinary sticker sets @offset_sticker_set_id Identifier of the sticker set from which return the result @limit Maximum number of sticker sets to return
//@description Returns list of trending sticker sets
getTrendingStickerSets = StickerSets;
//@description Returns list of sticker sets attached to a file, currently only photos and videos can have attached sticker sets @file_id File identifier
getAttachedStickerSets file_id:int = StickerSets;
//@description Returns information about sticker set by its identifier @set_id Identifier of the sticker set
//@description Installs/uninstalls or enables/archives sticker set @set_id Identifier of the sticker set @is_installed New value of is_installed @is_archived New value of is_archived. A sticker set can't be installed and archived simultaneously
//@description Changes the order of installed sticker sets @is_masks Pass true to change mask sticker sets order, pass false to change ordinary sticker sets order @sticker_set_ids Identifiers of installed sticker sets in the new right order
//@description Returns list of recently used stickers @is_attached Pass true to return stickers and masks recently attached to photo or video files, pass false to return recently sent stickers
//@description Manually adds new sticker to the list of recently used stickers. New sticker is added to the beginning of the list. If the sticker is already in the list, at first it is removed from the list. Only stickers belonging to a sticker set can be added to the list
//@is_attached Pass true to add the sticker to the list of stickers recently attached to photo or video files, pass false to add the sticker to the list of recently sent stickers @sticker Sticker file to add
//@description Removes a sticker from the list of recently used stickers @is_attached Pass true to remove the sticker from the list of stickers recently attached to photo or video files, pass false to remove the sticker from the list of recently sent stickers @sticker Sticker file to delete
//@description Clears list of recently used stickers @is_attached Pass true to clear list of stickers recently attached to photo or video files, pass false to clear the list of recently sent stickers
//@description Adds new sticker to the list of favorite stickers. New sticker is added to the beginning of the list. If the sticker is already in the list, at first it is removed from the list. Only stickers belonging to a sticker set can be added to the list
//@sticker Sticker file to add
addFavoriteSticker sticker:InputFile = Ok;
//@description Removes a sticker from the list of favorite stickers @sticker Sticker file to delete from the list
//@description Manually adds new animation to the list of saved animations. New animation is added to the beginning of the list. If the animation is already in the list, at first it is removed from the list. Only non-secret video animations with MIME type "video/mp4" can be added to the list
//@animation Animation file to add. Only known to server animations (i. e. successfully sent via message) can be added to the list
//@description Deletes a hashtag from the list of recently used hashtags @hashtag The hashtag to delete
deleteRecentHashtag hashtag:string = Ok;
//@description Returns web page preview by text of the message. Do not call this function to often. Returns error 404 if web page has no preview @message_text Message text
//@description Returns web page instant view if available. Returns error 404 if web page has no instant view @url Web page URL @force_full If true, full web page instant view will be returned
//@description Resets all notification settings to the default value. By default the only muted chats are supergroups, sound is set to 'default' and message previews are showed
//@description Uploads new profile photo for logged in user. If something changes, updateUser will be sent @photo Profile photo to set. inputFileId and inputFilePersistentId may be unsupported
//@description Changes first and last names of logged in user. If something changes, updateUser will be sent @first_name New value of user first name, 1-255 characters @last_name New value of optional user last name, 0-255 characters
//@description Changes username of logged in user. If something changes, updateUser will be sent @username New value of username. Use empty string to remove username
changeUsername username:string = Ok;
//@description Changes user's phone number and sends authentication code to the new user's phone number. Returns authStateWaitCode with information about sent code on success
//@phone_number New user's phone number in any reasonable format @allow_flash_call Pass True, if code can be sent via flash call to the specified phone number @is_current_phone_number Pass true, if the phone number is used on the current device. Ignored if allow_flash_call is False
//@description Resends authentication code sent to change user's phone number. Wotks only if in previously received authStateWaitCode next_code_type was not null. Returns authStateWaitCode on success
//@description Checks authentication code sent to change user's phone number. Returns authStateOk on success @code Verification code from SMS, phone call or flash call
//@description Gives or revokes all members of the group administrator rights. Needs creator privileges in the group @group_id Identifier of the group @everyone_is_administrator New value of everyone_is_administrator
//@description Changes username of the channel. Needs creator privileges in the channel @channel_id Identifier of the channel @username New value of username. Use empty string to remove username
//@description Changes sticker set of the channel. Needs appropriate rights in the channel @channel_id Identifier of the channel @sticker_set_id New value of channel sticker set identifier. Use 0 to remove channel sticker set
//@description Gives or revokes right to invite new members to all current members of the channel. Needs appropriate rights in the channel. Available only for supergroups @channel_id Identifier of the channel @anyone_can_invite New value of anyone_can_invite
//@description Enables or disables sender signature on sent messages in the channel. Needs appropriate rights in the channel. Not available for supergroups @channel_id Identifier of the channel @sign_messages New value of sign_messages
//@description Changes information about the channel. Needs appropriate rights in the channel @channel_id Identifier of the channel @param_description New channel description, 0-255 characters
//@description Pins a message in a supergroup channel chat. Needs appropriate rights in the channel @channel_id Identifier of the channel @message_id Identifier of the new pinned message @disable_notification True, if there should be no notification about the pinned message
//@description Reports some supergroup channel messages from a user as spam messages @channel_id Channel identifier @user_id User identifier @message_ids Identifiers of messages sent in the supergroup by the user, the list should be non-empty
//@description Returns information about channel members or banned users. Can be used only if channel_full->can_get_members == true. Administrator privileges may be additionally needed for some filters @channel_id Identifier of the channel
//@filter Kind of channel users to return, defaults to channelMembersRecent @offset Number of channel users to skip @limit Maximum number of users be returned, can't be greater than 200
//@description Deletes channel along with all messages in corresponding chat. Releases channel username and removes all members. Needs creator privileges in the channel. Channels with more than 1000 members can't be deleted @channel_id Identifier of the channel
//@description Returns list of service actions taken by chat members and administrators in the last 48 hours, available only in channels. Requires administrator rights. Returns result in reverse chronological order, i. e. in order of decreasing event_id
//@chat_id Chat identifier @query Search query to filter events @from_event_id Identifier of an event from which to return result, you can use 0 to get results from the latest events @limit Maximum number of events to return, can't be greater than 100
//@filters Types of events to return, defaults to all @user_ids User identifiers, which events to return, defaults to all users
//@description Returns invoice payment form. The method should be called when user presses inlineKeyboardButtonBuy @chat_id Chat identifier of the Invoice message @message_id Message identifier
//@description Validates order information provided by the user and returns available shipping options for flexible invoice @chat_id Chat identifier of the Invoice message @message_id Message identifier @order_info Order information, provided by the user @allow_save True, if order information can be saved
//@description Sends filled payment form to the bot for the final verification @chat_id Chat identifier of the Invoice message @message_id Message identifier @order_info_id Identifier returned by ValidateOrderInfo or empty string @shipping_option_id Identifier of a chosen shipping option, if applicable
//@credentials Credentials choosed by user for payment
//@description Returns value of an option by its name. See list of available options on https://core.telegram.org/tdlib/options. Can be called before authorization
//@description Sets value of an option. See list of available options on https://core.telegram.org/tdlib/options. Only writable options can be set. Can be called before authorization
//@name Name of the option @value New value of the option
setOption name:string value:OptionValue = Ok;
//@description Changes period of inactivity, after which the account of currently logged in user will be automatically deleted @ttl New account TTL
changeAccountTtl ttl:accountTtl = Ok;
//@description Returns period of inactivity, after which the account of currently logged in user will be automatically deleted
getAccountTtl = AccountTtl;
//@description Deletes the account of currently logged in user, deleting from the server all information associated with it. Account's phone number can be used to create new account, but only once in two weeks @reason Optional reason of account deletion
deleteAccount reason:string = Ok;
//@description Returns current chat report spam state @chat_id Chat identifier
//@description Reports chat as a spam chat or as not a spam chat. Can be used only if ChatReportSpamState.can_report_spam is true. After this request ChatReportSpamState.can_report_spam became false forever @chat_id Chat identifier @is_spam_chat If true, chat will be reported as a spam chat, otherwise it will be marked as not a spam chat
//@description Reports chat to Telegram moderators. Can be used only for a channel chat or a private chat with a bot, because all other chats can't be checked by moderators @chat_id Chat identifier @reason Reason, the chat is reported
//@description Returns storage usage statistics @chat_limit Maximum number of chats with biggest storage usage for which separate statistics should be returned. All other chats will be grouped in entries with chat_id == 0. If chat info database is not used, chat_limit is ignored and is always set to 0
//@description Optimizes storage usage, i.e. deletes some files and return new storage usage statistics. Secret thumbnails can't be deleted
//@size Limit on total size of files after deletion. Pass -1 to use default limit
//@ttl Limit on time passed since last access time (or creation time on some filesystems) to a file. Pass -1 to use default limit
//@count Limit on total count of files after deletion. Pass -1 to use default limit
//@immunity_delay Number of seconds after creation of a file, it can't be delited. Pass -1 to use default value
//@file_types If not empty, only files with given types are considered. By default, all types except thumbnails, profile photos, stickers and wallpapers are deleted
//@chat_ids If not empty, only files from the given chats are considered. Use 0 as chat identifier to delete files not belonging to any chat, for example profile photos
//@exclude_chat_ids If not empty, files from the given chats are exluded. Use 0 as chat identifier to exclude all files not belonging to any chat, for example profile photos
//@chat_limit Same as in getStorageStatistics. Affects only returned statistics
//@description Sets current network type. Can be called before authorization. Call to this method forces reopening of all network connections mitigating delay in switching between different networks, so it should be called whenever network is changed even network type remains the same. -Network type is used to check if library can use network at all and for collecting detailed network data usage statistics @type New network type, defaults to networkTypeNone
//@description Returns network data usage statistics. Can be called before authorization @only_current If true, returns only data for the current library launch
//@description Adds specified data to data usage statistics. Can be called before authorization @entry Network statistics entry with a data to add to statistics
//@description Bots only. Informs server about number of pending bot updates if they aren't processed for a long time @pending_update_count Number of pending updates @error_message Last error's message
//@description Bots only. Uploads a png image with a sticker. Returns uploaded file @user_id Sticker file owner @png_sticker Png image with the sticker, must be up to 512 kilobytes in size and fit in 512x512 square
//@description Bots only. Creates new sticker set. Returns created sticker set @user_id Sticker set owner @title Sticker set title, 1-64 characters @name Sticker set name. Can contain only english letters, digits and underscores. Should end on *"_by_<bot username>"*. *<bot_username>* is case insensitive, 1-64 characters
//@is_masks True, is stickers are masks @stickers List of stickers to add to the set
//@description Bots only. Adds new sticker to a set. Returns the sticker set @user_id Sticker set owner @name Sticker set name @sticker Sticker to add to the set
//@description Bots only. Changes position of a sticker in the set it belongs to. Sticker set should be created by the bot @sticker The sticker @position New sticker position in the set, zero-based
//@description Returns Ok after specified amount of the time passed. Can be called before authorization @seconds Number of seconds before that function returns
//@description Returns invite text for invitation of new users
getInviteText = Text;
//@description Returns terms of service. Can be called before authorization
getTermsOfService = Text;
//@description Sets proxy server for network requests. Can be called before authorization @proxy The proxy to use. You can specify null to remove proxy server
setProxy proxy:Proxy = Ok;
//@description Returns current set up proxy. Can be called before authorization
getProxy = Proxy;
//@description Test request. Does nothing
testCallEmpty = Ok;
//@description Test request. Returns back received string @x String to return
testCallString x:string = TestString;
//@description Test request. Returns back received bytes @x Bytes to return
testCallBytes x:bytes = TestBytes;
//@description Test request. Returns back received vector of numbers @x Vector of numbers to return
testCallVectorInt x:vector<int> = TestVectorInt;
//@description Test request. Returns back received vector of objects containing a number @x Vector of objects to return