feat(discord): log shard disconnections

Refs: #23
This commit is contained in:
nocode committed 2026-09-13 12:25:07 +02:00
1 parent e9c110a752
commit 8f48efdcdc
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 });
}