mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00: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:
parent
eb537b6f48
commit
52bc5b0170
2 changed files with 2 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ class MessageEmbed {
|
||||||
* The color of this embed
|
* The color of this embed
|
||||||
* @type {?number}
|
* @type {?number}
|
||||||
*/
|
*/
|
||||||
this.color = data.color;
|
this.color = Util.resolveColor(data.color);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The timestamp of this embed
|
* 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;
|
description?: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
timestamp?: Date | number;
|
timestamp?: Date | number;
|
||||||
color?: number | string;
|
color?: ColorResolvable;
|
||||||
fields?: { name: string; value: string; inline?: boolean; }[];
|
fields?: { name: string; value: string; inline?: boolean; }[];
|
||||||
files?: (MessageAttachment | string | FileOptions)[];
|
files?: (MessageAttachment | string | FileOptions)[];
|
||||||
author?: { name?: string; url?: string; icon_url?: string; iconURL?: string; };
|
author?: { name?: string; url?: string; icon_url?: string; iconURL?: string; };
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue