diff --git a/lib/src/events/PresenceUpdateEvent.dart b/lib/src/events/PresenceUpdateEvent.dart index c64fe36..d861ee7 100644 --- a/lib/src/events/PresenceUpdateEvent.dart +++ b/lib/src/events/PresenceUpdateEvent.dart @@ -14,8 +14,9 @@ class PresenceUpdateEvent { if (data['user'].length > 1) { data['user'] = data['user'] as Map; } else { - data['user'] = client.users[data['user']['id']]._raw; + data['user'] = client.users[data['user']['id']]?._raw; } + if (data['user'] == null) return; this.newMember = new Member._new(client, data); this.oldMember = newMember.guild.members[newMember.id];