mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 14:41:36 +00:00
Webpack build for branch 11.3-dev: 8a3ae875bb
This commit is contained in:
parent
ba1a8a108e
commit
1152c30074
2 changed files with 4 additions and 4 deletions
|
|
@ -6283,7 +6283,7 @@ class Message {
|
|||
* The author of the message
|
||||
* @type {User}
|
||||
*/
|
||||
this.author = this.client.dataManager.newUser(data.author);
|
||||
this.author = this.client.dataManager.newUser(data.author, !data.webhook_id);
|
||||
|
||||
/**
|
||||
* Represents the author of the message as a guild member
|
||||
|
|
@ -19419,10 +19419,10 @@ class ClientDataManager {
|
|||
return guild;
|
||||
}
|
||||
|
||||
newUser(data) {
|
||||
newUser(data, cache = true) {
|
||||
if (this.client.users.has(data.id)) return this.client.users.get(data.id);
|
||||
const user = new User(this.client, data);
|
||||
this.client.users.set(user.id, user);
|
||||
if (cache) this.client.users.set(user.id, user);
|
||||
return user;
|
||||
}
|
||||
|
||||
|
|
|
|||
2
discord.11.3-dev.min.js
vendored
2
discord.11.3-dev.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue