mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
Improve role position updating (allows for <=0)
This commit is contained in:
parent
c2c477834f
commit
8945344a3b
1 changed files with 1 additions and 1 deletions
|
|
@ -419,7 +419,7 @@ class RESTMethods {
|
|||
return new Promise((resolve, reject) => {
|
||||
const data = {};
|
||||
data.name = _data.name || role.name;
|
||||
data.position = _data.position || role.position;
|
||||
data.position = typeof _data.position !== 'undefined' ? _data.position : role.position;
|
||||
data.color = _data.color || role.color;
|
||||
if (typeof data.color === 'string' && data.color.startsWith('#')) {
|
||||
data.color = parseInt(data.color.replace('#', ''), 16);
|
||||
|
|
|
|||
Loading…
Reference in a new issue