mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(MessageEmbed): resolve color in embed constructor (#2912)
* Resolve color in embed constructor * Use ColorResolvable type for color parameter * docs(MessageEmbed): color property is still a number
This commit is contained in:
@@ -45,7 +45,7 @@ class MessageEmbed {
|
||||
* The color of this embed
|
||||
* @type {?number}
|
||||
*/
|
||||
this.color = data.color;
|
||||
this.color = Util.resolveColor(data.color);
|
||||
|
||||
/**
|
||||
* The timestamp of this embed
|
||||
|
||||
2
typings/index.d.ts
vendored
2
typings/index.d.ts
vendored
@@ -1965,7 +1965,7 @@ declare module 'discord.js' {
|
||||
description?: string;
|
||||
url?: string;
|
||||
timestamp?: Date | number;
|
||||
color?: number | string;
|
||||
color?: ColorResolvable;
|
||||
fields?: { name: string; value: string; inline?: boolean; }[];
|
||||
files?: (MessageAttachment | string | FileOptions)[];
|
||||
author?: { name?: string; url?: string; icon_url?: string; iconURL?: string; };
|
||||
|
||||
Reference in New Issue
Block a user