refactor(Role): move initialization of delete prop out of _patch (#6776)

This commit is contained in:
Shubham Parihar
2021-10-08 02:47:47 +05:30
committed by GitHub
parent 78124aed28
commit 872e7a59b2

View File

@@ -32,6 +32,12 @@ class Role extends Base {
*/
this.unicodeEmoji = null;
/**
* Whether the role has been deleted
* @type {boolean}
*/
this.deleted = false;
if (data) this._patch(data);
}
@@ -97,12 +103,6 @@ class Role extends Base {
this.mentionable = data.mentionable;
}
/**
* Whether the role has been deleted
* @type {boolean}
*/
this.deleted = false;
if ('icon' in data) this.icon = data.icon;
if ('unicode_emoji' in data) this.unicodeEmoji = data.unicode_emoji;