@ayanaware/bentocord
Version:
Bentocord is a Bento plugin designed to rapidly build fully functional Discord Bots.
58 lines (57 loc) • 1.58 kB
TypeScript
export declare class EmbedBuilder {
type: 'rich' | 'image' | 'video' | 'gifv' | 'article' | 'link';
title: string;
description: string;
url: string;
color: number;
author: EmbedAuthor;
fields: Array<EmbedField>;
image: EmbedMedia;
thumbnail: EmbedMedia;
footer: EmbedFooter;
timestamp: string | Date;
setTitle(title: string): this;
setDescription(description: string): this;
setUrl(url: string): this;
setColor(color: number): this;
setAuthor(name: string, url?: string, iconUrl?: string): this;
addField(name: string, value?: string, inline?: boolean): this;
setThumbnail(url: string): this;
setImage(url: string): this;
setFooter(text: string, iconUrl?: string): this;
setTimestamp(timestamp?: (string | Date)): this;
toJSON(): {
type: "link" | "article" | "video" | "image" | "rich" | "gifv";
title: string;
description: string;
url: string;
author: EmbedAuthor;
timestamp: string | Date;
color: number;
fields: EmbedField[];
thumbnail: EmbedMedia;
image: EmbedMedia;
footer: EmbedFooter;
};
}
export interface EmbedAuthor {
name: string;
url?: string;
icon_url?: string;
}
export interface EmbedMedia {
url: string;
proxy_url?: string;
height?: number;
width?: number;
}
export interface EmbedField {
name: string;
value: string;
inline?: boolean;
}
export interface EmbedFooter {
text: string;
icon_url?: string;
proxy_icon_url?: string;
}