forked from ilikecats/papercats
Reconnect bot if error occurs
This commit is contained in:
parent
64d9c5e6bc
commit
73bf9f86f2
@ -46,6 +46,9 @@ function foundProto(func) {
|
|||||||
|
|
||||||
function connect() {
|
function connect() {
|
||||||
client.connectGame(process.argv[2], process.argv[3] || '[BOT]', function(success, msg) {
|
client.connectGame(process.argv[2], process.argv[3] || '[BOT]', function(success, msg) {
|
||||||
|
if (!success) {
|
||||||
|
setTimeout(connect, 1000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user