Documentation

ChatMember extends Entity
in package

Class ChatMember

Tags
link
https://core.telegram.org/bots/api#chatmember

Table of Contents

__call()  : mixed|null
Return the variable for the called getter or magically set properties dynamically.
__construct()  : mixed
Entity constructor.
__toString()  : string
Perform to string
escapeMarkdown()  : string
Escape markdown special characters
getBotUsername()  :
getCanAddWebPagePreviews()  :
getCanBeEdited()  :
getCanChangeInfo()  :
getCanDeleteMessages()  :
getCanEditMessages()  :
getCanInviteUsers()  :
getCanPinMessages()  :
getCanPostMessages()  :
getCanPromoteMembers()  :
getCanRestrictMembers()  :
getCanSendMediaMessages()  :
getCanSendMessages()  :
getCanSendOtherMessages()  :
getProperty()  : mixed
Get a property from the current Entity
getRawData()  :
getStatus()  :
getUntilDate()  :
getUser()  :
subEntities()  : array<string|int, mixed>
Get the list of the properties that are themselves Entities
toJson()  : string
Perform to json
tryMention()  : string|null
Try to mention the user
assignMemberVariables()  : mixed
Helper to set member variables
makePrettyObjectArray()  : array<string|int, mixed>
Return an array of nice objects from an array of object arrays
validate()  : mixed
Perform any special entity validation

Methods

__call()

Return the variable for the called getter or magically set properties dynamically.

public __call( $method,  $args) : mixed|null
Parameters
$method :
$args :
Return values
mixed|null

__construct()

Entity constructor.

public __construct(array<string|int, mixed> $data[, string $bot_username = '' ]) : mixed
Parameters
$data : array<string|int, mixed>
$bot_username : string = ''
Tags
todo

Get rid of the $bot_username, it shouldn't be here!

throws
TelegramException
Return values
mixed

__toString()

Perform to string

public __toString() : string
Return values
string

escapeMarkdown()

Escape markdown special characters

public escapeMarkdown(string $string) : string
Parameters
$string : string
Return values
string

getBotUsername()

public getBotUsername() :

Return the bot name passed to this entity

Return values

getCanAddWebPagePreviews()

public getCanAddWebPagePreviews() :

Optional. Restricted only. True, if user may add web page previews to his messages, implies can_send_media_messages

Return values

getCanBeEdited()

public getCanBeEdited() :

Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user

Return values

getCanChangeInfo()

public getCanChangeInfo() :

Optional. Administrators only. True, if the administrator can change the chat title, photo and other settings

Return values

getCanDeleteMessages()

public getCanDeleteMessages() :

Optional. Administrators only. True, if the administrator can delete messages of other users

Return values

getCanEditMessages()

public getCanEditMessages() :

Optional. Administrators only. True, if the administrator can edit messages of other users, channels only

Return values

getCanInviteUsers()

public getCanInviteUsers() :

Optional. Administrators only. True, if the administrator can invite new users to the chat

Return values

getCanPinMessages()

public getCanPinMessages() :

Optional. Administrators only. True, if the administrator can pin messages, supergroups only

Return values

getCanPostMessages()

public getCanPostMessages() :

Optional. Administrators only. True, if the administrator can post in the channel, channels only

Return values

getCanPromoteMembers()

public getCanPromoteMembers() :

Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user)

Return values

getCanRestrictMembers()

public getCanRestrictMembers() :

Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members

Return values

getCanSendMediaMessages()

public getCanSendMediaMessages() :

Optional. Restricted only. True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages

Return values

getCanSendMessages()

public getCanSendMessages() :

Optional. Restricted only. True, if the user can send text messages, contacts, locations and venues

Return values

getCanSendOtherMessages()

public getCanSendOtherMessages() :

Optional. Restricted only. True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages

Return values

getProperty()

Get a property from the current Entity

public getProperty(mixed $property[, mixed $default = null ]) : mixed
Parameters
$property : mixed
$default : mixed = null
Return values
mixed

getRawData()

public getRawData() :

Get the raw data passed to this entity

Return values

getStatus()

public getStatus() :

The member's status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked”

Return values

getUntilDate()

public getUntilDate() :

Optional. Restricted and kicked only. Date when restrictions will be lifted for this user, unix time

Return values

getUser()

public getUser() :

Information about the user

Return values

subEntities()

Get the list of the properties that are themselves Entities

public subEntities() : array<string|int, mixed>
Return values
array<string|int, mixed>

toJson()

Perform to json

public toJson() : string
Return values
string

tryMention()

Try to mention the user

public tryMention([bool $escape_markdown = false ]) : string|null

Mention the user with the username otherwise print first and last name if the $escape_markdown argument is true special characters are escaped from the output

Parameters
$escape_markdown : bool = false
Return values
string|null

assignMemberVariables()

Helper to set member variables

protected assignMemberVariables(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>
Return values
mixed

makePrettyObjectArray()

Return an array of nice objects from an array of object arrays

protected makePrettyObjectArray(string $class, string $property) : array<string|int, mixed>

This method is used to generate pretty object arrays mainly for PhotoSize and Entities object arrays.

Parameters
$class : string
$property : string
Return values
array<string|int, mixed>

validate()

Perform any special entity validation

protected validate() : mixed
Tags
throws
TelegramException
Return values
mixed

Search results