// Zentrale Embed-Factory: einheitlicher Brand-Look für alle Bot-Embeds. // Footer mit Bot-Avatar, Brand-Farbe und Timestamp kommen automatisch. import { EmbedBuilder } from 'discord.js'; import { brandColor, brandColor2, brandFooter } from './runtime-settings.js'; /** * Gebrandetes Embed erzeugen. * @param {import('discord.js').Client|null} client — für das Footer-Icon (Bot-Avatar) * @param {string} tag — Footer-Tag, z. B. 'DEVLOG' → "D4RKST3R // DEVLOG" * @param {{ secondary?: boolean, footerSuffix?: string, timestamp?: boolean }} [opts] */ export function brandEmbed(client, tag, opts = {}) { const embed = new EmbedBuilder().setColor(opts.secondary ? brandColor2() : brandColor()); embed.setFooter({ text: brandFooter(tag) + (opts.footerSuffix ? ` • ${opts.footerSuffix}` : ''), iconURL: client?.user?.displayAvatarURL?.({ size: 64 }) ?? undefined, }); if (opts.timestamp !== false) embed.setTimestamp(); return embed; }