diff options
| author | Rapptz <[email protected]> | 2015-08-23 02:16:05 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-08-23 02:16:05 -0400 |
| commit | 6445641f9e5bedd885e619316d8fb3000c0d54b0 (patch) | |
| tree | 87cf9fe11461ae199b87cdbbec47ba5a5e18fad8 /docs/api.rst | |
| parent | Fix documentation example issue. (diff) | |
| download | discord.py-6445641f9e5bedd885e619316d8fb3000c0d54b0.tar.xz discord.py-6445641f9e5bedd885e619316d8fb3000c0d54b0.zip | |
Add on_status event.
Diffstat (limited to 'docs/api.rst')
| -rw-r--r-- | docs/api.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/api.rst b/docs/api.rst index 937eff70..173964f2 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -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 -------------- |