Skip to main content

Module types

Module types 

Source
Expand description

Telegram Bot API types generated from the pinned upstream schema.

Structs§

AcceptedGiftTypes
This object describes the types of gifts that can be gifted to a user or a chat.
AffiliateInfo
Contains information about the affiliate that received a commission via this transaction.
Animation
This object represents an animation file (GIF or H.264/MPEG-4 AVC video without sound).
Audio
This object represents an audio file to be treated as music by the Telegram clients.
BackgroundFill
This object describes the way a background is filled based on the selected colors. Currently, it can be one of
BackgroundFillFreeformGradient
The background is a freeform gradient that rotates after every message in the chat.
BackgroundFillGradient
The background is a gradient fill.
BackgroundFillSolid
The background is filled using the selected color.
BackgroundType
This object describes the type of a background. Currently, it can be one of
BackgroundTypeChatTheme
The background is taken directly from a built-in chat theme.
BackgroundTypeFill
The background is automatically filled based on the selected colors.
BackgroundTypePattern
The background is a .PNG or .TGV (gzipped subset of SVG with MIME type ‘application/x-tgwallpattern’) pattern to be combined with the background fill chosen by the user.
BackgroundTypeWallpaper
The background is a wallpaper in the JPEG format.
Birthdate
Describes the birthdate of a user.
BotAccessSettings
This object describes the access settings of a bot.
BotCommand
This object represents a bot command.
BotCommandScope
This object represents the scope to which bot commands are applied. Currently, the following 7 scopes are supported:
BotCommandScopeAllChatAdministrators
Represents the scope of bot commands, covering all group and supergroup chat administrators.
BotCommandScopeAllGroupChats
Represents the scope of bot commands, covering all group and supergroup chats.
BotCommandScopeAllPrivateChats
Represents the scope of bot commands, covering all private chats.
BotCommandScopeChat
Represents the scope of bot commands, covering a specific chat.
BotCommandScopeChatAdministrators
Represents the scope of bot commands, covering all administrators of a specific group or supergroup chat.
BotCommandScopeChatMember
Represents the scope of bot commands, covering a specific member of a group or supergroup chat.
BotCommandScopeDefault
Represents the default scope of bot commands. Default commands are used if no commands with a narrower scope are specified for the user.
BotDescription
This object represents the bot’s description.
BotName
This object represents the bot’s name.
BotShortDescription
This object represents the bot’s short description.
BotSubscriptionUpdated
This object contains information about changes to a user payment subscription toward the current bot.
BusinessBotRights
Represents the rights of a business bot.
BusinessConnection
Describes the connection of the bot with a business account.
BusinessIntro
Contains information about the start page settings of a Telegram Business account.
BusinessLocation
Contains information about the location of a Telegram Business account.
BusinessMessagesDeleted
This object is received when messages are deleted from a connected business account.
BusinessOpeningHours
Describes the opening hours of a business.
BusinessOpeningHoursInterval
Describes an interval of time during which a business is open.
CallbackGame
A placeholder, currently holds no information. Use BotFather to set up your game.
CallbackQuery
This object represents an incoming callback query from a callback button in an inline keyboard. If the button that originated the query was attached to a message sent by the bot, the field message will be present. If the button was attached to a message sent via the bot (in inline mode), the field inline_message_id will be present. Exactly one of the fields data or game_short_name will be present.
Chat
This object represents a chat.
ChatAdministratorRights
Represents the rights of an administrator in a chat.
ChatBackground
This object represents a chat background.
ChatBoost
This object contains information about a chat boost.
ChatBoostAdded
This object represents a service message about a user boosting a chat.
ChatBoostRemoved
This object represents a boost removed from a chat.
ChatBoostSource
This object describes the source of a chat boost. It can be one of
ChatBoostSourceGiftCode
The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each such code boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.
ChatBoostSourceGiveaway
The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways.
ChatBoostSourcePremium
The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium subscription to another user.
ChatBoostUpdated
This object represents a boost added to a chat or changed.
ChatFullInfo
This object contains full information about a chat.
ChatInviteLink
Represents an invite link for a chat.
ChatJoinRequest
Represents a join request sent to a chat.
ChatLocation
Represents a location to which a chat is connected.
ChatMember
This object contains information about one member of a chat. Currently, the following 6 types of chat members are supported:
ChatMemberAdministrator
Represents a chat member that has some additional privileges.
ChatMemberBanned
Represents a chat member that was banned in the chat and can’t return to the chat or view chat messages.
ChatMemberLeft
Represents a chat member that isn’t currently a member of the chat, but may join it themselves.
ChatMemberMember
Represents a chat member that has no additional privileges or restrictions.
ChatMemberOwner
Represents a chat member that owns the chat and has all administrator privileges.
ChatMemberRestricted
Represents a chat member that is under certain restrictions in the chat. Supergroups only.
ChatMemberUpdated
This object represents changes in the status of a chat member.
ChatOwnerChanged
Describes a service message about an ownership change in the chat.
ChatOwnerLeft
Describes a service message about the chat owner leaving the chat.
ChatPermissions
Describes actions that a non-administrator user is allowed to take in a chat.
ChatPhoto
This object represents a chat photo.
ChatShared
This object contains information about a chat that was shared with the bot using a KeyboardButtonRequestChat button.
Checklist
Describes a checklist.
ChecklistTask
Describes a task in a checklist.
ChecklistTasksAdded
Describes a service message about tasks added to a checklist.
ChecklistTasksDone
Describes a service message about checklist tasks marked as done or not done.
ChosenInlineResult
Represents a result of an inline query that was chosen by the user and sent to their chat partner.
Community
Represents a community (a group of chats).
CommunityChatAdded
Describes a service message about a chat being added to a community.
CommunityChatRemoved
Describes a service message about a chat being removed from a community. Currently holds no information.
Contact
This object represents a phone contact.
CopyTextButton
This object represents an inline keyboard button that copies specified text to the clipboard.
Dice
This object represents an animated emoji that displays a random value.
DirectMessagePriceChanged
Describes a service message about a change in the price of direct messages sent to a channel chat.
DirectMessagesTopic
Describes a topic of a direct messages chat.
Document
This object represents a general file (as opposed to photos, voice messages and audio files).
EncryptedCredentials
Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.
EncryptedPassportElement
Describes documents or other Telegram Passport elements shared with the bot by the user.
ExternalReplyInfo
This object contains information about a message that is being replied to, which may come from another chat or forum topic.
File
This object represents a file ready to be downloaded. The file can be downloaded via the link https://api.telegram.org/file/bot/<file_path>. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile.
ForceReply
Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot’s message and tapped ‘Reply’). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Not supported in channels and for messages sent on behalf of a user account.
ForumTopic
This object represents a forum topic.
ForumTopicClosed
This object represents a service message about a forum topic closed in the chat. Currently holds no information.
ForumTopicCreated
This object represents a service message about a new forum topic created in the chat.
ForumTopicEdited
This object represents a service message about an edited forum topic.
ForumTopicReopened
This object represents a service message about a forum topic reopened in the chat. Currently holds no information.
Game
This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.
GameHighScore
This object represents one row of the high scores table for a game.
GeneralForumTopicHidden
This object represents a service message about General forum topic hidden in the chat. Currently holds no information.
GeneralForumTopicUnhidden
This object represents a service message about General forum topic unhidden in the chat. Currently holds no information.
Gift
This object represents a gift that can be sent by the bot.
GiftBackground
This object describes the background of a gift.
GiftInfo
Describes a service message about a regular gift that was sent or received.
Gifts
This object represent a list of gifts.
Giveaway
This object represents a message about a scheduled giveaway.
GiveawayCompleted
This object represents a service message about the completion of a giveaway without public winners.
GiveawayCreated
This object represents a service message about the creation of a scheduled giveaway.
GiveawayWinners
This object represents a message about the completion of a giveaway with public winners.
InaccessibleMessage
This object describes a message that was deleted or is otherwise inaccessible to the bot.
InlineKeyboardButton
This object represents one button of an inline keyboard. Exactly one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button.
InlineKeyboardMarkup
This object represents an inline keyboard that appears right next to the message it belongs to.
InlineQuery
This object represents an incoming inline query. When the user sends an empty query, your bot could return some default or trending results.
InlineQueryResult
This object represents one result of an inline query. Telegram clients currently support results of the following 20 types:
InlineQueryResultArticle
Represents a link to an article or web page.
InlineQueryResultAudio
Represents a link to an MP3 audio file. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
InlineQueryResultCachedAudio
Represents a link to an MP3 audio file stored on the Telegram servers. By default, this audio file will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the audio.
InlineQueryResultCachedDocument
Represents a link to a file stored on the Telegram servers. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file.
InlineQueryResultCachedGif
Represents a link to an animated GIF file stored on the Telegram servers. By default, this animated GIF file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with specified content instead of the animation.
InlineQueryResultCachedMpeg4Gif
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound) stored on the Telegram servers. By default, this animated MPEG-4 file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
InlineQueryResultCachedPhoto
Represents a link to a photo stored on the Telegram servers. By default, this photo will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
InlineQueryResultCachedSticker
Represents a link to a sticker stored on the Telegram servers. By default, this sticker will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the sticker.
InlineQueryResultCachedVideo
Represents a link to a video file stored on the Telegram servers. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
InlineQueryResultCachedVoice
Represents a link to a voice message stored on the Telegram servers. By default, this voice message will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the voice message.
InlineQueryResultContact
Represents a contact with a phone number. By default, this contact will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the contact.
InlineQueryResultDocument
Represents a link to a file. By default, this file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the file. Currently, only .PDF and .ZIP files can be sent using this method.
InlineQueryResultGame
Represents a Game.
InlineQueryResultGif
Represents a link to an animated GIF file. By default, this animated GIF file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
InlineQueryResultLocation
Represents a location on a map. By default, the location will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the location.
InlineQueryResultMpeg4Gif
Represents a link to a video animation (H.264/MPEG-4 AVC video without sound). By default, this animated MPEG-4 file will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the animation.
InlineQueryResultPhoto
Represents a link to a photo. By default, this photo will be sent by the user with optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the photo.
InlineQueryResultVenue
Represents a venue. By default, the venue will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the venue.
InlineQueryResultVideo
Represents a link to a page containing an embedded video player or a video file. By default, this video file will be sent by the user with an optional caption. Alternatively, you can use input_message_content to send a message with the specified content instead of the video.
InlineQueryResultVoice
Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.
InlineQueryResultsButton
This object represents a button to be shown above inline query results. You must use exactly one of the optional fields.
InputChecklist
Describes a checklist to create.
InputChecklistTask
Describes a task to add to a checklist.
InputContactMessageContent
Represents the content of a contact message to be sent as the result of an inline query.
InputInvoiceMessageContent
Represents the content of an invoice message to be sent as the result of an inline query.
InputLocationMessageContent
Represents the content of a location message to be sent as the result of an inline query.
InputMedia
This object represents the content of a media message to be sent. It should be one of
InputMediaAnimation
Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.
InputMediaAudio
Represents an audio file to be treated as music to be sent.
InputMediaDocument
Represents a general file to be sent.
InputMediaLink
Represents an HTTP link to be sent.
InputMediaLivePhoto
Represents a live photo to be sent.
InputMediaLocation
Represents a location to be sent.
InputMediaPhoto
Represents a photo to be sent.
InputMediaSticker
Represents a sticker file to be sent.
InputMediaVenue
Represents a venue to be sent.
InputMediaVideo
Represents a video to be sent.
InputMediaVoiceNote
Represents a voice message file to be sent.
InputMessageContent
This object represents the content of a message to be sent as a result of an inline query. Telegram clients currently support the following types:
InputPaidMedia
This object describes the paid media to be sent. Currently, it can be one of
InputPaidMediaLivePhoto
The paid media to send is a live photo.
InputPaidMediaPhoto
The paid media to send is a photo.
InputPaidMediaVideo
The paid media to send is a video.
InputPollMedia
This object represents the content of a poll description or a quiz explanation to be sent. It should be one of
InputPollOption
This object contains information about one answer option in a poll to be sent.
InputPollOptionMedia
This object represents the content of a poll option to be sent. It should be one of
InputProfilePhoto
This object describes a profile photo to set. Currently, it can be one of
InputProfilePhotoAnimated
An animated profile photo in the MPEG4 format.
InputProfilePhotoStatic
A static profile photo in the .JPG format.
InputRichBlock
This object represents a block in a rich formatted message to be sent. Currently, it can be any of the following types:
InputRichBlockAnchor
A block with an anchor, corresponding to the HTML tag with the attribute name.
InputRichBlockAnimation
A block with an animation, corresponding to the HTML tag
InputRichBlockAudio
A block with a music file, corresponding to the HTML tag
InputRichBlockBlockQuotation
A block quotation, corresponding to the HTML tag
.
InputRichBlockCollage
A collage, corresponding to the custom HTML tag .
InputRichBlockDetails
An expandable block for details disclosure, corresponding to the HTML tag
.
InputRichBlockDivider
A divider, corresponding to the HTML tag
.
InputRichBlockFooter
A footer, corresponding to the HTML tag
.
InputRichBlockList
A list of blocks, corresponding to the HTML tag
    or
      with multiple nested tags
    1. .
