Chat#
- class pyrogram.types.Chat#
A chat.
- Parameters:
id (
int
, optional) – Unique identifier for this chat.type (
ChatType
, optional) – Type of 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.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.is_forum (
bool
, optional) – True, if the supergroup chat is a forummax_reaction_count (
int
) – The maximum number of reactions that can be set on a message in the chatphoto (
ChatPhoto
, optional) – Chat photo. Suitable for downloads only.active_usernames (List of
Username
, optional) – If non-empty, the list of all active chat usernames; for private chats, supergroups and channels.birthdate (
Birthdate
, optional) – For private chats, the date of birth of the user.business_intro (
BusinessIntro
, optional) – For private chats with business accounts, the intro of the business.business_location (
BusinessLocation
, optional) – For private chats with business accounts, the location of the business.business_opening_hours (
BusinessOpeningHours
, optional) – For private chats with business accounts, the opening hours of the business.personal_chat (
Chat
, optional) – For private chats, the personal channel of the user.personal_chat_message (
Message
, optional) – TEMPORARY: For private chats, the personal message_id in thepersonal_chat
.available_reactions (
ChatReactions
, optional) – Available reactions in the chat. Returned only inget_chat()
.accent_color (
ChatColor
, optional) – Chat accent color.profile_color (
ChatColor
, optional) – Chat profile color.emoji_status (
EmojiStatus
, optional) – Emoji status.background (
ChatBackground
, optional) – A chat background.bio (
str
, optional) – Bio of the other party in a private chat. Returned only inget_chat()
.join_by_request (
bool
, optional) – True, if all users directly joining the supergroup need to be approved by supergroup administrators.description (
str
, optional) – Description, for groups, supergroups and channel chats. Returned only inget_chat()
.invite_link (
str
, optional) – Chat invite link, for groups, supergroups and channels. Returned only inget_chat()
.pinned_message (
Message
, optional) – Pinned message, for groups, supergroups channels and own chat. Returned only inget_chat()
.permissions (
ChatPermissions
optional) – Default chat member permissions, for groups and supergroups.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.slowmode_next_send_date (
datetime
, optional) – Indicates when the user will be allowed to send another message in the chat. For supergroups only.slow_mode_delay (
int
, optional) – For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; 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.message_auto_delete_time (
int
, optional) – The time after which all messages sent to the chat will be automatically deleted; in seconds.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_hidden_members (
bool
, optional) – True, if non-administrators can only get the list of bots and administrators in the chat.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.sticker_set_name (
str
, optional) – For supergroups, name of group sticker set. Returned only inget_chat()
.can_set_sticker_set (
bool
, optional) – True, if the group sticker set can be changed by you. Returned only inget_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.linked_chat (
Chat
, optional) – The linked discussion group (in case of channels) or the linked channel (in case of supergroups). Returned only inget_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
, optional) – True, if this chat is part of the Telegram support team. Users and bots only.is_public (
bool
, optional) – True, if this chat is public.is_banned (
bool
, optional) – True, if you are banned in this 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.members (List of
User
, optional) – Preview of some of the chat members.members_count (
int
, optional) – Chat members count, for groups, supergroups and channels only. Returned only inget_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.distance (
int
, optional) – Distance in meters of this group chat from your location. Returned only inget_nearby_chats()
.send_as_chat (
Chat
, optional) – The default “send_as” chat. Returned only inget_chat()
.is_peak_preview (
bool
, optional) – True, if this is a peak preview.banned_until_date (
datetime
, optional) – Date when the current user will be unbanned.pending_join_request_count (
int
, optional) – Number of pending join requests in the current chat.can_enable_paid_reaction (
bool
, optional) – True, if paid reaction can be enabled in the channel chat; for channels only.gift_count (
int
, optional) – Number of saved to profile gifts for other users or the total number of received gifts for the current user. Number of saved to profile gifts for channels withoutcan_post_messages
administrator right, otherwise, the total number of received gifts.full_name (
str
, property) – Full name of the other party in a private chat, for private chats and bots.