1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Longman\TelegramBot\Entities\ChatMember; |
4
|
|
|
|
5
|
|
|
use Longman\TelegramBot\Entities\Entity; |
6
|
|
|
use Longman\TelegramBot\Entities\User; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* Class ChatMemberAdministrator |
10
|
|
|
* |
11
|
|
|
* @link https://core.telegram.org/bots/api#chatmemberadministrator |
12
|
|
|
* |
13
|
|
|
* @method string getStatus() The member's status in the chat, always “administrator” |
14
|
|
|
* @method User getUser() Information about the user |
15
|
|
|
* @method bool getCanBeEdited() True, if the bot is allowed to edit administrator privileges of that user |
16
|
|
|
* @method string getCustomTitle() Custom title for this user |
17
|
|
|
* @method bool getIsAnonymous() True, if the user's presence in the chat is hidden |
18
|
|
|
* @method bool getCanManageChat() True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergroups and ignore slow mode. Implied by any other administrator privilege |
19
|
|
|
* @method bool getCanPostMessages() True, if the administrator can post in the channel; channels only |
20
|
|
|
* @method bool getCanEditMessages() True, if the administrator can edit messages of other users and can pin messages; channels only |
21
|
|
|
* @method bool getCanDeleteMessages() True, if the administrator can delete messages of other users |
22
|
|
|
* @method bool getCanManageVoiceChats() True, if the administrator can manage voice chats |
23
|
|
|
* @method bool getCanRestrictMembers() True, if the administrator can restrict, ban or unban chat members |
24
|
|
|
* @method bool getCanPromoteMembers() True, if the administrator can add new administrators with a subset of their own privileges or demote administrators that he has promoted, directly or indirectly (promoted by administrators that were appointed by the user) |
25
|
|
|
* @method bool getCanChangeInfo() True, if the user is allowed to change the chat title, photo and other settings |
26
|
|
|
* @method bool getCanInviteUsers() True, if the user is allowed to invite new users to the chat |
27
|
|
|
* @method bool getCanPinMessages() True, if the user is allowed to pin messages; groups and supergroups only |
28
|
|
|
*/ |
29
|
|
|
class ChatMemberAdministrator extends Entity implements ChatMember |
30
|
|
|
{ |
31
|
|
|
/** |
32
|
|
|
* @inheritDoc |
33
|
|
|
*/ |
34
|
|
|
protected function subEntities(): array |
35
|
|
|
{ |
36
|
|
|
return [ |
37
|
|
|
'user' => User::class, |
38
|
|
|
]; |
39
|
|
|
} |
40
|
|
|
} |
41
|
|
|
|