TypeScript Argument of type 'string' is not assignable to parameter of type 'ColorResolvable'.
I am importing my color value from a file named
bot.config.ts
which can be seen below (second picture).7 Replies
I understand string cannot be assigned to color resolvable, but when I manually put in the string it works.
And this is on the docs site
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
👍
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I see
this is unnecessary
you should store your hex values in number form instead
so 0xff1f25
that won't give you errors
or you can assert the type of your color to be HexColorString
also please don't use var