Bug-Reports, Devlog-Threads und Watchdog
- /bug (alle Member): erstellt Gitea-Issue inkl. Screenshot-Upload als Asset; bug_reports-Tabelle für den Rückkanal — Issue geschlossen (issues-Webhook) → DM an den Reporter - Auto-Thread '💬 Devlog <Datum>' unter jedem Devlog-Post (Setting, Default an) - Watchdog: prüft Setting watchdog_urls alle 2 min, DM an Admin nach 2 Fails in Folge + Entwarnung mit Downtime-Dauer - Setup-Seite: Bug-Repo, Threads-Toggle, Watchdog-URLs; Env GITEA_API_TOKEN/GITEA_URL Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import { join } from 'node:path';
|
||||
import { ActionRowBuilder, AttachmentBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder } from 'discord.js';
|
||||
import { config } from '../config.js';
|
||||
import { saveDevlog } from '../db.js';
|
||||
import { devlogChannelId, devlogPingRoleId } from '../runtime-settings.js';
|
||||
import { devlogChannelId, devlogPingRoleId, devlogThreadsEnabled } from '../runtime-settings.js';
|
||||
import { imagesDir } from '../bot/devlog-archive.js';
|
||||
|
||||
const BRAND_YELLOW = 0xf5c518;
|
||||
@@ -154,6 +154,21 @@ export function registerDevlogEndpoint(app, client) {
|
||||
: {}),
|
||||
});
|
||||
|
||||
// Diskussions-Thread unterm Devlog (Fehler nicht fatal — z. B. fehlende Rechte)
|
||||
if (devlogThreadsEnabled() && typeof message.startThread === 'function') {
|
||||
try {
|
||||
const threadDate = new Intl.DateTimeFormat('de-DE', {
|
||||
day: '2-digit', month: '2-digit',
|
||||
}).format(new Date());
|
||||
await message.startThread({
|
||||
name: `💬 Devlog ${threadDate}`,
|
||||
autoArchiveDuration: 4320, // 3 Tage
|
||||
});
|
||||
} catch (error) {
|
||||
request.log.warn(`Devlog-Thread fehlgeschlagen: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
// Direkt archivieren (der Live-Listener ignoriert eigene Bot-Posts bewusst)
|
||||
const imageFiles = [];
|
||||
for (const [i, f] of files.entries()) {
|
||||
|
||||
Reference in New Issue
Block a user