InputRichBlockListItem
An item of a list to be sent.
InputRichBlockMap
A block with a map, corresponding to the custom HTML tag . The map’s width and height must not exceed 10000 in total. The width and height ratio must be at most 20.
InputRichBlockMathematicalExpression
A block with a mathematical expression in LaTeX format, corresponding to the custom HTML tag .
InputRichBlockParagraph
A text paragraph, corresponding to the HTML tag

.

InputRichBlockPhoto
A block with a photo, corresponding to the HTML tag .
InputRichBlockPreformatted
A preformatted text block, corresponding to the nested HTML tags
 and .
InputRichBlockPullQuotation
A quotation with centered text, loosely corresponding to the HTML tag
InputRichBlockSectionHeading
A section heading, corresponding to the HTML tags

,

,

,

,

, or
.
InputRichBlockSlideshow
A slideshow, corresponding to the custom HTML tag .
InputRichBlockTable
A table, corresponding to the HTML tag .
InputRichBlockThinking
A block with a ‘Thinking…’ placeholder, corresponding to the custom HTML tag . The block may be used only in sendRichMessageDraft, therefore it can’t be received in messages. See https://t.me/addemoji/AIActions for examples of custom emoji that are recommended for usage in the block.
InputRichBlockVideo
A block with a video, corresponding to the HTML tag
InputRichBlockVoiceNote
A block with a voice note, corresponding to the HTML tag
InputRichMessage
Describes a rich message to be sent. Exactly one of the fields html, markdown, or blocks must be used.
InputRichMessageContent
Represents the content of a rich message to be sent as the result of an inline query.
InputRichMessageMedia
Describes a media element embedded in an outgoing rich message.
InputSticker
This object describes a sticker to be added to a sticker set.
InputStoryContent
This object describes the content of a story to post. Currently, it can be one of
InputStoryContentPhoto
Describes a photo to post as a story.
InputStoryContentVideo
Describes a video to post as a story.
InputTextMessageContent
Represents the content of a text message to be sent as the result of an inline query.
InputVenueMessageContent
Represents the content of a venue message to be sent as the result of an inline query.
Invoice
This object contains basic information about an invoice.
KeyboardButton
This object represents one button of the reply keyboard. At most one of the fields other than text, icon_custom_emoji_id, and style must be used to specify the type of the button. For simple text buttons, String can be used instead of this object to specify the button text.
KeyboardButtonPollType
This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
KeyboardButtonRequestChat
This object defines the criteria used to request a suitable chat. Information about the selected chat will be shared with the bot when the corresponding button is pressed. The bot will be granted requested rights in the chat if appropriate..
KeyboardButtonRequestManagedBot
This object defines the parameters for the creation of a managed bot. Information about the created bot will be shared with the bot using the update managed_bot and a Message with the field managed_bot_created.
KeyboardButtonRequestUser
This object defines the criteria used to request a suitable user. The identifier of the selected user will be shared with the bot when the corresponding button is pressed.
KeyboardButtonRequestUsers
This object defines the criteria used to request suitable users. Information about the selected users will be shared with the bot when the corresponding button is pressed.
LabeledPrice
This object represents a portion of the price for goods or services.
Link
Represents an HTTP link.
LinkPreviewOptions
Describes the options used for link preview generation.
LivePhoto
This object represents a live photo.
Location
This object represents a point on the map.
LocationAddress
Describes the physical address of a location.
LoginUrl
This object represents a parameter of the inline keyboard button used to automatically authorize a user. Serves as a great replacement for the Telegram Login Widget when the user is coming from Telegram. All the user needs to do is tap/click a button and confirm that they want to log in:
ManagedBotCreated
This object contains information about the bot that was created to be managed by the current bot.
ManagedBotUpdated
This object contains information about the creation, token update, or owner update of a bot that is managed by the current bot.
MaskPosition
This object describes the position on faces where a mask should be placed by default.
MaybeInaccessibleMessage
This object describes a message that can be inaccessible to the bot. It can be one of
MenuButton
This object describes the bot’s menu button in a private chat. It should be one of
MenuButtonCommands
Represents a menu button, which opens the bot’s list of commands.
MenuButtonDefault
Describes that no specific value for the menu button was set.
MenuButtonWebApp
Represents a menu button, which launches a Web App.
Message
This object represents a message.
MessageAutoDeleteTimerChanged
This object represents a service message about a change in auto-delete timer settings.
MessageEntity
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
MessageId
This object represents a unique message identifier.
MessageOrigin
This object describes the origin of a message. It can be one of
MessageOriginChannel
The message was originally sent to a channel chat.
MessageOriginChat
The message was originally sent on behalf of a chat to a group chat.
MessageOriginHiddenUser
The message was originally sent by an unknown user.
MessageOriginUser
The message was originally sent by a known user.
MessageReactionCountUpdated
This object represents reaction changes on a message with anonymous reactions.
MessageReactionUpdated
This object represents a change of a reaction on a message performed by a user.
OrderInfo
This object represents information about an order.
OwnedGift
This object describes a gift received and owned by a user or a chat. Currently, it can be one of
OwnedGiftRegular
Describes a regular gift owned by a user or a chat.
OwnedGiftUnique
Describes a unique gift received and owned by a user or a chat.
OwnedGifts
Contains the list of gifts received and owned by a user or a chat.
PaidMedia
This object describes paid media. Currently, it can be one of
PaidMediaInfo
Describes the paid media added to a message.
PaidMediaLivePhoto
The paid media is a live photo.
PaidMediaPhoto
The paid media is a photo.
PaidMediaPreview
The paid media isn’t available before the payment.
PaidMediaPurchased
This object contains information about a paid media purchase.
PaidMediaVideo
The paid media is a video.
PaidMessagePriceChanged
Describes a service message about a change in the price of paid messages within a chat.
PassportData
Describes Telegram Passport data shared with the bot by the user.
PassportElementError
This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:
PassportElementErrorDataField
Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field’s value changes.
PassportElementErrorFile
Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
PassportElementErrorFiles
Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
PassportElementErrorFrontSide
Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.
PassportElementErrorReverseSide
Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
PassportElementErrorSelfie
Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
PassportElementErrorTranslationFile
Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
PassportElementErrorTranslationFiles
Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
PassportElementErrorUnspecified
Represents an issue in an unspecified place. The error is considered resolved when new data is added.
PassportFile
This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don’t exceed 10MB.
PhotoSize
This object represents one size of a photo or a file / sticker thumbnail.
Poll
This object contains information about a poll.
PollAnswer
This object represents an answer of a user in a non-anonymous poll.
PollMedia
At most one of the optional fields can be present in any given object.
PollOption
This object contains information about one answer option in a poll.
PollOptionAdded
Describes a service message about an option added to a poll.
PollOptionDeleted
Describes a service message about an option deleted from a poll.
PreCheckoutQuery
This object contains information about an incoming pre-checkout query.
PreparedInlineMessage
Describes an inline message to be sent by a user of a Mini App.
PreparedKeyboardButton
Describes a keyboard button to be used by a user of a Mini App.
ProximityAlertTriggered
This object represents the content of a service message, sent whenever a user in the chat triggers a proximity alert set by another user.
ReactionCount
Represents a reaction added to a message along with the number of times it was added.
ReactionType
This object describes the type of a reaction. Currently, it can be one of
ReactionTypeCustomEmoji
The reaction is based on a custom emoji.
ReactionTypeEmoji
The reaction is based on an emoji.
ReactionTypePaid
The reaction is paid.
RefundedPayment
This object contains basic information about a refunded payment.
ReplyKeyboardMarkup
This object represents a custom keyboard with reply options (see Introduction to bots for details and examples). Not supported in channels and for messages sent on behalf of a business account.
ReplyKeyboardRemove
Upon receiving a message with this object, Telegram clients will remove the current custom keyboard and display the default letter-keyboard. By default, custom keyboards are displayed until a new keyboard is sent by a bot. An exception is made for one-time keyboards that are hidden immediately after the user presses a button (see ReplyKeyboardMarkup). Not supported in channels and for messages sent on behalf of a business account.
ReplyParameters
Describes reply parameters for the message that is being sent.
ResponseParameters
Describes why a request was unsuccessful.
RevenueWithdrawalState
This object describes the state of a revenue withdrawal operation. Currently, it can be one of
RevenueWithdrawalStateFailed
The withdrawal failed and the transaction was refunded.
RevenueWithdrawalStatePending
The withdrawal is in progress.
RevenueWithdrawalStateSucceeded
The withdrawal succeeded.
RichBlock
This object represents a block in a rich formatted message. Currently, it can be any of the following types:
RichBlockAnchor
A block with an anchor, corresponding to the HTML tag with the attribute name.
RichBlockAnimation
A block with an animation, corresponding to the HTML tag
RichBlockAudio
A block with a music file, corresponding to the HTML tag
RichBlockBlockQuotation
A block quotation, corresponding to the HTML tag
.
RichBlockCaption
Caption of a rich formatted block.
RichBlockCollage
A collage, corresponding to the custom HTML tag .
RichBlockDetails
An expandable block for details disclosure, corresponding to the HTML tag
.
RichBlockDivider
A divider, corresponding to the HTML tag
.
RichBlockFooter
A footer, corresponding to the HTML tag
.
RichBlockList
A list of blocks, corresponding to the HTML tag
    or
      with multiple nested tags
    1. .
