Members now have status info.

This commit is contained in:
Rapptz
2015-08-27 07:41:29 -04:00
parent fbb045cc1f
commit 3aa8cc93a7
2 changed files with 25 additions and 1 deletions

View File

@ -68,8 +68,14 @@ class Member(User):
An array of :class:`Role` that the member belongs to.
.. attribute:: joined_at
A datetime object that specifies the date and time that the member joined the server for
A datetime object that specifies the date and time in UTC that the member joined the server for
the first time.
,, attribute:: status
A string that denotes the user's status. Can be 'online', 'offline' or 'idle'.
.. attribute:: game_id
The game ID that the user is currently playing. Could be None if no game is being played.
"""
def __init__(self, deaf, joined_at, user, roles, mute):
@ -78,6 +84,8 @@ class Member(User):
self.mute = mute
self.joined_at = datetime.datetime(*map(int, re.split(r'[^\d]', joined_at.replace('+00:00', ''))))
self.roles = roles
self.status = 'offline'
self.game_id = None
class Server(object):
"""Represents a Discord server.