mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
fix(UserUpdateAction): rely on client.user when ids match (#6511)
This commit is contained in:
@@ -7,7 +7,7 @@ class UserUpdateAction extends Action {
|
|||||||
handle(data) {
|
handle(data) {
|
||||||
const client = this.client;
|
const client = this.client;
|
||||||
|
|
||||||
const newUser = client.users.cache.get(data.id);
|
const newUser = data.id === client.user.id ? client.user : client.users.cache.get(data.id);
|
||||||
const oldUser = newUser._update(data);
|
const oldUser = newUser._update(data);
|
||||||
|
|
||||||
if (!oldUser.equals(newUser)) {
|
if (!oldUser.equals(newUser)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user