diff --git a/bot/src/bot/modules/event_handler.ts b/bot/src/bot/modules/event_handler.ts index d9536f9..c67246e 100644 --- a/bot/src/bot/modules/event_handler.ts +++ b/bot/src/bot/modules/event_handler.ts @@ -139,3 +139,22 @@ client.on('serverMemberJoin', (member) => { embeds: [embed], }).catch(e => logger.debug('Cannot send hello message: ' + e)); }); + +client.on('disconnected', () => logger.warn('Client disconnected!')); + +client.events.on('state', (state) => { + switch(state) { + case 2: + logger.info('Connection state: Connected'); + break; + case 1: + logger.info('Connection state: Connecting'); + break; + case 3: + logger.info('Connection state: Disconnected'); + break; + case 0: + logger.info('Connection state: Idle'); + break; + } +});