Admin: Reiter Matches und Einstellungen, Discord-Embeds, CSTV-Zugang

Der Admin-Bereich bekommt Reiter. Die Discord-Einstellungen liegen
unter „Einstellungen“. Meldungen sind als Embeds formatiert, und die
Match-Startmeldung enthält den CSTV-Zugang (Passwort und Adresse).

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
SPP UserandClaude Haiku 5.5 committed 2026-10-26 11:03:54 +01:00
1 parent 0197cd05ce
commit e9efe38b76
6 files changed
+79 -21

No files matched your search

+4 -2
View File
@@ -27,12 +27,14 @@ export function createDiscordNotifier(url, { fetchImpl = fetch, logger = console
return {
enabled: true,
/** Liefert true, wenn Discord die Nachricht angenommen hat. */
async send(content) {
async send(message) {
// Text oder vollständige Discord-Payload (z. B. mit embeds)
const payload = typeof message === 'string' ? { content: message.slice(0, MAX_LENGTH) } : message;
try {
const res = await fetchImpl(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ content: content.slice(0, MAX_LENGTH) }),
body: JSON.stringify(payload),
signal: AbortSignal.timeout(TIMEOUT_MS),
});
if (res.ok) return true;