Chat
class Chat
This object represents a chat.
Methods
No description
Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
Type of chat, can be either “private”, “group”, “supergroup” or “channel”.
Optional. Title, for supergroups, channels and group chats.
Optional. Username, for private chats, supergroups and channels if available.
Optional. First name of the other party in a private chat.
Optional. Last name of the other party in a private chat.
Optional. True, if the supergroup chat is a forum (has topics enabled).
Optional. Chat photo. Returned only in getChat.
Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.
Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.
Optional. Bio of the other party in a private chat. Returned only in getChat.
Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=
Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.
Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.
Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
Optional. The most recent pinned message (by sending date). Returned only in getChat.
Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.
Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
Optional. For supergroups, name of group sticker set. Returned only in getChat.
Optional. True, if the bot can change the group sticker set. Returned only in getChat.
Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.
Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.
Details
at line 38
__construct(int $id, string $type, string|null $title = null, string|null $username = null, string|null $first_name = null, string|null $last_name = null, bool|null $is_forum = null, ChatPhoto|null $photo = null, string[]|null $active_usernames = null, string|null $emoji_status_custom_emoji_id = null, string|null $bio = null, bool|null $has_private_forwards = null, bool|null $has_restricted_voice_and_video_messages = null, bool|null $join_to_send_messages = null, bool|null $join_by_request = null, string|null $description = null, string|null $invite_link = null, Message|null $pinned_message = null, ChatPermissions|null $permissions = null, int|null $slow_mode_delay = null, int|null $message_auto_delete_time = null, bool|null $has_protected_content = null, string|null $sticker_set_name = null, bool|null $can_set_sticker_set = null, int|null $linked_chat_id = null, ChatLocation|null $location = null)
No description
at line 71
int
getId()
Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier.
at line 79
string
getType()
Type of chat, can be either “private”, “group”, “supergroup” or “channel”.
at line 87
string|null
getTitle()
Optional. Title, for supergroups, channels and group chats.
at line 95
string|null
getUsername()
Optional. Username, for private chats, supergroups and channels if available.
at line 103
string|null
getFirstName()
Optional. First name of the other party in a private chat.
at line 111
string|null
getLastName()
Optional. Last name of the other party in a private chat.
at line 119
bool|null
getIsForum()
Optional. True, if the supergroup chat is a forum (has topics enabled).
at line 127
ChatPhoto|null
getPhoto()
Optional. Chat photo. Returned only in getChat.
at line 137
array|null
getActiveUsernames()
Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.
at line 145
string|null
getEmojiStatusCustomEmojiId()
Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.
at line 153
string|null
getBio()
Optional. Bio of the other party in a private chat. Returned only in getChat.
at line 161
bool|null
getHasPrivateForwards()
Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=
at line 169
bool|null
getHasRestrictedVoiceAndVideoMessages()
Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat. Returned only in getChat.
at line 177
bool|null
getJoinToSendMessages()
Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.
at line 185
bool|null
getJoinByRequest()
Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
at line 193
string|null
getDescription()
Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
at line 201
string|null
getInviteLink()
Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.
at line 209
Message|null
getPinnedMessage()
Optional. The most recent pinned message (by sending date). Returned only in getChat.
at line 217
ChatPermissions|null
getPermissions()
Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
at line 225
int|null
getSlowModeDelay()
Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.
at line 233
int|null
getMessageAutoDeleteTime()
Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
at line 241
bool|null
getHasProtectedContent()
Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
at line 249
string|null
getStickerSetName()
Optional. For supergroups, name of group sticker set. Returned only in getChat.
at line 257
bool|null
getCanSetStickerSet()
Optional. True, if the bot can change the group sticker set. Returned only in getChat.
at line 265
int|null
getLinkedChatId()
Optional. Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. This identifier may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. Returned only in getChat.
at line 273
ChatLocation|null
getLocation()
Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.