mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 14:02:02 +00:00
fix(resolveColor): not interpreting DEFAULT correctly
This commit is contained in:
parent
2e0048add1
commit
d46eec4da4
1 changed files with 1 additions and 0 deletions
|
|
@ -262,6 +262,7 @@ class Util {
|
|||
static resolveColor(color) {
|
||||
if (typeof color === 'string') {
|
||||
if (color === 'RANDOM') return Math.floor(Math.random() * (0xFFFFFF + 1));
|
||||
if (color === 'DEFAULT') return 0;
|
||||
color = Colors[color] || parseInt(color.replace('#', ''), 16);
|
||||
} else if (color instanceof Array) {
|
||||
color = (color[0] << 16) + (color[1] << 8) + color[2];
|
||||
|
|
|
|||
Loading…
Reference in a new issue