mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 02:53:31 +01:00
fix(resolveColor): not interpreting DEFAULT correctly
This commit is contained in:
@@ -351,6 +351,7 @@ class ClientDataResolver {
|
|||||||
static resolveColor(color) {
|
static resolveColor(color) {
|
||||||
if (typeof color === 'string') {
|
if (typeof color === 'string') {
|
||||||
if (color === 'RANDOM') return Math.floor(Math.random() * (0xFFFFFF + 1));
|
if (color === 'RANDOM') return Math.floor(Math.random() * (0xFFFFFF + 1));
|
||||||
|
if (color === 'DEFAULT') return 0;
|
||||||
color = Constants.Colors[color] || parseInt(color.replace('#', ''), 16);
|
color = Constants.Colors[color] || parseInt(color.replace('#', ''), 16);
|
||||||
} else if (color instanceof Array) {
|
} else if (color instanceof Array) {
|
||||||
color = (color[0] << 16) + (color[1] << 8) + color[2];
|
color = (color[0] << 16) + (color[1] << 8) + color[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user