Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int ? = Int;
- long ? = Long;
- double ? = Double;
- string ? = String;
- bytes = Bytes;
- boolFalse = Bool;
- boolTrue = Bool;
- vector {t:Type} # [ t ] = Vector t;
- //@description Object of this type may be returned on every function call in case of the error
- //@code Error code, maybe changed in the future @message Error message, may be changed in the future
- error code:int message:string = Error;
- //@description Object of this type returns on successful function call for some functions
- ok = Ok;
- //@class AuthCodeType @description Provides information about the way an authentication code is delivered to the user
- //@description Code is delivered through private Telegram message, which can be viewed in the other client @length Length of the code
- authCodeTypeMessage length:int = AuthCodeType;
- //@description Code is delivered by SMS to the specified phone number @length Length of the code
- authCodeTypeSms length:int = AuthCodeType;
- //@description Code is delievered by voice call to the specified phone number @length Length of the code
- authCodeTypeCall length:int = AuthCodeType;
- //@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
- authCodeTypeFlashCall pattern:string = AuthCodeType;
- //@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
- authStateWaitCode is_registered:Bool code_type:AuthCodeType next_code_type:AuthCodeType timeout:int = AuthState;
- //@description User is authorized but he needs to enter its password to begin to use application @hint Hint on password, can be empty @has_recovery Is recovery email set up
- //@email_unconfirmed_pattern Pattern of email to which recovery mail was sent, empty before recovery email was sent
- authStateWaitPassword hint:string has_recovery:Bool email_unconfirmed_pattern:string = AuthState;
- //@description User is successfully authorized. TDLib can answer queries
- authStateOk = AuthState;
- //@description User is currently logging out
- authStateLoggingOut = AuthState;
- //@description Represents a file @id Unique file identifier, 0 for empty file @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
- //@size File size, 0 if unknown @path Local path to the file, if available
- file id:int persistent_id:string size:int path:string = File;
- //@class InputFile @description Points to some file
- //@description File defined by its id @id Unique file identifier
- inputFileId id:int = InputFile;
- //@description File defined by its persistent id @persistent_id Persistent file identifier
- inputFilePersistentId persistent_id:string = InputFile;
- //@description File deifned by local path @path Local path to the file
- inputFileLocal path:string = InputFile;
- //@description Photo description @type Thumbnail type (see https://core.telegram.org/constructor/photoSize)
- //@photo Information about photo file @width Photo width @height Photo height
- photoSize type:string photo:file width:int height:int = PhotoSize;
- //@description Describes animation file. Animation should be encoded in gif or mp4 format @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
- animation width:int height:int file_name:string mime_type:string thumb:photoSize animation:file = 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
- audio duration:int title:string performer:string file_name:string mime_type:string album_cover_thumb:photoSize audio:file = 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
- document file_name:string mime_type:string thumb:photoSize document:file = Document;
- //@description Describes photo @id Photo identifier, 0 for deleted photo @photos Available variants of photo of different sizes
- photo id:long photos:vector<photoSize> = Photo;
- //@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 @rating Rating of the sticker, non-negative. The rating is higher for often used stickers @thumb Sticker thumb in webp or jpeg format, nullable @sticker File with sticker
- sticker set_id:long width:int height:int emoji:string rating:double thumb:photoSize sticker:file = 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 @thumb Video thumb as defined by sender, nullable @video File with the video
- video duration:int width:int height:int file_name:string mime_type:string thumb:photoSize video:file = Video;
- //@description Describes voice record. 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
- //@waveform Waveform representation of the voice in 5-bit format @mime_type MIME type of a file as defined by sender @voice File with the voice record
- voice duration:int waveform:bytes mime_type:string voice:file = Voice;
- //@description Describes web page preview @url Original URL of link @display_url URL to display
- //@type Type of web page: article, photo, audio, video, document, profile, app or something other
- //@site_name Short name of the site (i.e. Google Docs or App Store) @title Title of the content @param_description Description of the content
- //@photo Image representing the content, nullable
- //@embed_url Url to show embedded preview
- //@embed_type MIME type of embedded preview, i.e. text/html or video/mp4
- //@embed_width Width of embedded preview
- //@embed_height Height of embedded preview @duration Duration of the content @author Author of the content
- //@animation Preview as Animation if available, nullable
- //@audio Preview as Audio if available, nullable
- //@document Preview as Document if available (currently only for small pdf files and zip archives), nullable
- //@sticker Preview as Sticker for small .webp files if available, nullable
- //@video Preview as Video if available, nullable
- //@voice Preview as Voice if available, nullable
- webPage url:string display_url:string type:string site_name:string title:string description:string photo:photo embed_url:string embed_type:string embed_width:int embed_height:int duration:int author:string animation:animation audio:audio document:document sticker:sticker video:video voice:voice = WebPage;
- //@description Describes user contact @phone_number User's phone number @first_name User first name @last_name User last name @user_id User identifier if known, 0 otherwise
- contact phone_number:string first_name:string last_name:string user_id:int = Contact;
- //@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
- location latitude:double longitude:double = Location;
- //@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
- venue location:location title:string address:string provider:string id:string = Venue;
- //@description Descripes a game @id Game id @short_name Game short name, to share a game use a URL https://telegram.me/{bot_username}?game={game_short_name} @title Game title @text Game text, usually containing game scoreboards @text_entities Entities contained in the text @description Game description @photo Game photo @animation Game animation, nullable
- game id:long short_name:string title:string text:string text_entities:vector<MessageEntity> description:string photo:photo animation:animation = Game;
- //@description Describes user profile photo @id Photo identifier, 0 for empty photo. Can be used to find photo in list of userProfilePhotos
- //@small Small (160x160) user profile photo @big Big (640x640) user profile photo
- profilePhoto id:long small:file big:file = ProfilePhoto;
- //@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
- userTypeBot can_join_group_chats:Bool can_read_all_group_chat_messages:Bool is_inline:Bool inline_query_placeholder:string need_location:Bool = UserType;
- //@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
- botCommand command:string description:string = BotCommand;
- //@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
- botInfo description:string commands:vector<botCommand> = BotInfo;
- //@description Represents user @id User identifier @first_name User first name @last_name User last name @username User username
- //@phone_number User's phone number @status User's online status @profile_photo User profile photo, nullable
- //@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
- user id:int first_name:string last_name:string username:string phone_number:string status:UserStatus profile_photo:profilePhoto my_link:LinkState foreign_link:LinkState is_verified:Bool restriction_reason:string have_access:Bool type:UserType = User;
- //@description Gives full information about an user (except full list of profile photos) @user General info about the user @is_blocked Is user blacklisted by current user @about Short user description @bot_info Information about bot if user is a bot, nullable
- userFull user:user is_blocked:Bool about:string bot_info:botInfo = UserFull;
- //@description Contains part of the list of user photos @total_count Total number of user profile photos @photos List of photos
- userProfilePhotos total_count:int photos:vector<photo> = UserProfilePhotos;
- //@class ChatMemberStatus @description Provides information about status of a member in the chat
- //@description Creator of the chat, can delete any message, kick any user and add editors and moderators in channels
- chatMemberStatusCreator = ChatMemberStatus;
- //@description In broadcast channels, member that can post messages to the broadcast channel and have moderator rights. In groups and supergroups, member that can add new members to the chat/kick unpriviledged members
- chatMemberStatusEditor = ChatMemberStatus;
- //@description Only for channels, member that can delete messages of unprivileged members and kick them
- chatMemberStatusModerator = ChatMemberStatus;
- //@description User is a member of the chat, but have no any additional privileges
- chatMemberStatusMember = ChatMemberStatus;
- //@description User is not a chat member
- chatMemberStatusLeft = ChatMemberStatus;
- //@description User was kicked from the chat (and obviously is not a chat member)
- chatMemberStatusKicked = ChatMemberStatus;
- //@description User with information about its chat joining/kicking @user_id User identifier of the chat member @inviter_user_id Identifier of a user invited this member to/kicked this member from 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
- chatMember user_id:int inviter_user_id:int join_date:int status:ChatMemberStatus bot_info:botInfo = ChatMember;
- //@description Contains list of chat members @total_count Approximate total count of found chat members @members List of members
- chatMembers total_count:int members:vector<chatMember> = ChatMembers;
- //@class ChannelMembersFilter @description Specifies kind of chat users to return in getChannelMembers
- //@description Return recently active users in reverse chronological order
- channelMembersRecent = ChannelMembersFilter;
- //@description Return privileged members, i.e. creator, editors and moderators are returned
- channelMembersAdministrators = ChannelMembersFilter;
- //@description Return kicked from the channel
- channelMembersKicked = ChannelMembersFilter;
- //@description Return bots in the channel
- channelMembersBots = ChannelMembersFilter;
- //@description Represents a group of zero or more other users @id Group identifier
- //@member_count Group member count
- //@status Status of the current user in the group
- //@anyone_can_edit True, if all members granted editor rights in the group
- //@is_active True, if group is active
- //@migrated_to_channel_id Identifier of channel (supergroup) to which this group was migrated or 0 if none
- group id:int member_count:int status:ChatMemberStatus anyone_can_edit:Bool is_active:Bool migrated_to_channel_id:int = Group;
- //@description Gives full information about a group @group General info about the 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
- groupFull group:group creator_user_id:int members:vector<chatMember> invite_link:string = GroupFull;
- //@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
- //@is_verified True, if the channel is verified
- //@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
- channel id:int username:string date:int status:ChatMemberStatus anyone_can_invite:Bool sign_messages:Bool is_supergroup:Bool is_verified:Bool restriction_reason:string = Channel;
- //@description Gives full information about a channel
- //@channel General info about the channel
- //@about Information about the channel
- //@member_count Channel member count, 0 if unknown
- //@administrator_count Number of privileged users in the channel, 0 if unknown
- //@kicked_count Number of users kicked from the channel, 0 if unknown
- //@can_get_members True, if members of the channel can be retrieved
- //@can_set_username True, if channel can be made public
- //@invite_link Invite link for this channel
- //@pinned_message_id Identifier of the pinned message in the channel chat, or 0 if none
- //@migrated_from_group_id Identifier of the group, this supergroup migrated from, or 0 if none
- //@migrated_from_max_message_id Identifier of last message in the group chat migrated from, or 0 if none
- channelFull channel:channel about:string member_count:int administrator_count:int kicked_count:int can_get_members:Bool can_set_username:Bool invite_link:string pinned_message_id:int migrated_from_group_id:int migrated_from_max_message_id:int = ChannelFull;
- //@description Represents a secret chat
- secretChat id:int user_id:int state:int ttl:int = SecretChat;
- //@description Gives full information about a secret chat
- secretChatFull secret_chat:secretChat key_hash:string = SecretChatFull;
- //@description Contains chat invite link @invite_link Chat invite link
- chatInviteLink invite_link:string = ChatInviteLink;
- //@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 @members 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
- chatInviteLinkInfo chat_id:long title:string photo:chatPhoto member_count:int members:vector<user> is_group:Bool is_channel:Bool is_public_channel:Bool is_supergroup_channel:Bool = ChatInviteLinkInfo;
- //@description Contains list of users @users List of users
- users users:vector<user> = Users;
- //@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
- messageForwardedFromUser sender_user_id:int date:int = MessageForwardInfo;
- //@description Message is orifinally a channel post @chat_id Identifier of a chat from which message is forwarded @sender_user_id User identifier of the original message sender, 0 if unknown
- //@date Date when message was originally sent @message_id Message identifier of the message from which the message is forwarded, 0 if unknown
- messageForwardedPost chat_id:long sender_user_id:int date:int message_id:int = MessageForwardInfo;
- //@class MessageSendState @description Contains information about sending state of the message
- //@description Message is incoming
- messageIsIncoming = MessageSendState;
- //@description Message is outgoing but is yet not delivered to the server
- messageIsBeingSent = MessageSendState;
- //@description Message was synchronized with the server
- messageIsSuccessfullySent = MessageSendState;
- //@description Message is failed to send
- messageIsFailedToSend = MessageSendState;
- //@description Describes message
- //@id Unique message identifier
- //@sender_user_id Identifier of the user who sent the message, 0 if unknown. It can be unknown for channel posts which are not signed by the author
- //@chat_id Chat identifier
- //@send_state Information about sending state of the message
- //@can_be_edited True, if message can be edited
- //@can_be_deleted True, if message can be deleted
- //@is_post True, if message is channel post. All messages to broadcast channels are posts, all other messages are not posts
- //@date Date when message was sent, unix time
- //@edit_date Date when message was edited last time, unix time
- //@forward_info Information about initial message sender, nullable
- //@reply_to_message_id If non-zero, identifier of the message this message replies to, can be identifier of deleted message
- //@via_bot_user_id If non-zero, user identifier of the bot this message is sent via
- //@views Number of times this message was viewed
- //@content Content of the message
- //@reply_markup Reply markup for the message, nullable
- message id:int sender_user_id:int chat_id:long send_state:MessageSendState can_be_edited:Bool can_be_deleted:Bool is_post:Bool date:int edit_date:int forward_info:MessageForwardInfo reply_to_message_id:int via_bot_user_id:int views:int content:MessageContent reply_markup:ReplyMarkup = Message;
- //@description Contains list of messages @total_count Approximate total count of found messages @messages List of messages
- messages total_count:int messages:vector<message> = Messages;
- //@class NotificationSettingsScope @description Describes kinds of chat for which notification settings are applied
- //@description Notification settings applied to particular chat @chat_id Chat identifier
- notificationSettingsForChat chat_id:long = NotificationSettingsScope;
- //@description Notification settings applied to all private chats
- notificationSettingsForPrivateChats = NotificationSettingsScope;
- //@description Notification settings applied to all group chats
- notificationSettingsForGroupChats = NotificationSettingsScope;
- //@description Notification settings applied to all chats
- notificationSettingsForAllChats = NotificationSettingsScope;
- //@description Contains information about notification settings for chat or chats @mute_for Time left before notifications will be unmuted @sound Audio file name for notifications
- //@show_preview Display message text/media in notification
- notificationSettings mute_for:int sound:string show_preview:Bool = NotificationSettings;
- //@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
- draftMessage reply_to_message_id:int input_message_text:InputMessageContent = DraftMessage;
- //@class ChatInfo @description Describes type of a chat
- //@description Ordinary chat with one user @user Information about interlocutor
- privateChatInfo user:user = ChatInfo;
- //@description Chat with zero or more other users @group Information about the chat
- groupChatInfo group:group = ChatInfo;
- //@description Chat with unlimited number of members @channel Information about the chat
- channelChatInfo channel:channel = ChatInfo;
- //@description Secret chat with one user
- secretChatInfo secret_chat:secretChat = ChatInfo;
- //@description Chat (private chat or group chat or channel chat)
- //@id Chat unique identifier
- //@title Chat title
- //@photo Chat photo, nullable
- //@top_message Last message in the chat, nullable
- //@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.
- //@unread_count Count of unread messages in the chat
- //@last_read_inbox_message_id Identifier of last read incoming message
- //@last_read_outbox_message_id Identifier of last read outgoing message
- //@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
- //@type Information about type of the chat
- chat id:long title:string photo:chatPhoto top_message:message order:long unread_count:int last_read_inbox_message_id:int last_read_outbox_message_id:int notification_settings:notificationSettings reply_markup_message_id:int draft_message:draftMessage type:ChatInfo = Chat;
- //@description Contains list of chats @chats List of chats
- chats chats:vector<chat> = Chats;
- //@class KeyboardButtonType @description Describes type of the keyboard button
- //@description Simple button with a text, which should be sent when the button is pressed
- keyboardButtonTypeText = KeyboardButtonType;
- //@description A button which sends user's phone number when pressed, available only in private chats
- keyboardButtonTypeRequestPhoneNumber = KeyboardButtonType;
- //@description A button which sends user location when pressed, available only in private chats
- keyboardButtonTypeRequestLocation = KeyboardButtonType;
- //@description Represents one button of the bot keyboard @text Text of the button @type Type of the button
- keyboardButton text:string type:KeyboardButtonType = KeyboardButton;
- //@class InlineKeyboardButtonType @description Describes type of the inline keyboard button
- //@description A button which opens the specified URL @url URL to open
- inlineKeyboardButtonTypeUrl url:string = InlineKeyboardButtonType;
- //@description A button which sends to the bot special callback query @data Data to be sent to the bot through a callack query
- inlineKeyboardButtonTypeCallback data:bytes = InlineKeyboardButtonType;
- //@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
- inlineKeyboardButtonTypeCallbackGame = InlineKeyboardButtonType;
- //@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
- inlineKeyboardButtonTypeSwitchInline query:string in_current_chat:Bool = InlineKeyboardButtonType;
- //@description Represents one button of the inline keyboard @text Text of the button @type Type of the button
- inlineKeyboardButton text:string type:InlineKeyboardButtonType = InlineKeyboardButton;
- //@class ReplyMarkup @description Contains description of custom keyboard and actions with it for fast reply to bots
- //@description Instruct clients to hide 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 showed automatically only for mentioned users or replied to chat user, for incoming messages it is true if and only if keyboard needs to be automatically showed to current user
- replyMarkupHideKeyboard personal:Bool = ReplyMarkup;
- //@description Instruct clients to force reply to this message @personal Keyboard is showed automatically only for mentioned users or replied to chat user, for incoming messages it is true if and only if keyboard needs to be automatically showed to current user
- replyMarkupForceReply personal:Bool = ReplyMarkup;
- //@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
- //@one_time Do clients need to hide keyboard after use
- //@personal Keyboard is showed automatically only for mentioned users or replied to chat user, for incoming messages it is true if and only if keyboard needs to be automatically showed to current user
- replyMarkupShowKeyboard rows:vector<vector<keyboardButton>> resize_keyboard:Bool one_time:Bool personal:Bool = ReplyMarkup;
- //@description Contains inline keyboard layout
- //@rows List of rows of inline keyboard buttons
- replyMarkupInlineKeyboard rows:vector<vector<inlineKeyboardButton>> = ReplyMarkup;
- //@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
- messageText text:string entities:vector<MessageEntity> web_page:webPage = MessageContent;
- //@description Animation message @animation Message content, nullable for messages sent through sendInlineQueryResultMessage @caption Animation caption
- messageAnimation animation:animation caption:string = MessageContent;
- //@description Audio message @audio Message content, nullable for messages sent through sendInlineQueryResultMessage @caption Audio caption @is_listened True, if the audio message was listened to
- messageAudio audio:audio caption:string is_listened:Bool = MessageContent;
- //@description Document message @document Message content, nullable for messages sent through sendInlineQueryResultMessage @caption Document caption
- messageDocument document:document caption:string = MessageContent;
- //@description Photo message @photo Message content, nullable for messages sent through sendInlineQueryResultMessage @caption Photo caption
- messagePhoto photo:photo caption:string = MessageContent;
- //@description Sticker message @sticker Message content, nullable for messages sent through sendInlineQueryResultMessage
- messageSticker sticker:sticker = MessageContent;
- //@description Video message @video Message content, nullable for messages sent through sendInlineQueryResultMessage @caption Video caption
- messageVideo video:video caption:string = MessageContent;
- //@description Voice message @voice Message content, nullable for messages sent through sendInlineQueryResultMessage @caption Voice caption @is_listened True, if the voice message was listened to
- messageVoice voice:voice caption:string is_listened:Bool = MessageContent;
- //@description Message with location @location Message content
- messageLocation location:location = MessageContent;
- //@description Message with information about venue @venue Message content
- messageVenue venue:venue = MessageContent;
- //@description User contact message @contact Message content
- messageContact contact:contact = MessageContent;
- //@description Message with a game @game The game
- messageGame game:game = MessageContent;
- //@description New group chat created @title Title of created group chat @members Parcticipants of created group chat
- messageGroupChatCreate title:string members:vector<user> = MessageContent;
- //@description New channel chat created @title Title of created channel chat
- messageChannelChatCreate title:string = MessageContent;
- //@description Chat title changed @title New chat title
- messageChatChangeTitle title:string = MessageContent;
- //@description Chat photo changed @photo New chat photo
- messageChatChangePhoto photo:photo = MessageContent;
- //@description Chat photo deleted
- messageChatDeletePhoto = MessageContent;
- //@description Chat members added @members New chat member
- messageChatAddMembers members:vector<user> = MessageContent;
- //@description Chat member joined by invite link @inviter_user_id Inviter of the member, i.e. creator of the chat
- messageChatJoinByLink inviter_user_id:int = MessageContent;
- //@description Chat member deleted @user Left or kicked chat member
- messageChatDeleteMember user:user = MessageContent;
- //@description Group chat is migrated to supergroup channel and deactivated @channel_id Identifier of the channel it is migrated to
- messageChatMigrateTo channel_id:int = MessageContent;
- //@description Supergroup channel is created from group chat @title Title of created channel chat @group_id Identifier of the group it is migrated from
- messageChatMigrateFrom title:string group_id:int = MessageContent;
- //@description Some message was pinned @message_id Identifier of the pinned message, can be identifier of the deleted message
- messagePinMessage message_id: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
- messageGameScore game_message_id:int game_id:long score:int = MessageContent;
- //@description Unsupported message content
- messageUnsupported = MessageContent;
- //@class MessageEntity @description Represent part of the message text which needs to be formatted in some unusual way
- //@description Mention of the user by his username @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points
- messageEntityMention offset:int length:int = MessageEntity;
- //@description Hashtag beginning with # @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points
- messageEntityHashtag offset:int length:int = MessageEntity;
- //@description Bot command beginning with / @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points
- messageEntityBotCommand offset:int length:int = MessageEntity;
- //@description Url beginning with http @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points
- messageEntityUrl offset:int length:int = MessageEntity;
- //@description Email @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points
- messageEntityEmail offset:int length:int = MessageEntity;
- //@description Bold text @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points
- messageEntityBold offset:int length:int = MessageEntity;
- //@description Italic text @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points
- messageEntityItalic offset:int length:int = MessageEntity;
- //@description Text needs to be formatted as inside of code HTML tag @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points
- messageEntityCode offset:int length:int = MessageEntity;
- //@description Text needs to be formatted as inside of pre HTML tag @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points
- messageEntityPre offset:int length:int = MessageEntity;
- //@description Text needs to be formatted as inside of pre and code HTML tags @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points @language Language of code as defined by sender
- messageEntityPreCode offset:int length:int language:string = MessageEntity;
- //@description Text description showed instead of the url @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points @url Url to be opened after link will be clicked
- messageEntityTextUrl offset:int length:int url:string = MessageEntity;
- //@description Mention of the user by some text @offset Offset of the entity in UTF-16 code points @length Length of the entity in UTF-16 code points @user_id Identifier of the mentioned user
- messageEntityMentionName offset:int length:int user_id:int = MessageEntity;
- //@class TextParseMode @description Describes a way text should be parsed for MessageEntities, by default text is treated as is
- //@description Text should be parsed in markdown-style way
- textParseModeMarkdown = TextParseMode;
- //@description Text should be parsed in the HTML-style way
- textParseModeHTML = TextParseMode;
- //@description Thumb to send along with a file, should be in jpeg format or webp format for stickers @path Path to the file with the thumb @width Thumb width, use 0 if unknown @height Thumb height, use 0 if unknown
- inputThumb path:string width:int height:int = InputThumb;
- //@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
- inputMessageText text:string disable_web_page_preview:Bool clear_draft:Bool entities:vector<MessageEntity> parse_mode:TextParseMode = InputMessageContent;
- //@description Animation message @animation Animation file to send @thumb Animation thumb, if available @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
- inputMessageAnimation animation:InputFile thumb:inputThumb width:int height:int caption:string = InputMessageContent;
- //@description Audio message @audio Audio file to send @album_cover_thumb Thumb of the album's cover, if available @duration Duration of audio in seconds, may be replaced by the server @title Title of the audio, may be replaced by the server @performer Performer of the audio, may be replaced by the server @caption Audio caption
- inputMessageAudio audio:InputFile album_cover_thumb:inputThumb duration:int title:string performer:string caption:string = InputMessageContent;
- //@description Document message @document Document to send @thumb Document thumb, if available @caption Document caption
- inputMessageDocument document:InputFile thumb:inputThumb caption:string = InputMessageContent;
- //@description Photo message @photo Photo to send @caption Photo caption
- inputMessagePhoto photo:InputFile caption:string = InputMessageContent;
- //@description Sticker message @sticker Sticker to send @thumb Sticker thumb, if available
- inputMessageSticker sticker:InputFile thumb:inputThumb = InputMessageContent;
- //@description Video message @video Video to send @thumb Video thumb, if available @duration Duration of video in seconds @width Video width @height Video height @caption Video caption
- inputMessageVideo video:InputFile thumb:inputThumb duration:int width:int height:int caption:string = InputMessageContent;
- //@description Voice message @voice Voice file to send @duration Duration of voice in seconds @waveform Waveform representation of the voice in 5-bit format @caption Voice caption
- inputMessageVoice voice:InputFile duration:int waveform:bytes caption:string = InputMessageContent;
- //@description Message with location @location Location to send
- inputMessageLocation location:location = InputMessageContent;
- //@description Message with information about venue @venue Venue to send
- inputMessageVenue venue:venue = InputMessageContent;
- //@description User contact message @contact Contact to send
- inputMessageContact contact:contact = InputMessageContent;
- //@description Message with a game @bot_user_id User identifier of a bot owned the game @game_short_name Game short name
- inputMessageGame bot_user_id:int game_short_name:string = InputMessageContent;
- //@description Forwarded message @from_chat_id Chat identifier of the message to forward @message_id Identifier of the message to forward
- inputMessageForwarded from_chat_id:long message_id:int = InputMessageContent;
- //@class SearchMessagesFilter @description Represents filter for content of searched messages
- //@description Return all found messages
- searchMessagesFilterEmpty = SearchMessagesFilter;
- //@description Return only animation messages
- searchMessagesFilterAnimation = SearchMessagesFilter;
- //@description Return only audio messages
- searchMessagesFilterAudio = SearchMessagesFilter;
- //@description Return only document messages
- searchMessagesFilterDocument = SearchMessagesFilter;
- //@description Return only photo messages
- searchMessagesFilterPhoto = SearchMessagesFilter;
- //@description Return only video messages
- searchMessagesFilterVideo = SearchMessagesFilter;
- //@description Return only voice messages
- searchMessagesFilterVoice = SearchMessagesFilter;
- //@description Return only photo and video messages
- searchMessagesFilterPhotoAndVideo = SearchMessagesFilter;
- //@description Return only messages containing url
- searchMessagesFilterUrl = SearchMessagesFilter;
- //@description Return only messages containing chat photos
- searchMessagesFilterChatPhoto = SearchMessagesFilter;
- //@class SendMessageAction @description Notifies about activity in chat
- //@description User typing message
- sendMessageTypingAction = SendMessageAction;
- //@description User cancels typing
- sendMessageCancelAction = SendMessageAction;
- //@description User records a video
- sendMessageRecordVideoAction = SendMessageAction;
- //@description User uploads a video @progress Upload progress in percents
- sendMessageUploadVideoAction progress:int = SendMessageAction;
- //@description User records voice message
- sendMessageRecordVoiceAction = SendMessageAction;
- //@description User uploads voice message @progress Upload progress in percents
- sendMessageUploadVoiceAction progress:int = SendMessageAction;
- //@description User uploads a photo @progress Upload progress in percents
- sendMessageUploadPhotoAction progress:int = SendMessageAction;
- //@description User uploads a document @progress Upload progress in percents
- sendMessageUploadDocumentAction progress:int = SendMessageAction;
- //@description User sends geolocation
- sendMessageGeoLocationAction = SendMessageAction;
- //@description User chooses contact to send
- sendMessageChooseContactAction = SendMessageAction;
- //@description User starts to play a game
- sendMessageStartPlayGameAction = SendMessageAction;
- //@description User stops to play a game
- sendMessageStopPlayGameAction = SendMessageAction;
- //@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 sticker set @id Sticker set identifier @title Title of the sticker set @name Name of the sticker set @rating Rating of the sticker, non-negative. The rating is higher for often used stickers
- //@is_installed True if sticker set is installed by logged in user @is_enabled True if sticker set is enabled @is_official True if sticker set is official and can't be uninstalled @stickers List of stickers in this set
- stickerSet id:long title:string name:string rating:double is_installed:Bool is_enabled:Bool is_official:Bool stickers:vector<sticker> = StickerSet;
- //@description Represents short information about sticker set @id Sticker set identifier @title Title of the sticker set @name Name of the sticker set @rating Rating of the sticker, non-negative. The rating is higher for often used stickers
- //@is_installed True if sticker set is installed by logged in user @is_enabled True if sticker set is enabled @is_official True if sticker set is official and can't be uninstalled @size Number of stickers in the set
- stickerSetInfo id:long title:string name:string rating:double is_installed:Bool is_enabled:Bool is_official:Bool size:int = StickerSetInfo;
- //@description Represents list of sticker sets @sets List of sticker sets
- stickerSets sets:vector<stickerSetInfo> = StickerSets;
- //@description Represents list of animations @animations Animations
- animations animations:vector<animation> = Animations;
- //@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_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
- inputInlineQueryResultAnimatedGif id:string title:string thumb_url:string gif_url:string gif_width:int gif_height:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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_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
- inputInlineQueryResultAnimatedMpeg4 id:string title:string thumb_url:string mpeg4_url:string mpeg4_width:int mpeg4_height:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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
- inputInlineQueryResultArticle id:string url:string hide_url:Bool title:string description:string thumb_url:string thumb_width:int thumb_height:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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
- inputInlineQueryResultAudio id:string title:string performer:string audio_url:string audio_duration:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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
- inputInlineQueryResultContact id:string contact:contact thumb_url:string thumb_width:int thumb_height:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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
- inputInlineQueryResultDocument id:string title:string description:string document_url:string mime_type:string thumb_url:string thumb_width:int thumb_height:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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
- inputInlineQueryResultGame id:string game_short_name:string reply_markup:ReplyMarkup = InputInlineQueryResult;
- //@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
- inputInlineQueryResultLocation id:string location:location title:string thumb_url:string thumb_width:int thumb_height:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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
- inputInlineQueryResultPhoto id:string title:string description:string thumb_url:string photo_url:string photo_width:int photo_height:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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
- inputInlineQueryResultSticker id:string thumb_url:string sticker_url:string sticker_width:int sticker_height:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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
- inputInlineQueryResultVenue id:string venue:venue thumb_url:string thumb_width:int thumb_height:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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
- inputInlineQueryResultVideo id:string title:string description:string thumb_url:string video_url:string mime_type:string video_width:int video_height:int video_duration:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@description Represents link to a opus encoded audio file in ogg contatiner @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
- inputInlineQueryResultVoice id:string title:string voice_url:string voice_duration:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = InputInlineQueryResult;
- //@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
- //@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
- inlineQueryResultArticle id:string url:string hide_url:Bool title:string description:string thumb_url:string thumb_width:int thumb_height:int = InlineQueryResult;
- //@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
- inlineQueryResultContact id:string contact:contact thumb_url:string thumb_width:int thumb_height:int = InlineQueryResult;
- //@description Represents a point on the map @id Unique identifier of this result @location The 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
- inlineQueryResultLocation id:string location:location title:string thumb_url:string thumb_width:int thumb_height:int = InlineQueryResult;
- //@description Represents information about a venue @id Unique identifier of this result @venue The result @thumb_url Url of the result thumb, if exists @thumb_width Thumb width, if known @thumb_height Thumb height, if known
- inlineQueryResultVenue id:string venue:venue thumb_url:string thumb_width:int thumb_height:int = InlineQueryResult;
- //@description Represents information about a game @id Unique identifier of this result @game The result
- inlineQueryResultGame id:string game:game = InlineQueryResult;
- //@description Represents an animation cached on the telegram server @id Unique identifier of this result @animation The animation @title Animation title
- inlineQueryResultAnimation id:string animation:animation title:string = InlineQueryResult;
- //@description Represents an audio cached on the telegram server @id Unique identifier of this result @audio The audio
- inlineQueryResultAudio id:string audio:audio = InlineQueryResult;
- //@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
- inlineQueryResultDocument id:string document:document title:string description:string = InlineQueryResult;
- //@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
- inlineQueryResultPhoto id:string photo:photo title:string description:string = InlineQueryResult;
- //@description Represents a sticker cached on the telegram server @id Unique identifier of this result @sticker The sticker
- inlineQueryResultSticker id:string sticker:sticker = InlineQueryResult;
- //@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
- inlineQueryResultVideo id:string video:video title:string description:string = InlineQueryResult;
- //@description Represents a voice cached on the telegram server @id Unique identifier of this result @voice The voice @title Title of the voice file
- inlineQueryResultVoice id:string voice:voice title:string = InlineQueryResult;
- //@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
- inlineQueryResults inline_query_id:long next_offset:string results:vector<InlineQueryResult> switch_pm_text:string switch_pm_parameter:string = InlineQueryResults;
- //@class CallbackQueryPayload @description Represents payload of a callback query
- //@description Payload from a general callback button @data Data that was attached to the callback button as specified by the users client
- callbackQueryData data:bytes = CallbackQueryPayload;
- //@description Payload from a game callback button @game_short_name Short name of the game that was attached to the callback button
- callbackQueryGame game_short_name:string = CallbackQueryPayload;
- //@description Contains answer of the bot to 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 open
- callbackQueryAnswer text:string show_alert:Bool url:string = CallbackQueryAnswer;
- //@description Contains one row of the game high scores table @position Position in the high score table @user_id User identifier @score User score
- gameHighScore position:int user_id:int score:int = GameHighScore;
- //@description Contains list of game high scores @scores List of game high scores
- gameHighScores scores:vector<gameHighScore> = GameHighScores;
- //@class OptionValue @description Represents value of an option
- //@description Boolean option @value Value of an option
- optionBoolean value:Bool = OptionValue;
- //@description Unknown option or option having default value
- optionEmpty = OptionValue;
- //@description Integer option @value Value of an option
- optionInteger value:int = OptionValue;
- //@description String option @value Value of an option
- optionString value:string = OptionValue;
- //@class Update @description Contains notifications about data changes
- //@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
- updateNewMessage message:message disable_notification:Bool = Update;
- //@description Message is successfully sent @message Information about sent message. Usually only message identifier, date and content are changed, but some other fields may also change @old_message_id Previous temporary message identifier
- updateMessageSendSucceeded message:message old_message_id:int = Update;
- //@description Message fails to send. Be aware that some being sent messages can be irrecoverably deleted and updateDeleteMessages will come instead of this update (or doesn't come at all if deletion was done by call to deleteMessages) @chat_id Chat identifier @message_id Message identifier @error_code Error code @error_message Error message
- updateMessageSendFailed chat_id:long message_id:int error_code:int error_message:string = Update;
- //@description Sent message gets new content @chat_id Chat identifier @message_id Message identifier @new_content New message content
- updateMessageContent chat_id:long message_id:int new_content:MessageContent = Update;
- //@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
- updateMessageEdited chat_id:long message_id:int edit_date:int reply_markup:ReplyMarkup = Update;
- //@description View count of the message has changed @chat_id Chat identifier @message_id Message identifier @views New value of view count
- updateMessageViews chat_id:long message_id:int views:int = Update;
- //@description Some date about chat has been changed @chat New data about the chat
- updateChat chat:chat = Update;
- //@description Top message of the chat has changed @chat_id Chat identifier @top_message New top message of the chat, nullable
- updateChatTopMessage chat_id:long top_message:message = Update;
- //@description Order of the chat in the chat list has changed @chat_id Chat identifier @order New value of the order
- updateChatOrder chat_id:long order:long = Update;
- //@description Title of chat was changed @chat_id Chat identifier @title New chat title
- updateChatTitle chat_id:long title:string = Update;
- //@description Chat photo was changed @chat_id Chat identifier @photo New chat photo, nullable
- updateChatPhoto chat_id:long photo:chatPhoto = Update;
- //@description User reads incoming messages from some other device @chat_id Chat identifier @last_read_inbox_message_id Identifier of last read incoming message
- //@unread_count Number of unread messages left in chat
- updateChatReadInbox chat_id:long last_read_inbox_message_id:int unread_count:int = Update;
- //@description Some outcoming messages was read @chat_id Chat identifier @last_read_outbox_message_id Identifier of last read outgoing message
- updateChatReadOutbox chat_id:long last_read_outbox_message_id:int = Update;
- //@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
- updateChatReplyMarkup chat_id:long reply_markup_message_id:int = Update;
- //@description Chat draft has changed @chat_id Chat identifier @draft_message New chat draft_message, nullable
- updateChatDraftMessage chat_id:long draft_message:draftMessage = Update;
- //@description Notification settings for some chats was updated @scope Kinds of chats for which notification settings was updated
- //@notification_settings New notification settings
- updateNotificationSettings scope:NotificationSettingsScope notification_settings:notificationSettings = Update;
- //@description Some messages was deleted @chat_id Chat identifier @message_ids Identifiers of deleted message
- updateDeleteMessages chat_id:long message_ids:vector<int> = Update;
- //@description Some chat activity @chat_id Chat identifier @user_id Identifier of user doing action @action Action description
- updateUserAction chat_id:long user_id:int action:SendMessageAction = Update;
- //@description User went online/offline @user_id User identifier @status New user status
- updateUserStatus user_id:int status:UserStatus = Update;
- //@description Some data about an user has been changed @user New data about the user
- updateUser user:user = Update;
- //@description Some data about a group has been changed @group New data about the group
- updateGroup group:group = Update;
- //@description Some data about a channel has been changed @channel New data about the channel
- updateChannel channel:channel = Update;
- //@description Some data about a secret chat has been changed @secret_chat New data about the secret chat
- updateSecretChat secret_chat:secretChat = Update;
- //@description Some data from channelFull has been changed @channel_full New full information about the channel
- updateChannelFull channel_full:channelFull = Update;
- //@description User blocked/unblocked @user_id User identifier @is_blocked Is user blacklisted by current user
- updateUserBlocked user_id:int is_blocked:Bool = Update;
- //@description User has logged in from another device @date Date of logging in @device Device used to log in @location Location from where user logged in
- updateNewAuthorization date:int device:string location:string = Update;
- //@description File is partly downloaded/uploaded @file_id File identifier @size Total file size (0 means unknown) @ready Bytes downloaded/uploaded. Negative number means that download/upload has failed and was terminated
- updateFileProgress file_id:int size:int ready:int = Update;
- //@description File is downloaded/uploaded @file Synced file
- updateFile file:file = Update;
- //@description Some option changed its value @name Option name @value New option value
- updateOption name:string value:OptionValue = Update;
- //@description Some stickers was updated. Need to drop stickers cache if have some
- updateStickers = Update;
- //@description List of saved animations was updated. Need to drop saved animations cache if have some
- updateSavedAnimations = Update;
- //@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
- updateNewInlineQuery id:long sender_user_id:int user_location:location query:string offset:string = Update;
- //@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
- updateNewChosenInlineResult sender_user_id:int user_location:location query:string result_id:string inline_message_id:string = Update;
- //@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
- updateNewCallbackQuery id:long sender_user_id:int chat_id:long message_id:int chat_instance:long payload:CallbackQueryPayload = Update;
- //@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
- updateNewInlineCallbackQuery id:long sender_user_id:int inline_message_id:string chat_instance:long payload:CallbackQueryPayload = Update;
- test.empty = test.Empty;
- test.int value:int = test.Int;
- test.string value:string = test.String;
- test.bytes value:bytes = test.Bytes;
- test.vectorInt value:vector<int> = test.VectorInt;
- test.vectorIntObject value:vector<test.Int> = test.VectorIntObject;
- test.vectorString value:vector<string> = test.VectorString;
- test.vectorStringObject value:vector<test.String> = test.VectorStringObject;
- ---functions---
- //@description Returns current authorization state, offline request
- getAuthState = AuthState;
- //@description Sets user's phone number and sends authentication code to the user. Works only when authGetState 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
- setAuthPhoneNumber phone_number:string allow_flash_call:Bool is_current_phone_number:Bool = AuthState;
- //@description Resends authentication code to the user. Works only when authGetState returns authStateWaitCode and next_code_type of result is not null. Returns authStateWaitCode on success
- resendAuthCode = AuthState;
- //@description Checks authentication code. Works only when authGetState returns authStateWaitCode. Returns authStateWaitPassword or authStateOk on success @code Verification code from SMS, Telegram message, voice call or flash call
- //@first_name Non-empty user first name, if user is yet not registered @last_name User last name, if user is yet not registered
- checkAuthCode code:string first_name:string last_name:string = AuthState;
- //@description Checks password for correctness. Works only when authGetState returns authStateWaitPassword. Returns authStateOk on success @password Password to check
- checkAuthPassword password:string = AuthState;
- //@description Requests to send recover code to email. Works only when authGetState returns authStateWaitPassword. Returns authStateWaitPassword on success
- requestAuthPasswordRecovery = AuthState;
- //@description Recovers password with recover code sent to email. Works only when authGetState returns authStateWaitPassword. Returns authStateOk on success @recover_code Recover code to check
- recoverAuthPassword recover_code:string = AuthState;
- //@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
- resetAuth force:Bool = AuthState;
- //@description Check bot's authentication token to log in as a bot. Works only when authGetState returns authStateWaitPhoneNumber. Can be used instead of setAuthPhoneNumber and checkAuthCode to log in. Returns authStateOk on success @token Bot token
- checkAuthBotToken token:string = AuthState;
- //@description Returns current logged in user
- getMe = User;
- //@description Returns information about an user by its identifier, offline request if current user is not a bot @user_id User identifier
- getUser user_id:int = User;
- //@description Returns full information about an user by its identifier @user_id User identifier
- getUserFull user_id:int = UserFull;
- //@description Returns information about a group by its identifier, offline request if current user is not a bot @group_id Group identifier
- getGroup group_id:int = Group;
- //@description Returns full information about a group by its identifier @group_id Group identifier
- getGroupFull group_id:int = GroupFull;
- //@description Returns information about a channel by its identifier, offline request if current user is not a bot @channel_id Channel identifier
- getChannel channel_id:int = Channel;
- //@description Returns full information about a channel by its identifier, cached for at most 1 minute @channel_id Channel identifier
- getChannelFull channel_id:int = ChannelFull;
- //@description Returns information about a chat by its identifier, offline request if current user is not a bot @chat_id Chat identifier
- getChat chat_id:long = Chat;
- //@description Returns information about a message @chat_id Identifier of the chat, message belongs to @message_id Identifier of the message to get
- getMessage chat_id:long message_id:int = Message;
- //@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
- getMessages chat_id:long message_ids:vector<int> = Messages;
- //@description Returns information about a file, offline request @file_id Identifier of the file to get
- getFile file_id:int = File;
- //@description Returns information about a file by its persistent id, offline request @persistent_file_id Persistent identifier of the file to get
- getFilePersistent persistent_file_id:string = File;
- //@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
- getChats offset_order:long offset_chat_id:long limit:int = Chats;
- //@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
- searchChats query:string limit:int = Chats;
- //@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
- addRecentlyFoundChat chat_id:long = Ok;
- //@description Clears list of recently found chats
- deleteRecentlyFoundChats = Ok;
- //@description Returns messages in a chat. Automatically calls openChat. Returns result in reverse chronological order, i.e. in order of decreasing message.message_id @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
- getChatHistory chat_id:long from_message_id:int offset:int limit:int = Messages;
- //@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
- deleteChatHistory chat_id:long remove_from_chat_list:Bool = Ok;
- //@description Searches for messages with given words in the chat. Returns result in reverse chronological order, i. e. in order of decreasimg message_id. Doesn't work in secret chats @chat_id Chat identifier to search in
- //@query Query to search for @from_message_id Identifier of the message from which we need a history, you can use 0 to get results from beginning @limit Maximum number of messages to be returned, can't be greater than 100
- //@filter Filter for content of searched messages
- searchChatMessages chat_id:long query:string from_message_id:int limit:int filter:SearchMessagesFilter = Messages;
- //@description Searches for messages in all chats except secret. Returns result in reverse chronological order, i. e. in order of decreasing (date, chat_id, message_id) @query Query to search for
- //@offset_date Date of the message to search from, you can use 0 or any date in the future to get results from the beginning
- //@offset_chat_id Chat identifier of the last found message or 0 for the first request
- //@offset_message_id Message identifier of the last found message or 0 for the first request
- //@limit Maximum number of messages to be returned, can't be greater than 100
- searchMessages query:string offset_date:int offset_chat_id:long offset_message_id:int limit:int = Messages;
- //@description Sends a message. Returns sent message. UpdateChatTopMessage will not be sent, so returned message should be used to update chat top 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 in up to date clients, bots only @from_background Pass true, if the message is sent from background
- //@reply_markup Markup for replying to message, available only for bots @input_message_content Content of a message to send
- sendMessage chat_id:long reply_to_message_id:int disable_notification:Bool from_background:Bool reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message;
- //@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. Returns sent message. UpdateChatTopMessage will not be sent, so returned message should be used to update chat top 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)
- sendBotStartMessage bot_user_id:int chat_id:long parameter:string = Message;
- //@description Sends result of the inline query as a message. Returns sent message. UpdateChatTopMessage will not be sent, so returned message should be used to update chat top 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 in up to date clients, bots only @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
- sendInlineQueryResultMessage chat_id:long reply_to_message_id:int disable_notification:Bool from_background:Bool query_id:long result_id:string = Message;
- //@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. UpdateChatTopMessage will not be sent, so returned messages should be used to update chat top 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 in up to date clients, bots only @from_background Pass true, if the message is sent from background
- forwardMessages chat_id:long from_chat_id:long message_ids:vector<int> disable_notification:Bool from_background:Bool = Messages;
- //@description Deletes messages. UpdateDeleteMessages will not be sent for messages deleted through that function @chat_id Chat identifier @message_ids Identifiers of messages to delete
- deleteMessages chat_id:long message_ids:vector<int> = Ok;
- //@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 New message reply markup, only for bots @input_message_content New text content of the message. Should be of type InputMessageText
- editMessageText chat_id:long message_id:int reply_markup:ReplyMarkup input_message_content:InputMessageContent = Message;
- //@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 New message reply markup, only for bots @caption New message content caption
- editMessageCaption chat_id:long message_id:int reply_markup:ReplyMarkup caption:string = Message;
- //@description Bots only. Edits message reply markup. Returns edited message after edit is complete server side
- //@chat_id Chat the message belongs to @message_id Identifier of the message @reply_markup New message reply markup
- editMessageReplyMarkup chat_id:long message_id:int reply_markup:ReplyMarkup = Message;
- //@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
- editInlineMessageText inline_message_id:string reply_markup:ReplyMarkup input_message_content:InputMessageContent = Ok;
- //@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
- editInlineMessageCaption inline_message_id:string reply_markup:ReplyMarkup caption:string = Ok;
- //@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
- editInlineMessageReplyMarkup inline_message_id:string reply_markup:ReplyMarkup = Ok;
- //@description Sends inline query to a bot and returns its results. 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
- getInlineQueryResults bot_user_id:int chat_id:long user_location:location query:string offset:string = InlineQueryResults;
- //@description Sets result of the inline query. Bots only @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, defaults to 300 @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
- answerInlineQuery inline_query_id:long is_personal:Bool results:vector<InputInlineQueryResult> cache_time:int next_offset:string switch_pm_text:string switch_pm_parameter:string = Ok;
- //@description Sends callback query to a bot and returns answer to it. 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
- getCallbackQueryAnswer chat_id:long message_id:int payload:CallbackQueryPayload = CallbackQueryAnswer;
- //@description Sets result of the callback query. Bots only @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
- answerCallbackQuery callback_query_id:long text:string show_alert:Bool url:string = Ok;
- //@description Updates game score of the specified user in the game. Bots only @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
- setGameScore chat_id:long message_id:int edit_message:Bool user_id:int score:int = Message;
- //@description Updates game score of the specified user in the game. Bots only @inline_message_id Inline message identifier @edit_message True, if message should be edited @user_id User identifier @score New score
- setInlineGameScore inline_message_id:string edit_message:Bool user_id:int score:int = Ok;
- //@description Returns game high scores and some part of the score table around of the specified user in the game. Bots only @chat_id Chat a message with the game belongs to @message_id Identifier of the message @user_id User identifie
- getGameHighScores chat_id:long message_id:int user_id:int = GameHighScores;
- //@description Returns game high scores and some part of the score table around of the specified user in the game. Bots only @inline_message_id Inline message identifier @user_id User identifier
- getInlineGameHighScores inline_message_id:string user_id:int = GameHighScores;
- //@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
- //@message_id Message identifier of used keyboard
- deleteChatReplyMarkup chat_id:long message_id:int = Ok;
- //@description Sends notification about user activity in a chat @chat_id Chat identifier @action Action description
- sendChatAction chat_id:long action:SendMessageAction = Ok;
- //@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
- openChat chat_id:long = Ok;
- //@description Chat is closed by the user. Many useful activities depends on chat being opened or closed. @chat_id Chat identifier
- closeChat chat_id:long = Ok;
- //@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
- viewMessages chat_id:long message_ids:vector<int> = Ok;
- //@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 @chat_id Chat identifier of the message @message_id Identifier of the message with opened content
- openMessageContent chat_id:long message_id:int = Ok;
- //@description Returns existing chat corresponding to the given user @user_id User identifier
- createPrivateChat user_id:int = Chat;
- //@description Returns existing chat corresponding to the known group @group_id Group identifier
- createGroupChat group_id:int = Chat;
- //@description Returns existing chat corresponding to the known channel @channel_id Channel identifier
- createChannelChat channel_id:int = Chat;
- //@description Returns existing chat corresponding to the known secret chat @secret_chat_id SecretChat identifier
- createSecretChat secret_chat_id:int = Chat;
- //@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
- createNewGroupChat user_ids:vector<int> title:string = Chat;
- //@description Creates new channel chat and send corresponding messageChannelChatCreate, returns created chat @title Title of new channel chat @is_supergroup True, if supergroup chat should be created @about Information about the channel
- createNewChannelChat title:string is_supergroup:Bool about:string = Chat;
- //@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. Available only if member limit for group was reached. Deactivates group @chat_id Group chat identifier
- migrateGroupChatToChannelChat chat_id:long = Chat;
- //@description Changes chat title. Title can't be changed for private chats. Title will not change until change will be synchronized with the server. Title will not be changed if application is killed before it can send request to the server.
- //- There will be update about change of the title on success. Otherwise error will be returned
- //@chat_id Chat identifier @title New title of a chat
- changeChatTitle chat_id:long title:string = Ok;
- //@description Changes chat photo. Photo can't be changed for private chats. Photo will not change until change will be synchronized with the server. Photo will not be changed if application is killed before it can send request to the server.
- //- There will be update about change of the photo on success. Otherwise error will be returned @chat_id Chat identifier @photo New chat photo. You can use zero InputFileId to delete photo. Files accessible only by HTTP URL are not acceptable
- changeChatPhoto chat_id:long photo:InputFile = Ok;
- //@description Changes chat draft message @chat_id Chat identifier @draft_message New draft message, nullable
- changeChatDraftMessage chat_id:long draft_message:draftMessage = Ok;
- //@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. Member will not be added if application is killed before it can send request to 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
- addChatMember chat_id:long user_id:int forward_limit:int = Ok;
- //@description Adds many new members to the chat. Currently, available only for channels. Can't be used to join the channel. Member will not be added until chat state will be synchronized with the server. Member will not be added if application is killed before it can send request to the server
- //@chat_id Chat identifier @user_ids Identifiers of the users to add
- addChatMembers chat_id:long user_ids:vector<int> = Ok;
- //@description Changes status of the chat member, need appropriate privileges. In channel chats, user will be added to chat members if he is yet not a member and there is less than 200 members in the channel.
- //- Status will not be changed until chat state will be synchronized with the server. Status will not be changed if application is killed before it can send request to the server
- //@chat_id Chat identifier @user_id Identifier of the user to edit status, bots can be editors in the channel chats @status New status of the member in the chat
- changeChatMemberStatus chat_id:long user_id:int status:ChatMemberStatus = Ok;
- //@description Returns information about one participant of the chat @chat_id Chat identifier @user_id User identifier
- getChatMember chat_id:long user_id:int = ChatMember;
- //@description Asynchronously downloads file from cloud. Updates updateFileProgress will notify about download progress. Update updateFile will notify about successful download @file_id Identifier of file to download
- downloadFile file_id:int = Ok;
- //@description Stops file downloading. If file already downloaded do nothing. @file_id Identifier of file to cancel download
- cancelDownloadFile file_id:int = Ok;
- //@description Generates new chat invite link, previously generated link is revoked. Available for group and channel chats. Only creator of the chat can export chat invite link @chat_id Chat identifier
- exportChatInviteLink chat_id:long = ChatInviteLink;
- //@description Checks chat invite link for validness and returns information about the corresponding chat @invite_link Invite link to check. Should begin with "https://telegram.me/joinchat/"
- checkChatInviteLink invite_link:string = ChatInviteLinkInfo;
- //@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. Member will not be added if application is killed before it can send request to the server
- //@invite_link Invite link to import. Should begin with "https://telegram.me/joinchat/"
- importChatInviteLink invite_link:string = Ok;
- //@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 Adds new contacts/edits existing contacts, contacts user identifiers are ignored. Returns list of corresponding users in the same order as input contacts. If contact doesn't registered in Telegram, user with id == 0 will be returned @contacts List of contacts to import/edit
- importContacts contacts:vector<contact> = Users;
- //@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
- deleteContacts user_ids:vector<int> = Ok;
- //@description Returns profile photos of the user. Result of this query can't be invalidated, so it must be used with care @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
- getUserProfilePhotos user_id:int offset:int limit:int = UserProfilePhotos;
- //@description Returns stickers corresponding to given emoji @emoji String representation of emoji. If empty, returns all known stickers
- getStickers emoji:string = Stickers;
- //@description Returns list of installed sticker sets @only_enabled If true, returns only enabled sticker sets
- getStickerSets only_enabled:Bool = StickerSets;
- //@description Returns information about sticker set by its identifier @set_id Identifier of the sticker set
- getStickerSet set_id:long = StickerSet;
- //@description Searches sticker set by its short name @name Name of the sticker set
- searchStickerSet name:string = StickerSet;
- //@description Installs/uninstalls or enables/archives sticker set. Official sticker set can't be uninstalled, but it can be archived @set_id Identifier of the sticker set @is_installed New value of is_installed @is_enabled New value of is_enabled
- updateStickerSet set_id:long is_installed:Bool is_enabled:Bool = Ok;
- //@description Returns saved animations
- getSavedAnimations = Animations;
- //@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 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
- addSavedAnimation animation:InputFile = Ok;
- //@description Removes animation from the list of saved animations @animation Animation file to delete
- deleteSavedAnimation animation:InputFile = Ok;
- //@description Returns up to 20 recently used inline bots in the order of the last usage
- getRecentInlineBots = Users;
- //@description Get web page preview by text of the message. Do not call this function to often @message_text Message text
- getWebPagePreview message_text:string = WebPage;
- //@description Returns notification settings for given scope @scope Scope to return information about notification settings
- getNotificationSettings scope:NotificationSettingsScope = NotificationSettings;
- //@description Changes notification settings for given scope @scope Scope to change notification settings
- //@notification_settings New notification settings for given scope
- setNotificationSettings scope:NotificationSettingsScope notification_settings:notificationSettings = Ok;
- //@description Uploads new profile photo for logged in user. Photo will not change until change will be synchronized with the server. Photo will not be changed if application is killed before it can send request to the server. If something changes, updateUser will be sent @photo_path Path to new profile photo
- setProfilePhoto photo_path:string = Ok;
- //@description Deletes profile photo. If something changes, updateUser will be sent @profile_photo_id Identifier of profile photo to delete
- deleteProfilePhoto profile_photo_id:long = Ok;
- //@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, must not be empty @last_name New value of user last name
- changeName first_name:string last_name:string = Ok;
- //@description Changes about information of logged in user @about New value of userFull.about
- changeAbout about:string = Ok;
- //@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
- changePhoneNumber phone_number:string allow_flash_call:Bool is_current_phone_number:Bool = AuthState;
- //@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
- resendChangePhoneNumberCode = AuthState;
- //@description Checks authentication code sent to change user's phone number. Returns authStateOk on success @code Verification code from SMS, voice call or flash call
- checkChangePhoneNumberCode code:string = AuthState;
- //@description Gives or revokes all members of the group editor rights. Needs creator privileges in the group @group_id Identifier of the group @anyone_can_edit New value of anyone_can_edit
- toggleGroupEditors group_id:int anyone_can_edit:Bool = Ok;
- //@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
- changeChannelUsername channel_id:int username:string = Ok;
- //@description Gives or revokes right to invite new members to all current members of the channel. Needs creator privileges in the channel. Available only for supergroups @channel_id Identifier of the channel @anyone_can_invite New value of anyone_can_invite
- toggleChannelInvites channel_id:int anyone_can_invite:Bool = Ok;
- //@description Enables or disables sender signature on sent messages in the channel. Needs creator privileges in the channel. Not available for supergroups @channel_id Identifier of the channel @sign_messages New value of sign_messages
- toggleChannelSignMessages channel_id:int sign_messages:Bool = Ok;
- //@description Changes information about the channel. Needs creator privileges in the broadcast channel or editor privileges in the supergroup channel @channel_id Identifier of the channel @about New value of about
- changeChannelAbout channel_id:int about:string = Ok;
- //@description Pins a message in a supergroup channel chat. Needs editor privileges 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
- pinChannelMessage channel_id:int message_id:int disable_notification:Bool = Ok;
- //@description Removes pinned message in the supergroup channel. Needs editor privileges in the channel @channel_id Identifier of the channel
- unpinChannelMessage channel_id:int = Ok;
- //@description Returns information about channel members or kicked from channel users. Can be used only if channel_full->can_get_members == true @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
- getChannelMembers channel_id:int filter:ChannelMembersFilter offset:int limit:int = ChatMembers;
- //@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
- deleteChannel channel_id:int = Ok;
- //@description Returns value of an option by its name. See list of available options on https://core.telegram.org/tdlib/options
- //@name Name of the option
- getOption name:string = OptionValue;
- //@description Sets value of an option. See list of available options on https://core.telegram.org/tdlib/options. Only writable options can be set
- //@name Name of the option @value New value of the option
- setOption name:string value:OptionValue = Ok;
- //@description Returns Ok after specified amount of the time passed @seconds Number of seconds before that function returns
- setAlarm seconds:double = Ok;
- //@description Deletes account, 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;
- test.callEmpty = test.Empty;
- test.squareInt x:int = test.Int;
- test.callString x:string = test.String;
- test.callBytes x:bytes = test.Bytes;
- test.callVectorInt x:%Vector<int> = test.VectorInt;
- test.callVectorIntObject x:%Vector<test.Int> = test.VectorIntObject;
- test.callVectorString x:%Vector<string> = test.VectorString;
- test.callVectorStringObject x:%Vector<test.String> = test.VectorStringObject;
- test.testNet = test.Empty;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement