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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yolkbot",
3
3
  "description": "create a shell shockers bot in under 10 lines.",
4
- "version": "0.1.2",
4
+ "version": "0.1.3-alpha.2",
5
5
  "keywords": [
6
6
  "shell shockers",
7
7
  "shellshock.io",
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 == 'string') {
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.socket) this.game.socket.close();
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