const { EmbedBuilder } = require('discord.js'); const { Colors } = require('../config'); /** * Build a themed embed with consistent WSB branding. */ function createEmbed({ title = null, description = null, color = Colors.PRIMARY, fields = [], thumbnail = null, image = null, footer = 'WSB — Wyvern Softworks Bot', timestamp = true, } = {}) { const embed = new EmbedBuilder().setColor(color); if (title) embed.setTitle(title); if (description) embed.setDescription(description); if (thumbnail) embed.setThumbnail(thumbnail); if (image) embed.setImage(image); if (fields.length) embed.addFields(fields); if (footer) embed.setFooter({ text: footer }); if (timestamp) embed.setTimestamp(); return embed; } function successEmbed(title, description) { return createEmbed({ title: `✅ ${title}`, description, color: Colors.SUCCESS }); } function errorEmbed(title, description) { return createEmbed({ title: `❌ ${title}`, description, color: Colors.ACCENT }); } function infoEmbed(title, description) { return createEmbed({ title: `ℹ️ ${title}`, description, color: Colors.INFO }); } function warnEmbed(title, description) { return createEmbed({ title: `⚠️ ${title}`, description, color: Colors.WARNING }); } function logEmbed({ title, description, color = Colors.MUTED, fields = [] }) { return createEmbed({ title, description, color, fields }); } module.exports = { createEmbed, successEmbed, errorEmbed, infoEmbed, warnEmbed, logEmbed };