File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ class Member(ClientSerializerMixin):
35
35
:ivar Optional[str] communication_disabled_until?: How long until they're unmuted, if any.
36
36
"""
37
37
38
- user : Optional [User ] = field (converter = User , default = None , add_client = True )
39
- nick : Optional [str ] = field (default = None )
38
+ user : Optional [User ] = field (converter = User , default = None , add_client = True , repr = True )
39
+ nick : Optional [str ] = field (default = None , repr = True )
40
40
_avatar : Optional [str ] = field (default = None , discord_name = "avatar" )
41
41
roles : List [int ] = field ()
42
42
joined_at : datetime = field (converter = datetime .fromisoformat )
@@ -54,8 +54,8 @@ class Member(ClientSerializerMixin):
54
54
) # TODO: Investigate what this is for when documented by Discord.
55
55
flags : int = field () # TODO: Investigate what this is for when documented by Discord.
56
56
57
- def __repr__ (self ) -> str :
58
- return self .name
57
+ def __str__ (self ) -> str :
58
+ return self .name or ""
59
59
60
60
@property
61
61
def avatar (self ) -> Optional [str ]:
Original file line number Diff line number Diff line change @@ -30,11 +30,11 @@ class User(ClientSerializerMixin):
30
30
:ivar Optional[UserFlags] public_flags?: The user's public flags
31
31
"""
32
32
33
- id : Snowflake = field (converter = Snowflake )
34
- username : str = field ()
35
- discriminator : str = field ()
33
+ id : Snowflake = field (converter = Snowflake , repr = True )
34
+ username : str = field (repr = True )
35
+ discriminator : str = field (repr = True )
36
36
avatar : Optional [str ] = field (default = None )
37
- bot : Optional [bool ] = field (default = None )
37
+ bot : Optional [bool ] = field (default = None , repr = True )
38
38
system : Optional [bool ] = field (default = None )
39
39
mfa_enabled : Optional [bool ] = field (default = None )
40
40
banner : Optional [str ] = field (default = None )
@@ -48,7 +48,7 @@ class User(ClientSerializerMixin):
48
48
public_flags : Optional [UserFlags ] = field (converter = UserFlags , default = None )
49
49
bio : Optional [str ] = field (default = None )
50
50
51
- def __repr__ (self ) -> str :
51
+ def __str__ (self ) -> str :
52
52
return self .username
53
53
54
54
def has_public_flag (self , flag : Union [UserFlags , int ]) -> bool :
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class User(ClientSerializerMixin):
24
24
premium_type : Optional [int ]
25
25
public_flags : Optional [UserFlags ]
26
26
bio : Optional [str ]
27
- def __repr__ (self ) -> str : ...
27
+ def __str__ (self ) -> str : ...
28
28
def has_public_flag (self , flag : Union [UserFlags , int ]) -> bool : ...
29
29
@property
30
30
def mention (self ) -> str : ...
You can’t perform that action at this time.
0 commit comments