Available Types

All types listed here are available through the pyrogram.types package.

from pyrogram.types import User, Message, ...

Authorization

ActiveSession

Contains information about one session in a Telegram application used by the current user.

ActiveSessions

Contains a list of sessions

LoginToken

Contains info on a login token.

Passkey

A passkey registered for Telegram authentication.

SentCode

Contains info on a sent confirmation code.

TermsOfService

Telegram's Terms of Service returned by sign_in().

Bot Keyboards

BotAllowed

Contains information about a allowed bot.

BotApp

Contains information about a bot app.

BotBusinessConnection

A bot business connection Information.

BotCommand

A bot command with the standard slash "/" prefix.

BotCommandScope

Represents the scope to which bot commands are applied.

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.

BotInfo

A bot Information.

CallbackGame

Placeholder, currently holds no information.

CallbackQuery

An incoming callback query from a callback button in an inline keyboard.

CollectibleItemInfo

Contains information about a collectible item and its last purchase. :Parameters: * purchase_date (datetime) -- Point in time (Unix timestamp) when the item was purchased * currency (str) -- Currency for the paid amount * amount (float) -- The paid amount, in the smallest units of the currency * cryptocurrency (str) -- Cryptocurrency used to pay for the item * cryptocurrency_amount (float) -- The paid amount, in the smallest units of the cryptocurrency * url (str) -- Individual URL for the item on https://fragment.com.

ForceReply

Object used to force clients to show a reply interface.

GameHighScore

One row of the high scores table for a game.

InlineKeyboardButton

One button of an inline keyboard.

InlineKeyboardButtonBuy

One button of the inline keyboard.

InlineKeyboardMarkup

An inline keyboard that appears right next to the message it belongs to.

KeyboardButton

One button of the reply keyboard.

LinkPreviewOptions

Options for link preview generation in a message (Bot API style).

LoginUrl

Represents a parameter of the inline keyboard button used to automatically authorize a user.

ManagedBot

Represents a managed bot created by a manager bot.

MenuButton

Describes the bot's menu button in a private chat.

MenuButtonCommands

A menu button, which opens the bot's list of commands.

MenuButtonDefault

Describes that no specific value for the menu button was set.

MenuButtonWebApp

A menu button, which launches a Web App.

PreparedInlineMessage

Describes an inline message to be sent by a user of a Mini App.

ReplyKeyboardMarkup

A custom keyboard with reply options.

ReplyKeyboardRemove

Object used to tell clients to remove a bot keyboard.

RequestPeerTypeChannel

Object used to request clients to send a channel identifier.

RequestPeerTypeChat

Object used to request clients to send a chat identifier.

RequestPeerTypeManagedBot

Criteria for requesting a managed bot creation via a keyboard button.

RequestPeerTypeUser

Object used to request clients to send a user identifier.

RequestedChat

Contains information about a requested chat.

RequestedChats

Contains information about requested chats.

RequestedUser

Contains information about a requested user.

SentWebAppMessage

Contains information about an inline message sent by a Web App on behalf of a user.

SwitchInlineQueryChosenChat

Represents an inline button that switches the current user to inline mode in a chosen chat.

WebAppInfo

Contains information about a Web App.

Business

PreCheckoutQuery

An incoming pre-checkout query from a buy button in an inline keyboard.

ShippingAddress

Contains information about a shipping address.

ShippingOption

This object represents one shipping option.

ShippingQuery

This object contains information about an incoming shipping query.

Inline Mode

ChosenInlineResult

A result of an inline query chosen by the user and sent to their chat partner.

InlineQuery

An incoming inline query.

InlineQueryResult

One result of an inline query.

InlineQueryResultAnimation

Link to an animated GIF file.

InlineQueryResultArticle

Link to an article or web page.

InlineQueryResultAudio

Link to an audio file.

InlineQueryResultCachedAnimation

A link to an animation file stored on the Telegram servers.

InlineQueryResultCachedAudio

A link to an MP3 audio file stored on the Telegram servers

InlineQueryResultCachedDocument

A link to a file stored on the Telegram servers.

InlineQueryResultCachedPhoto

A link to a photo stored on the Telegram servers.

InlineQueryResultCachedSticker

A link to a sticker stored on the Telegram servers

InlineQueryResultCachedVideo

A link to a video file stored on the Telegram servers.

InlineQueryResultCachedVoice

A link to a voice message stored on the Telegram servers.

InlineQueryResultContact

Contact with a phone number

InlineQueryResultDocument

Link to a file.

InlineQueryResultLocation

A location on a map.

InlineQueryResultPhoto

Link to a photo.

InlineQueryResultVenue

A venue.

InlineQueryResultVideo

Link to a page containing an embedded video player or a video file.

InlineQueryResultVoice

Link to a voice recording in an .OGG container encoded with OPUS.

Input Media

InputMedia

Content of a media message to be sent.

InputMediaAnimation

An animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent inside an album.

InputMediaArea

Content of a media area to be included in story.

InputMediaAreaChannelPost

A channel post media area.

InputMediaAudio

An audio to be sent inside an album.

InputMediaDocument

A generic file to be sent inside an album.

InputMediaPhoto

A photo to be sent inside an album.

InputMediaVideo

A video to be sent inside an album.

InputPhoneContact

A Phone Contact to be added in your Telegram address book.

Input Message Content

InputContactMessageContent

Content of a contact message to be sent as the result of an inline query.

InputInvoiceMessageContent

Content of an invoice message to be sent as the result of an inline query.

InputLocationMessageContent

Content of a location message to be sent as the result of an inline query.

InputMessageContent

Content of a message to be sent as a result of an inline query.

InputReplyToMessage

Contains information about a target replied message.

InputReplyToMonoforum

Contains information about a target replied monoforum.

InputReplyToStory

Contains information about a target replied story.

InputTextMessageContent

Content of a text message to be sent as the result of an inline query.

InputTodoTask

Contains information about a todo task.

InputVenueMessageContent

Content of a venue message to be sent as the result of an inline query.

Messages & Media

AlternativeVideo

Describes an alternative reencoded quality of a video file.

Animation

An animation file (GIF or H.264/MPEG-4 AVC video without sound).

Audio

An audio file to be treated as music by the Telegram clients.

AvailableEffect

Contains information about available effect.

ChatTheme

A service message about a chat theme.

ChatWallpaper

A service message about a chat wallpaper.

Contact

A phone contact.

ContactRegistered

A service message about a contact registered.

Dice

A dice with a random value from 1 to 6 for currently supported base emoji.

Document

A generic file (as opposed to photos, voice messages, audio files, ...).

ExportedStoryLink

Contains information about a story viewers.

ExternalReplyInfo

This object contains information about a message that is being replied to, which may come from another chat or forum topic.

FormattedText

Contains information about a text with some entities.

Game

A game.

Giveaway

A giveaway.

GiveawayLaunched

A service message about a giveaway started in the channel.

GiveawayResult

A giveaway result.

GroupCallMessage

A message sent inside a group call (live stream).

Location

A point on the map.

MediaArea

Content of a media areas in story.

MediaAreaChannelPost

A channel post media area.

MediaAreaCoordinates

A coordinates of media area.

Message

A message.

MessageEntity

One special entity in a text message.

MessageOrigin

This object describes the origin of a message.

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.

MessageOriginImport

Contains information about a message imported from a foreign chat service.

MessageOriginUser

The message was originally sent by a known user.

MessageReactionCountUpdated

Reactions to a message with anonymous reactions were changed.

MessageReactionUpdated

This object represents a change of a reaction on a message performed by a user.

MessageReactions

Contains information about a message reactions.

MessageReactor

Contains information about a message reactor.

MessageStory

Contains information about a forwarded story.

Photo

A Photo.

Poll

A Poll.

PollOption

Contains information about one answer option in a poll.

Reaction

Contains information about a reaction.

ReadParticipant

Contains information about a read participant.

ScreenshotTaken

A service message about a screenshot taken.

Sticker

A sticker.

StickerSet

A stickerset.

StoriesPrivacyRules

A story privacy.

Story

A story.

StoryAlbum

A story album (collection of stories).

StoryDeleted

A deleted story.

StoryForwardHeader

Contains information about origin of forwarded story.

StorySkipped

A skipped story.

StoryViews

Contains information about a story viewers.

StrippedThumbnail

A stripped thumbnail

TextQuote

Describes manually or automatically chosen quote from another message.

Thumbnail

One size of a photo or a file/sticker thumbnail.

TodoList

A list of tasks.

TodoTask

A task in a todo list.

TodoTasksAdded

A todo task added to a todo list.

TodoTasksCompleted

One or more todo task/s has been flag as complete.

TodoTasksIncompleted

