TelegramPHP Documentation

ChatMemberAdministrator extends ChatMember
in package

This file is generated from spec/openapi.json (Bot API 10.3) by tools/generate.php.

Do not edit it by hand - run composer spec:build instead.

Represents a chat member that has some additional privileges.

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

v10.3

Table of Contents

Constants

DISCRIMINATOR  : mixed = null
The attribute whose value names the concrete subtype.
SUBTYPES  : array<string, Part>>|array<int, Part>> = []
The concrete classes a union parent may resolve to - keyed by discriminator value when there is one, a plain list otherwise. Empty on ordinary parts.

Properties

$can_be_edited  : bool
$can_change_info  : bool
$can_delete_messages  : bool
$can_delete_stories  : bool
$can_edit_messages  : bool|null
$can_edit_stories  : bool
$can_invite_users  : bool
$can_manage_chat  : bool
$can_manage_direct_messages  : bool|null
$can_manage_tags  : bool|null
$can_manage_topics  : bool|null
$can_manage_video_chats  : bool
$can_pin_messages  : bool|null
$can_post_messages  : bool|null
$can_post_stories  : bool
$can_promote_members  : bool
$can_restrict_members  : bool
$can_send_welcome_messages  : bool
$custom_title  : string|null
$is_anonymous  : bool
$status  : string
$user  : User
$casts  : array<string, string>
$dates  : array<int, string>
Attribute names holding Unix timestamps, read back as {@see CarbonImmutable}.
$fillable  : array<int, string>
$telegram  : Telegram

Methods

__construct()  : mixed
__debugInfo()  : array<string, mixed>
__get()  : mixed
__isset()  : bool
__set()  : void
__toString()  : string
attributeExists()  : bool
fill()  : void
getAttribute()  : mixed
getCasts()  : array<string, string>
getFillable()  : array<int, string>
getRawAttributes()  : array<string, mixed>
getTelegram()  : Telegram
jsonSerialize()  : array<string, mixed>
The payload this part would be sent back to Telegram as - nested parts and collections flattened, timestamps left as the integers they arrived as.
offsetExists()  : bool
offsetGet()  : mixed
offsetSet()  : void
offsetUnset()  : void
resolveSubtype()  : Part>
The concrete class an incoming payload belongs to, for a union parent.
setAttribute()  : void
factory()  : Factory
Builds another part from the same client - for nested objects.
getRawAttribute()  : mixed
Reads straight from the attribute bag, skipping the `get{Key}Attribute` hook.
setRawAttribute()  : void
Writes straight to the attribute bag, skipping the `set{Key}Attribute` hook and any cast. For use *inside* a mutator, which would otherwise have no way to store its shaped value without recursing through {@see setAttribute()}.

Constants

DISCRIMINATOR

The attribute whose value names the concrete subtype.

public mixed DISCRIMINATOR = null

SUBTYPES

The concrete classes a union parent may resolve to - keyed by discriminator value when there is one, a plain list otherwise. Empty on ordinary parts.

public array<string, Part>>|array<int, Part>> SUBTYPES = []

Properties

$can_be_edited

public bool $can_be_edited

True, if the bot is allowed to edit administrator privileges of that user

$can_change_info

public bool $can_change_info

True, if the user is allowed to change the chat title, photo and other settings

$can_delete_messages

public bool $can_delete_messages

True, if the administrator can delete messages of other users

$can_delete_stories

public bool $can_delete_stories

True, if the administrator can delete stories posted by other users

$can_edit_messages

public bool|null $can_edit_messages

Optional. True, if the administrator can edit messages of other users and can pin messages; for channels only

$can_edit_stories

public bool $can_edit_stories

True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive

$can_invite_users

public bool $can_invite_users

True, if the user is allowed to invite new users to the chat

$can_manage_chat

public bool $can_manage_chat

True, if the administrator can access the chat event log, get boost list, see hidden supergroup and channel members, report spam messages, ignore slow mode, and send messages to the chat without paying Telegram Stars. Implied by any other administrator privilege.

$can_manage_direct_messages

public bool|null $can_manage_direct_messages

Optional. True, if the administrator can manage direct messages of the channel and decline suggested posts; for channels only

$can_manage_tags

public bool|null $can_manage_tags

Optional. True, if the administrator can edit the tags of regular members; for groups and supergroups only

