Members now have status info.
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user