One or more todo task/s has been flag as incomplete.

TranscribedAudio

Transcribes the audio of a voice message.

TranslatedText

A translated text with entities.

Venue

A venue.

Video

A video file.

VideoNote

A video note.

Voice

A voice note.

Wallpaper

A wallpaper.

WallpaperSettings

A wallpaper settings.

WebAppData

Contains data sent from a Web App to the bot.

WebPage

A webpage preview

WebPageEmpty

A webpage preview

WebPagePreview

A web page preview.

Payments

AuctionBidLevel

A single bid level in a star gift auction.

CheckedGiftCode

Contains checked gift code data.

ExtendedMediaPreview

A ExtendedMediaPreview.

Gift

A star gift.

GiftAttribute

Contains information about a star gift attribute.

GiftCode

A service message about a gift code.

GiftedPremium

Telegram Premium was gifted to the user

InputStarsTransaction

Content of a stars transaction.

Invoice

Contains information about an Invoice.

LabeledPrice

This object represents a price for goods or services.

PaidMedia

A PaidMedia.

PaidMessagePriceChanged

A PaidMessagePriceChanged.

PaymentForm

This object contains basic information about an payment form.

PaymentInfo

Contains information about a payment.

PaymentRefunded

Contains information about a refunded payment.

PurchasedPaidMedia

This object represents information about purchased paid media.

StarGiftAuctionRound

One round of a star gift auction.

StarGiftAuctionState

The full state of an ongoing star gift auction.

StarGiftAuctionUserState

The current user's state in an auction.

StarGiftCollection

A collection of star gifts belonging to a user or channel.

StarsRating

The Stars rating of a user or channel.

StarsStatus

Contains information about stars status.

StarsTransaction

Contains information about stars transaction.

SuccessfulPayment

Contains information about a successful payment.

Pyromod

Identifier

A dataclass that serves as a utility for matching listeners to the data of updates.

Listener

Designed to manage and handle different types of listeners used in pyromod.

Users & Chats

Birthday

User Date of birth.

BotVerification

Information about bot verification.

BusinessInfo

Business information of a user.

BusinessMessage

Business working hours.

BusinessRecipients

Business recipients.

BusinessWeeklyOpen

Business weekly open hours.

BusinessWorkingHours

Business working hours.

Chat

A chat.

ChatAdminWithInviteLinks

Represents a chat administrator that has created invite links in a chat.

ChatColor

Reply or profile color status.

ChatEvent

A chat event from the recent actions log (also known as admin log).

ChatEventFilter

Set of filters used to obtain a chat event log.

ChatInviteLink

An invite link for a chat.

ChatJoinRequest

Represents a join request sent to a chat.

ChatJoinedByRequest

A service message about a user join request approved in the chat.

ChatJoiner

Contains information about a joiner member of a chat.

ChatMember

Contains information about one member of a chat.

ChatMemberUpdated

Represents changes in the status of a chat member.

ChatPermissions

Describes actions that a non-administrator user is allowed to take in a chat.

ChatPhoto

A chat photo.

ChatPreview

A chat preview.

ChatPrivileges

Describes privileged actions an administrator is able to take in a chat.

ChatReactions

A chat reactions

ChatSettings

Peer/chat settings returned by get_chat_settings().

Dialog

A user's dialog.

EmojiStatus

A user emoji status.

Folder

A user's folder.

ForumTopic

A forum topic.

ForumTopicClosed

A service message about a forum topic closed in the chat.

ForumTopicCreated

A service message about a new forum topic created in the chat.

ForumTopicDeleted

A deleted forum topic.

ForumTopicEdited

A service message about a forum topic renamed in the chat.

ForumTopicReopened

A service message about a forum topic reopened in the chat.

GeneralTopicHidden

A service message about a general topic hidden in the chat.

GeneralTopicUnhidden

A service message about a general topic unhidden in the chat.

GroupCallMember

Contains information about one member of a group call.

InviteLinkImporter

The date and user of when someone has joined with an invite link.

PeerChannel

A PeerChannel.

PeerUser

A PeerUser.

Restriction

A restriction applied to bots or chats.

User

A Telegram user or bot.

Username

A Username.

VideoChatEnded

A service message about a voice chat ended in the chat.

VideoChatMembersInvited

A service message about new members invited to a voice chat.

VideoChatScheduled

A service message about a voice chat scheduled in the chat.

VideoChatStarted

A service message about a voice chat started in the chat.