Update message.py #28
@ -451,6 +451,10 @@ class Message(Hashable):
|
||||
.. describe:: hash(x)
|
||||
|
||||
Returns the message's hash.
|
||||
|
||||
.. describe:: iter(x)
|
||||
|
||||
Returns an iterator of words of the message, separated by a space
|
||||
|
||||
Attributes
|
||||
-----------
|
||||
@ -606,6 +610,9 @@ class Message(Hashable):
|
||||
|
||||
def __int__(self):
|
||||
return self.id
|
||||
|
||||
def __iter__(self):
|
||||
yield from self.content.split()
|
||||
|
||||
def __repr__(self):
|
||||
return '<Message id={0.id} channel={0.channel!r} type={0.type!r} author={0.author!r} flags={0.flags!r}>'.format(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user