File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,15 @@ class PresenceUpdateAction extends Action {
26
26
} ) ;
27
27
this . client . emit ( Events . GUILD_MEMBER_AVAILABLE , member ) ;
28
28
}
29
- guild . presences . _add ( Object . assign ( data , { guild } ) ) ;
30
- if ( this . client . listenerCount ( Events . PRESENCE_UPDATE ) && member && ! member . presence . equals ( oldPresence ) ) {
29
+ const newPresence = guild . presences . _add ( Object . assign ( data , { guild } ) ) ;
30
+ if ( this . client . listenerCount ( Events . PRESENCE_UPDATE ) && ! newPresence . equals ( oldPresence ) ) {
31
31
/**
32
32
* Emitted whenever a guild member's presence (e.g. status, activity) is changed.
33
33
* @event Client#presenceUpdate
34
34
* @param {?Presence } oldPresence The presence before the update, if one at all
35
35
* @param {Presence } newPresence The presence after the update
36
36
*/
37
- this . client . emit ( Events . PRESENCE_UPDATE , oldPresence , member . presence ) ;
37
+ this . client . emit ( Events . PRESENCE_UPDATE , oldPresence , newPresence ) ;
38
38
}
39
39
}
40
40
}
You can’t perform that action at this time.
0 commit comments