Closed shikhir-arora closed 6 years ago
@Fiddlekins Does this look a bit better?
Note that it suffices just having const GAME = "";
as a declared empty string and doing a simple truth check on it, since if (GAME)
will be false if the string remains empty, and true otherwise.
Looks good, thanks for the time
Just some tidyup. 🙂
Error handling (on disconnect, wait 10 seconds and retry connection to avoid connecting too many times), log reconnect/disconnect actions, catch uncaught rejections (uncaught promises) and uncaught exceptions.
Log "Ready" with some more info ¯_(ツ)_/¯
Optional playing / game status for bot.