mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 12:03:31 +01:00
Fix user.status
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -34,6 +34,9 @@ class ClientDataManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
newUser(data) {
|
newUser(data) {
|
||||||
|
if (this.client.users.get(data.id)) {
|
||||||
|
return this.client.users.get(data.id);
|
||||||
|
}
|
||||||
const user = new User(this.client, data);
|
const user = new User(this.client, data);
|
||||||
this.client.users.set(user.id, user);
|
this.client.users.set(user.id, user);
|
||||||
return user;
|
return user;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class DMChannel extends Channel {
|
|||||||
|
|
||||||
setup(data) {
|
setup(data) {
|
||||||
super.setup(data);
|
super.setup(data);
|
||||||
const recipient = new User(this.client, data.recipients[0]);
|
const recipient = this.client.users.get(data.recipients[0].id) || new User(this.client, data.recipients[0]);
|
||||||
/**
|
/**
|
||||||
* The recipient on the other end of the DM
|
* The recipient on the other end of the DM
|
||||||
* @type {User}
|
* @type {User}
|
||||||
|
|||||||
Reference in New Issue
Block a user