diff --git a/src/client/Client.js b/src/client/Client.js index cefd4ebb6..f3fd68a20 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -131,7 +131,7 @@ class Client extends BaseClient { * @private * @type {ClientPresence} */ - this.presence = new ClientPresence(this); + this.presence = new ClientPresence(this, options.presence); Object.defineProperty(this, 'token', { writable: true }); if (!browser && !this.token && 'DISCORD_TOKEN' in process.env) { diff --git a/src/structures/ClientPresence.js b/src/structures/ClientPresence.js index a39ba0063..6c0955627 100644 --- a/src/structures/ClientPresence.js +++ b/src/structures/ClientPresence.js @@ -11,7 +11,7 @@ class ClientPresence extends Presence { * @param {Object} [data={}] The data for the client presence */ constructor(client, data = {}) { - super(client, Object.assign(data, { status: 'online', user: { id: null } })); + super(client, Object.assign(data, { status: data.status || 'online', user: { id: null } })); } async set(presence) { diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 2ae6b8c0d..be4dca665 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -155,7 +155,7 @@ class Activity { * The type of the activity status * @type {ActivityType} */ - this.type = ActivityTypes[data.type]; + this.type = ActivityTypes[data.type] || ActivityTypes[ActivityTypes.indexOf(data.type)]; /** * If the activity is being streamed, a link to the stream