mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
fix(Role): check for presence of icon and unicode_emoji before patching (#6780)
This commit is contained in:
@@ -20,6 +20,18 @@ class Role extends Base {
|
|||||||
*/
|
*/
|
||||||
this.guild = guild;
|
this.guild = guild;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The icon hash of the role
|
||||||
|
* @type {?string}
|
||||||
|
*/
|
||||||
|
this.icon = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The unicode emoji for the role
|
||||||
|
* @type {?string}
|
||||||
|
*/
|
||||||
|
this.unicodeEmoji = null;
|
||||||
|
|
||||||
if (data) this._patch(data);
|
if (data) this._patch(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,17 +103,9 @@ class Role extends Base {
|
|||||||
*/
|
*/
|
||||||
this.deleted = false;
|
this.deleted = false;
|
||||||
|
|
||||||
/**
|
if ('icon' in data) this.icon = data.icon;
|
||||||
* The icon hash of the role
|
|
||||||
* @type {?string}
|
|
||||||
*/
|
|
||||||
this.icon = data.icon;
|
|
||||||
|
|
||||||
/**
|
if ('unicode_emoji' in data) this.unicodeEmoji = data.unicode_emoji;
|
||||||
* The unicode emoji for the role
|
|
||||||
* @type {?string}
|
|
||||||
*/
|
|
||||||
this.unicodeEmoji = data.unicode_emoji;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The tags this role has
|
* The tags this role has
|
||||||
|
|||||||
Reference in New Issue
Block a user