1
0
forked from keinBot/cuffeo

kläglicher Versuch Reconnects zu fixen

This commit is contained in:
Flummi
2021-01-27 09:03:59 +01:00
parent 864f7c3591
commit f3ecb33a9d
3 changed files with 19 additions and 6 deletions

View File

@@ -87,9 +87,12 @@ export default class tg extends EventEmitter {
this.emit("data", ["error", "tg timed out lol"]);
else if(err.type === "tg")
this.emit("data", ["error", err.message]);
await this.connect();
}
finally {
setTimeout(async () => { await this.poll(); }, this.options.pollrate);
setTimeout(async () => {
await this.poll();
}, this.options.pollrate);
}
}
async send(chatid, msg, reply = null) {