refactor(MessageEmbed): Deprecate strings for setAuthor() (completely) and setFooter() (#7153)

This commit is contained in:
Jiralite
2021-12-29 10:04:16 +00:00
committed by GitHub
parent baacd6ba69
commit 3496516dc9
2 changed files with 45 additions and 13 deletions

11
typings/index.d.ts vendored
View File

@@ -1694,11 +1694,13 @@ export class MessageEmbed {
public addField(name: string, value: string, inline?: boolean): this;
public addFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): this;
public setFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): this;
public setAuthor(options: string | EmbedAuthorData | null): this;
/** @deprecated Supply a lone object of interface {@link EmbedAuthorData} instead of more parameters. */
public setAuthor(options: EmbedAuthorData | null): this;
/** @deprecated Supply a lone object of interface {@link EmbedAuthorData} instead. */
public setAuthor(name: string, iconURL?: string, url?: string): this;
public setColor(color: ColorResolvable): this;
public setDescription(description: string): this;
public setFooter(options: EmbedFooterData | null): this;
/** @deprecated Supply a lone object of interface {@link EmbedFooterData} instead. */
public setFooter(text: string, iconURL?: string): this;
public setImage(url: string): this;
public setThumbnail(url: string): this;
@@ -4318,6 +4320,11 @@ export interface EmbedFieldData {
inline?: boolean;
}
export interface EmbedFooterData {
text: string;
iconURL?: string;
}
export type EmojiIdentifierResolvable = string | EmojiResolvable;
export type EmojiResolvable = Snowflake | GuildEmoji | ReactionEmoji;