| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | namespace TelegramBot\Entities\ChatMember; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  | use TelegramBot\Entities\User; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  | use TelegramBot\Entity; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 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; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |  * channels only | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |  * @method bool   getCanEditMessages()      True, if the administrator can edit messages of other users and can pin messages; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |  * channels only | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |  * @method bool   getCanDeleteMessages()    True, if the administrator can delete messages of other users | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |  * @method bool   getCanManageVideoChats()  True, if the administrator can manage video chats | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |  * @method bool   getCanRestrictMembers()   True, if the administrator can restrict, ban or unban chat members | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |  * @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) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |  * @method bool   getCanChangeInfo()        True, if the user is allowed to change the chat title, photo and other settings | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |  * @method bool   getCanInviteUsers()       True, if the user is allowed to invite new users to the chat | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |  * @method bool   getCanPinMessages()       True, if the user is allowed to pin messages; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |  * groups and supergroups only | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 31 |  |  |  */ | 
            
                                                                        
                            
            
                                    
            
            
                | 32 |  |  | class ChatMemberAdministrator extends Entity implements ChatMember | 
            
                                                                        
                            
            
                                    
            
            
                | 33 |  |  | { | 
            
                                                                        
                            
            
                                    
            
            
                | 34 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 35 |  |  |     /** | 
            
                                                                        
                            
            
                                    
            
            
                | 36 |  |  |      * @inheritDoc | 
            
                                                                        
                            
            
                                    
            
            
                | 37 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |     protected function subEntities(): array | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |         return [ | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 41 |  |  |             'user' => User::class, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |  | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 45 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 46 |  |  |  |