66from ...utils .utils import search_iterable
77from ..error import LibraryException
88from .channel import Channel
9- from .flags import Permissions
9+ from .flags import MemberFlags , Permissions
1010from .misc import AllowedMentions , File , IDMixin , Snowflake
1111from .role import Role
1212from .user import User
@@ -38,6 +38,7 @@ class Member(ClientSerializerMixin, IDMixin):
3838 :ivar datetime premium_since: The timestamp the member has been a server booster since.
3939 :ivar bool deaf: Whether the member is deafened.
4040 :ivar bool mute: Whether the member is muted.
41+ :ivar MemberFlags flags: The guild member flags. Default to 0.
4142 :ivar Optional[bool] pending: Whether the member is pending to pass membership screening.
4243 :ivar Optional[Permissions] permissions: Whether the member has permissions.
4344 :ivar Optional[str] communication_disabled_until: How long until they're unmuted, if any.
@@ -53,6 +54,7 @@ class Member(ClientSerializerMixin, IDMixin):
5354 )
5455 deaf : bool = field ()
5556 mute : bool = field ()
57+ flags : MemberFlags = field (converter = convert_int (MemberFlags ), repr = False )
5658 is_pending : Optional [bool ] = field (default = None , repr = False )
5759 pending : Optional [bool ] = field (default = None , repr = False )
5860 permissions : Optional [Permissions ] = field (
@@ -64,7 +66,6 @@ class Member(ClientSerializerMixin, IDMixin):
6466 hoisted_role : Optional [Any ] = field (
6567 default = None , repr = False
6668 ) # TODO: Investigate what this is for when documented by Discord.
67- flags : int = field (repr = False ) # TODO: Investigate what this is for when documented by Discord.
6869
6970 def __getattr__ (self , name ):
7071 # Forward any attributes the user has to make it easier for devs
0 commit comments