Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Member class updates #449

Merged
merged 5 commits into from
Feb 9, 2019
Merged

Member class updates #449

merged 5 commits into from
Feb 9, 2019

Conversation

Brayzure
Copy link
Contributor

@Brayzure Brayzure commented Jan 13, 2019

Added two things, Member.clientStatus and Member.activities. Also adds the "dnd" status to Member#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants