detritus-client
Version:
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
109 lines (108 loc) • 3.19 kB
TypeScript
import { BaseCollection } from '../collections/basecollection';
import { BaseSet } from '../collections/baseset';
import { GatewayRawEvents } from '../gateway/rawevents';
import { BaseStructureData, Structure } from '../structures/basestructure';
/**
* Utils Embed Structure
* @category Utils
*/
export declare class Embed extends Structure {
readonly _keys: BaseSet<string>;
author?: EmbedAuthor;
color?: number;
description?: string;
fields?: BaseCollection<number, EmbedField>;
footer?: EmbedFooter;
image?: EmbedImage;
provider?: EmbedProvider;
referenceId?: string;
thumbnail?: EmbedThumbnail;
timestamp?: Date;
title?: string;
type: string;
url?: string;
video?: EmbedVideo;
constructor(data?: GatewayRawEvents.RawMessageEmbed);
get length(): number;
get size(): number;
addField(name: string, value: string, inline?: boolean): Embed;
setAuthor(name?: null | string, iconUrl?: null | string, url?: null | string): Embed;
setColor(color: number): Embed;
setDescription(description: null | string): Embed;
setFooter(text: string, iconUrl?: null | string): Embed;
setImage(url: string): Embed;
setThumbnail(url: string): Embed;
setTimestamp(timestamp?: Date | number | string): Embed;
setTitle(title: string): Embed;
setUrl(url: string): Embed;
mergeValue(key: string, value: any): void;
toJSON(): GatewayRawEvents.RawMessageEmbed;
}
/**
* Utils Embed Author Structure, used for [Embed] Structures
* @category Utils
*/
export declare class EmbedAuthor extends Structure {
readonly _keys: BaseSet<string>;
iconUrl?: string;
name?: string;
proxyIconUrl?: string;
url?: string;
constructor(data: BaseStructureData);
}
/**
* Utils Embed Field Structure, used for [Embed] Structures
* @category Utils
*/
export declare class EmbedField extends Structure {
readonly _keys: BaseSet<string>;
inline?: boolean;
name: string;
value: string;
constructor(data: BaseStructureData);
}
/**
* Utils Embed Footer Structure, used for [Embed] Structures
* @category Utils
*/
export declare class EmbedFooter extends Structure {
readonly _keys: BaseSet<string>;
iconUrl?: string;
proxyIconUrl?: string;
text: string;
constructor(data: BaseStructureData);
}
/**
* Utils Embed Image Structure, used for [Embed] Structures
* @category Utils
*/
export declare class EmbedImage extends Structure {
readonly _keys: BaseSet<string>;
height?: number;
proxyUrl?: string;
url: string;
width?: number;
constructor(data: BaseStructureData);
}
/**
* Utils Provider Structure, used for [Embed] Structures
* @category Utils
*/
export declare class EmbedProvider extends Structure {
readonly _keys: BaseSet<string>;
name?: string;
url?: string;
constructor(data: BaseStructureData);
}
/**
* Utils Embed Thumbnail Structure, used for [Embed] Structures
* @category Utils
*/
export declare class EmbedThumbnail extends EmbedImage {
}
/**
* Utils Embed Video Structure, used for [Embed] Structures
* @category Utils
*/
export declare class EmbedVideo extends EmbedImage {
}