Chat#

class pyrogram.types.Chat#

A chat.

Parameters:
  • id (int) – Unique identifier for this chat.

  • type (ChatType) – Type of chat.

  • is_verified (bool, optional) – True, if this chat has been verified by Telegram. Supergroups, channels and bots only.

  • is_restricted (bool, optional) – True, if this chat has been restricted. Supergroups, channels and bots only. See restriction_reason for details.

  • is_creator (bool, optional) – True, if this chat owner is the current user. Supergroups, channels and groups only.

  • is_scam (bool, optional) – True, if this chat has been flagged for scam.

  • is_fake (bool, optional) – True, if this chat has been flagged for impersonation.

  • is_support (bool) – True, if this chat is part of the Telegram support team. Users and bots only.

  • title (str, optional) – Title, for supergroups, channels and basic group chats.

  • username (str, optional) – Username, for private chats, bots, supergroups and channels if available.

  • first_name (str, optional) – First name of the other party in a private chat, for private chats and bots.

  • last_name (str, optional) – Last name of the other party in a private chat, for private chats.

  • photo (ChatPhoto, optional) – Chat photo. Suitable for downloads only.

  • bio (str, optional) – Bio of the other party in a private chat. Returned only in get_chat().

  • description (str, optional) – Description, for groups, supergroups and channel chats. Returned only in get_chat().

  • dc_id (int, optional) – The chat assigned DC (data center). Available only in case the chat has a photo. Note that this information is approximate; it is based on where Telegram stores the current chat photo. It is accurate only in case the owner has set the chat photo, otherwise the dc_id will be the one assigned to the administrator who set the current chat photo.

  • has_protected_content (bool, optional) – True, if messages from the chat can’t be forwarded to other chats.

  • invite_link (str, optional) – Chat invite link, for groups, supergroups and channels. Returned only in get_chat().

  • pinned_message (Message, optional) – Pinned message, for groups, supergroups channels and own chat. Returned only in get_chat().

  • sticker_set_name (str, optional) – For supergroups, name of group sticker set. Returned only in get_chat().

  • can_set_sticker_set (bool, optional) – True, if the group sticker set can be changed by you. Returned only in get_chat().

  • members_count (int, optional) – Chat members count, for groups, supergroups and channels only. Returned only in get_chat().

  • restrictions (List of Restriction, optional) – The list of reasons why this chat might be unavailable to some users. This field is available only in case is_restricted is True.

  • permissions (ChatPermissions optional) – Default chat member permissions, for groups and supergroups.

  • distance (int, optional) – Distance in meters of this group chat from your location. Returned only in get_nearby_chats().

  • linked_chat (Chat, optional) – The linked discussion group (in case of channels) or the linked channel (in case of supergroups). Returned only in get_chat().

  • send_as_chat (Chat, optional) – The default “send_as” chat. Returned only in get_chat().

  • available_reactions (ChatReactions, optional) – Available reactions in the chat. Returned only in get_chat().