Most data classes now support hashing.

This commit is contained in:
Rapptz
2015-12-17 00:30:08 -05:00
parent 613214f197
commit 51d91c2a82
8 changed files with 38 additions and 9 deletions

View File

@@ -29,9 +29,9 @@ from .role import Role
from .member import Member
from .channel import Channel
from .enums import ServerRegion, Status
from .mixins import EqualityComparable
from .mixins import Hashable
class Server(EqualityComparable):
class Server(Hashable):
"""Represents a Discord server.
Supported Operations:
@@ -43,6 +43,8 @@ class Server(EqualityComparable):
+-----------+--------------------------------------+
| x != y | Checks if two servers are not equal. |
+-----------+--------------------------------------+
| hash(x) | Returns the server's hash. |
+-----------+--------------------------------------+
| str(x) | Returns the server's name. |
+-----------+--------------------------------------+