feat(discord): log shard disconnections

Refs: #23
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
nocodeandClaude Opus 5 committed 2026-09-13 12:19:11 +02:00
1 parent a54affd741
commit 64039c9d06
1 file changed
+11
+11
View File
@@ -0,0 +1,11 @@
import { Events } from 'discord.js';
import { createLogger } from '../core/logger.js';
const log = createLogger('discord');
// discord.js reconnects automatically with backoff; we only log the lifecycle (M2-T04 / M2-T08).
export const name = Events.ShardDisconnect;
export async function execute(_client, closeEvent, shardId) {
log.warn('Shard disconnected', { shardId, code: closeEvent?.code });
}