PHP Класс TelegramBot\Api\BotApi

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$codes array HTTP codes

Защищенные свойства (Protected)

Свойство Тип Описание
$curl CURL object
$returnArray boolean Check whether return associative array
$token string Bot token
$trackedEvents array list of event ids
$tracker TelegramBot\Api\Botan Botan tracker

Открытые методы

Метод Описание
__construct ( string $token, string | null $trackerToken = null ) Constructor
__destruct ( ) Close curl
answerCallbackQuery ( $callbackQueryId, null $text = null, boolean $showAlert = false ) : boolean Use this method to send answers to callback queries sent from inline keyboards.
answerInlineQuery ( string $inlineQueryId, AbstractInlineQueryResult[] $results, integer $cacheTime = 300, boolean $isPersonal = false, string $nextOffset = '' ) : mixed Use this method to send answers to an inline query. On success, True is returned.
call ( string $method, array $data = null ) : mixed Call method
curlValidate ( resource $curl ) Response validation
downloadFile ( $fileId ) : string Get file contents via cURL
editMessageCaption ( integer | string $chatId, integer $messageId, string | null $caption = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null ) : Message Use this method to edit text messages sent by the bot or via the bot
editMessageReplyMarkup ( integer | string $chatId, integer $messageId, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null ) : Message Use this method to edit only the reply markup of messages sent by the bot or via the bot
editMessageText ( integer | string $chatId, integer $messageId, string $text, string | null $parseMode = null, boolean $disablePreview = false, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null ) : Message Use this method to edit text messages sent by the bot or via the bot
forwardMessage ( integer | string $chatId, integer $fromChatId, integer $messageId, boolean $disableNotification = false ) : Message Use this method to forward messages of any kind. On success, the sent Message is returned.
getFile ( $fileId ) : TelegramBot\Api\Types\File Use this method to get basic info about a file and prepare it for downloading.
getFileUrl ( ) : string
getMe ( ) : User A simple method for testing your bot's auth token.Requires no parameters.
getUpdates ( integer $offset, integer $limit = 100, integer $timeout ) : TelegramBot\Api\Types\Update[] Use this method to receive incoming updates using long polling.
getUrl ( ) : string
getUserProfilePhotos ( integer $userId, integer $offset, integer $limit = 100 ) : TelegramBot\Api\Types\UserProfilePhotos Use this method to get a list of profile pictures for a user.
jsonValidate ( string $jsonString, boolean $asArray ) : object | array JSON validation
kickChatMember ( integer | string $chatId, integer $userId ) : boolean Use this method to kick a user from a group or a supergroup.
sendAudio ( integer | string $chatId, CURLFile | string $audio, integer | null $duration = null, string | null $performer = null, string | null $title = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message Use this method to send audio files, if you want Telegram clients to display them in the music player.
sendChatAction ( integer $chatId, string $action ) : boolean Use this method when you need to tell the user that something is happening on the bot's side.
sendContact ( integer | string $chatId, string $phoneNumber, string $firstName, string $lastName = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message Use this method to send phone contacts
sendDocument ( integer | string $chatId, CURLFile | string $document, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message Use this method to send general files. On success, the sent Message is returned.
sendLocation ( integer $chatId, float $latitude, float $longitude, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message Use this method to send point on the map. On success, the sent Message is returned.
sendMessage ( integer | string $chatId, string $text, string | null $parseMode = null, boolean $disablePreview = false, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message Use this method to send text messages. On success, the sent \TelegramBot\Api\Types\Message is returned.
sendPhoto ( integer | string $chatId, CURLFile | string $photo, string | null $caption = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message Use this method to send photos. On success, the sent Message is returned.
sendSticker ( integer | string $chatId, CURLFile | string $sticker, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message Use this method to send .webp stickers. On success, the sent Message is returned.
sendVenue ( integer | string $chatId, float $latitude, float $longitude, string $title, string $address, string | null $foursquareId = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message Use this method to send information about a venue. On success, the sent Message is returned.
sendVideo ( integer | string $chatId, CURLFile | string $video, integer | null $duration = null, string | null $caption = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message Use this method to send video files, Telegram clients support mp4 videos (other formats may be sent as Document).
sendVoice ( integer | string $chatId, CURLFile | string $voice, integer | null $duration = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.
setModeObject ( boolean $mode = true ) Set return array
setWebhook ( string $url = '', CURLFile | string $certificate = null ) : string Use this method to specify a url and receive incoming updates via an outgoing webhook.
track ( Message $message, string $eventName = 'Message' ) Wrapper for tracker
trackUpdate ( TelegramBot\Api\Types\Update $update, string $eventName = 'Message' )
unbanChatMember ( integer | string $chatId, integer $userId ) : boolean Use this method to unban a previously kicked user in a supergroup.

Защищенные методы

Метод Описание
executeCurl ( array $options ) : string curl_exec wrapper for response validation

Описание методов

__construct() публичный Метод

Constructor
public __construct ( string $token, string | null $trackerToken = null )
$token string Telegram Bot API token
$trackerToken string | null Yandex AppMetrica application api_key

__destruct() публичный Метод

Close curl
public __destruct ( )

answerCallbackQuery() публичный Метод

The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
public answerCallbackQuery ( $callbackQueryId, null $text = null, boolean $showAlert = false ) : boolean
$callbackQueryId
$text null
$showAlert boolean
Результат boolean

answerInlineQuery() публичный Метод

No more than 50 results per query are allowed.
public answerInlineQuery ( string $inlineQueryId, AbstractInlineQueryResult[] $results, integer $cacheTime = 300, boolean $isPersonal = false, string $nextOffset = '' ) : mixed
$inlineQueryId string
$results TelegramBot\Api\Types\Inline\QueryResult\AbstractInlineQueryResult[]
$cacheTime integer
$isPersonal boolean
$nextOffset string
Результат mixed

call() публичный Метод

Call method
public call ( string $method, array $data = null ) : mixed
$method string
$data array
Результат mixed

curlValidate() публичный статический Метод

Response validation
public static curlValidate ( resource $curl )
$curl resource

downloadFile() публичный Метод

Get file contents via cURL
public downloadFile ( $fileId ) : string
$fileId
Результат string

editMessageCaption() публичный Метод

Use this method to edit text messages sent by the bot or via the bot
public editMessageCaption ( integer | string $chatId, integer $messageId, string | null $caption = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null ) : Message
$chatId integer | string
$messageId integer
$caption string | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
Результат TelegramBot\Api\Types\Message

editMessageReplyMarkup() публичный Метод

Use this method to edit only the reply markup of messages sent by the bot or via the bot
public editMessageReplyMarkup ( integer | string $chatId, integer $messageId, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null ) : Message
$chatId integer | string
$messageId integer
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
Результат TelegramBot\Api\Types\Message

editMessageText() публичный Метод

Use this method to edit text messages sent by the bot or via the bot
public editMessageText ( integer | string $chatId, integer $messageId, string $text, string | null $parseMode = null, boolean $disablePreview = false, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null ) : Message
$chatId integer | string
$messageId integer
$text string
$parseMode string | null
$disablePreview boolean
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
Результат TelegramBot\Api\Types\Message

executeCurl() защищенный Метод

curl_exec wrapper for response validation
protected executeCurl ( array $options ) : string
$options array
Результат string

forwardMessage() публичный Метод

Use this method to forward messages of any kind. On success, the sent Message is returned.
public forwardMessage ( integer | string $chatId, integer $fromChatId, integer $messageId, boolean $disableNotification = false ) : Message
$chatId integer | string chat_id or @channel_name
$fromChatId integer
$messageId integer
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

getFile() публичный Метод

For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot/, where is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again.
public getFile ( $fileId ) : TelegramBot\Api\Types\File
$fileId
Результат TelegramBot\Api\Types\File

getFileUrl() публичный Метод

public getFileUrl ( ) : string
Результат string

getMe() публичный Метод

Returns basic information about the bot in form of a User object.
public getMe ( ) : User
Результат TelegramBot\Api\Types\User

getUpdates() публичный Метод

An Array of Update objects is returned. Notes 1. This method will not work if an outgoing webhook is set up. 2. In order to avoid getting duplicate updates, recalculate offset after each server response.
public getUpdates ( integer $offset, integer $limit = 100, integer $timeout ) : TelegramBot\Api\Types\Update[]
$offset integer
$limit integer
$timeout integer
Результат TelegramBot\Api\Types\Update[]

getUrl() публичный Метод

public getUrl ( ) : string
Результат string

getUserProfilePhotos() публичный Метод

Use this method to get a list of profile pictures for a user.
public getUserProfilePhotos ( integer $userId, integer $offset, integer $limit = 100 ) : TelegramBot\Api\Types\UserProfilePhotos
$userId integer
$offset integer
$limit integer
Результат TelegramBot\Api\Types\UserProfilePhotos

jsonValidate() публичный статический Метод

JSON validation
public static jsonValidate ( string $jsonString, boolean $asArray ) : object | array
$jsonString string
$asArray boolean
Результат object | array

kickChatMember() публичный Метод

In the case of supergroups, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the group for this to work. Returns True on success.
public kickChatMember ( integer | string $chatId, integer $userId ) : boolean
$chatId integer | string Unique identifier for the target group or username of the target supergroup (in the format @supergroupusername)
$userId integer Unique identifier of the target user
Результат boolean

sendAudio() публичный Метод

Your audio must be in the .mp3 format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future. For backward compatibility, when the fields title and performer are both empty and the mime-type of the file to be sent is not audio/mpeg, the file will be sent as a playable voice message. For this to work, the audio must be in an .ogg file encoded with OPUS. This behavior will be phased out in the future. For sending voice messages, use the sendVoice method instead.
Устаревший: since 20th February. Removed backward compatibility from the method sendAudio. Voice messages now must be sent using the method sendVoice. There is no more need to specify a non-empty title or performer while sending the audio by file_id.
public sendAudio ( integer | string $chatId, CURLFile | string $audio, integer | null $duration = null, string | null $performer = null, string | null $title = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message
$chatId integer | string chat_id or @channel_name
$audio CURLFile | string
$duration integer | null
$performer string | null
$title string | null
$replyToMessageId integer | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

sendChatAction() публичный Метод

The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive. Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for location data.
public sendChatAction ( integer $chatId, string $action ) : boolean
$chatId integer
$action string
Результат boolean

sendContact() публичный Метод

Use this method to send phone contacts
public sendContact ( integer | string $chatId, string $phoneNumber, string $firstName, string $lastName = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message
$chatId integer | string chat_id or @channel_name
$phoneNumber string
$firstName string
$lastName string
$replyToMessageId integer | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

sendDocument() публичный Метод

Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future.
public sendDocument ( integer | string $chatId, CURLFile | string $document, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message
$chatId integer | string chat_id or @channel_name
$document CURLFile | string
$replyToMessageId integer | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

sendLocation() публичный Метод

Use this method to send point on the map. On success, the sent Message is returned.
public sendLocation ( integer $chatId, float $latitude, float $longitude, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message
$chatId integer
$latitude float
$longitude float
$replyToMessageId integer | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

sendMessage() публичный Метод

Use this method to send text messages. On success, the sent \TelegramBot\Api\Types\Message is returned.
public sendMessage ( integer | string $chatId, string $text, string | null $parseMode = null, boolean $disablePreview = false, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message
$chatId integer | string
$text string
$parseMode string | null
$disablePreview boolean
$replyToMessageId integer | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

sendPhoto() публичный Метод

Use this method to send photos. On success, the sent Message is returned.
public sendPhoto ( integer | string $chatId, CURLFile | string $photo, string | null $caption = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message
$chatId integer | string chat_id or @channel_name
$photo CURLFile | string
$caption string | null
$replyToMessageId integer | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

sendSticker() публичный Метод

Use this method to send .webp stickers. On success, the sent Message is returned.
public sendSticker ( integer | string $chatId, CURLFile | string $sticker, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message
$chatId integer | string chat_id or @channel_name
$sticker CURLFile | string
$replyToMessageId integer | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

sendVenue() публичный Метод

Use this method to send information about a venue. On success, the sent Message is returned.
public sendVenue ( integer | string $chatId, float $latitude, float $longitude, string $title, string $address, string | null $foursquareId = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message
$chatId integer | string chat_id or @channel_name
$latitude float
$longitude float
$title string
$address string
$foursquareId string | null
$replyToMessageId integer | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

sendVideo() публичный Метод

On success, the sent Message is returned.
public sendVideo ( integer | string $chatId, CURLFile | string $video, integer | null $duration = null, string | null $caption = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message
$chatId integer | string chat_id or @channel_name
$video CURLFile | string
$duration integer | null
$caption string | null
$replyToMessageId integer | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

sendVoice() публичный Метод

For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
public sendVoice ( integer | string $chatId, CURLFile | string $voice, integer | null $duration = null, integer | null $replyToMessageId = null, TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null $replyMarkup = null, boolean $disableNotification = false ) : Message
$chatId integer | string chat_id or @channel_name
$voice CURLFile | string
$duration integer | null
$replyToMessageId integer | null
$replyMarkup TelegramBot\Api\Types\ReplyKeyboardMarkup | TelegramBot\Api\Types\ReplyKeyboardHide | TelegramBot\Api\Types\ForceReply | null
$disableNotification boolean
Результат TelegramBot\Api\Types\Message

setModeObject() публичный Метод

Set return array
public setModeObject ( boolean $mode = true )
$mode boolean

setWebhook() публичный Метод

Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts.
public setWebhook ( string $url = '', CURLFile | string $certificate = null ) : string
$url string HTTPS url to send updates to. Use an empty string to remove webhook integration
$certificate CURLFile | string Upload your public key certificate so that the root certificate in use can be checked
Результат string

track() публичный Метод

Wrapper for tracker
public track ( Message $message, string $eventName = 'Message' )
$message TelegramBot\Api\Types\Message
$eventName string

trackUpdate() публичный Метод

public trackUpdate ( TelegramBot\Api\Types\Update $update, string $eventName = 'Message' )
$update TelegramBot\Api\Types\Update
$eventName string

unbanChatMember() публичный Метод

The user will not return to the group automatically, but will be able to join via link, etc. The bot must be an administrator in the group for this to work. Returns True on success.
public unbanChatMember ( integer | string $chatId, integer $userId ) : boolean
$chatId integer | string Unique identifier for the target group or username of the target supergroup (in the format @supergroupusername)
$userId integer Unique identifier of the target user
Результат boolean

Описание свойств

$codes публичное статическое свойство

HTTP codes
public static array $codes
Результат array

$curl защищенное свойство

CURL object
protected $curl

$returnArray защищенное свойство

Check whether return associative array
protected bool $returnArray
Результат boolean

$token защищенное свойство

Bot token
protected string $token
Результат string

$trackedEvents защищенное свойство

list of event ids
protected array $trackedEvents
Результат array

$tracker защищенное свойство

Botan tracker
protected Botan,TelegramBot\Api $tracker
Результат TelegramBot\Api\Botan