@tycrek/discord-hookr
Version:
A lightweight and easy way to send webhooks to Discord, without the added baggage of a full API client.
33 lines (32 loc) • 1.21 kB
TypeScript
import { Embed, Author, Provider, Field, Footer, MediaItem } from './ApiTypes';
/**
* Builds an embed to be passed into a Webhook Payload
*/
export declare class EmbedBuilder {
private embed;
constructor();
setTitle(title: string): this;
setDescription(description: string): this;
setURL(url: string): this;
setUrl(url: string): this;
setTimestamp(timestamp?: string | Date): this;
setColor(color: string): this;
setImage(image: MediaItem): this;
/**
* Please note that as of 2022-12-23, Webhooks DO NOT support the Video field.
* @deprecated
* @see https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params
*/
setVideo(video: MediaItem): this;
setThumbnail(thumbnail: MediaItem): this;
setFooter(footer: Footer): this;
/**
* Please note that as of 2022-12-23, Webhooks DO NOT support the Provider field.
* @deprecated
* @see https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params
*/
setProvider(provider: Provider): this;
setAuthor(author: Author): this;
addField(field: Field): this;
getEmbed(): Embed;
}