import { EmbedBuilder, EmbedFooterData, Interaction, Message } from "discord.js"; import { CocoaEmbed } from "./embed.js"; /** Message | Interaction */ export type Context = Message | Interaction; export interface EmbedStyleBase { author?: "invoker" | "bot"; color?: number; footer?: EmbedFooterData; } export type EmbedStyleOptions = { [prop in keyof EmbedStyleBase]: EmbedStyleBase[prop] | ((ctx: Context) => EmbedStyleBase[prop]); }; /** * Usage: * ```js * export const style = new EmbedStyle({ ... }); * ``` * * Embed Styles Properties: * - author: "invoker" will set the author to who invoke the commands * "bot" is bot, obviously. * - color: Color of Embed * - footer: Footer of Embed * * Embed Styles Methods (See each's method JSDoc for more info): * - use * - apply * * You can also pass the function that recieves Command Context and return the option. * */ export declare class EmbedStyle { private style; constructor(style: EmbedStyleOptions); private setStyle; /** * Create Template Embed based on styles * * Example Usage: * ```js * import { style } from "./where/you/export/yourStyle" * const emb = style.use(ctx).setTitle(...) * ``` * * @returns CocoaEmbed, Derived Class of Embed */ use(ctx: Context): CocoaEmbed; /** * Apply styles on existing Embed * * Example Usage: * ```js * const embed = style.apply(ctx, generateHelpCommandAsEmbed()) * ``` */ apply(ctx: Context, embed: EmbedBuilder): EmbedBuilder; private resolve; /** * Extends (or Override) this style * * @returns new extended `EmbedStyle` */ extends(style: Partial): EmbedStyle; } /** * Alternative to `new EmbedStyle(opts)` to create Embed Style directly * * ~~Just like discordjs create stuff~~ * * See {@link EmbedStyle} */ export declare function createEmbedStyle(style: EmbedStyleOptions): EmbedStyle; //# sourceMappingURL=styles.d.ts.map