class Chat

This object represents a chat.

Methods

__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

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.

string
getType()

Type of chat, can be either “private”, “group”, “supergroup” or “channel”.

string|null
getTitle()

Optional. Title, for supergroups, channels and group chats.

string|null
getUsername()

Optional. Username, for private chats, supergroups and channels if available.

string|null
getFirstName()

Optional. First name of the other party in a private chat.

string|null
getLastName()

Optional. Last name of the other party in a private chat.

bool|null
getIsForum()

Optional. True, if the supergroup chat is a forum (has topics enabled).

ChatPhoto|null
getPhoto()

Optional. Chat photo. Returned only in getChat.

array|null
getActiveUsernames()

Optional. If non-empty, the list of all active chat usernames; for private chats, supergroups and channels. Returned only in getChat.

string|null
getEmojiStatusCustomEmojiId()

Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.

string|null
getBio()

Optional. Bio of the other party in a private chat. Returned only in getChat.

bool|null
getHasPrivateForwards()

Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id= links only in chats with the user. Returned only in getChat.

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.

bool|null
getJoinToSendMessages()

Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.

bool|null
getJoinByRequest()

Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.

string|null
getDescription()

Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.

string|null
getInviteLink()

Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.

Message|null
getPinnedMessage()

Optional. The most recent pinned message (by sending date). Returned only in getChat.

ChatPermissions|null
getPermissions()

Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.

int|null
getSlowModeDelay()

Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user; in seconds. Returned only in getChat.

int|null
getMessageAutoDeleteTime()

Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.

bool|null
getHasProtectedContent()

Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.

string|null
getStickerSetName()

Optional. For supergroups, name of group sticker set. Returned only in getChat.

bool|null
getCanSetStickerSet()

Optional. True, if the bot can change the group sticker set. Returned only in getChat.

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.

ChatLocation|null
getLocation()

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

Parameters

int $id
string $type
string|null $title
string|null $username
string|null $first_name
string|null $last_name
bool|null $is_forum
ChatPhoto|null $photo
string[]|null $active_usernames
string|null $emoji_status_custom_emoji_id
string|null $bio
bool|null $has_private_forwards
bool|null $has_restricted_voice_and_video_messages
bool|null $join_to_send_messages
bool|null $join_by_request
string|null $description
string|null $invite_link
Message|null $pinned_message
ChatPermissions|null $permissions
int|null $slow_mode_delay
int|null $message_auto_delete_time
bool|null $has_protected_content
string|null $sticker_set_name
bool|null $can_set_sticker_set
int|null $linked_chat_id
ChatLocation|null $location

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.

Return Value

int

at line 79
string getType()

Type of chat, can be either “private”, “group”, “supergroup” or “channel”.

Return Value

string

at line 87
string|null getTitle()

Optional. Title, for supergroups, channels and group chats.

Return Value

string|null

at line 95
string|null getUsername()

Optional. Username, for private chats, supergroups and channels if available.

Return Value

string|null

at line 103
string|null getFirstName()

Optional. First name of the other party in a private chat.

Return Value

string|null

at line 111
string|null getLastName()

Optional. Last name of the other party in a private chat.

Return Value

string|null

at line 119
bool|null getIsForum()

Optional. True, if the supergroup chat is a forum (has topics enabled).

Return Value

bool|null

at line 127
ChatPhoto|null getPhoto()

Optional. Chat photo. Returned only in getChat.

Return Value

ChatPhoto|null

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.

Return Value

array|null

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.

Return Value

string|null

at line 153
string|null getBio()

Optional. Bio of the other party in a private chat. Returned only in getChat.

Return Value

string|null

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= links only in chats with the user. Returned only in getChat.

Return Value

bool|null

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.

Return Value

bool|null

at line 177
bool|null getJoinToSendMessages()

Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.

Return Value

bool|null

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.

Return Value

bool|null

at line 193
string|null getDescription()

Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.

Return Value

string|null

Optional. Primary invite link, for groups, supergroups and channel chats. Returned only in getChat.

Return Value

string|null

at line 209
Message|null getPinnedMessage()

Optional. The most recent pinned message (by sending date). Returned only in getChat.

Return Value

Message|null

at line 217
ChatPermissions|null getPermissions()

Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.

Return Value

ChatPermissions|null

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.

Return Value

int|null

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.

Return Value

int|null

at line 241
bool|null getHasProtectedContent()

Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.

Return Value

bool|null

at line 249
string|null getStickerSetName()

Optional. For supergroups, name of group sticker set. Returned only in getChat.

Return Value

string|null

at line 257
bool|null getCanSetStickerSet()

Optional. True, if the bot can change the group sticker set. Returned only in getChat.

Return Value

bool|null

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.

Return Value

int|null

at line 273
ChatLocation|null getLocation()

Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.

Return Value

ChatLocation|null