mirror of
https://github.com/danbulant/discord.js
synced 2026-06-19 06:31:20 +00:00
fix(User): only assign to bot initially or if info is actually present (#4990)
This commit is contained in:
parent
2e940e635d
commit
eaecd0e8b7
1 changed files with 7 additions and 5 deletions
|
|
@ -45,11 +45,13 @@ class User extends Base {
|
|||
this.username = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the user is a bot
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.bot = Boolean(data.bot);
|
||||
if ('bot' in data || typeof this.bot !== 'boolean') {
|
||||
/**
|
||||
* Whether or not the user is a bot
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.bot = Boolean(data.bot);
|
||||
}
|
||||
|
||||
if ('discriminator' in data) {
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue