feat(Presence): add support for multiple activities (#3661)

* feat(Presence): add support for multiple activites

* typings(Presence): fix spelling of 'activities'

Co-Authored-By: Amish Shah <amishshah.2k@gmail.com>

Co-authored-by: Amish Shah <amishshah.2k@gmail.com>
This commit is contained in:
SpaceEEC
2020-01-13 21:28:29 +01:00
committed by Amish Shah
parent c23cc7a42e
commit ee0b7c155a
2 changed files with 4 additions and 5 deletions

View File

@@ -85,12 +85,11 @@ class Presence {
*/
this.status = data.status || this.status || 'offline';
const activity = data.game || data.activity;
/**
* The activity of this presence
* @type {?Activity}
* The activities of this presence
* @type {Activity[]}
*/
this.activity = activity ? new Activity(this, activity) : null;
this.activities = data.activities ? data.activities.map(activity => new Activity(this, activity)) : [];
/**
* The devices this presence is on