aboutsummaryrefslogtreecommitdiff
path: root/discord/server.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2015-08-27 07:41:29 -0400
committerRapptz <[email protected]>2015-08-27 07:41:29 -0400
commit3aa8cc93a7c8cf58a1b80e1618ebf8ad44f91839 (patch)
treec035943749dcace30ae0b5f4cc3b612745082d3f /discord/server.py
parentAdd MANIFEST file for pip. (diff)
downloaddiscord.py-3aa8cc93a7c8cf58a1b80e1618ebf8ad44f91839.tar.xz
discord.py-3aa8cc93a7c8cf58a1b80e1618ebf8ad44f91839.zip
Members now have status info.
Diffstat (limited to 'discord/server.py')
-rw-r--r--discord/server.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/discord/server.py b/discord/server.py
index a63a5b59..e2a395e9 100644
--- a/discord/server.py
+++ b/discord/server.py
@@ -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.