refactor: new node features (#5132)

Co-authored-by: Antonio Román <kyradiscord@gmail.com>
This commit is contained in:
Sugden
2021-06-30 21:40:33 +01:00
committed by GitHub
parent f108746c15
commit 1e8f01253e
68 changed files with 305 additions and 360 deletions

View File

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