Make discord.Object hashable.

This commit is contained in:
Rapptz 2017-08-09 18:39:32 -04:00
parent ecdd21212c
commit f554861e68

View File

@ -24,8 +24,9 @@ DEALINGS IN THE SOFTWARE.
"""
from . import utils
from .mixins import Hashable
class Object:
class Object(Hashable):
"""Represents a generic Discord object.
The purpose of this class is to allow you to create 'miniature'
@ -39,6 +40,20 @@ class Object:
receive this class rather than the actual data class. These cases are
extremely rare.
.. container:: operations
.. describe:: x == y
Checks if two objects are equal.
.. describe:: x != y
Checks if two objects are not equal.
.. describe:: hash(x)
Returns the object's hash.
Attributes
-----------
id : str