mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Most data classes now support hashing.
This commit is contained in:
1 parent
613214f197
commit
51d91c2a82
8 files changed
+38
-9
No files matched your search
+4
-2
@@ -26,9 +26,9 @@ DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from .user import User
|
||||
from .utils import parse_time
|
||||
from .mixins import EqualityComparable
|
||||
from .mixins import Hashable
|
||||
|
||||
class Invite(EqualityComparable):
|
||||
class Invite(Hashable):
|
||||
"""Represents a Discord :class:`Server` or :class:`Channel` invite.
|
||||
|
||||
Depending on the way this object was created, some of the attributes can
|
||||
@@ -43,6 +43,8 @@ class Invite(EqualityComparable):
|
||||
+-----------+--------------------------------------+
|
||||
| x != y | Checks if two invites are not equal. |
|
||||
+-----------+--------------------------------------+
|
||||
| hash(x) | Return the invite's hash. |
|
||||
+-----------+--------------------------------------+
|
||||
| str(x) | Returns the invite's URL. |
|
||||
+-----------+--------------------------------------+
|
||||
|
||||
|
||||
Reference in new issue
Block a user