Available Types¶
This page is about Pyrogram types. All types listed here are accessible through types package.
from pyrogram.types import User, Message, ...
Note
Optional fields may not exist when irrelevant – i.e.: they will contain the value of None and aren’t shown
when, for example, using print().
Contents
Users & Chats¶
A Telegram user or bot. |
|
A chat. |
|
A chat preview. |
|
A chat photo. |
|
Contains information about one member of a chat. |
|
A chat default permissions and a single member permissions within a chat. |
|
A user’s dialog. |
|
A restriction applied to bots or chats. |
Messages & Media¶
A message. |
|
One special entity in a text message. |
|
A Photo. |
|
One size of a photo or a file/sticker thumbnail. |
|
An audio file to be treated as music by the Telegram clients. |
|
A generic file (as opposed to photos, voice messages, audio files, …). |
|
An animation file (GIF or H.264/MPEG-4 AVC video without sound). |
|
A video file. |
|
A voice note. |
|
A video note. |
|
A phone contact. |
|
A point on the map. |
|
A venue. |
|
A sticker. |
|
A game. |
|
A webpage preview |
|
A Poll. |
|
Contains information about one answer option in a poll. |
|
A dice with a random value from 1 to 6 for currently supported base emoji. |
Bots & Keyboards¶
A custom keyboard with reply options. |
|
One button of the reply keyboard. |
|
Object used to tell clients to remove a bot keyboard. |
|
An inline keyboard that appears right next to the message it belongs to. |
|
One button of an inline keyboard. |
|
Object used to force clients to show a reply interface. |
|
An incoming callback query from a callback button in an inline keyboard. |
|
One row of the high scores table for a game. |
|
Placeholder, currently holds no information. |
Input Media¶
Content of a media message to be sent. |
|
A photo to be sent inside an album. |
|
A video to be sent inside an album. |
|
An audio to be sent inside an album. |
|
An animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent inside an album. |
|
A generic file to be sent inside an album. |
|
A Phone Contact to be added in your Telegram address book. |
Inline Mode¶
An incoming inline query. |
|
One result of an inline query. |
|
Link to an article or web page. |
|
Link to a photo. |
|
Link to an animated GIF file. |
|
A result of an inline query chosen by the user and sent to their chat partner. |
InputMessageContent¶
Content of a message to be sent as a result of an inline query. |
|
Content of a text message to be sent as the result of an inline query. |