@ -35,7 +35,7 @@ import discord.abc
from . import utils
from . import utils
from . utils import MISSING
from . utils import MISSING
from . user import BaseUser , User
from . user import BaseUser , User , _UserTag
from . activity import create_activity , ActivityTypes
from . activity import create_activity , ActivityTypes
from . permissions import Permissions
from . permissions import Permissions
from . enums import Status , try_enum
from . enums import Status , try_enum
@ -194,13 +194,11 @@ def flatten_user(cls):
return cls
return cls
_BaseUser = discord . abc . User
M = TypeVar ( ' M ' , bound = ' Member ' )
M = TypeVar ( ' M ' , bound = ' Member ' )
@flatten_user
@flatten_user
class Member ( discord . abc . Messageable , _Base User ) :
class Member ( discord . abc . Messageable , _UserTag ) :
""" Represents a Discord member to a :class:`Guild`.
""" Represents a Discord member to a :class:`Guild`.
This implements a lot of the functionality of : class : ` User ` .
This implements a lot of the functionality of : class : ` User ` .
@ -301,7 +299,7 @@ class Member(discord.abc.Messageable, _BaseUser):
)
)
def __eq__ ( self , other : Any ) - > bool :
def __eq__ ( self , other : Any ) - > bool :
return isinstance ( other , _Base User ) and other . id == self . id
return isinstance ( other , _UserTag ) and other . id == self . id
def __ne__ ( self , other : Any ) - > bool :
def __ne__ ( self , other : Any ) - > bool :
return not self . __eq__ ( other )
return not self . __eq__ ( other )