Skip to content
This repository was archived by the owner on Dec 23, 2024. It is now read-only.

Latest commit

 

History

History
126 lines (78 loc) · 1.92 KB

File metadata and controls

126 lines (78 loc) · 1.92 KB

Available Types

This page is about Pyrogram Types. All types listed here are available through the pyrogram.types package. Unless required as argument to a client method, most of the types don't need to be manually instantiated because they are only returned by other methods. You also don't need to import them, unless you want to type-hint your variables.

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

Note

Optional fields always exist inside the object, but they could be empty and contain the value of None. Empty fields aren't shown when, for example, using print(message) and this means that hasattr(message, "photo") always returns True.

To tell whether a field is set or not, do a simple boolean check: if message.photo: ....


.. currentmodule:: pyrogram.types

Users & Chats

.. autosummary::
    :nosignatures:

    {users_chats}

.. toctree::
    :hidden:

    {users_chats}

Messages & Media

.. autosummary::
    :nosignatures:

    {messages_media}

.. toctree::
    :hidden:

    {messages_media}

Bot keyboards

.. autosummary::
    :nosignatures:

    {bot_keyboards}

.. toctree::
    :hidden:

    {bot_keyboards}

Bot commands

.. autosummary::
    :nosignatures:

    {bot_commands}

.. toctree::
    :hidden:

    {bot_commands}

Input Media

.. autosummary::
    :nosignatures:

    {input_media}

.. toctree::
    :hidden:

    {input_media}

Inline Mode

.. autosummary::
    :nosignatures:

    {inline_mode}

.. toctree::
    :hidden:

    {inline_mode}

InputMessageContent

.. autosummary::
    :nosignatures:

    {input_message_content}

.. toctree::
    :hidden:

    {input_message_content}

Authorization

.. autosummary::
    :nosignatures:

    {authorization}

.. toctree::
    :hidden:

    {authorization}