| 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 Longman\TelegramBot\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 bool   getIsAnonymous()           Optional. Owner and administrators only. True, if the user's presence in the chat is hidden | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |  * @method bool   getCanBeEdited()           Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |  * @method bool   getCanManageChat()         Optional. Administrators only. 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 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |  * @method bool   getCanPostMessages()       Optional. Administrators only. True, if the administrator can post in the channel, channels only | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |  * @method bool   getCanEditMessages()       Optional. Administrators only. True, if the administrator can edit messages of other users, channels only | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |  * @method bool   getCanDeleteMessages()     Optional. Administrators only. True, if the administrator can delete messages of other users | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |  * @method bool   getCanManageVoiceChats()   Optional. Administrators only. True, if the administrator can manage voice chats | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |  * @method bool   getCanRestrictMembers()    Optional. Administrators only. True, if the administrator can restrict, ban or unban chat members | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |  * @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) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |  * @method bool   getCanChangeInfo()         Optional. Administrators and restricted only. True, if the user is allowed to change the chat title, photo and other settings | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |  * @method bool   getCanInviteUsers()        Optional. Administrators and restricted only. True, if the user is allowed to invite new users to the chat | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |  * @method bool   getCanPinMessages()        Optional. Administrators and restricted only. True, if the user is allowed to pin messages; groups and supergroups only | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |  * @method bool   getIsMember()              Optional. Restricted only. True, if the user is a member of the chat at the moment of the request | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |  * @method bool   getCanSendMessages()       Optional. Restricted only. True, if the user can send text messages, contacts, locations and venues | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |  * @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 | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |  * @method bool   getCanSendPolls()          Optional. Restricted only. True, if the user is allowed to send polls | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |  * @method bool   getCanSendOtherMessages()  Optional. Restricted only. True, if the user can send animations, games, stickers and use inline bots, implies can_send_media_messages | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |  * @method bool   getCanAddWebPagePreviews() Optional. Restricted only. True, if user may add web page previews to his messages, implies can_send_media_messages | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |  * @method int    getUntilDate()             Optional. Restricted and kicked only. Date when restrictions will be lifted for this user, unix time | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 41 |  |  |  */ | 
            
                                                                        
                            
            
                                    
            
            
                | 42 |  |  | class ChatMember extends Entity | 
            
                                                                        
                            
            
                                    
            
            
                | 43 |  |  | { | 
            
                                                                        
                            
            
                                    
            
            
                | 44 |  |  |     /** | 
            
                                                                        
                            
            
                                    
            
            
                | 45 |  |  |      * {@inheritdoc} | 
            
                                                                        
                            
            
                                    
            
            
                | 46 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |     protected function subEntities(): array | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |         return [ | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 50 |  |  |             'user' => User::class, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |         ]; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 53 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 54 |  |  |  |