mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user