fix(Role): allow edit method to null the color (#2447)

This commit is contained in:
Frangu Vlad
2018-04-09 10:54:40 +03:00
committed by SpaceEEC
parent ef138fd3e9
commit f985b6bef3

View File

@@ -179,7 +179,7 @@ class Role extends Base {
return this.client.api.guilds[this.guild.id].roles[this.id].patch({
data: {
name: data.name || this.name,
color: Util.resolveColor(data.color || this.color),
color: data.color !== null ? Util.resolveColor(data.color || this.color) : null,
hoist: typeof data.hoist !== 'undefined' ? data.hoist : this.hoist,
permissions: data.permissions,
mentionable: typeof data.mentionable !== 'undefined' ? data.mentionable : this.mentionable,