Server-Monitor v3, Composer v2, Temp-Voice-Panel und Embed-Polish
- Server-Monitor v3: gamedig-Integration (300+ Spiele), GSM-Stil-Embeds (Spieler-Balken mit %, Map, Spieler-Liste, klickbarer Connect-Link, Ping im Footer), Down/Up-Alerts (2 Fails → 🚨, Recovery → ✅ mit Downtime) in konfigurierbaren Alert-Kanal; Server-Tab mit 19 Spiel-Presets, Host/Port bzw. Query-URL und Connect-URL - Composer v2: visueller Embed-Builder mit Live-Discord-Preview (Autor, Felder, Bilder, Farbe, Footer, Timestamp), speicherbare Vorlagen (/api/templates), /api/compose versteht volle Embeds - Temp-Voice: Control-Panel im erstellten Kanal (Umbenennen, Sperren, Limit, Löschen) — nur der Kanal-Besitzer darf bedienen - Embed-Polish: brandEmbed-Factory (src/embeds.js), Footer überall mit Bot-Avatar-Icon Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// 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;
|
||||
}
|
||||
Reference in New Issue
Block a user