mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-02 14:38:49 +00:00
fix: listen for more shard events
This commit is contained in:
1 parent
cd3947c22b
commit
1e1170099e
1 file changed
+16
@@ -37,6 +37,22 @@ manager.on('shardCreate', (shard: Shard) => {
|
||||
logger.info('All shards ready, bot is now online.');
|
||||
}
|
||||
});
|
||||
|
||||
shard.on(ShardEvents.Death, (event) => {
|
||||
logger.fatal(event, 'SHARD CLOSED UNEXPECTEDLY.');
|
||||
});
|
||||
|
||||
shard.on(ShardEvents.Error, (error) => {
|
||||
logger.error(error, 'Shard experienced an error, most likely related to websocket connection error.');
|
||||
});
|
||||
|
||||
shard.on(ShardEvents.Disconnect, () => {
|
||||
logger.warn('Shard disconnected.');
|
||||
});
|
||||
|
||||
shard.on(ShardEvents.Reconnecting, () => {
|
||||
logger.warn('Shard reconnecting.');
|
||||
});
|
||||
});
|
||||
|
||||
manager.spawn();
|
||||
Reference in new issue
Block a user