discord.js
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -22,3 +22,3 @@ "use strict"; | ||
value: function equals(object) { | ||
return object.id === this.id; | ||
return object && object.id === this.id; | ||
} | ||
@@ -25,0 +25,0 @@ }, { |
@@ -532,3 +532,7 @@ //discord.js modules | ||
} else { | ||
self.serverCreateListener.set(res.body.guild.id, [resolve, callback]); | ||
if (self.getServer("id", res.body.guild.id)) { | ||
resolve(self.getServer("id", res.body.guild.id)); | ||
} else { | ||
self.serverCreateListener.set(res.body.guild.id, [resolve, callback]); | ||
} | ||
} | ||
@@ -1269,3 +1273,3 @@ }); | ||
if (this.token && this.websocket.readyState === WebSocket.OPEN && !this.alreadySentData) { | ||
if (this.token && !this.alreadySentData) { | ||
@@ -1272,0 +1276,0 @@ this.alreadySentData = true; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -7,3 +7,7 @@ "use strict"; | ||
exports.Endpoints = Endpoints; | ||
exports.Client = Client; | ||
var Discord = { | ||
Endpoints: Endpoints, | ||
Client: Client | ||
}; | ||
module.exports = Discord; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "discord.js", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "A way to interface with the Discord API", | ||
@@ -30,3 +30,10 @@ "main": "./lib/index.js", | ||
"ws": "^0.7.2" | ||
}, | ||
"devDependencies": { | ||
"grunt": "~0.4.5", | ||
"grunt-babel": "^5.0.1", | ||
"grunt-browserify": "^4.0.0", | ||
"grunt-contrib-uglify": "^0.9.2", | ||
"load-grunt-tasks": "^3.2.0" | ||
} | ||
} |
@@ -17,3 +17,3 @@ class Channel { | ||
equals(object) { | ||
return object.id === this.id; | ||
return (object && object.id === this.id); | ||
} | ||
@@ -20,0 +20,0 @@ |
@@ -545,3 +545,7 @@ //discord.js modules | ||
} else { | ||
self.serverCreateListener.set(res.body.guild.id, [resolve, callback]); | ||
if (self.getServer("id", res.body.guild.id)) { | ||
resolve(self.getServer("id", res.body.guild.id)); | ||
} else { | ||
self.serverCreateListener.set(res.body.guild.id, [resolve, callback]); | ||
} | ||
} | ||
@@ -1049,3 +1053,3 @@ }); | ||
if (this.token && this.websocket.readyState === WebSocket.OPEN && !this.alreadySentData) { | ||
if (this.token && !this.alreadySentData) { | ||
@@ -1052,0 +1056,0 @@ this.alreadySentData = true; |
@@ -5,3 +5,7 @@ var request = require("superagent"); | ||
exports.Endpoints = Endpoints; | ||
exports.Client = Client; | ||
var Discord = { | ||
Endpoints : Endpoints, | ||
Client : Client | ||
} | ||
module.exports = Discord; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
255328
33
6430
5
1
10