mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 05:23:31 +01:00
refactor(Role): move initialization of delete prop out of _patch (#6776)
This commit is contained in:
@@ -32,6 +32,12 @@ class Role extends Base {
|
|||||||
*/
|
*/
|
||||||
this.unicodeEmoji = null;
|
this.unicodeEmoji = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether the role has been deleted
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
this.deleted = false;
|
||||||
|
|
||||||
if (data) this._patch(data);
|
if (data) this._patch(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,12 +103,6 @@ class Role extends Base {
|
|||||||
this.mentionable = data.mentionable;
|
this.mentionable = data.mentionable;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether the role has been deleted
|
|
||||||
* @type {boolean}
|
|
||||||
*/
|
|
||||||
this.deleted = false;
|
|
||||||
|
|
||||||
if ('icon' in data) this.icon = data.icon;
|
if ('icon' in data) this.icon = data.icon;
|
||||||
|
|
||||||
if ('unicode_emoji' in data) this.unicodeEmoji = data.unicode_emoji;
|
if ('unicode_emoji' in data) this.unicodeEmoji = data.unicode_emoji;
|
||||||
|
|||||||
Reference in New Issue
Block a user