diff --git a/src/structures/GuildMember.js b/src/structures/GuildMember.js index 71472c002..408efedc8 100644 --- a/src/structures/GuildMember.js +++ b/src/structures/GuildMember.js @@ -3,6 +3,7 @@ const Role = require('./Role'); const EvaluatedPermissions = require('./EvaluatedPermissions'); const Constants = require('../util/Constants'); const Collection = require('../util/Collection'); +const Presence = require('./Presence').Presence; /** * Represents a Member of a Guild on Discord @@ -107,7 +108,7 @@ class GuildMember { * @readonly */ get presence() { - return this.frozenPresence || this.guild.presences.get(this.id); + return this.frozenPresence || this.guild.presences.get(this.id) || new Presence(); } /** diff --git a/src/structures/Presence.js b/src/structures/Presence.js index 242c52389..d84a4c9bc 100644 --- a/src/structures/Presence.js +++ b/src/structures/Presence.js @@ -3,7 +3,9 @@ */ class Presence { constructor(data) { - if (!data) return; + if (!data) { + data = {}; + } /** * The status of the presence: *