mirror of
https://github.com/danbulant/discord.js
synced 2026-06-10 02:02:40 +00:00
fix: Client#userUpdate receiving wrong packet
This commit is contained in:
parent
b59c75e402
commit
08002d0576
2 changed files with 3 additions and 3 deletions
|
|
@ -8,7 +8,7 @@ class PresenceUpdateAction extends Action {
|
||||||
if (!cached) return;
|
if (!cached) return;
|
||||||
|
|
||||||
if (data.user && data.user.username) {
|
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);
|
const guild = this.client.guilds.get(data.guild_id);
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ class UserUpdateAction extends Action {
|
||||||
handle(data) {
|
handle(data) {
|
||||||
const client = this.client;
|
const client = this.client;
|
||||||
|
|
||||||
const newUser = client.users.get(data.user.id);
|
const newUser = client.users.get(data.id);
|
||||||
const oldUser = newUser._update(data.user);
|
const oldUser = newUser._update(data);
|
||||||
|
|
||||||
if (!oldUser.equals(newUser)) {
|
if (!oldUser.equals(newUser)) {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue