Add on_status event.

This commit is contained in:
Rapptz
2015-08-23 02:16:05 -04:00
parent 59808727ef
commit 6445641f9e
2 changed files with 30 additions and 2 deletions

View File

@ -50,6 +50,17 @@ This page outlines the different types of events listened to by :meth:`Client.ev
:param before: A :class:`Message` of the previous version of the message.
:param after: A :class:`Message` of the current version of the message.
.. function:: on_status(server, user, status, game_id):
Called whenever a user changes their status or game playing status.
The status is usually either "idle", "online" or "offline".
:param server: The :class:`Server` the user belongs to.
:param user: The :class:`User` whose status changed.
:param status: The new status of the user.
:param game_id: The game ID that the user is playing. Can be None.
Data Classes
--------------