RichBlockListItem
An item of a list.
RichBlockMap
A block with a map, corresponding to the custom HTML tag .
RichBlockMathematicalExpression
A block with a mathematical expression in LaTeX format, corresponding to the custom HTML tag .
RichBlockParagraph
A text paragraph, corresponding to the HTML tag

.

RichBlockPhoto
A block with a photo, corresponding to the HTML tag .
RichBlockPreformatted
A preformatted text block, corresponding to the nested HTML tags
 and .
RichBlockPullQuotation
A quotation with centered text, loosely corresponding to the HTML tag
RichBlockSectionHeading
A section heading, corresponding to the HTML tags

,

,

,

,

, or
.
RichBlockSlideshow
A slideshow, corresponding to the custom HTML tag .
RichBlockTable
A table, corresponding to the HTML tag
.
RichBlockTableCell
Cell in a table.
RichBlockThinking
A block with a ‘Thinking…’ placeholder, corresponding to the custom HTML tag . The block may be used only in sendRichMessageDraft, therefore it can’t be received in messages. See https://t.me/addemoji/AIActions for examples of custom emoji that are recommended for usage in the block.
RichBlockVideo
A block with a video, corresponding to the HTML tag
RichBlockVoiceNote
A block with a voice note, corresponding to the HTML tag
RichMessage
Rich formatted message.
RichText
This object represents a rich formatted text. Currently, it can be either a String for plain text, an Array of RichText, or any of the following types:
RichTextAnchor
An anchor.
RichTextAnchorLink
A link to an anchor.
RichTextBankCardNumber
A text with a bank card number.
RichTextBold
A bold text.
RichTextBotCommand
A bot command.
RichTextCashtag
A cashtag.
RichTextCode
A monowidth text.
RichTextCustomEmoji
A custom emoji.
RichTextDateTime
Formatted date and time.
RichTextEmailAddress
A text with an email address.
RichTextHashtag
A hashtag.
RichTextItalic
An italicized text.
RichTextMarked
A marked text.
RichTextMathematicalExpression
A mathematical expression.
RichTextMention
A mention by a username.
RichTextPhoneNumber
A text with a phone number.
RichTextReference
A reference.
RichTextReferenceLink
A link to a reference.
RichTextSpoiler
A text covered by a spoiler.
RichTextStrikethrough
A strikethrough text.
RichTextSubscript
A subscript text.
RichTextSuperscript
A superscript text.
RichTextTextMention
A mention of a Telegram user by their identifier.
RichTextUnderline
An underlined text.
RichTextUrl
A text with a link.
SentGuestMessage
Describes an inline message sent by a guest bot.
SentWebAppMessage
Describes an inline message sent by a Web App on behalf of a user.
SharedUser
This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button.
ShippingAddress
This object represents a shipping address.
ShippingOption
This object represents one shipping option.
ShippingQuery
This object contains information about an incoming shipping query.
StarAmount
Describes an amount of Telegram Stars.
StarTransaction
Describes a Telegram Star transaction. Note that if the buyer initiates a chargeback with the payment provider from whom they acquired Stars (e.g., Apple, Google) following this transaction, the refunded Stars will be deducted from the bot’s balance. This is outside of Telegram’s control.
StarTransactions
Contains a list of Telegram Star transactions.
Sticker
This object represents a sticker.
StickerSet
This object represents a sticker set.
Story
This object represents a story.
StoryArea
Describes a clickable area on a story media.
StoryAreaPosition
Describes the position of a clickable area within a story.
StoryAreaType
Describes the type of a clickable area on a story. Currently, it can be one of
StoryAreaTypeLink
Describes a story area pointing to an HTTP or tg:// link. Currently, a story can have up to 3 link areas.
StoryAreaTypeLocation
Describes a story area pointing to a location. Currently, a story can have up to 10 location areas.
StoryAreaTypeSuggestedReaction
Describes a story area pointing to a suggested reaction. Currently, a story can have up to 5 suggested reaction areas.
StoryAreaTypeUniqueGift
Describes a story area pointing to a unique gift. Currently, a story can have at most 1 unique gift area.
StoryAreaTypeWeather
Describes a story area containing weather information. Currently, a story can have up to 3 weather areas.
SuccessfulPayment
This object contains basic information about a successful payment. Note that if the buyer initiates a chargeback with the relevant payment provider following this transaction, the funds may be debited from your balance. This is outside of Telegram’s control.
SuggestedPostApprovalFailed
Describes a service message about the failed approval of a suggested post. Currently, only caused by insufficient user funds at the time of approval.
SuggestedPostApproved
Describes a service message about the approval of a suggested post.
SuggestedPostDeclined
Describes a service message about the rejection of a suggested post.
SuggestedPostInfo
Contains information about a suggested post.
SuggestedPostPaid
Describes a service message about a successful payment for a suggested post.
SuggestedPostParameters
Contains parameters of a post that is being suggested by the bot.
SuggestedPostPrice
Describes the price of a suggested post.
SuggestedPostRefunded
Describes a service message about a payment refund for a suggested post.
SwitchInlineQueryChosenChat
This object represents an inline button that switches the current user to inline mode in a chosen chat, with an optional default inline query.
TextQuote
This object contains information about the quoted part of a message that is replied to by the given message.
TransactionPartner
This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of
TransactionPartnerAffiliateProgram
Describes the affiliate program that issued the affiliate commission received via this transaction.
TransactionPartnerChat
Describes a transaction with a chat.
TransactionPartnerFragment
Describes a withdrawal transaction with Fragment.
TransactionPartnerOther
Describes a transaction with an unknown source or recipient.
TransactionPartnerTelegramAds
Describes a withdrawal transaction to the Telegram Ads platform.
TransactionPartnerTelegramApi
Describes a transaction with payment for paid broadcasting.
TransactionPartnerUser
Describes a transaction with a user.
UniqueGift
This object describes a unique gift that was upgraded from a regular gift.
UniqueGiftBackdrop
This object describes the backdrop of a unique gift.
UniqueGiftBackdropColors
This object describes the colors of the backdrop of a unique gift.
UniqueGiftColors
This object contains information about the color scheme for a user’s name, message replies and link previews based on a unique gift.
UniqueGiftInfo
Describes a service message about a unique gift that was sent or received.
UniqueGiftModel
This object describes the model of a unique gift.
UniqueGiftSymbol
This object describes the symbol shown on the pattern of a unique gift.
Update
This object represents an incoming update.
User
This object represents a Telegram user or bot.
UserChatBoosts
This object represents a list of boosts added to a chat by a user.
UserProfileAudios
This object represents the audios displayed on a user’s profile.
UserProfilePhotos
This object represent a user’s profile pictures.
UserRating
This object describes the rating of a user based on their Telegram Star spendings.
UserShared
This object contains information about the user whose identifier was shared with the bot using a KeyboardButtonRequestUser button.
UsersShared
This object contains information about the users whose identifiers were shared with the bot using a KeyboardButtonRequestUsers button.
Venue
This object represents a venue.
Video
This object represents a video file.
VideoChatEnded
This object represents a service message about a video chat ended in the chat.
VideoChatParticipantsInvited
This object represents a service message about new members invited to a video chat.
VideoChatScheduled
This object represents a service message about a video chat scheduled in the chat.
VideoChatStarted
This object represents a service message about a video chat started in the chat. Currently holds no information.
VideoNote
This object represents a video message (available in Telegram apps as of v.4.0).
VideoQuality
This object represents a video file of a specific quality.
Voice
This object represents a voice note.
WebAppData
Describes data sent from a Web App to the bot.
WebAppInfo
Describes a Web App.
WebhookInfo
Describes the current status of a webhook.
WriteAccessAllowed
This object 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.

