mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
types(*): make hex color types compatible with ColorResolvable (#5973)
* types(*): make hex color types compatible with ColorResolvable * types(*): create HexColorString type * types(HexColorString): move to a less awkward place
This commit is contained in:
12
typings/index.d.ts
vendored
12
typings/index.d.ts
vendored
@@ -1076,7 +1076,7 @@ declare module 'discord.js' {
|
||||
public readonly bannable: boolean;
|
||||
public deleted: boolean;
|
||||
public readonly displayColor: number;
|
||||
public readonly displayHexColor: string;
|
||||
public readonly displayHexColor: HexColorString;
|
||||
public readonly displayName: string;
|
||||
public guild: Guild;
|
||||
public readonly id: Snowflake;
|
||||
@@ -1502,7 +1502,7 @@ declare module 'discord.js' {
|
||||
public description: string | null;
|
||||
public fields: EmbedField[];
|
||||
public footer: MessageEmbedFooter | null;
|
||||
public readonly hexColor: string | null;
|
||||
public readonly hexColor: HexColorString | null;
|
||||
public image: MessageEmbedImage | null;
|
||||
public readonly length: number;
|
||||
public provider: MessageEmbedProvider | null;
|
||||
@@ -1739,7 +1739,7 @@ declare module 'discord.js' {
|
||||
public deleted: boolean;
|
||||
public readonly editable: boolean;
|
||||
public guild: Guild;
|
||||
public readonly hexColor: string;
|
||||
public readonly hexColor: HexColorString;
|
||||
public hoist: boolean;
|
||||
public id: Snowflake;
|
||||
public managed: boolean;
|
||||
@@ -3220,7 +3220,7 @@ declare module 'discord.js' {
|
||||
| 'RANDOM'
|
||||
| [number, number, number]
|
||||
| number
|
||||
| `#${string}`;
|
||||
| HexColorString;
|
||||
|
||||
interface CommandInteractionOption {
|
||||
name: string;
|
||||
@@ -3607,6 +3607,8 @@ declare module 'discord.js' {
|
||||
|
||||
type GuildTemplateResolvable = string;
|
||||
|
||||
type HexColorString = `#${string}`;
|
||||
|
||||
interface HTTPAttachmentData {
|
||||
attachment: string | Buffer | Stream;
|
||||
name: string;
|
||||
@@ -4112,7 +4114,7 @@ declare module 'discord.js' {
|
||||
> {
|
||||
readonly bannable: boolean;
|
||||
readonly displayColor: number;
|
||||
readonly displayHexColor: string;
|
||||
readonly displayHexColor: HexColorString;
|
||||
readonly displayName: string;
|
||||
guild: Guild;
|
||||
readonly manageable: boolean;
|
||||
|
||||
Reference in New Issue
Block a user