Expand description
Telegram Bot API types
Re-exports§
pub use mime;
Structs§
- Adds a new sticker to a set created by the bot.
- Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
- Sends an answer to a callback query sent from an inline keyboard.
- Sends an answer to an inline query.
- Responds to a pre-checkout query.
- Replies to a shipping query.
- Sets a result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated
- Approves a chat join request.
- Represents an audio file to be treated as music by the Telegram clients.
- Bans a user in a chat.
- Bans a channel chat in a supergroup or a channel.
- Represents the date of birth of a user.
- Represents information about a bot returned in
GetBot
. - Represents a command of a bot.
- Represents a description of a bot.
- Represents a name of a bot.
- Represents a short description of a bot.
- Describes the connection of the bot with a business account.
- Represents the intro of the business.
- Provides information about address and location of the business.
- Provides information about messages deleted from a connected business account.
- Provides information about the opening hours of the business.
- Provides information about the time interval describing business opening hours.
- Represents an incoming callback query from a callback button in an inline keyboard.
- Represents a channel chat.
- Represents the rights of an administrator in a chat.
- Contains information about a chat boost.
- Represents a boost removed from a chat.
- The boost was obtained by the creation of a Telegram Premium giveaway.
- Represents a boost added to a chat or changed.
- Represents an invite link for a chat.
- Represents a join request sent to a chat.
- Represents a location to which a chat is connected.
- Represents a chat administrator.
- Represents a chat member that owns the chat and has all administrator privileges.
- Represents a kicked chat member.
- Represents a restricted user.
- Represents changes in a status of a chat member.
- ID of a chat.
- Represents actions that a non-administrator user is allowed to take in a chat.
- Represents a chat photo.
- Username of a chat in the format
@username
. - Represents a result of an inline query that was chosen by the user and sent to their chat partner.
- Closes a bot instance before moving it from one local server to another.
- Closes an open topic in a forum supergroup chat.
- Closes an opened ‘General’ topic in a forum supergroup chat.
- A simple command implementation.
- Represents a phone contact.
- Copies a message.
- Copies messages of any kind.
- Creates an additional invite link for a chat.
- Creates a topic in a forum supergroup chat.
- Creates a link for an invoice.
- Creates a new sticker set owned by a user.
- Declines a chat join request.
- Deletes a list of a bot commands of a given scope and user language.
- Deletes a chat photo.
- Deletes a group sticker set from a supergroup.
- Deletes a forum topic along with all its messages in a forum supergroup chat.
- Deletes a message.
- Deletes multiple messages simultaneously.
- Deletes a sticker from a set created by the bot.
- Deletes a sticker set that was created by the bot.
- Removes a webhook integration if you decide to switch back to
crate::types::GetUpdates
. - Represents a dice with a random value.
- Represents a general file (as opposed to photos, voice messages and audio files).
- Changes a non-primary invite link created by a bot.
- Changes name and icon of a topic in a forum supergroup chat.
- Changes the name of the ‘General’ topic in a forum supergroup chat.
- Changes a caption of a message.
- Changes a live location message.
- Changes animation, audio, document, photo, or video message.
- Changes the reply markup of a message.
- Changes a text or a game message.
- Represents a data required for decrypting and authenticating
EncryptedPassportElement
. - Represents an address.
- Represents a bank statement.
- Represents a driver license.
- Represents an E-Mail.
- Represents an identity card.
- Represents an internal passport.
- Represents a passport.
- Represents a passport registration.
- Represents personal details.
- Represents a phone number.
- Represents a rental agreement.
- Represents a temporary registration.
- Represents an utility bill.
- Generates a new invite link for a chat.
- Contains information about a message that is being replied to, which may come from another chat or forum topic.
- Represents a file ready to be downloaded.
- Represents a reply interface trigger.
- Represents a forum topic.
- Forwards a message.
- Forwards multiple messages.
- Represents a Game.
- Represents a row of the high scores table for a game.
- Returns a basic information about a bot.
- Returns the current list of bot commands.
- Returns the current default administrator rights of a bot.
- Returns the current description of a bot for a given user language.
- Returns the current name of a bot for a given user language.
- Returns the current short description of a bot for a given user language.
- Returns information about the connection of the bot with a business account.
- Returns up to date information about the chat.
- Returns a list of administrators in a chat.
- Returns a member of a chat.
- Returns a number of members in a chat.
- Returns the current value of the bot menu button in a private chat, or the default menu button.
- Returns information about custom emoji stickers by their identifiers.
- Returns a basic information about a file and prepares it for downloading.
- Returns custom emoji stickers, which can be used as a forum topic icon by any user.
- Returns data for high score tables.
- Returns a sticker set.
- Returns incoming updates using long polling.
- Returns the list of boosts added to a chat by a user.
- Returns a list of profile pictures for a user.
- Returns current webhook status.
- Represents a message about a scheduled giveaway.
- Represents a service message about the completion of a giveaway without public winners.
- Represents a message about the completion of a giveaway with public winners.
- Represents a group chat.
- Hides the ‘General’ topic in a forum supergroup chat.
- Describes a message that was deleted or is otherwise inaccessible to the bot.
- Represents a button of an inline keyboard.
- Represents an inline keyboard that appears right next to the message it belongs to.
- Represents an incoming inline query.
- Represents a link to an article or a web page.
- Represents a link to an mp3 audio file.
- Represents a link to an mp3 audio file stored on the Telegram servers.
- Represents a link to a file stored on the Telegram servers.
- Link to an animated GIF file stored on the Telegram servers.
- Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers.
- Represents a link to a photo stored on the Telegram servers.
- Represents a link to a sticker stored on the Telegram servers.
- Represents a link to a video file stored on the Telegram servers.
- Represents a link to a voice message stored on the Telegram servers.
- Represents a contact with a phone number.
- Represents a link to a file.
- Represents a game.
- Represents a link to an animated GIF file.
- Represents a location on a map.
- Represents a link to a video animation (H.264/MPEG-4 AVC video without sound).
- Represents a link to a photo.
- Represents a venue.
- Represents a link to a page containing an embedded video player or a video file.
- Represents a link to a voice recording in an OGG container encoded with OPUS.
- Represents a button to be shown above inline query results.
- Represents a file reader for uploading files.
- Represents a content of a media message to be sent.
- Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
- Represents an audio file to be treated as music to be sent.
- Represents a general file to be sent.
- Represents a photo to be sent.
- Represents a video to be sent.
- Represents a contact message to be sent as the result of an inline query.
- Represents an invoice message to be sent as the result of an inline query.
- Represents a location message to be sent as the result of an inline query.
- Represents a text message to be sent as the result of an inline query.
- Represents a venue message to be sent as the result of an inline query.
- Represents a metadata of a sticker to be added to a sticker set.
- Represents a collection of stickers to be added to a sticker set.
- Represents an invoice.
- Represents an invoice parameters used in
CreateInvoiceLink
andSendInvoice
. - Represents a button of the reply keyboard.
- Represents a type of a poll which is allowed to be created and sent when the corresponding button is pressed.
- Represents a criteria used to request a suitable chat.
- Represents a criteria used to request a suitable user.
- Represents a portion of the price for goods or services.
- Leaves a group, supergroup or channel.
- Represents the options used for link preview generation.
- Represents a point on a map.
- Logs out from the Cloud Bot API.
- Represents a parameter of the inline keyboard button used to automatically authorize a user.
- Represents a position on faces where a mask should be placed by default.
- Represents a group of input media to be sent.
- Represents a media group item.
- Represents a menu button, which launches a Web App.
- Represents a message.
- Represents an audio message data.
- Represents a service message about a change in auto-delete timer settings.
- Represents an information about the chat whose identifier was shared with the bot using a
crate::types::KeyboardButtonRequestChat
button. - Represents an document message data.
- Represents a service message about a new forum topic created in the chat.
- Represents a service message about an edited forum topic.
- Represents a list of available sizes of the photo.
- Represents a content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
- Contains information about the users whose identifiers were shared with the bot using a
crate::types::KeyboardButton::with_request_users
button. - Represents a video message data.
- Represents a service message about a video chat ended in the chat.
- A service message about new members invited to a video chat.
- A service message about a video chat scheduled in the chat.
- Message is a voice message, information about the file.
- Represents a service message about a user allowing a bot to write messages after adding it to the attachment menu, launching a Web App from a link, or accepting an explicit request from a Web App sent by the method
requestWriteAccess
. - Represents an unique message identifier.
- The message was originally sent to a channel chat.
- The message was originally sent on behalf of a chat to a group chat.
- The message was originally sent by an unknown user.
- The message was originally sent by a known user.
- Represents reaction changes on a message with anonymous reactions.
- Represents a change of a reaction on a message performed by a user.
- Represents an order.
- Represents a telegram Passport data shared with a bot by a user.
- Represents an error in the Telegram Passport element which was submitted that should be resolved by a user.
- Represents a file uploaded to Telegram Passport.
- Represents a size of a photo or a file / sticker thumbnail.
- Adds a message to a list of pinned messages in a chat.
- Represents an answer of a user in a non-anonymous poll.
- Represents an answer option in a poll.
- Represents an incoming pre-checkout query.
- Represents a private chat.
- Represents a profile accent color.
- Promotes or demotes a user in a chat.
- Represents a quiz.
- Represents a reaction added to a message along with the number of times it was added.
- Represents a regular poll.
- Reopens a closed topic in a forum supergroup chat.
- Reopens a closed ‘General’ topic in a forum supergroup chat.
- Replaces an existing sticker in a sticker set with a new one.
- Represents a custom keyboard with reply options.
- Represents a trigger to remove the custom keyboard.
- Describes reply parameters for the message that is being sent.
- Quoted part of the message to be replied to.
- Represents a response error.
- Restricts a user in a supergroup.
- Revokes an invite link created by a bot.
- Sends an animation file (GIF or H.264/MPEG-4 AVC video without sound).
- Sends am audio file.
- Tells a user that something is happening on a bot side.
- Sends a phone contact.
- Sends a dice.
- Sends a general file.
- Sends a game.
- Sends an invoice.
- Sends a point on a map.
- Sends a group of photos or videos as an album.
- Sends a text message.
- Sends a photo.
- Sends a native poll.
- Sends a quiz.
- Sends a static WEBP, animated TGS, or video WEBM sticker.
- Sends information about a venue.
- Sends a video file.
- Sends a video message.
- Sends a voice message.
- Represents an inline message sent by a Web App on behalf of a user
- Changes a list of commands of a bot.
- Changes default administrator rights requested by a bot when it’s added as an administrator to groups or channels.
- Changes the description of a bot, which is shown in a chat with the bot if the chat is empty.
- Changes the name of a bot.
- Changes the short description of a bot, which is shown on the bot profile page and is sent together with the link when users share the bot.
- Sets a custom title for an administrator in a supergroup promoted by the bot.
- Changes a description of a chat.
- Changes a button of a menu of a bot in a private chat, or a default menu button.
- Sets default chat permissions for all members.
- Sets a new profile photo for a chat.
- Sets a new group sticker set for a supergroup.
- Changes a title of a chat.
- Sets the thumbnail of a custom emoji sticker set.
- Sets the score of the specified user in a game.
- Changes the chosen reactions on a message.
- Informs a user that some of the Telegram Passport elements they provided contains errors.
- Changes the list of emoji assigned to a regular or custom emoji sticker.
- Changes search keywords assigned to a regular or custom emoji sticker.
- Changes the mask position of a mask sticker.
- Moves a sticker in a set created by the bot to a specific position.
- Sets a thumbnail of a sticker set.
- Sets a title of a created sticker set.
- Specifies an url and returns incoming updates via an outgoing webhook.
- Contains information about a user that was shared with the bot using a
crate::types::KeyboardButtonRequestUsers
button. - Represents a shipping address.
- Represents a shipping option.
- Represents a shipping query.
- Represents a sticker.
- Represents a sticker set.
- Stops updating a live location message before
live_period
expires. - Stops a poll which was sent by the bot.
- Represents a story.
- Represents a successful payment.
- Represents a supergroup chat.
- Represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.
- Represents a text with entities.
- Represents a collection of text entities.
- Represents a bot command found in text.
- Represents a position of an entity in a text.
- Contains information about the quoted part of a message that is replied to by the given message.
- Unbans a previously kicked user in a supergroup or channel.
- Unbans a previously banned channel chat in a supergroup or channel.
- Represents an error with unexpected encrypted passport element type.
- Conversion of an
Update
intoT
failed. - Reveals the ‘General’ topic in a forum supergroup chat.
- Clears a list of pinned messages in a chat.
- Clears the list of pinned messages in a forum topic.
- Clears the list of pinned messages in a General forum topic.
- Removes a message from a list of pinned messages in a chat.
- Represents an incoming update.
- Uploads a file with a sticker for later use in the
CreateNewStickerSet
andAddStickerToSet
methods. - Represents a user.
- Represents a list of boosts added to a chat by a user.
- ID of a user.
- Represents a list of profile pictures of a user.
- Username of a user in the format
@username
. - Represents a venue.
- Represents a video file.
- Represents a video message.
- Represents a voice file.
- Represents a data sent from a Web App to the bot.
- Represents a Web App.
- Represents a current status of a webhook.
Enums§
- Represents an accent color.
- Represents an accent color error.
- Represents a type of update to receive.
- Represents an error that can occur when creating a new
BotCommand
. - Represents a scope to which bot commands are applied.
- Represents an error that can occur while parsing data from a callback query.
- Represents a chat.
- Represents a type of an action to tell a user that something is happening on a bot side.
- Describes the source of a chat boost.
- Represents an ID or username of a chat.
- Represents a member of a chat.
- Represents an error when parsing a command.
- Represents a type of a dice.
- Represents a result of
EditMessage*
requests. - Represents an information about documents or other Telegram Passport elements shared with a bot by a user.
- Represents a type of an encrypted passport element.
- Contains data of an external reply info.
- Represents a color of a forum topic icon.
- Represents a type of an inline keyboard button.
- Represents an error occurred with an inline keyboard.
- Represents a type of the chat, from which the inline query was sent.
- Represents a result of an inline query.
- Represents a file to upload.
- An error occurred with
InputMedia
. - Represents a metadata of the input media.
- Represents a content of a message to be sent as a result of an inline query.
- Represents an error when converting input stickers into a multipart form.
- Represents a part of the face relative to which the mask should be placed.
- Describes a message that can be inaccessible to the bot.
- Represents a media group error.
- Represents an error occurred when getting user mention.
- Represents a menu button of the bot in a private chat.
- Represents a message data.
- Describes the origin of a message.
- Represents a sender of a message.
- Represents a mode for parsing entities in a text.
- Represents a poll.
- Represents the chat or the user that changed answer to the poll.
- Represents a type of a poll.
- Represents a profile accent color error.
- Represents a reaction type.
- Represents a reply markup.
- Represents an error occurred with reply markup.
- Represents an error occurred with reply markup.
- Contains information about a message or a story that is being replied to.
- Represents an API Response.
- Represents an error when sending an animation.
- Represents an error when sending an audio.
- Represents an error when sending a document.
- Represents an error when sending a video.
- Represents an error when sending a video note.
- Represents a format of stickers in the set.
- Represents a type of stickers in the set.
- Represents an entity in a text.
- Represents an error when parsing/serializing entities.
- Represents a type of an update.
- Represents a user ID.
Type Aliases§
- Represents a Telegram Float type
- Represents a Telegram Integer type
- Stops a quiz which was sent by the bot.