mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Fix __hash__ for Invite objects.
This commit is contained in:
parent
4db76c6c6b
commit
dcde896e14
@ -121,6 +121,9 @@ class Invite(Hashable):
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<Invite code={0.code!r}>'.format(self)
|
return '<Invite code={0.code!r}>'.format(self)
|
||||||
|
|
||||||
|
def __hash__(self):
|
||||||
|
return hash(self.code)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def id(self):
|
def id(self):
|
||||||
"""Returns the proper code portion of the invite."""
|
"""Returns the proper code portion of the invite."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user