Chat

class pyrogram.Chat

A chat.

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

  • type (str) – Type of chat, can be either “private”, “bot”, “group”, “supergroup” or “channel”.

  • 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_scam (bool, optional) – True, if this chat has been flagged for scam. Supergroups, channels and bots only.

  • 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.

  • description (str, optional) – Bio, for private chats and bots or description for groups, supergroups and channels. Returned only in get_chat().

  • 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.

  • 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().