Enums§

BackgroundFillUnion
BackgroundTypeUnion
BotCommandScopeUnion
ChatBoostSourceUnion
ChatId
Integer chat id or public @username accepted by Telegram methods.
ChatMemberUnion
InlineQueryResultUnion
InputFile
A Telegram file reference or a new in-memory upload.
InputMediaUnion
InputMessageContentUnion
InputPaidMediaUnion
InputPollMediaUnion
InputPollOptionMediaUnion
InputPollOptionUnion
InputProfilePhotoUnion
InputRichBlockUnion
InputRichMessageMediaUnion
InputStoryContentUnion
MaybeInaccessibleMessageUnion
MediaUnion
MenuButtonUnion
MessageOriginUnion
OwnedGiftUnion
PaidMediaUnion
PassportElementErrorUnion
ReactionTypeUnion
ReplyMarkupUnion
ResultChatMemberUnion
ResultMenuButtonUnion
RevenueWithdrawalStateUnion
RichBlockUnion
RichTextUnion
StoryAreaTypeUnion
TransactionPartnerUnion
UpdateEventRef
Type-safe counterpart of aiogram’s dynamic Update.event property.

Constants§

API_ENTITY_COUNT
Number of entity definitions in the pinned upstream snapshot.
API_UNION_COUNT
Number of aiogram-compatible helper unions.
BOUND_METHOD_COUNT
Number of bound object helpers declared by the pinned aiogram aliases.
MAPPED_PYTHON_TYPE_ANNOTATION_COUNT
Number of final Python field annotations mapped into generated Rust types.

Traits§

Downloadable
Telegram objects that expose a file identifier accepted by getFile.

Type Aliases§

ChatIdUnion
DateTimeUnion
InputFileUnion