Optional
Readonly
distanceDistance in meters of this group chat from your location Returned only in TelegramClient.getNearbyChats
Readonly
peerRaw peer object that this Chat represents.
Readonly
typeAdmin rights of the current user in this chat.
null
for PMs and non-administered chats
Boosts level this chat has (0 if none or is not a channel)
Color that should be used when rendering replies to the messages and web previews sent by this chat, as well as to render the chat title
User's or bot's assigned DC (data center). Available only in case the user has set a public profile photo.
Note: 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 it will be the DC assigned to the administrator who set the current profile photo.
Default chat member permissions, for groups and supergroups.
Get the display name of the chat.
Title for groups and channels, name (and last name if available) for users
Chat's emoji status, if any.
First name of the other party in a private chat, for private chats and bots
Whether this group has content protection (i.e. disabled forwards)
Whether this group is a channel/supergroup with join requests enabled
Whether this group is a supergroup with join-to-send rule enabled
Whether this channel has profile signatures (i.e. "Super Channel")
Marked ID of this chat
Chat's input peer for advanced use-cases.
Note: for min chats, this method will return
mtcute.dummyInputPeerMin*
, which are actually not a valid input peer, These are used to indicate that the user is incomplete, and a message reference is needed to resolve the peer.Such objects are handled by TelegramClient.resolvePeer method, so prefer using it whenever you need an input peer.
Whether current user has admin rights in this chat. Supergroups, channels and groups only.
Whether this peer is your contact
Whether this chat is owned by the current user. Supergroups, channels and groups only
Whether this chat has been flagged for impersonation
Whether this peer is a forum supergroup
Whether this chat is a group chat (i.e. not a channel and not PM)
Whether the current user is a member of the chat.
For users, this is always true
.
Whether this chat's information is incomplete.
This usually only happens in large chats, where the server sometimes sends only a part of the chat's information. Basic info like name and profile photo are always available, but other fields may be omitted despite being available.
For a rough list of fields that may be missing, see the official docs for channel and user.
This currently only ever happens for non-bot users, so if you are building a normal bot, you can safely ignore this field.
To fetch the "complete" user information, use one of these methods:
Learn more: Incomplete peers
Whether this chat has been restricted. See restrictions for details
Whether this chat has been flagged for scam
Whether this chat is chat with yourself (i.e. Saved Messages)
Whether this chat is part of the Telegram support team. Users and bots only
Whether the chat is not available (e.g. because the user was banned from there)
Whether this chat has been verified by Telegram. Supergroups, channels and groups only
Last name of the other party in a private chat, for private chats
Current user's permissions, for supergroups.
Chat photo, if any. Suitable for downloads only.
If full chat information is available, prefer FullChat#fullPhoto instead.
Color that should be used when rendering the header of the user's profile
If null
, a generic header should be used instead
The list of reasons why this chat might be unavailable to some users.
This field is available only in case isRestricted is true
Whether you have hidden (arhived) this chat's stories
Maximum ID of stories this chat has (or 0 if none)
If a subscription to this channel was bought using Telegram Stars, this field will contain the date when the subscription will expire.
Title, for supergroups, channels and groups
Username, for private chats, bots, supergroups and channels if available
Usernames (inclufing collectibles), for private chats, bots, supergroups and channels if available
Create a mention for the chat.
If this is a user, works just like User.mention.
Otherwise, if the chat has a username, a @username
is created
(or text link, if text
is passed). If it does not, chat title is
simply returned without additional formatting.
When available and text
is omitted, this method will return @username
.
Otherwise, text mention is created for the given (or default) parse mode
Use null
as text
(first parameter) to force create a text
mention with display name, even if there is a username.
Note: This method doesn't format anything on its own. Instead, it returns a MessageEntity that can later be used with
html
ormd
template tags, orunparse
method directly.
Optional
text: null | stringText of the mention.
A chat.