Add Profile.system and Profile.team_user to query newer flags
This commit is contained in:
		@@ -396,6 +396,8 @@ class UserFlags(Enum):
 | 
				
			|||||||
    hypesquad_brilliance = 128
 | 
					    hypesquad_brilliance = 128
 | 
				
			||||||
    hypesquad_balance = 256
 | 
					    hypesquad_balance = 256
 | 
				
			||||||
    early_supporter = 512
 | 
					    early_supporter = 512
 | 
				
			||||||
 | 
					    team_user = 1024
 | 
				
			||||||
 | 
					    system = 4096
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ActivityType(Enum):
 | 
					class ActivityType(Enum):
 | 
				
			||||||
    unknown = -1
 | 
					    unknown = -1
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -71,6 +71,14 @@ class Profile(namedtuple('Profile', 'flags user mutual_guilds connected_accounts
 | 
				
			|||||||
        flags = (UserFlags.hypesquad_bravery, UserFlags.hypesquad_brilliance, UserFlags.hypesquad_balance)
 | 
					        flags = (UserFlags.hypesquad_bravery, UserFlags.hypesquad_brilliance, UserFlags.hypesquad_balance)
 | 
				
			||||||
        return [house for house, flag in zip(HypeSquadHouse, flags) if self._has_flag(flag)]
 | 
					        return [house for house, flag in zip(HypeSquadHouse, flags) if self._has_flag(flag)]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @property
 | 
				
			||||||
 | 
					    def team_user(self):
 | 
				
			||||||
 | 
					        return self._has_flag(UserFlags.team_user)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @property
 | 
				
			||||||
 | 
					    def system(self):
 | 
				
			||||||
 | 
					        return self._has_flag(UserFlags.system)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
_BaseUser = discord.abc.User
 | 
					_BaseUser = discord.abc.User
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class BaseUser(_BaseUser):
 | 
					class BaseUser(_BaseUser):
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										12
									
								
								docs/api.rst
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								docs/api.rst
									
									
									
									
									
								
							@@ -709,6 +709,12 @@ Profile
 | 
				
			|||||||
    .. attribute:: hypesquad_houses
 | 
					    .. attribute:: hypesquad_houses
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        A list of :class:`HypeSquadHouse` that the user is in.
 | 
					        A list of :class:`HypeSquadHouse` that the user is in.
 | 
				
			||||||
 | 
					    .. attribute:: team_user
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        A boolean indicating if the user is in part of a team.
 | 
				
			||||||
 | 
					    .. attribute:: system
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        A boolean indicating if the user is officially part of the Discord urgent message system.
 | 
				
			||||||
    .. attribute:: mutual_guilds
 | 
					    .. attribute:: mutual_guilds
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        A list of :class:`Guild` that the :class:`ClientUser` shares with this
 | 
					        A list of :class:`Guild` that the :class:`ClientUser` shares with this
 | 
				
			||||||
@@ -849,10 +855,10 @@ of :class:`enum.Enum`.
 | 
				
			|||||||
.. class:: VoiceRegion
 | 
					.. class:: VoiceRegion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Specifies the region a voice server belongs to.
 | 
					    Specifies the region a voice server belongs to.
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    .. versionchanged:: 1.2
 | 
					    .. versionchanged:: 1.2
 | 
				
			||||||
        The ``india`` region was added.
 | 
					        The ``india`` region was added.
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    .. versionchanged:: 1.3
 | 
					    .. versionchanged:: 1.3
 | 
				
			||||||
        The ``europe`` region was added.
 | 
					        The ``europe`` region was added.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -869,7 +875,7 @@ of :class:`enum.Enum`.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        The EU West region.
 | 
					        The EU West region.
 | 
				
			||||||
    .. attribute:: europe
 | 
					    .. attribute:: europe
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
        The Europe region.
 | 
					        The Europe region.
 | 
				
			||||||
    .. attribute:: frankfurt
 | 
					    .. attribute:: frankfurt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user