Closed jaipack17 closed 3 years ago
Can't seem to reproduce on 12.5.2. (Technically equal to 12.5.3 in this case)
let role = client.guilds.cache.get("846219248044343336").roles.cache.get("858718455477174312");
console.log(role.color)
let randomColorHex = Math.floor(Math.random()*16777215).toString(16);
role.edit({ color: `#${randomColorHex}` }).then(r => {
console.log(r.color)
})
Logging role color before change returns 13181643
which is the current color set in the server.
Logging the role color after change returns 13181643
the same color which was set before changing the role color. So the role color isn't really changed.
And it also isn't an issue with randomColorHex. I have logged it to the console several times. And it returns a valid random hexadecimal number.
Also the same code worked perfectly earlier.
Tried out your evaluation code as well. Prints the same role color, and doesn't change it.
Welp, seems like I reached the 1000 requests per 24 hours role editing ratelimit. Thats the reason why it doesn't work. Thanks.
Stumbled upon this issue today. Tried changing role color of a role in my server but it fails to change using discord.js. No errors are thrown in console.
Include a reproducible code sample here, if possible:
No errors are thrown but discord doesn't update the role color. Bot has the required permissions to edit the role. And everything seemed to work yesterday. Today, it just doesn't. Tried refreshing discord a few times to see if my cache updates but nope. Doesn't change the color. Trying
.catch(err => console.log(err))
will also not throw the error.Further details:
Relevant client options: