yolkbot 0.1.2 → 0.1.3-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/build/global.js +1 -1
- package/browser/build/module.js +1 -1
- package/package.json +1 -1
- package/src/bot.js +4 -2
- package/src/.DS_Store +0 -0
package/package.json
CHANGED
package/src/bot.js
CHANGED
|
@@ -290,7 +290,7 @@ export class Bot {
|
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
async #processLoginData(loginData) {
|
|
293
|
-
if (typeof loginData
|
|
293
|
+
if (typeof loginData !== 'object') {
|
|
294
294
|
this.emit('authFail', loginData);
|
|
295
295
|
return false;
|
|
296
296
|
}
|
|
@@ -1913,12 +1913,14 @@ export class Bot {
|
|
|
1913
1913
|
}
|
|
1914
1914
|
|
|
1915
1915
|
quit(noCleanup = false, finishDispatches = false) {
|
|
1916
|
+
if (this.state.quit) return;
|
|
1917
|
+
|
|
1916
1918
|
if (this.intents.includes(this.Intents.PLAYER_HEALTH))
|
|
1917
1919
|
clearInterval(this.healthIntervalId);
|
|
1918
1920
|
|
|
1919
1921
|
clearInterval(this.updateIntervalId);
|
|
1920
1922
|
|
|
1921
|
-
if (this.game
|
|
1923
|
+
if (this.game?.socket) this.game.socket.close();
|
|
1922
1924
|
if (this.matchmaker) this.matchmaker.close();
|
|
1923
1925
|
|
|
1924
1926
|
if (!finishDispatches) this._dispatches = [];
|
package/src/.DS_Store
DELETED
|
Binary file
|