Closed yario-o closed 8 years ago
@yario-o i wish there was. so i can reconnect the bots on death.
The Bots reconnect automatically : const bot = new Bot({ name: process.env.SLITHER_SERVER_NAME || 'www.slither.gg', reconnect: true, // Here the bots reconnect automatically skin: skin, server: server })
@yario-o thanks.
So. There is an event when bot die?
@yario-o i dont think so if yes then what will it be for?
Because the number of bot alive is not perfect. Look :
bot.on('disconnect', function() {
alive--
print(bot.name + ' died')
})
It do alive--
when bot disconnect so when proxy disconnect is do alive--
@devesh457 Thx
EDIT : I just find the dead event on the lib now by number of bots alive can't be negative Just replace : bot.on('disconnect', function() { alive-- print(bot.name + ' died') }) To : bot.on('dead', function() { alive-- print(bot.name + ' died') })
Is There an event when bot die ? I Want to do :
bot.on('TheEvent', function() {