mirror of
https://github.com/janderedev/automod.git
synced 2024-12-22 02:35:27 +00:00
log revolt connection state changes
This commit is contained in:
parent
631584fa32
commit
f6d5d8cf69
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue