mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 05:23:31 +01:00
typings(MessageEmbed): add spliceField and static checkField methods
This commit is contained in:
7
typings/index.d.ts
vendored
7
typings/index.d.ts
vendored
@@ -727,7 +727,7 @@ declare module 'discord.js' {
|
|||||||
public color: number;
|
public color: number;
|
||||||
public readonly createdAt: Date;
|
public readonly createdAt: Date;
|
||||||
public description: string;
|
public description: string;
|
||||||
public fields: { name: string; value: string; inline?: boolean; }[];
|
public fields: EmbedField[];
|
||||||
public files: (MessageAttachment | string | FileOptions)[];
|
public files: (MessageAttachment | string | FileOptions)[];
|
||||||
public footer: { text?: string; iconURL?: string; proxyIconURL?: string };
|
public footer: { text?: string; iconURL?: string; proxyIconURL?: string };
|
||||||
public readonly hexColor: string;
|
public readonly hexColor: string;
|
||||||
@@ -751,7 +751,10 @@ declare module 'discord.js' {
|
|||||||
public setTimestamp(timestamp?: Date | number): this;
|
public setTimestamp(timestamp?: Date | number): this;
|
||||||
public setTitle(title: StringResolvable): this;
|
public setTitle(title: StringResolvable): this;
|
||||||
public setURL(url: string): this;
|
public setURL(url: string): this;
|
||||||
|
public spliceField(index: number, deleteCount: number, name?: StringResolvable, value?: StringResolvable, inline?: boolean): this;
|
||||||
public toJSON(): object;
|
public toJSON(): object;
|
||||||
|
|
||||||
|
public static checkField(name: StringResolvable, value: StringResolvable, inline?: boolean): Required<EmbedField>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class MessageMentions {
|
export class MessageMentions {
|
||||||
@@ -1630,6 +1633,8 @@ declare module 'discord.js' {
|
|||||||
roles?: Collection<Snowflake, Role> | RoleResolvable[];
|
roles?: Collection<Snowflake, Role> | RoleResolvable[];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type EmbedField = { name: string, value: string, inline?: boolean };
|
||||||
|
|
||||||
type EmojiIdentifierResolvable = string | EmojiResolvable;
|
type EmojiIdentifierResolvable = string | EmojiResolvable;
|
||||||
|
|
||||||
type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji;
|
type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji;
|
||||||
|
|||||||
Reference in New Issue
Block a user