Chat#

class pyrogram.types.Chat#

A chat.

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

  • type (ChatType, optional) – Type of chat.

  • is_forum (bool, optional) – True, if the supergroup chat is a forum.

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

  • is_members_hidden (bool, optional) – True, if the chat members are hidden.

  • 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_admin (bool, optional) – True, if the current user is admin. 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_deactivated (bool, optional) – True, if this chat has been flagged for deactivated.

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

  • is_stories_hidden (bool, optional) – True, if this chat has hidden stories.

  • is_stories_unavailable (bool, optional) – True, if this chat stories is unavailable.

  • is_business_bot (bool, optional) – True, if this bot can connect to business account.

  • is_preview (bool, optional) – True, if this chat is a preview.

  • is_banned (bool, optional) – True, if you are banned in this chat.

  • is_call_active (bool, optional) – True, if a group call is currently active.

  • is_call_not_empty (bool, optional) – True, if there’s anyone in the group call.

  • is_public (bool, optional) – True, if this chat is public.

  • is_paid_reactions_available (bool, optional) – True, if paid reactions enabled in this chat.

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

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

  • usernames (List of Username, optional) – The list of chat’s collectible (and basic) usernames 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.

  • stories (List of Story, optional) – The list of chat’s stories if available.

  • wallpaper (Document, optional) – Chat wallpaper.

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

  • folder_id (int, optional) – The folder identifier where the chat is located.

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

  • has_visible_history (bool, optional) – True, if new chat members will have access to old messages; available only to chat administrators.

  • has_aggressive_anti_spam_enabled (bool, optional) – True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.

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

  • custom_emoji_sticker_set_name (str, optional) – For supergroups, the name of the group’s custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.

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

  • can_send_paid_media (bool, optional) – True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.

  • members (List of User, optional) – A few of the participants that are in the group.

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

  • personal_channel (Chat, optional) – The personal channel linked to this chat. Returned only in get_chat().

  • personal_channel_message (Message, optional) – The last message in the personal channel of this chat. Returned only in get_chat().

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

  • level (int, optional) – Channel boosts level.

  • reply_color (ChatColor, optional) – Chat reply color.

  • profile_color (ChatColor, optional) – Chat profile color.

  • business_info (BusinessInfo, optional) – Business information of a chat.

  • business_intro (BusinessIntro, optional) – For private chats with business accounts, the intro of the business.

  • birthday (Birthday, optional) – Information about user birthday.

  • message_auto_delete_time (int, optional) – The time after which all messages sent to the chat will be automatically deleted; in seconds.

  • unrestrict_boost_count (int, optional) – For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions.

  • slow_mode_delay (int, optional) – For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds.

  • slowmode_next_send_date (datetime, optional) – Indicates when the user will be allowed to send another message in the chat. For supergroups only.

  • join_by_request (bool, optional) – True, if all users directly joining the supergroup need to be approved by supergroup administrators.

  • join_requests_count (int, optional) – Number of users who requested to join the chat.

  • banned_until_date (datetime, optional) – Date when the user will be unbanned.

  • subscription_until_date (datetime, optional) – Date when the the subscription will end.

  • reactions_limit (int, optional) – This flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max).

  • raw (Chat | User | ChatFull | UserFull, optional) – The raw chat or user object, as received from the Telegram API.

  • full_name (str, property) – Full name of the other party in a private chat, for private chats and bots.