|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* This file is part of the TelegramBot package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) Avtandil Kikabidze aka LONGMAN <[email protected]> |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace PhpTelegramBot\Core\Entities; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Class ChatMember |
|
16
|
|
|
* |
|
17
|
|
|
* @link https://core.telegram.org/bots/api#chatmember |
|
18
|
|
|
* |
|
19
|
|
|
* @method User getUser() Information about the user |
|
20
|
|
|
* @method string getStatus() The member's status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked” |
|
21
|
|
|
* @method string getCustomTitle() Optional. Owner and administrators only. Custom title for this user |
|
22
|
|
|
* @method int getUntilDate() Optional. Restricted and kicked only. Date when restrictions will be lifted for this user, unix time |
|
23
|
|
|
* @method bool getCanBeEdited() Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user |
|
24
|
|
|
* @method bool getCanPostMessages() Optional. Administrators only. True, if the administrator can post in the channel, channels only |
|
25
|
|
|
* @method bool getCanEditMessages() Optional. Administrators only. True, if the administrator can edit messages of other users, channels only |
|
26
|
|
|
* @method bool getCanDeleteMessages() Optional. Administrators only. True, if the administrator can delete messages of other users |
|
27
|
|
|
* @method bool getCanRestrictMembers() Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members |
|
28
|
|
|
* @method bool 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) |
|
29
|
|
|
* @method bool getCanChangeInfo() Optional. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings |
|
30
|
|
|
* @method bool getCanInviteUsers() Optional. Administrators and restricted only. True, if the user is allowed to invite new users to the chat |
|
31
|
|
|
* @method bool getCanPinMessages() Optional. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only |
|
32
|
|
|
* @method bool getIsMember() Optional. Restricted only. True, if the user is a member of the chat at the moment of the request |
|
33
|
|
|
* @method bool getCanSendMessages() Optional. Restricted only. True, if the user can send text messages, contacts, locations and venues |
|
34
|
|
|
* @method bool getCanSendMediaMessages() Optional. Restricted only. True, if the user can send audios, documents, photos, videos, video notes and voice notes, implies can_send_messages |
|
35
|
|
|
* @method bool getCanSendPolls() Optional. Restricted only. True, if the user is allowed to send polls |
|
36
|
|
|
* @method bool getCanSendOtherMessages() Optional. Restricted only. True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages |
|
37
|
|
|
* @method bool getCanAddWebPagePreviews() Optional. Restricted only. True, if user may add web page previews to his messages, implies can_send_media_messages |
|
38
|
|
|
*/ |
|
39
|
|
|
class ChatMember extends Entity |
|
40
|
|
|
{ |
|
41
|
|
|
/** |
|
42
|
|
|
* {@inheritdoc} |
|
43
|
|
|
*/ |
|
44
|
|
|
protected function subEntities() |
|
45
|
|
|
{ |
|
46
|
|
|
return [ |
|
47
|
|
|
'user' => User::class, |
|
48
|
|
|
]; |
|
49
|
|
|
} |
|
50
|
|
|
} |
|
51
|
|
|
|