fix: Client#userUpdate receiving wrong packet

This commit is contained in:
Lewdcario 2018-11-05 18:24:50 -06:00
parent b59c75e402
commit 08002d0576
No known key found for this signature in database
GPG key ID: 0C2F838D9778F58C
2 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ class PresenceUpdateAction extends Action {
if (!cached) return;
if (data.user && data.user.username) {
if (!cached.equals(data.user)) this.client.actions.UserUpdate.handle(data);
if (!cached.equals(data.user)) this.client.actions.UserUpdate.handle(data.user);
}
const guild = this.client.guilds.get(data.guild_id);

View file

@ -5,8 +5,8 @@ class UserUpdateAction extends Action {
handle(data) {
const client = this.client;
const newUser = client.users.get(data.user.id);
const oldUser = newUser._update(data.user);
const newUser = client.users.get(data.id);
const oldUser = newUser._update(data);
if (!oldUser.equals(newUser)) {
/**