$can_manage_topics

public bool|null $can_manage_topics

Optional. True, if the user is allowed to create, rename, close, and reopen forum topics; for supergroups only

$can_manage_video_chats

public bool $can_manage_video_chats

True, if the administrator can manage video chats

$can_pin_messages

public bool|null $can_pin_messages

Optional. True, if the user is allowed to pin messages; for groups and supergroups only

$can_post_messages

public bool|null $can_post_messages

Optional. True, if the administrator can post messages in the channel, approve suggested posts, or access channel statistics; for channels only

$can_post_stories

public bool $can_post_stories

True, if the administrator can post stories to the chat

$can_promote_members

public bool $can_promote_members

True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that they have promoted, directly or indirectly (promoted by administrators that were appointed by the user)

$can_restrict_members

public bool $can_restrict_members

True, if the administrator can restrict, ban or unban chat members, or access supergroup statistics

$can_send_welcome_messages

public bool $can_send_welcome_messages

True, if the administrator can manage chat welcome messages or directly send them in the case of bots

$dates

Attribute names holding Unix timestamps, read back as {@see CarbonImmutable}.

protected array<int, string> $dates = []

$fillable

protected array<int, string> $fillable = ['status', 'user', 'can_be_edited', 'is_anonymous', 'can_manage_chat', 'can_delete_messages', 'can_manage_video_chats', 'can_restrict_members', 'can_promote_members', 'can_change_info', 'can_invite_users', 'can_post_stories', 'can_edit_stories', 'can_delete_stories', 'can_post_messages', 'can_edit_messages', 'can_pin_messages', 'can_manage_topics', 'can_manage_direct_messages', 'can_manage_tags', 'can_send_welcome_messages', 'custom_title']

Methods

__construct()

public __construct(Telegram $telegram[, array<string, mixed>|object $attributes = [] ]) : mixed
Parameters
$telegram : Telegram
$attributes : array<string, mixed>|object = []

__debugInfo()

public __debugInfo() : array<string, mixed>
Return values
array<string, mixed>

__get()

public __get(string $name) : mixed
Parameters
$name : string

__isset()

public __isset(string $name) : bool
Parameters
$name : string
Return values
bool

__set()

public __set(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed

__toString()

public __toString() : string
Return values
string

attributeExists()

public attributeExists(string $key) : bool
Parameters
$key : string
Return values
bool

fill()

public fill(array<string, mixed> $attributes) : void
Parameters
$attributes : array<string, mixed>

getAttribute()

public getAttribute(string $key) : mixed
Parameters
$key : string

getCasts()

public getCasts() : array<string, string>
Return values
array<string, string>

getFillable()

public getFillable() : array<int, string>
Return values
array<int, string>

getRawAttributes()

public getRawAttributes() : array<string, mixed>
Return values
array<string, mixed>

jsonSerialize()

The payload this part would be sent back to Telegram as - nested parts and collections flattened, timestamps left as the integers they arrived as.

public jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>

offsetExists()

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed

offsetSet()

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed

offsetUnset()

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

resolveSubtype()

The concrete class an incoming payload belongs to, for a union parent.

public static resolveSubtype(array<string, mixed> $attributes) : Part>

Tagged unions resolve on their discriminator. The handful Telegram leaves untagged (InputMessageContent, and the rest), and any payload whose tag this build does not recognise - a member added to the Bot API since it was generated - resolve instead to the subtype whose attributes the payload matches most closely.

Parameters
$attributes : array<string, mixed>
Tags
throws
PartException

When the part is not a union, or nothing matches.

Return values
Part>

setAttribute()

public setAttribute(string $key, mixed $value) : void
Parameters
$key : string
$value : mixed

factory()

Builds another part from the same client - for nested objects.

protected factory() : Factory
Return values
Factory

getRawAttribute()

Reads straight from the attribute bag, skipping the `get{Key}Attribute` hook.

protected getRawAttribute(string $key) : mixed
Parameters
$key : string

setRawAttribute()

Writes straight to the attribute bag, skipping the `set{Key}Attribute` hook and any cast. For use *inside* a mutator, which would otherwise have no way to store its shaped value without recursing through {@see setAttribute()}.

protected setRawAttribute(string $key, mixed $value) : void
Parameters
$key : string
$value : mixed
On this page

Search results