Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added two things,
Member.clientStatus
andMember.activities
. Also adds the"dnd"
status toMember#status
docs, fixing #456.Member.clientStatus
The raw packet data includes
packet.d.client_status
, which is an object whose property names are the clients that user is not offline on, and whose property values are their respective statuses on those platforms.Examples
{ mobile: 'dnd', desktop: 'dnd' }
User is offline on the web client, and Do Not Disturb on mobile and desktop
{ desktop: 'idle' }
User is offline on mobile and web clients, and idle on the desktop client
{}
User is offline on all clients.
Implementation
Member.clientStatus
defaults all three clients to offline, then uses the data in the packet to overwrite the property values.Member.activities
The raw packet data also includes
packet.d.activities
, which is an array of activity objects. Since the included properties of each object is very variable, no formatting has been done for now, and no documentation of activity properties has been made. Figured we should probably discuss this to see what works best for the lib and the docs.