Skip to content

Commit

Permalink
Update embedBuilder.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Starman3787 committed Dec 27, 2024
1 parent b3457b0 commit d7bdd01
Showing 1 changed file with 83 additions and 15 deletions.
98 changes: 83 additions & 15 deletions src/util/builder/embedBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,94 @@ import isValidUrl from "../general/isValidUrl.js";
* @property {String} [icon_url] The footer icon url.
*/

/**
* Represents embed media.
* @typedef {Object} EmbedMedia
* @property {String} url The media url.
*/

/**
* Helps to create an embed for a message.
* @see {@link https://discord.com/developers/docs/resources/channel#embed-object-embed-structure}
* @property {String} [title] The title of the embed.
* @property {String} [description] The description of the embed.
* @property {String} [url] The url of the embed.
* @property {Number} [timestamp] The timestamp of the embed.
* @property {Number} [color] The color of the embed.
* @property {EmbedFooter} [footer] The footer of the embed.
* @property {EmbedAuthor} [author] The author of the embed.
* @property {Array<EmbedField>} [fields] The fields of the embed.
* @property {Object} [image] The image of the embed.
* @property {String} [image.url] The image url.
* @property {Object} [thumbnail] The thumbnail of the embed.
* @property {String} [thumbnail.url] The thumbnail url.
* @property {Object} [video] The video of the embed.
* @property {String} [video.url] The video url.
* @property {Number} characterCount The character count of the embed.
*/
class Embed {
/**
* The title of the embed.
* @type {String}
* @public
*/
title;

/**
* The description of the embed.
* @type {String}
* @public
*/
description;

/**
* The url of the embed.
* @type {String}
* @public
*/
url;

/**
* The timestamp of the embed.
* @type {Number}
* @public
*/
timestamp;

/**
* The color of the embed.
* @type {Number}
* @public
*/
color;

/**
* The footer of the embed.
* @type {EmbedFooter}
* @public
*/
footer;

/**
* The author of the embed.
* @type {EmbedAuthor}
* @public
*/
author;

/**
* The fields of the embed.
* @type {Array<EmbedField>}
* @public
*/
fields;

/**
* The image of the embed.
* @type {EmbedMedia}
* @public
*/
image;

/**
* The thumbnail of the embed.
* @type {EmbedMedia}
* @public
*/
thumbnail;

/**
* The video of the embed.
* @type {EmbedMedia}
* @public
*/
video;

/**
* Creates an embed structure.
* @param {Object?} [data] The embed data.
Expand Down

0 comments on commit d7bdd01

Please sign in to comment.