Optional
Readonly
distanceDistance in meters of this group chat from your location Returned only in TelegramClient.getNearbyChats
Readonly
rawRaw peer object that this Chat represents.
Readonly
typeAdmin rights of the current user in this chat, if any.`
Date when the current user will be unbanned (if available)
Returns null
if the user is not banned, or if the ban is permanent
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
Date when the chat was created (if available)
Default chat member permissions, for groups and supergroups.
Chat's emoji status, if any.
Whether this chat has a call/livestrean active
Whether this chat has a call/livestream, and there's at least one member in it
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")
Whether this channel has author signatures enabled under posts
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 the chat is not available (e.g. because the user was banned from there).
Note: This method checks if the underlying peer is chatForbidden
or channelForbidden
.
In some cases this field might be false
even if the user is not a member of the chat,
and calling .getChat()
will throw CHANNEL_PRIVATE
.
In particular, this seems to be the case for .forward.sender
of Message objects.
Consider also checking for isLikelyUnavailable.
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)
Whether the chat is likely not available (e.g. because the user was banned from there), or the channel is private and the user is not a member of it.
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" chat 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 has been verified by Telegram. Supergroups, channels and groups only
Date when the current user joined this chat (if available)
Number of members in this chat (if available)
If this chat is a basic group that has been migrated to a supergroup, this field will contain the input peer of that supergroup.
If this chat is a basic group that has been migrated to a supergroup, this field will contain the marked ID of that supergroup.
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
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.
Chat title
Chat username (if available)
Usernames (including 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.