An Object-Oriented PHP library for Telegram Bots
This object represents a chat.
$id
: Unique identifier for this chat. This number 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.$type
: Type of chat, can be either “private”, “group”, “supergroup” or “channel”$title
: Optional. Title, for supergroups, channels and group chats$username
: Optional. Username, for private chats, supergroups and channels if available$first_name
: Optional. First name of the other party in a private chat$last_name
: Optional. Last name of the other party in a private chat$photo
: ChatPhoto
Optional. Chat photo. Returned only in getChat.$bio
: Optional. Bio of the other party in a private chat. Returned only in getChat.$description
: Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.$invite_link
: Optional. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat.$pinned_message
: Message
Optional. The most recent pinned message (by sending date). Returned only in getChat.$permissions
: ChatPermissions
Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.$slow_mode_delay
: Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in getChat.$sticker_set_name
: Optional. For supergroups, name of group sticker set. Returned only in getChat.$can_set_sticker_set
: Optional. True, if the bot can change the group sticker set. Returned only in getChat.$linked_chat_id
: 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.$location
: ChatLocation
Optional. For supergroups, the location to which the supergroup is connected. Returned only in getChat.Alias of sendMessage
A description of the method
$chat->sendMessage($text);
Alias of forwardMessage
A description of the method
$chat->forwardTo(...$args);
Alias of deleteMessage
A description of the method
$chat->deleteMessage($message_id);
Alias of sendChatAction
A description of the method
$chat->sendAction($action);
Alias of sendPhoto
A description of the method
$chat->sendPhoto($photo);
Alias of sendDocument
A description of the method
$chat->sendDocument($document);
Alias of sendVideo
A description of the method
$chat->sendVideo($video);
Alias of sendAnimation
A description of the method
$chat->sendAnimation($animation);
Alias of sendVoice
A description of the method
$chat->sendVoice($voice);
Alias of sendVideoNote
A description of the method
$chat->sendVideoNote($video_note);
Alias of sendMediaGroup
A description of the method
$chat->sendMediaGroup($media);
Alias of sendLocation
A description of the method
$chat->sendLocation($latitude);
Alias of editMessageLiveLocation
A description of the method
$chat->editMessageLiveLocation($message_id);
Alias of stopMessageLiveLocation
A description of the method
$chat->stopMessageLiveLocation($message_id);
Alias of sendVenue
A description of the method
$chat->sendVenue($latitude);
Alias of sendContact
A description of the method
$chat->sendContact($phone_number);
Alias of sendPoll
A description of the method
$chat->sendPoll($question);
Alias of sendDice
A description of the method
$chat->sendDice($emoji);
Alias of kickChatMember
A description of the method
$chat->kickMember($user_id);
Alias of unbanChatMember
A description of the method
$chat->unbanMember($user_id);
Alias of restrictChatMember
A description of the method
$chat->restrictMember($user_id);
Alias of promoteChatMember
A description of the method
$chat->promoteMember($user_id);
Alias of setChatAdministratorCustomTitle
A description of the method
$chat->setAdministratorCustomTitle($user_id);
Alias of setChatPermissions
A description of the method
$chat->setPermissions($permissions);
Alias of exportChatInviteLink
A description of the method
$chat->exportInviteLink(...$args);
Alias of setChatPhoto
A description of the method
$chat->setPhoto($photo);
Alias of deleteChatPhoto
A description of the method
$chat->deletePhoto(...$args);
Alias of setChatTitle
A description of the method
$chat->setTitle($title);
Alias of setChatDescription
A description of the method
$chat->setDescription($description);
Alias of pinChatMessage
A description of the method
$chat->pinMessage($message_id);
Alias of unpinChatMessage
A description of the method
$chat->unpinMessage(...$args);
Alias of leaveChat
A description of the method
$chat->leave(...$args);
Alias of getChat
A description of the method
$chat->get(...$args);
Alias of getChatAdministrators
A description of the method
$chat->getAdministrators(...$args);
Alias of getChatMembersCount
A description of the method
$chat->getMembersCount(...$args);
Alias of getChatMember
A description of the method
$chat->getMember($user_id);
Alias of setChatStickerSet
A description of the method
$chat->setStickerSet($sticker_set_name);
Alias of deleteChatStickerSet
A description of the method
$chat->deleteStickerSet(...$args);
Alias of editMessageText
A description of the method
$chat->editMessageText($message_id);
Alias of editMessageCaption
A description of the method
$chat->editMessageCaption($message_id);
Alias of editMessageMedia
A description of the method
$chat->editMessageMedia($message_id);
Alias of editMessageReplyMarkup
A description of the method
$chat->editMessageReplyMarkup($message_id);
Alias of stopPoll
A description of the method
$chat->stopPoll($message_id);
Alias of sendSticker
A description of the method
$chat->sendSticker($sticker);
Alias of sendInvoice
A description of the method
$chat->sendInvoice($title);
Alias of sendGame
A description of the method
$chat->sendGame($game_short_name);
Alias of setGameScore
A description of the method
$chat->setGameScore($message_id);
Alias of copyMessage
A description of the method
$chat->copyMessage($message_id);
Alias of unpinAllChatMessages
A description of the method
$chat->unpinAllMessages(...$args);