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_direct_messages (bool, optional) – True, if the chat is the direct messages chat of a channel.

  • is_min (bool, optional) – True, if this chat have reduced set of fields.

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

  • verification_status (VerificationStatus, optional) – Contains information about verification status of a chat.

  • can_send_gift (bool, optional) – True, if the user can send a gift to the supergroup or channel using send_gift() or transfer_gift().

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

  • personal_photo (ChatPhoto, optional) – Chat profile photo set by the current user for the contact. This photo isn’t returned in the list of chat photos. Suitable for downloads only.

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

  • public_photo (ChatPhoto, optional) – Chat profile photo visible if the main photo is hidden by privacy settings. This photo isn’t returned in the list of chat photos. Suitable for downloads only.

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

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

  • show_message_sender_name (bool, optional) – True, if the chat has a username.

  • sign_messages (bool, optional) – True, if messages sent to the channel contains name of the sender. This field is only applicable to channels.

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

  • has_automatic_translation (bool, optional) – True, if automatic translation of messages is enabled in the channel.

  • has_forum_tabs (bool, optional) – True, if the supergroup is a forum, which topics are shown in the same way as in channel direct messages groups.

  • has_direct_messages_group (bool, optional) – True, if the channel has direct messages group.

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

  • 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_id (int, optional) – Chat identifier of a discussion group for the channel, or a channel, for which the supergroup is the designated discussion group. Returned only in get_chat().

  • direct_messages_chat_id (int, optional) – Chat identifier of a direct messages group for the channel, or a channel, for which the supergroup is the designated direct messages group. Returned only in get_chat().

  • parent_chat (Chat, optional) – Information about the corresponding channel chat. For direct messages chats only. 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_away_message (BusinessMessage, optional) – For private chats with business accounts, the away message of the business.

  • business_greeting_message (BusinessMessage, optional) – For private chats with business accounts, the greeting message of the business.

  • business_work_hours (BusinessWorkingHours, optional) – For private chats with business accounts, the working hours of the business.

  • business_location (Location, optional) – For private chats with business accounts, the location of the business.

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

  • gift_count (int, optional) – Number of saved to profile gifts for channels without can_post_messages administrator right, otherwise, the total number of received gifts.

  • bot_verification (BotVerification, optional) – Information about bot verification.

  • main_profile_tab (ProfileTab, optional) – The main tab chosen by the administrators of the channel. Returned only in get_chat().

  • first_profile_audio (Audio, optional) – The first audio file added to the user’s profile. Returned only in get_chat().

  • rating (UserRating, optional) – Description of the current rating of the user.

  • pending_rating (UserRating, optional) – Description of the rating of the user after the next change.

  • pending_rating_date (datetime, optional) – Date when rating of the user will change to pending_rating.

  • settings (ChatSettings, optional) – Chat settings. Returned only in get_chat().

  • admins_count (int, optional) – Number of admins in channel. Returned only in get_chat().

  • kicked_count (int, optional) – Number of kicked from the channel. Returned only in get_chat().

  • banned_count (int, optional) – Number of banned from the channel. Returned only in get_chat().

  • available_min_id (int, optional) – Identifier of a maximum unavailable message due to hidden history. Returned only in get_chat().

  • boosts_applied (int, optional) – The number of boosts the current user has applied to the current supergroup. Returned only in get_chat().

  • channel_admin_rights (ChatAdministratorRights, optional) – A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a channel. Returned only in get_chat().

  • chat_admin_rights (ChatAdministratorRights, optional) – A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a group. Returned only in get_chat().

  • bot_can_manage_emoji_status (bool, optional) – True, if the bot can change your emoji status. Returned only in get_chat().

  • can_delete_channel (bool, optional) – True, if the current user can delete this channel. Returned only in get_chat().

  • can_pin_message (bool, optional) – True, if the current user can pin messages in this chat. Returned only in get_chat().

  • can_schedule_messages (bool, optional) – True, if the current user can schedule messages in this chat. Returned only in get_chat().

  • can_set_location (bool, optional) – True, if the current user can set location in this chat. Returned only in get_chat().

  • can_set_username (bool, optional) – True, if the current user can set username in this chat. Returned only in get_chat().

  • can_view_participants (bool, optional) – True, if the current user can view participants in this chat. Returned only in get_chat().

  • can_view_revenue (bool, optional) – True, if the current user can view revenue in this chat. Returned only in get_chat().

  • can_view_stars_revenue (bool, optional) – True, if the current user can view stars revenue in this chat. Returned only in get_chat().

  • can_view_stats (bool, optional) – True, if the current user can view stats in this chat. Returned only in get_chat().

  • can_send_voice_messages (bool, optional) – True, if the current user can send voice messages in this chat. Returned only in get_chat().

  • can_manage_bots (bool, optional) – True, if other bots can be created to be controlled by the bot. Returned only in get_chat().

  • common_chats (int, optional) – Number of common chats with this user. Returned only in get_chat().

  • is_ads_enabled (bool, optional) – True, if ads were re-enabled for the current account (only accessible to the currently logged-in user). Returned only in get_chat().

  • is_blocked (bool, optional) – True, if you have blocked this user. Returned only in get_chat().

  • is_blocked_my_stories_from (bool, optional) – True, if we’ve blocked this user, preventing them from seeing our stories. Returned only in get_chat().

  • is_contact_require_premium (bool, optional) – True, if we cannot write to this user: subscribe to Telegram Premium to get permission to write to this user. To set this flag for ourselves invoke account.setGlobalPrivacySettings, setting the settings.new_noncontact_peers_require_premium flag. Returned only in get_chat().

  • is_phone_calls_available (bool, optional) – True, if this user can make VoIP calls. Returned only in get_chat().

  • is_phone_calls_private (bool, optional) – True, if this user’s privacy settings allow you to call them. Returned only in get_chat().

  • is_pinned_stories_available (bool, optional) – True, if this user has some pinned stories. Returned only in get_chat().

  • is_read_dates_available (bool, optional) – True, if we cannot fetch the exact read date of messages we send to this user. Returned only in get_chat().

  • is_translations_disabled (bool, optional) – True, if the real-time chat translation popup should be hidden. Returned only in get_chat().

  • is_video_calls_available (bool, optional) – True, if this user can receive video calls. Returned only in get_chat().

  • is_wallpaper_overridden (bool, optional) – True, if this user has a custom wallpaper. Returned only in get_chat().

  • migrated_from_chat_id (int, optional) – The unique chat identifier from which this group was migrated. Returned only in get_chat().

  • migrated_from_max_message_id (int, optional) – The message identifier in the original chat at which this group was migrated. Returned only in get_chat().

  • online_count (int, optional) – Number of online members in the chat. Returned only in get_chat().

  • private_forward_name (str, optional) – Anonymized text to be shown instead of the user’s name on forwarded messages. Returned only in get_chat().

  • read_inbox_max_id (int, optional) – Position up to which all incoming messages are read. Returned only in get_chat().

  • read_outbox_max_id (int, optional) – Position up to which all outgoing messages are read. Returned only in get_chat().

  • is_ads_restricted (bool, optional) – True, if ads on this channel were restricted. Returned only in get_chat().

  • stats_dc_id (int, optional) – The DC ID where the stats are stored. Returned only in get_chat().

  • theme (ChatTheme, optional) – Theme set for the chat. Returned only in get_chat().

  • unread_count (int, optional) – Number of unread messages in the chat. Returned only in get_chat().

  • view_forum_as_messages (bool, optional) – Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a “View as messages” setting in the local client. This setting only affects the current account, and is synced to other logged in sessions using the channels.toggleViewForumAsMessages method. Invoking this method will update the value of this flag. Returned only in get_chat().

  • paid_message_star_count (int, optional) – Number of Telegram Stars that must be paid by non-administrator users of the supergroup chat for each sent message.

  • is_paid_messages_available (bool, optional) – True, if paid messages are available in this chat. Returned only in get_chat().

  • display_gifts_button (bool, optional) – True, if the gift button should be shown in the message input field for both participants in all chats. Returned only in get_chat().

  • uses_unofficial_app (bool, optional) – True, if the user uses an unofficial application that poses a security risk.

  • accepted_gift_types (AcceptedGiftTypes, optional) – Information about gifts that can be received by the user. Returned only in get_chat().

  • note (FormattedText, optional) – Note added to the user’s contact. Returned only in get_chat().

  • raw (UserFull | ChatFull | ChannelFull, 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.